https://github.com/racinmat/advent_of_code_2022
My Advent od Code repository, in SQL&Python, 2022
https://github.com/racinmat/advent_of_code_2022
Last synced: about 2 months ago
JSON representation
My Advent od Code repository, in SQL&Python, 2022
- Host: GitHub
- URL: https://github.com/racinmat/advent_of_code_2022
- Owner: racinmat
- Created: 2022-12-01T18:20:36.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-31T12:23:50.000Z (over 2 years ago)
- Last Synced: 2025-02-16T03:45:26.680Z (4 months ago)
- Language: C
- Size: 28.1 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Advent of Code 2022 in Python or SQL
Solutions of annual coding challenge https://adventofcode.com/ written in PostgreSQL and Python
(python as a fallback if SQL would be too annoying).Benchmarks
## Initialization
Run this to create conda env:
```bash
conda create -n aoc2022 -c conda-forge python=3.10 poetry
conda activate aoc2022
poetry init
poetry add advent-of-code-data psycopg2 PyYAML treelib numpy
```Run `python init.py` to generate base parts of the code base for each day.
In order to download the input data programatically, log in to adventofcode.com, and then grab the cookie token and put it to `secret.yaml`.
Run the db by `docker-compose up -d`
solvers for day 16 downloaded from
https://sites.google.com/view/enhsp/?pli=1
https://fai.cs.uni-saarland.de/hoffmann/metric-ff.html
https://cw.fel.cvut.cz/old/_media/courses/a4m36pah/assignments/planners64.zipthe compiled.py must be ran before the main.py, if present, to compile the numba code.