Compare commits

..

129 commits

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