% git clone https://github.com/1npo/aoc2022-py.git
% cd aoc2022-py
% pip install .
Each puzzle has two solutions: One written in pure Python, and the other using Pandas dataframes. The pure Python solution will run by default. To run the Pandas dataframe solution, add the --pandas flag (or -p for short) to the following commands:
Use the --all flag (or -a for short), eg:
% aoc2022 -a
[!] Solving the puzzle for all days.
[!] December 1...
[+] Part 1 answer: 69795
[+] Part 2 answer: 208437
...
Use the --day flag (or -d for short), and provide a day number (1-31), eg:
% aoc2022-py -d 1
[!] Solving the puzzle for December 1...
[+] Part 1 answer: 69795
[+] Part 2 answer: 208437
(NOTE: N = the day in December)
- Save the puzzle input in
aoc2022/days/inputs/with the filenamedayN.txt. - Write a module in
aoc2022/days/that...- Has the filename
dayN.py - Includes a
solver()function that takes a file path (str) argument
- Has the filename
- Implement the logic for solving the puzzle in
solver() - Solve the puzzle with
aoc2022-py -d N - Profit!