This was written for my blog post Machine Learning for Beginners: An Introduction to Neural Networks.
Install numpy, the only dependency, if you need to:
$ pip install numpy
Then, run it with no arguments:
$ python network.py
You can also run this code in your browser.