Did I find the right examples for you? yes no

All Samples(5)  |  Call(3)  |  Derive(0)  |  Import(2)

src/s/t/streaming_lsh-HEAD/streaming_lsh/streaming_lsh_clustering.py   streaming_lsh(Download)
@author: kykamath
'''
from classes import RandomGaussianUnitVector, VectorPermutation,\
    SignaturePermutationWithTrie, Cluster, UtilityMethods,\
    SignaturePermutationWithSortedList
    def getClusterAndUpdateExistingClusters(self, document):
        predictedCluster = self.getClusterForDocument(document)
        if predictedCluster!=None: self.clusters[predictedCluster].addDocument(document)
        else:
            newCluster = Cluster(document)

src/s/t/streaming_lsh-HEAD/streaming_lsh/tests/classes_tests.py   streaming_lsh(Download)
from Bio import trie
from library.classes import TwoWayMap
from classes import Signature, SignaturePermutationWithTrie, SignatureTrie, Document,\
    RandomGaussianUnitVector, Permutation, VectorPermutation, Cluster,\
    UtilityMethods
    def setUp(self): 
        Cluster.clusterIdCounter = 0
        self.docx = Document(1, {1:2,2:4})
        self.docy = Document(2, {2:4})
        self.cluster1 = Cluster(self.docx)
        self.cluster2 = Cluster(self.docy)