Skip to main content

Democritus functions for working with random.

Project description

Democritus Random

PyPI CI Lint codecov The Democritus Project uses semver version 2.0.0 The Democritus Project uses black to format code License: LGPL v3

Democritus functions[1] for working with random.

[1] Democritus functions are simple, effective, modular, well-tested, and well-documented Python functions.

We use d8s as an abbreviation for democritus (you can read more about this here).

Functions

  • def random_number():
        """Return a random number in range [0.0, 1.0)."""
    
  • def random_integer(a=0, b=10):
        """Return a random number between a and b (inclusive)."""
    
  • def random_xkcd_integer():
        """Get a random number using the method described here: https://xkcd.com/221/."""
    
  • def random_dilbert_integer():
        """Get a random number using the method described here: https://dilbert.com/strip/2001-10-25c."""
    
  • def random_shuffle(iterable):
        """Shuffle the order of the given iterable."""
    
  • def random_choice(iterable):
        """Return a random item from the iterable."""
    
  • def random_choices(iterable, n: int):
        """Return a random item from the iterable."""
    
  • def random_sample(iterable, n):
        """Return n items, selected at random, from the iterable."""
    

Development

👋  If you want to get involved in this project, we have some short, helpful guides below:

If you have any questions or there is anything we did not cover, please raise an issue and we'll be happy to help.

Credits

This package was created with Cookiecutter and Floyd Hightower's Python project template.

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

d8s_random-0.4.2.tar.gz (23.3 kB view details)

Uploaded Source

Built Distribution

d8s_random-0.4.2-py2.py3-none-any.whl (20.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file d8s_random-0.4.2.tar.gz.

File metadata

  • Download URL: d8s_random-0.4.2.tar.gz
  • Upload date:
  • Size: 23.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for d8s_random-0.4.2.tar.gz
Algorithm Hash digest
SHA256 52c01d4f1de24de73189aef0f3eea6f617d49b74460dc5738ea6abafe3e6c34c
MD5 69e8032d9c0bae74434bbf4da06f27a1
BLAKE2b-256 3283324e2511b9a9090fb4c90db3b15e0322122acd28b5596211d7dea519954c

See more details on using hashes here.

File details

Details for the file d8s_random-0.4.2-py2.py3-none-any.whl.

File metadata

  • Download URL: d8s_random-0.4.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for d8s_random-0.4.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8c2c8b03997549724358a4a27f6818142756647d73e5c8b6b63863fb3693813f
MD5 6e5d52c415793dc7cddbfc8fdc2d3684
BLAKE2b-256 0708f5742a38df8669ce5c427f8998e2dfa02d920eee559bbebb8c8ed8b18c62

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