Compare commits

..

129 commits

Author SHA1 Message Date
da90cd8472 nix: add direnv integration 2021-12-01 10:42:02 +01:00
8e0ec0b962 nix: add flake 2021-12-01 10:42:02 +01:00
cb0348d87c 2020: d25: ex2: add solution 2021-12-01 10:42:02 +01:00
55af2695f5 2020: d25: ex2: add input 2021-12-01 10:42:02 +01:00
a7d74dcae6 2020: d25: ex1: add solution 2021-12-01 10:42:02 +01:00
17f62f1052 2020: d25: ex1: add input 2021-12-01 10:42:02 +01:00
afec744618 2020: d24: ex2: add solution 2021-12-01 10:42:02 +01:00
a21b197240 2020: d24: ex2: add input 2021-12-01 10:42:02 +01:00
96db7c6d02 2020: d24: ex1: add solution 2021-12-01 10:42:02 +01:00
caf14a71b6 2020: d24: ex1: add input 2021-12-01 10:42:02 +01:00
2418405955 2020: d23: ex2: add solution 2021-12-01 10:42:02 +01:00
20ee194643 2020: d23: ex2: add input 2021-12-01 10:42:02 +01:00
d4c9aa4c5e 2020: d23: ex1: add solution 2021-12-01 10:42:02 +01:00
820794cc80 2020: d23: ex1: add input 2021-12-01 10:42:02 +01:00
19b48862ce 2020: d22: ex2: add solution 2021-12-01 10:42:02 +01:00
dddd70813a 2020: d22: ex2: add input 2021-12-01 10:42:02 +01:00
84ac5bbb71 2020: d22: ex1: add solution 2021-12-01 10:42:02 +01:00
7851f1158f 2020: d22: ex1: add input 2021-12-01 10:42:02 +01:00
be4a02ce44 2020: d21: ex2: add solution 2021-12-01 10:42:02 +01:00
e8a8d36ac9 2020: d21: ex2: add input 2021-12-01 10:42:02 +01:00
0be38033f4 2020: d21: ex1: add solution 2021-12-01 10:42:02 +01:00
ed18966413 2020: d21: ex1: add input 2021-12-01 10:42:02 +01:00
20784cb2ca 2020: d20: ex2: add solution 2021-12-01 10:42:02 +01:00
150bebc492 2020: d20: ex2: add input 2021-12-01 10:42:02 +01:00
cd747e69e6 2020: d20: ex1: add solution 2021-12-01 10:42:02 +01:00
96980ecb19 2020: d20: ex1: add input 2021-12-01 10:42:02 +01:00
df664d9fca 2020: d19: ex2: add solution 2021-12-01 10:42:02 +01:00
ab15ce121f 2020: d19: ex2: add input 2021-12-01 10:42:02 +01:00
22e59128fb 2020: d19: ex1: add solution 2021-12-01 10:42:02 +01:00
aee3b2f333 2020: d19: ex1: add input 2021-12-01 10:42:02 +01:00
1d1936f5e7 2020: d18: ex2: add solution 2021-12-01 10:42:02 +01:00
2d4a21dc9a 2020: d18: ex2: add input 2021-12-01 10:42:02 +01:00
34d72e9729 2020: d18: ex1: add solution 2021-12-01 10:42:02 +01:00
932e5a40f7 2020: d18: ex1: add input 2021-12-01 10:42:02 +01:00
8c2a2ed438 2020: d17: ex2: add solution 2021-12-01 10:42:02 +01:00
6dcd2bcf69 2020: d17: ex2: add input 2021-12-01 10:42:02 +01:00
ef6e30cb6c 2020: d17: ex1: add solution 2021-12-01 10:42:02 +01:00
d36fb3473d 2020: d17: ex1: add input 2021-12-01 10:42:02 +01:00
80a4297e93 2020: d16: ex2: add solution 2021-12-01 10:42:02 +01:00
a529394eb4 2020: d16: ex2: add input 2021-12-01 10:42:02 +01:00
6501cb9cf5 2020: d16: ex1: add solution 2021-12-01 10:42:02 +01:00
7e162a4e7a 2020: d16: ex1: add input 2021-12-01 10:42:02 +01:00
1831dc4b8f 2020: d15: ex2: add solution 2021-12-01 10:42:02 +01:00
ef2957970a 2020: d15: ex2: add input 2021-12-01 10:42:02 +01:00
832159237f 2020: d15: ex1: add solution 2021-12-01 10:42:02 +01:00
c1aaae7946 2020: d15: ex1: add input 2021-12-01 10:42:02 +01:00
2de3573cfd 2020: d15: ex2: add solution 2021-12-01 10:42:02 +01:00
a1c2123291 2020: d15: ex2: add input 2021-12-01 10:42:02 +01:00
f97a35248d 2020: d14: ex1: add solution 2021-12-01 10:42:02 +01:00
78f159598d 2020: d14: ex1: add input 2021-12-01 10:42:02 +01:00
bf2c65036f 2020: d13: ex2: add solution 2021-12-01 10:42:02 +01:00
bf81ef41f8 2020: d13: ex2: add input 2021-12-01 10:42:02 +01:00
617a003a51 2020: d13: ex1: add solution 2021-12-01 10:42:02 +01:00
08ce15d6c0 2020: d13: ex1: add input 2021-12-01 10:42:02 +01:00
52fba3b92f 2020: d12: ex2: add solution 2021-12-01 10:42:02 +01:00
05670f39c0 2020: d12: ex2: add input 2021-12-01 10:42:02 +01:00
0cd15bb346 2020: d12: ex1: add solution 2021-12-01 10:42:02 +01:00
060ba38597 2020: d12: ex1: add input 2021-12-01 10:42:02 +01:00
4b71dee7c4 2020: d11: ex2: add solution 2021-12-01 10:42:02 +01:00
e9cab0c0bf 2020: d11: ex2: add input 2021-12-01 10:42:02 +01:00
acc175e4a6 2020: d11: ex1: add solution 2021-12-01 10:42:02 +01:00
c318b9970c 2020: d11: ex1: add input 2021-12-01 10:42:02 +01:00
d3abeae02a 2020: d10: ex2: add solution 2021-12-01 10:42:02 +01:00
5fb874f00b 2020: d10: ex2: add input 2021-12-01 10:42:02 +01:00
9bc536f6ec 2020: d10: ex1: add solution 2021-12-01 10:42:02 +01:00
f67de590ce 2020: d10: ex1: add input 2021-12-01 10:42:02 +01:00
f3456d2ca9 2020: d09: ex2: add solution 2021-12-01 10:42:02 +01:00
e127a77443 2020: d09: ex2: add input 2021-12-01 10:42:02 +01:00
5da7942d78 2020: d09: ex1: add solution 2021-12-01 10:42:02 +01:00
074226098f 2020: d09: ex1: add input 2021-12-01 10:42:02 +01:00
d7e74e60f1 2020: d08: ex2: add solution 2021-12-01 10:42:02 +01:00
5a39d2babe 2020: d08: ex2: add input 2021-12-01 10:42:02 +01:00
17138bfc8f 2020: d08: ex1: add solution 2021-12-01 10:42:02 +01:00
0ed6d5eb43 2020: d08: ex1: add input 2021-12-01 10:42:02 +01:00
d3a1040f60 2020: d07: ex2: add solution 2021-12-01 10:42:02 +01:00
acc9ef472c 2020: d07: ex2: add input 2021-12-01 10:42:02 +01:00
146b3becf9 2020: d07: ex1: add solution 2021-12-01 10:42:02 +01:00
7d268d0d4f 2020: d07: ex1: add input 2021-12-01 10:42:02 +01:00
a226768e08 2020: d06: ex2: add solution 2021-12-01 10:42:02 +01:00
1c64a8f18b 2020: d06: ex2: add input 2021-12-01 10:42:02 +01:00
79ad4a26b5 2020: d06: ex1: add solution 2021-12-01 10:42:02 +01:00
032223781d 2020: d06: ex1: add input 2021-12-01 10:42:02 +01:00
233caf8b11 2020: d05: ex2: add solution 2021-12-01 10:42:02 +01:00
18d95d8665 2020: d05: ex2: add input 2021-12-01 10:42:02 +01:00
390eb447cc 2020: d05: ex1: add solution 2021-12-01 10:42:02 +01:00
b25f2908d5 2020: d05: ex1: add input 2021-12-01 10:42:02 +01:00
4cf562410a 2020: d04: ex2: add solution 2021-12-01 10:42:02 +01:00
26e3bd0006 2020: d04: ex2: add input 2021-12-01 10:42:02 +01:00
005501546f 2020: d04: ex1: add solution 2021-12-01 10:42:02 +01:00
dd8a4569d2 2020: d04: ex1: add input 2021-12-01 10:42:02 +01:00
4121ef0880 2020: d03: ex2: add solution 2021-12-01 10:42:02 +01:00
9c6b5bf887 2020: d03: ex2: add input 2021-12-01 10:42:02 +01:00
93dfa3ab8c 2020: d03: ex1: add solution 2021-12-01 10:42:02 +01:00
4125c20fb7 2020: d03: ex1: add input 2021-12-01 10:42:02 +01:00
878b0a10d3 2019: d19: ex2: add solution 2021-12-01 10:42:02 +01:00
e812fd424a 2019: d19: ex2: add input 2021-12-01 10:42:02 +01:00
d868e9f5a9 2019: d19: ex1: add solution 2021-12-01 10:42:02 +01:00
8733c82b46 2019: d19: ex1: add input 2021-12-01 10:42:02 +01:00
533fce5d69 2019: d18: ex2: add solution 2021-12-01 10:42:02 +01:00
5929fd5f07 2019: d18: ex2: add input 2021-12-01 10:42:02 +01:00
1014d1546b 2019: d18: ex1: add solution 2021-12-01 10:42:02 +01:00
5f9288aa5f 2019: d18: ex1: add input 2021-12-01 10:42:02 +01:00
0d175c824f 2020: d02: ex2: add solution 2021-12-01 10:42:02 +01:00
776577c118 2020: d02: ex2: add input 2021-12-01 10:42:02 +01:00
a304a38046 2020: d02: ex1: add solution 2021-12-01 10:42:02 +01:00
17a4286307 2020: d02: ex1: add input 2021-12-01 10:42:02 +01:00
6d30ed5992 2020: d01: ex2: add solution 2021-12-01 10:42:02 +01:00
30a7a7da33 2020: d01: ex2: add input 2021-12-01 10:42:02 +01:00
82f57ddea5 2020: d01: ex1: add solution 2021-12-01 10:42:02 +01:00
dad9912dd2 2020: d01: ex1: add input 2021-12-01 10:42:02 +01:00
07223f9d30 2019: d17: ex2: add solution 2021-12-01 10:42:02 +01:00
254093a24d 2019: d17: ex2: add input 2021-12-01 10:42:02 +01:00
ffe7fa42d5 2019: d17: ex1: add solution 2021-12-01 10:42:02 +01:00
035b8b5a0f 2019: d17: ex1: add input 2021-12-01 10:42:02 +01:00
704cf451cb 2019: d16: ex2: add solution 2021-12-01 10:42:02 +01:00
c1c5abc0a4 2019: d16: ex2: add input 2021-12-01 10:42:02 +01:00
78954b23e5 2019: d16: ex1: add solution 2021-12-01 10:42:02 +01:00
e4699300b0 2019: d16: ex1: add input 2021-12-01 10:42:02 +01:00
3fc73336a4 2019: d15: ex2: add solution 2021-12-01 10:42:02 +01:00
ac39fe2abb 2019: d15: ex2: add input 2021-12-01 10:42:02 +01:00
1b8f5bc5e0 2019: d15: ex1: add solution 2021-12-01 10:42:02 +01:00
ed9ba2c14a 2019: d15: ex1: add input 2021-12-01 10:42:02 +01:00
d3445b2ef1 2019: d14: ex2: add solution 2021-12-01 10:42:02 +01:00
2b15ae7552 2019: d14: ex2: add input 2021-12-01 10:42:02 +01:00
213575d822 2019: d14: ex1: add solution 2021-12-01 10:42:02 +01:00
030f45af6c 2019: d14: ex1: add input 2021-12-01 10:42:02 +01:00
3a19846717 2019: d13: ex2: add solution 2021-12-01 10:42:02 +01:00
94dffe573c 2019: d13: ex2: add input 2021-12-01 10:42:02 +01:00
20d47b0048 2019: d13: ex1: add solution 2021-12-01 10:42:02 +01:00
5 changed files with 143 additions and 2 deletions

7
.envrc Normal file
View file

@ -0,0 +1,7 @@
use_flake() {
watch_file flake.nix
watch_file flake.lock
eval "$(nix print-dev-env)"
}
use flake

View file

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

69
flake.lock generated Normal file
View file

@ -0,0 +1,69 @@
{
"nodes": {
"futils": {
"locked": {
"lastModified": 1638122382,
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
"type": "github"
},
"original": {
"owner": "numtide",
"ref": "master",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1638286143,
"narHash": "sha256-A+rgjbIpz3uPRKHPXwdmouVcVn5pZqLnaZHymjkraG4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "29d1f6e1f625d246dcf84a78ef97b4da3cafc6ea",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-utils": [
"futils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1637745948,
"narHash": "sha256-DmQG1bZk24eS+BAHwnHPyYIadMLKbq0d1b//iapYIPU=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "c3b4f94350b0e59c2546fa85890cc70d03616b9c",
"type": "github"
},
"original": {
"owner": "cachix",
"ref": "master",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": {
"inputs": {
"futils": "futils",
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks"
}
}
},
"root": "root",
"version": 7
}

65
flake.nix Normal file
View file

@ -0,0 +1,65 @@
{
description = "Advent of Code answers";
inputs = {
futils = {
type = "github";
owner = "numtide";
repo = "flake-utils";
ref = "master";
};
nixpkgs = {
type = "github";
owner = "NixOS";
repo = "nixpkgs";
ref = "nixos-unstable";
};
pre-commit-hooks = {
type = "github";
owner = "cachix";
repo = "pre-commit-hooks.nix";
ref = "master";
inputs = {
flake-utils.follows = "futils";
nixpkgs.follows = "nixpkgs";
};
};
};
outputs = { self, futils, nixpkgs, pre-commit-hooks }:
futils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
in
{
checks = {
pre-commit = pre-commit-hooks.lib.${system}.run {
src = self;
hooks = {
black = {
enable = true;
};
isort = {
enable = true;
};
nixpkgs-fmt = {
enable = true;
};
};
};
};
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
python310 # Latest version at the moment
];
inherit (self.checks.${system}.pre-commit) shellHook;
};
});
}