e1c4e6a7c7db68e123d978bfc56feb057898935f,Counting-sort.py,,counting_sort,#,8

Before Change


    count_list = [0]*(k)

    // iterate the tgt_list to put into count list
    for n in tlist:
        count_list[get_sortkey(n)] = count_list[get_sortkey(n)] + 1  
        
    // Modify count list such that each index of count list is the combined sum of the previous counts 
    // each index indicate the actual position (or sequence) in the output sequence.
    for i in range(k):
        if i ==0:
            count_list[i] = count_list[i]
        else:

After Change


    count_list = [0]*(k+1)

    // iterate the tgt_list to put into count list
    for i in range(0,n):
        count_list[tlist[i]] += 1  
        
    // Modify count list such that each index of count list is the combined sum of the previous counts 
    // each index indicate the actual position (or sequence) in the output sequence.
    for i in range(1,k+1):
        count_list[i] = count_list[i] + count_list[i-1]
 
    flist = [0]*(n)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 11

Instances


Project Name: geekcomputers/Python
Commit Name: e1c4e6a7c7db68e123d978bfc56feb057898935f
Time: 2019-10-24
Author: kostasdedesar@penguin
File Name: Counting-sort.py
Class Name:
Method Name: counting_sort


Project Name: lingpy/lingpy
Commit Name: a84938a83a0bc2bfc9fb6e377424d1547be0a054
Time: 2013-04-20
Author: bambooforest@gmail.com
File Name: lingpy/basic/spreadsheet.py
Class Name: Spreadsheet
Method Name: output


Project Name: geekcomputers/Python
Commit Name: e1c4e6a7c7db68e123d978bfc56feb057898935f
Time: 2019-10-24
Author: kostasdedesar@penguin
File Name: Counting-sort.py
Class Name:
Method Name: counting_sort


Project Name: eriklindernoren/PyTorch-GAN
Commit Name: 3311e8b916b1ca8dd7edf4962bcf749234b7eb4f
Time: 2018-05-03
Author: eriklindernoren@gmail.com
File Name: implementations/stargan/stargan.py
Class Name:
Method Name: sample_images