Question:
After my online research on the subject, I learnt that, biologically speaking, many scientists believe that there is no such thing as a race. Homo sapiens as a species is only 200,000 years old, which has not allowed for any significant genetic diversification yet, and our DNA is 99.99% similar. I've read statements that there can be more genetic variation inside a racial group than between different racial groups, meaning that, for example, two individuals from the same "race" can have less in common with each other than with an individual from another "race".
Wikipedia on Race (human classification) quote:

Scientists consider biological essentialism obsolete, and generally discourage racial explanations for collective differentiation in both physical and behavioral traits

Q1: If Homo sapiens has no races (according to biologists), why are we so different morphologically? (hair/eyes/skin colour and even athletic performance seem to differ between human populations)
Q2: Is it common for other species too, when genetically close populations have very different morphological traits? Are there any other mammal or animal species that exhibit biological diversity comparable to human diversity, and how do taxonomists treat these species? (excluding intentionally bred domestic species to keep the comparison fair)

The question has been paraphrased to emphasize that it is the biological debate that is in question, not the sociopolitical. I.e., why is there no consensus in evidence and opinions of scientists?

Firstly, it's not true that you can't tell racial background from DNA. You most certainly can; it's quite possible to give fairly accurate phenotypic reconstruction of the features we choose as racial markers from DNA samples alone and also possible to identify real geographic ancestral populations from suitable markers.
The reason that human races aren't useful is that they're actually only looking at a couple of phenotypic markers and (a) these phenotypes don't map well to underlying genetics and (b) don't usefully model the underlying populations. The big thing that racial typing is based on is skin colour, but skin colour is controlled by only a small number of alleles. On the basis of skin colour you'd think the big division in human diversity is (and I simplify) between white Europeans and black Africans. However, there is vastly more genetic diversity within Africa than there is anywhere else. Two randomly chosen Africans will be, on average, more diverse from each other than two randomly chosen Europeans. What's more Europeans are no more genetically distinct overall from a randomly chosen African than two randomly chosen Africans are from each other.
This makes perfectly decent sense if you consider the deep roots of diversity within Africa (where humans originally evolved) to the more recent separation of Europeans from an African sub-population.
It's also worth noting that the phenotypic markers of race don't actually tell you much about underlying heredity; for example there's a famous photo of twin daughters one of whom is completely fair skinned, the other of whom is completely dark skinned; yet these two are sisters. This is, of course, an extreme example but it should tell you something about the usefulness of skin colour as a real genetic marker.


Question:
I have two annotations of the same genome generated with different annotation pipelines. I want to identify overlapping gene models.
An important feature of this genome is that there are many 'genes within genes', i.e. a genemodel in the intron of another genemodel. Therefore, I only want to count two genemodels as overlapping when their coding sequence exon annotations overlap.
Using something like bedtools intersect it is straightforward to calculate overlap between the gene-level annotations.
However: I am not sure how to select genes as overlapping when only their coding sequence exons (CDS features) overlap.

Short Answer:
In my opinion, my approach would be to pull out the CDS exons and run bedtools on those.
A Few More Details:
When you pull out the exons, make sure that you assign them all IDs if the don't already have them assigned and record which IDs "belong" to which genes. Now when you get exons that overlap, you know that they are coding and you can tie them back to which genes they originate from.


Question:
Polytetrafluoroethylene was discovered by accident. It now is an important material in the industry mainly because of its extremely high bonding energy, which prevents corrosion, halts reaction, and reduces friction (yeah carbon-fluorine bonds!)
And people would have definitely put it to the test, making it contain some of the most vicious and chemically diabolical substances ever created. There is a whole HOST of items it can contain that some chemists have gone so far as to say they were 'evil':

Dioxygen Difluoride
Known as the gas of Lucifer, there is a whole list of people blown up and killed while just trying to work with one of its components, fluorine. It ignites stuff at temperatures that most of the stuff that we breathe in would be in liquid form. No one really knows about its atomic structure (obviously).

Fluoroantimonic Acid
With a staggering pH of -25, it chews through stuff you might not even believe could be corroded; like wax or glass. It can even strip hydrogen off of methane

...There are a lot of other chemical demons it can contain, but this is not the point. Let this suffice: Chemical Resistance Comparison (Spoiler: Fluorine is good at this corrosion thing.)
With this kind of hyper-resistance to about anything chemically destructive, is there anything that can destroy Teflon through only chemical means? A chemical that reacts exothermically to release heat, which melts the PTFE does not count. You get the drift.
Also, I am very curious as to whether there is anything more resilient than Teflon? Polytetrafluoroethylene is made of many carbon-fluorine bonds in series. However, carbon-fluorine is second only to the Si-F bond. Is there an "overclocked" Teflon made of silicon-fluorine bonds that is even stronger?
Now I know that some, but very few, solvents can make a mark on Teflon; but my question has not been answered: Is there any more resistant substances?
(More Teflon bragging; take that aqua regia)

Corrosion Resistant Products, Ltd., with the help of Dupont, has established this source of information on what can and cannot eat teflon.
Here's a list:

Sodium and potassium metal - these reduce and defluorinate PTFE, which finds use in etching PTFE
Finely divided metal powders, like aluminum and and magnesium, cause PTFE to combust at high temperatures

These reactions probably reduce PTFE in a manner that starts:
$$\ce{(CF2CF2)_{n} + 2Na -> (CF=CF)_{n} +2NaF}$$

The world's most powerful oxidizers like $\ce{F2}$, $\ce{OF2}$, and $\ce{ClF3}$ can oxidize PTFE at elevated temperatures, probably by:

$$\ce{(CF2CF2)_{n} + 2nF2 -> 2nCF4}$$
Similar things can occur under extreme conditions (temperature and pressure) with:

Boranes
Nitric acid
80% NaOH or KOH
Aluminum chloride
Ammonia, some amines, and some imines


Question:
I am looking for books or articles, or blog-posts, or any published material in general, that address specifically the uses of C++ modern features (move semantics, the STL, iterators, lazy evaluation, etc.) in scientific computing. Can you suggest any?
I think that these new features will make it easier to write efficient code, but I haven't found real examples. Most references I've read are about generic uses of C++, and do not contain examples of scientific computing. So I am looking for examples (do not have to be production code examples, just pedagogical examples, at the level of, say, Numerical Recipes) of scientific computing code using C++ modern features.
Note that I am not asking about libraries that use these features. I am asking about articles/books/etc explaining how I can exploit these features in scientific computing.

Two examples of libraries that use modern C++ constructs:

Both the eigen and armadillo libraries (linear algebra) use several modern C++ constructs. For instance, they use both expression templates to simplify arithmetic expressions and can sometimes eliminate some temporaries:

 (presentation on expression templates in Armadillo)

The CGAL library (computational geometry) uses many modern C++ features (it heavily uses templates and specializations):

Note:
modern C++ constructs are very elegant and can be very fun to use. It is both a strong point and a weakness: when using them, it is so tempting to add several layers of templates / specializations / lambdas that in the end you sometimes get more "administration" than effective code in the program (in other words, your program "talks" more about the problem than describing the solution). Finding the right balance is very subtle. Conclusion: one needs to track the evolution of the "signal/noise" ratio in the code by measuring:

how many lines of code in the program ?
how many classes/templates ?
running time ?
memory consumption ?

Everything that increases the first two ones may be considered as a cost (because it may make the program harder to understand and to maintain), everything that decreases the last two ones is a gain.
For instance, introducing an abstraction (a virtual class or a template) can factor code and make the program simpler (gain), but if it is never derivated / instanced once only, then it introduces a cost for no associated gain (again it is subtle because the gain may come later in the future evolution of the program, therefore there is no "golden rule").
Programmer's comfort is also an important factor to be taken into account in the cost/gain balance: with too many templates, compilation time may increase significantly, and error messages become difficult to parse.
See also
To what extent is generic and meta-programming using C++ templates useful in computational science?


Question:
According to this famous blog post, the effective transcript length is:
$\tilde{l}_i = l_i - \mu$
where $l_i$ is the length of transcript and $\mu$ is the average fragment length. However, typically fragment length is about 300bp. What if when the transcript $l_i$ is smaller than 300? How do you compute the effective length in this case?
A related question: when computing the FPKM of a gene, how to choose a transcript? Do we choose a "canonical" transcript (how?) or combine the signals from all transcripts to a gene-level FPKM?

The effective length is $\tilde{l}_i = l_i - \mu + 1$ (note the R code at the bottom of Harold's blog post), which in the case of $\mu < l_i$ should be 1. Ideally, you'd use the mean fragment length mapped to the particular feature, rather than a global $\mu$, but that's a lot more work for likely 0 benefit.
Regarding choosing a particular transcript, ideally one would use a method like salmon or kallisto (or RSEM if you have time to kill). Otherwise, your options are (A) choose the major isoform (if it's known in your tissue and condition) or (B) use a "union gene model" (sum the non-redundant exon lengths) or (C) take the median transcript length. None of those three options make much of a difference if you're comparing between samples, though they're all inferior to a salmon/kallisto/etc. metric.
Why are salmon et al. better methods? They don't use arbitrary metrics that will be the same across samples to determine the feature length. Instead, they use expectation maximization (or similarish, since at least salmon doesn't actually use EM) to quantify individual isoform usage. The effective gene length in a sample is then the average of the transcript lengths after weighting for their relative expression (yes, one should remove $\mu$ in there). This can then vary between samples, which is quite useful if you have isoform switching between samples/groups in such a way that methods A-C above would miss (think of cases where the switch is to a smaller transcript with higher coverage over it...resulting in the coverage/length in methods A-C to be tamped down).


Question:
I'm all bent out of shape trying to figure out what Bent's rule means. I have several formulations of it, and the most common formulation is also the hardest to understand.

Atomic s character concentrates in orbitals directed toward electropositive substituents

Why would this be true? Consider $\ce{H3CF}$.
Both the carbon and the fluorine are roughly $\ce{sp^3}$ hybridized. Given that carbon is more electropositive than fluorine, am I supposed to make the conclusion that because carbon is more electropositive than fluorine, there is a great deal of s-character in the $\ce{C-F}$ bond and most of this s-character is around the carbon?
Or is this a misunderstanding of "orbitals directed toward electropositive substituents"? The fluorine is $\ce{sp^3}$ hybridized and these orbitals are "directed" toward the carbon in that the big lobe of the hybrid orbital is pointing toward the carbon. So does electron density concentrate near the fluorine? Because that would make more sense.
And this s-character concentrated toward the fluorine has the effect of what on the bond angle? I understand that the more s-character a bond has, the bigger the bond angle - consider $\ce{sp}$ vs $\ce{sp^2}$. But since the $\ce{C-F}$ bond now has less s-character around the carbon, the $\ce{H-C-F}$ bond angle can shrink, correct?

That's a good, concise statement of Bent's rule.  Of course we could have just as correctly said that p character tends to concentrate in orbitals directed at electronegative elements. We'll use this latter phrasing when we examine methyl fluoride below. But first, let's expand on the definition a bit so that it is clear to all.
Bent's rule speaks to the hybridization of the central atom ($\ce{A}$) in the molecule $\ce{X-A-Y}$.
$\ce{A}$ provides hybridized atomic orbitals that form $\ce{A}$'s part of its bond to $\ce{X}$ and to $\ce{Y}$.  Bent's rule says that as we change the electronegativity of $\ce{X}$ and \ or $\ce{Y}$, $\ce{A}$ will tend to rehybridize its orbitals such that more s character will placed in those orbitals directed towards the more electropositive substituent.
Let's examine how Bent's rule might be applied to your example of methyl fluoride.  In the $\ce{C-F}$ bond, the carbon hybrid orbital is directed towards the electronegative fluorine.  Bent's rule suggests that this carbon hybrid orbital will be richer in p character than we might otherwise have suspected.  Instead of the carbon hybrid orbital used in this bond being $\ce{sp^3}$ hybridized it will tend to have more p character and therefore move towards $\ce{sp^4}$ hybridization.
Why is this?  s orbitals are lower in energy than p orbitals.  Therefore electrons are more stable (lower energy) when they are in orbitals with more s character.  The two electrons in the $\ce{C-F}$ bond will spend more time around the electronegative fluorine and less time around carbon.  If that's the case (and it is), why "waste" precious, low-energy, s orbital character in a carbon hybrid orbital that doesn't have much electron density to stabilize.  Instead, save that s character for use in carbon hybrid orbitals that do have more electron density around carbon (like the $\ce{C-H}$ bonds).  So as a consequence of Bent's rule, we would expect more p character in the carbon hybrid orbital used to form the $\ce{C-F}$ bond, and more s-character in the carbon hybrid orbitals used to form the $\ce{C-H}$ bonds.
The physically observable result of all this is that we would expect an $\ce{H-C-H}$ angle larger than the tetrahedral angle of 109.5° (reflective of more s character) and an $\ce{H-C-F}$ angle slightly smaller than 109.5°  (reflective of more p character).  In terms of bond lengths, we would expect a shortening of the $\ce{C-H}$ bond (more s character) and a lengthening of the $\ce{C-F}$ bond (more p character).


Question:
When carbon-14 decays, the decay products are nitrogen-14 and an electron (and an electron antineutrino, but that's chemically irrelevant*):
$$\ce{^14_6C -> ^14_7N + e- + \overline{v_e}}$$
Let's assume that the carbon atom in question is part of a carbon dioxide molecule in the atmosphere. What would happen to the molecule when the atom decays into nitrogen? Will it be converted into a $\ce{NO2}$ molecule, or will it split apart? Will the electron created in the decay have sufficient energy to escape the molecule and form a positive ion?
Here's a somewhat related question dealing with the formation of radioactive carbon dioxide.
* Of course, not all the energy from the defect will be transferred to the beta particle's kinetic energy, so this is in fact relevant for the rate. See Loong's answer for details.

An article by Snell and Pleasanton, 'The Atomic and Molecular Consequenses of Radioactive Decay', (J. Phys. Chem., 62 (11), pp 1377–1382, $1958$) supports Ben Norris's comment.

It is clear ... that $\ce{^{14}CO2}$ remains predominantly bound as $\ce{NO2+}$, a result that is perhaps not surprising. [This occurs in] $81$% of the decays. In $\ce{^{14}CO2 -> NO2^+}$ dissociation yielding $\ce{NO+}$, $\ce{O+}$ and $\ce{N+}$ follows [in], respectively, $8.4$, $5.9$, and $3.6$% of the decays.

A table summarising the results is given.
$$\begin{array}{|c|c|}
\hline
\mathbf{Ion} & \mathbf{\%\  abundance} \\
\hline
\ce{NO2+} & 81.4(16) \\
\ce{NO+} & 8.4(4) \\
\ce{O+} & 5.9(6)  \\
\ce{N+} & 3.6(4) \\
\ce{NO2^{2+}} & 0.40(06)\\
\hline
\end{array}$$


Question:
I am looking for the fastest available algorithm for distance transform.
According to Image Processing Learning Resources - HIPR 2 (HYPERMEDIA IMAGE PROCESSING REFERENCE) - Morphology - Distance Transform:

The distance transform can be calculated much more efficiently using
clever algorithms in only two passes (e.g. Rosenfeld and Pfaltz
1968).

Searching around, I found: "Rosenfeld, A and Pfaltz, J L. 1968. Distance Functions on Digital Pictures. Pattern Recognition, 1, 33-61."
But I believe we should have a better and faster algorithm than the one in 1968 already? In fact, I could not find the source from 1968, so any help is highly appreciated.

Pedro F. Felzenszwalb and Daniel P. Huttenlocher have published their implementation for the distance transform [archive]. You cannot use it for volumetric images, but maybe you can extend it to support 3d data. I have only used it as a black box.


Question:
In today's pattern recognition class my professor talked about PCA, eigenvectors and eigenvalues.
I understood the mathematics of it. If I'm asked to find eigenvalues etc. I'll do it correctly like a machine. But I didn't understand it. I didn't get the purpose of it. I didn't get the feel of it.
I strongly believe in the following quote:

You do not really understand something unless you can explain it to your grandmother. -- Albert Einstein

Well, I can't explain these concepts to a layman or grandma.

Why PCA, eigenvectors & eigenvalues? What was the need for these concepts?
How would you explain these to a layman?

Imagine a big family dinner where everybody starts asking you about PCA. First, you explain it to your great-grandmother; then to your grandmother; then to your mother; then to your spouse; finally, to your daughter (a mathematician). Each time the next person is less of a layman. Here is how the conversation might go.
Great-grandmother: I heard you are studying "Pee-See-Ay". I wonder what that is...
You: Ah, it's just a method of summarizing some data. Look, we have some wine bottles standing here on the table. We can describe each wine by its colour, how strong it is, how old it is, and so on.

Visualization originally found here.
We can compose a whole list of different characteristics of each wine in our cellar. But many of them will measure related properties and so will be redundant. If so, we should be able to summarize each wine with fewer characteristics! This is what PCA does.
Grandmother: This is interesting! So this PCA thing checks what characteristics are redundant and discards them?
You: Excellent question, granny! No, PCA is not selecting some characteristics and discarding the others. Instead, it constructs some new characteristics that turn out to summarize our list of wines well. Of course, these new characteristics are constructed using the old ones; for example, a new characteristic might be computed as wine age minus wine acidity level or some other combination (we call them linear combinations).
In fact, PCA finds the best possible characteristics, the ones that summarize the list of wines as well as only possible (among all conceivable linear combinations). This is why it is so useful.
Mother: Hmmm, this certainly sounds good, but I am not sure I understand. What do you actually mean when you say that these new PCA characteristics "summarize" the list of wines?
You: I guess I can give two different answers to this question. The first answer is that you are looking for some wine properties (characteristics) that strongly differ across wines. Indeed, imagine that you come up with a property that is the same for most of the wines - like the stillness of wine after being poured. This would not be very useful, would it? Wines are very different, but your new property makes them all look the same! This would certainly be a bad summary. Instead, PCA looks for properties that show as much variation across wines as possible.
The second answer is that you look for the properties that would allow you to predict, or "reconstruct", the original wine characteristics. Again, imagine that you come up with a property that has no relation to the original characteristics - like the shape of a wine bottle; if you use only this new property, there is no way you could reconstruct the original ones! This, again, would be a bad summary. So PCA looks for properties that allow reconstructing the original characteristics as well as possible.
Surprisingly, it turns out that these two aims are equivalent and so PCA can kill two birds with one stone.
Spouse: But darling, these two "goals" of PCA sound so different! Why would they be equivalent?
You: Hmmm. Perhaps I should make a little drawing (takes a napkin and starts scribbling). Let us pick two wine characteristics, perhaps wine darkness and alcohol content -- I don't know if they are correlated, but let's imagine that they are. Here is what a scatter plot of different wines could look like:

Each dot in this "wine cloud" shows one particular wine. You see that the two properties ($x$ and $y$ on this figure) are correlated. A new property can be constructed by drawing a line through the centre of this wine cloud and projecting all points onto this line. This new property will be given by a linear combination $w_1 x + w_2 y$, where each line corresponds to some particular values of $w_1$ and $w_2$.
Now, look here very carefully -- here is what these projections look like for different lines (red dots are projections of the blue dots):

As I said before, PCA will find the "best" line according to two different criteria of what is the "best". First, the variation of values along this line should be maximal. Pay attention to how the "spread" (we call it "variance") of the red dots changes while the line rotates; can you see when it reaches maximum? Second, if we reconstruct the original two characteristics (position of a blue dot) from the new one (position of a red dot), the reconstruction error will be given by the length of the connecting red line. Observe how the length of these red lines changes while the line rotates; can you see when the total length reaches minimum?
If you stare at this animation for some time, you will notice that "the maximum variance" and "the minimum error" are reached at the same time, namely when the line points to the magenta ticks I marked on both sides of the wine cloud. This line corresponds to the new wine property that will be constructed by PCA.
By the way, PCA stands for "principal component analysis", and this new property is called "first principal component". And instead of saying "property" or "characteristic", we usually say "feature" or "variable".
Daughter: Very nice, papa! I think I can see why the two goals yield the same result: it is essentially because of the Pythagoras theorem, isn't it? Anyway, I heard that PCA is somehow related to eigenvectors and eigenvalues; where are they in this picture?
You: Brilliant observation. Mathematically, the spread of the red dots is measured as the average squared distance from the centre of the wine cloud to each red dot; as you know, it is called the variance. On the other hand, the total reconstruction error is measured as the average squared length of the corresponding red lines. But as the angle between red lines and the black line is always $90^\circ$, the sum of these two quantities is equal to the average squared distance between the centre of the wine cloud and each blue dot; this is precisely Pythagoras theorem. Of course, this average distance does not depend on the orientation of the black line, so the higher the variance, the lower the error (because their sum is constant). This hand-wavy argument can be made precise (see here).
By the way, you can imagine that the black line is a solid rod, and each red line is a spring. The energy of the spring is proportional to its squared length (this is known in physics as Hooke's law), so the rod will orient itself such as to minimize the sum of these squared distances. I made a simulation of what it will look like in the presence of some viscous friction:

Regarding eigenvectors and eigenvalues. You know what a covariance matrix is; in my example it is a $2\times 2$ matrix that is given by $$\begin{pmatrix}1.07 &0.63\\0.63 & 0.64\end{pmatrix}.$$ What this means is that the variance of the $x$ variable is $1.07$, the variance of the $y$ variable is $0.64$, and the covariance between them is $0.63$. As it is a square symmetric matrix, it can be diagonalized by choosing a new orthogonal coordinate system, given by its eigenvectors (incidentally, this is called spectral theorem); corresponding eigenvalues will then be located on the diagonal. In this new coordinate system, the covariance matrix is diagonal and looks like that: $$\begin{pmatrix}1.52 &0\\0 & 0.19\end{pmatrix},$$ meaning that the correlation between points is now zero. It becomes clear that the variance of any projection will be given by a weighted average of the eigenvalues (I am only sketching the intuition here). Consequently, the maximum possible variance ($1.52$) will be achieved if we simply take the projection on the first coordinate axis. It follows that the direction of the first principal component is given by the first eigenvector of the covariance matrix. (More details here.)
You can see this on the rotating figure as well: there is a gray line there orthogonal to the black one; together, they form a rotating coordinate frame. Try to notice when the blue dots become uncorrelated in this rotating frame. The answer, again, is that it happens precisely when the black line points at the magenta ticks. Now I can tell you how I found them (the magenta ticks): they mark the direction of the first eigenvector of the covariance matrix, which in this case is equal to $(0.81, 0.58)$.

Per popular request, I shared the Matlab code to produce the above animations.


Question:
MIT has been making a bit of noise lately about a new algorithm that is touted as a faster Fourier transform that works on particular kinds of signals, for instance: "Faster Fourier transform named one of world’s most important emerging technologies". The MIT Technology Review magazine says:

With the new algorithm, called the sparse Fourier transform (SFT), streams of data can be processed 10 to 100 times faster than was possible with the FFT. The speedup can occur because the information we care about most has a great deal of structure: music is not random noise. These meaningful signals typically have only a fraction of the possible values that a signal could take; the technical term for this is that the information is "sparse." Because the SFT algorithm isn't intended to work with all possible streams of data, it can take certain shortcuts not otherwise available. In theory, an algorithm that can handle only sparse signals is much more limited than the FFT. But "sparsity is everywhere," points out coinventor Katabi, a professor of electrical engineering and computer science. "It's in nature; it's in video signals; it's in audio signals."

Could someone here provide a more technical explanation of what the algorithm actually is, and where it might be applicable?
EDIT: Some links:

The paper: "Nearly Optimal Sparse Fourier Transform" (arXiv) by Haitham Hassanieh, Piotr Indyk, Dina Katabi, Eric Price.
Project website - includes sample implementation.

The idea of the algorithm is this: assume you have a length $N$ signal that is sparse in the frequency domain. This means that if you were to calculate its discrete Fourier transform, there would be a small number of outputs $k \ll N$ that are nonzero; the other $N-k$ are negligible. One way of getting at the $k$ outputs that you want is to use the FFT on the entire sequence, then select the $k$ nonzero values.
The sparse Fourier transform algorithm presented here is a technique for calculating those $k$ outputs with lower complexity than the FFT-based method. Essentially, because $N-k$ outputs are zero, you can save some effort by taking shortcuts inside the algorithm to not even generate those result values. While the FFT has a complexity of $O(n \log n)$, the sparse algorithm has a potentially-lower complexity of $O(k \log n)$ for the sparse-spectrum case.
For the more general case, where the spectrum is "kind of sparse" but there are more than $k$ nonzero values (e.g. for a number of tones embedded in noise), they present a variation of the algorithm that estimates the $k$ largest outputs, with a time complexity of $O(k \log n \log \frac{n}{k})$, which could also be less complex than the FFT.
According to one graph of their results (reproduced in the image below), the crossover point for improved performance with respect to FFTW (an optimized FFT library, made by some other guys at MIT) is around the point where only $\frac{1}{2^{11}}$-th to $\frac{1}{2^{10}}$-th of the output transform coefficients are nonzero. Also, in this presentation they indicate that the sparse algorithm provides better performance when $\frac{N}{k} \in [2000, 10^6]$.

These conditions do limit the applicability of the algorithm to cases where you know there are likely to be few significantly-large peaks in a signal's spectrum. One example that they cite on their Web site is that on average, 8-by-8 blocks of pixels often used in image and video compression  are almost 90% sparse in the frequency domain and thus could benefit from an algorithm that exploited that property. That level of sparsity doesn't seem to square with the application space for this particular algorithm, so it may just be an illustrative example.
I need to read through the literature a bit more to get a better feel for how practical such a technique is for use on real-world problems, but for certain classes of applications, it could be a fit.


Question:
To be clear, I'm not doubting that Homo sapiens and Homo neanderthalensis did interbreed: of that much I'm convinced.
Within the past few years I've seen an upcropping of pop-sci articles discussing the interbreeding between pre-historic species of humans. In everything that I see in these articles, as well as in scientific literature (my college Bio textbook, among others), I see these different human groups being referred to as separate species.
This conflicts with my understanding of a species. Given the following definition, wouldn't Homo sapiens and Homo neanderthalensis be the same species?

A species is often defined as the largest group of organisms where
two hybrids are capable of reproducing fertile offspring, typically
using sexual reproduction.  ~Wikipedia

Is this definition incorrect?
Are the publications using "species" colloquially, as opposed to scientifically?
Is "species" still a poorly defined concept? (see Ring Species)

Thanks!

Short answer
The concept of species is poorly defined and is often misleading. The concepts of lineage and clade / monophyletic group are much more helpful. IMO, the only usefulness of this poorly defined concept that is the "species" is to have a common vocabulary for naming lineages.
Note that Homo neanderthalis is sometimes (although it is rare) called H. sapiens neanderthalis though highlighting that some would consider neanderthals and modern humans as being part of the same species.
Long answer
Are neanderthals and modern humans really considered different species?
Often, yes they are considered as different species, neanderthals being called Homo neanderthalis and modern humans are being called Homo sapiens. However, some authors prefer to call neanderthals Homo sapiens neanderthalis and modern humans Homo sapiens sapiens, putting both lineages in the same species (but different subspecies).
How common were interbreeding between H. sapiens and H. neanderthalis
Please, have a look at @iayork's answer.
The rest of the post is here to highlight that whether you consider H. sapiens and H. neanderthalis to be the same species or not is mainly a matter of personal preference given that the concept of species is mainly arbitrary.
Short history of the concept of species
To my knowledge, the concept of species has first been used in the antiquity. At this time, most people viewed species as fixed entities, unable to change through time and without within-population variance (see Aristotle and Plato's thoughts). For some reason, we stuck to this concept even though it sometimes appears to not be very useful.
Charles Darwin already understood that as he says in On the Origin of Species (see here)

Certainly no clear line of demarcation has as yet been drawn between species and sub-species- that is, the forms which in the opinion of some naturalists come very near to, but do not quite arrive at the rank of species; or, again, between sub-species and well-marked varieties, or between lesser varieties and individual differences. These differences blend into each other in an insensible series; and a series impresses the mind with the idea of an actual passage.

You might also want to have a look at the post Why are there species instead of a continuum of various animals?
Several definitions of species
There are several definitions of species that yield me once again to argue that we should rather forget about this concept and just use the term lineage and use an accurate description of the reproductive barriers or genetic/functional divergence between lineage rather than using this made-up word that is "species".
I will below discuss the most commonly used definition (the one you cite) that is called the Biological species concept.
Problems with the definition you cite

A species is often defined as the largest group of organisms where two hybrids are capable of reproducing fertile offspring, typically using sexual reproduction.

Only applies to species that reproduce sexually
Of course, this definition only applies to lineages that use sexual reproduction. If we were to use this definition for asexual lineages, then every single individual would be its own species.
In practice
In general, everybody refers to this definition when talking about sexual lineages but IMO few people are correctly applying for practical reasons of communicating effectively.
How low the fitness of the hybrids need to be?
One has to arbitrarily define a limit of the minimal fitness (or maximal outbreeding depression) to get an accurate definition. Such boundary can be defined in absolute terms or in relative terms (relative to the fitness of the "parent lineages"). If, the hybrid has a fitness that is 100 times lower than any of the two parent lineages, then would you consider the two parent lineages to belong to the same species?
Type of reproductive isolation
We generally categorize the types of reproductive isolation into post-zygotic and pre-zygotic reproductive isolation (see wiki). There is a lot to say on this subject but let's just focus on two interesting hypothetical cases:

Let's consider two lineages of birds. One lineage has blue feathers while the other has red feathers. They absolutely never interbreed because the blue birds don't like the red and the red birds don't like the blue. But if you artificially fuse their gametes, then you get a viable and fertile offspring. Are they of the same species?

Let's imagine we have two lineages of mosquitoes living in the same geographic region. One flying between 6 pm and 8 pm while the other is flying between 1 am and 3 am. They never see each other. But if they were to meet while flying they would mate together and have viable and fertile offsprings. Are they of the same species?

Under what condition is the hybrids survival and fertility measured
Modern biology can do great stuff! Does it count if the hybrid can't develop in the mother's uterus (let's assume we are talking about mammals) but can develop in some other environment and then become a healthy adult?
Ring species in space
As you said in your question, ring species is another good example as to why the concept of species is not very helpful (see the post Transitivity of Species Definitions). Ensatina eschscholtzii (a salamander; see DeVitt et al. 2011 and other articles from the same group) is a classic example of ring species.
Species transition through time
Many modern lineages cannot interbreed with their ancestors. So, then people might be asking, when exactly did the species change occurred? What generation of parent where part of species A and offspring where part of species B. Of course, there is no such clearly defined time in which transition occurred. It is more a smooth transition from being clearly reproductively isolated (if they were placed to each other) from being clearly the same species.
Practical issue - Renaming lineages
How boring it would be if every time we discover the two species can in some circumstances interbreed, we had to rename them! That would be a mess.
Time
Of course, when we talk about a species we refer to a group of individuals at a given time. However, we don't want to rename the group of individuals of interest every time a single individual die and get born. This notion yield to the question of how long in time can a single species exist. Consider a lineage that has not split for 60,000 years. Was the population 60,000 years ago the same species as the one today? The two groups may differ a lot phenotypically and may actually be reproductively isolated if they were to exist at the same time.
Special cases
When considering a few special cases, the concept of species become even harder to apply.
The Amazon molly (a fish) is a "species" that have "sexual intercourse" without having "sexual reproduction" and there are no males in the species! How is it possible? The females have to seek for sperm in a sister species in order to activate the development of the eggs but the genes of the father from the sister species are not used (Kokko et al. (2008)).
In an ant "species", males and females can both reproduce by parthenogenesis (some kind of cloning but with meiosis and cross-over) and don't need each other to reproduce. In this respect, males could actually be called females. But they still meet to reproduce together. The offsprings of a male and a female (via sexual reproduction) are sterile workers. So males and females are just like two sister species that reproduce sexually to create a sterile army to protect and feed them (Fournier et al. (2005)).
Bias
It often brings fame to discover a large new species. In consequence, scientists might tend to apply a definition of species that allow them to tell that their species is a new one. A typical example of such eventual bias concern dinosaurs where many new fossils are abusively called a new species while they sometimes are just the same species but at a different stage of development (according to this TED).
So why do we still use the concept of species?
Naming
IMO, its only usefulness is that it allows us to name lineages. And it is very important that we have the appropriate vocabulary to name different lineages even if this brings us to make a few mistakes and use some bad definitions.
The alternative use of the concept of lineage
It is important though that we are aware that the concept of species is poorly defined and that if we need to be accurate that we can talk in terms of lineages. The main issue with the term lineage is not semantic and comes about the fact that gene lineages may well differ considerably from what one would consider being the "species lineage" as defined by the "lineages of most sequences"... but this is a story for another time.
In consequence
In consequence to the above issues, we often call two lineages that can interbreed to some extent by different species names. On the other hand, two lineages that can hardly interbreed are sometimes called by the same species name but I would expect this case to be rarer (as discussed by @DarrelHoffman and @AMR in the comments).
Homo lineages
I hope it makes sense from the above that the question is really not related to the special case of the interbreeding between the Homo sapiens and the Homo neanderthalis lineages. The issue is a matter of the definition of species.
Video and podcast
SciShow made a video on the subject: What Makes a Species a Species?
For the French speakers, you will find an interesting (one hour long) podcast on the consequence of the false belief that the concept of species is an objective concept on conservation science at podcast.unil.ch > La biodiversité - plus qu'une simple question de conservation > Pierre-Henry Gouyon

Here is a related answer


Question:
I am trying to understand the difference between convolution to cross-correlation. I have read an understood This answer. I also understand the picture below.
But, in terms of signal processing, (a field which I know little about..), Given two signals (or maybe a signal and a filter?), When will we use convolution and when will we prefer to use cross correlation, I mean, When in real life analysing will we prefer convolution, and when, cross-correlation.
It seems like these two terms has a lot of use, so, what is that use?

*The cross-correlation here should read g*f instead of f*g

In signal processing, two problems are common:

What is the output of this filter when its input is $x(t)$? The answer is given by $x(t)\ast h(t)$, where $h(t)$ is a signal called the "impulse response" of the filter, and $\ast$ is the convolution operation.
Given a noisy signal $y(t)$, is the signal $x(t)$ somehow present in $y(t)$? In other words, is $y(t)$ of the form $x(t)+n(t)$, where $n(t)$ is noise? The answer can be found by the correlation of $y(t)$ and $x(t)$. If the correlation is large for a given time delay $\tau$, then we may be confident in saying that the answer is yes.

Note that when the signals involved are symmetric, convolution and cross-correlation become the same operation; this case is also very common in some areas of DSP.


Question:
I wonder if it is possible to build compilers for dynamic languages like Ruby to have similar and comparable performance to C/C++? From what I understand about compilers, take Ruby for instance, compiling Ruby code can't ever be efficient because the way Ruby handles reflection, features such as automatic type conversion from integer to big integer, and lack of static typing makes building an efficient compiler for Ruby extremely difficult.
Is it possible to build a compiler that can compile Ruby or any other dynamic languages to a binary that performs very closely to C/C++? Is there a fundamental reason why JIT compilers, such as PyPy/Rubinius will eventually or will never match C/C++ in performance?
Note: I do understand that “performance” can be vague, so to clear that up, I meant, if you can do X in C/C++ with performance Y, can you do X in Ruby/Python with performance close to Y? Where X is everything from device drivers and OS code, to web applications.

To all those who said “yes” I’ll offer a counter-point that the answer is “no”, by design. Those languages will never be able to match the performance of statically compiled languages.
Kos offered the (very valid) point that dynamic languages have more information about the system at runtime which can be used to optimise code.
However, there‘s another side of the coin: this additional information needs to be kept track of. On modern architectures, this is a performance killer.
William Edwards offers a nice overview of the argument.
In particular, the optimisations mentioned by Kos can’t be applied beyond a very limited scope unless you limit the expressive power of your languages quite drastically, as mentioned by Devin. This is of course a viable trade-off but for the sake of the discussion, you then end up with a static language, not a dynamic one. Those languages differ fundamentally from Python or Ruby as most people would understand them.
William cites some interesting IBM slides:

Every variable can be dynamically-typed: Need type checks
Every statement can potentially throw exceptions due to type mismatch and so on: Need exception checks
Every field and symbol can be added, deleted, and changed at runtime: Need access checks
The type of every object and its class hierarchy can be changed at runtime: Need class hierarchy checks

Some of those checks can be eliminated after analysis (N.B.: this analysis also takes time – at runtime).
Furthermore, Kos argues that dynamic languages could even surpass C++ performance. The JIT can indeed analyse the program’s behaviour and apply suitable optimisations.
But C++ compilers can do the same! Modern compilers offer so-called profile-guided optimisation which, if they are given suitable input, can model program runtime behaviour and apply the same optimisations that a JIT would apply.
Of course, this all hinges on the existence of realistic training data and furthermore the program cannot adapt its runtime characteristics if the usage pattern changes mid-run. JITs can theoretically handle this. I’d be interested to see how this fares in practice, since, in order to switch optimisations, the JIT would continually have to collect usage data which once again slows down execution.
In summary, I’m not convinced that runtime hot-spot optimisations outweigh the overhead of tracking runtime information in the long run, compared to static analysis and optimisation.


Question:
When I close one eye and put the tip of my finger near my open eye, it seems as if the light from the background image bends around my finger slightly, warping the image near the edges of my blurry fingertip.
What causes this? Is it the heat from my finger that bends the light? Or the minuscule gravity that the mass in my finger exerts? (I don't think so.) Is this some kind of diffraction?

To reproduce: put your finger about 5 cm from your open eye, look through the fuzzy edge of your finger and focus on something farther away. Move your finger gradually through your view and you'll see the background image shift as your finger moves.

For all the people asking, I made another photo. This time the backdrop is a grid I have on my screen (due to a lack of grid paper). You see the grid deform ever so slightly near the top of my finger. Here's the setup:

Note that these distances are arbitrary. It worked just as well with my finger closer to the camera, but this happens to be the situation that I measured.

Here are some photos of the side of a 2 mm thick flat opaque plastic object, at different aperture sizes. Especially notice how the grid fails to line up in the bottom two photos.

OK, it seems that user21820 is right; this effect is caused by both the foreground and the background objects being out of focus, and occurs in areas where the foreground object (your finger) partially occludes the background, so that only some of the light rays reaching your eye from the background are blocked by the foreground obstacle.
To see why this happens, take a look at this diagram:

The black dot is a distant object, and the dashed lines depict light rays emerging from it and hitting the lens, which refocuses them to form an image on a receptor surface (the retina in your eye, or the sensor in your camera).  However, since the lens is slightly out of focus, the light rays don't converge exactly on the receptor plane, and so the image appears blurred.
What's important to realize is that each part of the blurred image is formed by a separate light ray passing through a different part of the lens (and of the intervening space).  If we insert an obstacle between the object and the lens that blocks only some of those rays, those parts of the image disappear!

This has two effects: first, the image of the background object appears sharper, because the obstacle effectively reduces the aperture of the lens.  However, it also shifts the center of the aperture, and thus of the resulting image, to one side.
The direction in which the blurred image shifts depends on whether the lens is focused a little bit too close or a little bit too far.  If the focus is too close, as in the diagrams above, the image will appear shifted away from the obstacle.  (Remember that the lens inverts the image, so the image of the obstacle itself would appear above the image of the dot in the diagram!)  Conversely, if the focus is too far, the background object will appear to shift closer to the obstacle.
Once you know the cause, it's not hard to recreate this effect in any 3D rendering program that supports realistic focal blur.  I used POV-Ray, because I happen to be familiar with it:

Above, you can see two renderings of a classic computer graphics scene: a yellow sphere in front of a grid plane.  The first image is rendered with a narrow aperture, showing both the grid and the sphere in sharp detail, while the second one is rendered with a wide aperture, but with the grid still perfectly in focus.  In neither case does the effect occur, since the background is in focus.
Things change, however, once the focus is moved slightly.  In the first image below, the camera is focused slightly in front of the background plane, while in the second image, it is focused slightly behind the plane:

You can clearly see that, with the focus between the grid and the sphere, the grid lines close to the sphere appear shifted away from it, while with the focus behind the grid plane, the grid lines shift towards the sphere.
Moving the camera focus further away from the background plane makes the effect even stronger:

You can also clearly see the lines getting sharper near the sphere, as well as bending, because part of the blurred image is blocked by the sphere.
I can even re-create the broken line effect in your photos by replacing the sphere with a narrow cylinder:

To recap: This effect is caused by the background being (slightly) out of focus, and by the foreground object effectively occluding part of the camera/eye aperture, causing the effective aperture (and thus the resulting image) to be shifted.  It is not caused by:

Diffraction: As shown by the computer renderings above (which are created using ray tracing, and therefore do not model any diffraction effects), this effect is fully explained by classical ray optics.  In any case, diffraction cannot explain the background images shifting towards the obstacle when the focus is behind the background plane.

Reflection: Again, no reflection of the background from the obstacle surface is required to explain this effect. In fact, in the computer renderings above, the yellow sphere/cylinder does not reflect the background grid at all.  (The surfaces have no specular reflection component, and no indirect diffuse illumination effects are included in the lighting model.)

Optical illusion: The fact that this is not a perceptual illusion should be obvious from the fact that the effect can be photographed, and the distortion measured from the photos, but the fact that it can also be reproduced by computer rendering further confirms this.

Addendum: Just to check, I went and replicated the renderings above using my old DSLR camera (and an LCD monitor, a yellow plastic spice jar cap, and some thread to hang it from):

The first photo above has the camera focus behind the screen; the second one has it in front of the screen.  The first photo below shows what the scene looks like with the screen in focus (or as close as I could get it with manual focus adjustment).  Finally, the crappy cellphone camera picture below (second) shows the setup used to take the other three photos.

Addendum 2: Before the comments below were cleaned out, there was some discussion there about the usefulness of this phenomenon as a quick self-diagnostic test for myopia (nearsightedness).
While I Am Not An Opthalmologist, it does appear that, if you experience this effect with your naked eye, while trying to keep the background in focus, then you may have some degree of myopia or some other visual defect, and may want to get an eye exam.
(Of course, even if you don't, getting one every few years or so isn't a bad idea, anyway.  Mild myopia, up to the point where it becomes severe enough to substantially interfere with your daily life, can be surprisingly hard to self-diagnose otherwise, since it typically appears slowly and, with nothing to compare your vision to, you just get used to distant objects looking a bit blurry.  After all, to some extent that's true for everyone; only the distance varies.)
In fact, with my mild (about −1 dpt) myopia, I can personally confirm that, without my glasses, I can easily see both the bending effect and the sharpening of background features when I move my finger in front of my eye.  I can even see a hint of astigmatism (which I know I have; my glasses have some cylindrical correction to fix it) in the fact that, in some orientations, I can see the background features bending not just away from my finger, but also slightly sideways.  With my glasses on, these effects almost but not quite disappear, suggesting that my current prescription may be just a little bit off.


Question:
I do component-level repair of tablet mainboards, and I have seen this puzzling situation on two different models of Samsung tablet mainboards so far (SM-T210, SM-T818A).  There are ceramic chip capacitors on the PCB that are clearly connected to the ground plane on both ends.   Resistance checks confirm, plus it's pretty obvious just looking at them.

SM-T210 -- This looks like signal conditioning of some sort.  It's on the reverse side of the PCB from the SD slot but SD uses more than two signal lines so I dunno.

SM-T210 -- This is on the reverse side of the PCB from the USB commutator IC.  It's right next to the battery connector.

SM-T818A -- This is the AMOLED power supply.  The mystery cap is actually located at the edge of an EMI shield (removed for the photo) and the shield frame had to include a cut to clear the cap.  So they went to some trouble to have the cap right here.

The only scenario I can come up with is that during Capture the design engineer placed a bunch of caps for eventual use, but connected both ends to ground so the DRC module wouldn't complain about floating pins.  Then they ended up not using them all but didn't delete the extras from the design.  The design gets sent to a Layout engineer, who simply places and routes the design they've been given.
I'm willing to allow for somebody doing something so intelligent and wise that it's beyond my ken (filtering terahertz-band noise from the ground plane?), but I don't think this is an example of that*.

*Of course, that's exactly what I'd say if it was an example of that.

There are four comments on this reddit thread that may be on to something:
By silver_pc:

could it be a form of 'paper towns' on maps - AKA fictitious
entry to identify direct copies?

By toybuilder:

Not that they are necessarily doing this, but I've heard it said that
mass manufacturers will keep removing capacitors until their product
stop working.  (Certainly, it was common to see PC motherboards with
unpopulated decoupling cap pads all over the place back when I used to
hand-build PCs.)
If you have a mass-production setup to stuff boards and do automated
visual quality inspection, maybe you don't want to take the downtime
hit to reprogram your production line as you introduce and monitor
ongoing production changes with the ultimate goal of removing the
capacitors.  If so, you could nullify the capacitors by stuffing them
as before, but with both pads on the same plane.
Samsung manufactures capacitors, so maybe they're a bit more willing
to burn through a short run of boards with wasted capacitors if, in
the long run, they can more definitively get rid of them.
Keep in mind that large companies like Samsung have the ability to
test their products for certification purposes in-house, so it's
probably cheap enough to run a small batch to test and accept/reject.
And if accepted, to just release it into the market.
At least, that would be my guess.

By John_Barlycorn:

I believe this has more to do with manufacturing process than it has
to do with electrical purpose. Modern electronics manufacturing is
bat-shit insane with regard to speed.
We're talking about robotic movements that are so fast, that air
resistance and machine vibration have to be considered.
The position of parts that feed the pick and place machines is
critical to the speed of operation. So they spend a lot of time on
setup. Then press "Start" and watch her whirl. So if they end up with
2 products that are similar, they have to go through this expensive
setup change run by an expensive engineer to switch them out. But
these caps are so cheap that after you consider this setup change, it
might actually cost them more money to remove them during different
runs. They might just say "TANJ it" and let them populate them despite
not needing them.
My father worked in the industry for years, and had some experience in
smaller volume stuff. In manufacturing this sort of backwards logic is
not uncommon. You do what's cheapest/most profitable which is not
always the least wasteful option.

By CopperNickus:

There are other planes in a tablet: the display and case. Maybe the
answer lies in the third dimension. Might there be a brush/spring
contact or some other connection on another layer of the device that
completes a circuit when the tablet is assembled? That technique is
used in their cellphones to mate various internal boards to the back
and case.
In the phones, it's spring contacts mating to gold or silver contacts
when the device is assembled.

Or perhaps just some proximity based RF control related to the
display?


Question:
I don't understand the different behaviour of the advection-diffusion equation when I apply different boundary conditions. My motivation is the simulation of a real physical quantity (particle density) under diffusion and advection. Particle density should be conserved in the interior unless it flows out from the edges. By this logic, if I enforce Neumann boundary conditions the ends of the system such as $\frac{\partial \phi}{\partial x}=0$ (on the left and the right sides) then the system should be "closed" i.e. if the flux at the boundary is zero then no particles can escape.
For all the simulations below, I have applied the Crank-Nicolson discretization to the advection-diffusion equation and all simulation have $\frac{\partial \phi}{\partial x}=0$ boundary conditions. However, for the first and last rows of the matrix (the boundary condition rows) I allow $\beta$ to be changed independently of the interior value. This allows the end points to be fully implicit.
Below I discuss 4 different configurations, only one of them is what I expected. At the end I discuss my implementation.
Diffusion only limit
Here the advection terms are turned off by setting the velocity to zero.
Diffusion only, with $\boldsymbol{\beta}$=0.5 (Crank-Niscolson) at all points

The quantity is not conserved as can be seen by the pulse area reducing.
Diffusion only, with $\boldsymbol{\beta}$=0.5 (Crank-Niscolson) at interior points, and $\boldsymbol{\beta}$=1 (full implicit) at the boundaries

By using fully implicit equation on the boundaries I achieve what I expect: no particles escape. You can see this by the area being conserved as the particle diffuse. Why should the choice of $\beta$ at the boundary points influence the physics of the situation? Is this a bug or expected?
Diffusion and advection
When the advection term is included, the value of $\beta$ at the boundaries does not seem to influence the solution. However, for all cases when the boundaries seem to be "open" i.e. particles can escape the boundaries. Why is this the case?
Advection and Diffusion with $\boldsymbol{\beta}$=0.5 (Crank-Niscolson) at all points

Advection and Diffusion with $\boldsymbol{\beta}$=0.5 (Crank-Niscolson) at interior points, and $\boldsymbol{\beta}$=1 (full implicit) at the boundaries

Implementation of the advection-diffusion equation
Starting with the advection-diffusion equation,
$
\frac{\partial \phi}{\partial t} = D\frac{\partial^2 \phi}{\partial x^2} + \boldsymbol{v}\frac{\partial \phi}{\partial x}
$
Writing using Crank-Nicolson gives,
$
\frac{\phi_{j}^{n+1} - \phi_{j}^{n}}{\Delta t} = D \left[ \frac{1 - \beta}{(\Delta x)^2} \left( \phi_{j-1}^{n} - 2\phi_{j}^{n} + \phi_{j+1}^{n} \right) +  \frac{\beta}{(\Delta x)^2} \left( \phi_{j-1}^{n+1} - 2\phi_{j}^{n+1} + \phi_{j+1}^{n+1} \right) \right] + \boldsymbol{v} \left[ \frac{1-\beta}{2\Delta x} \left( \phi_{j+1}^{n} - \phi_{j-1}^{n} \right) + \frac{\beta}{2\Delta x} \left( \phi_{j+1}^{n+1} - \phi_{j-1}^{n+1} \right) \right]
$
Note that $\beta$=0.5 for Crank-Nicolson, $\beta$=1 for fully implicit, and, $\beta$=0 for fully explicit.
To simplify the notation let's make the substitution,
$
s = D\frac{\Delta t}{(\Delta x)^2} \\
r = \boldsymbol{v}\frac{\Delta t}{2 \Delta x}
$
and move the known value $\phi_{j}^{n}$ of the time derivative to the right-hand side,
$
\phi_{j}^{n+1} = \phi_{j}^{n} + s \left( 1-\beta \right) \left( \phi_{j-1}^{n} - 2\phi_{j}^{n} + \phi_{j+1}^{n} \right) + s \beta \left( \phi_{j-1}^{n+1} - 2\phi_{j}^{n+1} + \phi_{j+1}^{n+1} \right) +
    r \left( 1 - \beta \right) \left( \phi_{j+1}^{n} - \phi_{j-1}^{n} \right) + r \beta \left( \phi_{j+1}^{n+1} - \phi_{j-1}^{n+1} \right)
$
Factoring the $\phi$ terms gives,
$
\underbrace{\beta(r - s)\phi_{j-1}^{n+1} + (1 + 2s\beta)\phi_{j}^{n+1} -\beta(s + r)\phi_{j+1}^{n+1}}_{\boldsymbol{A}\cdot\boldsymbol{\phi^{n+1}}} =  \underbrace{ (1-\beta)(s - r)\phi_{j-1}^{n} + (1-2s[1-\beta])\phi_{j}^{n} + (1-\beta)(s+r)\phi_{j+1}^{n}}_{\boldsymbol{M\cdot}\boldsymbol{\phi^n}}
$
which we can write in matrix form as $\boldsymbol{A}\cdot\boldsymbol{\phi^{n+1}} = \boldsymbol{M}\cdot\boldsymbol{\phi^{n}}$ where,
$  \boldsymbol{A} =
    \left(
    \begin{matrix}
      1+2s\beta         & -\beta(s + r)  	&     				&       	0		\\
      \beta(r-s)  		& 1+2s\beta 		& -\beta (s + r) 	&     	    		\\
              			&  \ddots   		&   \ddots  		& \ddots			\\
						& \beta(r-s)  		& 1+2s\beta			& -\beta (s + r) 	\\
                 0      &      				& \beta(r-s)  		& 1+2s\beta  		\\
   \end{matrix}
   \right)
$
$
  \boldsymbol{M} =
    \left(
    \begin{matrix}
      1-2s(1-\beta)        & (1 - \beta)(s + r)  		&     						&       	0		 	\\
      (1 - \beta)(s - r)   & 1-2s(1-\beta)  			& (1 - \beta)(s + r) 		&		     	    	\\
              			   &  \ddots   					&   \ddots  				& \ddots				\\
						   & (1 - \beta)(s - r)  		& 1-2s(1-\beta)				& (1 - \beta)(s + r)	\\
                 0         &      						& (1 - \beta)(s - r) 		& 1-2s(1-\beta)			\\
   \end{matrix}
   \right)
$
Applying Neumann boundary conditions
NB is working through the derivation again I think I have spotted the error. I assumed a fully implicit scheme ($\beta$=1) when writing the finite difference of the boundary condition. If you assume a Crank-Niscolson scheme here the complexity become too great and I could not solve the resulting equations to eliminate the nodes which are outside the domain. However, it would appear possible, there are two equation with two unknowns, but I couldn't manage it. This probably explains the difference between the first and second plots above. I think we can conclude that only the plots with $\beta$=0.5 at the boundary points are valid.
Assuming the flux at the left-hand side is known (assuming a fully implicit form),
$
\frac{\partial\phi_1^{n+1}}{\partial x} = \sigma_L
$
Writing this as a centred-difference gives,
$
\frac{\partial\phi_1^{n+1}}{\partial x} \approx \frac{\phi_2^{n+1} - \phi_0^{n+1}}{2\Delta x} = \sigma_L
$
therefore,
$
\phi_0^{n+1} = \phi_{2}^{n+1} - 2 \Delta x\sigma_L
$
Note that this introduces a node $\phi_0^{n+1}$ which is outside the domain of the problem. This node can be eliminated by using a second equation. We can write the $j=1$ node as,
$
\beta(r - s)\phi_0^{n+1} + (1+2s\beta)\phi_1^{n+1} - \beta(s+r)\phi_2^{n+1} = (1-\beta)(s - r)\phi_{j-1}^{n} + (1-2s[1-\beta])\phi_{j}^{n} + (1-\beta)(s+r)\phi_{j+1}^{n}
$
Substituting in the value of $\phi_0^{n+1}$ found from the boundary condition gives the following result for the $j$=1 row,
$
(1+2s\beta)\phi_1^{n+1} - 2s\beta\phi_2^{n+1} =  (1-\beta)(s - r)\phi_{j-1}^{n} + (1-2s[1-\beta])\phi_{j}^{n} + (1-\beta)(s+r)\phi_{j+1}^{n} + 2\beta(r-s)\Delta x\sigma_L
$
Performing the same procedure for the final row (at $j$=$J$) yields,
$
-2s\beta\phi_{J-1}^{n+1} + (1+2s\beta)\phi_J^{n+1} = (1-\beta)(s - r)\phi_{J-1}^{n} + (1 - 2s(1-\beta))\phi_{J}^{n} + 2\beta(s+r)\Delta x\sigma_R
$
Finally making the boundary rows implicit (setting $\beta$=1) gives,
$
(1+2s)\phi_1^{n+1} - 2s\phi_2^{n+1} =  \phi_{j-1}^{n} + 1\phi_{j}^{n} + 2(r-s)\Delta x\sigma_L
$
$
-2s\phi_{J-1}^{n+1} + (1+2s)\phi_J^{n+1} = \phi_{J}^{n} + 2(s+r)\Delta x\sigma_R
$
Therefore with Neumann boundary conditions we can write the matrix equation, $\boldsymbol{A}\cdot\phi^{n+1} = \boldsymbol{M}\cdot\phi^{n} + \boldsymbol{b_N}$,
where,
$
  \boldsymbol{A} =
    \left(
    \begin{matrix}
      1+2s	            & -2s			  	&     				&       	0		\\
      \beta(r-s)  		& 1+2s\beta 		& -\beta (s + r) 	&     	    		\\
              			&  \ddots   		&   \ddots  		& \ddots			\\
						& \beta(r-s)  		& 1+2s\beta			& -\beta (s + r) 	\\
                 0      &      				& -2s		  		& 1+2s		  		\\
   \end{matrix}
   \right)
$
$
  \boldsymbol{M} =
    \left(
    \begin{matrix}
      1			           & 0					  		&     						&       	0		 	\\
      (1 - \beta)(s - r)   & 1-2s(1-\beta)  			& (1 - \beta)(s + r) 		&		     	    	\\
              			   &  \ddots   					&   \ddots  				& \ddots				\\
						   & (1 - \beta)(s - r)  		& 1-2s(1-\beta)				& (1 - \beta)(s + r)	\\
                 0         &      						& 0					 		& 1						\\
   \end{matrix}
   \right)
$
$
   \boldsymbol{b_N} = \left(
        \begin{matrix}
        2 (r - s) \Delta x \sigma_L & 0 & \ldots & 0 & 2 (s + r) \Delta x \sigma_R
        \end{matrix}
   \right)^{T}
$
My current understanding

I think the difference between the first and second plots is explained by noting the error outlined above.
Regarding the conservation of the physical quantity. I believe the cause is that, as pointed out here, the advection equation in the form I have written it doesn't allow propagation in the reverse direction so the wave just passes through even with zero-flux boundary conditions. My initial intuition regarding conservation only applied when advection term is zero (this is solution in plot number 2 where the area is conserved).
Even with Neumann zero-flux boundary conditions $\frac{\partial \phi}{\partial x} = 0$ the mass can still leave the system, this is because the correct boundary conditions in this case are Robin boundary conditions in which the total flux is specified $j = D\frac{\partial \phi}{\partial x} + \boldsymbol{v}\phi = 0$. Moreover the Neunmann condition specifies that mass cannot leave the domain via diffusion, it says nothing about advection. In essence what we have hear are closed boundary conditions to diffusion and open boundary conditions to advection. For more information see the answer here, Implementation of gradient zero boundary conditon in advection-diffusion equation.

Would you agree?

A tutorial on how to implement Robin boundary conditions.

I think that one of your problems is that (as you observed in your comments) Neumann conditions are not the conditions you are looking for, in the sense that they do not imply the conservation of your quantity. To find the correct condition, rewrite your PDE as
$$ \frac{\partial \phi}{\partial t} = \frac{\partial}{\partial x}\left( D\frac{\partial \phi}{\partial x} + v \phi \right) + S(x,t) .$$
Now, the term that appears in parentheses, $ D\frac{\partial \phi}{\partial x} + v \phi = 0 $ is the total flux and this is the quantity that you must put to zero on the boundaries to conserve $\phi$. (I have added $S(x,t)$ for the sake of generality and for your comments.) The boundary conditions that you have to impose are then (supposing your space domain is $(-10,10)$)
$$ D\frac{\partial \phi}{\partial x}(-10) + v \phi(-10) = 0 $$
for the left side and
$$ D\frac{\partial \phi}{\partial x}(10) + v \phi(10) = 0 $$
for the right side. These are the so-called Robin boundary condition (note that Wikipedia explicitly says these are the insulating conditions for advection-diffusion equations).
If you set up these boundary conditions, you get the conservation properties that you were looking for. Indeed, integrating over the space domain, we have
$$ \int \frac{\partial \phi}{\partial t} dx = \int \frac{\partial}{\partial x} \left( D \frac{\partial \phi}{\partial x} + v \phi \right) dx + \int S(x,t) dx$$
Using integration by parts on the right hand side, we have
$$ \int \frac{\partial \phi}{\partial t} dx = \left( D \frac{\partial \phi}{\partial x} + v \phi \right)(10) - \left( D \frac{\partial \phi}{\partial x} + v \phi \right)(-10) + \int S(x,t) dx$$
Now, the two central terms vanish thanks to the boundary conditions. Integrating in time, we obtain
$$ \int_0^T \int \frac{\partial \phi}{\partial t} dx dt = \int_0^T \int S(x,t) dx dt$$
and if we are allowed to switch the first two integrals,
$$ \int \phi(x,T) dx - \int \phi(x,0) dx = \int_0^T \int S(x,t) dx$$
This shows that the domain is insulated from the exterior. In particular, if $S=0$, we get the conservation of $\phi$.


Question:
We often see component values of 4.7K Ohm, 470uF, or 0.47uH.  For example, digikey has millions of 4.7uF ceramic capacitors, and not a single 4.8uF or 4.6uF and only 1 listed for 4.5uF (specialty product).
What's so special about the value 4.7 that sets so far apart from say 4.6 or 4.8 or even 4.4 since in the 3.. series we usually 3.3,33, etc.  How did these numbers come to be so entrenched?  Perhaps a historical reason?

Due to resistor colour-coding bands on leaded components two-significant digits were preferred and I reckon this graph speaks for itself: -

These are the 13 resistors that span 10 to 100 in the old 10% series and they are 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82, 100. I've plotted the resistor number (1 to 13) against the log of resistance. This, plus the desire for two-significant digits, looks like a good reason. I tried offsetting a few preferred values by +/-1 and the graph wasn't as straight.
There are 12 values from 10 to 82 hence E12 series. There are 24 values in the E24 range.
EDIT - the magic number for the E12 series is the 12th root of ten. This equals approximately 1.21152766 and is the theoretical ratio the next highest resistor value has to be compared to the current value i.e. 10K becomes 12.115k etc.
For the E24 series, the magic number is the 24th root of ten (not suprisingly)
It's interesting to note that a slightly better straight line is got with several values in the range reduced. Here are the theoretical values to three significant digits: -
10.1, 12.1, 14.7, 17.8, 21.5, 26.1, 31.6, 38.3, 46.4, 56.2, 68.1 and 82.5
Clearly 27 ought to be 26, 33 ought to be 32, 39 ought to be 38 and 47 ought to be 46. Maybe 82 should be 83 as well. Here's the graph of traditional E12 series (blue) versus exact (green): -

So maybe the popularity of 47 is based on some poor maths?


Question:
I am trying to teach myself more about image compression using the wavelet transform method.  What is it about certain wavelets that make them preferable when compressing images?  Are they easier to compute? Do they produce smoother images?
Example: JPEG 2000 uses the Cohen-Daubechies-Feauveau 9/7 Wavelet. Why this one?

Overview
The short answer is that they have the maximum number of vanishing moments for a given support (i.e number of filter coefficients). That's the "extremal" property which distinguishes Daubechies wavelets in general. Loosely speaking, more vanishing moments implies better compression, and smaller support implies less computation. In fact, the tradeoff between vanishing moments and filter size is so important that it dominates the way that wavelets are named.  For example, you'll often see the D4 wavelet referred to either as D4 or db2.  The 4 refers to the number of coefficients, and the 2 refers to the number of vanishing moments. Both refer to the same mathematical object. Below, I'll explain more about what moments are (and why we want to make them disappear), but for now, just understand that it relates to how well we can "fold up" most of the information in the signal into a smaller number of values. Lossy compression is achieved by keeping those values, and throwing away the others.
Now, you may have noticed that CDF 9/7, which is used in JPEG 2000, has two numbers in the name, rather than one. In fact, it's also referred to as bior 4.4. That's because it's not a "standard" discrete wavelet at all. In fact, it doesn't even technically preserve the energy in the signal, and that property is the entire reason people got so excited about the DWT in the first place! The numbers, 9/7 and 4.4, still refer to the supports and vanishing moments respectively, but now there are two sets of coefficients that define the wavelet. The technical term is that rather than being orthogonal, they are biorthogonal. Rather than getting too deep into what that means mathematically, I'll just review the factors which led to using non-energy-preserving biorthogonal wavelets in the first place.
JPEG 2000
A much more detailed discussion of the design decisions surrounding the CDF 9/7 wavelet can be found in the following paper:

Usevitch, Bryan E. A Tutorial on Modern Lossy Wavelet Image
  Compression: Foundations of JPEG 2000.

I'll just review the main points here.

Quite often, the orthogonal Daubechies wavelets can actually result in increasing the number of values required to represent the signal. The effect is called coefficient expansion. If we're doing lossy compression that may or may not matter (since we're throwing away values at the end anyway), but it definitely seems counterproductive in the context of compression. One way to solve the problem is to treat the input signal as periodic.
Just treating the input as periodic results in discontinuities at the edges, which are harder to compress, and are just artifacts of the transform. For example, consider the jumps from 3 to 0 in the following periodic extension: $[0,1,2,3] \rightarrow  [...0,1,2,3,0,1,2,3,...]$.  To solve that problem, we can use a symmetric periodic extension of the signal, as follows: $[0,1,2,3] \rightarrow [...,0,1,2,3,3,2,1,0,0,1...]$. Eliminating jumps at the edges is one of the reasons the Discrete Cosine Transform (DCT) is used instead of the DFT in JPEG. Representing a signal with cosines implicitly assumes "front to back looping" of the input signal, so we want wavelets which have the same symmetry property.
Unfortunately, the only orthogonal wavelet which has the required characteristics is the Haar (or D2, db1) wavelet, which only as one vanishing moment. Ugh. That leads us to biorthogonal wavelets, which are actually redundant representations, and therefore don't preserve energy. The reason CDF 9/7 wavelets are used in practice is because they were designed to come very close to being energy preserving. They have also tested well in practice.

There are other ways to solve the various problems (mentioned briefly in the paper), but these are the broad strokes of the factors involved.
Vanishing Moments
So what are moments, and why do we care about them? Smooth signals can be well approximated by polynomials, i.e. functions of the form:
$$a + bx + cx^2 + dx^3 + ...$$
The moments of a function (i.e. signal) are a measure of how similar it is to a given power of x.  Mathematically, this is expressed as an inner product between the function and the power of x.  A vanishing moment means the inner product is zero, and therefore the function doesn't "resemble" that power of x, as follows (for the continuous case):
$$\int{x^n f(x) dx = 0 }$$
Now each discrete, orthogonal wavelet has two FIR filters associated with it, which are used in the DWT. One is a lowpass (or scaling) filter $\phi$, and the other is a highpass (or wavelet) filter $\psi$. That terminology seems to vary somewhat, but it's what I'll use here. At each stage of the DWT, the highpass filter is used to "peel off" a layer of detail, and the lowpass filter yields a smoothed version of the signal without that detail. If the highpass filter has vanishing moments, those moments (i.e. low order polynomial features) will get stuffed into the complementary smoothed signal, rather than the detail signal. In the case of lossy compression, hopefully the detail signal won't have much information in it, and therefore we can throw most of it away.
Here's a simple example using the Haar (D2) wavelet. There's typically a scaling factor of $1/\sqrt{2}$ involved, but I'm omitting it here to illustrate the concept. The two filters are as follows:
$$ \phi = [1,1] \\  \psi = [1,-1]$$
The highpass filter vanishes for the zero'th moment, i.e. $x^0 = 1$, therefore it has one vanishing moment. To see this, consider this constant signal: $[2,2,2,2]$.  Now intuitively, it should be obvious that there's not much information there (or in any constant signal).  We could describe the same thing by saying "four twos". The DWT gives us a way to describe that intuition explicitly. Here's what happens during a single pass of the DWT using the Haar wavelet:
$$
[2,2,2,2] \rightarrow_{\psi}^{\phi} \left\{ \begin{array}{rr}
\left[2 + 2, 2 + 2\right] = \left[4,4\right] \\
\left[2-2,2-2\right] = \left[0,0\right]
\end{array}\right.
$$
And what happens on the second pass, which operates on just the smoothed signal:
$$
[4,4] \rightarrow_{\psi}^{\phi} \left\{ \begin{array}{rr}
\left[4 + 4\right] = \left[8\right] \\
\left[4-4\right] = \left[0\right]
\end{array}\right.
$$
Notice how the constant signal is completely invisible to the detail passes (which all come out to be 0).  Also notice how four values of $2$ have been reduced to a single value of $8$.  Now if we wanted to transmit the original signal, we could just send the $8$, and the Inverse DWT could reconstruct the original signal by assuming that all the detail coefficients are zero. Wavelets with higher-order vanishing moments allow similar results with signals that are well approximated by lines, parabolas, cubics, etc.
Further Reading
I'm glossing over a LOT of detail to keep the above treatment accessible. The following paper has a much deeper analysis:

M. Unser, and T. Blu, Mathematical properties of the JPEG2000 wavelet
  filters, IEEE Trans. Image Proc., vol. 12, no. 9, Sept. 2003,
  pg.1080-1090.

Footnote
The above paper seems to suggest that the JPEG2000 wavelet is called Daubechies 9/7, and is different from the CDF 9/7 wavelet.

We have derived the exact form of the JPEG2000 Daubechies 9/7 scaling
  filters... These filters result from the factorization of the same
  polynomial as $Daubechies_{8}$ [10]. The main difference is that the
  9/7 filters are symmetric. Moreover, unlike the biorthogonal splines
  of Cohen-Daubechies-Feauveau [11], the nonregular part of the
  polynomial has been divided among both sides, and as evenly as
  possible.
[11] A. Cohen, I. Daubechies, and J. C. Feauveau, “Biorthogonal bases
  of compactly supported wavelets,” Comm. Pure Appl. Math., vol. 45, no.
  5, pp. 485–560, 1992.

The draft of the JPEG2000 standard (pdf link) that I've browsed also calls the official filter Daubechies 9/7. It references this paper:

M. Antonini, M. Barlaud, P. Mathieu, and I. Daubechies, “Image coding
  using the wavelet transform,” IEEE Trans. Image Proc. 1, pp. 205-220,
  April 1992.

I haven't read either of those sources, so I can't say for sure why Wikipedia calls the JPEG2000 wavelet CDF 9/7. It seems like there may be a difference between the two, but people call the official JPEG2000 wavelet CDF 9/7 anyway (because it's based on the same foundation?).  Regardless of the name, the paper by Usevitch describes the one that's used in the standard.


Question:
I am currently finishing my MSc in computer science. I am interested in programming languages, especially in type systems. I got interested in research in this field and next semester I will start a PhD on the subject.
Now here is the real question: how can I explain what I (want to) do to people with no previous knowledge in either computer science or related fields?
The title comes from the facts that I am not even able to explain what I do to my parents, friends and so on. Yeah, I can say "the whole point is to help software developers to write better software", but I do not think it is really useful: they are not aware of "programming", they have not clue of what it means. It feels like I am saying I am an auto mechanic to someone from the Middle Ages: they simply do not know what I am talking about, let alone how to improve it.
Does anyone have good analogies with real-world? Enlightening examples causing "a-ha" moments? Should I actually show a short and simple snippet of code to 60+ year-old with no computer science (nor academic) experience? If so, which language should I use? Did anyone here face similar issues?

If you have a few minutes, most people know how to add and multiply two three-digit numbers on paper. Ask them to do that, (or to admit that they could, if they had to) and ask them to acknowledge that they do this task methodically: if this number is greater than 9, then add a carry, and so forth. This description they just gave of what to do that is an example of an algorithm.
This is how I teach people the word algorithm, and in my experience this has been the best example. Then you can explain that one may imagine there are more complex tasks that computers must do, and that therefore there is a need for an unambiguous language to feed a computer these algorithms. So there has been a proliferation of programming languages because people express their thoughts differently, and you're researching ways to design these languages so that it is harder to make mistakes.
This is a very recognizable situation. Most people have no concept that the computers they use run programs, or that those programs are human-written source code, or that a computer could 'read' source code, or that computation, which they associate with arithmetic, is the only thing computers do (and data movement, and networking, maybe).
My research is in quantum computing, so when people ask me what I do, I don't attempt to explain that. Instead, I try to explain that quantum physics exists (they've usually heard of Schrödinger's cat, and things that are in two places at once), and that because of this strange physics, faster computation might be possible.
My goal is to leave the person feeling a little more knowledeable than they did going in, feeling excited about a world they didn't know existed, but with which you have now familiarized them. I find that that's much more valuable than explaining my particular research questions.


Question:
Having recently constructed a lot of phylogenetic trees with the module TreeConstruction from Phylo package from Biopython, I've been asked to replace the branch tip labels by the corresponding sequence logos (which I have in the same folder). I thought that it would be more efficient to make a code to generate the logo-trees automatically, as I would have to make a lot of them.
The first idea that I came up with was to see whether the functions used to build the tree had an argument to replace the branch tip labels or to remove them, which I couldn't find. Therefore, I removed the branch tip labels by setting their font size to 0: (following is the code to build the tree)
# Modules to build the tree
from Bio.Phylo.TreeConstruction import DistanceCalculator, DistanceTreeConstructor
from Bio.Phylo import draw
from Bio import Phylo, AlignIO
import subprocess
import matplotlib
import matplotlib.pyplot as plt

alignment = AlignIO.read('MotifSeqAligned.fasta', 'fasta') # reading the alignment file

calculator = DistanceCalculator('ident')
dm = calculator.get_distance(alignment) # distance matrix

constructor = DistanceTreeConstructor()
tree = constructor.nj(dm) # build with neighbour joining algorithm a tree from dm

Phylo.write(tree, 'TreeToCutOff.nwk', 'newick')

plt.rc('font', size=0)          # controls default text sizes #HERE IS THE SETTING FOR THAT ALLOWS ME TO HIDE THE BRANCH TIP LABELS
plt.rc('axes', titlesize=14)     # fontsize of the axes title
plt.rc('xtick', labelsize=10)    # fontsize of the tick labels
plt.rc('ytick', labelsize=10)    # fontsize of the tick labels
plt.rc('figure', titlesize=18)   # fontsize of the figure title

draw(tree, do_show=False)
plt.savefig("TreeToCutOff.svg", format='svg', dpi=1200)

From this code I could get the tree:

Since I don't know how to get the y coordinates of the branches to add the logos one by one, I built a column of logos with matplotlib, that I intended then to paste on the tree in python. The code to build the column of logos is the following:
#Extract filename from newick
newickFile = open("TreeToCutOff.nwk", 'r').read()
orderedLogos = ["{}.eps".format(i) for i in re.split('(\W)', newickFile) if "Profile" in i]

#Initialize the figure
fig = plt.figure()

#Add each image one after the other in the right order
for i, files in enumerate(orderedLogos):
    img1 = mpimg.imread(files)
    ax1 = fig.add_subplot(len(orderedLogos), 1, 1+i)
    ax1.imshow(img1)
    ax1.set_xticks([])
    ax1.set_yticks([])

# plt.show()
plt.savefig("RowsOfLogos.svg", format='svg', dpi=1200)
plt.clf()
plt.cla()

Having my tree and the column of logos in .svg or .png, I couldn't find any way to stack them properly. My first idea was to use the library svgutils which seemed to be easy to handle, with the following code: (taken from svgutils tutorials)
import svgutils.transform as sg
# Assemble
#create new SVG figure
fig = sg.SVGFigure("14cm", "14cm")

# load figures
fig1 = sg.fromfile('TreeToCutOff.svg')
fig2 = sg.fromfile('RowsOfLogos.svg')

# get the plot objects
plot1 = fig1.getroot()
plot2 = fig2.getroot()
plot2.moveto(280, 100, scale=0.05)

# append plots and labels to figure
fig.append([plot1, plot2])

But the issue with the output was that the background of the column of logos was white and thus, I was pasting a huge white image with a thin column of logos on the tree. And I couldn't find a way to crop the column of logos with svgutils. I tried the module Image from PIL package to build a tree of logos from .png files but couldn't see the tree used as background after pasting the column of logos.
There may be a way to do what I'm aiming for with matplotlib (which would be to stack 2 files .png, and place the logos all the time at the same distance), but I couldn't work it out.
Does anyone know what the best solution is to make a tree of logos (as in the following image which I could only build manually with inkscape) with python libraries, allowing to automate the process without having to adapt the code depending on the number of branches?

Following is a subset of "MotifSeqAligned.fasta" containing the aligned sequences used to build the trees:
>ProfileCluster0.meme
---SSNDTTTCCAGGAAD-
>ProfileCluster1.meme
YBNRD---TTCYYGGAAT-
>ProfileCluster10.meme
---VDKDWTTCTYGGAAT-

With the 3 corresponding logos:

The full "MotifSeqAligned.fasta" and all the logos.eps (as I used them instead of .png which is the format asked by the forum) can be found here.

To expand on my comment from yesterday. You could do this with the ETE Toolkit (I just copied one logo file rather than converting all 26 to png):
from ete3 import Tree, TreeStyle, faces
def mylayout(node):
    if node.is_leaf():
        logo_face = faces.ImgFace(str.split(node.name, '.')[0] + ".png") # this doesn't seem to work with eps files. You could try other formats
        faces.add_face_to_node(logo_face, node, column=0)
    node.img_style["size"] = 0  # remove blue dots from nodes

t = Tree("tree.nwk", format=3)
ts = TreeStyle()
ts.layout_fn = mylayout
ts.show_leaf_name=False # remove sequence labels
ts.scale =  10000 # rescale branch lengths so they are longer than the width of the logos
t.render("formatted.png", tree_style = ts, h=3000, w=3000) # you may need to fiddle with dimensions and scaling to get the look you want

If you want all of the logos lined up in a column add aligned=True to faces.add_face_to_node


Question:
How are computers able to tell the correct time and date every time?
Whenever I close the computer (shut it down) all connections and processes inside stop.  How is it that when I open the computer again it tells the exact correct time? Does the computer not shut down completely when I shut it down? Are there some processes still running in it? But then how does my laptop tell the correct time when I take out the battery (and thus forcibly stop all processes) and start it again after a few days?

Computers have a "real-time clock" -- a special hardware device (e.g., containing a quartz crystal) on the motherboard that maintains the time.  It is always powered, even when you shut your computer off.  Also, the motherboard has a small battery that is used to power the clock device even when you disconnect your computer from power.  The battery doesn't last forever, but it will last at least a few weeks.  This helps the computer keep track of the time even when your computer is shut off.  The real-time clock doesn't need much power, so it's not wasting energy. If you take out the clock battery in addition to removing the main battery and disconnecting the power cable then the computer will lose track of time and will ask you to enter the time and date when you restart the computer.
To learn more, see Real-time clock and CMOS battery and Why does my motherboard have a battery.
Also, on many computers, when you connect your computer to an Internet connection, the OS will go find a time server on the network and query the time server for the current time.  The OS can use this to very accurately set your computer's local clock.  This uses the Network Time Protocol, also called NTP.


Question:
In a standard algorithms course we are taught that quicksort is $O(n \log n)$ on average and $O(n^2)$ in the worst case. At the same time, other sorting algorithms are studied which are $O(n \log n)$ in the worst case (like mergesort and heapsort), and even linear time in the best case (like bubblesort) but with some additional needs of memory.
After a quick glance at some more running times it is natural to say that quicksort should not be as efficient as others.
Also, consider that students learn in basic programming courses that recursion is not really good in general because it could use too much memory, etc. Therefore (and even though this is not a real argument), this gives the idea that quicksort might not be really good because it is a recursive algorithm.
Why, then, does quicksort outperform other sorting algorithms in practice? Does it have to do with the structure of real-world data? Does it have to do with the way memory works in computers? I know that some memories are way faster than others, but I don't know if that's the real reason for this counter-intuitive performance (when compared to theoretical estimates).

Update 1: a canonical answer is saying that the constants involved in the $O(n\log n)$ of the average case are smaller than the constants involved in other $O(n\log n)$ algorithms. However, I have yet to see a proper justification of this, with precise calculations instead of intuitive ideas only.
In any case, it seems like the real difference occurs, as some answers suggest, at memory level, where implementations take advantage of the internal structure of computers, using, for example, that cache memory is faster than RAM. The discussion is already interesting, but I'd still like to see more detail with respect to memory-management, since it appears that the answer has to do with it.

Update 2: There are several web pages offering a comparison of sorting algorithms, some fancier than others (most notably sorting-algorithms.com). Other than presenting a nice visual aid, this approach does not answer my question.

Short Answer
The cache efficiency argument has already been explained in detail. In addition, there is an intrinsic argument, why Quicksort is fast. If implemented like with two “crossing pointers”, e.g. here, the inner loops have a very small body. As this is the code executed most often, this pays off.
Long Answer
First of all,
The Average Case does not exist!
As best and worst case often are extremes rarely occurring in practice, average case analysis is done. But any average case analysis assume some distribution of inputs! For sorting, the typical choice is the random permutation model (tacitly assumed on Wikipedia).
Why $O$-Notation?
Discarding constants in analysis of algorithms is done for one main reason: If I am interested in exact running times, I need (relative) costs of all involved basic operations (even still ignoring caching issues, pipelining in modern processors ...).
Mathematical analysis can count how often each instruction is executed, but running times of single instructions depend on processor details, e.g. whether a 32-bit integer multiplication takes as much time as addition.
There are two ways out:

Fix some machine model.
This is done in Don Knuth's book series “The Art of Computer Programming” for an artificial “typical” computer invented by the author. In volume 3 you find exact average case results for many sorting algorithms, e.g.

Quicksort: $ 11.667(n+1)\ln(n)-1.74n-18.74 $
Mergesort: $ 12.5 n \ln(n) $
Heapsort:  $ 16 n \ln(n) +0.01n $
Insertionsort: $2.25n^2+7.75n-3ln(n)$

[source]

These results indicate that Quicksort is fastest. But, it is only proved on Knuth's artificial machine, it does not necessarily imply anything for say your x86 PC. Note also that the algorithms relate differently for small inputs:

[source]
Analyse abstract basic operations.
For comparison based sorting, this typically is swaps and key comparisons. In Robert Sedgewick's books, e.g. “Algorithms”, this approach is pursued. You find there

Quicksort: $2n\ln(n)$ comparisons and $\frac13n\ln(n)$ swaps on average
Mergesort: $1.44n\ln(n)$ comparisons, but up to $8.66n\ln(n)$ array accesses (mergesort is not swap based, so we cannot count that).
Insertionsort: $\frac14n^2$ comparisons and $\frac14n^2$ swaps on average.

As you see, this does not readily allow comparisons of algorithms as the exact runtime analysis, but results are independent from machine details.

Other input distributions
As noted above, average cases are always with respect to some input distribution, so one might consider ones other than random permutations. E.g. research has been done for Quicksort with equal elements and there is nice article on the standard sort function in Java