functions.py 498 B

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