Create a palette preview image by using a simple config file
Project description
Simple library for gathering results from probabilistic functions
Usage:
pip install r_repeat
- Open up the wiki to see how everything works or check the examples
- Enjoy
Example:
from r_repeat import repeat, seed, collect
@repeat(n=10**6) # 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 = collect(g) # gather all results
print(f'{sum} wins and {len(g)-sum} losses')
Output:
[██████████████████▍ ] 61.1% (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.