Some handwritten machine learning algorithms