I have the following string: "aaaabbbb"  How can I get the last four characters and store them in a string using Python?
Is there a way to substring a string in Python, to get a new string from the third character to the end of the string?  Maybe like myString[2:end]?  If leaving the second part means 'till the end', and if you leave the first part, does it start from the start?
Should I test private methods or only public ones? I tried to fix my hard drive using Ubuntu but I encountered an error message and didn't know how to proceed. I need to fix my bad sectors   fsck /dev/sdb   fsck from util-linux 2.20.1   e2fsck 1.42.5 (29-Jul-2012)   fsck.ext2: Permission denied while trying to open /dev/sdb   You must have r/w access to the filesystem or be root An example of grey and white note that I mean is, like when you copy something, a small grey background and white lettered bubble appears for a few moments saying 'copied to clipboard'. My phone has some sort of malfunction where it dispays that prompt for several minutes at a time. Very annoying. How do I disable that? I am using a Samsung Galaxy S9. Let $(a_n)_{n≥0}$ and $(b_n)_{n≥0}$ be two sequences of a nomed algebra such that $\sum{\| a_n\|}$ and $\sum{\| b_n\|}$ converge, and$ $$$\forall n, \  a_n, b_n \neq 0$$  Show that $(\forall  k \in \mathbb N^*,  \ \sum_{n=0}^{\infty}{a_n}^k = \sum_{n=0}^{\infty}{b_n}^k) \implies \exists\ \sigma \in{\mathfrak S}_{\mathbb N} \ ,\ (a_n) = (b_{\sigma(n)})$  The vector-space should be a finite-dimensional $\mathbb R$-vector-space.   I do not see how to deal with the hypothesis. If you have ideas/hints...  It would be relevant to deal with complex sequences even if it is less general. But I don't think one can generalize using real and complex cases. /oracle/GR1/121/bin/sqlplus / as sysdba &lt;&lt;EOF &gt;&gt; $LOGFILE whenever sqlerror exit sql.sqlcode; set echo on; set serveroutput on; STARTUP; EXIT EOF   Already tried it with the path, but it hasn't worked. How prove :         $$ {31}^{11}&lt;{17}^{14} $$       help please! How to check if jQuery.ajax() request header Status is "304 Not Modified"? Find & Delete duplicated files on multiple harddisks at once I have 4 hard disks and want to find out which files on this four harddisks (including sub directories) are duplicates. It should be checked not only within a harddisk but against all the others as well.  The hard disks are large (3TB) therefor it has to be efficient (first filename than checksum checks or so) old Designjet 430 with Windows 10 It is usually said that existence of discrete spacetime violates Lorentz symmetry. What quantity is used to quantify such violation? I mean could someone points a reference for a derivation that shows such analysis.  My other question is: if Lorentz symmetry is violated, does that imply space-time is discrete? or not necessarily?) Why don't electrons crash into the nuclei they "orbit"? I'm having trouble understanding the simple "planetary" model of the atom that I'm being taught in my basic chemistry course.   In particular,    I can't see how a negatively charged electron can stay in "orbit" around a positively charged nucleus. Even if the electron actually orbits the nucleus, wouldn't that orbit eventually decay?  I can't reconcile the rapidly moving electrons required by the planetary model with the way atoms are described as forming bonds. If electrons are zooming around in orbits, how do they suddenly "stop" to form bonds.     I understand that certain aspects of quantum mechanics  to address these problems, and that there are  of atoms. My question here is whether the planetary model itself addresses these concerns in some way (that I'm missing) and whether I'm right to be uncomfortable with it. Berlin Public Transport Ticket Validity I have purchased an AB zone Berlin 7 day transport ticket and validated it on Sunday 17th April so hopefully it will be valid until Sunday 24th.  I validated the ticket at about 10:00am so I guess 1000 is the time I validated? But what are the numbers 15 and 6 and letters 'So' correspond to? How (if checked by a guard) can they tell if the ticket is valid? And how can I as a customer tell when it is validated to? How to sample a function non-uniformly? See this example code:  \documentclass{article}  \usepackage{pgfplots} \pgfplotsset{compat=1.10} \begin{document}   \begin{tikzpicture}     \begin{axis}[                  xmin=-0.1,                  xmax=1.1,                  ymin=-1.1,                  ymax=1.1,                  domain=0:1,                  samples=30                 ]       \addplot[blue] {sqrt(x)};       \addplot[purple] {-sqrt(x)};     \end{axis}   \end{tikzpicture} \end{document}   The result appears acceptable far from zero, but near zero it's too much undersampled:    Increasing samples value makes the plot nice, but it considerably slows down processing. As a workaround I could just plot the inverse in a parametric plot (i.e. (y^2,y)), but in my actual code it'd require quite a bit of additional work.  Is there a way to provide a custom sampling function or specify different density of samples in different parts of the domain? Let $z_1, z_2, z_3,$ ...be a sequence of independent random variables s.t. $P(z_i=1)=P(z_i=-1)=\frac 1 2$. Does this sequence converge almost surely?  My intuition is telling me that the sequence will approach the random variable Z? i.e. $z_n-&gt;Z$ as $n-&gt;\infty$ and Z is just another RV s.t. $P(Z=1)=P(Z=-1)=\frac 1 2$.  Here is my confusion, if a sequence converges almost surely, then $z_i$ should be different for each term s.t. it approaches Z in the end; but in this sequence $z-i$ is the same for every term. So I dont udnersntand. I've made a simple snowfall particle simulation (using gandalf3's solution: ). Is there a way to loop the animation, so the transition between last frame and first frame is not visible? Is there a setting to do it? SimpleXML: Selecting Elements Which Have A Certain Attribute Value Relative log file matching with linux? How to remove enamel from wire? I want to repair my computer mouse cable which has become disconnected from the PCB. The wire is insulated with enamel and I have to remove it before soldering it back onto the board.  How should I remove the enamel? Calculation of pressure from flow rate of water Anybody kindly help me to find how to calculate pressure in bar from flow rate. I have a pipe and from that I am transferring water at a constant flow rate of 5ml/min. At this flow rate, with a 0.5 cm diameter pipe, what will be the pressure generated by water? How can you reduce ambient noise from servers?