<commit_before>import random
import sys

sys.setrecursionlimit(20000000)


def bubblesort(vec):
    idx = 2
    swapped = False
    while (idx < len(vec)):
        if (vec[idx-1] > vec[idx]):
            vec[idx-1], vec[idx] = vec[idx], vec[idx-1]
            swapped = True
        idx += 1
    if swapped:
        bubblesort(vec)

if __name__ == '__main__':
    vec = []
    for x in range(1000000):
        vec.append(random.randint(0,x))
    
    bubblesort(vec)
    print vec

    
<commit_msg>Changed bubblesort logic to set the recursion limit to the size of the container<commit_after>import random
import sys

def bubblesort(vec):
    sys.setrecursionlimit(len(vec))
    idx = 2
    swapped = False
    while (idx < len(vec)):
        if (vec[idx-1] > vec[idx]):
            vec[idx-1], vec[idx] = vec[idx], vec[idx-1]
            swapped = True
        idx += 1
    if swapped:
        bubblesort(vec)

if __name__ == '__main__':
    vec = []
    for x in range(1000):
        vec.append(random.randint(0,x))
    
    bubblesort(vec)
    print vec

    

{'fraction_non_alphanumeric': 0.12406015037593984, 'fraction_numerical': 0.02913533834586466, 'mean_word_length': 2.188622754491018, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 1, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6469912', 'n_tokens_mistral': 396, 'n_tokens_neox': 370, 'n_words': 93}