Collection of useful python code