<commit_before>import gspread
import os
import string


def new_token():
    gc = gspread.login(os.environ.get('GOOGLE_USER'),
                       os.environ.get('GOOGLE_PASS'))
    return gc


def write_cell(worksheetKey, row, col, value):
    gc = new_token()
    worksheet = gc.open_by_key(worksheetKey).get_worksheet(0)
    if(worksheet.acell(col + row).value is None):
        worksheet.update_acell(col + row, value)


def col2num(col):
    """
    Converts a spreadsheet column letter name to a column number

    Reference:<commit_msg>write_cell force row to be string<commit_after>import gspread
import os
import string


def new_token():
    gc = gspread.login(os.environ.get('GOOGLE_USER'),
                       os.environ.get('GOOGLE_PASS'))
    return gc


def write_cell(worksheetKey, row, col, value):
    gc = new_token()
    worksheet = gc.open_by_key(worksheetKey).get_worksheet(0)
    row = str(row)
    if(worksheet.acell(col + row).value is None):
        worksheet.update_acell(col + row, value)


def col2num(col):
    """
    Converts a spreadsheet column letter name to a column number

    Reference:
{'fraction_non_alphanumeric': 0.10698496905393456, 'fraction_numerical': 0.0035366931918656055, 'mean_word_length': 3.2397003745318353, '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': '7428241', 'n_tokens_mistral': 390, 'n_tokens_neox': 369, 'n_words': 90}