tweak python snippets