<commit_before>import csv
import os

home_dir = os.path.expanduser('~')
path = os.path.join(home_dir,'ids.txt')

def add_id(id):
    ids = get_ids()
    found = False
    for idz in ids :
        if(idz == ([str(id)]) ):
            found = True
            break
    if not found:
        file = open(path,"a")
        writer = csv.writer(file)
        writer.writerow([id])
        file.close()

def get_ids():
    file = open(path,"r")
    reader = csv.reader(file)
    data = []
    for row in reader :
        data.append(row)
    file.close()
    return data

def remove_id(del_id):
    ids = get_ids()
    file = open(path ,"w")
    writer = csv.writer(file)
    for id in ids:
        if(id != [str(del_id)]):
            writer.writerow(id)<commit_msg>Ora get_ids() restituisce una lista di interi come da specifica<commit_after>import csv
import os

home_dir = os.path.expanduser('~')
path = os.path.join(home_dir,'ids.txt')

def add_id(id):
    ids = get_ids()
    found = False
    for idz in ids :
        if(idz == id ):
            found = True
            break
    if not found:
        file = open(path,"a")
        writer = csv.writer(file)
        writer.writerow([id])
        file.close()

def get_ids():
    file = open(path,"r")
    reader = csv.reader(file)
    data = []
    for row in reader :
        data.append(int(row[0]))
    file.close()
    return data

def remove_id(del_id):
    ids = get_ids()
    file = open(path ,"w")
    writer = csv.writer(file)
    for id in ids:
        if(id != del_id):
            writer.writerow([id])
{'fraction_non_alphanumeric': 0.140485312899106, 'fraction_numerical': 0.0006385696040868455, 'mean_word_length': 2.1215139442231075, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, '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': '3348283', 'n_tokens_mistral': 552, 'n_tokens_neox': 541, 'n_words': 134}