Useful python code snippets.