cd91a294f32206728436890be3e697b6c1325841,datasketch/minhash.py,MinHash,__setstate__,#MinHash#Any#,128

Before Change


        return dict([x, getattr(self, x)] for x in self.__slots__)

    def __setstate__(self, d):
        for key in d:
            setattr(self, key, d[key])


def jaccard(mhs):
    """
    Compute Jaccard similarity measure for a list of MinHash objects.
    """

After Change


        Python pickle.loads function.
        """
        seed, num_perm = struct.unpack_from("qi", buffer, 0)
        self.__init__(num_perm=num_perm, seed=seed)
        offset = struct.calcsize("qi")
        for i in range(num_perm):
            self.hashvalues[i] = struct.unpack_from("I", buffer, offset)[0]
            offset += struct.calcsize("I")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: ekzhu/datasketch
Commit Name: cd91a294f32206728436890be3e697b6c1325841
Time: 2015-04-08
Author: erkangzhu@gmail.com
File Name: datasketch/minhash.py
Class Name: MinHash
Method Name: __setstate__


Project Name: matthewwithanm/django-imagekit
Commit Name: a9895f335a5323b4bee7d6cbcffffbe826645c03
Time: 2011-09-08
Author: matthew@exanimo.com
File Name: imagekit/models.py
Class Name: ImageModelBase
Method Name: __init__


Project Name: has2k1/plotnine
Commit Name: ef4c3489e675b89bea0a193347b8b848496c9551
Time: 2015-05-18
Author: has2k1@gmail.com
File Name: ggplot/guides/guides.py
Class Name: guides
Method Name: __init__