<jupyter_start><jupyter_text>Day 2<jupyter_code>myinput = '/home/fmuinos/projects/adventofcode/2015/ferran/inputs/input2.txt'<jupyter_output><empty_output><jupyter_text>Day 2.1<jupyter_code>with open(myinput, 'rt') as f:
    paper = 0
    for line in f:
        g = sorted([int(x) for x in line.rstrip().split('x')])
        paper += 3*g[0]*g[1] + 2*g[0]*g[2] + 2*g[1]*g[2]
    print(paper)<jupyter_output>1588178<jupyter_text>Day 2.2<jupyter_code>with open(myinput, 'rt') as f:
    paper = 0
    for line in f:
        g = sorted([int(x) for x in line.rstrip().split('x')])
        paper += 2*g[0] + 2*g[1] + g[0]*g[1]*g[2]
    print(paper)<jupyter_output>3783758
{'fraction_non_alphanumeric': 0.1897590361445783, 'fraction_numerical': 0.06325301204819277, 'mean_word_length': 4.155038759689923, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '371720', 'license': 'MIT', 'n_tokens_mistral': 321, 'n_tokens_neox': 297, 'n_words': 47, 'path': '2015/ferran/day2.ipynb', 'repo_name': 'bbglab/adventofcode', 'size': '664'}