First commit of online kmeans algorithm