Last active
November 5, 2020 04:24
-
-
Save jmmshn/a24f78506189416e1569cb8708e67aa9 to your computer and use it in GitHub Desktop.
Generate a uniue set of random samples of different sizes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import defaultdict | |
import random | |
insert_idx = defaultdict(set) | |
ll = range(6) | |
for n in range(1, 7): | |
for i in range(20): | |
sites = random.sample(ll, n) | |
insert_idx[n].add(frozenset(sites)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment