Blog

A blog of Python-related topics and code.

Plotting COVID-19 cases

The Centre for Systems Science and Engineering (CSSE) at Johns Hopkins University publishes daily statistics of the number of confirmed cases of COVID-19 by country on its GitHub page. The short script below pulls data from this page to plot a bar chart of cases and growth in cases as a function of time for a given country. For example:

The Trapped Knight

The Trapped Knight problem is a chess-based problem apparently invented by Neil Sloane and giving rise to a finite number sequence in his Online Encyclopedia of Integer Sequences (OEIS A316667).

PyValem: a Python package for parsing chemical formulas and states

PyValem is a Python package, for parsing, representing and manipulating the formulas of simple chemical species, their states and reactions. Its source is available on GitHub under a GPL licence, and it can be installed from the Python Package Index, PyPI, using pip:

Recamán's sequence

The Recamán sequence is a famous sequence invented by the Colombian mathematician, Bernardo Recamán Santos. It is defined by the following algorithm, starting at $a_0 = 0$:

The Möbius function and the Mertens conjecture

This blog post was inspired by Holly Krieger's video for Numberphile.