139259ac8ac83160502cbb896371ce4fa4027361,primelib/primelib.py,,sieveEr,#,96

Before Change


                beginList[j] = 0

    // filters actual prime numbers.           
    ans = [x for x in beginList if x != 0]

    // precondition
    assert isinstance(ans, list), ""ans" must been from type list"

After Change



    primes = [True for x in xrange(N + 1)]

    for p in xrange(2, sqrt(N) + 1):
        if (primes[p]):
            for i in xrange(p*p, N + 1, p):
                primes[i] = False
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: geekcomputers/Python
Commit Name: 139259ac8ac83160502cbb896371ce4fa4027361
Time: 2019-10-10
Author: ml.smiley3@gmail.com
File Name: primelib/primelib.py
Class Name:
Method Name: sieveEr


Project Name: astroML/astroML
Commit Name: 4e70cb5fc9a9494e866ccd7d2e1a9046091b6337
Time: 2018-11-16
Author: bsipocz@gmail.com
File Name: astroML/density_estimation/gauss_mixture.py
Class Name: GaussianMixture1D
Method Name: __init__


Project Name: rasbt/mlxtend
Commit Name: e8297e554754dce9bee1b89b55564ed59a623f11
Time: 2016-04-26
Author: mail@sebastianraschka.com
File Name: mlxtend/cluster/kmeans.py
Class Name: Kmeans
Method Name: _get_cluster_idx