some python snippets