Fixed examples and notebooks to be Python 2/3 compatible