ruby and python snippets