Home
last modified time | relevance | path

Searched refs:getrandbits (Results 1 – 25 of 28) 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))
Dtest_multiprocessing.py2198 d[random.getrandbits(5)] = {Foo() for i in range(10)}
/external/python/cpython3/Lib/test/
Dtest_random.py347 self.assertTrue(0 <= self.gen.getrandbits(k) < 2**k)
348 self.assertEqual(self.gen.getrandbits(0), 0)
351 getbits = self.gen.getrandbits
364 self.assertRaises(TypeError, self.gen.getrandbits)
365 self.assertRaises(TypeError, self.gen.getrandbits, 1, 2)
366 self.assertRaises(ValueError, self.gen.getrandbits, -1)
367 self.assertRaises(TypeError, self.gen.getrandbits, 10.1)
615 bits100 = self.gen.getrandbits(100)
617 self.assertEqual(self.gen.getrandbits(100), bits100)
728 self.assertEqual(self.gen.getrandbits(100),
[all …]
D_test_multiprocessing.py4242 d[random.getrandbits(5)] = {Foo() for i in range(10)}
/external/python/cpython3/Lib/
Drandom.py242 getrandbits = self.getrandbits
244 r = getrandbits(k) # 0 <= r < 2**k
246 r = getrandbits(k)
285 return self.getrandbits(n * 8).to_bytes(n, 'little')
783 def getrandbits(self, k): member in SystemRandom
836 getrandbits = _inst.getrandbits variable
Dsecrets.py23 randbits = _sysrand.getrandbits
Duuid.py612 return random.getrandbits(48) | (1 << 40)
693 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.py251 (sysrand.getrandbits(8) & ~self.MAC_BIT_MULTICAST) |
253 sysrand.getrandbits(8),
254 sysrand.getrandbits(8),
255 sysrand.getrandbits(8),
256 sysrand.getrandbits(8),
257 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.py141 "reporting_bench_%016x_" % random.getrandbits(64))
/external/python/cpython3/Doc/library/
Drandom.rst39 Optionally, a new generator can supply a :meth:`~Random.getrandbits` method --- this
143 .. function:: getrandbits(k)
147 as an optional part of the API. When available, :meth:`getrandbits` enables
573 mantissa = 0x10_0000_0000_0000 | self.getrandbits(52)
577 x = self.getrandbits(32)
/external/python/cpython3/Lib/email/
Dutils.py186 randint = random.getrandbits(64)
/external/python/cpython3/Misc/NEWS.d/
D3.7.0b4.rst208 consistently even when called from subclasses without a ``getrandbits()``
D3.6.6rc1.rst369 consistently even when called from subclasses without a ``getrandbits()``
D3.9.0b1.rst525 ``randbytes()`` now directly reuses ``getrandbits()``.
D3.9.0a6.rst468 Allow ``random.getrandbits(0)`` to succeed and to return 0.
D3.8.0a1.rst5173 only once at class/subclass instantiation time whether its ``getrandbits()``
5218 consistently even when called from subclasses without a ``getrandbits()``
/external/autotest/client/cros/
Ddhcp_packet.py522 packet.set_field(FIELD_TRANSACTION_ID, random.getrandbits(32))
/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
/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

12