diff options
author | zsloan | 2021-10-12 20:56:31 +0000 |
---|---|---|
committer | zsloan | 2021-10-12 20:56:31 +0000 |
commit | 6e211182354fb4d6941e3a44ec1ec9d378b0e4ef (patch) | |
tree | 60d9aaf382eefbb47cdbab9c74d98481cf0983de /gn3/random.py | |
parent | b815236123ff8e144bd84f349357a1852df95651 (diff) | |
parent | 77c274b79c3ec01de60e90db3299763cb58f715b (diff) | |
download | genenetwork3-6e211182354fb4d6941e3a44ec1ec9d378b0e4ef.tar.gz |
Merge branch 'main' of https://github.com/genenetwork/genenetwork3 into bug/fix_rqtl_covariates
Diffstat (limited to 'gn3/random.py')
-rw-r--r-- | gn3/random.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gn3/random.py b/gn3/random.py new file mode 100644 index 0000000..f0ba574 --- /dev/null +++ b/gn3/random.py @@ -0,0 +1,11 @@ +""" +Functions to generate complex random data. +""" +import random +import string + +def random_string(length): + """Generate a random string of length `length`.""" + return "".join( + random.choices( + string.ascii_letters + string.digits, k=length)) |