Basic Counting in Python

Posted 2021-05-14 • Last updated 2021-10-15

I love fancy machine learning algorithms as much as anyone. But sometimes, you just need to count things. And Python’s built-in data structures make this really easy. Let’s say we have a list of strings: With a list like this, you might care about a few different counts. What’s the count of all items? What’s … Read more

Installing Packages in a Jupyter Notebook

Posted 2021-01-22 • Last updated 2021-10-15

This post describes a trick for installing/upgrading Python packages in a Jupyter notebook. It’s useful for scratch code, but don’t do this when you need reproducible code.

Combinations in Python

Posted 2020-12-28 • Last updated 2021-10-15

There are lots of ways to generate combinations in Python. This post will show you all of them.