Skip to content

PrashanthaTP/advent-of-code-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Advent Of Code Challenges

📂 Folder Structure

📂 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
        .   
        .   

📐 Setup

  • Clone this repository
git clone [email protected]: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

📜 Scripts

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

About

Template repository for Advent Of Code Challenges

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published