Being a good UNIX neighbour

Posted on April 29, 2023 in cli, unix

A few tips to be a good UNIX neighbour and make your scripts more portable.


Continue reading

Benchmarks for writing pandas DataFrames to SQL Server (ODBC)

Posted on March 15, 2020 in Python, SQL, MS

In this article, we benchmark various methods to write data to MS SQL Server from pandas DataFrames to see which is the fastest. We compare multi, fast_executemany and turbodbc, and find the best candidate.


Continue reading

CrossFit Open 2019 Analysis - Exercise Statistics

Posted on June 30, 2019 in CrossFit, Python

In this article, we take a deeper dive into the benchmark exercise times and weights for the 2019 CrossFit Open athletes, including sprinting, running, squat, deadlift, clean & jerk, and snatch.


Continue reading

CrossFit Open 2019 Analysis - Benchmark Workouts

Posted on June 15, 2019 in CrossFit, Python

In this final article on 2019 CrossFit Open athlete statistics, we take a look at the spread of times for CrossFit's iconic workouts from athlete profile pages: Fran, Grace, Helen, Filthy Fifty, and Fight Gone Bad.


Continue reading

CrossFit Open 2019 Analysis - Athlete Statistics

Posted on June 01, 2019 in CrossFit, Python

In this article, we disect the various physical, strength and athletic attributes of hundreds of thousands of 2019 CrossFit Open athletes as self-reported in their athlete profiles.


Continue reading

Unhashable in Python - Getting the unique number of locations in a GeoDataFrame

Posted on September 14, 2018 in Python

I encounter an unhashable type error when trying to get the unique number of geometries in a GeoDataFrame, and we learn about mutability (vs immutability) of Python objects in order to sidestep the issue.


Continue reading

Higher-level functions in Python, Part 3 - filter

Posted on June 14, 2018 in Python

In our final installment for the Higher Level Function in Python Series, we dive into the Python filter function. No sidetracks this time around. We simply take a look at how it's used, try to find a way where it would be superior to list comprehensions, fail, and conclude the series.


Continue reading

Higher-level functions in Python, Part 2 - reduce

Posted on June 04, 2018 in Python

We go through uses of the Python reduce function, when it's useful and its performance benefits. This time, we spend some time exploring function composition, and how to manage large function chains, e.g. in a data processing pipeline.


Continue reading

Higher-level functions in Python, Part 1 - map

Posted on May 30, 2018 in Python

We go through uses of the Python map function, when it's useful and its performance benefits, and get sidetracked into benchmarking different syntaxes for exponential expressions.


Continue reading

Introduction to the Python Scientific Ecosystem, Part 2

Posted on August 10, 2017 in Python

A general primer on Python for science and engineering, with an emphasis on the SciPy ecosystem of packages.


Continue reading