Skip to main content

Solutions to Advent of Code puzzles.

Project description

Adventkit -- Advent of Code in Python

These are my solutions in Python to some of the Advent of Code puzzles. My goal is to make the code readable while also making it reasonably fast.

Installation

You can install Adventkit using pip:

pip install adventkit

Alternatively, after cloning the Adventkit repository, the code can be run as is.

Requirements

  • Python 3.6.1+
  • Puzzle input files placed in the right locations: the input for day 1 of Advent of Code 2019 is read from input/year2019/d01.txt (relative to the current working directory).

Optional, to run src/run.sh after cloning the repository:

  • A POSIX-compliant shell (/bin/sh)
  • A shell command python3 to run Python 3.6.1+ (any implementation)
  • If extra speed is desired on selected puzzles: A shell command pypy3 to invoke PyPy 3.6+

How to run

After installing Adventkit, you can run a single day's solver like this:

adventkit 2019 10

Cloning the repository gives you more options:

  • Run a single day's solver: src/run.sh 2019 10 (or python3 src/run.py 2019 10)
  • Run all solvers: src/run.sh
  • Run all solvers from one year: src/run.sh 2019

When invoked with the optional argument --time, src/run.sh prints the execution time for each day. If the command pypy3 invokes a suitable version of PyPy, src/run.sh uses it for any solvers that are expected to run faster under PyPy than CPython.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adventkit-0.1.0.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

adventkit-0.1.0-py3-none-any.whl (25.9 kB view details)

Uploaded Python 3

File details

Details for the file adventkit-0.1.0.tar.gz.

File metadata

  • Download URL: adventkit-0.1.0.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for adventkit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e8ec976d32a46f5bcc0033b58e2eea79a4192efaa6e3d988db6ed491086de7d7
MD5 03f30e0d603841476b3ba743be3e6cdd
BLAKE2b-256 65fb773ebffa5ad1e9b4e03e1327006daaf63eb23b4c07910b8cec183046b4e8

See more details on using hashes here.

File details

Details for the file adventkit-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: adventkit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 25.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for adventkit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1406a905c8fd71495025cd647fe1685712170d4de4a95e71c622ea557215dcc1
MD5 4b141fa7566d73b1a9bf3c1d32c51803
BLAKE2b-256 1ca6d80fc961a59f55cfe65d816c0f611ba478311e0d12a4bbd42ae627725218

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page