<jupyter_start><jupyter_text>Part One<jupyter_code>for line in data[2:] :
    if line != '':
        z.append([int(i) for i in line.split()])
    else:
        boards.append(np.asarray(z))
        z = list()
        
boards.append(np.asarray(z))

for i in range(len(numbers)):
    for b in boards:
        b[b == numbers[i]] = -1 # mark found number
        if -5 in np.sum(b, axis=0): # column
            res = numbers[i] * sum(b[b > -1])
            break
        if -5 in np.sum(b, axis=1): # row
            res = numbers[i] * sum(b[b > -1])
            break
    else:
        continue
    break
    
res<jupyter_output><empty_output><jupyter_text>Part Two<jupyter_code>for line in data[2:] :
    if line != '':
        z.append([int(i) for i in line.split()])
    else:
        boards.append(np.asarray(z))
        z = list()
        
boards.append(np.asarray(z))

l = list()
for i in range(len(numbers)):
    for j in range(len(boards)):
        boards[j][boards[j] == numbers[i]] = -1 # mark found number
        if -5 in np.sum(boards[j], axis=0): # column
            if j not in l:
                l.append(j)
                if len(l) == len(boards):
                    res =  numbers[i] * sum(boards[j][boards[j] > -1])
                    break
        if -5 in np.sum(boards[j], axis=1): # row
            if j not in l:
                l.append(j)
                if len(l) == len(boards):
                    res =  numbers[i] * sum(boards[j][boards[j] > -1])
                    break
    else:
        continue
    break

res<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15038071065989847, 'fraction_numerical': 0.01015228426395939, 'mean_word_length': 1.6728813559322033, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, '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': '278082', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 558, 'n_tokens_neox': 545, 'n_words': 133, 'path': 'day04/sol04.ipynb', 'repo_name': 'MaxGreil/adventofcode2021', 'size': '1576'}