from os import environ import boto3 region_name = 'us-east-1' # setting for integration with AWS Mturk AWS_ACCESS_KEY_ID = environ.get('AWS_ACCESS_KEY_ID') AWS_SECRET_ACCESS_KEY = environ.get('AWS_SECRET_ACCESS_KEY') # Uncomment this line to use in sandbox #endpoint_url = 'https://mturk-requester-sandbox.us-east-1.amazonaws.com' # Uncomment this line to use in production endpoint_url = 'https://mturk-requester.us-east-1.amazonaws.com' client = boto3.client( 'mturk', endpoint_url=endpoint_url, region_name=region_name, aws_access_key_id=AWS_ACCESS_KEY_ID, aws_secret_access_key=AWS_SECRET_ACCESS_KEY, ) # This will return $10,000.00 in the MTurk Developer Sandbox #print(client.get_account_balance()['AvailableBalance']) ROOMS = [ # { # 'name': 'Virtual_lab', # 'display_name': 'Virtual Lab', # 'participant_label_file': '_rooms/virtualLab.txt', # # }, # dict( # name='VCEEroom', # display_name='VCEE Room' # ), { 'name': 'econ101', 'display_name': 'Econ 101 class', 'participant_label_file': '_rooms/econ101.txt', }, # { # 'name': 'live_demo', # 'display_name': 'Room for live demo (no participant labels)', # }, # { # 'name': 'gate', # 'display_name': 'GATE', # 'participant_label_file': '_rooms/gate.txt', # }, # ] SESSION_CONFIGS = [ dict( name='cred', display_name='CRED', app_sequence=['filter_app_CRED', 'credibility'], num_demo_participants=6, participation_fee=1, ), dict( name='cred_NI', display_name='CRED_NI', app_sequence=['filter_app_CRED', 'credibility_NI'], num_demo_participants=6, participation_fee=1, ), dict( name='cred_NI_NB', display_name='CRED_NI_NB', app_sequence=['filter_app_CRED', 'credibility_NI_NB'], num_demo_participants=6, participation_fee=1, ), # dict( # name='deposit_refund', # display_name='deposit refund', # app_sequence=['deposit_refund'], # num_demo_participants=4, # treatment=2, # ), # dict( # name='survival', # display_name='SURVIVAL', # app_sequence=['filter_app', 'survival'], # num_demo_participants=8, # ), # dict( # name='tax_V3_FR_bot', # display_name="OAE", # num_demo_participants=3, # app_sequence=['tax_V3_FR_bot'], # treatment=6, # participation_fee=5, # ) ] # if you set a property in SESSION_CONFIG_DEFAULTS, it will be inherited by all configs # in SESSION_CONFIGS, except those that explicitly override it. # the session config can be accessed from methods in your apps as self.session.config, # e.g. self.session.config['participation_fee'] SESSION_CONFIG_DEFAULTS = dict( real_world_currency_per_point=1.00, participation_fee=0.00, doc="", mturk_hit_settings=dict( keywords='bonus, study', title='Academic Study - 30min - up to $5 bonus', description='Earn money by taking part in an academic study.', frame_height=500, template='global/mturk_template.html', minutes_allotted_per_assignment=60, expiration_hours=24, grant_qualification_id='3LQV637WQGT1LYFXSMV0PEH6DAE6B7', # to prevent retakes step 1 (create the qualificaation in MTurk requester account) qualification_requirements=[ { 'QualificationTypeId': "00000000000000000071", 'Comparator': "EqualTo", 'LocaleValues': [{'Country': "US"}], }, { 'QualificationTypeId': "3LQV637WQGT1LYFXSMV0PEH6DAE6B7", 'Comparator': "DoesNotExist", }, # to prevent retakes step 2 { 'QualificationTypeId': "00000000000000000040", #minimum number of HITs completed 'Comparator': "GreaterThanOrEqualTo", "IntegerValues": [300], }, { 'QualificationTypeId': "000000000000000000L0", #approval rate 'Comparator': "GreaterThanOrEqualTo", "IntegerValues": [99], }, ] ), ) # PARTICIPANT_FIELDS = ['is_dropout', 'time', 'wait_page_arrival'] # SESSION_FIELDS = [] # ISO-639 code # for example: de, fr, ja, ko, zh-hans LANGUAGE_CODE = 'en' # e.g. EUR, GBP, CNY, JPY REAL_WORLD_CURRENCY_CODE = 'USD' USE_POINTS = False ADMIN_USERNAME = 'admin' # for security, best to set admin password in an environment variable #ADMIN_PASSWORD = environ.get('OTREE_ADMIN_PASSWORD') ADMIN_PASSWORD = 'SFkl46;A' DEMO_PAGE_INTRO_HTML = """ """ SECRET_KEY = '7773133730194'