π 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)>