Skip to main content

Create a palette preview image by using a simple config file

Project description

Simple library for gathering results from stochastic functions

size files
py dep version
license downloads
downloads downloads

Usage:

  1. pip install r_repeat
  2. Open up the wiki to see how everything works or check the examples
  3. Enjoy

Example:

from r_repeat import repeat, seed
@repeat(n=1e6)  # run this function 1000000 times
@seed(kwarg=['rng1', 'rng2'])  # insert random numbers into rng1 and rng2
def f(rng1, bias, rng2):
	return (rng1 + bias) >= rng2

g = f(bias=0.078)  # pass remaining arguments
sum = g.collect()  # gather all results
print(f'{sum} wins and {len(g)-sum} losses')

Output:

22%|██▏       | 217913/1000000 [00:21<01:18,  9952.1it/s]    (while working)
574945 wins and 425055 losses    (after finished)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

r_repeat-0.3.7-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file r_repeat-0.3.7-py3-none-any.whl.

File metadata

  • Download URL: r_repeat-0.3.7-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for r_repeat-0.3.7-py3-none-any.whl
Algorithm Hash digest
SHA256 8d29b2522ab54da97251f48f7a63b40a25dff45bb44772189df5a54dd9321d32
MD5 1faab1be1506fa936bd64a7a6e249d3d
BLAKE2b-256 f621a677456a9b3f4ee99cc653624e6fa8dde66aafb2a2f91aca7276b2f26dfb

See more details on using hashes here.

Supported by

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