608fff2119f21191352ddf5d96eb82fc1ab099b0,dit/utils/misc.py,,partitions,#,370

Before Change


            parts[i&1].add(item)
            i >>= 1
        for b in partitions(parts[1]):
            yield (parts[0],) + b


def partitions(set_):
    

After Change


    if tuples:
        for partition in partitions1( seq ):
            // Convert the partition into a list of sorted tuples.
            partition = map(tuple, map(sorted, partition))

            // Convert the partition into a sorted tuple of sorted tuples.
            // Sort by smallest parts first, then lexicographically.
            partition = tuple(sorted(partition, cmp=len_cmp))

            yield partition

    else:
        for partition in partitions1( seq ):
            partition = frozenset( map(frozenset, partition) )
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: dit/dit
Commit Name: 608fff2119f21191352ddf5d96eb82fc1ab099b0
Time: 2013-02-25
Author: chebee7i@gmail.com
File Name: dit/utils/misc.py
Class Name:
Method Name: partitions


Project Name: khaotik/DaNet-Tensorflow
Commit Name: de00082780be884fc90e0113d323bfd63006ffba
Time: 2017-08-07
Author: junkkhaotik@gmail.com
File Name: app/datasets/wsj0.py
Class Name: Wsj0Dataset
Method Name: epoch


Project Name: grrrr/nsgt
Commit Name: 927093c2d7a51868ff4fdf53d453affa4b0f3fe0
Time: 2012-08-10
Author: gr@grrrr.org
File Name: nsgt/nsgtf.py
Class Name:
Method Name: nsgtf_sl