various python snippets for various tasks