hrushikeshrv / aoc

My attempts at Advent of Code, along with a smaller helper library to streamline daily AoC tasks.

Home Page:http://hrus.in/aoc/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AOC

My attempts at Advent of Code, along with a small helper library to streamline my daily AoC tasks.
Advent of Code 2020
Advent of Code 2021
Advent of Code 2022
Advent of Code 2023

You can find documentation for this library at hrus.in/aoc/

Compliance with AoC Guidelines

The helper and utility functions included in this library follow the guidelines given by the Advent of Code Wiki.

Specifically:

  • No automated requests are made, only user initiated.
  • Inputs are only fetched if they don't exist locally, and user confirmation is asked if overwriting local input.
  • All local solutions are cached before submitting, and if the user tries to submit a solution that is already stored and known to be incorrect, no request is made and user is informed of incorrect solution.
  • All requests contain a User-Agent header returned by aoc.utils.get_request_headers with my contact information, since I maintain this tool.

Installing This Library

I've mainly written this package just for myself, and so it follows my preferred directory structure and solution template for solving AoC problems. But you're welcome to use this package if you want to!

You can find documentation for the API at hrus.in/aoc/

Since the aoc name is already taken on PyPI, to use this library, you will have to install it from this source code in a virtual environment.

  1. Get the source code by cloning this repository.
  2. Create a directory for your Advent of Code solutions. All of your AoC solutions (even for future years) will be stored in this directory.
  3. Create a virtual environment by running python -m venv venv, or use your preferred virtual environment.
  4. Activate your virtual environment.
  5. Install this code by running the following from the project's root directory -
pip install -e .

You can now use the helper functions in this library! You can find documentation for the API in docs/.

About

My attempts at Advent of Code, along with a smaller helper library to streamline daily AoC tasks.

http://hrus.in/aoc/

License:MIT License


Languages

Language:Python 87.1%Language:Jupyter Notebook 12.3%Language:Ruby 0.6%