<commit_before>#!/usr/bin/python
# -*- coding: utf-8 -*-
import unicodecsv
import requests
from cStringIO import StringIO
#from builtins import str, unicode, open
url_alumni ="https://docs.google.com/spreadsheets/d/1UJ8eHwcBsdKRjwc6uu2KVhNIn_FSEpLMh6xqMNQ5sUY/pub?gid=2103651667&single=true&output=csv"
r = requests.get(url_alumni)
f = StringIO(r.text.encode('iso-8859-1'))
reader = unicodecsv.reader(f, encoding='iso-8859-1')
k = 0
for row in reader:
    if k > 0:     
        year=   str(row[5].encode('iso-8859-1'))
        date = "01-01-" + year
        name= str(row[1].encode('iso-8859-1'))
        surname= str(row[2].encode('iso-8859-1'))
        filename = date
        filename += "-" + surname.lower().replace(" ","_") +"-" + name.lower().replace(" ","_")+ ".md"  
        new_yaml = open(filename.lower().replace(" ","_"), 'w')
        yaml_text = ""
        yaml_text += "---\n"
        yaml_text += "layout: default \n"     
        yaml_text += "id: " + date + "-" + surname.replace(" ","_") + "-" + name.replace(" ","_") + "\n"
        name = str(row[1].encode('iso-8859-1'))
        surname =  str(row[2].encode('iso-8859-1'))
        yaml_text += "name: " + name  + "\n"
        yaml_text += "surname: " +  surname.replace("\n","") + "\n"
        yaml_text += "university: " + str(row[3].encode('iso-8859-1'))  + "\n"
        yaml_text += "advisor: "  + str(row[4].encode('iso-8859-1'))  + "\n"
        yaml_text += "year: " + str(row[5].encode('iso-8859-1'))  + "\n"
        yaml_text += "title: " + str(row[6].encode('iso-8859-1')).replace("\n","<br/>")  + "\n"
        new_yaml.write(yaml_text + "---\n")
        new_yaml.close()
    k += 1
      
      

     <commit_msg>replace : in the text field<commit_after>#!/usr/bin/python
# -*- coding: utf-8 -*-
import unicodecsv
import requests
from cStringIO import StringIO
#from builtins import str, unicode, open
url_alumni ="https://docs.google.com/spreadsheets/d/1UJ8eHwcBsdKRjwc6uu2KVhNIn_FSEpLMh6xqMNQ5sUY/pub?gid=2103651667&single=true&output=csv"
r = requests.get(url_alumni)
f = StringIO(r.text.encode('iso-8859-1'))
reader = unicodecsv.reader(f, encoding='iso-8859-1')
k = 0
for row in reader:
    if k > 0:     
        year=   str(row[5].encode('iso-8859-1'))
        date = "01-01-" + year
        name= str(row[1].encode('iso-8859-1'))
        surname= str(row[2].encode('iso-8859-1'))
        filename = date
        filename += "-" + surname.lower().replace(" ","_") +"-" + name.lower().replace(" ","_")+ ".md"  
        new_yaml = open(filename.lower().replace(" ","_"), 'w')
        yaml_text = ""
        yaml_text += "---\n"
        yaml_text += "layout: default \n"     
        yaml_text += "id: " + date + "-" + surname.replace(" ","_") + "-" + name.replace(" ","_") + "\n"
        name = str(row[1].encode('iso-8859-1'))
        surname =  str(row[2].encode('iso-8859-1'))
        yaml_text += "name: " + name  + "\n"
        yaml_text += "surname: " +  surname.replace("\n","") + "\n"
        yaml_text += "university: " + str(row[3].encode('iso-8859-1'))  + "\n"
        yaml_text += "advisor: "  + str(row[4].encode('iso-8859-1'))  + "\n"
        yaml_text += "year: " + str(row[5].encode('iso-8859-1'))  + "\n"
        yaml_text += "title: " + str(row[6].encode('iso-8859-1')).replace("\n","<br/>").replace(":", "&#58;")  + "\n"
        new_yaml.write(yaml_text + "---\n")
        new_yaml.close()
    k += 1
      
      

     
{'fraction_non_alphanumeric': 0.22621132516053707, 'fraction_numerical': 0.05195563339171045, 'mean_word_length': 2.6149789029535864, 'pattern_counts': {'":': 1, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '6159420', 'n_tokens_mistral': 1417, 'n_tokens_neox': 1282, 'n_words': 203}