A naive kmeans implementation in Python