This repository contains my Python solutions to the Advent of Code puzzles.
Clone the repository:
git clone https://github.com/Quentin18/advent-of-code.gitMove to the root of the repository:
cd advent-of-code/Install the dependencies:
pip install -r requirements.txtCreate a .env file with your session cookie:
echo -e "SESSION_COOKIE=your_session_cookie" > .env- The repository contains one folder per year.
- For each year, there is one folder per day named
day[xx]. - For each day, the following files are present:
- Test input in
input_test.txt - Puzzle input in
input.txt - Script to solve part 1 in
part1.py - Script to solve part 2 in
part2.py
- Test input in
Move in the directory of the puzzle day (example with day 1 of 2023):
cd 2023/day01/Run the part1.py script to get the solution of the first part:
python part1.pyRun the part2.py script to get the solution of the second part:
python part2.pyTo make the folder for a new day, use the main script (example with day 1 of 2023):
python main.py -y 2023 -d 1