• An introduction to creating Python documentation using Sphinx

    Documentation: a god-send when it exists, but always bottom of the priority list when creating your own projects. Fortunately, Sphinx is here to make it (a bit) easier to document Python projects. Here’s a quick, bare-bones run down of how to do it, and host it on readthedocs. Installation I...


  • D3 Mondrian Generator

    Weekend project: use D3 to generate artwork inspired by Piet Mondrian (see some examples here). A gist of the code is available at the bottom of the page; to run locally, start up a python http server in the script directory: python -m SimpleHTTPServer Some ideas for future improvements: Choose...


  • Accessing Jupyter over SSH

    If you spend a lot of time on a remote machine and want the flexibility and interactivity of Jupyter notebooks, here’s a short guide on how to access notebooks on the remote from your local browser. You first need to start Jupyter on the server. Log in, navigate to the...


  • Favourite readings of 2016

    Here’s my (belated) list of top reads from 2016, in no particular order. None of them were released in 2016, so if you’re looking for the latest hits, best look elsewhere. There’s autobiography, biography, graphic novel, philosophy, and a generous helping of science fiction. Enjoy! Ursula K. Le Guin -...


  • Back up your Spotify Playlists

    Discovered the excellent spotify-backup recently, which swipes your entire spotify playlists. Useful if you’re as paranoid as me about Spotify accidentally deleting your painstakingly curated content. You’ll need Python3, after that just clone the repo and run the line below in the directory. It should launch a window in your...


  • Converting WAV to MP3 in the terminal

    Need to convert multiple WAV files to MP3 through the terminal? You need ffmpeg. Most commonly used for video conversions, ffmpeg can also be used to convert between audio formats. Here’s how to do a simple conversion from WAV to MP3: ffmpeg -i test.wav -acodec mp3 test.mp3 You can also...


  • Bayes' Rule, James V. Stone

    These thoughts are also published on Goodreads. Just finished a decent little book called Bayes’ Rule, by James V. Stone, which introduces the reverend Bayes’ seminal contribution to probability theory. It’s aimed at the complete novice, a little lower than I was hoping for personally, but useful nonetheless thanks to...


  • Astro in Python

    I recently finished work on a Python course for Astronomy and Astrophysics, sponsored by the South East Physics network (SEPnet), called Astro in Python. It takes the form of Jupyter notebooks, each one covering a particular topic or Python module, and is intended to be a self-contained, one-stop shop; just...