functions.py 483 B

1234567891011121314151617
  1. import random
  2. def uniqueID():
  3. '''
  4. Return unique identifier for current user and
  5. '''
  6. return str(random.uniform(0, 1))[2:15]
  7. def write_header_expe(f, expe_name):
  8. '''
  9. Write specific header into file
  10. '''
  11. if expe_name == 'quest_one_image':
  12. f.write('stimulus' + ";" + "name_stimulus" + ";" + 'cropping_percentage' + ";" + 'orientation' + ';'
  13. + 'image_ref_position' + ';' + 'answer' + ';' + 'time_reaction' + ';' + 'entropy' + '\n')