A neural network from scratch in Python