<jupyter_start><jupyter_text>2021, Day 3: Binary Diagnostic<jupyter_code>from advent import get
from advent.y2021 import d3<jupyter_output><empty_output><jupyter_text>Tests<jupyter_code>d3.solve(get.sample(2021, 3))<jupyter_output><empty_output><jupyter_text>Solution<jupyter_code>d3.solve(get.input(2021, 3))<jupyter_output><empty_output><jupyter_text>Benchmarking<jupyter_code>%timeit -r 5 -n 1000 d3.solve(get.input(2021, 3))<jupyter_output>1.44 ms ± 34.8 µs per loop (mean ± std. dev. of 5 runs, 1,000 loops each)
{'fraction_non_alphanumeric': 0.13346228239845262, 'fraction_numerical': 0.0851063829787234, 'mean_word_length': 9.571428571428571, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '124263', 'license': 'MIT', 'n_tokens_mistral': 253, 'n_tokens_neox': 223, 'n_words': 36, 'path': 'main/2021/d3.ipynb', 'repo_name': 'ljk233/Advent.py', 'size': '517'}