John's Clustering Python Code 2SLAQ