Adding some (hopefully short enough) python snippets