How to mask an image with a smooth circle in PyQt5

Masking a QPixmap with a smooth circle is not as easily done as one might wish. I’ll show you how to do it with the help of a QImage, a QPainter and a QBrush. I also take care of Retina displays.

Assertions and Exceptions

This article explains the difference between assertions and exceptions and when to use which one.

Advanced asyncio testing

I demonstrate how you can use pytest’s fixture system and the plug-in pytest-asyncio to reduce the boilerplate code required for testing networking libraries.

Testing (asyncio) coroutines with pytest

Pytest currently offers no helpers for testing (asyncio) coroutines. Its powerful plug-in architecture allows you fix that and write elegant tests for coroutines.

aiomas – A library for multi-agent systems and RPC based on asyncio

aiomas is a new, asyncio based library that helps you with creating distributed multi-agent systems. It allows different clocks (real-time, coupled to simulations, …) and different codecs (MsgPack, JSON) to be used. You can also just use the lower level abstractions for RPC or message based request-reply channels.

Master(ing) Passwords

Using good passwords is hard. You can’t remember complicated ones but you also don’t want store them in the cloud. Biometry is not a solution either. The master password algorithm comes to help. There are various implementations of it and I did one in Python.

page 1 of 10

older articles »