<jupyter_start><jupyter_text>Part 1<jupyter_code>with open('input_day7.txt','r') as file:
    data = [int(x) for x in file.read().split(',')]

total_fuels=[]
for crab_alignment in data:
    total_fuel=0
    for crab in data:
        total_fuel+=abs(crab_alignment-crab)
    total_fuels.append(total_fuel)
min(total_fuels)<jupyter_output><empty_output><jupyter_text>Part 2<jupyter_code>total_fuels=[]
for crab_alignment in range(min(data),max(data)):
    total_fuel=0
    for crab in data:
        n=abs(crab_alignment-crab)
        total_fuel+=(n*(n+1))/2
            
    total_fuels.append(total_fuel)
int(min(total_fuels))<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.13740458015267176, 'fraction_numerical': 0.010687022900763359, 'mean_word_length': 4.8053097345132745, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '168801', 'license': 'MIT', 'n_tokens_mistral': 276, 'n_tokens_neox': 257, 'n_words': 38, 'path': '2021/paula/day7/advent_code_day7.ipynb', 'repo_name': 'bbglab/adventofcode', 'size': '655'}