Locality sensitive hashing in Python