blocks by adewes

Temperature Tracking Script

Borg Backup - Shell script to create regular backups (can e.g. be called hourly by cron).

Contracts in Python

The build watcher: Automatically rebuild Pelican content as files change.

Finding circular dependencies in your SQLAlchemy data scheme

Ebay Ads - Bot. Because who wants to write messages by hand...

Eight Queens Problem Solved using Common Table Expressions

Python: Dictionary Value Exporter

The Hacker School Effect

Acht K├Âniginnen

A map-reduce class in Python, with the typical "hello, world!" word-counting example. You can download ulysses.txt file used in the example here:

Get the active window in Gtk using the wnck library.

A Flask decorator that takes a response with JSON content and converts it to a well-formatted JSONP response.

Sometimes you just need an SQL table filled with some natural numbers. Here's a simple & brute-force solution that will work on ANY SQL dialect. It returns a table with an arbitrary number of natural numbers, provided this number is equal to 10.000... I used this on ExaSOL, where most Oracle / MSSQL magic does not work.

Simple functions to calculate expected number of failures and workload in systems that can process a given number of subscribers in parallel, using a binomial distribution model to simulate subscriber behavior. Applicable e.g. to web servers & cellphone base stations.

A Redis-based distributed lock class, based on the solution proposed by Chris Lamb (

Scripts for getting the full list of Github users ( and for retrieving the details of these users ( using the Github API.

A small Python script to generate random color sequences, e.g. for use in plotting. Just call the "generate_new_color(existing_colors,pastel_factor)" function to generate a random color that is (statistically) maximally different from all colors in "existing_colors". The "pastel_factor" parameter can be used to specify the "pasteliness"(?) of the produced colors (please, don't you chose 0...)

Hierarchical Pie Chart