<jupyter_start><jupyter_text>Part 1 / 2> Find a way to simulate lanternfish. How many lanternfish would there be after 80 / 256 days?<jupyter_code>def evolve(nums, cycles: int) -> int:        
    nums = dict(zip(list(nums.keys())[-1:]+list(nums.keys())[:-1], nums.update({7: nums[7]+nums[0]}) or nums.values()))
    return sum([v for i, v in nums.items()]) if cycles == 1 else evolve(nums, cycles - 1)

inp = dict(zip_longest(range(9), [], fillvalue=0)) | dict(zip(*np.unique([int(x) for x in inp_txt.split(",")], return_counts=True)))
print(f"After 80 days: {evolve(inp, 80)}\nAfter 256 days: {evolve(inp, 256)}")<jupyter_output>After 80 days: 359999
After 256 days: 1631647919273
{'fraction_non_alphanumeric': 0.18328445747800587, 'fraction_numerical': 0.07331378299120235, 'mean_word_length': 5.26605504587156, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '588066', 'license': 'MIT', 'n_tokens_mistral': 304, 'n_tokens_neox': 260, 'n_words': 68, 'path': 'day_06/task.ipynb', 'repo_name': 'codebude/aoc-2021', 'size': '682'}