Searched refs:randrange (Results 1 – 25 of 51) sorted by relevance
123
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)
943 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 …]
420 randrange = self.gen.randrange421 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 …]
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)
94 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 …]
47 i = random.randrange(n)100 i1 = random.randrange(n)101 i2 = random.randrange(n)112 L[random.randrange(n)] = random.random()
21 from random import randrange, sample, choice159 x = randrange(*fmtdict[mode][char])193 nmemb = randrange(2, 10) # number of struct members495 ndim = randrange(maxdim+1)500 nitems = randrange(1, 16+1)502 offset = -itemsize if randrange(2) == 0 else memlen506 n = randrange(100)514 shape[i] = randrange(minshape, maxshape+1)519 n = randrange(100)523 strides[ndim-1] = itemsize * randrange(-maxstride, maxstride+1)[all …]
125 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)]
59 e = random.randrange(300)60 n = random.randrange(-10**e, 10**e)
898 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)
156 from random import randrange158 data = [randrange(0, n, 2) for j in range(i)]160 elem = randrange(-1, n+1)
290 imag1a[random.randrange(100)*1j] = random.randrange(100)*1j
235 from random import randrange246 val = (val << 8) | randrange(256)291 randrange)
15 from random import randrange19 return randrange(-n,n+1)
56 dest = random.randrange(1, mpi.size)107 dest = random.randrange(1, mpi.size)
40 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 distributed140 deprecated. Currently ``randrange(10.0)`` is losslessly converted to141 ``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` to151 ``randrange(a, b+1)``.158 :meth:`getrandbits` enables :meth:`randrange` to handle arbitrarily large[all …]
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:
8 from random import randrange278 for idx, _ in enumerate(range(randrange(min, max))):288 if idx - randrange(3, 8) > last_comma:293 if idx - randrange(10, 20) > last_fullstop:
292 def randrange(self, start, stop=None, step=_ONE): member in Random370 return self.randrange(a, b+1)864 randrange = _inst.randrange variable
79 self.scr.attrset(curses.color_pair(random.randrange(1, 7)))120 random.randrange(1, 7)))
216 randrange() now raises a TypeError when step is specified without a stop608 Harmonized :func:`random.randrange` argument handling to match :func:`range`.610 * The integer test and conversion in ``randrange()`` now uses612 * Non-integer arguments to ``randrange()`` are deprecated.
33 x = random.randrange(1, 3)