Skip to main content

Randalyze - Random Number Generator And Analyzer

What Does Randalyze Do?

Randalyze is a Python module that you can import or use directly from the command line to generate a set of random numbers. These numbers will fit a specified distribution, rather than just being evenly distributed.

It also allows you to analyze a set of numbers, to see which distribution they match.

Installation

Randalyze supports Python 3.8 and later, so you can install it on Windows 7 if you want. It doesn't support Python 2.7.

To install Randalyze, create a virtual environment and use pip:

pip install randalyze

Usage

Command Line Usage

Generating Random Numbers

The generate command creates a number of random numbers. The type of generator must be specified - currently the only option is benford, and the number (or count) of numbers generated is specified with the -c option.

For example, to generate 100 random numbers with a Benford distribution, the following command line can be used:

randalyze generate -c 100 benford

or, if you're not using an active virtual environment:

python -m randalyze generate -c 100 benford

For detailled parameter descriptions, use:

randalyze --help
randalyze generate --help

Analyzing Numbers

If you have a set of numbers, randalyze can analyze them and tell you how close to a Benford distribution they are. These numbers may have been generated by randalyze, or maybe obtained from somewhere else - it really doesn't matter.

So, to analyze an output of 10,000 numbers from the randalyze generate command, and see whether it matches a Benford distribution to within 10%, use:

randalyze generate benford -c 10000 | randalyze analyze -t 10 benford

And to ensure the numbers in a text file numbers.txt, with one number per line, fit a Benford distribution:

cat numbers.txt | randalyze analyze -t 10 benford

or use the FILE parameter:

randalyze analyze -t 10 benford numbers.txt

And to produce the output in JSON format:

randalyze analyze -t 10 --format json benford numbers.txt

Self Testing

You can use randalyze to analyze the numbers it creates by piping the output of the generate command into the analyze command. For example, to check whether 10,000 generated numbers are wihin 10% of a Benford distribution, use:

randalyze generate benford -c 10000 | randalyze analyze -t 10 benford

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

randalyze-0.1.2.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

randalyze-0.1.2-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file randalyze-0.1.2.tar.gz.

File metadata

  • Download URL: randalyze-0.1.2.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.9.7 Linux/5.13.0-30-generic

File hashes

Hashes for randalyze-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4cfc955c7cbd74b956ce8c2daeb9118fec026529d5844502d0d6b967c4ddc3db
MD5 0f3015097bac371aa17f8596b19ea8ff
BLAKE2b-256 c4eb6a39f027748cf53c5a64f9e8dd26475a6e89bd11fc5ebd3274f5df6ecd4e

See more details on using hashes here.

File details

Details for the file randalyze-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: randalyze-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.9.7 Linux/5.13.0-30-generic

File hashes

Hashes for randalyze-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f248ae08c972a51632bb9675859e63b3ed8b7c0c38ef6ed489c89ca7e91e878f
MD5 851e1530147c2a1c3829b22213be4dab
BLAKE2b-256 8b76b3a4eb90246bb7bd6c9768fa9b34f1eca5424aef14b520816e4fcea7647f

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.1

2 files

0.2.0

2 files

0.1.4

2 files

0.1.3

2 files

This release

0.1.2 This release

2 files

0.1.1

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page