aboutsummaryrefslogtreecommitdiff
path: root/gn3/random.py
diff options
context:
space:
mode:
authorzsloan2021-10-12 18:56:34 +0000
committerzsloan2021-10-12 18:56:34 +0000
commit0f396f4a1a753d449cf2975fc425d587d9350689 (patch)
treec9dac243dc05e5cb90ccb7f1d96fd599986bf60a /gn3/random.py
parent976660ce9ef915426c7ce5ff9077b439e4102a2c (diff)
parent77c274b79c3ec01de60e90db3299763cb58f715b (diff)
downloadgenenetwork3-0f396f4a1a753d449cf2975fc425d587d9350689.tar.gz
Merge branch 'main' of https://github.com/genenetwork/genenetwork3 into feature/add_rqtl_pairscan
Diffstat (limited to 'gn3/random.py')
-rw-r--r--gn3/random.py11
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))