Compare commits
477 commits
43650ade44
...
67ef6227dc
Author | SHA1 | Date | |
---|---|---|---|
|
67ef6227dc | ||
|
c1ef85e59b | ||
|
b80a75858d | ||
|
061af7c1d1 | ||
|
b004a8fae7 | ||
|
0c23bd9eee | ||
|
03d3cf2210 | ||
|
eca3f7bd59 | ||
|
4047f428e1 | ||
|
a42da85f1f | ||
|
1204116d6f | ||
|
7017b91d91 | ||
|
8b58cedff2 | ||
|
a734b0d292 | ||
|
a69212b0ee | ||
|
6fbc38b565 | ||
|
0f949820e1 | ||
|
5e8eb3d7f2 | ||
|
4c11e798bd | ||
|
3837f06467 | ||
|
1a0a231bd7 | ||
|
781e51b3a0 | ||
|
c8e0e82c12 | ||
|
70cbe0d6f2 | ||
|
06f3c8f169 | ||
|
a18f882c1a | ||
|
e795c9cee8 | ||
|
8f8e37b42d | ||
|
57f28d6411 | ||
|
7e2489f5f9 | ||
|
f9c1e152c3 | ||
|
bb2bee9c6e | ||
|
122b81ed15 | ||
|
d5694f2bd3 | ||
|
5215e97077 | ||
|
1be0b68503 | ||
|
8f6fc416fb | ||
|
61e32bde3d | ||
|
97b4a3c7b3 | ||
|
f62c625850 | ||
|
d15f807bd1 | ||
|
90ebcbebd8 | ||
|
38dc59b16d | ||
|
1e7d41b861 | ||
|
572d03ae1d | ||
|
f8b27ddff8 | ||
|
3f2c16d8a8 | ||
|
307381a434 | ||
|
d8f472ec43 | ||
|
21986b1148 | ||
|
9f7c2a6448 | ||
|
bd396f32d7 | ||
|
d2e2d79d71 | ||
|
15b8b5aaeb | ||
|
70fdb4e606 | ||
|
f8c387c5a6 | ||
|
f31434d9c6 | ||
|
abf3b5e66c | ||
|
c46be2b190 | ||
|
933fc2da0b | ||
|
9bbb769a9b | ||
|
7cf50212b4 | ||
|
8692f6c401 | ||
|
a4e14d1245 | ||
|
8e5433a642 | ||
|
f4e3d977c2 | ||
|
d5842f92be | ||
|
6f31630af7 | ||
|
a310f24d8e | ||
|
348ce5b369 | ||
|
34e16218b8 | ||
|
dcce8c1eec | ||
|
ad9ddd69e5 | ||
|
4f5138adb8 | ||
|
73ee756062 | ||
|
245a07bbdd | ||
|
13437c7bd6 | ||
|
dda2adcb6e | ||
|
c329b034a6 | ||
|
bacc167481 | ||
|
3afecbf47e | ||
|
0a65ff5789 | ||
|
7a7ba0b454 | ||
|
d45398d1e9 | ||
|
10faba0e78 | ||
|
3e34da7b31 | ||
|
831b3606b4 | ||
|
f659487d80 | ||
|
bdd585fec7 | ||
|
3d6780146b | ||
|
d52a3a1e59 | ||
|
2923fd5dcc | ||
|
1193810e57 | ||
|
8ab447e917 | ||
|
65c087a68b | ||
|
078dfd94e7 | ||
|
52ecb598bc | ||
|
8df335ba05 | ||
|
447467ef6e | ||
|
1039b4c0ac | ||
|
a53f99d841 | ||
|
37d878da27 | ||
|
53c344b223 | ||
|
5bbf42ef1b | ||
|
92cabbda8f | ||
|
addda451ef | ||
|
d1194e8c5f | ||
|
7759412af3 | ||
|
4211451deb | ||
|
1562f97efc | ||
|
1c57181989 | ||
|
e8cbc17839 | ||
|
2ce03834e4 | ||
|
f3af387265 | ||
|
43b78a23c5 | ||
|
a4d483e01c | ||
|
eeaf6956e5 | ||
|
b819e62da4 | ||
|
992cbd34f4 | ||
|
c7bb07d13a | ||
|
810101024f | ||
|
e1dc373b69 | ||
|
3e5502e3d8 | ||
|
5d6ef372de | ||
|
8881d00b55 | ||
|
31fbfaaead | ||
|
1392358ada | ||
|
076126ec41 | ||
|
64ae3b2a59 | ||
|
69055425f0 | ||
|
8e8e26f2d6 | ||
|
1743b72d82 | ||
|
a57da6fcfe | ||
|
ef8b11d2d3 | ||
|
e18d783d39 | ||
|
e509e6fd4b | ||
|
ce88300254 | ||
|
fa883c71c0 | ||
|
1cee160cad | ||
|
7009315b66 | ||
|
6355c9c84d | ||
|
0587294ccf | ||
|
14e8b539c6 | ||
|
0f91c37d6d | ||
|
1ce063154e | ||
|
da042bea7d | ||
|
a9c325ce14 | ||
|
e457aaed44 | ||
|
2c486e5984 | ||
|
7eb906cd17 | ||
|
e5f1d74b08 | ||
|
73c97eb7ce | ||
|
3d45fe8501 | ||
|
98f58280fa | ||
|
977dbcbd93 | ||
|
644f29a79d | ||
|
5f55835edf | ||
|
300502a05f | ||
|
93cac379e0 | ||
|
efb846e460 | ||
|
a03da090dc | ||
|
19d6374476 | ||
|
44dafef243 | ||
|
5731ff8e82 | ||
|
426deae1ce | ||
|
63bbd74790 | ||
|
20779b5e2e | ||
|
912e8e6edb | ||
|
a505c9de49 | ||
|
71280e082d | ||
|
f6fbf6d6e6 | ||
|
8b63d66750 | ||
|
637b7e64c2 | ||
|
a45e00083c | ||
|
a6f1d09f91 | ||
|
02a0c87f74 | ||
|
5270736a28 | ||
|
761a37e8fe | ||
|
0c2712d7db | ||
|
20fcfe32b2 | ||
|
6c4ead5e1b | ||
|
65cb34a16a | ||
|
5ad92f1585 | ||
|
fd66f79400 | ||
|
e2d1a5f74d | ||
|
cea94a22fb | ||
|
c2cfef5e30 | ||
|
9b01dc5723 | ||
|
d43d8c0cf1 | ||
|
32ccf155df | ||
|
3030162e09 | ||
|
035b00e5cf | ||
|
96b6c799e7 | ||
|
4c8667879d | ||
|
787381537b | ||
|
ca0ff2f0b9 | ||
|
a710ad0217 | ||
|
a06d490eef | ||
|
6f0ffd34db | ||
|
a064fe7199 | ||
|
24610576bb | ||
|
8c13d5954e | ||
|
31c0f09981 | ||
|
46864fc490 | ||
|
fcb74b375f | ||
|
6a6552f6fc | ||
|
a6560adc6a | ||
|
709ad10ae2 | ||
|
5266bd7cd7 | ||
|
068ce3366a | ||
|
a8b2046162 | ||
|
84ee4c57f0 | ||
|
bf830af1ae | ||
|
d35e1d43d6 | ||
|
289b1ce455 | ||
|
ac9f1f2d6d | ||
|
04589c89b8 | ||
|
05fdbcc303 | ||
|
130e417c62 | ||
|
61936793e3 | ||
|
f8d2551280 | ||
|
9ab9b3bd08 | ||
|
3152b281e2 | ||
|
d85baf2a6d | ||
|
16e9f6eb9c | ||
|
ee48bb409a | ||
|
a791595c4e | ||
|
65328ff90d | ||
|
74e53e919c | ||
|
820d358803 | ||
|
98deed16ed | ||
|
05a02c63fd | ||
|
f561c94209 | ||
|
549a806bd6 | ||
|
030f680090 | ||
|
8bf78654a5 | ||
|
c0bf6fe213 | ||
|
2be3cf4327 | ||
|
38902d9a64 | ||
|
87dd721d47 | ||
|
bbb6b33406 | ||
|
b8e0bc7db7 | ||
|
b41103b3a8 | ||
|
44d90b4153 | ||
|
b42fd7e459 | ||
|
ae66ae03d6 | ||
|
bf5053d865 | ||
|
643286ca25 | ||
|
cb03ef9b2b | ||
|
ee4c12e081 | ||
|
68219cf710 | ||
|
03565ed812 | ||
|
420d4a8f7a | ||
|
a1520e437e | ||
|
235f8cd29b | ||
|
b1f325432c | ||
|
5f332cc4fa | ||
|
df66079060 | ||
|
8794333d64 | ||
|
4b19161d71 | ||
|
6dbdba8a46 | ||
|
64651f1be9 | ||
|
b2c5e732f5 | ||
|
3feee209e3 | ||
|
85fd510ec9 | ||
|
6434bbca1b | ||
|
c7f1e0c57c | ||
|
9c1b1bc4a5 | ||
|
3fb206b0e5 | ||
|
cef3c2fa8d | ||
|
5e1b3b095c | ||
|
97ce6eb8b5 | ||
|
00df99ac05 | ||
|
531bbda3d5 | ||
|
fc8af0d5ce | ||
|
3b0f1c8882 | ||
|
4a99cd11bd | ||
|
f535c7c129 | ||
|
2ab20607e1 | ||
|
ab86a2dce7 | ||
|
e05173e73b | ||
|
6d778ff545 | ||
|
c341ad6eee | ||
|
b8d6bc9b4f | ||
|
7793f65af4 | ||
|
4794a6269a | ||
|
7f9758eb0c | ||
|
10abc46e11 | ||
|
330a8d64d0 | ||
|
d474708fc8 | ||
|
55e08af4b1 | ||
|
ce04fb589b | ||
|
039e7f5214 | ||
|
ea66011fef | ||
|
daa87d923d | ||
|
2177287e01 | ||
|
484a9722ad | ||
|
614d3447c5 | ||
|
8acf8aadaf | ||
|
b15c1a0d57 | ||
|
cba9dd02f8 | ||
|
7956b96baa | ||
|
4b03030ed6 | ||
|
a21310895c | ||
|
05a6845e83 | ||
|
357c18a5fa | ||
|
175706ca68 | ||
|
b1bec40137 | ||
|
2f661fa8a8 | ||
|
0c925ae943 | ||
|
50b46506ee | ||
|
01750a9c39 | ||
|
1337f92ef3 | ||
|
e2acd44936 | ||
|
5dfe49a98d | ||
|
6183509703 | ||
|
7ce292eb33 | ||
|
56b37a3e4f | ||
|
3270cf77aa | ||
|
0e09148689 | ||
|
aab1b0d7e8 | ||
|
fe4d2f5c1f | ||
|
6158f55f42 | ||
|
cd827923c3 | ||
|
3e7dc177ff | ||
|
8c30df4da9 | ||
|
bd8b216cf2 | ||
|
810aee2aed | ||
|
987cdd56c5 | ||
|
c8b9636957 | ||
|
5cb2e01a2f | ||
|
b2e5775014 | ||
|
9171fe1ae2 | ||
|
16e0da1a2c | ||
|
37bc234a8a | ||
|
8a2bbc38b6 | ||
|
9baeadebee | ||
|
f0658a7c81 | ||
|
1480e095c5 | ||
|
9b09b7f5f3 | ||
|
f7bf6d1058 | ||
|
b2b051837f | ||
|
9d2ad5dce4 | ||
|
e802aea353 | ||
|
711cb4724b | ||
|
ee985f7151 | ||
|
886e96349a | ||
|
57cd081712 | ||
|
1ce8bd45b3 | ||
|
a2d966926b | ||
|
e9b6af3754 | ||
|
54b5f45c5a | ||
|
2c134402dc | ||
|
d3f00411f4 | ||
|
717d495d89 | ||
|
d3da5495c9 | ||
|
1c4bec86ef | ||
|
258e8a568b | ||
|
8544842253 | ||
|
b5042767c6 | ||
|
5d6ea97234 | ||
|
f071afb02b | ||
|
b26314c942 | ||
|
f157debb7b | ||
|
3afd466d83 | ||
|
72cd094e0c | ||
|
ff956922aa | ||
|
a6110aaa7f | ||
|
07198e85d3 | ||
|
687b0a848d | ||
|
e171f3953b | ||
|
0eefd66d10 | ||
|
9202d31fa8 | ||
|
d2abd31795 | ||
|
d6c0be03f0 | ||
|
49feb648c1 | ||
|
bd842fd6f8 | ||
|
7a599b5139 | ||
|
93b884fef3 | ||
|
aeddad4f38 | ||
|
e843016596 | ||
|
13a1532871 | ||
|
2a281d1857 | ||
|
632a4b004f | ||
|
be6b51f20f | ||
|
d3d35e2001 | ||
|
e28d9faeef | ||
|
ac365651d3 | ||
|
f3647021be | ||
|
f31334b438 | ||
|
57b1172146 | ||
|
84b83d27a0 | ||
|
a8de8b9a3f | ||
|
5012cbfcb1 | ||
|
c2c3ad7c32 | ||
|
a8ffb5bf66 | ||
|
359dfe5d54 | ||
|
91dabb5b6a | ||
|
2b84e1c6f1 | ||
|
4f2385a8ba | ||
|
fdac3b73af | ||
|
a67fd01204 | ||
|
1108caab20 | ||
|
c13206f5aa | ||
|
b9199f86f5 | ||
|
3c766f31dd | ||
|
121678cd81 | ||
|
d7e663cd0c | ||
|
2375649653 | ||
|
5297e0bafe | ||
|
b8dfe0d149 | ||
|
5178c58a5a | ||
|
5f9288aa5f | ||
|
0d175c824f | ||
|
776577c118 | ||
|
a304a38046 | ||
|
17a4286307 | ||
|
6d30ed5992 | ||
|
30a7a7da33 | ||
|
82f57ddea5 | ||
|
dad9912dd2 | ||
|
07223f9d30 | ||
|
254093a24d | ||
|
ffe7fa42d5 | ||
|
035b8b5a0f | ||
|
704cf451cb | ||
|
c1c5abc0a4 | ||
|
78954b23e5 | ||
|
e4699300b0 | ||
|
3fc73336a4 | ||
|
ac39fe2abb | ||
|
1b8f5bc5e0 | ||
|
ed9ba2c14a | ||
|
d3445b2ef1 | ||
|
2b15ae7552 | ||
|
213575d822 | ||
|
030f45af6c | ||
|
3a19846717 | ||
|
94dffe573c | ||
|
20d47b0048 | ||
|
aee22cd938 | ||
|
9b842e321c | ||
|
ce998da2e2 | ||
|
968562f2c9 | ||
|
2866dc88c9 | ||
|
3ffe51992d | ||
|
31090e26d3 | ||
|
53ce8a1258 | ||
|
97f8ebd006 | ||
|
405fb690a7 | ||
|
b7754cbafb | ||
|
20546f5e81 | ||
|
b42bf6c526 | ||
|
c8ae320cc3 | ||
|
87ba3e1726 | ||
|
d39f649c64 | ||
|
0f964aaeab | ||
|
524e3711ae | ||
|
f2a968616f | ||
|
cac131629d | ||
|
76deb52857 | ||
|
3978e39554 | ||
|
3d9b48a237 | ||
|
91621b3394 | ||
|
f8127cba7a | ||
|
a4ac7ea2aa | ||
|
402e014d4d | ||
|
160d779f3e | ||
|
026ec029b3 | ||
|
625590f31a | ||
|
e91fc23ca1 | ||
|
be24ef1771 | ||
|
9b1d63fd54 | ||
|
1a96ae91b1 | ||
|
c7203e4a59 | ||
|
a71bb20141 | ||
|
bd040e8594 |
2
.isort.cfg
Normal file
2
.isort.cfg
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
[settings]
|
||||||
|
profile=black
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from fractions import Fraction
|
from fractions import Fraction
|
||||||
from typing import List, NamedTuple, Optional
|
from typing import Dict, List, NamedTuple, Optional
|
||||||
|
|
||||||
|
|
||||||
class Point(NamedTuple):
|
class Point(NamedTuple):
|
||||||
|
|
|
@ -7,7 +7,7 @@ def is_valid_password(p: int) -> bool:
|
||||||
digits = str(p)
|
digits = str(p)
|
||||||
|
|
||||||
def has_adjacent_digit():
|
def has_adjacent_digit():
|
||||||
for a, b in zip(digits, digits[1:]):
|
for (a, b) in zip(digits, digits[1:]):
|
||||||
if a == b:
|
if a == b:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
|
@ -8,7 +8,7 @@ def is_valid_password(p: int) -> bool:
|
||||||
|
|
||||||
def has_unique_adjacent_digit():
|
def has_unique_adjacent_digit():
|
||||||
counts = {d: 0 for d in range(10)}
|
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:
|
if a == b:
|
||||||
counts[int(a)] += 1
|
counts[int(a)] += 1
|
||||||
return any(count == 1 for count in counts.values())
|
return any(count == 1 for count in counts.values())
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import sys
|
||||||
|
from copy import deepcopy
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
from typing import List, NamedTuple
|
from typing import List, NamedTuple
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import sys
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
from typing import List, NamedTuple
|
from typing import Callable, List, NamedTuple
|
||||||
|
|
||||||
|
|
||||||
class ParameterMode(IntEnum):
|
class ParameterMode(IntEnum):
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
from typing import List, NamedTuple
|
from typing import Callable, List, NamedTuple
|
||||||
|
|
||||||
|
|
||||||
class ParameterMode(IntEnum):
|
class ParameterMode(IntEnum):
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
from typing import List, NamedTuple
|
from typing import Callable, List, NamedTuple
|
||||||
|
|
||||||
|
|
||||||
class ParameterMode(IntEnum):
|
class ParameterMode(IntEnum):
|
||||||
|
|
|
@ -4,6 +4,7 @@ import sys
|
||||||
from cmath import phase
|
from cmath import phase
|
||||||
from itertools import groupby
|
from itertools import groupby
|
||||||
from math import gcd, pi
|
from math import gcd, pi
|
||||||
|
from pprint import pprint
|
||||||
from typing import NamedTuple, Set, Tuple
|
from typing import NamedTuple, Set, Tuple
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import sys
|
import sys
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
from typing import Iterable, List, NamedTuple, Tuple, TypeVar
|
from typing import Dict, Iterable, List, NamedTuple, Tuple, TypeVar
|
||||||
|
|
||||||
|
|
||||||
class ParameterMode(IntEnum):
|
class ParameterMode(IntEnum):
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import sys
|
import sys
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
from typing import Iterable, List, NamedTuple, Tuple, TypeVar
|
from typing import Dict, Iterable, List, NamedTuple, Tuple, TypeVar
|
||||||
|
|
||||||
|
|
||||||
class ParameterMode(IntEnum):
|
class ParameterMode(IntEnum):
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from functools import reduce
|
from functools import reduce
|
||||||
|
from itertools import chain, cycle
|
||||||
|
from typing import Iterable, List
|
||||||
|
|
||||||
|
|
||||||
def main() -> None:
|
def main() -> None:
|
||||||
|
|
|
@ -4,7 +4,7 @@ import sys
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
from enum import IntEnum
|
from enum import IntEnum
|
||||||
from typing import List, NamedTuple
|
from typing import Iterator, List, NamedTuple, Tuple
|
||||||
|
|
||||||
|
|
||||||
class ParameterMode(IntEnum):
|
class ParameterMode(IntEnum):
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
|
from collections import defaultdict
|
||||||
|
from copy import deepcopy
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import Dict, List, Set, Tuple
|
from typing import Dict, List, Set, Tuple
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ def update(grid: Grid) -> Grid:
|
||||||
|
|
||||||
|
|
||||||
def solve(grid: Grid) -> int:
|
def solve(grid: Grid) -> int:
|
||||||
|
|
||||||
for __ in range(6):
|
for __ in range(6):
|
||||||
grid = update(grid)
|
grid = update(grid)
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,7 @@ def update(grid: Grid) -> Grid:
|
||||||
|
|
||||||
|
|
||||||
def solve(grid: Grid) -> int:
|
def solve(grid: Grid) -> int:
|
||||||
|
|
||||||
for __ in range(6):
|
for __ in range(6):
|
||||||
grid = update(grid)
|
grid = update(grid)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from typing import List
|
from typing import Callable, Dict, List
|
||||||
|
|
||||||
"""
|
"""
|
||||||
E : T [ * T ]*
|
E : T [ * T ]*
|
||||||
|
|
|
@ -5,6 +5,7 @@ import itertools
|
||||||
import math
|
import math
|
||||||
import sys
|
import sys
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
from copy import deepcopy
|
||||||
from typing import Dict, Iterator, List, Set, Tuple
|
from typing import Dict, Iterator, List, Set, Tuple
|
||||||
|
|
||||||
Tile = List[List[str]]
|
Tile = List[List[str]]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import itertools
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from typing import List
|
from typing import List, Tuple
|
||||||
|
|
||||||
|
|
||||||
def solve(circle: List[int]) -> int:
|
def solve(circle: List[int]) -> int:
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import itertools
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from typing import List
|
from typing import List, Tuple
|
||||||
|
|
||||||
|
|
||||||
def solve(circle: List[int]) -> int:
|
def solve(circle: List[int]) -> int:
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
import itertools
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
from copy import deepcopy
|
||||||
from typing import Dict, Iterator, List, Tuple
|
from typing import Dict, Iterator, List, Tuple
|
||||||
|
|
||||||
Offset = Tuple[int, int]
|
Offset = Tuple[int, int]
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
import itertools
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from collections import Counter
|
from collections import Counter
|
||||||
|
from dataclasses import dataclass
|
||||||
from typing import Iterator, List, TypeVar
|
from typing import Iterator, List, TypeVar
|
||||||
|
|
||||||
T = TypeVar("T")
|
T = TypeVar("T")
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
import itertools
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from collections import Counter
|
from collections import Counter
|
||||||
|
from dataclasses import dataclass
|
||||||
from typing import Iterator, List, TypeVar
|
from typing import Iterator, List, TypeVar
|
||||||
|
|
||||||
T = TypeVar("T")
|
T = TypeVar("T")
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from math import ceil, floor
|
from math import ceil, floor
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import Dict, List, Set
|
from typing import Dict, List, Set
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from typing import Iterator, List, Tuple
|
from typing import Iterator, List, Tuple
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from typing import Iterator, List, Tuple
|
from typing import Iterator, List, Tuple
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from typing import List, Optional, cast
|
from typing import List, Optional, cast
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from typing import Iterator, List, Optional
|
from typing import Iterator, List, Optional
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import itertools
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
|
from copy import deepcopy
|
||||||
from typing import Iterator, List, Set, Tuple
|
from typing import Iterator, List, Set, Tuple
|
||||||
|
|
||||||
Grid = List[List[int]]
|
Grid = List[List[int]]
|
||||||
|
@ -38,7 +39,7 @@ def solve(input: List[str]) -> int:
|
||||||
# Second step, do flashes
|
# Second step, do flashes
|
||||||
has_flashed: Set[Point] = set()
|
has_flashed: Set[Point] = set()
|
||||||
while len(flashes := (excited(levels) - has_flashed)) > 0:
|
while len(flashes := (excited(levels) - has_flashed)) > 0:
|
||||||
for i, j in flashes:
|
for (i, j) in flashes:
|
||||||
has_flashed.add((i, j))
|
has_flashed.add((i, j))
|
||||||
for x, y in neighbours_of((i, j)):
|
for x, y in neighbours_of((i, j)):
|
||||||
levels[x][y] += 1
|
levels[x][y] += 1
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import itertools
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
|
from copy import deepcopy
|
||||||
from typing import Iterator, List, Set, Tuple
|
from typing import Iterator, List, Set, Tuple
|
||||||
|
|
||||||
Grid = List[List[int]]
|
Grid = List[List[int]]
|
||||||
|
@ -38,7 +39,7 @@ def solve(input: List[str]) -> int:
|
||||||
# Second step, do flashes
|
# Second step, do flashes
|
||||||
has_flashed: Set[Point] = set()
|
has_flashed: Set[Point] = set()
|
||||||
while len(flashes := (excited(levels) - has_flashed)) > 0:
|
while len(flashes := (excited(levels) - has_flashed)) > 0:
|
||||||
for i, j in flashes:
|
for (i, j) in flashes:
|
||||||
has_flashed.add((i, j))
|
has_flashed.add((i, j))
|
||||||
for x, y in neighbours_of((i, j)):
|
for x, y in neighbours_of((i, j)):
|
||||||
levels[x][y] += 1
|
levels[x][y] += 1
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from typing import Dict, List, Set
|
from typing import Dict, List, Set
|
||||||
|
@ -11,7 +12,7 @@ def solve(input: List[str]) -> int:
|
||||||
def parse() -> Map:
|
def parse() -> Map:
|
||||||
res: Map = defaultdict(set)
|
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[start].add(to)
|
||||||
res[to].add(start)
|
res[to].add(start)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from typing import Dict, List, Set
|
from typing import Dict, List, Set
|
||||||
|
@ -11,7 +12,7 @@ def solve(input: List[str]) -> int:
|
||||||
def parse() -> Map:
|
def parse() -> Map:
|
||||||
res: Map = defaultdict(set)
|
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[start].add(to)
|
||||||
res[to].add(start)
|
res[to].add(start)
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
import heapq
|
import heapq
|
||||||
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from typing import Iterator, List, NamedTuple, Set
|
from typing import Iterator, List, NamedTuple, Set, Tuple
|
||||||
|
|
||||||
|
|
||||||
class Point(NamedTuple):
|
class Point(NamedTuple):
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
import heapq
|
import heapq
|
||||||
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from typing import Iterator, List, NamedTuple, Set
|
from typing import Iterator, List, NamedTuple, Set, Tuple
|
||||||
|
|
||||||
|
|
||||||
class Point(NamedTuple):
|
class Point(NamedTuple):
|
||||||
|
|
|
@ -5,7 +5,7 @@ import functools
|
||||||
import itertools
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import Iterable, Iterator, List, Tuple
|
from typing import Iterable, Iterator, List, Tuple, TypeVar
|
||||||
|
|
||||||
RawPacket = List[bool]
|
RawPacket = List[bool]
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ import itertools
|
||||||
import math
|
import math
|
||||||
import sys
|
import sys
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import Callable, Dict, Iterable, Iterator, List, Tuple
|
from typing import Callable, Dict, Iterable, Iterator, List, Tuple, TypeVar
|
||||||
|
|
||||||
RawPacket = List[bool]
|
RawPacket = List[bool]
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
import itertools
|
import itertools
|
||||||
|
import math
|
||||||
import sys
|
import sys
|
||||||
from typing import Iterator, List, NamedTuple
|
from typing import Iterator, List, NamedTuple
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import itertools
|
||||||
|
import math
|
||||||
import sys
|
import sys
|
||||||
from typing import Iterator, List, NamedTuple
|
from typing import Iterator, List, NamedTuple
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import functools
|
||||||
import itertools
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import functools
|
||||||
import itertools
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import functools
|
||||||
import itertools
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import functools
|
import functools
|
||||||
import itertools
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from typing import List, NamedTuple, Optional, Set, Tuple
|
from typing import Iterator, List, NamedTuple, Optional, Set, Tuple, cast
|
||||||
|
|
||||||
|
|
||||||
class Point(NamedTuple):
|
class Point(NamedTuple):
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import functools
|
import functools
|
||||||
import itertools
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from typing import List, NamedTuple, Optional, Set, Tuple
|
from typing import Iterator, List, NamedTuple, Optional, Set, Tuple, cast
|
||||||
|
|
||||||
|
|
||||||
class Point(NamedTuple):
|
class Point(NamedTuple):
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import enum
|
import enum
|
||||||
import functools
|
import functools
|
||||||
import sys
|
import sys
|
||||||
from typing import Iterator, List, NamedTuple, Optional, Tuple
|
from typing import Iterator, List, NamedTuple, Optional, Tuple, cast
|
||||||
|
|
||||||
|
|
||||||
class Point(NamedTuple):
|
class Point(NamedTuple):
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import enum
|
import enum
|
||||||
import functools
|
import functools
|
||||||
import sys
|
import sys
|
||||||
from typing import Iterator, List, NamedTuple, Optional, Tuple
|
from typing import Iterator, List, NamedTuple, Optional, Tuple, cast
|
||||||
|
|
||||||
|
|
||||||
class Point(NamedTuple):
|
class Point(NamedTuple):
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import enum
|
||||||
import itertools
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from typing import List, NamedTuple, Set
|
from typing import Iterable, Iterator, List, NamedTuple, Set
|
||||||
|
|
||||||
|
|
||||||
class Point(NamedTuple):
|
class Point(NamedTuple):
|
||||||
|
@ -60,13 +61,11 @@ def solve(input: List[str]) -> int:
|
||||||
for x in range(map.dimensions.x):
|
for x in range(map.dimensions.x):
|
||||||
print(
|
print(
|
||||||
"".join(
|
"".join(
|
||||||
(
|
"v"
|
||||||
"v"
|
if Point(x, y) in map.south
|
||||||
if Point(x, y) in map.south
|
else ">"
|
||||||
else ">"
|
if Point(x, y) in map.east
|
||||||
if Point(x, y) in map.east
|
else "."
|
||||||
else "."
|
|
||||||
)
|
|
||||||
for y in range(map.dimensions.y)
|
for y in range(map.dimensions.y)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
@ -8,6 +8,7 @@ FileSystem = dict[str, Union[int, "FileSystem"]]
|
||||||
|
|
||||||
def solve(input: list[str]) -> int:
|
def solve(input: list[str]) -> int:
|
||||||
def build_tree(input: list[str], i: int = 0) -> tuple[FileSystem, int]:
|
def build_tree(input: list[str], i: int = 0) -> tuple[FileSystem, int]:
|
||||||
|
|
||||||
fs: FileSystem = {}
|
fs: FileSystem = {}
|
||||||
|
|
||||||
while i < len(input):
|
while i < len(input):
|
||||||
|
|
|
@ -8,6 +8,7 @@ FileSystem = dict[str, Union[int, "FileSystem"]]
|
||||||
|
|
||||||
def solve(input: list[str]) -> int:
|
def solve(input: list[str]) -> int:
|
||||||
def build_tree(input: list[str], i: int = 0) -> tuple[FileSystem, int]:
|
def build_tree(input: list[str], i: int = 0) -> tuple[FileSystem, int]:
|
||||||
|
|
||||||
fs: FileSystem = {}
|
fs: FileSystem = {}
|
||||||
|
|
||||||
while i < len(input):
|
while i < len(input):
|
||||||
|
|
|
@ -20,7 +20,7 @@ class HeightMap:
|
||||||
|
|
||||||
def reachable_neighbours(self, p: Point) -> Iterator[Point]:
|
def reachable_neighbours(self, p: Point) -> Iterator[Point]:
|
||||||
reachable_height = self.heights[p.x][p.y] + 1
|
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
|
x, y = p.x + dx, p.y + dy
|
||||||
if x < 0 or x >= len(self.heights):
|
if x < 0 or x >= len(self.heights):
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -20,7 +20,7 @@ class HeightMap:
|
||||||
|
|
||||||
def reachable_neighbours(self, p: Point) -> Iterator[Point]:
|
def reachable_neighbours(self, p: Point) -> Iterator[Point]:
|
||||||
reachable_height = self.heights[p.x][p.y] + 1
|
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
|
x, y = p.x + dx, p.y + dy
|
||||||
if x < 0 or x >= len(self.heights):
|
if x < 0 or x >= len(self.heights):
|
||||||
continue
|
continue
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import itertools
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
|
from collections import deque
|
||||||
from collections.abc import Iterator
|
from collections.abc import Iterator
|
||||||
from typing import NamedTuple
|
from typing import NamedTuple
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ class Operator(str, enum.Enum):
|
||||||
|
|
||||||
class Monkey:
|
class Monkey:
|
||||||
def get_value(self, monkeys: dict[str, "Monkey"]) -> int:
|
def get_value(self, monkeys: dict[str, "Monkey"]) -> int:
|
||||||
raise NotImplementedError
|
raise NotImplemented
|
||||||
|
|
||||||
|
|
||||||
@dataclasses.dataclass
|
@dataclasses.dataclass
|
||||||
|
|
|
@ -93,7 +93,7 @@ class MathObserver:
|
||||||
|
|
||||||
class Monkey:
|
class Monkey:
|
||||||
def get_value(self, monkeys: dict[str, "Monkey"]) -> Num:
|
def get_value(self, monkeys: dict[str, "Monkey"]) -> Num:
|
||||||
raise NotImplementedError
|
raise NotImplemented
|
||||||
|
|
||||||
|
|
||||||
@dataclasses.dataclass
|
@dataclasses.dataclass
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import functools
|
||||||
import math
|
import math
|
||||||
|
import operator as op
|
||||||
import sys
|
import sys
|
||||||
from collections import Counter
|
from collections import Counter
|
||||||
from enum import StrEnum
|
from enum import StrEnum
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
import dataclasses
|
||||||
import itertools
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from enum import StrEnum
|
from enum import StrEnum
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import functools
|
import functools
|
||||||
import heapq
|
import heapq
|
||||||
|
import itertools
|
||||||
import sys
|
import sys
|
||||||
from collections.abc import Iterator
|
from collections.abc import Iterator
|
||||||
from enum import Enum
|
from enum import Enum
|
||||||
|
|
33
flake.lock
33
flake.lock
|
@ -3,11 +3,11 @@
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696426674,
|
"lastModified": 1673956053,
|
||||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
||||||
"owner": "edolstra",
|
"owner": "edolstra",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -21,11 +21,11 @@
|
||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731533236,
|
"lastModified": 1694529238,
|
||||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -43,11 +43,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1709087332,
|
"lastModified": 1660459072,
|
||||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "gitignore.nix",
|
"repo": "gitignore.nix",
|
||||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -58,11 +58,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731890469,
|
"lastModified": 1701336116,
|
||||||
"narHash": "sha256-D1FNZ70NmQEwNxpSSdTXCSklBH1z2isPR84J6DQrJGs=",
|
"narHash": "sha256-kEmpezCR/FpITc6yMbAh4WrOCiT2zg5pSjnKrq51h5Y=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5083ec887760adfe12af64830a66807423a859a7",
|
"rev": "f5c27c6136db4d76c30e533c20517df6864c46ee",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -75,6 +75,9 @@
|
||||||
"pre-commit-hooks": {
|
"pre-commit-hooks": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
|
"flake-utils": [
|
||||||
|
"futils"
|
||||||
|
],
|
||||||
"gitignore": "gitignore",
|
"gitignore": "gitignore",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
|
@ -84,11 +87,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732021966,
|
"lastModified": 1700922917,
|
||||||
"narHash": "sha256-mnTbjpdqF0luOkou8ZFi2asa1N3AA2CchR/RqCNmsGE=",
|
"narHash": "sha256-ej2fch/T584b5K9sk1UhmZF7W6wEfDHuoUYpFN8dtvM=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "pre-commit-hooks.nix",
|
"repo": "pre-commit-hooks.nix",
|
||||||
"rev": "3308484d1a443fc5bc92012435d79e80458fe43c",
|
"rev": "e5ee5c5f3844550c01d2131096c7271cec5e9b78",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
12
flake.nix
12
flake.nix
|
@ -22,6 +22,7 @@
|
||||||
repo = "pre-commit-hooks.nix";
|
repo = "pre-commit-hooks.nix";
|
||||||
ref = "master";
|
ref = "master";
|
||||||
inputs = {
|
inputs = {
|
||||||
|
flake-utils.follows = "futils";
|
||||||
nixpkgs.follows = "nixpkgs";
|
nixpkgs.follows = "nixpkgs";
|
||||||
nixpkgs-stable.follows = "nixpkgs";
|
nixpkgs-stable.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
@ -39,11 +40,15 @@
|
||||||
src = self;
|
src = self;
|
||||||
|
|
||||||
hooks = {
|
hooks = {
|
||||||
nixpkgs-fmt = {
|
black = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
ruff-format = {
|
isort = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs-fmt = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -53,11 +58,12 @@
|
||||||
devShell = pkgs.mkShell {
|
devShell = pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
(python3.withPackages (ps: with ps; [
|
(python3.withPackages (ps: with ps; [
|
||||||
|
black
|
||||||
|
isort
|
||||||
mypy
|
mypy
|
||||||
z3
|
z3
|
||||||
]))
|
]))
|
||||||
pyright
|
pyright
|
||||||
ruff
|
|
||||||
];
|
];
|
||||||
|
|
||||||
inherit (self.checks.${system}.pre-commit) shellHook;
|
inherit (self.checks.${system}.pre-commit) shellHook;
|
||||||
|
|
Loading…
Reference in a new issue