
Product
Introducing Rust Support in Socket
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
A collection of functions to play with Lychrel numbers and other funny mathematical problems
This is a collection of python functions which implements famous mathematical problems, and it is named after the lychrel numbers.
Under the hood lychrel is implemented in rust thanks to PyO3.
User guide and documentation: lychrel.readthedocs.io
Any contribution is welcome!
read_out_loud(3211) == 131221
because the
number 3211
is read as "one 3, one 2 and two 1s".list(collatz(5)) == [5, 16, 8, 4, 2, 1]
.Lychrel is available on PyPi, to install it just type on your favourite shell:
pip install lychrel
If you want to install lychrel from source code, clone this repo and create a virtual environment with python 3.7+ using your favourite tool (conda, virtualenv, etc.), then follow these steps:
pip install -r requirements-dev.txt
maturin develop
For optimal performances add the --release
option:
maturin develop --release
Check whether a number is a lychrel candidate:
from lychrel import is_lychrel_candidate
assert is_lychrel_candidate(196)
assert not is_lychrel_candidate(197)
Check out the tests for more examples.
FAQs
A collection of functions to play with Lychrel numbers and other funny mathematical problems
We found that lychrel demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.