Python snippets for working with sensors on Raspberry Pi