Make all example code (in examples/*.py) and inline examples in the slides agnostic about python 2 vs 3.