Skip to main content

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)

Metadata

Release files for r-repeat 0.3.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for r-repeat 0.3.7
File Interpreter ABI Platform
r_repeat-0.3.7-py3-none-any.whl Python 3 none any Details

Release files / r_repeat-0.3.7-py3-none-any.whl

Download URL r_repeat-0.3.7-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d29b2522ab54da97251f48f7a63b40a25dff45bb44772189df5a54dd9321d32
BLAKE2b-256 checksum
How to use checksums
f621a677456a9b3f4ee99cc653624e6fa8dde66aafb2a2f91aca7276b2f26dfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Release history Release notifications | RSS feed

This release

0.3.7 This release

1 release file

0.3.6

1 release file

0.3.5

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.1

1 release file

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