Build random int stream int stream.

@param streamSize     the stream size
@param seed           the seed
@param exclusiveBound the exclusive bound
@return the int stream
971983
public static IntStream buildRandomIntStream(int streamSize,
            long seed, int exclusiveBound) {
        return buildRandomIntStream(streamSize, new Random(seed),
                exclusiveBound);
    }
1028228
public static DenseVector rand(final int size, final Random random) {
    final DenseVector vec = new DenseVector(size);
    for (int i = 0; i < size; ++i) {
      vec.values[i] = random.nextDouble();
    }
    return vec;
  }
1086645
@Override
	public BrownianMotionInterface getCloneWithModifiedSeed(int seed) {
		return new BrownianBridge(timeDiscretization, numberOfPaths, seed, start, end);
	}
840661
function rng_seed_int(x) {
  rng_pool[rng_pptr++] ^= x & 255;
  rng_pool[rng_pptr++] ^= (x >> 8) & 255;
  rng_pool[rng_pptr++] ^= (x >> 16) & 255;
  rng_pool[rng_pptr++] ^= (x >> 24) & 255;
  if(rng_pptr >= rng_psize) rng_pptr -= rng_psize;
}
379961
@Override
    public void setSeed(long seed) {
        if (initialized) {
            throw new UnsupportedOperationException();
        }
        initialized = true;
        rnd = (seed ^ multiplier) & mask;
    }
446753
public static Random getRNG(long... seed) {
    switch(_rngType) {
    case JavaRNG:      return new H2ORandomRNG(seed[0]);
    case XorShiftRNG:  return new XorShiftRNG (seed[0]);
    case PCGRNG:       return new PCGRNG      (seed[0],seed.length > 1 ? seed[1] : 1);
    case MersenneTwisterRNG:
      // Do not copy the seeds - use them, and initialize the first two ints by
      // seeds based given argument.  The call is locked, and also
      // MersenneTwisterRNG will just copy the seeds into its datastructures
      return new MersenneTwisterRNG(ArrayUtils.unpackInts(seed));
    }
    throw H2O.fail();
  }
1181548
@javax.annotation.Nonnull
  public com.simiacryptus.util.StreamNanoHTTPD init() throws IOException {
    com.simiacryptus.util.StreamNanoHTTPD.this.start(30000);
    new Thread(() -> {
      try {
        Thread.sleep(100);
        if(null != gatewayUri) Desktop.getDesktop().browse(gatewayUri);
      } catch (@javax.annotation.Nonnull final Exception e) {
        e.printStackTrace();
      }
    }).start();
    return this;
  }
32030
public static ByteRangeRandomizer aNewByteRangeRandomizer(final Byte min, final Byte max, final long seed) {
        return new ByteRangeRandomizer(min, max, seed);
    }
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);
        }
    }
114576
function(seed) {
    if (!values.isNumber(seed)) {
        throw errors.typeErrorFunction('Math.seed', 'number', seed);
    }
    _random = seedrandom(seed);
    return null;
}
983199
@Override
    public java.util.concurrent.Future<ListStreamsResult> listStreamsAsync(Integer limit, String exclusiveStartStreamName) {

        return listStreamsAsync(new ListStreamsRequest().withLimit(limit).withExclusiveStartStreamName(exclusiveStartStreamName));
    }
100760
def generate_seed(seed):
    """"""
    if seed is None:
        random.seed()
        seed = random.randint(0, sys.maxsize)
    random.seed(a=seed)

    return seed
95930
public static int randomIntGreaterThan(int minExclusive) {
    checkArgument(
        minExclusive < Integer.MAX_VALUE, "Cannot produce int greater than %s", Integer.MAX_VALUE);
    return randomInt(minExclusive + 1, Integer.MAX_VALUE);
  }
1293704
private Mat streamToMat(InputStream is) throws IOException {
        if(buffer == null){
            buffer = IOUtils.toByteArray(is);
            bufferMat = new Mat(buffer);
            return bufferMat;
        } else {
            int numReadTotal = is.read(buffer);
            //Need to know if all data has been read.
            //(a) if numRead < buffer.length - got everything
            //(b) if numRead >= buffer.length: we MIGHT have got everything (exact right size buffer) OR we need more data

            if(numReadTotal < buffer.length){
                bufferMat.data().put(buffer, 0, numReadTotal);
                bufferMat.cols(numReadTotal);
                return bufferMat;
            }

            //Buffer is full; reallocate and keep reading
            int numReadCurrent = numReadTotal;
            while(numReadCurrent != -1){
                byte[] oldBuffer = buffer;
                if(oldBuffer.length == Integer.MAX_VALUE){
                    throw new IllegalStateException("Cannot read more than Integer.MAX_VALUE bytes");
                }
                //Double buffer, but allocate at least 1MB more
                long increase = Math.max(buffer.length, MIN_BUFFER_STEP_SIZE);
                int newBufferLength = (int)Math.min(Integer.MAX_VALUE, buffer.length + increase);

                buffer = new byte[newBufferLength];
                System.arraycopy(oldBuffer, 0, buffer, 0, oldBuffer.length);
                numReadCurrent = is.read(buffer, oldBuffer.length, buffer.length - oldBuffer.length);
                if(numReadCurrent > 0){
                    numReadTotal += numReadCurrent;
                }
            }

            bufferMat = new Mat(buffer);
            return bufferMat;
        }

    }
79204
public static IntStream buildRandomIntStream(int streamSize,
            int inclusiveLowerBound, int exclusiveUpperBound) {
        return buildRandomIntStream(streamSize, new Random(),
                inclusiveLowerBound, exclusiveUpperBound);
    }
964273
public long initMathRandom(final Long seed) {
		if (seed == null) {
			mathRandom = new MathRandom();
		} else {
			mathRandom = new MathRandom(seed);
		}
		return mathRandom.getSeed();
	}
1150939
public static void foreachRandomInt(int streamSize, int exclusiveBound,
            IntConsumer eachRandomIntConsumer) {
        foreachRandomInt(streamSize, new Random(), exclusiveBound,
                eachRandomIntConsumer);
    }