/external/python/cpython2/Lib/test/ |
D | test_random.py | 268 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 …]
|
D | test_zlib.py | 135 data = ''.join([binascii.a2b_hex(fmt % random.getrandbits(8 * _1M))
|
D | test_zipfile.py | 17 from random import randint, random, getrandbits 41 return bytes(bytearray.fromhex('%0*x' % (2 * size, getrandbits(8 * size))))
|
D | test_tarfile.py | 282 data = unhexlify('%1024x' % Random(0).getrandbits(512*8))
|
/external/python/cpython3/Lib/test/ |
D | test_random.py | 370 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 …]
|
D | test_zlib.py | 136 data = b''.join([random.getrandbits(8 * _1M).to_bytes(_1M, 'little')
|
D | test_bz2.py | 707 block = random.getrandbits(blocksize * 8).to_bytes(blocksize, 'little')
|
D | test_zipfile.py | 14 from random import randint, random, getrandbits 32 return getrandbits(8 * size).to_bytes(size, 'little')
|
D | test_lzma.py | 351 block = random.getrandbits(blocksize * 8).to_bytes(blocksize, "little")
|
D | test_tarfile.py | 355 data = Random(0).getrandbits(512*8).to_bytes(512, 'big')
|
/external/python/cpython3/Lib/ |
D | random.py | 229 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
|
D | secrets.py | 24 randbits = _sysrand.getrandbits
|
D | uuid.py | 673 return random.getrandbits(48) | (1 << 40) 740 clock_seq = random.getrandbits(14) # instead of stable storage
|
/external/python/cpython2/Lib/ |
D | random.py | 255 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/ |
D | site_linux_system.py | 216 (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/ |
D | random.rst | 42 :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/ |
D | utils.py | 187 randint = random.getrandbits(64)
|
/external/tensorflow/tensorflow/python/kernel_tests/ |
D | benchmark_test.py | 140 "reporting_bench_%016x_" % random.getrandbits(64))
|
/external/python/cpython3/Lib/email/ |
D | utils.py | 186 randint = random.getrandbits(64)
|
/external/python/cpython3/Doc/library/ |
D | random.rst | 39 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/ |
D | 3.7.0b4.rst | 209 consistently even when called from subclasses without a ``getrandbits()``
|
D | 3.6.6rc1.rst | 369 consistently even when called from subclasses without a ``getrandbits()``
|
/external/autotest/client/cros/ |
D | dhcp_packet.py | 516 packet.set_field(FIELD_TRANSACTION_ID, random.getrandbits(32))
|
/external/python/cpython2/Doc/whatsnew/ |
D | 2.4.rst | 1246 * 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/ |
D | 2.4.rst | 1246 * The :mod:`random` module has a new method called ``getrandbits(N)`` that 1248 method now uses :meth:`getrandbits` where appropriate, making generation of
|