A collection of useful python code