π aoc
βββ π 2021
βΒ Β βββ π day-1
βΒ Β βΒ Β βββ ξ SonarSweep.py
βΒ Β βΒ Β βββ ο
input.txt
β .
β .
βββ π 2022
βΒ Β βββ π day-01
βΒ Β βΒ Β βββ ξ CalorieCounting.py
βΒ Β βΒ Β βββ ο
input.txt
βΒ Β βββ π day-02
βΒ Β βββ ξ Rock_Paper_Scissors.py
βΒ Β βββ ο
input.txt
β .
β .
β .
β .
βββ π scripts
βΒ Β βββ ξ― create.sh
βΒ Β βββ ξ― download_aoc_input.ps1
βΒ Β βββ ξ― download_aoc_input.sh
βΒ Β βββ run.sh
βββ π templates
βΒ Β βββ ξ template.py
β .
β .
βββ π utils
βββ ξ __init__.py
βββ ξ args.py
βββ ξ utils.py
.
. - Clone this repository
git clone git@github.com:PrashanthaTP/AdventOfCode.git- Change directory
cd aoc- Create a virtual environment
python -m venv .- Activate virtual environment
source Scripts/activate #this script will be available after venv creation- Install current directory as a editable package
pip install -e .To deactivate virtual environment :
deactivate
- Add your Advent Of Code website's session id in
aoc/utils/.env
cp aoc/utils/.env.sample aoc/utils/.env
# replace SESSION value- To create a particular day's starting code
./aoc/scripts/create.sh <day num>which creates these two files input.txt and <que_name>.py
inside aoc/<curr year>/day-<day num>
- To Run a particular day's code
./aoc/scripts/run.sh <day num> -n <part num for the challenge (1 or 2)>