Small project about finding "nerdy anniversaries". An obvious example would be that after 3.1415... years one could celebrate the
Simply use
$ pip install nerdyversary
to install this package in your environment.
To install nerdyversary
from source, follow these steps below:
-
Clone the repository
$ git clone https://github.com/rmnldwg/nerdyversary
-
Create a Virtual Environment (optional, but recommended)
$ python3 -m venv .venv
You should do this with an installation of Python 3.10 or later. And don't forget to activate the environment with
$ source .venv/bin/activate
-
Use
pip
to install$ pip install -U pip setuptools setuptools-scm $ pip install .
usage: nerdyversary [-h] [-v] [-d SPECIAL_DAY] [-s START] [-e END]
[--max-power MAX_POWER] [--factor-lim FACTOR_LIM]
[--format FORMAT]
Find beautiful nerdyversaries.
options:
-h, --help show this help message and exit
-v, --version Show the installed version and exit.
-d SPECIAL_DAY, --special-day SPECIAL_DAY
Date of the special day in ISO format. (default: 2023-01-04)
-s START, --start START
Date when to start with search in ISO format. (default:
2023-01-04)
-e END, --end END Date when to end the search in ISO format. (default:
2024-01-04)
--max-power MAX_POWER
Largest exponent to consider for building the nerdyversaries.
(default: 5)
--factor-lim FACTOR_LIM
Largest multiple of a symbol that is accepted. (default: 10)
--format FORMAT The output format that will be used by the `tabulate` package.
(default: simple)
The FORMAT
argument must be one of the strings the tabulate package understands.
An example: The input
$ nerdyversary -d 2012-12-21 -s 2023-01-01 -e 2024-01-01 --format pipe --factor-lim 4 --max-power 3
will yield a markdown table that renders into the following:
Date | Days | Years | Expression |
---|---|---|---|
6. Jan 2023 | 3668 | 10.04 | |
24. Feb 2023 | 3717 | 10.18 | |
12. Jun 2023 | 3825 | 10.47 | |
19. Jun 2023 | 3832 | 10.49 | |
25. Jul 2023 | 3868 | 10.59 | |
5. Nov 2023 | 3971 | 10.87 | |
12. Nov 2023 | 3978 | 10.89 | |
14. Dec 2023 | 4010 | 10.98 |
The symbols here are
- the golden ratio
$\phi \approx 1.618\ldots$ - the number
$\pi \approx 3.1415\ldots$ - Euler's number
$e \approx 2.718\ldots$
When using this package as a library, arbitrary constants may be defined as symbols.
The API documentation is hosted here.