Various snippets of useful Python I've written here and there