Would not it be great if most of the material could be written in jupyter notebook?
Well, now that's possible with the help of nbsphinx extension
In [4]:
%pylab inline
plt.style.use('ggplot')
a = rand(200)-0.5
plot(cumsum(a))
Out[4]:
In [ ]:
# hidden cell