Speeding Up Yaourt Package Installs

If you use the Yaourt package installer on Arch Linux, you’re probably aware of the long install times of certain large packages like android-ndk or chromium. The reason for this is the compression. The install process goes something like this: Download package Build package with makepkg Download sources Build package Compress package into a .pkg.tar.xz […]

Read More

Properly Defining SerializerMethodFields in DRF

I’m currently implementing a RESTful API with Django Rest Framework (a fantastic framework by the way). I’m mostly depending on the automatic serialization that a ModelSerializer provides. class ReportSerializer(serializers.ModelSerializer): class Meta: model = models.Report fields = (‘id’, ‘name’) But sometimes you need extra fields. In my case I wanted to add a readonly image_url field […]

Read More

Profiling Pytest Tests

If you want to run a profiler over your pytest cases (including underlying code), the easiest way is to run pytest directly using cPython: python -m cProfile -o profile $(which py.test) You can even pass in optional arguments: python -m cProfile -o profile $(which py.test) tests/worker/test_tasks.py -s campaigns This will create a binary file called […]

Read More

First Tests with the Micropython Board

Micropython Micropython (https://micropython.org/) is an implementation of the Python 3 language for microcontrollers. While this might sound like a stupid idea at first (why use a high level garbage collected language on low level hardware?), the creator Damien George has put a great amount of effort into this project. And it’s safe to say that […]

Read More

Scrolling Text with RPLCD

The RPLCD Library Last year when I started playing around with HD44780 based character LCDs on the Raspberry Pi, I did not find any software library for it that I liked. There were some C++ libraries around and also some Python scripts, but they were a bit messy and not as clean and consistent as […]

Read More

Down the Tweet Chain Rabbit Hole

Today I stumbled over an apparently interesting tweet by @aendu: Tweet of aendu/433586683615784960 The link in the tweet points to another tweet: Tweet of madmenna/433585834193715200 And, as you may have guessed, this link points to yet another tweet. After about 20 levels deep I stopped clicking on the links and wrote a Python script instead: […]

Read More