Initialize the default random.

@return seed for the random generator factory.
337397
private static long getGlobalSeed() {
    String sseed = System.getProperty("elki.seed");
    return (sseed != null) ? Long.parseLong(sseed) : System.nanoTime();
  }
1187100
private function initialize()
    {
        // generate key pair.
        $this->privateKey = $this->generator->createPrivateKey();
        $this->publicKey = $this->privateKey->getPublicKey();

        // generate salt
        $this->salt = openssl_random_pseudo_bytes(16);

        $this->publicKeyContent = hex2bin($this->serializer->serialize($this->publicKey->getPoint()));
    }
1349653
public Random getNewRandomInstance(long seed) {
        try {
            Random t = (Random) randomClass.newInstance();
            if (t.getStatePointer() != null) {
                // TODO: attach this thing to deallocator
                // if it's stateless random - we just don't care then
            }
            t.setSeed(seed);
            return t;
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
628622
public static final ISID createRandom (final long seed) {

        // TODO: Implement Qualifier
        final Random rand = new Random(seed);

        final ISID isid = new ISID(Format.RANDOM, Constants.RESERVED_BYTE, (short) rand.nextInt(), (byte) rand.nextInt(), (short) 0);

        return isid;
    }
231881
public RDFUnit init() {

        // Update pattern service
        for (Pattern pattern : getPatterns()) {
            PatternService.addPattern(pattern.getId(),pattern.getIRI(), pattern);
        }
        return this;
    }
1190744
def init_rng(self):
        
        rng = torch.Generator()
        seed = self.seeds[self.epoch]
        logging.info(f'Sampler for epoch {self.epoch} uses seed {seed}')
        rng.manual_seed(seed)
        return rng
499070
def _seed(self):
        """"""
        for name in self.__slots__:
            value = getattr(self, name, UNSET)
            if value is UNSET:
                setattr(self, name, self.__class__._default)
915501
def initialize(self, seed=None):
        
        self.seed = seed or os.urandom(32)  # Generate new seed if not provided
        signing_key = SigningKey(self.seed)
        verifying_key = signing_key.get_verifying_key()
        self._auth_private = signing_key.to_seed()
        self._auth_public = verifying_key.to_bytes()
        log_binary(_LOGGER,
                   'Authentication keys',
                   Private=self._auth_private,
                   Public=self._auth_public)
53489
public function random()
    {
        $objReturn = null;

        $intIndex = rand(0, (count($this->collection) - 1));
        if (isset($this->collection[$intIndex])) {
            $objReturn = $this->collection[$intIndex];
        }

        return $objReturn;
    }
436334
public function shuffle($seed = null)
    {
        $items = $this->items;

        if (is_null($seed)) {
            shuffle($items);
        } else {
            srand($seed);

            usort($items, function () {
                return rand(-1, 1);
            });
        }

        return new static($items);
    }
11244
public function initialize()
    {
        $this->_connection->table(self::TABLE)
            ->createIfNotExists(array(
                'name' => new \Pheasant\Types\StringType(255, 'notnull primary'),
                'id' => new \Pheasant\Types\IntegerType(null, 'notnull unsigned'),
                ));

        return $this;
    }
97478
def set_seed(seed: int):
    
    random.seed(seed)
    np.random.seed(seed)
    torch.random.manual_seed(seed)
74304
public static synchronized Random getThreadLocalRandom() {
        if(threadLocalRandom == null) {
            threadLocalRandom = new ThreadLocal<Random>() {
                /**
                 * Builds a Random object using the globalSeed (if available).
                 * 
                 * @return 
                 */
                @Override
                protected Random initialValue() {
                    if(globalSeed == null) {
                        return new Random();
                    }
                    else {
                        return new Random(globalSeed);
                    }
                }
            };
        }
        return threadLocalRandom.get();
    }
109077
public Configuration getRandomConfiguration() {
        List<Integer> integerList = getStartingConfiguration().asList();
        Collections.shuffle(integerList);
        return new Configuration(integerList, "TSP random configuration");
    }
1121408
public Configuration getRandomConfiguration() {
        List<Integer> tmp = new ArrayList<Integer>(this.dimension);
        for (int i = 0; i < this.dimension; ++i)
            tmp.add(JcopRandom.nextInt(this.machines));
        return new Configuration(tmp, "Empty JobShop created (random)");
    }
94675
private function _seed()
    {
        list($usec, $sec) = explode(' ', microtime());
        $a                = (float) $sec + ((float) $usec * 100000);

        return (float) $a + $this->config->kernel->security->cryptography->keys->private;
    }
1145235
def seed_rngs(seed: int) -> None:
    
    np.random.seed(seed)
    random.seed(seed)
    mx.random.seed(seed)