def run(context): for image in context['imageList']: image.setImage(silhouette) context['trustGameDemo'] = True return go(subModules, context)
def run(context): win = context['window'] transition1 = visual.TextStim(win, transitionControlQuiz, pos=[0, 0.2], height=0.07, wrapWidth=1.5) pressSpace = visual.TextStim(win, pressSpaceKey, pos=[0, -0.8], height=0.06, wrapWidth=1.5) transition1.draw() pressSpace.draw() win.flip() proceedOrQuit(win) context['trialNum'] = 0 controlImages = context['controlImages'] for index, image in enumerate(controlImages): context['imageList'][index].setImage(image) new_context = go(subModules, context) transition2 = visual.TextStim(win, transitionExperimentQuiz, pos=[0, 0.2], height=0.07, wrapWidth=1.5) transition2.draw() pressSpace.draw() win.flip() proceedOrQuit(win) new_context['trialNum'] = 1 trialImages = context['trialImages'] for index, image in enumerate(trialImages): context['imageList'][index].setImage(image) return go(subModules, new_context)
def run(context): controlImages = context['controlImages'] for index, image in enumerate(controlImages): context['imageList'][index].setImage(image) # no specific target in the control context['target'] = -1 context['trialNum'] = 0 context['numberOfChanges'] = 0 context['attentionDuration'] = context['options']['blockLength'] return go(subModules, context)
def run(context): trialImages = context['trialImages'] for index, image in enumerate(trialImages): context['imageList'][index].setImage(image) possible_targets = [0, 1, 2, 3] context['target'] = random.choice(possible_targets) context['nonTargetList'] = [ x for x in possible_targets if x != context['target'] ] context['numberOfChanges'] = 0 context['changeProb'] = 0.5 context['attentionDuration'] = context['options']['blockLength'] context['trialNum'] = 1 return go(subModules, context)
def run(context): practiceImages = context['practiceImages'] imageList = context['imageList'] for index, image in enumerate(practiceImages[:4]): imageList[index].setImage(image) context['target'] = 0 context['changeSide1'] = practiceImages[0] context['changeSide2'] = practiceImages[-1] context['nonTargetList'] = [1, 2, 3] context['numberOfChanges'] = 2 context['changeProb'] = __changeProb(context) context['attentionDuration'] = context['options']['practiceLength'] context['trialNum'] = -1 return go(subModules, context)
from modules import attentionGameInstructions, attentionRotationQuestionaire, controlTrial,\ experimentTrial, experimentTrustGame, genReport, initialize, practiceTrial,\ practiceTrustGame, setCollectData, thankYou, trustGameInstructions,\ trustGameInstructions2, trustGameTransition from lib.runner import go modules = [ initialize, attentionGameInstructions, trustGameInstructions2, practiceTrustGame, practiceTrial, setCollectData, controlTrial, experimentTrial, trustGameTransition, experimentTrustGame, attentionRotationQuestionaire, genReport, thankYou ] results = go(modules) print(results)
def run(context): return go(subModules, context)
db.db_name = args.name db.init() # create the database file interval = args.interval counter = interval if not args.query: if not args.single: try: while True: sleep(1) counter -= 1 logger.timer('Querying in %s seconds(s)' % logger.BLUE(counter)) if counter <= 0: runner.go() counter = interval except KeyboardInterrupt as e: logger.red('CTRL+C Detected!') quit() else: runner.go() subdomains, wildcards = db.query() if args.probe: logger.yellow('Running HTTP probe') sleep(3) probed = probe.do(subdomains, args.threads) if args.probe: