Created
February 18, 2020 17:19
-
-
Save benwhalley/2dce207ebc8caa0d1cfea85395a702ae to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import random | |
import pandas as pd | |
def randomisesims(): | |
stimA = list(range(1,91)) | |
stimB = list(range(91,131)) | |
random.shuffle(stimA) | |
random.shuffle(stimB) | |
return stimA[:40]+stimB[:20] | |
N = 20 | |
for i in range(1, N+1): | |
df = pd.DataFrame() | |
df['stim'] =randomisesims() | |
df.to_csv(f"participant_{i}.csv") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment