def gen_string(str_type, length=None):
    str_types_functions = {
        u'alpha': gen_alpha,
        u'alphanumeric': gen_alphanumeric,
        u'cjk': gen_cjk,
        u'cyrillic': gen_cyrillic,
        u'html': gen_html,
        u'latin1': gen_latin1,
        u'numeric': gen_numeric_string,
        u'utf8': gen_utf8,
    }
    str_type_lower = str_type.lower()  # do not modify user data
    if str_type_lower not in str_types_functions.keys():
        raise ValueError(
            '{0} is not a supported string type. Valid string types are {1}.'
            ''.format(str_type_lower, u','.join(str_types_functions.keys()))
        )
    method = str_types_functions[str_type_lower]
    if length is None:
        return method()
    return method(length)
Stack sparse matrices vertically (row wise).
dataset/ETHPy150Open omaciel/fauxfactory/fauxfactory/__init__.py/gen_string--crossover with--dataset/ETHPy150Open rizar/attention-lvcsr/libs/Theano/theano/sparse/basic.py/vstack