Basic perceptron demo in python