Linklog
A curated collection of links and resources I have found over time.
April 2025
- 14 Advanced Python Features | Edward Li's Blog (blog.edward-li.com)
You can find all sorts of beginner "top 10 features of X" online, and most of the time, they're basic and barely interesting. This article attempts to go counter that experience and, at least in my case, succeeded in teaching me a few things and provided some interesting points of discussion.
March 2025
- patrick-kidger/jaxtyping (github.com)
I've been looking for a good numpy and pytorch typing system in Python. Initially written for Jax, this library looks like exactly what I wanted.
- Some Advanced Typing Concepts in Python (jellis18.github.io)
Another article about python's type system. This one is addressed to a more advanced audience. I had been looking for such a resource for a while, and I wasn't disappointed.
- Abstract Base Classes and Protocols: What Are They? When To Use Them?? Lets Find Out! (jellis18.github.io)
Very cool breakdown of the difference between abstract classes and protocols in python. Well written and with lots of clear examples.
February 2025
- Summary of Major Changes Between Python Versions (www.nicholashairs.com)
This is a very useful reference sheet containing major changes added by every new python version. Extremely handy if you have to update an old codebase multiple versions at once.
- flywhl/logis (github.com)
An interesting library to record ML experiments metadata through commit messages. Even better, it supports a query language to find which commit satisfies a given criterion.
- aneeshnaik/lintsampler (github.com)
A useful Python library to sample custom probability distributions. Looks useful if the PDF is expensive to compute.
- Skforecast (skforecast.org)
A Python library for timeseries forecasting with very extensive features. The documentation also features some in-depth pedagogical explanations of how to properly forecast data and what methods can be used to improve results.
- Bayesian Methods for Hackers (dataorigami.net)
An illustrated introduction to Bayesian statistics using Jupyter notebooks. I was always confused about the difference between Bayesian and Frequentist approaches until I read this.
- Effective Simulated Annealing with Python (nathan.fun)
Fantastic introduction to the simulated annealing metaheuristic in Python. This is a powerful method to build good approximate solutions to optimization problems.
January 2025
- A Brief Introduction to Recurrent Neural Networks (jaketae.github.io)
Introduction and example of how to build a recurrent neural network from scratch.
- Polars for initial data analysis, Polars for production (pythonspeed.com)
Article about the use of Polars for both production and development stages. When starting with Polars, I found it easy to write production code (usually a long pipeline of LazyFrames ending with a collect), but struggled with writing optimal development code.
- Modern Polars (kevinheavey.github.io)
Great online book about Polars targeted to Pandas users. If you haven't heard about Polars yet, do yourself a favor and read this.
- Einsum in Depth (einsum.joelburget.com)
A guide on how to use "einsum" in Python for tensor manipulation. Einstein notation made working with algebra a much nicer experience in physics, and for anyone doing heavy tensorial operations, they should do the same. But I always found the python implementation a bit awkward and difficult to understand. This article really helped with that.
December 2024
- Software design principles for machine learning applications (github.com)
A series of examples of proper software design in data science beyond Jupyter notebooks. Very good examples of proper refactoring, step by step, from a messy script to a properly encapsulated program.
- Hands-on Optimization with OR-Tools in Python (kunlei.github.io)
Detailed use cases of the OR-Tools library for optimization problems. Many problems can be solved in a more efficient way with linear programming, and this library makes it a breeze to do so.
October 2024
- dry-python/returns (github.com)
Bring some sanity to Python and remove null checks. Clearly inspired by Haskell's Maybe or Rust's Option type. I am mostly familiar with the latter, and I often wish it existed in Python, and now it does.
- Blog of Claudio Jolowicz (cjolowicz.github.io)
Series of articles on best practices around Python coding and tooling. Definitely worth checking it out if you're still building your workflow.
- shap/shap (github.com)
Useful library to estimate feature importance of machine learning models, based on game theory principles. The main idea is to estimate the importance of each feature to take a sample from the mean prediction value to a given prediction value. It can also be aggregated over samples to understand global feature importance, conditional on feature value.
- Modern Good Practices for Python Development (www.stuartellis.name)
A set of best-practices in Python development. Given the permissiveness of Python in terms of syntax and design, I find that following community accepted best practices is the best way to learn how to write good code too.
September 2024
- posit-dev/great-tables (github.com)
Library to make great-looking tables from Polars dataframes. It works with Pandas too but there you can just generate HTML directly, while Polars currently does not have many more options.
March 2024
- Machine Learning Notebooks (sebastianraschka.com)
A collection of detailed Python notebooks written by Sebastian Raschka. It's like a big cheatsheet of machine learning methods.
February 2024
- Python Data Science Handbook | Python Data Science Handbook (jakevdp.github.io)
A must-read for anyone beginning in data science. Chapter 5 features some great in-depth notebooks on classical machine learning methods like SVM, random forests, etc...
- faif/python-patterns (github.com)
A detailed list of design patterns in Python. While I don't believe you should always look to insert design patterns everywhere you can, knowing them is often the key to writing more robust code when relevant.
- Scientific Computing with Python — Scientific Computing with Python (caam37830.github.io)
A reference on how to use Python for efficient computations in science. I wish I had read this before my PhD.