Posts for: #Python

til: Making self-contained Python executables using PyInstaller

In the last year I have developed a strong interest in simracing as a hobby. We are currently living in a golden age of simulated racing with many great sim titles to choose from, but my preferred one is the iRacing simulator.

Alongside iRacing’s official matchmaking races there exists a large and healthy ecosystem of community-operated league races. These leagues run the spectrum from extremely competitive to very, very casual. Toward the latter end of that spectrum is the 24 Hour of Lemons community, an iRacing league that accompanies the US-based motorsport series of the same name in which people race cars worth no more than $500 for as many laps as they can.

[Read more]

til: A simple ETL task in Airflow using PostgresHook

This week at work I had the need to build a small ETL (Export, Transform, Load) process to move some data from PostgreSQL database A (a primary relational database used by our application to serve customer traffic) to PostgreSQL database B (a back-of-house instance used to perform metering and other usage analytics).

We already use Apache Airflow to orchestrate the metering tasks, data sync and Stripe API interactions, so building this process in Airflow was my first choice.

[Read more]

Reading mailing list archives with Python: Noisechain Pt. 1

Inspired by the twitter account “Shit Noisebridge says” I set about recently to script together that trains a Markov chaina on the complete archive of the noisebridge-discuss@ mailing list to create a rival account “Shit noisebridge probably says”.

It’s not yet complete but one useful thing to have fallen out of this project already is a script that makes it easy to download mailman list arcihves in their entirety by passing the name of a list. It’s a very simple script with a magic constant pointing to the Noisebridge mailman instance at the moment but it might prove useful for those wishing to read through mailing list archives. You can find the script on Github.

[Read more]