Simple neural network implemented in Python