Return a random number expression with the given seed

@param seed seed
@return random(seed)
8944
public static NumberExpression<Double> random(int seed) {
        return Expressions.numberOperation(Double.class, MathOps.RANDOM2, ConstantImpl.create(seed));
    }
437868
def random_integers(cls, size, seed=None):
        
        if seed is None:
            seed = abs(hash("%0.20f" % time.time())) % (2 ** 31)
        return cls.from_sequence(size).hash(seed)
170310
def get_random_state(seed):
    
    if seed is None or seed is np.random:
        return np.random.mtrand._rand
    if isinstance(seed, (numbers.Integral, np.integer)):
        return np.random.RandomState(seed)
    if isinstance(seed, np.random.RandomState):
        return seed
    raise ValueError(
        '%r cannot be used to seed a np.random.RandomState instance' %
        seed)
1270922
public static function shuffle($array, $seed = null)
    {
        if (\is_null($seed)) {
            shuffle($array);
        } else {
            srand($seed);

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

        return $array;
    }
1316119
public static String rand(int size) {
        StringBuilder num = new StringBuilder();
        for (int i = 0; i < size; i++) {
            double a = Math.random() * 9;
            a = Math.ceil(a);
            int randomNum = new Double(a).intValue();
            num.append(randomNum);
        }
        return num.toString();
    }
541703
def RandomShuffle(a, seed):
    
    if seed:
        np.random.seed(seed)
    r = a.copy()
    np.random.shuffle(r)
    return r,
224446
def set_random_seed(self, seed):
        """"""
        self.config['mc']['seed'] = seed
        np.random.seed(seed)
481832
private SecureRandom createSecureRandom() {
        SecureRandom result;
        try {
            result = SecureRandom.getInstance("SHA1PRNG");
        } catch (NoSuchAlgorithmException e) {
            result = new SecureRandom();
        }

        // Force seeding to take place.
        result.nextInt();
        return result;
    }
1291410
public static RAND getRand() {
        // construct a secure seed
        int seedLength = IdemixUtils.FIELD_BYTES;
        SecureRandom random = new SecureRandom();
        byte[] seed = random.generateSeed(seedLength);

        // create a new amcl.RAND and initialize it with the generated seed
        RAND rng = new RAND();
        rng.clean();
        rng.seed(seedLength, seed);

        return rng;
    }
494070
public Random getNewRandomInstance(long seed, long size) {
        try {
            Class<?> c = randomClass;
            Constructor<?> constructor = c.getConstructor(long.class, long.class);
            Random t = (Random) constructor.newInstance(seed, size);
            return t;
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
971983
public static IntStream buildRandomIntStream(int streamSize,
            long seed, int exclusiveBound) {
        return buildRandomIntStream(streamSize, new Random(seed),
                exclusiveBound);
    }
1283521
@Override
    long next(long seed) {
        seed = seed ^ seed << 21;
        seed = seed ^ seed >>> 35;
        return seed ^ seed << 4;
    }
1076108
@Override
    public void _randomOrdering(String seed) {
        assertNoRawQuery();

        if (StringUtils.isBlank(seed)) {
            _randomOrdering();
            return;
        }

        _noCaching();
        orderByTokens.add(OrderByToken.createRandom(seed));
    }
897028
@Override
    public Randomizer<?> getRandomizer(Field field) {
        if (field.isAnnotationPresent(org.jeasy.random.annotation.Randomizer.class)) {
            org.jeasy.random.annotation.Randomizer randomizer = field.getAnnotation(org.jeasy.random.annotation.Randomizer.class);
            Class<?> type = randomizer.value();
            RandomizerArgument[] arguments = randomizer.args();
            return ReflectionUtils.newInstance(type, arguments);
        }
        return null;
    }
874598
public static EmailRandomizer aNewEmailRandomizer(final long seed, final Locale locale, final boolean safe) {
        return new EmailRandomizer(seed, locale, safe);
    }
1226822
public function setRandomScore(int $seed = null): self
    {
        $seedParam = new \stdClass();
        if (null !== $seed) {
            $seedParam->seed = $seed;
        }

        return $this->setParam('random_score', $seedParam);
    }
97478
def set_seed(seed: int):
    
    random.seed(seed)
    np.random.seed(seed)
    torch.random.manual_seed(seed)