Source code from the talk Python tips, tricks and dark magic @pybcn 2015/12/18