Bitcoin block Updated +Created
Calcium carbonate polymorph Updated +Created
Uncomputable function Updated +Created
The prototypical example is the Busy beaver function, which is the easiest example to reach from the halting problem.
SymPy Updated +Created
This is the dream cheating software every student should know about.
It also has serious applications obviously. www.sympy.org/scipy-2017-codegen-tutorial/ mentions code generation capabilities, which sounds super cool!
The code in this section was tested on sympy==1.8 and Python 3.9.5.
Let's start with some basics. fractions:
from sympy import *
sympify(2)/3 + sympify(1)/2
outputs:
7/6
Note that this is an exact value, it does not get converted to floating-point numbers where precision could be lost!
We can also do everything with symbols:
from sympy import *
x, y = symbols('x y')
expr = x/3 + y/2
print(expr)
outputs:
x/3 + y/2
We can now evaluate that expression object at any time:
expr.subs({x: 1, y: 2})
outputs:
4/3
How about a square root?
x = sqrt(2)
print(x)
outputs:
sqrt(2)
so we understand that the value was kept without simplification. And of course:
sqrt(2)**2
outputs 2. Also:
sqrt(-1)
outputs:
I
I is the imaginary unit. We can use that symbol directly as well, e.g.:
I*I
gives:
-1
Let's do some trigonometry:
cos(pi)
gives:
-1
and:
cos(pi/4)
gives:
sqrt(2)/2
The exponential also works:
exp(I*pi)
gives;
-1
Now for some calculus. To find the derivative of the natural logarithm:
from sympy import *
x = symbols('x')
diff(ln(x), x)
outputs:
1/x
Just read that. One over x. Beauty.
Let's do some more. Let's solve a simple differential equation:
y''(t) - 2y'(t) + y(t) = sin(t)
Doing:
from sympy import *
x = symbols('x')
f, g = symbols('f g', cls=Function)
diffeq = Eq(f(x).diff(x, x) - 2*f(x).diff(x) + f(x), sin(x)**4)
print(dsolve(diffeq, f(x)))
outputs:
Eq(f(x), (C1 + C2*x)*exp(x) + cos(x)/2)
which means:
To be fair though, it can't do anything crazy, it likely just goes over known patterns that it has solvers for, e.g. if we change it to:
diffeq = Eq(f(x).diff(x, x)**2 + f(x), 0)
it just blows up:
NotImplementedError: solve: Cannot solve f(x) + Derivative(f(x), (x, 2))**2
Sad.
Let's try some polynomial equations:
from sympy import *
x, a, b, c = symbols('x a b c d e f')
eq = Eq(a*x**2 + b*x + c, 0)
sol = solveset(eq, x)
print(sol)
which outputs:
FiniteSet(-b/(2*a) - sqrt(-4*a*c + b**2)/(2*a), -b/(2*a) + sqrt(-4*a*c + b**2)/(2*a))
which is a not amazingly nice version of the quadratic formula. Let's evaluate with some specific constants after the fact:
sol.subs({a: 1, b: 2, c: 3})
which outputs
FiniteSet(-1 + sqrt(2)*I, -1 - sqrt(2)*I)
Let's see if it handles the quartic equation:
x, a, b, c, d, e, f = symbols('x a b c d e f')
eq = Eq(e*x**4 + d*x**3 + c*x**2 + b*x + a, 0)
solveset(eq, x)
Something comes out. It takes up the entire terminal. Naughty. And now let's try to mess with it:
x, a, b, c, d, e, f = symbols('x a b c d e f')
eq = Eq(f*x**5 + e*x**4 + d*x**3 + c*x**2 + b*x + a, 0)
solveset(eq, x)
and this time it spits out something more magic:
ConditionSet(x, Eq(a + b*x + c*x**2 + d*x**3 + e*x**4 + f*x**5, 0), Complexes)
Oh well.
Let's try some linear algebra.
m = Matrix([[1, 2], [3, 4]])
Let's invert it:
m**-1
outputs:
Matrix([
[ -2,    1],
[3/2, -1/2]])
Dependency graph Updated +Created
Klein-Gordon equation in Einstein notation Updated +Created
The Klein-Gordon equation can be written in terms of the D'alembert operator as:
so we can expand the D'alembert operator in Einstein notation to:
WormWideWeb Updated +Created
wormwideweb.org/
Browse freely moving whole-brain calcium imaging datasets
Joyce Wildenthal Updated +Created
Cat 5e Updated +Created
This is the most common home "ethernet cable" as of 2024. It is essentially ubiquitous. According to the existing Ethernet physical layer, the maximum speed supported is 2.5 Gbit/s.
Universal quantum gates Updated +Created
Just like as for classic gates, we would like to be able to select quantum computer physical implementations that can represent one or a few gates that can be used to create any quantum circuit.
Unfortunately, in the case of quantum circuits this is obviously impossible, since the space of N x N unitary matrices is infinite and continuous.
Therefore, when we say that certain gates form a "set of universal quantum gates", we actually mean that "any unitary matrix can be approximated to arbitrary precision with enough of these gates".
Or if you like fancy Mathy words, you can say that the subgroup of the unitary group generated by our basic gate set is a dense subset of the unitary group.
Single-qubit gate Updated +Created
The first two that you should study are:
Clifford gates Updated +Created
This gate set alone is not a set of universal quantum gates.
Notably, circuits containing those gates alone can be fully simulated by classical computers according to the Gottesman-Knill theorem, so there's no way they could be universal.
This means that if we add any number of Clifford gates to a quantum circuit, we haven't really increased the complexity of the algorithm, which can be useful as a transformational device.
A popular set of universal quantum gates derived from Clifford gates is Clifford plus T.
Chevalley groups Updated +Created
This was the first infinite family of simple groups discovered after the simple cyclic groups and alternating groups. The first case discovered was by Galois. You should understand that one first.
NADP+ Updated +Created
INNER JOIN Updated +Created
Microwave oven Updated +Created
Video 1.
How Microwaves Work by National MagLab (2017)
Source. A bit meh. Does not mention the word cavity magnetron!
Video 2.
How a Microwave Oven Works by EngineerGuy
. Source. Cool demonstration of the standing waves in the cavity with cheese!
Sample collection Updated +Created
As you would expect, not much secret here, we just dumped a 1 liter glass bottle with a rope attached around the neck in a few different locations of the river, and pulled it out with the rope.
And, in the name of science, we even wore gloves to not contaminate the samples!
Figure 1.
Swans swimming in the river when during sample collection
. Source. Swam poo bacteria?
Figure 2.
Tying rope to bootle for river water sample collection
. Source.
Figure 3.
Dumping the bottle into the river to collect the water sample
. Source.
Figure 4.
Measuring the river water sample temperature with a mercury thermometer
. Source.
Figure 5.
Measuring the river water sample pH with a pH strip
. Source. The strip is compared with the color of a mobile app that gives the pH for a given strip color.
Figure 6.
Noting sample collection location on the water bottle
. Source.
Video 1.
Dumping the bottle into the river to collect the water sample
. Source. That was fun.
Bioinformatics Updated +Created
Because Ciro's a software engineer, and he's done enough staring in computers for a lifetime already, and he believes in the power of Git, he didn't pay much attention to this part ;-)
According to the eLife paper, the code appears to have been uploaded to: github.com/d-j-k/puntseq. TODO at least mention the key algorithms used more precisely.
Ciro can however see that it does present interesting problems!
Because it was necessary to wait for 2 days to get our data, the workshop first reused sample data from previous collections done earlier in the year to illustrate the software.
First there is some signal processing/machine learning required to do the base calling, which is not trivial in the Oxford Nanopore, since neighbouring bases can affect the signal of each other. This is mostly handled by Oxford Nanopore itself, or by hardcore programmers in the field however.
After the base calling was done, the data was analyzed using computer programs that match the sequenced 16S sequences to a database of known sequenced species.
This is of course not just a simple direct string matching problem, since like any in experiment, the DNA reads have some errors, so the program has to find the best match even though it is not exact.
The PuntSeq team would later upload the data to well known open databases so that it will be preserved forever! When ready, a link to the data would be uploaded to: www.puntseq.co.uk/data

Unlisted articles are being shown, click here to show only listed articles.