Home
last modified time | relevance | path

Searched refs:getrandbits (Results 1 – 25 of 30) sorted by relevance

12

/external/python/cpython2/Lib/test/
Dtest_random.py268 self.assertTrue(0 <= self.gen.getrandbits(k) < 2**k)
271 getbits = self.gen.getrandbits
279 self.assertRaises(TypeError, self.gen.getrandbits)
280 self.assertRaises(TypeError, self.gen.getrandbits, 1, 2)
281 self.assertRaises(ValueError, self.gen.getrandbits, 0)
282 self.assertRaises(ValueError, self.gen.getrandbits, -1)
283 self.assertRaises(TypeError, self.gen.getrandbits, 10.1)
345 bits100 = self.gen.getrandbits(100)
347 self.assertEqual(self.gen.getrandbits(100), bits100)
446 self.assertEqual(self.gen.getrandbits(100),
[all …]
Dtest_zlib.py135 data = ''.join([binascii.a2b_hex(fmt % random.getrandbits(8 * _1M))
Dtest_zipfile.py17 from random import randint, random, getrandbits
41 return bytes(bytearray.fromhex('%0*x' % (2 * size, getrandbits(8 * size))))
Dtest_tarfile.py282 data = unhexlify('%1024x' % Random(0).getrandbits(512*8))
/external/python/cpython3/Lib/test/
Dtest_random.py370 self.assertTrue(0 <= self.gen.getrandbits(k) < 2**k)
373 getbits = self.gen.getrandbits
381 self.assertRaises(TypeError, self.gen.getrandbits)
382 self.assertRaises(TypeError, self.gen.getrandbits, 1, 2)
383 self.assertRaises(ValueError, self.gen.getrandbits, 0)
384 self.assertRaises(ValueError, self.gen.getrandbits, -1)
385 self.assertRaises(TypeError, self.gen.getrandbits, 10.1)
498 bits100 = self.gen.getrandbits(100)
500 self.assertEqual(self.gen.getrandbits(100), bits100)
609 self.assertEqual(self.gen.getrandbits(100),
[all …]
Dtest_zlib.py136 data = b''.join([random.getrandbits(8 * _1M).to_bytes(_1M, 'little')
Dtest_bz2.py707 block = random.getrandbits(blocksize * 8).to_bytes(blocksize, 'little')
Dtest_zipfile.py14 from random import randint, random, getrandbits
32 return getrandbits(8 * size).to_bytes(size, 'little')
Dtest_lzma.py351 block = random.getrandbits(blocksize * 8).to_bytes(blocksize, "little")
Dtest_tarfile.py355 data = Random(0).getrandbits(512*8).to_bytes(512, 'big')
/external/python/cpython3/Lib/
Drandom.py229 getrandbits = self.getrandbits
232 if type(random) is BuiltinMethod or type(getrandbits) is Method:
234 r = getrandbits(k) # 0 <= r < 2**k
236 r = getrandbits(k)
681 def getrandbits(self, k): member in SystemRandom
770 getrandbits = _inst.getrandbits variable
Dsecrets.py24 randbits = _sysrand.getrandbits
Duuid.py673 return random.getrandbits(48) | (1 << 40)
740 clock_seq = random.getrandbits(14) # instead of stable storage
/external/python/cpython2/Lib/
Drandom.py255 getrandbits = self.getrandbits
262 if type(self.random) is _BuiltinMethod or type(getrandbits) is _Method:
264 r = getrandbits(k)
266 r = getrandbits(k)
819 def getrandbits(self, k): member in SystemRandom
909 getrandbits = _inst.getrandbits variable
/external/autotest/server/
Dsite_linux_system.py216 (sysrand.getrandbits(8) & ~self.MAC_BIT_MULTICAST) |
218 sysrand.getrandbits(8),
219 sysrand.getrandbits(8),
220 sysrand.getrandbits(8),
221 sysrand.getrandbits(8),
222 sysrand.getrandbits(8))
/external/python/cpython2/Doc/library/
Drandom.rst42 :meth:`~Random.getrandbits` method --- this
46 the :meth:`getrandbits` method.
126 .. function:: getrandbits(k)
130 as an optional part of the API. When available, :meth:`getrandbits` enables
/external/python/cpython2/Lib/email/
Dutils.py187 randint = random.getrandbits(64)
/external/tensorflow/tensorflow/python/kernel_tests/
Dbenchmark_test.py140 "reporting_bench_%016x_" % random.getrandbits(64))
/external/python/cpython3/Lib/email/
Dutils.py186 randint = random.getrandbits(64)
/external/python/cpython3/Doc/library/
Drandom.rst39 Optionally, a new generator can supply a :meth:`~Random.getrandbits` method --- this
102 .. function:: getrandbits(k)
106 as an optional part of the API. When available, :meth:`getrandbits` enables
/external/python/cpython3/Misc/NEWS.d/
D3.7.0b4.rst209 consistently even when called from subclasses without a ``getrandbits()``
D3.6.6rc1.rst369 consistently even when called from subclasses without a ``getrandbits()``
/external/autotest/client/cros/
Ddhcp_packet.py516 packet.set_field(FIELD_TRANSACTION_ID, random.getrandbits(32))
/external/python/cpython2/Doc/whatsnew/
D2.4.rst1246 * The :mod:`random` module has a new method called ``getrandbits(N)`` that
1248 method now uses :meth:`getrandbits` where appropriate, making generation of
/external/python/cpython3/Doc/whatsnew/
D2.4.rst1246 * The :mod:`random` module has a new method called ``getrandbits(N)`` that
1248 method now uses :meth:`getrandbits` where appropriate, making generation of

12