little code snippets from computational physics