Skip to content

Instantly share code, notes, and snippets.

@onesandzeroes
Created July 16, 2014 04:17
Show Gist options
  • Save onesandzeroes/81d1adf475ce4fdf373d to your computer and use it in GitHub Desktop.
Save onesandzeroes/81d1adf475ce4fdf373d to your computer and use it in GitHub Desktop.
Number trial gen
import string
ambiguous_letters = ['I', 'O']
letter_targets = [letter for letter in string.ascii_uppercase
if letter not in ambiguous_letters]
ambiguous_numbers = ['0', '1']
number_targets = [digit for digit in string.digits
if digit not in ambiguous_numbers]
print(number_targets)
example_block = [
{'target': '4', 'trial_type': 'cs',
'us_direction': 'clockwise', 'us_distance': 0},
{'target': 'RANDOM', 'trial_type': 'cs',
'us_direction': 'clockwise', 'us_distance': 0}
] + [
{'target': 'RANDOM', 'trial_type': 'distractor'}
] * 6
print(example_block)
def create_trials(block):
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment