Func-tastic Python: Mastering Functools

There’s your life as Python user before you knew about functools and then there’s your life as a Python user after. The same can be said about itertools & collections, but that’s a story for another time. People even go as far as saying that functools is life-changing. Seeing that I’m writing this post, it’ll be no surprise that I agree. Functools is part of the python standard library. The functools documentation itself is quite nice, but I thought I’d try presenting my own take on it....

June 28, 2024 · 22 min · Kaushik Moudgalya

Pre-commit for Data Scientists

There’s a nifty little python library called pre-commit that’s doing rounds around the internet. And it all starts with a little file called .pre-commit-config.yaml. But we’ll get into that later. First, let’s talk about pre-commits in general. As data scientists, we version our code, data and models. While versioning our code, we might use linters like flake8 and black to make sure our code conforms to the PEP guidelines. However, we usually have to run these manually and more often than not, we might forget to do so....

February 2, 2024 · 8 min · Kaushik Moudgalya

OOPs for Data Scientists

There are 4 principles of OOPs that everyone is expected to know. I used to be one of those people who thought that it was enough to know how to read and write OOPs code without actually knowing what those principles were as I thought they were more of a software engineering concept. But it makes sense to be aware of the common terms and verbalizations of the concepts within OOPs....

November 21, 2023 · 19 min · Kaushik Moudgalya