Make a list of random real numbers between lower and upper bounds.
160313
def random_real_solution(solution_size, lower_bounds, upper_bounds):
    """"""
    return [
        random.uniform(lower_bounds[i], upper_bounds[i])
        for i in range(solution_size)
    ]
116387
def rand_pad(padding:int, size:int, mode:str='reflection'):
    ""
    return [pad(padding=padding,mode=mode),
            crop(size=size, **rand_pos)]
823246
def random(cls):
        
        r1, r2, r3 = np.random.random(3)

        q1 = sqrt(1.0 - r1) * (sin(2 * pi * r2))
        q2 = sqrt(1.0 - r1) * (cos(2 * pi * r2))
        q3 = sqrt(r1)       * (sin(2 * pi * r3))
        q4 = sqrt(r1)       * (cos(2 * pi * r3))

        return cls(q1, q2, q3, q4)
384209
function randomIntInRange(low, high) {
    return Math.round(low + (Math.random() * (high - low)));
  }
220737
def random(self, n: Optional[int] = None) -> Union[List[float], float]:
        
        return self._generate_randoms(self._request_randoms, max_n=self.config.MAX_NUMBER_OF_FLOATS,
                                      n=n)
860877
def randomize_args(self):
        '''
        '''
        args = self.spiro_args + np.random.normal(0, self.move_radius,
                                                  self.spiro_args.shape)
        np.clip(args, -199, 199, args)
        while args[0] == 0 or args[1] == 0:
            args = self.spiro_args + np.random.normal(0, self.move_radius,
                                                      self.spiro_args.shape)
            np.clip(args, -199, 199, args)
        return args
703532
def _make_list(predictions, targets):
  """"""
  #  Our models sometimes return predictions in lists, make it a list always.
  # TODO(lukaszkaiser): make abstractions for nested structures and refactor.
  if not isinstance(predictions, (list, tuple)):
    if isinstance(targets, (list, tuple)):
      raise ValueError("Targets are a list or tuple but predictions are not.")
    predictions, targets = [predictions], [targets]
  if len(predictions) != len(targets):
    raise ValueError("Predictions and targets have different lengths.")
  return list(predictions), list(targets)
34398
def rnumlistwithoutreplacement(min, max):
    """"""
    if checkquota() < 1:
        raise Exception("Your www.random.org quota has already run out.")
    requestparam = build_request_parameterNR(min, max)
    request = urllib.request.Request(requestparam)
    request.add_header('User-Agent', 'randomwrapy/0.1 very alpha')
    opener = urllib.request.build_opener()
    numlist = opener.open(request).read()
    return numlist.split()
9459
function randomBetween(_min, _max) {
	var max, min;
	
	if(_min > _max){
		min = _max;	
		max = _min;
	}
	else if(_min === _max){
		return _min;
	}
	else{
		max = _max;
		min = _min;
	}
    
    var r = Math.floor(Math.random() * max) + min;
    
    if(r > max)
    	return max;
    if(r < min)
    	return min;
    else
    	return r;
}
664202
def makeSequenceAbsolute(relVSequence, minV, maxV):
    '''
    
    '''

    return [(value * (maxV - minV)) + minV for value in relVSequence]
1096874
def bernstein(n, t):
    """"""
    t1 = 1-t
    return [n_choose_k(n, k) * t1**(n-k) * t**k for k in range(n+1)]
371364
public static <T extends EurekaEndpoint> List<T> randomize(List<T> list) {
        List<T> randomList = new ArrayList<>(list);
        if (randomList.size() < 2) {
            return randomList;
        }
        Random random = new Random(LOCAL_IPV4_ADDRESS.hashCode());
        int last = randomList.size() - 1;
        for (int i = 0; i < last; i++) {
            int pos = random.nextInt(randomList.size() - i);
            if (pos != i) {
                Collections.swap(randomList, i, pos);
            }
        }
        return randomList;
    }
1084387
def random_combination(iterable, r):
    ""
    pool = tuple(iterable)
    n = len(pool)
    indices = sorted(random.sample(xrange(n), r))
    return tuple(pool[i] for i in indices)
1320172
def set_bounds(self, ymin, ymax, xmin, xmax, zmin, zmax, edist=None):
        """"""
        self.ymin, self.ymax = ymin, ymax
        self.xmin, self.xmax = xmin, xmax
        self.zmin, self.zmax = zmin, zmax
        self.edist = None
1152261
def random_uniform(attrs, inputs, proto_obj):
    """"""
    try:
        from onnx.mapping import TENSOR_TYPE_TO_NP_TYPE
    except ImportError:
        raise ImportError("Onnx and protobuf need to be installed. "
                          "Instructions to install - https://github.com/onnx/onnx")
    new_attrs = translation_utils._remove_attributes(attrs, ['seed'])
    new_attrs['dtype'] = TENSOR_TYPE_TO_NP_TYPE[int(new_attrs.get('dtype', 1))]
    return 'random_uniform', new_attrs, inputs
1290142
def check_feasibility(x_bounds, lowerbound, upperbound):
    '''
    
    '''
    # x_bounds should be sorted, so even for "discrete_int" type,
    # the smallest and the largest number should the first and the last element
    x_bounds_lowerbound = sum([x_bound[0] for x_bound in x_bounds])
    x_bounds_upperbound = sum([x_bound[-1] for x_bound in x_bounds])

    # return ((x_bounds_lowerbound <= lowerbound) and (x_bounds_upperbound >= lowerbound)) or \
    #        ((x_bounds_lowerbound <= upperbound) and (x_bounds_upperbound >= upperbound))
    return (x_bounds_lowerbound <= lowerbound <= x_bounds_upperbound) or \
           (x_bounds_lowerbound <= upperbound <= x_bounds_upperbound)
1369627
private List<T> randomChoose(List<T> servers, int toChoose) {
        int size = servers.size();
        if (toChoose >= size || toChoose < 0) {
            return servers;
        } 
        for (int i = 0; i < toChoose; i++) {
            int index = random.nextInt(size);
            T tmp = servers.get(index);
            servers.set(index, servers.get(i));
            servers.set(i, tmp);
        }
        return servers.subList(0, toChoose);        
    }