/snap/core20/2769/usr/lib/python3.8/__pycache__
NameSizeModeActions
abc.cpython-38.pyc53340644editdlrm
aifc.cpython-38.pyc254740644editdlrm
antigravity.cpython-38.pyc7970644editdlrm
argparse.cpython-38.pyc625910644editdlrm
ast.cpython-38.pyc167630644editdlrm
asynchat.cpython-38.pyc68510644editdlrm
asyncore.cpython-38.pyc160280644editdlrm
base64.cpython-38.pyc170710644editdlrm
bdb.cpython-38.pyc249210644editdlrm
binhex.cpython-38.pyc121340644editdlrm
bisect.cpython-38.pyc23540644editdlrm
bz2.cpython-38.pyc114450644editdlrm
calendar.cpython-38.pyc270640644editdlrm
cgi.cpython-38.pyc265440644editdlrm
cgitb.cpython-38.pyc101500644editdlrm
chunk.cpython-38.pyc48390644editdlrm
cmd.cpython-38.pyc126260644editdlrm
code.cpython-38.pyc99130644editdlrm
codecs.cpython-38.pyc339560644editdlrm
codeop.cpython-38.pyc64170644editdlrm
colorsys.cpython-38.pyc32400644editdlrm
compileall.cpython-38.pyc94100644editdlrm
configparser.cpython-38.pyc457180644editdlrm
contextlib.cpython-38.pyc202290644editdlrm
contextvars.cpython-38.pyc2430644editdlrm
copy.cpython-38.pyc69870644editdlrm
copyreg.cpython-38.pyc43180644editdlrm
cProfile.cpython-38.pyc54800644editdlrm
crypt.cpython-38.pyc33870644editdlrm
csv.cpython-38.pyc119100644editdlrm
dataclasses.cpython-38.pyc236530644editdlrm
datetime.cpython-38.pyc571730644editdlrm
decimal.cpython-38.pyc3590644editdlrm
difflib.cpython-38.pyc594380644editdlrm
dis.cpython-38.pyc158080644editdlrm
doctest.cpython-38.pyc759740644editdlrm
dummy_threading.cpython-38.pyc11100644editdlrm
enum.cpython-38.pyc259620644editdlrm
filecmp.cpython-38.pyc84270644editdlrm
fileinput.cpython-38.pyc133730644editdlrm
fnmatch.cpython-38.pyc33550644editdlrm
formatter.cpython-38.pyc175450644editdlrm
fractions.cpython-38.pyc187390644editdlrm
ftplib.cpython-38.pyc280070644editdlrm
functools.cpython-38.pyc279010644editdlrm
genericpath.cpython-38.pyc40010644editdlrm
getopt.cpython-38.pyc62710644editdlrm
getpass.cpython-38.pyc41780644editdlrm
gettext.cpython-38.pyc180000644editdlrm
glob.cpython-38.pyc43430644editdlrm
gzip.cpython-38.pyc181840644editdlrm
hashlib.cpython-38.pyc67270644editdlrm
heapq.cpython-38.pyc140700644editdlrm
hmac.cpython-38.pyc63880644editdlrm
imaplib.cpython-38.pyc414640644editdlrm
imghdr.cpython-38.pyc41180644editdlrm
imp.cpython-38.pyc98090644editdlrm
inspect.cpython-38.pyc805930644editdlrm
io.cpython-38.pyc34540644editdlrm
ipaddress.cpython-38.pyc628290644editdlrm
keyword.cpython-38.pyc9980644editdlrm
linecache.cpython-38.pyc38670644editdlrm
locale.cpython-38.pyc346740644editdlrm
lzma.cpython-38.pyc120180644editdlrm
mailbox.cpython-38.pyc602640644editdlrm
mailcap.cpython-38.pyc72060644editdlrm
mimetypes.cpython-38.pyc160310644editdlrm
modulefinder.cpython-38.pyc161150644editdlrm
netrc.cpython-38.pyc37770644editdlrm
nntplib.cpython-38.pyc339740644editdlrm
ntpath.cpython-38.pyc140910644editdlrm
nturl2path.cpython-38.pyc17440644editdlrm
numbers.cpython-38.pyc122020644editdlrm
opcode.cpython-38.pyc54200644editdlrm
operator.cpython-38.pyc136910644editdlrm
optparse.cpython-38.pyc480570644editdlrm
os.cpython-38.pyc313970644editdlrm
pathlib.cpython-38.pyc442090644editdlrm
pdb.cpython-38.pyc472260644editdlrm
pickle.cpython-38.pyc469080644editdlrm
pickletools.cpython-38.pyc672040644editdlrm
pipes.cpython-38.pyc77950644editdlrm
pkgutil.cpython-38.pyc163090644editdlrm
platform.cpython-38.pyc243260644editdlrm
plistlib.cpython-38.pyc273740644editdlrm
poplib.cpython-38.pyc135560644editdlrm
posixpath.cpython-38.pyc104610644editdlrm
pprint.cpython-38.pyc162810644editdlrm
profile.cpython-38.pyc147580644editdlrm
pstats.cpython-38.pyc220660644editdlrm
pty.cpython-38.pyc39550644editdlrm
pyclbr.cpython-38.pyc104510644editdlrm
pydoc.cpython-38.pyc836460644editdlrm
py_compile.cpython-38.pyc73520644editdlrm
queue.cpython-38.pyc106260644editdlrm
quopri.cpython-38.pyc57480644editdlrm
random.cpython-38.pyc201080644editdlrm
re.cpython-38.pyc144220644editdlrm
reprlib.cpython-38.pyc53030644editdlrm
rlcompleter.cpython-38.pyc57550644editdlrm
runpy.cpython-38.pyc81810644editdlrm
sched.cpython-38.pyc65320644editdlrm
secrets.cpython-38.pyc21900644editdlrm
selectors.cpython-38.pyc169350644editdlrm
shelve.cpython-38.pyc94900644editdlrm
shlex.cpython-38.pyc75360644editdlrm
shutil.cpython-38.pyc372190644editdlrm
signal.cpython-38.pyc28430644editdlrm
site.cpython-38.pyc171680644editdlrm
sitecustomize.cpython-38.pyc2200644editdlrm
smtpd.cpython-38.pyc264630644editdlrm
smtplib.cpython-38.pyc355320644editdlrm
sndhdr.cpython-38.pyc69890644editdlrm
socket.cpython-38.pyc277870644editdlrm
socketserver.cpython-38.pyc253610644editdlrm
sre_compile.cpython-38.pyc151420644editdlrm
sre_constants.cpython-38.pyc63590644editdlrm
sre_parse.cpython-38.pyc216470644editdlrm
ssl.cpython-38.pyc450370644editdlrm
stat.cpython-38.pyc43720644editdlrm
statistics.cpython-38.pyc336530644editdlrm
string.cpython-38.pyc73000644editdlrm
stringprep.cpython-38.pyc110170644editdlrm
struct.cpython-38.pyc3300644editdlrm
subprocess.cpython-38.pyc419670644editdlrm
sunau.cpython-38.pyc170800644editdlrm
symbol.cpython-38.pyc24040644editdlrm
symtable.cpython-38.pyc113220644editdlrm
sysconfig.cpython-38.pyc158370644editdlrm
tabnanny.cpython-38.pyc70300644editdlrm
tarfile.cpython-38.pyc630430644editdlrm
telnetlib.cpython-38.pyc182370644editdlrm
tempfile.cpython-38.pyc266530644editdlrm
textwrap.cpython-38.pyc135190644editdlrm
this.cpython-38.pyc12610644editdlrm
threading.cpython-38.pyc399760644editdlrm
timeit.cpython-38.pyc117770644editdlrm
token.cpython-38.pyc24850644editdlrm
tokenize.cpython-38.pyc171600644editdlrm
trace.cpython-38.pyc200260644editdlrm
traceback.cpython-38.pyc199380644editdlrm
tracemalloc.cpython-38.pyc173630644editdlrm
tty.cpython-38.pyc10760644editdlrm
turtle.cpython-38.pyc1300220644editdlrm
types.cpython-38.pyc91770644editdlrm
typing.cpython-38.pyc624200644editdlrm
uu.cpython-38.pyc36050644editdlrm
uuid.cpython-38.pyc236830644editdlrm
warnings.cpython-38.pyc136520644editdlrm
wave.cpython-38.pyc181490644editdlrm
weakref.cpython-38.pyc195180644editdlrm
webbrowser.cpython-38.pyc171200644editdlrm
xdrlib.cpython-38.pyc82210644editdlrm
zipapp.cpython-38.pyc58540644editdlrm
zipfile.cpython-38.pyc593360644editdlrm
zipimport.cpython-38.pyc172750644editdlrm
_bootlocale.cpython-38.pyc12430644editdlrm
_collections_abc.cpython-38.pyc287410644editdlrm
_compat_pickle.cpython-38.pyc55010644editdlrm
_compression.cpython-38.pyc41460644editdlrm
_dummy_thread.cpython-38.pyc60370644editdlrm
_markupbase.cpython-38.pyc77900644editdlrm
_osx_support.cpython-38.pyc115930644editdlrm
_pydecimal.cpython-38.pyc1607350644editdlrm
_pyio.cpython-38.pyc740790644editdlrm
_py_abc.cpython-38.pyc46700644editdlrm
_sitebuiltins.cpython-38.pyc34810644editdlrm
_strptime.cpython-38.pyc160440644editdlrm
_sysconfigdata__linux_x86_64-linux-gnu.cpython-38.pyc211210644editdlrm
_sysconfigdata__x86_64-linux-gnu.cpython-38.pyc211150644editdlrm
_threading_local.cpython-38.pyc64460644editdlrm
_weakrefset.cpython-38.pyc76000644editdlrm
__future__.cpython-38.pyc41580644editdlrm
__phello__.foo.cpython-38.pyc1270644editdlrm
Edit: /snap/core20/2769/usr/lib/python3.8/__pycache__/random.cpython-38.pyc (20108B)
U yip@sdZddlmZddlmZmZm Z m Z m ZddlmZmZmZmZddlmZddlmZmZddlm Z!m"Z#ddl$m$Z%dd lZ&zdd l'm(Z'Wn e)k rdd l*m(Z'YnXd d d ddddddddddddddddddd d!d"gZ+d#ed$ed%Z,d%e Z-ed&Z.d'ed(Z/d)Z0d*e0 Z1dd l2Z2Gd+d d e2j3Z3Gd,d"d"e3Z4d-d.Z5d5d0d1Z6e3Z7e7j8Z8e7j9Z9e7j:Z:e7j;Z;e7jZ>e7j?Z?e7j@Z@e7jAZAe7jBZBe7jCZCe7jDZDe7jEZEe7jFZFe7jGZGe7jHZHe7jIZIe7jJZJe7jKZKe7jLZLe7jMZMeNe&d2re&jOe7j8d3ePd4kre6d S)6aRandom variable generators. 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 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. )warn)logexppieceil)sqrtacoscossin)urandom)SetSequence) accumulaterepeat)bisectN)sha512Randomseedrandomuniformrandintchoicesample randrangeshuffle normalvariatelognormvariate expovariatevonmisesvariate gammavariate triangulargauss betavariate paretovariateweibullvariategetstatesetstate getrandbitschoices SystemRandomg@@?@5cs$eZdZdZdZd?ddZddZd@fd d Zfd d Zfd dZ ddZ ddZ ddZ dde fddZddZddZe de>fddZeZddZdAd d!Zd"d#ZdBddd$d%d&Zd'd(ZdCd+d,Zd-d.Zd/d0Zd1d2Zd3d4Zd5d6Zd7d8Zd9d:Z d;d<Z!d=d>Z"Z#S)DraRandom 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. NcCs||d|_dS)zeInitialize an instance. Optional argument x controls seeding, as for Random.seed(). N)r gauss_next)selfxr6/usr/lib/python3.8/random.py__init__^s zRandom.__init__cKsJ|jD]>}d|jkrqFd|jkr.|j|_qFd|jkr|j|_qFqdS)aControl 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(rN)__mro____dict___randbelow_with_getrandbitsr9_randbelow_without_getrandbits)clskwargscr6r6r7__init_subclass__gs    zRandom.__init_subclass__r1cs|dkrt|ttfrt|tr*|dn|}|rBt|dd>nd}tt|D]}d||Ad@}qP|t|N}|dkr~dn|}|d krt|tttfrt|tr|}|t | 7}t |d }t |d |_d S) aInitialize internal state from hashable object. 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. zlatin-1riCBlr1bigN) isinstancestrbytesdecodeordmaplen bytearrayencode_sha512Zdigestint from_bytessuperrr3)r4aversionr5r@ __class__r6r7r{s    z Random.seedcs|jt|jfS)z9Return internal state; can be passed to setstate() later.)VERSIONrSr&r3r4rVr6r7r&szRandom.getstatec s|d}|dkr*|\}}|_t|nt|dkr|\}}|_ztdd|D}Wn(tk r|}z t|W5d}~XYnXt|ntd||jfdS)z:Restore internal state from object returned by getstate().rr2r1css|]}|dVqdS)lNr6).0r5r6r6r7 sz"Random.setstate..Nz?state with version %s passed to Random.setstate() of version %s)r3rSr'tuple ValueError TypeErrorrX)r4staterUZ internalstaterrVr6r7r's  zRandom.setstatecCs|SN)r&rYr6r6r7 __getstate__szRandom.__getstate__cCs||dSr`)r')r4r_r6r6r7 __setstate__szRandom.__setstate__cCs|jd|fS)Nr6)rWr&rYr6r6r7 __reduce__szRandom.__reduce__rBc Cs||}||krtd|dkr:|dkr2||Std||}||krRtd||}|dkrx|dkrx|||S|dkrtd|||f||}||krtd|dkr||d|} n"|dkr||d|} ntd | dkrtd|||| S) zChoose a random item from range(start, stop[, step]). This fixes the problem with randint() which includes the endpoint; in Python this is usually not what you want. z!non-integer arg 1 for randrange()Nrzempty range for randrange()z non-integer stop for randrange()rBz(empty range for randrange() (%d, %d, %d)z non-integer step for randrange()zzero step for randrange())r]r9) r4startstopstep_intZistartZistopwidthZistepnr6r6r7rs4  zRandom.randrangecCs|||dS)zJReturn random integer in range [a, b], including both end points. rB)rr4rTbr6r6r7rszRandom.randintcCs,|j}|}||}||kr(||}q|S)zCReturn a random int in the range [0,n). Raises ValueError if n==0.)r( bit_length)r4rir(krr6r6r7r<s  z"Random._randbelow_with_getrandbitscCsn|j}||kr$td|||S|dkr4td||}|||}|}||kr^|}qN||||S)zReturn a random int in the range [0,n). Raises ValueError if n==0. The implementation does not use getrandbits, but only random. zUnderlying random() generator does not supply enough bits to choose from a population range this large. To remove the range limitation, add a getrandbits() method.rzBoundary cannot be zero)r_warnr])r4rirQmaxsizerZremlimitrnr6r6r7r=s z%Random._randbelow_without_getrandbitscCs:z|t|}Wntk r0tddYnX||S)z2Choose a random element from a non-empty sequence.z$Cannot choose from an empty sequenceN)r9rMr] IndexError)r4seqir6r6r7rs z Random.choicecCs|dkrN|j}ttdt|D]*}||d}||||||<||<q nHt}ttdt|D]0}|||d}||||||<||<qddS)zShuffle list x in place, and return None. Optional argument random is a 0-argument function returning a random float in [0.0, 1.0); if it is the default None, the standard random.random will be used. NrB)r9reversedrangerMrQ)r4r5r randbelowrtjrgr6r6r7r%s  zRandom.shufflec Cst|trt|}t|ts$td|j}t|}d|krF|ksPntddg|}d}|dkr|dtt |dd7}||krt |}t |D]0}|||} || ||<|||d || <qnHt } | j } t |D]2}||} | | kr||} q| | || ||<q|S) a=Chooses k unique random elements from a population sequence or set. 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. To choose a sample in a range of integers, use range as an argument. This is especially fast and space efficient for sampling from a large population: sample(range(10000000), 60) z>Population must be a sequence or set. For dicts, use list(d).rz,Sample larger than population or is negativeNr+r2rB)rG_Setr\ _Sequencer^r9rMr]_ceil_loglistrvsetadd) r4 populationrmrwriresultZsetsizeZpoolrtrxZselectedZ selected_addr6r6r7r;s6)        z Random.sample) cum_weightsrmcs|jtdkrV|dkrHtd7fddtd|DStt|n|dk rftdtkrztdtdddfd dtd|DS) zReturn 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. Ncsg|]}qSr6r6rZrt)rgrirrr6r7 sz"Random.choices..z2Cannot specify both weights and cumulative weightsz3The number of weights does not match the populationrDrBcs$g|]}dqS)rr6r)rrhirrtotalr6r7rs) rrMrQ_repeatr _accumulater^r]_bisect)r4rZweightsrrmr6)rgrrrrirrrr7r)s$  zRandom.choicescCs||||S)zHGet a random number in the range [a, b) or [a, b] depending on rounding.rrjr6r6r7rszRandom.uniformrr.cCs||}z |dkrdn||||}Wntk r@|YSX||krdd|}d|}||}}|||t||S)zTriangular 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 N?r.)rZeroDivisionError_sqrt)r4ZlowZhighmodeur@r6r6r7r!s    zRandom.triangularcCsP|j}|}d|}t|d|}||d}|t| krqDq|||S)z\Normal distribution. mu is the mean, and sigma is the standard deviation. r.rr-)r NV_MAGICCONSTr~)r4musigmaru1u2zZzzr6r6r7rs   zRandom.normalvariatecCst|||S)zLog 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)r4rrr6r6r7rszRandom.lognormvariatecCstd| |S)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. r.)r~r)r4Zlambdr6r6r7rszRandom.expovariatecCs|j}|dkrt|Sd|}|td||}|}tt|}|||}|} | d||ks| d|t|kr4qq4d|} | |d| |} |} | dkr|t| t} n|t| t} | S)aFCircular 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ư>rr.)rTWOPIr_cos_pir_acos)r4rZkapparsrnrrdrqfZu3Zthetar6r6r7rs$   $zRandom.vonmisesvariatecCs~|dks|dkrtd|j}|dkrtd|d}|t}||}|}d|kr`dksdqFqFd|}t|d||} |t| } |||} ||| | } | td| dks| t| krF| |SqFn|dkrtd| |S|} t|t}|| }|dkr$|d|} nt||| } |}|dkr^|| |dkrpqrq|t| krqrq| |SdS) aZGamma 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 rz*gammavariate: alpha and beta must be > 0.0r.r,gHz>gP?r/N)r]rrLOG4r~r SG_MAGICCONST_e)r4alphabetarZainvZbbbZcccrrvr5rrnrrkpr6r6r7r #s@        zRandom.gammavariatecCs`|j}|j}d|_|dkrT|t}tdtd|}t||}t|||_|||S)zGaussian 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. Ngr.)rr3rrr~r_sin)r4rrrrZx2piZg2radr6r6r7r"hs  z Random.gausscCs0||d}|dkrdS||||dSdS)zBeta distribution. Conditions on the parameters are alpha > 0 and beta > 0. Returned values range between 0 and 1. r.rrN)r )r4rryr6r6r7r#s zRandom.betavariatecCsd|}d|d|S)z3Pareto distribution. alpha is the shape parameter.r.r)r4rrr6r6r7r$s zRandom.paretovariatecCs"d|}|t| d|S)zfWeibull distribution. alpha is the scale parameter and beta is the shape parameter. r.)rr~)r4rrrr6r6r7r%s zRandom.weibullvariate)N)Nr1)N)N)rr.N)$__name__ __module__ __qualname____doc__rXr8rArr&r'rarbrcrQrrr<BPFr=r9rrrr)rr!rrrrr r"r#r$r% __classcell__r6r6rVr7rNs<    ,  G  0E5 c@s8eZdZdZddZddZddZdd ZeZZ d S) r*zAlternate 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). cCsttddd?tS)z3Get the next random number in the range [0.0, 1.0).rCrFr2)rQrR_urandom RECIP_BPFrYr6r6r7rszSystemRandom.randomcCs<|dkrtd|dd}tt|d}||d|?S)z:getrandbits(k) -> x. Generates an int with k random bits.rz(number of bits must be greater than zerorCrF)r]rQrRr)r4rmZnumbytesr5r6r6r7r(s  zSystemRandom.getrandbitscOsdS)zs'     {