File size: 49,364 Bytes
b2add11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module random</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>random</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/local/lib/python3.10/random.py">/usr/local/lib/python3.10/random.py</a><br><a href="https://docs.python.org/3.10/library/random.html">Module Reference</a></font></td></tr></table>
    <p><tt><a href="#Random">Random</a>&nbsp;variable&nbsp;generators.<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;bytes<br>
&nbsp;&nbsp;&nbsp;&nbsp;-----<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uniform&nbsp;bytes&nbsp;(values&nbsp;between&nbsp;0&nbsp;and&nbsp;255)<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;integers<br>
&nbsp;&nbsp;&nbsp;&nbsp;--------<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uniform&nbsp;within&nbsp;range<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;sequences<br>
&nbsp;&nbsp;&nbsp;&nbsp;---------<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pick&nbsp;random&nbsp;element<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pick&nbsp;random&nbsp;sample<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pick&nbsp;weighted&nbsp;random&nbsp;sample<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;generate&nbsp;random&nbsp;permutation<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;distributions&nbsp;on&nbsp;the&nbsp;real&nbsp;line:<br>
&nbsp;&nbsp;&nbsp;&nbsp;------------------------------<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;uniform<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;triangular<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;normal&nbsp;(Gaussian)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lognormal<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;negative&nbsp;exponential<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gamma<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;beta<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pareto<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Weibull<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;distributions&nbsp;on&nbsp;the&nbsp;circle&nbsp;(angles&nbsp;0&nbsp;to&nbsp;2pi)<br>
&nbsp;&nbsp;&nbsp;&nbsp;---------------------------------------------<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;circular&nbsp;uniform<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;von&nbsp;Mises<br>
&nbsp;<br>
General&nbsp;notes&nbsp;on&nbsp;the&nbsp;underlying&nbsp;Mersenne&nbsp;Twister&nbsp;core&nbsp;generator:<br>
&nbsp;<br>
*&nbsp;The&nbsp;period&nbsp;is&nbsp;2**19937-1.<br>
*&nbsp;It&nbsp;is&nbsp;one&nbsp;of&nbsp;the&nbsp;most&nbsp;extensively&nbsp;tested&nbsp;generators&nbsp;in&nbsp;existence.<br>
*&nbsp;The&nbsp;<a href="#-random">random</a>()&nbsp;method&nbsp;is&nbsp;implemented&nbsp;in&nbsp;C,&nbsp;executes&nbsp;in&nbsp;a&nbsp;single&nbsp;Python&nbsp;step,<br>
&nbsp;&nbsp;and&nbsp;is,&nbsp;therefore,&nbsp;threadsafe.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="os.html">os</a><br>
</td><td width="25%" valign=top><a href="_random.html">_random</a><br>
</td><td width="25%" valign=top></td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="_random.html#Random">_random.Random</a>(<a href="builtins.html#object">builtins.object</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="random.html#Random">Random</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="random.html#SystemRandom">SystemRandom</a>
</font></dt></dl>
</dd>
</dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Random">class <strong>Random</strong></a>(<a href="_random.html#Random">_random.Random</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#Random">Random</a>(x=None)<br>
&nbsp;<br>
<a href="#Random">Random</a>&nbsp;number&nbsp;generator&nbsp;base&nbsp;class&nbsp;used&nbsp;by&nbsp;bound&nbsp;module&nbsp;functions.<br>
&nbsp;<br>
Used&nbsp;to&nbsp;instantiate&nbsp;instances&nbsp;of&nbsp;<a href="#Random">Random</a>&nbsp;to&nbsp;get&nbsp;generators&nbsp;that&nbsp;don't<br>
share&nbsp;state.<br>
&nbsp;<br>
Class&nbsp;<a href="#Random">Random</a>&nbsp;can&nbsp;also&nbsp;be&nbsp;subclassed&nbsp;if&nbsp;you&nbsp;want&nbsp;to&nbsp;use&nbsp;a&nbsp;different&nbsp;basic<br>
generator&nbsp;of&nbsp;your&nbsp;own&nbsp;devising:&nbsp;in&nbsp;that&nbsp;case,&nbsp;override&nbsp;the&nbsp;following<br>
methods:&nbsp;&nbsp;<a href="#Random-random">random</a>(),&nbsp;<a href="#Random-seed">seed</a>(),&nbsp;<a href="#Random-getstate">getstate</a>(),&nbsp;and&nbsp;<a href="#Random-setstate">setstate</a>().<br>
Optionally,&nbsp;implement&nbsp;a&nbsp;<a href="#Random-getrandbits">getrandbits</a>()&nbsp;method&nbsp;so&nbsp;that&nbsp;<a href="#Random-randrange">randrange</a>()<br>
can&nbsp;cover&nbsp;arbitrarily&nbsp;large&nbsp;ranges.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="random.html#Random">Random</a></dd>
<dd><a href="_random.html#Random">_random.Random</a></dd>
<dd><a href="builtins.html#object">builtins.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="Random-__getstate__"><strong>__getstate__</strong></a>(self)</dt><dd><tt>#&nbsp;Issue&nbsp;17489:&nbsp;Since&nbsp;__reduce__&nbsp;was&nbsp;defined&nbsp;to&nbsp;fix&nbsp;#759889&nbsp;this&nbsp;is&nbsp;no<br>
#&nbsp;longer&nbsp;called;&nbsp;we&nbsp;leave&nbsp;it&nbsp;here&nbsp;because&nbsp;it&nbsp;has&nbsp;been&nbsp;here&nbsp;since&nbsp;random&nbsp;was<br>
#&nbsp;rewritten&nbsp;back&nbsp;in&nbsp;2001&nbsp;and&nbsp;why&nbsp;risk&nbsp;breaking&nbsp;something.</tt></dd></dl>

<dl><dt><a name="Random-__init__"><strong>__init__</strong></a>(self, x=None)</dt><dd><tt>Initialize&nbsp;an&nbsp;instance.<br>
&nbsp;<br>
Optional&nbsp;argument&nbsp;x&nbsp;controls&nbsp;seeding,&nbsp;as&nbsp;for&nbsp;<a href="#Random">Random</a>.<a href="#Random-seed">seed</a>().</tt></dd></dl>

<dl><dt><a name="Random-__reduce__"><strong>__reduce__</strong></a>(self)</dt><dd><tt>Helper&nbsp;for&nbsp;pickle.</tt></dd></dl>

<dl><dt><a name="Random-__setstate__"><strong>__setstate__</strong></a>(self, state)</dt></dl>

<dl><dt><a name="Random-betavariate"><strong>betavariate</strong></a>(self, alpha, beta)</dt><dd><tt>Beta&nbsp;distribution.<br>
&nbsp;<br>
Conditions&nbsp;on&nbsp;the&nbsp;parameters&nbsp;are&nbsp;alpha&nbsp;&gt;&nbsp;0&nbsp;and&nbsp;beta&nbsp;&gt;&nbsp;0.<br>
Returned&nbsp;values&nbsp;range&nbsp;between&nbsp;0&nbsp;and&nbsp;1.</tt></dd></dl>

<dl><dt><a name="Random-choice"><strong>choice</strong></a>(self, seq)</dt><dd><tt>Choose&nbsp;a&nbsp;random&nbsp;element&nbsp;from&nbsp;a&nbsp;non-empty&nbsp;sequence.</tt></dd></dl>

<dl><dt><a name="Random-choices"><strong>choices</strong></a>(self, population, weights=None, *, cum_weights=None, k=1)</dt><dd><tt>Return&nbsp;a&nbsp;k&nbsp;sized&nbsp;list&nbsp;of&nbsp;population&nbsp;elements&nbsp;chosen&nbsp;with&nbsp;replacement.<br>
&nbsp;<br>
If&nbsp;the&nbsp;relative&nbsp;weights&nbsp;or&nbsp;cumulative&nbsp;weights&nbsp;are&nbsp;not&nbsp;specified,<br>
the&nbsp;selections&nbsp;are&nbsp;made&nbsp;with&nbsp;equal&nbsp;probability.</tt></dd></dl>

<dl><dt><a name="Random-expovariate"><strong>expovariate</strong></a>(self, lambd)</dt><dd><tt>Exponential&nbsp;distribution.<br>
&nbsp;<br>
lambd&nbsp;is&nbsp;1.0&nbsp;divided&nbsp;by&nbsp;the&nbsp;desired&nbsp;mean.&nbsp;&nbsp;It&nbsp;should&nbsp;be<br>
nonzero.&nbsp;&nbsp;(The&nbsp;parameter&nbsp;would&nbsp;be&nbsp;called&nbsp;"lambda",&nbsp;but&nbsp;that&nbsp;is<br>
a&nbsp;reserved&nbsp;word&nbsp;in&nbsp;Python.)&nbsp;&nbsp;Returned&nbsp;values&nbsp;range&nbsp;from&nbsp;0&nbsp;to<br>
positive&nbsp;infinity&nbsp;if&nbsp;lambd&nbsp;is&nbsp;positive,&nbsp;and&nbsp;from&nbsp;negative<br>
infinity&nbsp;to&nbsp;0&nbsp;if&nbsp;lambd&nbsp;is&nbsp;negative.</tt></dd></dl>

<dl><dt><a name="Random-gammavariate"><strong>gammavariate</strong></a>(self, alpha, beta)</dt><dd><tt>Gamma&nbsp;distribution.&nbsp;&nbsp;Not&nbsp;the&nbsp;gamma&nbsp;function!<br>
&nbsp;<br>
Conditions&nbsp;on&nbsp;the&nbsp;parameters&nbsp;are&nbsp;alpha&nbsp;&gt;&nbsp;0&nbsp;and&nbsp;beta&nbsp;&gt;&nbsp;0.<br>
&nbsp;<br>
The&nbsp;probability&nbsp;distribution&nbsp;function&nbsp;is:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x&nbsp;**&nbsp;(alpha&nbsp;-&nbsp;1)&nbsp;*&nbsp;math.exp(-x&nbsp;/&nbsp;beta)<br>
&nbsp;&nbsp;pdf(x)&nbsp;=&nbsp;&nbsp;--------------------------------------<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;math.gamma(alpha)&nbsp;*&nbsp;beta&nbsp;**&nbsp;alpha</tt></dd></dl>

<dl><dt><a name="Random-gauss"><strong>gauss</strong></a>(self, mu, sigma)</dt><dd><tt>Gaussian&nbsp;distribution.<br>
&nbsp;<br>
mu&nbsp;is&nbsp;the&nbsp;mean,&nbsp;and&nbsp;sigma&nbsp;is&nbsp;the&nbsp;standard&nbsp;deviation.&nbsp;&nbsp;This&nbsp;is<br>
slightly&nbsp;faster&nbsp;than&nbsp;the&nbsp;<a href="#Random-normalvariate">normalvariate</a>()&nbsp;function.<br>
&nbsp;<br>
Not&nbsp;thread-safe&nbsp;without&nbsp;a&nbsp;lock&nbsp;around&nbsp;calls.</tt></dd></dl>

<dl><dt><a name="Random-getstate"><strong>getstate</strong></a>(self)</dt><dd><tt>Return&nbsp;internal&nbsp;state;&nbsp;can&nbsp;be&nbsp;passed&nbsp;to&nbsp;<a href="#Random-setstate">setstate</a>()&nbsp;later.</tt></dd></dl>

<dl><dt><a name="Random-lognormvariate"><strong>lognormvariate</strong></a>(self, mu, sigma)</dt><dd><tt>Log&nbsp;normal&nbsp;distribution.<br>
&nbsp;<br>
If&nbsp;you&nbsp;take&nbsp;the&nbsp;natural&nbsp;logarithm&nbsp;of&nbsp;this&nbsp;distribution,&nbsp;you'll&nbsp;get&nbsp;a<br>
normal&nbsp;distribution&nbsp;with&nbsp;mean&nbsp;mu&nbsp;and&nbsp;standard&nbsp;deviation&nbsp;sigma.<br>
mu&nbsp;can&nbsp;have&nbsp;any&nbsp;value,&nbsp;and&nbsp;sigma&nbsp;must&nbsp;be&nbsp;greater&nbsp;than&nbsp;zero.</tt></dd></dl>

<dl><dt><a name="Random-normalvariate"><strong>normalvariate</strong></a>(self, mu, sigma)</dt><dd><tt>Normal&nbsp;distribution.<br>
&nbsp;<br>
mu&nbsp;is&nbsp;the&nbsp;mean,&nbsp;and&nbsp;sigma&nbsp;is&nbsp;the&nbsp;standard&nbsp;deviation.</tt></dd></dl>

<dl><dt><a name="Random-paretovariate"><strong>paretovariate</strong></a>(self, alpha)</dt><dd><tt>Pareto&nbsp;distribution.&nbsp;&nbsp;alpha&nbsp;is&nbsp;the&nbsp;shape&nbsp;parameter.</tt></dd></dl>

<dl><dt><a name="Random-randbytes"><strong>randbytes</strong></a>(self, n)</dt><dd><tt>Generate&nbsp;n&nbsp;random&nbsp;bytes.</tt></dd></dl>

<dl><dt><a name="Random-randint"><strong>randint</strong></a>(self, a, b)</dt><dd><tt>Return&nbsp;random&nbsp;integer&nbsp;in&nbsp;range&nbsp;[a,&nbsp;b],&nbsp;including&nbsp;both&nbsp;end&nbsp;points.</tt></dd></dl>

<dl><dt><a name="Random-randrange"><strong>randrange</strong></a>(self, start, stop=None, step=1)</dt><dd><tt>Choose&nbsp;a&nbsp;random&nbsp;item&nbsp;from&nbsp;range(start,&nbsp;stop[,&nbsp;step]).<br>
&nbsp;<br>
This&nbsp;fixes&nbsp;the&nbsp;problem&nbsp;with&nbsp;<a href="#Random-randint">randint</a>()&nbsp;which&nbsp;includes&nbsp;the<br>
endpoint;&nbsp;in&nbsp;Python&nbsp;this&nbsp;is&nbsp;usually&nbsp;not&nbsp;what&nbsp;you&nbsp;want.</tt></dd></dl>

<dl><dt><a name="Random-sample"><strong>sample</strong></a>(self, population, k, *, counts=None)</dt><dd><tt>Chooses&nbsp;k&nbsp;unique&nbsp;random&nbsp;elements&nbsp;from&nbsp;a&nbsp;population&nbsp;sequence&nbsp;or&nbsp;set.<br>
&nbsp;<br>
Returns&nbsp;a&nbsp;new&nbsp;list&nbsp;containing&nbsp;elements&nbsp;from&nbsp;the&nbsp;population&nbsp;while<br>
leaving&nbsp;the&nbsp;original&nbsp;population&nbsp;unchanged.&nbsp;&nbsp;The&nbsp;resulting&nbsp;list&nbsp;is<br>
in&nbsp;selection&nbsp;order&nbsp;so&nbsp;that&nbsp;all&nbsp;sub-slices&nbsp;will&nbsp;also&nbsp;be&nbsp;valid&nbsp;random<br>
samples.&nbsp;&nbsp;This&nbsp;allows&nbsp;raffle&nbsp;winners&nbsp;(the&nbsp;sample)&nbsp;to&nbsp;be&nbsp;partitioned<br>
into&nbsp;grand&nbsp;prize&nbsp;and&nbsp;second&nbsp;place&nbsp;winners&nbsp;(the&nbsp;subslices).<br>
&nbsp;<br>
Members&nbsp;of&nbsp;the&nbsp;population&nbsp;need&nbsp;not&nbsp;be&nbsp;hashable&nbsp;or&nbsp;unique.&nbsp;&nbsp;If&nbsp;the<br>
population&nbsp;contains&nbsp;repeats,&nbsp;then&nbsp;each&nbsp;occurrence&nbsp;is&nbsp;a&nbsp;possible<br>
selection&nbsp;in&nbsp;the&nbsp;sample.<br>
&nbsp;<br>
Repeated&nbsp;elements&nbsp;can&nbsp;be&nbsp;specified&nbsp;one&nbsp;at&nbsp;a&nbsp;time&nbsp;or&nbsp;with&nbsp;the&nbsp;optional<br>
counts&nbsp;parameter.&nbsp;&nbsp;For&nbsp;example:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Random-sample">sample</a>(['red',&nbsp;'blue'],&nbsp;counts=[4,&nbsp;2],&nbsp;k=5)<br>
&nbsp;<br>
is&nbsp;equivalent&nbsp;to:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Random-sample">sample</a>(['red',&nbsp;'red',&nbsp;'red',&nbsp;'red',&nbsp;'blue',&nbsp;'blue'],&nbsp;k=5)<br>
&nbsp;<br>
To&nbsp;choose&nbsp;a&nbsp;sample&nbsp;from&nbsp;a&nbsp;range&nbsp;of&nbsp;integers,&nbsp;use&nbsp;range()&nbsp;for&nbsp;the<br>
population&nbsp;argument.&nbsp;&nbsp;This&nbsp;is&nbsp;especially&nbsp;fast&nbsp;and&nbsp;space&nbsp;efficient<br>
for&nbsp;sampling&nbsp;from&nbsp;a&nbsp;large&nbsp;population:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#Random-sample">sample</a>(range(10000000),&nbsp;60)</tt></dd></dl>

<dl><dt><a name="Random-seed"><strong>seed</strong></a>(self, a=None, version=2)</dt><dd><tt>Initialize&nbsp;internal&nbsp;state&nbsp;from&nbsp;a&nbsp;seed.<br>
&nbsp;<br>
The&nbsp;only&nbsp;supported&nbsp;seed&nbsp;types&nbsp;are&nbsp;None,&nbsp;int,&nbsp;float,<br>
str,&nbsp;bytes,&nbsp;and&nbsp;bytearray.<br>
&nbsp;<br>
None&nbsp;or&nbsp;no&nbsp;argument&nbsp;seeds&nbsp;from&nbsp;current&nbsp;time&nbsp;or&nbsp;from&nbsp;an&nbsp;operating<br>
system&nbsp;specific&nbsp;randomness&nbsp;source&nbsp;if&nbsp;available.<br>
&nbsp;<br>
If&nbsp;*a*&nbsp;is&nbsp;an&nbsp;int,&nbsp;all&nbsp;bits&nbsp;are&nbsp;used.<br>
&nbsp;<br>
For&nbsp;version&nbsp;2&nbsp;(the&nbsp;default),&nbsp;all&nbsp;of&nbsp;the&nbsp;bits&nbsp;are&nbsp;used&nbsp;if&nbsp;*a*&nbsp;is&nbsp;a&nbsp;str,<br>
bytes,&nbsp;or&nbsp;bytearray.&nbsp;&nbsp;For&nbsp;version&nbsp;1&nbsp;(provided&nbsp;for&nbsp;reproducing&nbsp;random<br>
sequences&nbsp;from&nbsp;older&nbsp;versions&nbsp;of&nbsp;Python),&nbsp;the&nbsp;algorithm&nbsp;for&nbsp;str&nbsp;and<br>
bytes&nbsp;generates&nbsp;a&nbsp;narrower&nbsp;range&nbsp;of&nbsp;seeds.</tt></dd></dl>

<dl><dt><a name="Random-setstate"><strong>setstate</strong></a>(self, state)</dt><dd><tt>Restore&nbsp;internal&nbsp;state&nbsp;from&nbsp;object&nbsp;returned&nbsp;by&nbsp;<a href="#Random-getstate">getstate</a>().</tt></dd></dl>

<dl><dt><a name="Random-shuffle"><strong>shuffle</strong></a>(self, x, random=None)</dt><dd><tt>Shuffle&nbsp;list&nbsp;x&nbsp;in&nbsp;place,&nbsp;and&nbsp;return&nbsp;None.<br>
&nbsp;<br>
Optional&nbsp;argument&nbsp;random&nbsp;is&nbsp;a&nbsp;0-argument&nbsp;function&nbsp;returning&nbsp;a<br>
random&nbsp;float&nbsp;in&nbsp;[0.0,&nbsp;1.0);&nbsp;if&nbsp;it&nbsp;is&nbsp;the&nbsp;default&nbsp;None,&nbsp;the<br>
standard&nbsp;random.random&nbsp;will&nbsp;be&nbsp;used.</tt></dd></dl>

<dl><dt><a name="Random-triangular"><strong>triangular</strong></a>(self, low=0.0, high=1.0, mode=None)</dt><dd><tt>Triangular&nbsp;distribution.<br>
&nbsp;<br>
Continuous&nbsp;distribution&nbsp;bounded&nbsp;by&nbsp;given&nbsp;lower&nbsp;and&nbsp;upper&nbsp;limits,<br>
and&nbsp;having&nbsp;a&nbsp;given&nbsp;mode&nbsp;value&nbsp;in-between.<br>
&nbsp;<br>
<a href="http://en.wikipedia.org/wiki/Triangular_distribution">http://en.wikipedia.org/wiki/Triangular_distribution</a></tt></dd></dl>

<dl><dt><a name="Random-uniform"><strong>uniform</strong></a>(self, a, b)</dt><dd><tt>Get&nbsp;a&nbsp;random&nbsp;number&nbsp;in&nbsp;the&nbsp;range&nbsp;[a,&nbsp;b)&nbsp;or&nbsp;[a,&nbsp;b]&nbsp;depending&nbsp;on&nbsp;rounding.</tt></dd></dl>

<dl><dt><a name="Random-vonmisesvariate"><strong>vonmisesvariate</strong></a>(self, mu, kappa)</dt><dd><tt>Circular&nbsp;data&nbsp;distribution.<br>
&nbsp;<br>
mu&nbsp;is&nbsp;the&nbsp;mean&nbsp;angle,&nbsp;expressed&nbsp;in&nbsp;radians&nbsp;between&nbsp;0&nbsp;and&nbsp;2*pi,&nbsp;and<br>
kappa&nbsp;is&nbsp;the&nbsp;concentration&nbsp;parameter,&nbsp;which&nbsp;must&nbsp;be&nbsp;greater&nbsp;than&nbsp;or<br>
equal&nbsp;to&nbsp;zero.&nbsp;&nbsp;If&nbsp;kappa&nbsp;is&nbsp;equal&nbsp;to&nbsp;zero,&nbsp;this&nbsp;distribution&nbsp;reduces<br>
to&nbsp;a&nbsp;uniform&nbsp;random&nbsp;angle&nbsp;over&nbsp;the&nbsp;range&nbsp;0&nbsp;to&nbsp;2*pi.</tt></dd></dl>

<dl><dt><a name="Random-weibullvariate"><strong>weibullvariate</strong></a>(self, alpha, beta)</dt><dd><tt>Weibull&nbsp;distribution.<br>
&nbsp;<br>
alpha&nbsp;is&nbsp;the&nbsp;scale&nbsp;parameter&nbsp;and&nbsp;beta&nbsp;is&nbsp;the&nbsp;shape&nbsp;parameter.</tt></dd></dl>

<hr>
Class methods defined here:<br>
<dl><dt><a name="Random-__init_subclass__"><strong>__init_subclass__</strong></a>(**kwargs)<font color="#909090"><font face="helvetica, arial"> from <a href="builtins.html#type">builtins.type</a></font></font></dt><dd><tt>Control&nbsp;how&nbsp;subclasses&nbsp;generate&nbsp;random&nbsp;integers.<br>
&nbsp;<br>
The&nbsp;algorithm&nbsp;a&nbsp;subclass&nbsp;can&nbsp;use&nbsp;depends&nbsp;on&nbsp;the&nbsp;<a href="#Random-random">random</a>()&nbsp;and/or<br>
<a href="#Random-getrandbits">getrandbits</a>()&nbsp;implementation&nbsp;available&nbsp;to&nbsp;it&nbsp;and&nbsp;determines<br>
whether&nbsp;it&nbsp;can&nbsp;generate&nbsp;random&nbsp;integers&nbsp;from&nbsp;arbitrarily&nbsp;large<br>
ranges.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>VERSION</strong> = 3</dl>

<hr>
Methods inherited from <a href="_random.html#Random">_random.Random</a>:<br>
<dl><dt><a name="Random-getrandbits"><strong>getrandbits</strong></a>(self, k, /)</dt><dd><tt><a href="#Random-getrandbits">getrandbits</a>(k)&nbsp;-&gt;&nbsp;x.&nbsp;&nbsp;Generates&nbsp;an&nbsp;int&nbsp;with&nbsp;k&nbsp;random&nbsp;bits.</tt></dd></dl>

<dl><dt><a name="Random-random"><strong>random</strong></a>(self, /)</dt><dd><tt><a href="#Random-random">random</a>()&nbsp;-&gt;&nbsp;x&nbsp;in&nbsp;the&nbsp;interval&nbsp;[0,&nbsp;1).</tt></dd></dl>

<hr>
Static methods inherited from <a href="_random.html#Random">_random.Random</a>:<br>
<dl><dt><a name="Random-__new__"><strong>__new__</strong></a>(*args, **kwargs)<font color="#909090"><font face="helvetica, arial"> from <a href="builtins.html#type">builtins.type</a></font></font></dt><dd><tt>Create&nbsp;and&nbsp;return&nbsp;a&nbsp;new&nbsp;object.&nbsp;&nbsp;See&nbsp;help(type)&nbsp;for&nbsp;accurate&nbsp;signature.</tt></dd></dl>

</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="SystemRandom">class <strong>SystemRandom</strong></a>(<a href="random.html#Random">Random</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#SystemRandom">SystemRandom</a>(x=None)<br>
&nbsp;<br>
Alternate&nbsp;random&nbsp;number&nbsp;generator&nbsp;using&nbsp;sources&nbsp;provided<br>
by&nbsp;the&nbsp;operating&nbsp;system&nbsp;(such&nbsp;as&nbsp;/dev/urandom&nbsp;on&nbsp;Unix&nbsp;or<br>
CryptGenRandom&nbsp;on&nbsp;Windows).<br>
&nbsp;<br>
&nbsp;Not&nbsp;available&nbsp;on&nbsp;all&nbsp;systems&nbsp;(see&nbsp;os.urandom()&nbsp;for&nbsp;details).<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="random.html#SystemRandom">SystemRandom</a></dd>
<dd><a href="random.html#Random">Random</a></dd>
<dd><a href="_random.html#Random">_random.Random</a></dd>
<dd><a href="builtins.html#object">builtins.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="SystemRandom-getrandbits"><strong>getrandbits</strong></a>(self, k)</dt><dd><tt><a href="#SystemRandom-getrandbits">getrandbits</a>(k)&nbsp;-&gt;&nbsp;x.&nbsp;&nbsp;Generates&nbsp;an&nbsp;int&nbsp;with&nbsp;k&nbsp;random&nbsp;bits.</tt></dd></dl>

<dl><dt><a name="SystemRandom-getstate"><strong>getstate</strong></a> = <a href="#SystemRandom-_notimplemented">_notimplemented</a>(self, *args, **kwds)</dt></dl>

<dl><dt><a name="SystemRandom-randbytes"><strong>randbytes</strong></a>(self, n)</dt><dd><tt>Generate&nbsp;n&nbsp;random&nbsp;bytes.</tt></dd></dl>

<dl><dt><a name="SystemRandom-random"><strong>random</strong></a>(self)</dt><dd><tt>Get&nbsp;the&nbsp;next&nbsp;random&nbsp;number&nbsp;in&nbsp;the&nbsp;range&nbsp;[0.0,&nbsp;1.0).</tt></dd></dl>

<dl><dt><a name="SystemRandom-seed"><strong>seed</strong></a>(self, *args, **kwds)</dt><dd><tt>Stub&nbsp;method.&nbsp;&nbsp;Not&nbsp;used&nbsp;for&nbsp;a&nbsp;system&nbsp;random&nbsp;number&nbsp;generator.</tt></dd></dl>

<dl><dt><a name="SystemRandom-setstate"><strong>setstate</strong></a> = <a href="#SystemRandom-_notimplemented">_notimplemented</a>(self, *args, **kwds)</dt></dl>

<hr>
Methods inherited from <a href="random.html#Random">Random</a>:<br>
<dl><dt><a name="SystemRandom-__getstate__"><strong>__getstate__</strong></a>(self)</dt><dd><tt>#&nbsp;Issue&nbsp;17489:&nbsp;Since&nbsp;__reduce__&nbsp;was&nbsp;defined&nbsp;to&nbsp;fix&nbsp;#759889&nbsp;this&nbsp;is&nbsp;no<br>
#&nbsp;longer&nbsp;called;&nbsp;we&nbsp;leave&nbsp;it&nbsp;here&nbsp;because&nbsp;it&nbsp;has&nbsp;been&nbsp;here&nbsp;since&nbsp;random&nbsp;was<br>
#&nbsp;rewritten&nbsp;back&nbsp;in&nbsp;2001&nbsp;and&nbsp;why&nbsp;risk&nbsp;breaking&nbsp;something.</tt></dd></dl>

<dl><dt><a name="SystemRandom-__init__"><strong>__init__</strong></a>(self, x=None)</dt><dd><tt>Initialize&nbsp;an&nbsp;instance.<br>
&nbsp;<br>
Optional&nbsp;argument&nbsp;x&nbsp;controls&nbsp;seeding,&nbsp;as&nbsp;for&nbsp;<a href="#Random">Random</a>.<a href="#SystemRandom-seed">seed</a>().</tt></dd></dl>

<dl><dt><a name="SystemRandom-__reduce__"><strong>__reduce__</strong></a>(self)</dt><dd><tt>Helper&nbsp;for&nbsp;pickle.</tt></dd></dl>

<dl><dt><a name="SystemRandom-__setstate__"><strong>__setstate__</strong></a>(self, state)</dt></dl>

<dl><dt><a name="SystemRandom-betavariate"><strong>betavariate</strong></a>(self, alpha, beta)</dt><dd><tt>Beta&nbsp;distribution.<br>
&nbsp;<br>
Conditions&nbsp;on&nbsp;the&nbsp;parameters&nbsp;are&nbsp;alpha&nbsp;&gt;&nbsp;0&nbsp;and&nbsp;beta&nbsp;&gt;&nbsp;0.<br>
Returned&nbsp;values&nbsp;range&nbsp;between&nbsp;0&nbsp;and&nbsp;1.</tt></dd></dl>

<dl><dt><a name="SystemRandom-choice"><strong>choice</strong></a>(self, seq)</dt><dd><tt>Choose&nbsp;a&nbsp;random&nbsp;element&nbsp;from&nbsp;a&nbsp;non-empty&nbsp;sequence.</tt></dd></dl>

<dl><dt><a name="SystemRandom-choices"><strong>choices</strong></a>(self, population, weights=None, *, cum_weights=None, k=1)</dt><dd><tt>Return&nbsp;a&nbsp;k&nbsp;sized&nbsp;list&nbsp;of&nbsp;population&nbsp;elements&nbsp;chosen&nbsp;with&nbsp;replacement.<br>
&nbsp;<br>
If&nbsp;the&nbsp;relative&nbsp;weights&nbsp;or&nbsp;cumulative&nbsp;weights&nbsp;are&nbsp;not&nbsp;specified,<br>
the&nbsp;selections&nbsp;are&nbsp;made&nbsp;with&nbsp;equal&nbsp;probability.</tt></dd></dl>

<dl><dt><a name="SystemRandom-expovariate"><strong>expovariate</strong></a>(self, lambd)</dt><dd><tt>Exponential&nbsp;distribution.<br>
&nbsp;<br>
lambd&nbsp;is&nbsp;1.0&nbsp;divided&nbsp;by&nbsp;the&nbsp;desired&nbsp;mean.&nbsp;&nbsp;It&nbsp;should&nbsp;be<br>
nonzero.&nbsp;&nbsp;(The&nbsp;parameter&nbsp;would&nbsp;be&nbsp;called&nbsp;"lambda",&nbsp;but&nbsp;that&nbsp;is<br>
a&nbsp;reserved&nbsp;word&nbsp;in&nbsp;Python.)&nbsp;&nbsp;Returned&nbsp;values&nbsp;range&nbsp;from&nbsp;0&nbsp;to<br>
positive&nbsp;infinity&nbsp;if&nbsp;lambd&nbsp;is&nbsp;positive,&nbsp;and&nbsp;from&nbsp;negative<br>
infinity&nbsp;to&nbsp;0&nbsp;if&nbsp;lambd&nbsp;is&nbsp;negative.</tt></dd></dl>

<dl><dt><a name="SystemRandom-gammavariate"><strong>gammavariate</strong></a>(self, alpha, beta)</dt><dd><tt>Gamma&nbsp;distribution.&nbsp;&nbsp;Not&nbsp;the&nbsp;gamma&nbsp;function!<br>
&nbsp;<br>
Conditions&nbsp;on&nbsp;the&nbsp;parameters&nbsp;are&nbsp;alpha&nbsp;&gt;&nbsp;0&nbsp;and&nbsp;beta&nbsp;&gt;&nbsp;0.<br>
&nbsp;<br>
The&nbsp;probability&nbsp;distribution&nbsp;function&nbsp;is:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x&nbsp;**&nbsp;(alpha&nbsp;-&nbsp;1)&nbsp;*&nbsp;math.exp(-x&nbsp;/&nbsp;beta)<br>
&nbsp;&nbsp;pdf(x)&nbsp;=&nbsp;&nbsp;--------------------------------------<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;math.gamma(alpha)&nbsp;*&nbsp;beta&nbsp;**&nbsp;alpha</tt></dd></dl>

<dl><dt><a name="SystemRandom-gauss"><strong>gauss</strong></a>(self, mu, sigma)</dt><dd><tt>Gaussian&nbsp;distribution.<br>
&nbsp;<br>
mu&nbsp;is&nbsp;the&nbsp;mean,&nbsp;and&nbsp;sigma&nbsp;is&nbsp;the&nbsp;standard&nbsp;deviation.&nbsp;&nbsp;This&nbsp;is<br>
slightly&nbsp;faster&nbsp;than&nbsp;the&nbsp;<a href="#SystemRandom-normalvariate">normalvariate</a>()&nbsp;function.<br>
&nbsp;<br>
Not&nbsp;thread-safe&nbsp;without&nbsp;a&nbsp;lock&nbsp;around&nbsp;calls.</tt></dd></dl>

<dl><dt><a name="SystemRandom-lognormvariate"><strong>lognormvariate</strong></a>(self, mu, sigma)</dt><dd><tt>Log&nbsp;normal&nbsp;distribution.<br>
&nbsp;<br>
If&nbsp;you&nbsp;take&nbsp;the&nbsp;natural&nbsp;logarithm&nbsp;of&nbsp;this&nbsp;distribution,&nbsp;you'll&nbsp;get&nbsp;a<br>
normal&nbsp;distribution&nbsp;with&nbsp;mean&nbsp;mu&nbsp;and&nbsp;standard&nbsp;deviation&nbsp;sigma.<br>
mu&nbsp;can&nbsp;have&nbsp;any&nbsp;value,&nbsp;and&nbsp;sigma&nbsp;must&nbsp;be&nbsp;greater&nbsp;than&nbsp;zero.</tt></dd></dl>

<dl><dt><a name="SystemRandom-normalvariate"><strong>normalvariate</strong></a>(self, mu, sigma)</dt><dd><tt>Normal&nbsp;distribution.<br>
&nbsp;<br>
mu&nbsp;is&nbsp;the&nbsp;mean,&nbsp;and&nbsp;sigma&nbsp;is&nbsp;the&nbsp;standard&nbsp;deviation.</tt></dd></dl>

<dl><dt><a name="SystemRandom-paretovariate"><strong>paretovariate</strong></a>(self, alpha)</dt><dd><tt>Pareto&nbsp;distribution.&nbsp;&nbsp;alpha&nbsp;is&nbsp;the&nbsp;shape&nbsp;parameter.</tt></dd></dl>

<dl><dt><a name="SystemRandom-randint"><strong>randint</strong></a>(self, a, b)</dt><dd><tt>Return&nbsp;random&nbsp;integer&nbsp;in&nbsp;range&nbsp;[a,&nbsp;b],&nbsp;including&nbsp;both&nbsp;end&nbsp;points.</tt></dd></dl>

<dl><dt><a name="SystemRandom-randrange"><strong>randrange</strong></a>(self, start, stop=None, step=1)</dt><dd><tt>Choose&nbsp;a&nbsp;random&nbsp;item&nbsp;from&nbsp;range(start,&nbsp;stop[,&nbsp;step]).<br>
&nbsp;<br>
This&nbsp;fixes&nbsp;the&nbsp;problem&nbsp;with&nbsp;<a href="#SystemRandom-randint">randint</a>()&nbsp;which&nbsp;includes&nbsp;the<br>
endpoint;&nbsp;in&nbsp;Python&nbsp;this&nbsp;is&nbsp;usually&nbsp;not&nbsp;what&nbsp;you&nbsp;want.</tt></dd></dl>

<dl><dt><a name="SystemRandom-sample"><strong>sample</strong></a>(self, population, k, *, counts=None)</dt><dd><tt>Chooses&nbsp;k&nbsp;unique&nbsp;random&nbsp;elements&nbsp;from&nbsp;a&nbsp;population&nbsp;sequence&nbsp;or&nbsp;set.<br>
&nbsp;<br>
Returns&nbsp;a&nbsp;new&nbsp;list&nbsp;containing&nbsp;elements&nbsp;from&nbsp;the&nbsp;population&nbsp;while<br>
leaving&nbsp;the&nbsp;original&nbsp;population&nbsp;unchanged.&nbsp;&nbsp;The&nbsp;resulting&nbsp;list&nbsp;is<br>
in&nbsp;selection&nbsp;order&nbsp;so&nbsp;that&nbsp;all&nbsp;sub-slices&nbsp;will&nbsp;also&nbsp;be&nbsp;valid&nbsp;random<br>
samples.&nbsp;&nbsp;This&nbsp;allows&nbsp;raffle&nbsp;winners&nbsp;(the&nbsp;sample)&nbsp;to&nbsp;be&nbsp;partitioned<br>
into&nbsp;grand&nbsp;prize&nbsp;and&nbsp;second&nbsp;place&nbsp;winners&nbsp;(the&nbsp;subslices).<br>
&nbsp;<br>
Members&nbsp;of&nbsp;the&nbsp;population&nbsp;need&nbsp;not&nbsp;be&nbsp;hashable&nbsp;or&nbsp;unique.&nbsp;&nbsp;If&nbsp;the<br>
population&nbsp;contains&nbsp;repeats,&nbsp;then&nbsp;each&nbsp;occurrence&nbsp;is&nbsp;a&nbsp;possible<br>
selection&nbsp;in&nbsp;the&nbsp;sample.<br>
&nbsp;<br>
Repeated&nbsp;elements&nbsp;can&nbsp;be&nbsp;specified&nbsp;one&nbsp;at&nbsp;a&nbsp;time&nbsp;or&nbsp;with&nbsp;the&nbsp;optional<br>
counts&nbsp;parameter.&nbsp;&nbsp;For&nbsp;example:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SystemRandom-sample">sample</a>(['red',&nbsp;'blue'],&nbsp;counts=[4,&nbsp;2],&nbsp;k=5)<br>
&nbsp;<br>
is&nbsp;equivalent&nbsp;to:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SystemRandom-sample">sample</a>(['red',&nbsp;'red',&nbsp;'red',&nbsp;'red',&nbsp;'blue',&nbsp;'blue'],&nbsp;k=5)<br>
&nbsp;<br>
To&nbsp;choose&nbsp;a&nbsp;sample&nbsp;from&nbsp;a&nbsp;range&nbsp;of&nbsp;integers,&nbsp;use&nbsp;range()&nbsp;for&nbsp;the<br>
population&nbsp;argument.&nbsp;&nbsp;This&nbsp;is&nbsp;especially&nbsp;fast&nbsp;and&nbsp;space&nbsp;efficient<br>
for&nbsp;sampling&nbsp;from&nbsp;a&nbsp;large&nbsp;population:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#SystemRandom-sample">sample</a>(range(10000000),&nbsp;60)</tt></dd></dl>

<dl><dt><a name="SystemRandom-shuffle"><strong>shuffle</strong></a>(self, x, random=None)</dt><dd><tt>Shuffle&nbsp;list&nbsp;x&nbsp;in&nbsp;place,&nbsp;and&nbsp;return&nbsp;None.<br>
&nbsp;<br>
Optional&nbsp;argument&nbsp;random&nbsp;is&nbsp;a&nbsp;0-argument&nbsp;function&nbsp;returning&nbsp;a<br>
random&nbsp;float&nbsp;in&nbsp;[0.0,&nbsp;1.0);&nbsp;if&nbsp;it&nbsp;is&nbsp;the&nbsp;default&nbsp;None,&nbsp;the<br>
standard&nbsp;random.random&nbsp;will&nbsp;be&nbsp;used.</tt></dd></dl>

<dl><dt><a name="SystemRandom-triangular"><strong>triangular</strong></a>(self, low=0.0, high=1.0, mode=None)</dt><dd><tt>Triangular&nbsp;distribution.<br>
&nbsp;<br>
Continuous&nbsp;distribution&nbsp;bounded&nbsp;by&nbsp;given&nbsp;lower&nbsp;and&nbsp;upper&nbsp;limits,<br>
and&nbsp;having&nbsp;a&nbsp;given&nbsp;mode&nbsp;value&nbsp;in-between.<br>
&nbsp;<br>
<a href="http://en.wikipedia.org/wiki/Triangular_distribution">http://en.wikipedia.org/wiki/Triangular_distribution</a></tt></dd></dl>

<dl><dt><a name="SystemRandom-uniform"><strong>uniform</strong></a>(self, a, b)</dt><dd><tt>Get&nbsp;a&nbsp;random&nbsp;number&nbsp;in&nbsp;the&nbsp;range&nbsp;[a,&nbsp;b)&nbsp;or&nbsp;[a,&nbsp;b]&nbsp;depending&nbsp;on&nbsp;rounding.</tt></dd></dl>

<dl><dt><a name="SystemRandom-vonmisesvariate"><strong>vonmisesvariate</strong></a>(self, mu, kappa)</dt><dd><tt>Circular&nbsp;data&nbsp;distribution.<br>
&nbsp;<br>
mu&nbsp;is&nbsp;the&nbsp;mean&nbsp;angle,&nbsp;expressed&nbsp;in&nbsp;radians&nbsp;between&nbsp;0&nbsp;and&nbsp;2*pi,&nbsp;and<br>
kappa&nbsp;is&nbsp;the&nbsp;concentration&nbsp;parameter,&nbsp;which&nbsp;must&nbsp;be&nbsp;greater&nbsp;than&nbsp;or<br>
equal&nbsp;to&nbsp;zero.&nbsp;&nbsp;If&nbsp;kappa&nbsp;is&nbsp;equal&nbsp;to&nbsp;zero,&nbsp;this&nbsp;distribution&nbsp;reduces<br>
to&nbsp;a&nbsp;uniform&nbsp;random&nbsp;angle&nbsp;over&nbsp;the&nbsp;range&nbsp;0&nbsp;to&nbsp;2*pi.</tt></dd></dl>

<dl><dt><a name="SystemRandom-weibullvariate"><strong>weibullvariate</strong></a>(self, alpha, beta)</dt><dd><tt>Weibull&nbsp;distribution.<br>
&nbsp;<br>
alpha&nbsp;is&nbsp;the&nbsp;scale&nbsp;parameter&nbsp;and&nbsp;beta&nbsp;is&nbsp;the&nbsp;shape&nbsp;parameter.</tt></dd></dl>

<hr>
Class methods inherited from <a href="random.html#Random">Random</a>:<br>
<dl><dt><a name="SystemRandom-__init_subclass__"><strong>__init_subclass__</strong></a>(**kwargs)<font color="#909090"><font face="helvetica, arial"> from <a href="builtins.html#type">builtins.type</a></font></font></dt><dd><tt>Control&nbsp;how&nbsp;subclasses&nbsp;generate&nbsp;random&nbsp;integers.<br>
&nbsp;<br>
The&nbsp;algorithm&nbsp;a&nbsp;subclass&nbsp;can&nbsp;use&nbsp;depends&nbsp;on&nbsp;the&nbsp;<a href="#SystemRandom-random">random</a>()&nbsp;and/or<br>
<a href="#SystemRandom-getrandbits">getrandbits</a>()&nbsp;implementation&nbsp;available&nbsp;to&nbsp;it&nbsp;and&nbsp;determines<br>
whether&nbsp;it&nbsp;can&nbsp;generate&nbsp;random&nbsp;integers&nbsp;from&nbsp;arbitrarily&nbsp;large<br>
ranges.</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="random.html#Random">Random</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Data and other attributes inherited from <a href="random.html#Random">Random</a>:<br>
<dl><dt><strong>VERSION</strong> = 3</dl>

<hr>
Static methods inherited from <a href="_random.html#Random">_random.Random</a>:<br>
<dl><dt><a name="SystemRandom-__new__"><strong>__new__</strong></a>(*args, **kwargs)<font color="#909090"><font face="helvetica, arial"> from <a href="builtins.html#type">builtins.type</a></font></font></dt><dd><tt>Create&nbsp;and&nbsp;return&nbsp;a&nbsp;new&nbsp;object.&nbsp;&nbsp;See&nbsp;help(type)&nbsp;for&nbsp;accurate&nbsp;signature.</tt></dd></dl>

</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-betavariate"><strong>betavariate</strong></a>(alpha, beta)<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt>Beta&nbsp;distribution.<br>
&nbsp;<br>
Conditions&nbsp;on&nbsp;the&nbsp;parameters&nbsp;are&nbsp;alpha&nbsp;&gt;&nbsp;0&nbsp;and&nbsp;beta&nbsp;&gt;&nbsp;0.<br>
Returned&nbsp;values&nbsp;range&nbsp;between&nbsp;0&nbsp;and&nbsp;1.</tt></dd></dl>
 <dl><dt><a name="-choice"><strong>choice</strong></a>(seq)<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt>Choose&nbsp;a&nbsp;random&nbsp;element&nbsp;from&nbsp;a&nbsp;non-empty&nbsp;sequence.</tt></dd></dl>
 <dl><dt><a name="-choices"><strong>choices</strong></a>(population, weights=None, *, cum_weights=None, k=1)<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt>Return&nbsp;a&nbsp;k&nbsp;sized&nbsp;list&nbsp;of&nbsp;population&nbsp;elements&nbsp;chosen&nbsp;with&nbsp;replacement.<br>
&nbsp;<br>
If&nbsp;the&nbsp;relative&nbsp;weights&nbsp;or&nbsp;cumulative&nbsp;weights&nbsp;are&nbsp;not&nbsp;specified,<br>
the&nbsp;selections&nbsp;are&nbsp;made&nbsp;with&nbsp;equal&nbsp;probability.</tt></dd></dl>
 <dl><dt><a name="-expovariate"><strong>expovariate</strong></a>(lambd)<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt>Exponential&nbsp;distribution.<br>
&nbsp;<br>
lambd&nbsp;is&nbsp;1.0&nbsp;divided&nbsp;by&nbsp;the&nbsp;desired&nbsp;mean.&nbsp;&nbsp;It&nbsp;should&nbsp;be<br>
nonzero.&nbsp;&nbsp;(The&nbsp;parameter&nbsp;would&nbsp;be&nbsp;called&nbsp;"lambda",&nbsp;but&nbsp;that&nbsp;is<br>
a&nbsp;reserved&nbsp;word&nbsp;in&nbsp;Python.)&nbsp;&nbsp;Returned&nbsp;values&nbsp;range&nbsp;from&nbsp;0&nbsp;to<br>
positive&nbsp;infinity&nbsp;if&nbsp;lambd&nbsp;is&nbsp;positive,&nbsp;and&nbsp;from&nbsp;negative<br>
infinity&nbsp;to&nbsp;0&nbsp;if&nbsp;lambd&nbsp;is&nbsp;negative.</tt></dd></dl>
 <dl><dt><a name="-gammavariate"><strong>gammavariate</strong></a>(alpha, beta)<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt>Gamma&nbsp;distribution.&nbsp;&nbsp;Not&nbsp;the&nbsp;gamma&nbsp;function!<br>
&nbsp;<br>
Conditions&nbsp;on&nbsp;the&nbsp;parameters&nbsp;are&nbsp;alpha&nbsp;&gt;&nbsp;0&nbsp;and&nbsp;beta&nbsp;&gt;&nbsp;0.<br>
&nbsp;<br>
The&nbsp;probability&nbsp;distribution&nbsp;function&nbsp;is:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x&nbsp;**&nbsp;(alpha&nbsp;-&nbsp;1)&nbsp;*&nbsp;math.exp(-x&nbsp;/&nbsp;beta)<br>
&nbsp;&nbsp;pdf(x)&nbsp;=&nbsp;&nbsp;--------------------------------------<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;math.gamma(alpha)&nbsp;*&nbsp;beta&nbsp;**&nbsp;alpha</tt></dd></dl>
 <dl><dt><a name="-gauss"><strong>gauss</strong></a>(mu, sigma)<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt>Gaussian&nbsp;distribution.<br>
&nbsp;<br>
mu&nbsp;is&nbsp;the&nbsp;mean,&nbsp;and&nbsp;sigma&nbsp;is&nbsp;the&nbsp;standard&nbsp;deviation.&nbsp;&nbsp;This&nbsp;is<br>
slightly&nbsp;faster&nbsp;than&nbsp;the&nbsp;<a href="#-normalvariate">normalvariate</a>()&nbsp;function.<br>
&nbsp;<br>
Not&nbsp;thread-safe&nbsp;without&nbsp;a&nbsp;lock&nbsp;around&nbsp;calls.</tt></dd></dl>
 <dl><dt><a name="-getrandbits"><strong>getrandbits</strong></a>(k, /)<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt><a href="#-getrandbits">getrandbits</a>(k)&nbsp;-&gt;&nbsp;x.&nbsp;&nbsp;Generates&nbsp;an&nbsp;int&nbsp;with&nbsp;k&nbsp;random&nbsp;bits.</tt></dd></dl>
 <dl><dt><a name="-getstate"><strong>getstate</strong></a>()<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt>Return&nbsp;internal&nbsp;state;&nbsp;can&nbsp;be&nbsp;passed&nbsp;to&nbsp;<a href="#-setstate">setstate</a>()&nbsp;later.</tt></dd></dl>
 <dl><dt><a name="-lognormvariate"><strong>lognormvariate</strong></a>(mu, sigma)<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt>Log&nbsp;normal&nbsp;distribution.<br>
&nbsp;<br>
If&nbsp;you&nbsp;take&nbsp;the&nbsp;natural&nbsp;logarithm&nbsp;of&nbsp;this&nbsp;distribution,&nbsp;you'll&nbsp;get&nbsp;a<br>
normal&nbsp;distribution&nbsp;with&nbsp;mean&nbsp;mu&nbsp;and&nbsp;standard&nbsp;deviation&nbsp;sigma.<br>
mu&nbsp;can&nbsp;have&nbsp;any&nbsp;value,&nbsp;and&nbsp;sigma&nbsp;must&nbsp;be&nbsp;greater&nbsp;than&nbsp;zero.</tt></dd></dl>
 <dl><dt><a name="-normalvariate"><strong>normalvariate</strong></a>(mu, sigma)<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt>Normal&nbsp;distribution.<br>
&nbsp;<br>
mu&nbsp;is&nbsp;the&nbsp;mean,&nbsp;and&nbsp;sigma&nbsp;is&nbsp;the&nbsp;standard&nbsp;deviation.</tt></dd></dl>
 <dl><dt><a name="-paretovariate"><strong>paretovariate</strong></a>(alpha)<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt>Pareto&nbsp;distribution.&nbsp;&nbsp;alpha&nbsp;is&nbsp;the&nbsp;shape&nbsp;parameter.</tt></dd></dl>
 <dl><dt><a name="-randbytes"><strong>randbytes</strong></a>(n)<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt>Generate&nbsp;n&nbsp;random&nbsp;bytes.</tt></dd></dl>
 <dl><dt><a name="-randint"><strong>randint</strong></a>(a, b)<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt>Return&nbsp;random&nbsp;integer&nbsp;in&nbsp;range&nbsp;[a,&nbsp;b],&nbsp;including&nbsp;both&nbsp;end&nbsp;points.</tt></dd></dl>
 <dl><dt><a name="-random"><strong>random</strong></a>()<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt><a href="#-random">random</a>()&nbsp;-&gt;&nbsp;x&nbsp;in&nbsp;the&nbsp;interval&nbsp;[0,&nbsp;1).</tt></dd></dl>
 <dl><dt><a name="-randrange"><strong>randrange</strong></a>(start, stop=None, step=1)<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt>Choose&nbsp;a&nbsp;random&nbsp;item&nbsp;from&nbsp;range(start,&nbsp;stop[,&nbsp;step]).<br>
&nbsp;<br>
This&nbsp;fixes&nbsp;the&nbsp;problem&nbsp;with&nbsp;<a href="#-randint">randint</a>()&nbsp;which&nbsp;includes&nbsp;the<br>
endpoint;&nbsp;in&nbsp;Python&nbsp;this&nbsp;is&nbsp;usually&nbsp;not&nbsp;what&nbsp;you&nbsp;want.</tt></dd></dl>
 <dl><dt><a name="-sample"><strong>sample</strong></a>(population, k, *, counts=None)<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt>Chooses&nbsp;k&nbsp;unique&nbsp;random&nbsp;elements&nbsp;from&nbsp;a&nbsp;population&nbsp;sequence&nbsp;or&nbsp;set.<br>
&nbsp;<br>
Returns&nbsp;a&nbsp;new&nbsp;list&nbsp;containing&nbsp;elements&nbsp;from&nbsp;the&nbsp;population&nbsp;while<br>
leaving&nbsp;the&nbsp;original&nbsp;population&nbsp;unchanged.&nbsp;&nbsp;The&nbsp;resulting&nbsp;list&nbsp;is<br>
in&nbsp;selection&nbsp;order&nbsp;so&nbsp;that&nbsp;all&nbsp;sub-slices&nbsp;will&nbsp;also&nbsp;be&nbsp;valid&nbsp;random<br>
samples.&nbsp;&nbsp;This&nbsp;allows&nbsp;raffle&nbsp;winners&nbsp;(the&nbsp;sample)&nbsp;to&nbsp;be&nbsp;partitioned<br>
into&nbsp;grand&nbsp;prize&nbsp;and&nbsp;second&nbsp;place&nbsp;winners&nbsp;(the&nbsp;subslices).<br>
&nbsp;<br>
Members&nbsp;of&nbsp;the&nbsp;population&nbsp;need&nbsp;not&nbsp;be&nbsp;hashable&nbsp;or&nbsp;unique.&nbsp;&nbsp;If&nbsp;the<br>
population&nbsp;contains&nbsp;repeats,&nbsp;then&nbsp;each&nbsp;occurrence&nbsp;is&nbsp;a&nbsp;possible<br>
selection&nbsp;in&nbsp;the&nbsp;sample.<br>
&nbsp;<br>
Repeated&nbsp;elements&nbsp;can&nbsp;be&nbsp;specified&nbsp;one&nbsp;at&nbsp;a&nbsp;time&nbsp;or&nbsp;with&nbsp;the&nbsp;optional<br>
counts&nbsp;parameter.&nbsp;&nbsp;For&nbsp;example:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#-sample">sample</a>(['red',&nbsp;'blue'],&nbsp;counts=[4,&nbsp;2],&nbsp;k=5)<br>
&nbsp;<br>
is&nbsp;equivalent&nbsp;to:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#-sample">sample</a>(['red',&nbsp;'red',&nbsp;'red',&nbsp;'red',&nbsp;'blue',&nbsp;'blue'],&nbsp;k=5)<br>
&nbsp;<br>
To&nbsp;choose&nbsp;a&nbsp;sample&nbsp;from&nbsp;a&nbsp;range&nbsp;of&nbsp;integers,&nbsp;use&nbsp;range()&nbsp;for&nbsp;the<br>
population&nbsp;argument.&nbsp;&nbsp;This&nbsp;is&nbsp;especially&nbsp;fast&nbsp;and&nbsp;space&nbsp;efficient<br>
for&nbsp;sampling&nbsp;from&nbsp;a&nbsp;large&nbsp;population:<br>
&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#-sample">sample</a>(range(10000000),&nbsp;60)</tt></dd></dl>
 <dl><dt><a name="-seed"><strong>seed</strong></a>(a=None, version=2)<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt>Initialize&nbsp;internal&nbsp;state&nbsp;from&nbsp;a&nbsp;seed.<br>
&nbsp;<br>
The&nbsp;only&nbsp;supported&nbsp;seed&nbsp;types&nbsp;are&nbsp;None,&nbsp;int,&nbsp;float,<br>
str,&nbsp;bytes,&nbsp;and&nbsp;bytearray.<br>
&nbsp;<br>
None&nbsp;or&nbsp;no&nbsp;argument&nbsp;seeds&nbsp;from&nbsp;current&nbsp;time&nbsp;or&nbsp;from&nbsp;an&nbsp;operating<br>
system&nbsp;specific&nbsp;randomness&nbsp;source&nbsp;if&nbsp;available.<br>
&nbsp;<br>
If&nbsp;*a*&nbsp;is&nbsp;an&nbsp;int,&nbsp;all&nbsp;bits&nbsp;are&nbsp;used.<br>
&nbsp;<br>
For&nbsp;version&nbsp;2&nbsp;(the&nbsp;default),&nbsp;all&nbsp;of&nbsp;the&nbsp;bits&nbsp;are&nbsp;used&nbsp;if&nbsp;*a*&nbsp;is&nbsp;a&nbsp;str,<br>
bytes,&nbsp;or&nbsp;bytearray.&nbsp;&nbsp;For&nbsp;version&nbsp;1&nbsp;(provided&nbsp;for&nbsp;reproducing&nbsp;random<br>
sequences&nbsp;from&nbsp;older&nbsp;versions&nbsp;of&nbsp;Python),&nbsp;the&nbsp;algorithm&nbsp;for&nbsp;str&nbsp;and<br>
bytes&nbsp;generates&nbsp;a&nbsp;narrower&nbsp;range&nbsp;of&nbsp;seeds.</tt></dd></dl>
 <dl><dt><a name="-setstate"><strong>setstate</strong></a>(state)<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt>Restore&nbsp;internal&nbsp;state&nbsp;from&nbsp;object&nbsp;returned&nbsp;by&nbsp;<a href="#-getstate">getstate</a>().</tt></dd></dl>
 <dl><dt><a name="-shuffle"><strong>shuffle</strong></a>(x, random=None)<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt>Shuffle&nbsp;list&nbsp;x&nbsp;in&nbsp;place,&nbsp;and&nbsp;return&nbsp;None.<br>
&nbsp;<br>
Optional&nbsp;argument&nbsp;random&nbsp;is&nbsp;a&nbsp;0-argument&nbsp;function&nbsp;returning&nbsp;a<br>
random&nbsp;float&nbsp;in&nbsp;[0.0,&nbsp;1.0);&nbsp;if&nbsp;it&nbsp;is&nbsp;the&nbsp;default&nbsp;None,&nbsp;the<br>
standard&nbsp;random.random&nbsp;will&nbsp;be&nbsp;used.</tt></dd></dl>
 <dl><dt><a name="-triangular"><strong>triangular</strong></a>(low=0.0, high=1.0, mode=None)<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt>Triangular&nbsp;distribution.<br>
&nbsp;<br>
Continuous&nbsp;distribution&nbsp;bounded&nbsp;by&nbsp;given&nbsp;lower&nbsp;and&nbsp;upper&nbsp;limits,<br>
and&nbsp;having&nbsp;a&nbsp;given&nbsp;mode&nbsp;value&nbsp;in-between.<br>
&nbsp;<br>
<a href="http://en.wikipedia.org/wiki/Triangular_distribution">http://en.wikipedia.org/wiki/Triangular_distribution</a></tt></dd></dl>
 <dl><dt><a name="-uniform"><strong>uniform</strong></a>(a, b)<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt>Get&nbsp;a&nbsp;random&nbsp;number&nbsp;in&nbsp;the&nbsp;range&nbsp;[a,&nbsp;b)&nbsp;or&nbsp;[a,&nbsp;b]&nbsp;depending&nbsp;on&nbsp;rounding.</tt></dd></dl>
 <dl><dt><a name="-vonmisesvariate"><strong>vonmisesvariate</strong></a>(mu, kappa)<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt>Circular&nbsp;data&nbsp;distribution.<br>
&nbsp;<br>
mu&nbsp;is&nbsp;the&nbsp;mean&nbsp;angle,&nbsp;expressed&nbsp;in&nbsp;radians&nbsp;between&nbsp;0&nbsp;and&nbsp;2*pi,&nbsp;and<br>
kappa&nbsp;is&nbsp;the&nbsp;concentration&nbsp;parameter,&nbsp;which&nbsp;must&nbsp;be&nbsp;greater&nbsp;than&nbsp;or<br>
equal&nbsp;to&nbsp;zero.&nbsp;&nbsp;If&nbsp;kappa&nbsp;is&nbsp;equal&nbsp;to&nbsp;zero,&nbsp;this&nbsp;distribution&nbsp;reduces<br>
to&nbsp;a&nbsp;uniform&nbsp;random&nbsp;angle&nbsp;over&nbsp;the&nbsp;range&nbsp;0&nbsp;to&nbsp;2*pi.</tt></dd></dl>
 <dl><dt><a name="-weibullvariate"><strong>weibullvariate</strong></a>(alpha, beta)<font color="#909090"><font face="helvetica, arial"> method of <a href="random.html#Random">Random</a> instance</font></font></dt><dd><tt>Weibull&nbsp;distribution.<br>
&nbsp;<br>
alpha&nbsp;is&nbsp;the&nbsp;scale&nbsp;parameter&nbsp;and&nbsp;beta&nbsp;is&nbsp;the&nbsp;shape&nbsp;parameter.</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>__all__</strong> = ['Random', 'SystemRandom', 'betavariate', 'choice', 'choices', 'expovariate', 'gammavariate', 'gauss', 'getrandbits', 'getstate', 'lognormvariate', 'normalvariate', 'paretovariate', 'randbytes', 'randint', 'random', 'randrange', 'sample', 'seed', 'setstate', ...]</td></tr></table>
</body></html>