Compare commits

..

479 commits

Author SHA1 Message Date
43650ade44 nix: migrate to 'ruff' formatting
Having just the one tool is better.

Incidentally, this fixes the ternary formatting, which was messed up in
recent `black` versions.
2024-11-23 18:50:16 +00:00
94befa4d1b nix: bump flake inputs 2024-11-23 18:50:16 +00:00
601b40e7d4 2023: d25: ex2: add solution 2024-11-23 18:50:16 +00:00
c02a05a0ff 2023: d25: ex2: add input 2024-11-23 18:50:16 +00:00
fb13cf95c3 2023: d25: ex1: add solution 2024-11-23 18:50:16 +00:00
8424bbb2bb 2023: d25: ex1: add input 2024-11-23 18:50:16 +00:00
ee84fa576d 2023: d24: ex2: add solution 2024-11-23 18:50:16 +00:00
df75f1c5d2 2023: d24: ex2: add input 2024-11-23 18:50:16 +00:00
5ebf620992 2023: d24: ex1: add solution 2024-11-23 18:50:16 +00:00
fa6c3351b0 2023: d24: ex1: add input 2024-11-23 18:50:16 +00:00
7b0a967765 2023: d23: ex2: add solution 2024-11-23 18:50:16 +00:00
1a6bc7c2c7 2023: d23: ex2: add input 2024-11-23 18:50:16 +00:00
314e894367 2023: d23: ex1: add solution 2024-11-23 18:50:16 +00:00
f07d58e9f2 2023: d23: ex1: add input 2024-11-23 18:50:16 +00:00
a1c64e606e 2023: d22: ex2: add solution 2024-11-23 18:50:16 +00:00
789b19ad0c 2023: d22: ex2: add input 2024-11-23 18:50:16 +00:00
fa9ba51cd4 2023: d22: ex1: add solution 2024-11-23 18:50:16 +00:00
27e5a815ba 2023: d22: ex1: add input 2024-11-23 18:50:16 +00:00
23fb211e92 2023: d21: ex2: add solution 2024-11-23 18:50:16 +00:00
0605f5e47f 2023: d21: ex2: add input 2024-11-23 18:50:16 +00:00
bd30ae97ed 2023: d21: ex1: add solution 2024-11-23 18:50:16 +00:00
ba345ca59d 2023: d21: ex1: add input 2024-11-23 18:50:16 +00:00
e4c930c2fa 2023: d20: ex2: add solution 2024-11-23 18:50:16 +00:00
8e31abf2b2 2023: d20: ex2: add input 2024-11-23 18:50:16 +00:00
4ccebd33ab 2023: d20: ex1: add solution 2024-11-23 18:50:16 +00:00
5a11d5ca5c 2023: d20: ex1: add input 2024-11-23 18:50:16 +00:00
49dc83b67f 2023: d19: ex2: add solution 2024-11-23 18:50:16 +00:00
03f8a5567b 2023: d19: ex2: add input 2024-11-23 18:50:16 +00:00
b1bfdee330 2023: d19: ex1: add solution 2024-11-23 18:50:16 +00:00
aedb2c4c14 2023: d19: ex1: add input 2024-11-23 18:50:16 +00:00
d4aa8d246f 2023: d18: ex2: add solution 2024-11-23 18:50:16 +00:00
b806f8dc39 2023: d18: ex2: add input 2024-11-23 18:50:16 +00:00
ce0bfe769f 2023: d18: ex1: add solution 2024-11-23 18:50:16 +00:00
bfe11a50f7 2023: d18: ex1: add input 2024-11-23 18:50:16 +00:00
7bbf3d0261 2023: d17: ex2: add solution 2024-11-23 18:50:16 +00:00
faf382cb44 2023: d17: ex2: add input 2024-11-23 18:50:16 +00:00
0e237d6752 2023: d17: ex1: add solution 2024-11-23 18:50:16 +00:00
1adbc956ac 2023: d17: ex1: add input 2024-11-23 18:50:16 +00:00
2869e96841 2023: d16: ex2: add solution 2024-11-23 18:50:16 +00:00
d5bf9f3c9f 2023: d16: ex2: add input 2024-11-23 18:50:16 +00:00
36f84c4324 2023: d16: ex1: add solution 2024-11-23 18:50:16 +00:00
6c0e372228 2023: d16: ex1: add input 2024-11-23 18:50:16 +00:00
d35af3ede7 2023: d15: ex2: add solution 2024-11-23 18:50:16 +00:00
e253096a7e 2023: d15: ex2: add input 2024-11-23 18:50:16 +00:00
9407e73b44 2023: d15: ex1: add solution 2024-11-23 18:50:16 +00:00
f1c8a7693b 2023: d15: ex1: add input 2024-11-23 18:50:16 +00:00
26d37fbe0e 2023: d14: ex2: add solution 2024-11-23 18:50:16 +00:00
d39bc20a21 2023: d14: ex2: add input 2024-11-23 18:50:16 +00:00
c0c824513e 2023: d14: ex1: add solution 2024-11-23 18:50:16 +00:00
58eaa4ea5d 2023: d14: ex1: add input 2024-11-23 18:50:16 +00:00
e7892e9014 2023: d13: ex2: add solution 2024-11-23 18:50:16 +00:00
6a3c87ef2e 2023: d13: ex2: add input 2024-11-23 18:50:16 +00:00
48175ec659 2023: d13: ex1: add solution 2024-11-23 18:50:16 +00:00
7349222bee 2023: d13: ex1: add input 2024-11-23 18:50:16 +00:00
28faa62410 2023: d12: ex2: add solution 2024-11-23 18:50:16 +00:00
fa6fcf635b 2023: d12: ex2: add input 2024-11-23 18:50:16 +00:00
1ac549afe3 2023: d12: ex1: add solution 2024-11-23 18:50:16 +00:00
65cc5b2e7c 2023: d12: ex1: add input 2024-11-23 18:50:16 +00:00
30d45a6021 2023: d11: ex2: add solution 2024-11-23 18:50:16 +00:00
73884e9936 2023: d11: ex2: add input 2024-11-23 18:50:16 +00:00
396aaf22ac 2023: d11: ex1: add solution 2024-11-23 18:50:16 +00:00
9168b6850d 2023: d11: ex1: add input 2024-11-23 18:50:16 +00:00
d471d8f643 2023: d10: ex2: add solution 2024-11-23 18:50:16 +00:00
4309339016 2023: d10: ex2: add input 2024-11-23 18:50:16 +00:00
151630332e 2023: d10: ex1: add solution 2024-11-23 18:50:16 +00:00
974524b1f1 2023: d10: ex1: add input 2024-11-23 18:50:16 +00:00
bc41afab0f 2023: d09: ex2: add solution 2024-11-23 18:50:16 +00:00
7c7df880ed 2023: d09: ex2: add input 2024-11-23 18:50:16 +00:00
ffd47cdea7 2023: d09: ex1: add solution 2024-11-23 18:50:16 +00:00
7c29d7d889 2023: d09: ex1: add input 2024-11-23 18:50:16 +00:00
01ecc496a5 2023: d08: ex2: add solution 2024-11-23 18:50:16 +00:00
9fa50a7aad 2023: d08: ex2: add input 2024-11-23 18:50:16 +00:00
140cf8549d 2023: d08: ex1: add solution 2024-11-23 18:50:16 +00:00
59e2d4abcf 2023: d08: ex1: add input 2024-11-23 18:50:16 +00:00
d4078c91bf 2023: d07: ex2: add solution 2024-11-23 18:50:16 +00:00
9b4506da33 2023: d07: ex2: add input 2024-11-23 18:50:16 +00:00
bb9dff359d 2023: d07: ex1: add solution 2024-11-23 18:50:16 +00:00
6917623406 2023: d07: ex1: add input 2024-11-23 18:50:16 +00:00
6b8dbbd938 2023: d06: ex2: add solution 2024-11-23 18:50:16 +00:00
10fb8ca2d1 2023: d06: ex2: add input 2024-11-23 18:50:16 +00:00
1081a4fc8d 2023: d06: ex1: add solution 2024-11-23 18:50:16 +00:00
60da30ee6c 2023: d06: ex1: add input 2024-11-23 18:50:16 +00:00
7d4377d6a2 2023: d05: ex2: add solution 2024-11-23 18:50:16 +00:00
ffb2c5346b 2023: d05: ex2: add input 2024-11-23 18:50:16 +00:00
052d0116fd 2023: d05: ex1: add solution 2024-11-23 18:50:16 +00:00
2583ad84d6 2023: d05: ex1: add input 2024-11-23 18:50:16 +00:00
018cc4a904 2023: d04: ex2: add solution 2024-11-23 18:50:16 +00:00
8292a5f323 2023: d04: ex2: add input 2024-11-23 18:50:16 +00:00
d84554d965 2023: d04: ex1: add solution 2024-11-23 18:50:16 +00:00
1490fe1309 2023: d04: ex1: add input 2024-11-23 18:50:16 +00:00
20d7292d10 2023: d03: ex2: add solution 2024-11-23 18:50:16 +00:00
146529433c 2023: d03: ex2: add input 2024-11-23 18:50:16 +00:00
c2167dbfc9 2023: d03: ex1: add solution 2024-11-23 18:50:16 +00:00
05f80dc3de 2023: d03: ex1: add input 2024-11-23 18:50:16 +00:00
3aa39588ed 2023: d02: ex2: add solution 2024-11-23 18:50:16 +00:00
6ebbcdeb11 2023: d02: ex2: add input 2024-11-23 18:50:16 +00:00
355b4f457b 2023: d02: ex1: add solution 2024-11-23 18:50:16 +00:00
7a7691c891 2023: d02: ex1: add input 2024-11-23 18:50:16 +00:00
5b94cedebc 2023: d01: ex2: add solution 2024-11-23 18:50:16 +00:00
d0c97d8793 2023: d01: ex2: add input 2024-11-23 18:50:16 +00:00
771b7f7d25 2023: d01: ex1: add solution 2024-11-23 18:50:16 +00:00
8d8f2b1fb1 2023: d01: ex1: add input 2024-11-23 18:50:16 +00:00
85d39b0f8a nix: bump flake inputs 2024-11-23 18:50:16 +00:00
d392ae4f4a nix: use 'main' branch for 'flake-utils' 2024-11-23 18:50:16 +00:00
9a3109466b 2022: d25: ex2: add solution 2024-11-23 18:50:16 +00:00
a843028f15 2022: d25: ex2: add input 2024-11-23 18:50:16 +00:00
bc91ad5dad 2022: d25: ex1: add solution 2024-11-23 18:50:16 +00:00
d20e79e2b0 2022: d25: ex1: add input 2024-11-23 18:50:16 +00:00
5254f96e15 2022: d24: ex2: add solution 2024-11-23 18:50:16 +00:00
83bbd2c36c 2022: d24: ex2: add input 2024-11-23 18:50:16 +00:00
3389478097 2022: d24: ex1: add solution 2024-11-23 18:50:16 +00:00
0f1454045d 2022: d24: ex1: add input 2024-11-23 18:50:16 +00:00
aa26b73644 2022: d23: ex2: add solution 2024-11-23 18:50:16 +00:00
384d9dcd50 2022: d23: ex2: add input 2024-11-23 18:50:16 +00:00
e796cc3342 2022: d23: ex1: add solution 2024-11-23 18:50:16 +00:00
0bed52bf64 2022: d23: ex1: add input 2024-11-23 18:50:16 +00:00
23a88b18af 2022: d22: ex2: add solution 2024-11-23 18:50:16 +00:00
bf7ed284c9 2022: d22: ex2: add input 2024-11-23 18:50:16 +00:00
15a33215f3 2022: d22: ex1: add solution 2024-11-23 18:50:16 +00:00
17f2ffb0ef 2022: d22: ex1: add input 2024-11-23 18:50:16 +00:00
786f88c001 2022: d21: ex2: add solution 2024-11-23 18:50:16 +00:00
6055c7ac23 2022: d21: ex2: add input 2024-11-23 18:50:16 +00:00
c3a9572407 2022: d21: ex1: add solution 2024-11-23 18:50:16 +00:00
c7f7e2a590 2022: d21: ex1: add input 2024-11-23 18:50:16 +00:00
8d2b7be327 2022: d20: ex2: add solution 2024-11-23 18:50:16 +00:00
815b5a028f 2022: d20: ex2: add input 2024-11-23 18:50:16 +00:00
2c0fbf53c3 2022: d20: ex1: add solution 2024-11-23 18:50:16 +00:00
c7ffb3be10 2022: d20: ex1: add input 2024-11-23 18:50:16 +00:00
5cd4f7dfd7 2022: d19: ex2: add solution 2024-11-23 18:50:16 +00:00
97222c32ab 2022: d19: ex2: add input 2024-11-23 18:50:16 +00:00
b1ef193da9 2022: d19: ex1: add solution 2024-11-23 18:50:16 +00:00
d8b22599cf 2022: d19: ex1: add input 2024-11-23 18:50:16 +00:00
43d4b031f5 2022: d18: ex2: add solution 2024-11-23 18:50:16 +00:00
5fc8c07cfd 2022: d18: ex2: add input 2024-11-23 18:50:16 +00:00
eb007342f2 2022: d18: ex1: add solution 2024-11-23 18:50:16 +00:00
ca6a3885b0 2022: d18: ex1: add input 2024-11-23 18:50:16 +00:00
d2aad80116 2022: d17: ex2: add solution 2024-11-23 18:50:16 +00:00
d2fd3abe24 2022: d17: ex2: add input 2024-11-23 18:50:16 +00:00
4b7ee749a0 2022: d17: ex1: add solution 2024-11-23 18:50:16 +00:00
cc4910cca9 2022: d17: ex1: add input 2024-11-23 18:50:16 +00:00
10d563b357 2022: d16: ex2: add solution 2024-11-23 18:50:16 +00:00
7f36b288e3 2022: d16: ex2: add input 2024-11-23 18:50:16 +00:00
22b823e283 2022: d16: ex1: add solution 2024-11-23 18:50:16 +00:00
9b7ecb60a8 2022: d16: ex1: add input 2024-11-23 18:50:16 +00:00
9c35ca0630 2022: d15: ex2: add solution 2024-11-23 18:50:16 +00:00
18f87be63c 2022: d15: ex2: add input 2024-11-23 18:50:16 +00:00
58f530c3d1 2022: d15: ex1: add solution 2024-11-23 18:50:16 +00:00
a996fee1d7 2022: d15: ex1: add input 2024-11-23 18:50:16 +00:00
336a67a2ca 2022: d14: ex2: add solution 2024-11-23 18:50:16 +00:00
7b56fdd706 2022: d14: ex2: add input 2024-11-23 18:50:16 +00:00
ff1de34ee5 2022: d14: ex1: add solution 2024-11-23 18:50:16 +00:00
8db6023086 2022: d14: ex1: add input 2024-11-23 18:50:16 +00:00
1551c5ad8e 2022: d13: ex2: add solution 2024-11-23 18:50:16 +00:00
0cf1acfecf 2022: d13: ex2: add input 2024-11-23 18:50:16 +00:00
529a66e33b 2022: d13: ex1: add solution 2024-11-23 18:50:16 +00:00
aba5dfc57b 2022: d13: ex1: add input 2024-11-23 18:50:16 +00:00
51527eee9d 2022: d12: ex2: add solution 2024-11-23 18:50:16 +00:00
532fb31b03 2022: d12: ex2: add input 2024-11-23 18:50:16 +00:00
258472ef6a 2022: d12: ex1: add solution 2024-11-23 18:50:16 +00:00
50dd65e63b 2022: d12: ex1: add input 2024-11-23 18:50:16 +00:00
004a632125 2022: d11: ex2: add solution 2024-11-23 18:50:16 +00:00
a3951a5a47 2022: d11: ex2: add input 2024-11-23 18:50:16 +00:00
cd577dc37d 2022: d11: ex1: add solution 2024-11-23 18:50:16 +00:00
354d6087a6 2022: d11: ex1: add input 2024-11-23 18:50:16 +00:00
c01254a5ca 2022: d10: ex2: add solution 2024-11-23 18:50:16 +00:00
96b1ebeb61 2022: d10: ex2: add input 2024-11-23 18:50:16 +00:00
9285442688 2022: d10: ex1: add solution 2024-11-23 18:50:16 +00:00
340b0b4c67 2022: d10: ex1: add input 2024-11-23 18:50:16 +00:00
420d37b25f 2022: d09: ex2: add solution 2024-11-23 18:50:16 +00:00
d1037cd7e5 2022: d09: ex2: add input 2024-11-23 18:50:16 +00:00
48b9633dfb 2022: d09: ex1: add solution 2024-11-23 18:50:16 +00:00
9bbb3e0066 2022: d09: ex1: add input 2024-11-23 18:50:16 +00:00
7d160342d9 2022: d08: ex2: add solution 2024-11-23 18:50:16 +00:00
6deca8b1d3 2022: d08: ex2: add input 2024-11-23 18:50:16 +00:00
d793a7441c 2022: d08: ex1: add solution 2024-11-23 18:50:16 +00:00
e75cb939d7 2022: d08: ex1: add input 2024-11-23 18:50:16 +00:00
7dbf22de6b 2022: d07: ex2: add solution 2024-11-23 18:50:16 +00:00
8d8feac390 2022: d07: ex2: add input 2024-11-23 18:50:16 +00:00
35fad0bd82 2022: d07: ex1: add solution 2024-11-23 18:50:16 +00:00
e995443027 2022: d07: ex1: add input 2024-11-23 18:50:16 +00:00
4c09d5caa5 2022: d06: ex2: add solution 2024-11-23 18:50:16 +00:00
73ea22bb58 2022: d06: ex2: add input 2024-11-23 18:50:16 +00:00
aba16a2556 2022: d06: ex1: add solution 2024-11-23 18:50:16 +00:00
6dc7baa4a8 2022: d06: ex1: add input 2024-11-23 18:50:16 +00:00
2ea00cec0a 2022: d05: ex2: add solution 2024-11-23 18:50:16 +00:00
50dfee46e6 2022: d05: ex2: add input 2024-11-23 18:50:16 +00:00
624ccdd863 2022: d05: ex1: add solution 2024-11-23 18:50:16 +00:00
157522996f 2022: d05: ex1: add input 2024-11-23 18:50:16 +00:00
64a9d16216 2022: d04: ex2: add solution 2024-11-23 18:50:16 +00:00
affe5cd89b 2022: d04: ex2: add input 2024-11-23 18:50:16 +00:00
742de9ade3 2022: d04: ex1: add solution 2024-11-23 18:50:16 +00:00
197c7060db 2022: d04: ex1: add input 2024-11-23 18:50:16 +00:00
30ff9c5266 2022: d03: ex2: add solution 2024-11-23 18:50:16 +00:00
edeae4d9f4 2022: d03: ex2: add input 2024-11-23 18:50:16 +00:00
ef2a4c0700 2022: d03: ex1: add solution 2024-11-23 18:50:16 +00:00
6c496ec591 2022: d03: ex1: add input 2024-11-23 18:50:16 +00:00
b79109ed37 2022: d02: ex2: add solution 2024-11-23 18:50:16 +00:00
439a4362d1 2022: d02: ex2: add input 2024-11-23 18:50:16 +00:00
ed2497a67c 2022: d02: ex1: add solution 2024-11-23 18:50:16 +00:00
0df109da5b 2022: d02: ex1: add input 2024-11-23 18:50:16 +00:00
06fee9ad24 2022: d01: ex2: add solution 2024-11-23 18:50:16 +00:00
80ee0fddb5 2022: d01: ex2: add input 2024-11-23 18:50:16 +00:00
7054b00043 2022: d01: ex1: add solution 2024-11-23 18:50:16 +00:00
99d677590f 2022: d01: ex1: add input 2024-11-23 18:50:16 +00:00
a9e68c07d6 nix: use 'nixpkgs-unstable' 2024-11-23 18:50:16 +00:00
c5861c0b22 nix: bump flake inputs 2024-11-23 18:50:16 +00:00
4efa9d74e3 nix: fix 'pyright' 2024-11-23 18:50:16 +00:00
f65d22ece5 2021: d25: ex2: add solution 2024-11-23 18:50:16 +00:00
2fa3ffadeb 2021: d25: ex2: add input 2024-11-23 18:50:16 +00:00
afb38fba2c 2021: d25: ex1: add solution 2024-11-23 18:50:16 +00:00
4447a4da44 2021: d25: ex1: add input 2024-11-23 18:50:16 +00:00
18d91fee78 2021: d24: ex2: add solution 2024-11-23 18:50:16 +00:00
f4cd01f6a0 2021: d24: ex2: add input 2024-11-23 18:50:16 +00:00
ed49448d04 2021: d24: ex1: add solution 2024-11-23 18:50:16 +00:00
4a691b8dd2 2021: d24: ex1: add input 2024-11-23 18:50:16 +00:00
0d3efefaa5 nix: add z3 to python environment 2024-11-23 18:50:16 +00:00
f42b43d8bc nix: use proper python environment 2024-11-23 18:50:16 +00:00
637c597525 2021: d23: ex2: add solution 2024-11-23 18:50:16 +00:00
d04c77d40c 2021: d23: ex2: add input 2024-11-23 18:50:16 +00:00
42979f727b 2021: d23: ex1: add solution 2024-11-23 18:50:16 +00:00
0daf3f7e03 2021: d23: ex1: add input 2024-11-23 18:50:16 +00:00
14cfc776b7 2021: d22: ex2: add solution 2024-11-23 18:50:16 +00:00
17f903385c 2021: d22: ex2: add input 2024-11-23 18:50:16 +00:00
ce432cf461 2021: d22: ex1: add solution 2024-11-23 18:50:16 +00:00
2dfd17a6de 2021: d22: ex1: add input 2024-11-23 18:50:16 +00:00
0e47d63758 2021: d21: ex2: add solution 2024-11-23 18:50:16 +00:00
2975f1f898 2021: d21: ex2: add input 2024-11-23 18:50:16 +00:00
ead3395a83 2021: d21: ex1: add solution 2024-11-23 18:50:16 +00:00
d4d6bbe742 2021: d21: ex1: add input 2024-11-23 18:50:16 +00:00
da979f53d0 2021: d20: ex2: add solution 2024-11-23 18:50:16 +00:00
52da7aafe9 2021: d20: ex2: add input 2024-11-23 18:50:16 +00:00
62f0a786c2 2021: d20: ex1: add solution 2024-11-23 18:50:16 +00:00
7a502bdc9c 2021: d20: ex1: add input 2024-11-23 18:50:16 +00:00
a83f108eeb 2021: d19: ex2: add solution 2024-11-23 18:50:16 +00:00
ab3bbd0005 2021: d19: ex2: add input 2024-11-23 18:50:16 +00:00
da2a08ffbe 2021: d19: ex1: add solution 2024-11-23 18:50:16 +00:00
45d5954659 2021: d19: ex1: add input 2024-11-23 18:50:16 +00:00
a33665b459 2021: d18: ex2: add solution 2024-11-23 18:50:16 +00:00
61d721c57e 2021: d18: ex2: add input 2024-11-23 18:50:16 +00:00
950af51d0d 2021: d18: ex1: add solution 2024-11-23 18:50:16 +00:00
4f5357a388 2021: d18: ex1: add input 2024-11-23 18:50:16 +00:00
a34dccc5d6 2021: d17: ex2: add solution 2024-11-23 18:50:16 +00:00
15d5b0ddad 2021: d17: ex2: add input 2024-11-23 18:50:16 +00:00
54c92ff0fe 2021: d17: ex1: add solution 2024-11-23 18:50:16 +00:00
0889e490ee 2021: d17: ex1: add input 2024-11-23 18:50:16 +00:00
9403676d36 2021: d16: ex2: add solution 2024-11-23 18:50:16 +00:00
6aaefd6d6f 2021: d16: ex2: add input 2024-11-23 18:50:16 +00:00
e4e9042c0f 2021: d16: ex1: add solution 2024-11-23 18:50:16 +00:00
918aa91aba 2021: d16: ex1: add input 2024-11-23 18:50:16 +00:00
fcce87c199 2021: d15: ex2: add solution 2024-11-23 18:50:16 +00:00
8c09efb227 2021: d15: ex2: add input 2024-11-23 18:50:16 +00:00
a4b81dac45 2021: d15: ex1: add solution 2024-11-23 18:50:16 +00:00
7c0034e8af 2021: d15: ex1: add input 2024-11-23 18:50:16 +00:00
2730bcf359 2021: d14: ex2: add solution 2024-11-23 18:50:16 +00:00
1ed52f1113 2021: d14: ex2: add input 2024-11-23 18:50:16 +00:00
5ad6df511b 2021: d14: ex1: add solution 2024-11-23 18:50:16 +00:00
df55bc9993 2021: d14: ex1: add input 2024-11-23 18:50:16 +00:00
006e9e3ac6 nix: add tools to devShell 2024-11-23 18:50:16 +00:00
39c5d2e59a 2019: d07: ex1: quieten Mypy 2024-11-23 18:50:16 +00:00
0532cbeac3 2021: d13: ex2: add solution 2024-11-23 18:50:16 +00:00
07d150e796 2021: d13: ex2: add input 2024-11-23 18:50:16 +00:00
b9860d1f32 2021: d13: ex1: add solution 2024-11-23 18:50:16 +00:00
f314b9d753 2021: d13: ex1: add input 2024-11-23 18:50:16 +00:00
9f4688d8c0 2021: d12: ex2: add solution 2024-11-23 18:50:16 +00:00
bf519c8eab 2021: d12: ex2: add input 2024-11-23 18:50:16 +00:00
d4907958ac 2021: d12: ex1: add solution 2024-11-23 18:50:16 +00:00
53489b62d6 2021: d12: ex1: add input 2024-11-23 18:50:16 +00:00
00e984420c 2021: d11: ex2: add solution 2024-11-23 18:50:16 +00:00
4e7552b34e 2021: d11: ex2: add input 2024-11-23 18:50:16 +00:00
c2cb30c7df 2021: d11: ex1: add solution 2024-11-23 18:50:16 +00:00
60f8aca9dd 2021: d11: ex1: add input 2024-11-23 18:50:16 +00:00
bf6881bacb 2021: d10: ex2: add solution 2024-11-23 18:50:16 +00:00
85630222fc 2021: d10: ex2: add input 2024-11-23 18:50:16 +00:00
295309a0f7 2021: d10: ex1: add solution 2024-11-23 18:50:16 +00:00
43621f22b2 2021: d10: ex1: add input 2024-11-23 18:50:16 +00:00
75a9a4710c 2021: d09: ex2: add solution 2024-11-23 18:50:16 +00:00
d06866158f 2021: d09: ex2: add input 2024-11-23 18:50:16 +00:00
137a98e936 2021: d09: ex1: add solution 2024-11-23 18:50:16 +00:00
20f7e96cc5 2021: d09: ex1: add input 2024-11-23 18:50:16 +00:00
b5824be5ba 2021: d08: ex2: add solution 2024-11-23 18:50:16 +00:00
7c89ca9499 2021: d08: ex2: add input 2024-11-23 18:50:16 +00:00
77741100e6 2021: d08: ex1: add solution 2024-11-23 18:50:16 +00:00
2ec356e556 2021: d08: ex1: add input 2024-11-23 18:50:16 +00:00
7e63d778f4 2021: d07: ex2: add solution 2024-11-23 18:50:16 +00:00
5eda15460b 2021: d07: ex2: add input 2024-11-23 18:50:16 +00:00
fa4ea4511a 2021: d07: ex1: add solution 2024-11-23 18:50:16 +00:00
6cc0dc453b 2021: d07: ex1: add input 2024-11-23 18:50:16 +00:00
8cb61c6323 2021: d06: ex2: add solution 2024-11-23 18:50:16 +00:00
b00e4768fc 2021: d06: ex2: add input 2024-11-23 18:50:16 +00:00
fb40ea0517 2021: d06: ex1: add solution 2024-11-23 18:50:16 +00:00
660748c6ab 2021: d06: ex1: add input 2024-11-23 18:50:16 +00:00
245e9dc998 2021: d05: ex2: add solution 2024-11-23 18:50:16 +00:00
a3d1c6b0a9 2021: d05: ex2: add input 2024-11-23 18:50:16 +00:00
09ea244442 2021: d05: ex1: add solution 2024-11-23 18:50:16 +00:00
9f8ab70690 2021: d05: ex1: add input 2024-11-23 18:50:16 +00:00
003071a57b 2021: d04: ex2: add solution 2024-11-23 18:50:16 +00:00
2c11ec6866 2021: d04: ex2: add input 2024-11-23 18:50:16 +00:00
1d61133661 2021: d04: ex1: add solution 2024-11-23 18:50:16 +00:00
9624c49a35 2021: d04: ex1: add input 2024-11-23 18:50:16 +00:00
d1122ab561 2021: d03: ex2: add solution 2024-11-23 18:50:16 +00:00
ef8d402a3d 2021: d03: ex2: add input 2024-11-23 18:50:16 +00:00
95ae7df24e 2021: d03: ex1: add solution 2024-11-23 18:50:16 +00:00
94788946a3 2021: d03: ex1: add input 2024-11-23 18:50:16 +00:00
94b43da45c 2021: d02: ex2: add solution 2024-11-23 18:50:16 +00:00
fe0d20ad03 2021: d02: ex2: add input 2024-11-23 18:50:16 +00:00
82b8354edc 2021: d02: ex1: add solution 2024-11-23 18:50:16 +00:00
ec1558efe2 2021: d02: ex1: add input 2024-11-23 18:50:16 +00:00
2646a1609d 2021: d01: ex2: add solution 2024-11-23 18:50:16 +00:00
05afd2ea64 2021: d01: ex2: add input 2024-11-23 18:50:16 +00:00
74e43afa72 2021: d01: ex1: add solution 2024-11-23 18:50:16 +00:00
dcd66ec6f4 2021: d01: ex1: add input 2024-11-23 18:50:16 +00:00
87a8b8a3d3 git: ignore generated files 2024-11-23 18:50:16 +00:00
9159553e6b nix: add direnv integration 2024-11-23 18:50:16 +00:00
75b16e08b1 isort: use 'black' compatible style 2024-11-23 18:50:16 +00:00
0547c87c24 nix: add flake 2024-11-23 18:50:16 +00:00
e69a451189 2020: d25: ex2: add solution 2024-11-23 18:50:16 +00:00
079e7358de 2020: d25: ex2: add input 2024-11-23 18:50:16 +00:00
68a8ae07fa 2020: d25: ex1: add solution 2024-11-23 18:50:16 +00:00
40cf84e081 2020: d25: ex1: add input 2024-11-23 18:50:16 +00:00
856efa526e 2020: d24: ex2: add solution 2024-11-23 18:50:16 +00:00
c9f0b0b1ba 2020: d24: ex2: add input 2024-11-23 18:50:16 +00:00
f5c1b03ddd 2020: d24: ex1: add solution 2024-11-23 18:50:16 +00:00
cbdbc36563 2020: d24: ex1: add input 2024-11-23 18:50:16 +00:00
c4b6536598 2020: d23: ex2: add solution 2024-11-23 18:50:16 +00:00
d0e1d5b427 2020: d23: ex2: add input 2024-11-23 18:50:16 +00:00
e9c449ee09 2020: d23: ex1: add solution 2024-11-23 18:50:16 +00:00
b7e3101d3a 2020: d23: ex1: add input 2024-11-23 18:50:16 +00:00
9be6801527 2020: d22: ex2: add solution 2024-11-23 18:50:16 +00:00
b49e09cf9f 2020: d22: ex2: add input 2024-11-23 18:50:16 +00:00
21fd56d96d 2020: d22: ex1: add solution 2024-11-23 18:50:16 +00:00
56fe76bbaf 2020: d22: ex1: add input 2024-11-23 18:50:16 +00:00
9f0f9be2d1 2020: d21: ex2: add solution 2024-11-23 18:50:16 +00:00
d412cac964 2020: d21: ex2: add input 2024-11-23 18:50:16 +00:00
6551796830 2020: d21: ex1: add solution 2024-11-23 18:50:16 +00:00
2302d6e0ae 2020: d21: ex1: add input 2024-11-23 18:50:16 +00:00
9eb34faac0 2020: d20: ex2: add solution 2024-11-23 18:50:16 +00:00
a550355ebe 2020: d20: ex2: add input 2024-11-23 18:50:16 +00:00
87376fc0ee 2020: d20: ex1: add solution 2024-11-23 18:50:16 +00:00
10e84ed48f 2020: d20: ex1: add input 2024-11-23 18:50:16 +00:00
49a934f8f6 2020: d19: ex2: add solution 2024-11-23 18:50:16 +00:00
1d4ec885a4 2020: d19: ex2: add input 2024-11-23 18:50:16 +00:00
f39187ba8a 2020: d19: ex1: add solution 2024-11-23 18:50:16 +00:00
3b049944e2 2020: d19: ex1: add input 2024-11-23 18:50:16 +00:00
874ab7acad 2020: d18: ex2: add solution 2024-11-23 18:50:16 +00:00
8dd7c465de 2020: d18: ex2: add input 2024-11-23 18:50:16 +00:00
b438c7f822 2020: d18: ex1: add solution 2024-11-23 18:50:16 +00:00
c2a38319af 2020: d18: ex1: add input 2024-11-23 18:50:16 +00:00
ed3fa75fb9 2020: d17: ex2: add solution 2024-11-23 18:50:16 +00:00
8f8d4e6b85 2020: d17: ex2: add input 2024-11-23 18:50:16 +00:00
2eb9429f69 2020: d17: ex1: add solution 2024-11-23 18:50:16 +00:00
69f0ba61c0 2020: d17: ex1: add input 2024-11-23 18:50:16 +00:00
85ed83d9a8 2020: d16: ex2: add solution 2024-11-23 18:50:16 +00:00
275234df8d 2020: d16: ex2: add input 2024-11-23 18:50:16 +00:00
773150f281 2020: d16: ex1: add solution 2024-11-23 18:50:16 +00:00
e59c6d4d1b 2020: d16: ex1: add input 2024-11-23 18:50:16 +00:00
2c67bb79bd 2020: d15: ex2: add solution 2024-11-23 18:50:16 +00:00
61b0b76019 2020: d15: ex2: add input 2024-11-23 18:50:16 +00:00
a84e93e8a0 2020: d15: ex1: add solution 2024-11-23 18:50:16 +00:00
7177c0f2b2 2020: d15: ex1: add input 2024-11-23 18:50:16 +00:00
9d60496ca5 2020: d15: ex2: add solution 2024-11-23 18:50:16 +00:00
fc7ea5bc2b 2020: d15: ex2: add input 2024-11-23 18:50:16 +00:00
1f2d646838 2020: d14: ex1: add solution 2024-11-23 18:50:16 +00:00
1c07b0c59e 2020: d14: ex1: add input 2024-11-23 18:50:16 +00:00
81780a4b72 2020: d13: ex2: add solution 2024-11-23 18:50:16 +00:00
eccc4f3583 2020: d13: ex2: add input 2024-11-23 18:50:16 +00:00
a34941dbd9 2020: d13: ex1: add solution 2024-11-23 18:50:16 +00:00
c2d2c14696 2020: d13: ex1: add input 2024-11-23 18:50:16 +00:00
2c31559722 2020: d12: ex2: add solution 2024-11-23 18:50:16 +00:00
0edcccdd02 2020: d12: ex2: add input 2024-11-23 18:50:16 +00:00
139f3db14f 2020: d12: ex1: add solution 2024-11-23 18:50:16 +00:00
0947c9eb77 2020: d12: ex1: add input 2024-11-23 18:50:16 +00:00
e4a0d61ebc 2020: d11: ex2: add solution 2024-11-23 18:50:16 +00:00
26fc4a365e 2020: d11: ex2: add input 2024-11-23 18:50:16 +00:00
1425fd5c4c 2020: d11: ex1: add solution 2024-11-23 18:50:16 +00:00
d86e1f8701 2020: d11: ex1: add input 2024-11-23 18:50:16 +00:00
56aea0db79 2020: d10: ex2: add solution 2024-11-23 18:50:16 +00:00
1f36ec0cd1 2020: d10: ex2: add input 2024-11-23 18:50:16 +00:00
386c912dbe 2020: d10: ex1: add solution 2024-11-23 18:50:16 +00:00
ed5cdb1a95 2020: d10: ex1: add input 2024-11-23 18:50:16 +00:00
b24b690a61 2020: d09: ex2: add solution 2024-11-23 18:50:16 +00:00
ec31ee08e7 2020: d09: ex2: add input 2024-11-23 18:50:16 +00:00
efe0bb2b4b 2020: d09: ex1: add solution 2024-11-23 18:50:16 +00:00
e8bda4380d 2020: d09: ex1: add input 2024-11-23 18:50:16 +00:00
c81bc2c5d8 2020: d08: ex2: add solution 2024-11-23 18:50:16 +00:00
e07ca6ed2e 2020: d08: ex2: add input 2024-11-23 18:50:16 +00:00
1aa6199879 2020: d08: ex1: add solution 2024-11-23 18:50:16 +00:00
bc0ee515ba 2020: d08: ex1: add input 2024-11-23 18:50:16 +00:00
e6396d4606 2020: d07: ex2: add solution 2024-11-23 18:50:16 +00:00
d6d7c4cd0c 2020: d07: ex2: add input 2024-11-23 18:50:16 +00:00
6c160a5350 2020: d07: ex1: add solution 2024-11-23 18:50:16 +00:00
c0bd3a54d0 2020: d07: ex1: add input 2024-11-23 18:50:16 +00:00
bdcd821ea5 2020: d06: ex2: add solution 2024-11-23 18:50:16 +00:00
09be17972e 2020: d06: ex2: add input 2024-11-23 18:50:16 +00:00
56e70c444d 2020: d06: ex1: add solution 2024-11-23 18:50:16 +00:00
45571a06d3 2020: d06: ex1: add input 2024-11-23 18:50:16 +00:00
57a50ec803 2020: d05: ex2: add solution 2024-11-23 18:50:16 +00:00
32597cd01a 2020: d05: ex2: add input 2024-11-23 18:50:16 +00:00
39d5509da5 2020: d05: ex1: add solution 2024-11-23 18:50:16 +00:00
83e4e426ab 2020: d05: ex1: add input 2024-11-23 18:50:16 +00:00
f8afee351c 2020: d04: ex2: add solution 2024-11-23 18:50:16 +00:00
586e95d353 2020: d04: ex2: add input 2024-11-23 18:50:16 +00:00
cdbfc2b973 2020: d04: ex1: add solution 2024-11-23 18:50:16 +00:00
a76a244779 2020: d04: ex1: add input 2024-11-23 18:50:16 +00:00
721750965b 2020: d03: ex2: add solution 2024-11-23 18:50:16 +00:00
b9bed5c506 2020: d03: ex2: add input 2024-11-23 18:50:16 +00:00
8efe93e278 2020: d03: ex1: add solution 2024-11-23 18:50:16 +00:00
3fbdb62a6d 2020: d03: ex1: add input 2024-11-23 18:50:16 +00:00
f9852eac25 2019: d19: ex2: add solution 2024-11-23 18:50:16 +00:00
ddf4217147 2019: d19: ex2: add input 2024-11-23 18:50:16 +00:00
3ad3b9df5d 2019: d19: ex1: add solution 2024-11-23 18:50:16 +00:00
5c8bee8741 2019: d19: ex1: add input 2024-11-23 18:50:16 +00:00
09b8e80ca2 2019: d18: ex2: add solution 2024-11-23 18:50:16 +00:00
ebeebbe5ea 2019: d18: ex2: add input 2024-11-23 18:50:16 +00:00
30fe0f5786 2019: d18: ex1: add solution 2024-11-23 18:50:16 +00:00
a268eb1f1e 2019: d18: ex1: add input 2024-11-23 18:50:16 +00:00
04329c9fd3 2020: d02: ex2: add solution 2024-11-23 18:50:16 +00:00
28ee1e006d 2020: d02: ex2: add input 2024-11-23 18:50:16 +00:00
4f8c876f2d 2020: d02: ex1: add solution 2024-11-23 18:50:16 +00:00
84ea3e2325 2020: d02: ex1: add input 2024-11-23 18:50:16 +00:00
a1578499a1 2020: d01: ex2: add solution 2024-11-23 18:50:16 +00:00
a5e4bf1715 2020: d01: ex2: add input 2024-11-23 18:50:16 +00:00
186c3981c2 2020: d01: ex1: add solution 2024-11-23 18:50:16 +00:00
ec30c78511 2020: d01: ex1: add input 2024-11-23 18:50:16 +00:00
70d7ffc8c6 2019: d17: ex2: add solution 2024-11-23 18:50:16 +00:00
27995b2bb9 2019: d17: ex2: add input 2024-11-23 18:50:16 +00:00
f416b7c366 2019: d17: ex1: add solution 2024-11-23 18:50:16 +00:00
a895dc761a 2019: d17: ex1: add input 2024-11-23 18:50:16 +00:00
576769e648 2019: d16: ex2: add solution 2024-11-23 18:50:16 +00:00
9e0b69d56e 2019: d16: ex2: add input 2024-11-23 18:50:16 +00:00
8ad65f864f 2019: d16: ex1: add solution 2024-11-23 18:50:16 +00:00
36dfeb9fc2 2019: d16: ex1: add input 2024-11-23 18:50:16 +00:00
c1047501a6 2019: d15: ex2: add solution 2024-11-23 18:50:16 +00:00
3217af1859 2019: d15: ex2: add input 2024-11-23 18:50:16 +00:00
90cc65bb3a 2019: d15: ex1: add solution 2024-11-23 18:50:16 +00:00
65cb0c224b 2019: d15: ex1: add input 2024-11-23 18:50:16 +00:00
947a6e9970 2019: d14: ex2: add solution 2024-11-23 18:50:16 +00:00
68df040691 2019: d14: ex2: add input 2024-11-23 18:50:16 +00:00
f4bd381a1a 2019: d14: ex1: add solution 2024-11-23 18:50:16 +00:00
e85fa35b30 2019: d14: ex1: add input 2024-11-23 18:50:16 +00:00
eebd801537 2019: d13: ex2: add solution 2024-11-23 18:50:16 +00:00
bb41df8709 2019: d13: ex2: add input 2024-11-23 18:50:16 +00:00
223851a430 2019: d13: ex1: add solution 2024-11-23 18:50:16 +00:00
8713082ed6 2019: d13: ex1: add input 2024-11-23 18:50:16 +00:00
3c10941835 2019: d12: ex2: add solution 2024-11-23 18:50:16 +00:00
b2ea586869 2019: d12: ex2: add input 2024-11-23 18:50:16 +00:00
d6d0f1a94f 2019: d12: ex1: add solution 2024-11-23 18:50:16 +00:00
ca46ca6de8 2019: d12: ex1: add input 2024-11-23 18:50:16 +00:00
699792cf12 2019: d11: ex2: add solution 2024-11-23 18:50:16 +00:00
3f55e37b82 2019: d11: ex2: add input 2024-11-23 18:50:16 +00:00
8de251a301 2019: d11: ex1: add solution 2024-11-23 18:50:16 +00:00
5f776c6880 2019: d11: ex1: add input 2024-11-23 18:50:16 +00:00
1242388be7 2019: d10: ex2: add solution 2024-11-23 18:50:16 +00:00
59af5aae07 2019: d10: ex2: add input 2024-11-23 18:50:16 +00:00
47f702ec2e 2019: d10: ex1: clean-up solution 2024-11-23 18:50:16 +00:00
cf42aaa2b0 2019: d10: ex1: add solution 2024-11-23 18:50:16 +00:00
72a07f9ac4 2019: d10: ex1: add input 2024-11-23 18:50:16 +00:00
3106914906 2019: d09: ex2: add solution 2024-11-23 18:50:16 +00:00
ad8a08e494 2019: d09: ex2: add input 2024-11-23 18:50:16 +00:00
fc2aa2df6d 2019: d09: ex1: add solution 2024-11-23 18:50:16 +00:00
c5e3cac6ed 2019: d09: ex1: add input 2024-11-23 18:50:16 +00:00
b15c967b8d 2019: d08: ex2: add solution 2024-11-23 18:50:16 +00:00
8335513623 2019: d08: ex2: add input 2024-11-23 18:50:16 +00:00
1b5bd3faf5 2019: d08: ex1: add solution 2024-11-23 18:50:16 +00:00
a37ef81ec3 2019: d08: ex1: add input 2024-11-23 18:50:16 +00:00
df3542b7d8 2019: d07: ex2: add solution 2024-11-23 18:50:16 +00:00
77bcb1e560 2019: d07: ex2: add input 2024-11-23 18:50:16 +00:00
cb6025af46 2019: d07: ex1: add solution 2024-11-23 18:50:16 +00:00
74847ab4d8 2019: d07: ex1: add input 2024-11-23 18:50:16 +00:00
24062ea43a 2019: d06: ex2: add solution 2024-11-23 18:50:16 +00:00
e411c20e5a 2019: d06: ex2: add input 2024-11-23 18:50:16 +00:00
5d88e60832 2019: d06: ex1: add solution 2024-11-23 18:50:16 +00:00
4b549d4b23 2019: d06: ex1: add input 2024-11-23 18:50:16 +00:00
e12a9c9333 2019: d05: ex2: add solution 2024-11-23 18:50:16 +00:00
35cf0da3dc 2019: d05: ex2: add input 2024-11-23 18:50:16 +00:00
7b27a4a2fa 2019: d05: ex1: add solution 2024-11-23 18:50:16 +00:00
ab3a8a8247 2019: d05: ex1: add input 2024-11-23 18:50:16 +00:00
67a5bb9695 2019: d04: ex2: add solution 2024-11-23 18:50:16 +00:00
00ec65e9b0 2019: d04: ex1: add solution 2024-11-23 18:50:16 +00:00
59fafe6140 2019: d03: ex2: add solution 2024-11-23 18:50:16 +00:00
65 changed files with 56 additions and 112 deletions

View file

@ -1,2 +0,0 @@
[settings]
profile=black

View file

@ -2,7 +2,7 @@
import sys
from fractions import Fraction
from typing import Dict, List, NamedTuple, Optional
from typing import List, NamedTuple, Optional
class Point(NamedTuple):

View file

@ -7,7 +7,7 @@ def is_valid_password(p: int) -> bool:
digits = str(p)
def has_adjacent_digit():
for (a, b) in zip(digits, digits[1:]):
for a, b in zip(digits, digits[1:]):
if a == b:
return True
return False

View file

@ -8,7 +8,7 @@ def is_valid_password(p: int) -> bool:
def has_unique_adjacent_digit():
counts = {d: 0 for d in range(10)}
for (a, b) in zip(digits, digits[1:]):
for a, b in zip(digits, digits[1:]):
if a == b:
counts[int(a)] += 1
return any(count == 1 for count in counts.values())

View file

@ -1,7 +1,5 @@
#!/usr/bin/env python
import sys
from copy import deepcopy
from enum import IntEnum
from typing import List, NamedTuple

View file

@ -5,7 +5,7 @@ import sys
from copy import deepcopy
from dataclasses import dataclass, field
from enum import IntEnum
from typing import Callable, List, NamedTuple
from typing import List, NamedTuple
class ParameterMode(IntEnum):

View file

@ -1,11 +1,10 @@
#!/usr/bin/env python
import itertools
import sys
from copy import deepcopy
from dataclasses import dataclass, field
from enum import IntEnum
from typing import Callable, List, NamedTuple
from typing import List, NamedTuple
class ParameterMode(IntEnum):

View file

@ -1,11 +1,10 @@
#!/usr/bin/env python
import itertools
import sys
from copy import deepcopy
from dataclasses import dataclass, field
from enum import IntEnum
from typing import Callable, List, NamedTuple
from typing import List, NamedTuple
class ParameterMode(IntEnum):

View file

@ -4,7 +4,6 @@ import sys
from cmath import phase
from itertools import groupby
from math import gcd, pi
from pprint import pprint
from typing import NamedTuple, Set, Tuple

View file

@ -3,7 +3,7 @@
import sys
from dataclasses import dataclass, field
from enum import IntEnum
from typing import Dict, Iterable, List, NamedTuple, Tuple, TypeVar
from typing import Iterable, List, NamedTuple, Tuple, TypeVar
class ParameterMode(IntEnum):

View file

@ -3,7 +3,7 @@
import sys
from dataclasses import dataclass, field
from enum import IntEnum
from typing import Dict, Iterable, List, NamedTuple, Tuple, TypeVar
from typing import Iterable, List, NamedTuple, Tuple, TypeVar
class ParameterMode(IntEnum):

View file

@ -2,8 +2,6 @@
import sys
from functools import reduce
from itertools import chain, cycle
from typing import Iterable, List
def main() -> None:

View file

@ -4,7 +4,7 @@ import sys
from copy import deepcopy
from dataclasses import dataclass, field
from enum import IntEnum
from typing import Iterator, List, NamedTuple, Tuple
from typing import List, NamedTuple
class ParameterMode(IntEnum):

View file

@ -2,8 +2,6 @@
import re
import sys
from collections import defaultdict
from copy import deepcopy
from dataclasses import dataclass
from typing import Dict, List, Set, Tuple

View file

@ -41,7 +41,6 @@ def update(grid: Grid) -> Grid:
def solve(grid: Grid) -> int:
for __ in range(6):
grid = update(grid)

View file

@ -41,7 +41,6 @@ def update(grid: Grid) -> Grid:
def solve(grid: Grid) -> int:
for __ in range(6):
grid = update(grid)

View file

@ -1,7 +1,7 @@
#!/usr/bin/env python
import sys
from typing import Callable, Dict, List
from typing import List
"""
E : T [ * T ]*

View file

@ -5,7 +5,6 @@ import itertools
import math
import sys
from collections import defaultdict
from copy import deepcopy
from typing import Dict, Iterator, List, Set, Tuple
Tile = List[List[str]]

View file

@ -2,7 +2,7 @@
import itertools
import sys
from typing import List, Tuple
from typing import List
def solve(circle: List[int]) -> int:

View file

@ -2,7 +2,7 @@
import itertools
import sys
from typing import List, Tuple
from typing import List
def solve(circle: List[int]) -> int:

View file

@ -3,7 +3,6 @@
import itertools
import sys
from collections import defaultdict
from copy import deepcopy
from typing import Dict, Iterator, List, Tuple
Offset = Tuple[int, int]

View file

@ -1,6 +1,5 @@
#!/usr/bin/env python
import itertools
import sys
from typing import List

View file

@ -1,6 +1,5 @@
#!/usr/bin/env python
import itertools
import sys
from typing import List

View file

@ -1,6 +1,5 @@
#!/usr/bin/env python
import itertools
import sys
from typing import List

View file

@ -1,6 +1,5 @@
#!/usr/bin/env python
import itertools
import sys
from typing import List

View file

@ -1,6 +1,5 @@
#!/usr/bin/env python
import itertools
import sys
from copy import deepcopy
from typing import List

View file

@ -3,7 +3,6 @@
import itertools
import sys
from collections import Counter
from dataclasses import dataclass
from typing import Iterator, List, TypeVar
T = TypeVar("T")

View file

@ -3,7 +3,6 @@
import itertools
import sys
from collections import Counter
from dataclasses import dataclass
from typing import Iterator, List, TypeVar
T = TypeVar("T")

View file

@ -1,6 +1,5 @@
#!/usr/bin/env python
import itertools
import sys
from typing import List

View file

@ -1,6 +1,5 @@
#!/usr/bin/env python
import itertools
import sys
from math import ceil, floor
from typing import List

View file

@ -1,6 +1,5 @@
#!/usr/bin/env python
import itertools
import sys
from dataclasses import dataclass
from typing import Dict, List, Set

View file

@ -1,6 +1,5 @@
#!/usr/bin/env python
import itertools
import sys
from typing import Iterator, List, Tuple

View file

@ -1,6 +1,5 @@
#!/usr/bin/env python
import itertools
import sys
from typing import Iterator, List, Tuple

View file

@ -1,6 +1,5 @@
#!/usr/bin/env python
import itertools
import sys
from typing import List, Optional, cast

View file

@ -1,6 +1,5 @@
#!/usr/bin/env python
import itertools
import sys
from typing import Iterator, List, Optional

View file

@ -2,7 +2,6 @@
import itertools
import sys
from copy import deepcopy
from typing import Iterator, List, Set, Tuple
Grid = List[List[int]]
@ -39,7 +38,7 @@ def solve(input: List[str]) -> int:
# Second step, do flashes
has_flashed: Set[Point] = set()
while len(flashes := (excited(levels) - has_flashed)) > 0:
for (i, j) in flashes:
for i, j in flashes:
has_flashed.add((i, j))
for x, y in neighbours_of((i, j)):
levels[x][y] += 1

View file

@ -2,7 +2,6 @@
import itertools
import sys
from copy import deepcopy
from typing import Iterator, List, Set, Tuple
Grid = List[List[int]]
@ -39,7 +38,7 @@ def solve(input: List[str]) -> int:
# Second step, do flashes
has_flashed: Set[Point] = set()
while len(flashes := (excited(levels) - has_flashed)) > 0:
for (i, j) in flashes:
for i, j in flashes:
has_flashed.add((i, j))
for x, y in neighbours_of((i, j)):
levels[x][y] += 1

View file

@ -1,6 +1,5 @@
#!/usr/bin/env python
import itertools
import sys
from collections import defaultdict
from typing import Dict, List, Set
@ -12,7 +11,7 @@ def solve(input: List[str]) -> int:
def parse() -> Map:
res: Map = defaultdict(set)
for (start, to) in map(lambda s: s.split("-"), input):
for start, to in map(lambda s: s.split("-"), input):
res[start].add(to)
res[to].add(start)

View file

@ -1,6 +1,5 @@
#!/usr/bin/env python
import itertools
import sys
from collections import defaultdict
from typing import Dict, List, Set
@ -12,7 +11,7 @@ def solve(input: List[str]) -> int:
def parse() -> Map:
res: Map = defaultdict(set)
for (start, to) in map(lambda s: s.split("-"), input):
for start, to in map(lambda s: s.split("-"), input):
res[start].add(to)
res[to].add(start)

View file

@ -1,9 +1,8 @@
#!/usr/bin/env python
import heapq
import itertools
import sys
from typing import Iterator, List, NamedTuple, Set, Tuple
from typing import Iterator, List, NamedTuple, Set
class Point(NamedTuple):

View file

@ -1,9 +1,8 @@
#!/usr/bin/env python
import heapq
import itertools
import sys
from typing import Iterator, List, NamedTuple, Set, Tuple
from typing import Iterator, List, NamedTuple, Set
class Point(NamedTuple):

View file

@ -5,7 +5,7 @@ import functools
import itertools
import sys
from dataclasses import dataclass
from typing import Iterable, Iterator, List, Tuple, TypeVar
from typing import Iterable, Iterator, List, Tuple
RawPacket = List[bool]

View file

@ -6,7 +6,7 @@ import itertools
import math
import sys
from dataclasses import dataclass
from typing import Callable, Dict, Iterable, Iterator, List, Tuple, TypeVar
from typing import Callable, Dict, Iterable, Iterator, List, Tuple
RawPacket = List[bool]

View file

@ -1,7 +1,6 @@
#!/usr/bin/env python
import itertools
import math
import sys
from typing import Iterator, List, NamedTuple

View file

@ -1,7 +1,5 @@
#!/usr/bin/env python
import itertools
import math
import sys
from typing import Iterator, List, NamedTuple

View file

@ -1,6 +1,5 @@
#!/usr/bin/env python
import functools
import itertools
import sys
from copy import deepcopy

View file

@ -1,6 +1,5 @@
#!/usr/bin/env python
import functools
import itertools
import sys
from dataclasses import dataclass

View file

@ -1,6 +1,5 @@
#!/usr/bin/env python
import functools
import itertools
import sys
from dataclasses import dataclass

View file

@ -3,7 +3,7 @@
import functools
import itertools
import sys
from typing import Iterator, List, NamedTuple, Optional, Set, Tuple, cast
from typing import List, NamedTuple, Optional, Set, Tuple
class Point(NamedTuple):

View file

@ -3,7 +3,7 @@
import functools
import itertools
import sys
from typing import Iterator, List, NamedTuple, Optional, Set, Tuple, cast
from typing import List, NamedTuple, Optional, Set, Tuple
class Point(NamedTuple):

View file

@ -3,7 +3,7 @@
import enum
import functools
import sys
from typing import Iterator, List, NamedTuple, Optional, Tuple, cast
from typing import Iterator, List, NamedTuple, Optional, Tuple
class Point(NamedTuple):

View file

@ -3,7 +3,7 @@
import enum
import functools
import sys
from typing import Iterator, List, NamedTuple, Optional, Tuple, cast
from typing import Iterator, List, NamedTuple, Optional, Tuple
class Point(NamedTuple):

View file

@ -1,9 +1,8 @@
#!/usr/bin/env python
import enum
import itertools
import sys
from typing import Iterable, Iterator, List, NamedTuple, Set
from typing import List, NamedTuple, Set
class Point(NamedTuple):
@ -61,11 +60,13 @@ def solve(input: List[str]) -> int:
for x in range(map.dimensions.x):
print(
"".join(
"v"
if Point(x, y) in map.south
else ">"
if Point(x, y) in map.east
else "."
(
"v"
if Point(x, y) in map.south
else ">"
if Point(x, y) in map.east
else "."
)
for y in range(map.dimensions.y)
)
)

View file

@ -8,7 +8,6 @@ FileSystem = dict[str, Union[int, "FileSystem"]]
def solve(input: list[str]) -> int:
def build_tree(input: list[str], i: int = 0) -> tuple[FileSystem, int]:
fs: FileSystem = {}
while i < len(input):

View file

@ -8,7 +8,6 @@ FileSystem = dict[str, Union[int, "FileSystem"]]
def solve(input: list[str]) -> int:
def build_tree(input: list[str], i: int = 0) -> tuple[FileSystem, int]:
fs: FileSystem = {}
while i < len(input):

View file

@ -20,7 +20,7 @@ class HeightMap:
def reachable_neighbours(self, p: Point) -> Iterator[Point]:
reachable_height = self.heights[p.x][p.y] + 1
for (dx, dy) in ((-1, 0), (1, 0), (0, -1), (0, 1)):
for dx, dy in ((-1, 0), (1, 0), (0, -1), (0, 1)):
x, y = p.x + dx, p.y + dy
if x < 0 or x >= len(self.heights):
continue

View file

@ -20,7 +20,7 @@ class HeightMap:
def reachable_neighbours(self, p: Point) -> Iterator[Point]:
reachable_height = self.heights[p.x][p.y] + 1
for (dx, dy) in ((-1, 0), (1, 0), (0, -1), (0, 1)):
for dx, dy in ((-1, 0), (1, 0), (0, -1), (0, 1)):
x, y = p.x + dx, p.y + dy
if x < 0 or x >= len(self.heights):
continue

View file

@ -2,7 +2,6 @@
import itertools
import sys
from collections import deque
from collections.abc import Iterator
from typing import NamedTuple

View file

@ -25,7 +25,7 @@ class Operator(str, enum.Enum):
class Monkey:
def get_value(self, monkeys: dict[str, "Monkey"]) -> int:
raise NotImplemented
raise NotImplementedError
@dataclasses.dataclass

View file

@ -93,7 +93,7 @@ class MathObserver:
class Monkey:
def get_value(self, monkeys: dict[str, "Monkey"]) -> Num:
raise NotImplemented
raise NotImplementedError
@dataclasses.dataclass

View file

@ -1,8 +1,6 @@
#!/usr/bin/env python
import functools
import math
import operator as op
import sys
from collections import Counter
from enum import StrEnum

View file

@ -1,6 +1,5 @@
#!/usr/bin/env python
import dataclasses
import itertools
import sys
from enum import StrEnum

View file

@ -2,7 +2,6 @@
import functools
import heapq
import itertools
import sys
from collections.abc import Iterator
from enum import Enum

33
flake.lock generated
View file

@ -3,11 +3,11 @@
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
@ -21,11 +21,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@ -43,11 +43,11 @@
]
},
"locked": {
"lastModified": 1660459072,
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
@ -58,11 +58,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1701336116,
"narHash": "sha256-kEmpezCR/FpITc6yMbAh4WrOCiT2zg5pSjnKrq51h5Y=",
"lastModified": 1731890469,
"narHash": "sha256-D1FNZ70NmQEwNxpSSdTXCSklBH1z2isPR84J6DQrJGs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f5c27c6136db4d76c30e533c20517df6864c46ee",
"rev": "5083ec887760adfe12af64830a66807423a859a7",
"type": "github"
},
"original": {
@ -75,9 +75,6 @@
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": [
"futils"
],
"gitignore": "gitignore",
"nixpkgs": [
"nixpkgs"
@ -87,11 +84,11 @@
]
},
"locked": {
"lastModified": 1700922917,
"narHash": "sha256-ej2fch/T584b5K9sk1UhmZF7W6wEfDHuoUYpFN8dtvM=",
"lastModified": 1732021966,
"narHash": "sha256-mnTbjpdqF0luOkou8ZFi2asa1N3AA2CchR/RqCNmsGE=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "e5ee5c5f3844550c01d2131096c7271cec5e9b78",
"rev": "3308484d1a443fc5bc92012435d79e80458fe43c",
"type": "github"
},
"original": {

View file

@ -22,7 +22,6 @@
repo = "pre-commit-hooks.nix";
ref = "master";
inputs = {
flake-utils.follows = "futils";
nixpkgs.follows = "nixpkgs";
nixpkgs-stable.follows = "nixpkgs";
};
@ -40,17 +39,13 @@
src = self;
hooks = {
black = {
enable = true;
};
isort = {
enable = true;
};
nixpkgs-fmt = {
enable = true;
};
ruff-format = {
enable = true;
};
};
};
};
@ -58,12 +53,11 @@
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
(python3.withPackages (ps: with ps; [
black
isort
mypy
z3
]))
pyright
ruff
];
inherit (self.checks.${system}.pre-commit) shellHook;