<commit_before># -*- coding: utf-8 -*-
# '''
# Author: <NAME>
# Date:  2017.9.27
# Goal: 文件管理
# Other:
# '''
import os

def zero_papernum():
    for i in range(1, 21):
        with open('data/'+str(i)+'/paper_num.txt','w') as write:
            write.write('0')
        print 'change'+ 'data/'+str(i)+'/paper_num.txt'+'to 0'

def delete_csv(file):
    for i in range(1, 21):
        try:
            os.remove('data/'+str(i)+'/'+file)
            print 'os delete'+'data/'+str(i)+'/'+file
        except:
            print 'can\'t find' + 'data/' + str(i) + '/' + file
            continue


def main():
    zero_papernum()
    delete_csv('paper_num')

if __name__ == '__main__':
    main()<commit_msg>add a log system to catch errors<commit_after># -*- coding: utf-8 -*-
# '''
# Author: <NAME>
# Date:  2017.9.27
# Goal: 文件管理
# Other:
# '''
import os

def zero_papernum():
    for i in range(1, 21):
        with open('data/'+str(i)+'/paper_num.txt','w') as write:
            write.write('0')
        print 'change' + 'data/'+str(i)+'/paper_num.txt'+'to 0'

def delete_csv(file):
    for i in range(1, 21):
        try:
            os.remove('data/'+str(i)+'/'+file)
            print 'os delete'+'data/'+str(i)+'/'+file
        except:
            print 'can\'t find' + 'data/' + str(i) + '/' + file
            continue


def main():
    zero_papernum()
    delete_csv('paper_num')

if __name__ == '__main__':
    main()
{'fraction_non_alphanumeric': 0.20646067415730338, 'fraction_numerical': 0.02247191011235955, 'mean_word_length': 2.313953488372093, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '785671', 'n_tokens_mistral': 562, 'n_tokens_neox': 523, 'n_words': 117}