Skip to main content

A CLI tool for RNG, shuffling and other pseudorandom stuff.

Project description

Description

pseu is a CLI tool that provides the following pseudorandom utilities: picking, shuffling, dice-rolling and number generation. It's useful for people who frequently call on machines to make their life choices.

$ pseu pick "good life choice" "bad life choice"
bad life choice
$ pseu pick --n 2 </tmp/movies.txt
Boogie Nights
The Hunt for the Wilderpeople
$ pseu roll 1d6
3
$ pseu rand 100
42
$ pseu shuffle alice sue bob
bob
sue
alice

Setup

Requires Python 3. Install from PyPI using pip:

pip3 install pseu-cli

More examples

roll and rand can print stats.

$ pseu roll 3d6 --stats
4 5 4
sum: 13
max: 5
min: 4

Multiple types of dice, multiple random numbers.

$ pseu roll 2d6 6d3
6 6 1 3 3 1 2 1
$ pseu rand 1-3x5 10-20
2 2 1 3 1 16

Use a (base64) seed to repeat results.

$ pseu 1-1000 --seed abc
903
$ pseu 1-1000 --seed abc
903

Contributing

Feel free to submit tweaks.

To run tests, install tox via pip3 install tox and then run the tox command from the base directory.

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

pseu-cli-1.0.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

pseu_cli-1.0.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file pseu-cli-1.0.2.tar.gz.

File metadata

  • Download URL: pseu-cli-1.0.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.6.9

File hashes

Hashes for pseu-cli-1.0.2.tar.gz
Algorithm Hash digest
SHA256 60b3c5274117f23dd8e845a7653f49a1b415a00854e73be5cc7f9a092898c6b8
MD5 0b471175036a085de7ed1b023a578eea
BLAKE2b-256 38f3e3cd098630d4fd173c27d32d03f19ba46df410d9187cef0556796c58af06

See more details on using hashes here.

File details

Details for the file pseu_cli-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: pseu_cli-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.6.9

File hashes

Hashes for pseu_cli-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d898061071b77e4ef72d99f4a0951f49667098e3dd5b87a026f21e2d6a73a465
MD5 1863897a35f474359df1d03e8eb4861a
BLAKE2b-256 e4c6e9045e55b2c5871013f4da44edc90fc1b4ced1ca426891104aa79e332d2d

See more details on using hashes here.

Supported by

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