Home
last modified time | relevance | path

Searched refs:randrange (Results 1 – 25 of 51) sorted by relevance

123

/third_party/python/Modules/_decimal/tests/
Dranddec.py49 from random import randrange, sample
55 if randrange(2):
56 if randrange(2): return '+'
61 return "eE"[randrange(2)]
65 return str(randrange(10**maxprec))
68 if randrange(2): return '.'
72 if randrange(100) > 60: # integers
74 if randrange(2):
75 intlen = randrange(1, maxprec+1)
84 return str(randrange(maxexp))
[all …]
Dformathelper.py232 i = random.randrange(0, 0x110002)
239 active = sorted(random.sample(range(7), random.randrange(8)))
252 s += str(random.randrange(1, 100))
257 s += str(random.randrange(100))
296 active = sorted(random.sample(range(5), random.randrange(6)))
304 s += str(random.randrange(1, 100))
309 s += str(random.randrange(100))
324 active = sorted(random.sample(range(5), random.randrange(6)))
329 s += chr(random.randrange(32, 128))
337 s += str(random.randrange(1, 100))
[all …]
Drandfloat.py24 n, e = random.randrange(lower, upper, 2), k
59 bits = random.randrange(2047*2**52)
94 digits = n + random.randrange(-3*u, 3*u)
109 digits = base + random.randrange(-1000, 1000)
117 digits = random.randrange(dig10)
118 exponent = random.randrange(-400, 400)
132 intpart_len = random.randrange(5)
136 fracpart_len = random.randrange(5)
144 exponent_len = random.randrange(1, 4)
Ddeccheck.py943 context.Emin = random.randrange(-1000, 0)
944 context.Emax = random.randrange(prec, 1000)
953 context.capitals = random.randrange(2)
955 context.clamp = random.randrange(2)
1041 fmt1 = rand_format(chr(random.randrange(0, 128)), 'EeGgn')
1054 fmt1 = rand_format(chr(random.randrange(0, 128)), 'Ff%')
1070 n = random.randrange(10)
1099 c.Emax = random.randrange(1, exprange+1)
1100 c.Emin = random.randrange(-exprange, 0)
1102 c.prec = random.randrange(1, maxprec+1)
[all …]
/third_party/python/Lib/test/
Dtest_random.py420 randrange = self.gen.randrange
421 k = sum(randrange(6755399441055744) % 3 == 2 for i in range(n))
486 r = self.gen.randrange(span)
493 start = self.gen.randrange(2 ** (i-2))
494 stop = self.gen.randrange(2 ** i)
497 self.assertTrue(start <= self.gen.randrange(start, stop) < stop)
502 set([self.gen.randrange(start,stop) for i in range(100)]))
505 rint = self.gen.randrange(0, 10, 2)
507 rint = self.gen.randrange(0, 2, 2)
511 raises = partial(self.assertRaises, ValueError, self.gen.randrange)
[all …]
Dtest_strtod.py119 n, e = random.randrange(lower, upper, 2), k
153 bits = random.randrange(2047*2**52)
187 digits = n + random.randrange(-3*u, 3*u)
202 digits = base + random.randrange(-1000, 1000)
210 digits = random.randrange(dig10)
211 exponent = random.randrange(-400, 400)
225 intpart_len = random.randrange(5)
229 fracpart_len = random.randrange(5)
237 exponent_len = random.randrange(1, 4)
Dtest_heapq.py94 data = [random.randrange(2000) for i in range(1000)]
117 data = [random.randrange(2000) for i in range(1000)]
130 data = [random.randrange(2000) for i in range(1000)]
167 size = random.randrange(50)
168 data = [random.randrange(25) for i in range(size)]
181 for i in range(random.randrange(25)):
183 for j in range(random.randrange(100)):
184 tup = random.choice('ABC'), random.randrange(-500, 500)
217 stream = random.randrange(4)
218 x = random.randrange(500)
[all …]
Dsortperf.py47 i = random.randrange(n)
100 i1 = random.randrange(n)
101 i2 = random.randrange(n)
112 L[random.randrange(n)] = random.random()
Dtest_buffer.py21 from random import randrange, sample, choice
159 x = randrange(*fmtdict[mode][char])
193 nmemb = randrange(2, 10) # number of struct members
495 ndim = randrange(maxdim+1)
500 nitems = randrange(1, 16+1)
502 offset = -itemsize if randrange(2) == 0 else memlen
506 n = randrange(100)
514 shape[i] = randrange(minshape, maxshape+1)
519 n = randrange(100)
523 strides[ndim-1] = itemsize * randrange(-maxstride, maxstride+1)
[all …]
Dtest_sort.py125 s = [Stable(random.randrange(10), i) for i in range(n)]
187 data = [(random.randrange(100), i) for i in range(200)]
247 data = [(random.randrange(100), i) for i in range(200)]
Dtest_numeric_tower.py59 e = random.randrange(300)
60 n = random.randrange(-10**e, 10**e)
Dtest_long.py898 a = random.randrange(1, M)
899 b = random.randrange(a, 2*a+1)
907 a_bits = random.randrange(1000)
908 b_bits = random.randrange(1, 1000)
909 x = random.randrange(2**a_bits)
910 y = random.randrange(1, 2**b_bits)
1085 x = random.randrange(-10000, 10000)
1094 x = random.randrange(-10000, 10000)
Dtest_bisect.py156 from random import randrange
158 data = [randrange(0, n, 2) for j in range(i)]
160 elem = randrange(-1, n+1)
Dtest_richcmp.py290 imag1a[random.randrange(100)*1j] = random.randrange(100)*1j
Dtest_struct.py235 from random import randrange
246 val = (val << 8) | randrange(256)
291 randrange)
/third_party/python/Lib/turtledemo/
Dforest.py15 from random import randrange
19 return randrange(-n,n+1)
/third_party/boost/libs/mpi/test/python/
Dnonblocking_test.py56 dest = random.randrange(1, mpi.size)
107 dest = random.randrange(1, mpi.size)
/third_party/python/Doc/library/
Drandom.rst40 allows :meth:`randrange` to produce selections over an arbitrarily large range.
123 .. function:: randrange(stop)
124 randrange(start, stop[, step])
134 :meth:`randrange` is more sophisticated about producing equally distributed
140 deprecated. Currently ``randrange(10.0)`` is losslessly converted to
141 ``randrange(10)``. In the future, this will raise a :exc:`TypeError`.
144 The exception raised for non-integral values such as ``randrange(10.5)``
145 or ``randrange('10')`` will be changed from :exc:`ValueError` to
151 ``randrange(a, b+1)``.
158 :meth:`getrandbits` enables :meth:`randrange` to handle arbitrarily large
[all …]
/third_party/node/tools/inspector_protocol/jinja2/
Dutils.py241 from random import choice, randrange
253 for idx, _ in enumerate(range(randrange(min, max))):
263 if idx - randrange(3, 8) > last_comma:
268 if idx - randrange(10, 20) > last_fullstop:
/third_party/jinja2/
Dutils.py8 from random import randrange
278 for idx, _ in enumerate(range(randrange(min, max))):
288 if idx - randrange(3, 8) > last_comma:
293 if idx - randrange(10, 20) > last_fullstop:
/third_party/skia/third_party/externals/jinja2/
Dutils.py8 from random import randrange
278 for idx, _ in enumerate(range(randrange(min, max))):
288 if idx - randrange(3, 8) > last_comma:
293 if idx - randrange(10, 20) > last_fullstop:
/third_party/python/Lib/
Drandom.py292 def randrange(self, start, stop=None, step=_ONE): member in Random
370 return self.randrange(a, b+1)
864 randrange = _inst.randrange variable
/third_party/python/Tools/demo/
Dlife.py79 self.scr.attrset(curses.color_pair(random.randrange(1, 7)))
120 random.randrange(1, 7)))
/third_party/python/Misc/NEWS.d/
D3.10.0a4.rst216 randrange() now raises a TypeError when step is specified without a stop
608 Harmonized :func:`random.randrange` argument handling to match :func:`range`.
610 * The integer test and conversion in ``randrange()`` now uses
612 * Non-integer arguments to ``randrange()`` are deprecated.
/third_party/python/Lib/test/test_importlib/
Dtest_threaded_import.py33 x = random.randrange(1, 3)

123