Searched refs:randrange (Results 1 – 25 of 103) sorted by relevance
12345
49 from random import randrange, sample55 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: # integers74 if randrange(2):75 intlen = randrange(1, maxprec+1)84 return str(randrange(maxexp))[all …]
232 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 …]
24 n, e = random.randrange(lower, upper, 2), k59 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)
795 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 …]
17 from random import randrange23 return pack("IIII", randrange(top), randrange(top), randrange(top), randrange(top))
8 from random import randrange17 z = randrange(0, 3)47 xpos[j] = randrange(0, c) + 248 ypos[j] = randrange(0, r) + 252 x = randrange(0, c) + 253 y = randrange(0, r) + 2
120 n, e = random.randrange(lower, upper, 2), k154 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)
198 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)
75 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 …]
63 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))
47 i = random.randrange(n)100 i1 = random.randrange(n)101 i2 = random.randrange(n)112 L[random.randrange(n)] = random.random()
161 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 …]
119 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)]
119 n, e = random.randrange(lower, upper, 2), k153 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)
75 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 …]
280 randrange = self.gen.randrange281 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 …]
18 from random import randrange, sample, choice151 x = randrange(*fmtdict[mode][char])185 nmemb = randrange(2, 10) # number of struct members487 ndim = randrange(maxdim+1)492 nitems = randrange(1, 16+1)494 offset = -itemsize if randrange(2) == 0 else memlen498 n = randrange(100)506 shape[i] = randrange(minshape, maxshape+1)511 n = randrange(100)515 strides[ndim-1] = itemsize * randrange(-maxstride, maxstride+1)[all …]
101 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)
164 test_volume = random.randrange(MIN_VOL, MAX_VOL)178 transit_volume = current + random.randrange(1, step)198 transit_volume = current - random.randrange(1, step)
54 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'],
15 from random import randrange19 return randrange(-n,n+1)
241 from random import choice, randrange253 for idx, _ in enumerate(range(randrange(min, max))):263 if idx - randrange(3, 8) > last_comma:268 if idx - randrange(10, 20) > last_fullstop:
40 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 distributed131 ``randrange(a, b+1)``.355 >>> randrange(10) # Integer from 0 to 9 inclusive358 >>> randrange(0, 101, 2) # Even integer from 0 to 100 inclusive484 (gauss, uniform, sample, betavariate, choice, triangular, and randrange).
174 def randrange(self, start, stop=None, step=1, _int=int): member in Random222 return self.randrange(a, b+1)755 randrange = _inst.randrange variable