python snippets for purposes