Mitch's Blog

Django templates: How to iterate over defaultdicts

Django Python

In this post, I show a small fix to an issue that I encountered while building a Django-based application.

Integrating Python-based daemons with systemd (Part 1)

Linux Python Code

systemd is a wonderful piece of software, that has liberated us from writing ugly bash-based init scripts and has given us features like a structured and unified log and one of the best local DNS resolvers on Linux.

In this post, I'm demonstrating how to integrate a service (also known as daemons on UNIX-like systems) written in Python into systemd to leverage some advanced features of the service manager.

Python: Split up iterable into evenly-sized chunks

Python Code

In a recent tool I developed, I had the need to split up a list (or any iterable) into equal-sized lists of values. In this post, I document the process on how I reached my goal, what steps it took and the decisions behind them.