The linear perceptron is one of the most basic ideas in machine learning and can be used for classification of data points according to different features.
This IPython notebook includes an implementation of this algorithm.
It's fun and perfect for hacking around.
Reference : Learning From Data