Some Python snippets