Helpers for Advent of Codee
Project description
santa-helpers
Helpers for Advent of Codee
Free software: MIT license
Documentation: https://santa-helpers.readthedocs.io.
Features
Calculate manhattan distance
>>> distances.manhattan((-3, 1), (0, 0)) 4
Generate neighbors
>>> list(neighbors.neighbors((1, 1))) [(1, 0), (0, 1), (2, 1), (1, 2)] >>> list(neighbors.neighbors((1, 1), 8)) [ (0, 0), (1, 0), (2, 0), (0, 1), (2, 1), (0, 2), (1, 2), (2, 2) ] >>> list(neighbors.neighbors((1, 1), p_min=(1, 1))) [(2, 1), (1, 2)]
Generate points in path
>>> list(paths.path_points((0, 0), 'R2')) [(1, 0), (2, 0)]
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.0.1 (2022-02-02)
First release on PyPI.
neighbors
parsing to dict
0.0.2 (2022-03-08)
manhattan distance
points in path
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
santa_helpers-0.0.2.tar.gz
(17.2 kB
view details)
Built Distribution
File details
Details for the file santa_helpers-0.0.2.tar.gz
.
File metadata
- Download URL: santa_helpers-0.0.2.tar.gz
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.8.2 requests/2.27.1 setuptools/60.2.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c6633a9f6dc51d6b4944560b8aef9bdd050fc82de97e26c65b31c89bb5db6c9 |
|
MD5 | c2395db261e87e11e8072ebe7dc3d894 |
|
BLAKE2b-256 | 736f83a081bf2f05dad883f3af5ff155a6d8476bc6db965dd4ec9c51aa895e34 |
File details
Details for the file santa_helpers-0.0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: santa_helpers-0.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.8.2 requests/2.27.1 setuptools/60.2.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b081ce221a02b3a3f406922d64b86f19a29505ef7eae283f01e6fda164a69d64 |
|
MD5 | 7b3685c71c2e2f59fc6b2b32aeb0d762 |
|
BLAKE2b-256 | 7bd910426d14943fe819f532d6bc4d01a7234c61ff50970fb4d14738cf2fc0c3 |