a python-only (good for google app engine) implementation of the k-means clustering algorithm