<commit_before>#!/usr/bin/env python

from PIL import Image, ImageDraw, ImageFont

word_multipliers = {(0,3):3, (0,11):3, (1,5):2, (1,9):2, (3,0):3, (3,7):2, (3,14):3, (5,1):2, (5,13):2, (7,3):2, (7,11):2, (9,1):2, (9,13):2, (11,0):3, (11,7):2, (11,14):3, (13,5):2, (13,9):2, (14,3):3, (14,11):3}

letter_multipliers = {(0,6):3, (0,8):3, (1,2):2, (1,12):2, (2,1):2, (2,4):2, (2,10):2, (2,13):2, (3,3):3, (3,11):3, (4,2):2, (4,6):2, (4,8):2, (4,12):2, (5,5):3, (5,9):3, (6,0):3, (6,4):2, (6,10):2, (6,14):3, (8,0):3, (8,4):2, (8,10):2, (8,14):3, (9,5):3, (9,9):3, (10,2):2, (10,6):2, (10,8):2, (10,12):2, (11,3):3, (11,11):3, (12,4):2, (12,10):2, (13,2):2, (13,12):2, (14,6):3, (14,8):3}


def create_cell_dict(word_multipliers, letter__multipliers):
    '''returns 15 x 15 dict keyed to x,y with space for current char value, adjacent dict, word, and letter multipliers'''
    return_dict = {}
    null_current_letter_value = ""
    null_word_multiplier = 0
    null_letter_miultiplier = 0
    for x in range(15):
        for y in range(15):
            value_dict = {}
            value_dict['current_letter'] = null_current_letter_value
            value_dict['adjacent_dict'] = create_adjacent_dict(x,y)
            value_dict['word_multiplier'] = find_word_multiplier(x,y,word_multipliers)
            value_dict['letter_multiplier'] = find_letter_multiplier(x,y,letter__multipliers)
            return_dict[(x,y)] = value_dict
    return return_dict

def create_adjacent_dict(x,y):
    '''returns dict based on of perpendicular adjactents based'''
    result_dict = {}
    if x - 1 >= 0:
        result_dict['left'] = (True,(x - 1, y))
    else:
        result_dict['left'] = (False,(-1,-1))
    if x + 1 <= 14:
        result_dict['right'] = (True,(x + 1, y))
    else:
        result_dict['right'] = (False,(-1,-1))
    if y - 1 >= 0:
        result_dict['up'] = (True,(x, y - 1))
    else:
        result_dict['up'] = (False,(-1,-1))<commit_msg>restored the self referencing ~location~ key to cell_dict in added_routines the absence of which broke the solution process<commit_after>#!/usr/bin/env python

from PIL import Image, ImageDraw, ImageFont

word_multipliers = {(0,3):3, (0,11):3, (1,5):2, (1,9):2, (3,0):3, (3,7):2, (3,14):3, (5,1):2, (5,13):2, (7,3):2, (7,11):2, (9,1):2, (9,13):2, (11,0):3, (11,7):2, (11,14):3, (13,5):2, (13,9):2, (14,3):3, (14,11):3}

letter_multipliers = {(0,6):3, (0,8):3, (1,2):2, (1,12):2, (2,1):2, (2,4):2, (2,10):2, (2,13):2, (3,3):3, (3,11):3, (4,2):2, (4,6):2, (4,8):2, (4,12):2, (5,5):3, (5,9):3, (6,0):3, (6,4):2, (6,10):2, (6,14):3, (8,0):3, (8,4):2, (8,10):2, (8,14):3, (9,5):3, (9,9):3, (10,2):2, (10,6):2, (10,8):2, (10,12):2, (11,3):3, (11,11):3, (12,4):2, (12,10):2, (13,2):2, (13,12):2, (14,6):3, (14,8):3}


def create_cell_dict(word_multipliers, letter__multipliers):
    '''returns 15 x 15 dict keyed to x,y with space for current char value, adjacent dict, word, and letter multipliers'''
    return_dict = {}
    null_current_letter_value = ""
    null_word_multiplier = 0
    null_letter_miultiplier = 0
    for x in range(15):
        for y in range(15):
            value_dict = {}
            value_dict['location'] = (x,y)
            value_dict['current_letter'] = null_current_letter_value
            value_dict['adjacent_dict'] = create_adjacent_dict(x,y)
            value_dict['word_multiplier'] = find_word_multiplier(x,y,word_multipliers)
            value_dict['letter_multiplier'] = find_letter_multiplier(x,y,letter__multipliers)
            return_dict[(x,y)] = value_dict
    return return_dict

def create_adjacent_dict(x,y):
    '''returns dict based on of perpendicular adjactents based'''
    result_dict = {}
    if x - 1 >= 0:
        result_dict['left'] = (True,(x - 1, y))
    else:
        result_dict['left'] = (False,(-1,-1))
    if x + 1 <= 14:
        result_dict['right'] = (True,(x + 1, y))
    else:
        result_dict['right'] = (False,(-1,-1))
    if y - 1 >= 0:
        result_dict['up'] = (True,(x, y - 1))
    else:
        result_dict['up'] = (False,(-1,-1))
{'fraction_non_alphanumeric': 0.23651145602365115, 'fraction_numerical': 0.1177629958117763, 'mean_word_length': 3.8739495798319328, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '5798788', 'n_tokens_mistral': 1888, 'n_tokens_neox': 1781, 'n_words': 342}