kmeans opt code commit