Have fun or practice your skills:
- Solve puzzles using dictation (integrated with Advent of Code!).
- Describe code at a high-level (like in interviews/collaboration).
Advent of Code Integration
Automated puzzle-solving experience:
- Creates files.
- Downloads inputs.
- Runs code.
- Submits answers.
Note: AI should not be used for AOC submissions impacting leaderboards. For more info, see https://adventofcode.com/about.
Supports OpenAI or a locally run model for privacy.
python -m pip install langchain
python -m pip install openai
First, create your key.
Then:
- Modify this line in config.py:
OAI_API_KEY=None # replace with string
or
- Set an environment variable like:
export OAI_API_KEY='<your-key>'
Work in progress.
Install/configure LLM utility with below commands:
python -m pip install llm
llm install llm-gpt4all
Then:
- Modify this line in config.py:
LOCAL_LLM='mistral-7b-openorca' # replace with model name from llm utility
or
- Set an environment variable like:
export LOCAL_LLM='mistral-7b-openorca'
This allows automation of downloading input and submitting answers.
- Login to adventofcode.com
- Get your session key from inspecting the webpage:
- Open the Inspector (CTRL + SHIFT + C).
- Copy the cookie value called "session" in Application > Cookies
- Modify config:
- Modify this line in config.py:
AOC_SESSION_KEY=None # replace with string
OR
- Set an environment variable like:
export AOC_SESSION_KEY='<your-key>'
Some AOC submission logic is inspired by github.com/caderek/aocrunner. Like aocrunner, this project respects the concerns of the AoC creator, and limits unnecessary requests.
The tool:
- Downloads inputs once (re-download by deleting the input directory).
- Submits only valid answers (final output, if it's a single number).
- Prevents resubmissions until the server-specified timeout for incorrect answers.