From 6081f917c01a5eec33d06169c1f9ba757ae97501 Mon Sep 17 00:00:00 2001 From: setop Date: Thu, 26 Dec 2024 00:39:32 +0100 Subject: [PATCH] chore: tooling --- .tool-versions | 2 ++ get_input.sh | 4 +++- requirements.txt | 1 + starter.py | 23 +++++++++++++++++++++++ 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .tool-versions create mode 100644 requirements.txt create mode 100644 starter.py diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..6a34d4c --- /dev/null +++ b/.tool-versions @@ -0,0 +1,2 @@ +python pypy3.10-7.3.12 +gleam 1.4.1 diff --git a/get_input.sh b/get_input.sh index f4f74ec..8a74c30 100755 --- a/get_input.sh +++ b/get_input.sh @@ -4,7 +4,7 @@ cd "$(dirname $(realpath $0))" . .env -d=$(date +%d) +d=${1-$(date +%d)} e=$(bc <<< "$d + 0") mkdir -p d${d} @@ -19,4 +19,6 @@ cd d${d} -o input \ "https://adventofcode.com/2024/day/$e/input" +cp ../starter.py part1.py + echo $(realpath .) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..24ce15a --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +numpy diff --git a/starter.py b/starter.py new file mode 100644 index 0000000..0e9aeee --- /dev/null +++ b/starter.py @@ -0,0 +1,23 @@ +import sys +from grid import * +from collections import defaultdict as DD +from collections import Counter as CT +from collections import deque as DQ +from functools import cmp_to_key as ck +from functools import cache +from itertools import combinations as comb +from itertools import product as prod +from itertools import cycle +E = enumerate + +I = sys.stdin.read().strip().split('\n') +#G = [list(l) for l in I.split('\n')] +#W, H = grid_geom(G) + +ans = 0 + +for i,x in E(I): + print(i,x) + +print(ans) +