Your IP : 3.22.66.147


Current Path : /opt/alt/python313/lib64/python3.13/__pycache__/
Upload File :
Current File : //opt/alt/python313/lib64/python3.13/__pycache__/random.cpython-313.opt-1.pyc

�

*}g����z�SrSSKJrJrJrJr	J
r SSKJr
JrJrJr SSKJrJrJr SSKJrJrJr SSK J!r" SSK#J$r% SSK&J'r( SS	K)J*r+J,r- SS
K.J.r/ SSK r0SSK1r1/SQr2S
\"S5-\
"S5-r3\"S5r4S\"S5-r5Sr6S\6*-r7Sr8Sq9"SS\1Rt5r:"SS\:5r;\:"5r<\<Rzr=\<R|r>\<R~r?\<R�r@\<R�rA\<R�rB\<R�rC\<R�rD\<R�rE\<R�rF\<R�rG\<R�rH\<R�rI\<R�rJ\<R�rK\<R�rL\<R�rM\<R�rN\<R�rO\<R�rP\<R�rQ\<R�rR\<R�rS\<R�rTSrUS#SjrV\W"\0S5(a\0R�"\<RzS9 S\Y\ZS-4Sjr[S$S\Y\ZS-S \\\Z-4S!jjr]\^S":Xa\_"\]"55 gg)%aERandom variable generators.

    bytes
    -----
           uniform bytes (values between 0 and 255)

    integers
    --------
           uniform within range

    sequences
    ---------
           pick random element
           pick random sample
           pick weighted random sample
           generate random permutation

    distributions on the real line:
    ------------------------------
           uniform
           triangular
           normal (Gaussian)
           lognormal
           negative exponential
           gamma
           beta
           pareto
           Weibull

    distributions on the circle (angles 0 to 2pi)
    ---------------------------------------------
           circular uniform
           von Mises

    discrete distributions
    ----------------------
           binomial


General notes on the underlying Mersenne Twister core generator:

* The period is 2**19937-1.
* It is one of the most extensively tested generators in existence.
* The random() method is implemented in C, executes in a single Python step,
  and is, therefore, threadsafe.

�)�log�exp�pi�e�ceil)�sqrt�acos�cos�sin)�tau�floor�isfinite)�lgamma�fabs�log2)�urandom)�Sequence)�index)�
accumulate�repeat)�bisectN)�Random�SystemRandom�betavariate�binomialvariate�choice�choices�expovariate�gammavariate�gauss�getrandbits�getstate�lognormvariate�
normalvariate�
paretovariate�	randbytes�randint�random�	randrange�sample�seed�setstate�shuffle�
triangular�uniform�vonmisesvariate�weibullvariate�g��@�@��?�@�5��c�.^�\rSrSrSrSrS&SjrS'U4SjjrU4SjrU4Sjr	S	r
S
rSrSr
S
rS\-4Sjr\rSrS\4SjrSrSrSrSS.SjrS&SSS.SjjrSrS(SjrS)SjrS)SjrSrS*SjrSr S r!S!r"S"r#S#r$S+S$jr%S%r&U=r'$),r�ga�Random number generator base class used by bound module functions.

Used to instantiate instances of Random to get generators that don't
share state.

Class Random can also be subclassed if you want to use a different basic
generator of your own devising: in that case, override the following
methods:  random(), seed(), getstate(), and setstate().
Optionally, implement a getrandbits() method so that randrange()
can cover arbitrarily large ranges.

�Nc�4�URU5 SUlg)zUInitialize an instance.

Optional argument x controls seeding, as for Random.seed().
N)r+�
gauss_next)�self�xs  �-/opt/alt/python313/lib64/python3.13/random.py�__init__�Random.__init__ws��	
�	�	�!�����c	�*>�US:Xa�[U[[45(a}[U[5(aURS5OUnU(a[	US5S-OSn[[U5HnSU-U-S-nM U[
U5-nUS:XaSOUnO�US	:Xa�[U[[[45(ac[cSSK	J
q [U[5(aUR5n[RU[U5R!5-5nO?[U[#S
5[[$[[[45(d['S5e[(TU]UU5 S
Ulg
![a	 SSKJ
q N�f=f)
aInitialize internal state from a seed.

The only supported seed types are None, int, float,
str, bytes, and bytearray.

None or no argument seeds from current time or from an operating
system specific randomness source if available.

If *a* is an int, all bits are used.

For version 2 (the default), all of the bits are used if *a* is a str,
bytes, or bytearray.  For version 1 (provided for reproducing random
sequences from older versions of Python), the algorithm for str and
bytes generates a narrower range of seeds.

r9zlatin-1r�iCBl����������r8N)�sha512zOThe only supported seed types are:
None, int, float, str, bytes, and bytearray.)�
isinstance�str�bytes�decode�ord�map�len�	bytearray�_sha512�_sha2rI�ImportError�hashlib�encode�int�
from_bytes�digest�type�float�	TypeError�superr+r>)r?�a�versionr@�c�	__class__s     �rAr+�Random.seed�sI���$�a�<�J�q�3��,�7�7�'1�!�U�';�';�����#��A�"#��A�a�D�	�Q���A���a�[����k�Q�&�*<�<��!�
��Q��K�A��2�g��1�A�
��\�j��S�%��,C�D�D���:�8�
�!�S�!�!��H�H�J�����q�7�1�:�#4�#4�#6�6�7�A��A��T�
�C���U�I�N�O�O��K�L�
L�	���Q������#�:�9�:�s�E?�?F�Fc�N>�UR[TU]	5UR4$)z9Return internal state; can be passed to setstate() later.)�VERSIONr]r"r>)r?ras �rAr"�Random.getstate�s ����|�|�U�W�-�/����@�@rDc� >�USnUS:XaUup#Ul[TU]	U5 gUS:Xa-Uup#Ul[SU55n[TU]	U5 g[	SU<SUR<35e![an[
UeSnAff=f)z:Restore internal state from object returned by getstate().rr<r8c3�*# �UH	oS-v� M g7f)lN�)�.0r@s  rA�	<genexpr>�"Random.setstate.<locals>.<genexpr>�s���%K�]��7�m�]�s�Nzstate with version z( passed to Random.setstate() of version )r>r]r,�tuple�
ValueErrorr\rd)r?�stater_�
internalstaterras     �rAr,�Random.setstate�s������(���a�<�6;�3�G�D�O��G��]�+�
��\�6;�3�G�D�O�

'� %�%K�]�%K� K�
�
�G��]�+��%�t�|�|�5�6�
6��	�
'��Q�&��
'�s�A7�7
B
�B�B
c�"�UR5$�N)r"�r?s rA�__getstate__�Random.__getstate__�s���}�}��rDc�&�URU5 grr)r,)r?rns  rA�__setstate__�Random.__setstate__�s���
�
�e�rDc�<�URSUR54$)Nrh)rar"rss rA�
__reduce__�Random.__reduce__�s���~�~�r�4�=�=�?�2�2rDc���URH[nSUR;a gSUR;aURUl gSUR;dMJURUl g g)z�Control how subclasses generate random integers.

The algorithm a subclass can use depends on the random() and/or
getrandbits() implementation available to it and determines
whether it can generate random integers from arbitrarily large
ranges.
�
_randbelowr!r(N)�__mro__�__dict__�_randbelow_with_getrandbitsr}�_randbelow_without_getrandbits)�cls�kwargsr`s   rA�__init_subclass__�Random.__init_subclass__�sY�����A��q�z�z�)����
�
�*�!$�!@�!@�����1�:�:�%�!$�!C�!C����rDc�v�URnUR5nU"U5nXA:�aU"U5nXA:�aMU$)z;Return a random int in the range [0,n).  Defined for n > 0.)r!�
bit_length)r?�nr!�k�rs     rAr��"Random._randbelow_with_getrandbits�s=���&�&��
�L�L�N����N���f��A��A��f��rDr9c���URnX:�a!SSKJn U"S5 [U"5U-5$X!-nX%-
U-nU"5nXv:�aU"5nXv:�aM[Xr-5U-$)z{Return a random int in the range [0,n).  Defined for n > 0.

The implementation does not use getrandbits, but only random.
r)�warnz�Underlying random() generator does not supply 
enough bits to choose from a population range this large.
To remove the range limitation, add a getrandbits() method.)r(�warningsr��_floor)r?r��maxsizer(r��rem�limitr�s        rAr��%Random._randbelow_without_getrandbits�sv�������<�%��O�
P��&�(�Q�,�'�'��k����'�)���H���j���A��j��a�k�"�Q�&�&rDc�J�URUS-5RUS5$)�Generate n random bytes.��little)r!�to_bytes�r?r�s  rAr&�Random.randbytes s$������A��&�/�/��8�<�<rDc	���[U5nUc6U[La[S5eUS:�aURU5$[	S5e[U5nXT-
n[U5nUS:Xa+US:�aX@RU5-$[	SUSUS35eUS:�aXg-S-
U-nOUS:aXg-S-U-nO[	S5eUS::a[	SUSUSUS35eXGURU5--$)	z�Choose a random item from range(stop) or range(start, stop[, step]).

Roughly equivalent to ``choice(range(start, stop, step))`` but
supports arbitrarily large ranges and is optimized for common cases.

z Missing a non-None stop argumentrzempty range for randrange()r9zempty range in randrange(z, �)zzero step for randrange())�_index�_ONEr\r}rm)	r?�start�stop�step�istart�istop�width�istepr�s	         rAr)�Random.randrange's�������<��4��� B�C�C���z����v�.�.��:�;�;��t�������t����A�:��q�y����� 6�6�6��8���r�$��q�I�J�J��1�9����"�u�,�A�
�Q�Y����"�u�,�A��8�9�9���6��8���r�$��r�$��q�Q�R�R������ 2�2�2�2rDc�*�URXS-5$)zJReturn random integer in range [a, b], including both end points.
        r9)r)�r?r^�bs   rAr'�Random.randintPs���~�~�a�1��%�%rDc�p�[U5(d[S5eXR[U55$)z2Choose a random element from a non-empty sequence.z$Cannot choose from an empty sequence)rP�
IndexErrorr})r?�seqs  rAr�
Random.choiceYs/��
�3�x�x��C�D�D��?�?�3�s�8�,�-�-rDc��URn[[S[U555HnU"US-5nXXsX'X'M g)z)Shuffle list x in place, and return None.r9N)r}�reversed�rangerP)r?r@�	randbelow�i�js     rAr-�Random.shufflebsH���O�O�	��%��3�q�6�*�+�A��!�a�%� �A���q�t�J�A�D�!�$�,rD)�countsc��[U[5(d[S5e[U5nUb�[	[U55n[U5U:wa[
S5eUR5n[U[5(d[S5eUS::a[
S5eUR[U5US9n[nUV	s/sH
o�U"XY5PM sn	$URn
SUs=::aU::d
O [
S5eS/U-nS	nUS
:�aUS[[US-S55--
nXL::a;[	U5n
[U5HnU
"XN-
5nX�X�'X�U-
S
-
X�'M! U$[5nUR n[U5H/nU
"U5nUU;aU
"U5nUU;aMU"U5 XX�'M1 U$s sn	f)a�Chooses k unique random elements from a population sequence.

Returns a new list containing elements from the population while
leaving the original population unchanged.  The resulting list is
in selection order so that all sub-slices will also be valid random
samples.  This allows raffle winners (the sample) to be partitioned
into grand prize and second place winners (the subslices).

Members of the population need not be hashable or unique.  If the
population contains repeats, then each occurrence is a possible
selection in the sample.

Repeated elements can be specified one at a time or with the optional
counts parameter.  For example:

    sample(['red', 'blue'], counts=[4, 2], k=5)

is equivalent to:

    sample(['red', 'red', 'red', 'red', 'blue', 'blue'], k=5)

To choose a sample from a range of integers, use range() for the
population argument.  This is especially fast and space efficient
for sampling from a large population:

    sample(range(10000000), 60)

zAPopulation must be a sequence.  For dicts or sets, use sorted(d).Nz2The number of counts does not match the populationzCounts must be integersrz)Total of counts must be greater than zero)r�z,Sample larger than population or is negative��r2r<r9)rJ�	_Sequencer\rP�list�_accumulaterm�poprWr*r��_bisectr}�_ceil�_log�set�add)r?�
populationr�r�r��
cum_counts�total�
selectionsr�sr��result�setsize�poolr�r��selected�selected_adds                  rAr*�
Random.sampleks���j�*�i�0�0��@�A�
A��
�O�����k�&�1�2�J��:��!�#� �!U�V�V��N�N�$�E��e�S�)�)�� 9�:�:���z� �!L�M�M����U�5�\�Q��7�J��F�?I�J�z�!�v�j�4�5�z�J�J��O�O�	��A�{��{��K�L�L���!������q�5��q�E�$�q�1�u�a�.�1�1�1�G��<��
�#�D��1�X���a�e�$�� �G��	��1�u�q�y�/�����
��u�H�#�<�<�L��1�X���a�L���8�m�!�!��A��8�m��Q��&�M��	���
��3Ks�G)�cum_weightsr�c
��URn[U5nUcQUc8[nUS-
n[SU5Vs/sHo�U"U"5U-5PM sn$[	[U55nOUb[
S5e[U5U:wa[S5eUSS-n	U	S::a[S5e[U	5(d[S5e[n
US	-
n[SU5Vs/sHnX"X5"5U	-S
U5PM sn$s snf![a) [U[5(deUn[
SU<35Sef=fs snf)z�Return a k sized list of population elements chosen with replacement.

If the relative weights or cumulative weights are not specified,
the selections are made with equal probability.

N�z4The number of choices must be a keyword argument: k=z2Cannot specify both weights and cumulative weightsz3The number of weights does not match the populationrGz*Total of weights must be greater than zerozTotal of weights must be finiter9r)r(rPr��_repeatr�r�r\rJrWrm�	_isfiniter�)r?r��weightsr�r�r(r�r
r�r�r�his            rAr�Random.choices�sj�������
�O���������S���AH��q�AQ�R�AQ�A�5���A��#6�7�AQ�R�R�
�"�;�w�#7�8���
 ��P�Q�Q��{��q� ��R�S�S��B��#�%���C�<��I�J�J������>�?�?���
��U�� ��q�)�+�)�A��6�+�v�x�%�/?��B�G�H�)�+�	+��+S���
�!�'�3�/�/�����K���M����	
��$+s�D�D�!D=�3D:c�2�XU-
UR5--$)z�Get a random number in the range [a, b) or [a, b] depending on rounding.

The mean (expected value) and variance of the random variable are:

    E[X] = (a + b) / 2
    Var[X] = (b - a) ** 2 / 12

�r(r�s   rAr/�Random.uniform�s����E�T�[�[�]�*�*�*rDc��UR5nUcSOX1-
X!-
-nXE:�aSU-
nSU-
nX!p!XU-
[XE-5--$![a Us$f=f)auTriangular distribution.

Continuous distribution bounded by given lower and upper limits,
and having a given mode value in-between.

http://en.wikipedia.org/wiki/Triangular_distribution

The mean (expected value) and variance of the random variable are:

    E[X] = (low + high + mode) / 3
    Var[X] = (low**2 + high**2 + mode**2 - low*high - low*mode - high*mode) / 18

��?r5)r(�ZeroDivisionError�_sqrt)r?�low�high�mode�ur`s      rAr.�Random.triangular�st��
�K�K�M��	��|��$�*���)D�A�
�5��a��A��a��A����S�j�E�!�%�L�0�0�0��
!�	��J�	�s�A�A�Ac��URnU"5nSU"5-
n[US-
-U-nXf-S-nU[U5*::aOM:XU--$)zLNormal distribution.

mu is the mean, and sigma is the standard deviation.

r5r�r4)r(�
NV_MAGICCONSTr�)r?�mu�sigmar(�u1�u2�z�zzs        rAr$�Random.normalvariatesc���������B��v�x��B���c��*�R�/�A�����B��d�2�h�Y���
���I�~�rDc���URnURnSUlUcNU"5[-n[S[	SU"5-
5-5n[U5U-n[
U5U-UlXU--$)z�Gaussian distribution.

mu is the mean, and sigma is the standard deviation.  This is
slightly faster than the normalvariate() function.

Not thread-safe without a lock around calls.

Ng�r5)r(r>�TWOPIr�r��_cos�_sin)r?r�r�r(r��x2pi�g2rads       rAr �Random.gauss+sr��6�����O�O������9��8�e�#�D��$��c�F�H�n�!5�5�6�E��T�
�U�"�A�"�4�j�5�0�D�O���I�~�rDc�6�[URX55$)z�Log normal distribution.

If you take the natural logarithm of this distribution, you'll get a
normal distribution with mean mu and standard deviation sigma.
mu can have any value, and sigma must be greater than zero.

)�_expr$)r?r�r�s   rAr#�Random.lognormvariateQs���D�&�&�r�1�2�2rDc�B�[SUR5-
5*U-$)a�Exponential distribution.

lambd is 1.0 divided by the desired mean.  It should be
nonzero.  (The parameter would be called "lambda", but that is
a reserved word in Python.)  Returned values range from 0 to
positive infinity if lambd is positive, and from negative
infinity to 0 if lambd is negative.

The mean (expected value) and variance of the random variable are:

    E[X] = 1 / lambd
    Var[X] = 1 / lambd ** 2

r5)r�r()r?�lambds  rAr�Random.expovariate[s"��$�S�4�;�;�=�(�)�)�E�1�1rDc��URnUS::a[U"5-$SU-nU[SXD--5-nU"5n[[U-5nXuU--nU"5n	U	SX�--
:dU	SU-
[U5-::aOMJSU-n
X�-SX�---nU"5nUS:�aU[
U5-[-n
U
$U[
U5-
[-n
U
$)aCircular data distribution.

mu is the mean angle, expressed in radians between 0 and 2*pi, and
kappa is the concentration parameter, which must be greater than or
equal to zero.  If kappa is equal to zero, this distribution reduces
to a uniform random angle over the range 0 to 2*pi.

g���ư>r�r5)r(r�r�r��_pir��_acos)r?r��kappar(r�r�r�r��dr��q�f�u3�thetas              rAr0�Random.vonmisesvariateos��� �����D�=��6�8�#�#��%�K��
��c�A�E�k�"�"�����B��S�2�X��A���U��A���B��C�!�%�K��2�#��'�T�!�W�)<�#<���
�!�G��
�U�s�Q�U�{�#��
�X��
��8��%��(�]�e�+�E����%��(�]�e�+�E��rDc��US::dUS::a[S5eURnUS:�a�[SU-S-
5nU[-
nX-nU"5nSUs=:aS:dO MSU"5-
n[	USU-
-5U-n	U[U	5-n
Xw-U-nXVU	--U
-
nU[-SU--
S:�dU[	U5:�aX�-$M}US:Xa[	SU"5-
5*U-$U"5n
[U-[-nX�-nUS::a	USU--n
O[	X�-
U-5*n
U"5nUS:�aXzUS-
-::aX�-$OU[U
*5::aX�-$Mp)a�Gamma distribution.  Not the gamma function!

Conditions on the parameters are alpha > 0 and beta > 0.

The probability distribution function is:

            x ** (alpha - 1) * math.exp(-x / beta)
  pdf(x) =  --------------------------------------
              math.gamma(alpha) * beta ** alpha

The mean (expected value) and variance of the random variable are:

    E[X] = alpha * beta
    Var[X] = alpha * beta ** 2

r�z*gammavariate: alpha and beta must be > 0.0r5r3gH�����z>g�P���?r6)rmr(r��LOG4r�r��
SG_MAGICCONST�_e)r?�alpha�betar(�ainv�bbb�cccr�r��vr@r�r�r�r��ps                rAr�Random.gammavariate�s���(�C�<�4�3�;��I�J�J������3�;���u��s�*�+�D��$�,�C��,�C���X���b�,�9�,���6�8�^����s�R�x��)�D�0���D��G�O���G�b�L����'�M�A�%���}�$�s�Q�w�.�#�5��d�1�g���8�O���c�\���v�x��(�(�4�/�/�
��H���%�Z�2�%���E����8��c�E�k�*�A��q�u��o�.�.�A��X���s�7��5�3�;�/�/���8�O�	0��4���8�^���8�O�rDc�d�URUS5nU(aX3URUS5--$g)a!Beta distribution.

Conditions on the parameters are alpha > 0 and beta > 0.
Returned values range between 0 and 1.

The mean (expected value) and variance of the random variable are:

    E[X] = alpha / (alpha + beta)
    Var[X] = alpha * beta / ((alpha + beta)**2 * (alpha + beta + 1))

r5r�)r)r?rr�ys    rAr�Random.betavariate�s7��6
���e�S�)����D�-�-�d�C�8�8�9�9�rDc�8�SUR5-
nUSU--$)z3Pareto distribution.  alpha is the shape parameter.r5g�r�)r?rr�s   rAr%�Random.paretovariate�s#��
�$�+�+�-����T�E�\�"�"rDc�R�SUR5-
nU[U5*SU---$)zVWeibull distribution.

alpha is the scale parameter and beta is the shape parameter.

r5)r(r�)r?rrr�s    rAr1�Random.weibullvariates.��
�$�+�+�-�����a���c�D�j�1�1�1rDc��US:a[S5eUS::dUS:�aUS:XagUS:XaU$[S5eURnUS:Xa[U"5U:5$US:�aXRUSU-
5-
$X-S:aKS=pE[	SU-
5nU(dU$U[[	U"55U-5S--
nXQ:�aU$US-
nM0S
n[
X-SU-
-5nSSU--n	S
SU	--SU--n
X-S-nSSU	--
nU"5nUS-nS[U5-
n
[SU
-U
-U	-U-U-5nUS:dX�:�aMBU"5nU
S:�aX�::aU$U(dOSSU	--U-n[USU-
-5n[US-U-5n[US-5[UU-
S-5-nS	nUWX�U
--U	---n[U5W[US-5-
[X-
S-5-
UW-
W--::aU$M�)aZBinomial random variable.

Gives the number of successes for *n* independent trials
with the probability of success in each trial being *p*:

    sum(random() < p for i in range(n))

Returns an integer in the range:   0 <= X <= n

The mean (expected value) and variance of the random variable are:

    E[X] = n * p
    Var[x] = n * p * (1 - p)

rzn must be non-negativer�r5z&p must be in the range 0.0 <= p <= 1.0r9r�g$@TFgffffff�?g=
ףp=@gE���JY��ga��+e�?�{�G�z�?gq=
ףp�?g������@r3g�Q���?g�p=
ף@gffffff@)
rmr(r�r�_log2r�r��_fabsr��_lgamma)r?r�rr(r@rr`�setup_complete�spqr�r^�vrr��usr�rr�lpq�m�hs                    rAr�Random.binomialvariatesg��"
�q�5��5�6�6���8�q�C�x��C�x���C�x����E�F�F�����
��6��&�(�Q�,�'�'�
�s�7��+�+�A�s�Q�w�7�7�7��5�4�<��I�A��c�A�g��A������V�E�&�(�O�a�/�0�1�4�4���5��H��Q���	����A�E�S�1�W�%�&���4�#�:����f�q�j� �4�!�8�+��
�E�C�K��
�C�!�G�^�����A�
��H�A��u�Q�x��B���a��"��q�(�A�-��1�2�A��1�u������A��T�z�a�g���
"���a���3�.���1��a��=�)���A��E�Q�;�'���A��E�N�W�Q��U�Q�Y�%7�7��!%��
��!�B�w�-�!�+�,�,�A��A�w�!�g�a�!�e�n�,�w�q�u�q�y�/A�A�Q��U�c�M�Q�Q���5rD)r>rr)Nr8)r�r5N�r�r5)r5)r9r�)(�__name__�
__module__�__qualname__�__firstlineno__�__doc__rdrBr+r"r,rtrwrzr�r��BPFr�r}r&r�r)r'rr-r*rr/r.r$r r#rr0rrr%r1r�__static_attributes__�
__classcell__)ras@rArrgs������G��.�`A�6�B��3��(�9:�3��'�(-�J�=�%)�t�'3�R&�.�$�/3�]�~#+�t�q�#+�P	+�1�2�*$�L3�2�((�TC�J�@#�	2�V�VrDrc�>�\rSrSrSrSrSrSrSrSr	\	=r
rSrg	)
ripz�Alternate random number generator using sources provided
by the operating system (such as /dev/urandom on Unix or
CryptGenRandom on Windows).

 Not available on all systems (see os.urandom() for details).

c�R�[R[S55S-	[-$)z7Get the next random number in the range 0.0 <= X < 1.0.rFr<)rWrX�_urandom�	RECIP_BPFrss rAr(�SystemRandom.randomys�����x��{�+�q�0�I�=�=rDc��US:a[S5eUS-S-n[R[U55nX2S-U-
-	$)z:getrandbits(k) -> x.  Generates an int with k random bits.rz#number of bits must be non-negativerFr�)rmrWrXr-)r?r��numbytesr@s    rAr!�SystemRandom.getrandbits}sG���q�5��B�C�C���E�a�<���N�N�8�H�-�.����\�A�%�&�&rDc��[U5$)r�)r-r�s  rAr&�SystemRandom.randbytes�s����{�rDc��g)z<Stub method.  Not used for a system random number generator.Nrh�r?�args�kwdss   rAr+�SystemRandom.seed�s��rDc��[S5e)zAMethod should not be called for a system random number generator.z*System entropy source does not have state.)�NotImplementedErrorr6s   rA�_notimplemented�SystemRandom._notimplemented�s��!�"N�O�OrDrhN)
r#r$r%r&r'r(r!r&r+r<r"r,r)rhrDrArrps-���>�'���P�*�)�H�xrDrc�4�SSKJnJn SSKJn U"5n[SU5Vs/sHoq"U6PM	 nnU"5n	U"U5n
U"X�5n[
U5n[U5n
[X�-
SSUSURU<35 [SX�X�4-5 gs snf)Nr)�stdev�fmean)�perf_counterz.3fz sec, z times z"avg %g, stddev %g, min %g, max %g
)
�
statisticsr?r@�timerAr��min�max�printr#)r��funcr7r?�meanrA�t0r��data�t1�xbarr�r�r�s              rA�_test_generatorrM�s���/�!�	��B�!(��q�!1�2�!1�A�D�$�K�!1�D�2�	��B���:�D��$��E�

�d�)�C��t�9�D�	�R�W�S�M���s�'�$�-�-����
A�B�	�
/�4��2J�
J�K��3s�Bc�h�[U[S5 [U[S5 [U[S5 [U[S5 [U[
S5 [U[
S5 [U[S5 [U[S5 [U[S5 [U[S5 [U[S	5 [U[S
5 [U[S5 [U[S5 [U[S
5 [U[S5 [U[S5 [U[S5 g)Nrhr")�g333333�?)�dg�?)rr5)皙�����?r5)rQr3)r�r5)g�������?r5)r5r5)r3r5)g4@r5)gi@r5)�@rR)r�r5gUUUUUU�?)
rMr(r$r#r0rrr rr.)�Ns rA�_testrT�s����A�v�r�"��A�}�j�1��A�~�z�2��A��
�3��A��
�3��A���4��A�|�[�1��A�|�Z�0��A�|�Z�0��A�|�Z�0��A�|�Z�0��A�|�Z�0��A�|�Z�0��A�|�[�1��A�|�\�2��A�u�j�)��A�{�J�/��A�z�#8�9rD�fork)�after_in_child�arg_listc��SSKnURURS9nUR5nUR	SSSSS9 UR	SS	[
S
SS9 UR	S
S[S
SS9 UR	S[
SSURS9 UR	SSSS9 URU5nXBR54$)Nr)�formatter_classz-cz--choice�+zprint a random choice)�nargs�helpz-iz	--integerrSz0print a random integer between 1 and N inclusive)rZ�metavarr\z-fz--floatz>print a random floating-point number between 0 and N inclusivez--test�'�?)rZ�constr[r\�input�*z�if no options given, output depends on the input
    string or multiple: same as --choice
    integer: same as --integer
    float: same as --float)
�argparse�ArgumentParser�RawTextHelpFormatter�add_mutually_exclusive_group�add_argumentrWr[�SUPPRESS�
parse_args�format_help)rWrc�parser�groupr7s     rA�_parse_argsrm�s����
�
$�
$� �5�5�%�7�F��/�/�1�E�	����j��
$��&�
����k��S�
?��A�
����i�e�S�
M��O�
����s�&��
�
�
�� �����s�������X�&�D��#�#�%�%�%rD�returnc���[U5upUR(a[UR5$URb[SUR5$URb[SUR5$UR(a[UR5 g[UR5S:Xa'URSn[U5n[SU5$[UR5S:�a[UR5$U$![aF [	U5n[SU5s$![a [UR55ss$f=ff=f)Nr9r�r8)
rmr�integerr'r[r/�testrTrPrarWrm�split)rWr7�	help_text�vals    rA�mainrvs��!�(�+�O�D��{�{��d�k�k�"�"��|�|���q�$�,�,�'�'��z�z���q�$�*�*�%�%��y�y�
�d�i�i����4�:�:��!���j�j��m��	+��c�(�C��1�c�?�"��4�:�:��!���d�j�j�!�!�����	+�
+��C�j���q�#��&���
+��c�i�i�k�*�*�
+��	+�s0�
D�
E!�D5�2E!�5#E�E!�E�E!�__main__)r^rr)`r'�mathrr�rr�rr�rrrr�rr�r	r�r
r�rr�rr�r
r�rr�rrrrrr�osrr-�_collections_abcrr��operatorrr��	itertoolsrr�rr�rr��_os�_random�__all__r�rrr(r.r�rRrr�_instr+r(r/r.r'rr)r*r-rr$r#rr0rr rrr%r1r"r,r!r&rMrT�hasattr�register_at_forkr�rKrmrWrvr#rFrhrDrA�<module>r�s��.�hM�L�G�G�E�E�@�@�"�2�$�B�$�����:�D��J���s��+�
��C�y���d�3�i��
���
�#��I�	���
��B�W�^�^�B�R"*�6�"*�X	����z�z��	����
�-�-��
�
�
�
�
�-�-��	�����O�O�	�	����
�-�-��
�-�-���#�#�
��%�%�������'�'���!�!��
���������'�'���#�#�
��%�%���>�>���>�>�������O�O�	�L�":�0�3��������
�
�3�&�$�s�)�d�*�&�6$�4��9�t�#�$�s�S�y�$�N�z��	�$�&�M�rD

?>