Hopfield Neural Network Python Code