Home
last modified time | relevance | path

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

12345

/external/python/cpython3/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.py795 context.Emin = random.randrange(-1000, 0)
796 context.Emax = random.randrange(prec, 1000)
805 context.capitals = random.randrange(2)
807 context.clamp = random.randrange(2)
893 fmt1 = rand_format(chr(random.randrange(0, 128)), 'EeGgn')
906 fmt1 = rand_format(chr(random.randrange(0, 128)), 'Ff%')
922 n = random.randrange(10)
951 c.Emax = random.randrange(1, exprange+1)
952 c.Emin = random.randrange(-exprange, 0)
954 c.prec = random.randrange(1, maxprec+1)
[all …]
/external/curl/tests/python_dependencies/impacket/
Duuid.py17 from random import randrange
23 return pack("IIII", randrange(top), randrange(top), randrange(top), randrange(top))
/external/python/cpython2/Demo/curses/
Drain.py8 from random import randrange
17 z = randrange(0, 3)
47 xpos[j] = randrange(0, c) + 2
48 ypos[j] = randrange(0, r) + 2
52 x = randrange(0, c) + 2
53 y = randrange(0, r) + 2
/external/python/cpython2/Lib/test/
Dtest_strtod.py120 n, e = random.randrange(lower, upper, 2), k
154 bits = random.randrange(2047*2**52)
188 digits = n + random.randrange(-3*u, 3*u)
203 digits = base + random.randrange(-1000, 1000)
211 digits = random.randrange(dig10)
212 exponent = random.randrange(-400, 400)
226 intpart_len = random.randrange(5)
230 fracpart_len = random.randrange(5)
238 exponent_len = random.randrange(1, 4)
Dtest_long_future.py198 a = random.randrange(1, M)
199 b = random.randrange(a, 2*a+1)
207 a_bits = random.randrange(1000)
208 b_bits = random.randrange(1, 1000)
209 x = random.randrange(2**a_bits)
210 y = random.randrange(1, 2**b_bits)
Dtest_heapq.py75 data = [random.randrange(2000) for i in range(1000)]
98 data = [random.randrange(2000) for i in range(1000)]
111 data = [random.randrange(2000) for i in range(1000)]
141 size = random.randrange(50)
142 data = [random.randrange(25) for i in range(size)]
155 for i in xrange(random.randrange(5)):
156 row = sorted(random.randrange(1000) for j in range(random.randrange(10)))
175 stream = random.randrange(4)
176 x = random.randrange(500)
186 data = [(random.randrange(2000), i) for i in range(1000)]
[all …]
Dtest_mutants.py63 newkey = Horrid(random.randrange(100))
66 target[newkey] = Horrid(random.randrange(100))
73 i = random.randrange(len(keys))
91 self.hashcode = random.randrange(1000000000)
157 test_one(random.randrange(1, 100))
Dsortperf.py47 i = random.randrange(n)
100 i1 = random.randrange(n)
101 i2 = random.randrange(n)
112 L[random.randrange(n)] = random.random()
Dtest_random.py161 self.assertEqual(r.randrange(1000), value)
203 self.assertRaises(UserWarning, self.gen.randrange, 2**60)
247 r = self.gen.randrange(span)
254 start = self.gen.randrange(2 ** (i-2))
255 stop = self.gen.randrange(2 ** i)
258 self.assertTrue(start <= self.gen.randrange(start, stop) < stop)
263 set([self.gen.randrange(start,stop) for i in xrange(100)]))
425 r = self.gen.randrange(span)
432 start = self.gen.randrange(2 ** (i-2))
433 stop = self.gen.randrange(2 ** i)
[all …]
Dtest_sort.py119 s = [Stable(random.randrange(10), i) for i in xrange(n)]
186 data = [(random.randrange(100), i) for i in xrange(200)]
259 data = [(random.randrange(100), i) for i in xrange(200)]
/external/python/cpython3/Lib/test/
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.py75 data = [random.randrange(2000) for i in range(1000)]
98 data = [random.randrange(2000) for i in range(1000)]
111 data = [random.randrange(2000) for i in range(1000)]
141 size = random.randrange(50)
142 data = [random.randrange(25) for i in range(size)]
155 for i in range(random.randrange(25)):
157 for j in range(random.randrange(100)):
158 tup = random.choice('ABC'), random.randrange(-500, 500)
185 stream = random.randrange(4)
186 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_random.py280 randrange = self.gen.randrange
281 k = sum(randrange(6755399441055744) % 3 == 2 for i in range(n))
330 r = self.gen.randrange(span)
337 start = self.gen.randrange(2 ** (i-2))
338 stop = self.gen.randrange(2 ** i)
341 self.assertTrue(start <= self.gen.randrange(start, stop) < stop)
346 set([self.gen.randrange(start,stop) for i in range(100)]))
349 rint = self.gen.randrange(0, 10, 2)
351 rint = self.gen.randrange(0, 2, 2)
355 raises = partial(self.assertRaises, ValueError, self.gen.randrange)
[all …]
Dtest_buffer.py18 from random import randrange, sample, choice
151 x = randrange(*fmtdict[mode][char])
185 nmemb = randrange(2, 10) # number of struct members
487 ndim = randrange(maxdim+1)
492 nitems = randrange(1, 16+1)
494 offset = -itemsize if randrange(2) == 0 else memlen
498 n = randrange(100)
506 shape[i] = randrange(minshape, maxshape+1)
511 n = randrange(100)
515 strides[ndim-1] = itemsize * randrange(-maxstride, maxstride+1)
[all …]
/external/libkmsxx/py/tests/
Dbig_fb.py101 self.speed_y = random.randrange(1, 10, 1)
102 self.dir_y = random.randrange(-1, 3, 2)
118 r = random.randrange(255)
119 g = random.randrange(255)
120 b = random.randrange(255)
148 self.speed_y = random.randrange(1, 10, 1)
/external/autotest/client/common_lib/cros/manual/
Dmeet_helper.py164 test_volume = random.randrange(MIN_VOL, MAX_VOL)
178 transit_volume = current + random.randrange(1, step)
198 transit_volume = current - random.randrange(1, step)
/external/autotest/server/site_tests/enterprise_CFM_Test/
Denterprise_CFM_Test.py54 min_meetings = random.randrange(-1, self.gpio_min_meets)
117 min_meetings = random.randrange(-1, self.reboot_min_meets)
592 dup_test = max(1, random.randrange(0, nof_times))
594 self.action_config.insert(max(1, random.randrange(-1,
604 dup_test = max(1, random.randrange(0, nof_times))
606 self.action_config.insert(max(0, random.randrange(-1,
844 time.sleep(random.randrange(0, test_config['loop_timeout']))
915 time.sleep(random.randrange(test_config['min_timeout'],
/external/python/cpython3/Lib/turtledemo/
Dforest.py15 from random import randrange
19 return randrange(-n,n+1)
/external/libchrome/third_party/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:
/external/python/cpython3/Doc/library/
Drandom.rst40 allows :meth:`randrange` to produce selections over an arbitrarily large range.
107 :meth:`randrange` to handle arbitrarily large ranges.
113 .. function:: randrange(stop)
114 randrange(start, stop[, step])
124 :meth:`randrange` is more sophisticated about producing equally distributed
131 ``randrange(a, b+1)``.
355 >>> randrange(10) # Integer from 0 to 9 inclusive
358 >>> randrange(0, 101, 2) # Even integer from 0 to 100 inclusive
484 (gauss, uniform, sample, betavariate, choice, triangular, and randrange).
/external/python/cpython3/Lib/
Drandom.py174 def randrange(self, start, stop=None, step=1, _int=int): member in Random
222 return self.randrange(a, b+1)
755 randrange = _inst.randrange variable

12345