-> a #dict of |{random_string: random_int}|
2275
def randdict(self):
        
        return {
            self.randstr: self._map_type(int)
            for x in range(self.random.randint(3, 10))}
905535
def randomCommaSeparatedIntegerField(self):
        
        randint = lambda max: ",".join(
            [str(x) for x in random.sample(range(1, 10), max)]
        )
        lst = [
            randint(3),
            randint(5),
            randint(7),
            randint(9)
        ]
        return self.randomize(lst)
47932
def _get_random_id():
    
    symbols = string.ascii_uppercase + string.ascii_lowercase + string.digits
    return ''.join(random.choice(symbols) for _ in range(15))
404905
def generate_random_type(valid):
    
    type = choice(['int', 'str'])

    r = lambda: randrange(-1000000000, 1000000000)

    if type == 'int':
        return int,  (r() if valid else str(r()) for i in itertools.count())
    elif type == 'str':
        return str, (str(r()) if valid else r() for i in itertools.count())
    else:
        raise AssertionError('!')
148086
def random_terms(self):
        ''''''
        return {k: v for (k, v) in self.terms.items() if v.random}
954805
def random_string(length, numeric_only=False):
    
    choices = string.digits if numeric_only else string.ascii_uppercase + string.digits
    return ''.join(random.choice(choices) for _ in range(length))
1064760
def random_string(length):
    
    valid_chars = string_ascii_letters + string_digits

    return ''.join(random.choice(valid_chars) for i in range(length))
946009
def _random_x(self):
        """"""
        return (tuple(random.random() for _ in range(self.fmodel.dim_x)),)
514312
def randstr(self):
        
        return gen_rand_str(
            4, 10, use=self.random, keyspace=list(string.ascii_letters))
433618
def str_if_nested_or_str(s):
    """"""
    if isinstance(s, ALL_STRING_TYPES):
        return str(s)
    if isinstance(s, (list, tuple)):
        return type(s)(map(str_if_nested_or_str, s))
    if isinstance(s, (dict, )):
        return stringify_dict_contents(s)
    return s
1285526
def random_list_elem(str_list):
        
        if isinstance(str_list, list):
            for elem in str_list:
                if not isinstance(elem, str):
                    raise TypeError("list element can only be string")
            return SeedString(random.choice(str_list))
        return None
1171845
def _random_block():
    
    # TODO: Use a better RNG than random.randint
    random_number = random.randint(0, DISCRETE_VALUES)
    random_string = _to_base36(random_number)
    return _pad(random_string, BLOCK_SIZE)
269118
def random_strings(self, string_length=1):
        
        str_list = []
        for path in self.uniform_generate(string_length):
            str_list.append(self._path_to_str(path))
        return str_list
949620
def random_string(**kwargs):
    
    n = kwargs.get('length', 10)
    pool = kwargs.get('pool') or string.digits + string.ascii_lowercase
    return ''.join(random.SystemRandom().choice(pool) for _ in range(n))
628142
def _get_random_string(length=44,
                       allowed_chars='abcdefghijklmnopqrstuvwxyz'
                       'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',
                       secret_key=settings.secret_key_bytes()):
    
    secret_key = _ensure_bytes(secret_key)
    _reseed_if_needed(using_sysrandom, secret_key)
    return ''.join(random.choice(allowed_chars) for i in range(length))
230738
function randomString() {
    var str = '', length = 32;
    while (length--) {
        str += String.fromCharCode(Math.random() * 26 | 97);
    }
    return str;
}
396021
def randstr(self):
        
        return gen_rand_str(
            2, 10, use=self.random, keyspace=list(self.keyspace))