Fix style and assorted issues in samples/resources.py

Signed-off-by: Don Naegely <naegelyd@gmail.com>