translated ipynb to py

.py script uses itertools to produce all figs