<jupyter_start><jupyter_text>English localizationStatic list of correct answers in English. [Additional columns](addcol)      - [Language column](lang)      - [Preparation for temporalities](temp)  [Renaming](renaming)  [List of answers](enform)          - [Scientific questions](ensciform)          - [Demographic questions](endemform)      - [Language selection](langsel)[Basic operations](basicops)[Checkpoint / Question matching](checkquestmatch)<jupyter_code>%run "../Utilities/Preparation.ipynb"
processGFormEN = not ('gformEN' in globals())
if processGFormEN:
    # tz='Europe/Berlin' time
    dateparseGForm = lambda x: pd.Timestamp(x.split(' GMT')[0], tz='Europe/Berlin').tz_convert('utc')
if processGFormEN:
    csvEncoding = 'utf-8'

    gformPath = "../../data/Google forms/"
    genericFormName = '-gform-'
    csvSuffix = '.csv'

    enLanguageID = 'en'
    enSuffix = enLanguageID
    # dataFilesNamesStem is created in Preparation.ipynb
    try:
        gformEN = pd.read_csv(\
                            gformPath + dataFilesNamesStem + genericFormName + enSuffix + csvSuffix,\
                            dtype=str,\
                            parse_dates=['Timestamp'],\
                            date_parser=dateparseGForm,\
                             )
        print("gformEN read_csv success")
    except FileNotFoundError:
        print("gformEN read_csv failed")

    frLanguageID = 'fr'
    frSuffix = frLanguageID

    frTranslationsPath = gformPath + 'translations-' + frSuffix + csvSuffix
    frCorrectScientificAnswersPath = gformPath + 'CorrectScientific-' + frSuffix + csvSuffix
    frDemographicAnswersPath = gformPath + 'Demographic-' + frSuffix + csvSuffix<jupyter_output><empty_output><jupyter_text>Additional columns  Language column<jupyter_code>if processGFormEN:
    gformEN['Language'] = pd.Series(enLanguageID, index=gformEN.index)<jupyter_output><empty_output><jupyter_text>Preparation for temporalities<jupyter_code>if processGFormEN:    
    # when did the user answer the questionnaire? After playing, before playing, undefined?
    answerTemporalities = ['before', 'after', 'undefined'];
    gformEN['Temporality'] = pd.Series(answerTemporalities[2], index=gformEN.index)<jupyter_output><empty_output><jupyter_text>Displays all unique answers to every questionprintIndex = -12avoidIndexes = [-12, -9, 28, 29, 30, 31]for question in gform.columns:    if (printIndex not in avoidIndexes):        print("Q" + str(printIndex) + " " + question \             + "\n" + str(gform[question].unique()) + "\n\n")    printIndex = printIndex + 1  Renaming Labels are made more explicit. Their naming was done automatically by Google forms.<jupyter_code>if processGFormEN:
    renamedQuestions = pd.Index([
    'Timestamp',
    'Are you interested in video games?',
    'Do you play video games?',
    'How old are you?',
    'What is your gender?',
    'How long have you studied biology?',
    'Are you interested in biology?',
    'Before playing Hero.Coli, had you ever heard about synthetic biology?',
    'Before playing Hero.Coli, had you ever heard about BioBricks?',
    'Have you ever played an older version of Hero.Coli before?',
    'Have you played the current version of Hero.Coli?',
    'Have you played the arcade cabinet version of Hero.Coli?',
    'Have you played the Android version of Hero.Coli?',
    'In order to modify the abilities of the bacterium, you have to...',
    'What are BioBricks and devices?',
    'What is the name of this BioBrick? TER',
    'What is the name of this BioBrick? PR',
    'What is the name of this BioBrick? CDS',
    'What is the name of this BioBrick? RBS',
    'What does this BioBrick do? TER',
    'What does this BioBrick do? PR',
    'What does this BioBrick do? CDS',
    'What does this BioBrick do? RBS',
    'Pick the case where the BioBricks are well-ordered:',
    'When does green fluorescence happen?',
    'What happens when you unequip the movement device?',
    'What is this? PLASMID',
    'What does this device do? PCONS:RBS:GFP:TER',
    'What does this device do? PCONS:RBS:FLHDC:TER',
    'What does this device do? PCONS:RBS:AMPR:TER',
    'What does this device do? PBAD:RBS:GFP:TER',
    'What does this device do? PCONS:RBS:GFP:TER 2',
    'What does this device do? PCONS:RBS:FLHDC:TER 2',
    'What does this device do? PCONS:RBS:AMPR:TER 2',
    'What does this device do? PBAD:RBS:GFP:TER 2',
    'Guess: what would a device producing l-arabinose do, if it started with a l-arabinose-induced promoter?',
    'Guess: the bacterium would glow yellow...',
    'What is the species of the bacterium of the game?',
    'What is the scientific name of the tails of the bacterium?',
    'Find the antibiotic:',
    'You can write down remarks here.',
    'Do not edit -  pre-filled anonymous ID',
    'Language',
    'Temporality'
    ])
if processGFormEN:
    gformEN.columns = renamedQuestions<jupyter_output><empty_output><jupyter_text>List of answers  Scientific questions<jupyter_code>if processGFormEN:
    correctAnswersEN = pd.Series(
        [

    # Timestamp
                [], #1

    # Basic demographics questions
                [], #2
                [], #3
                [], #4
                [], #5

    # Basic biology questions
                [], #6
                [], #7
                [], #8
                [], #9

    # Your experience with Hero.Coli
                [], #10
                [], #11
                [], #12
                [], #13

    # General mechanics of the game
                ["Edit the DNA of the bacterium"], #14
                ["DNA sequences"], #15

    # BioBricks
                ["Terminator"], #16
                ["Promoter"], #17
                ["Coding Sequence"], #18
                ["RBS"], #19

    # BioBrick functions
                ["It shows the end of the device"], #20
                ["It controls when the device is active"], #21
                ["It controls which protein is produced, and thus which ability is affected"], #22
                ["It controls the level of expression, and thus how much the ability will be affected"], #23

    # Devices
                ["Option 1"], #24
                ["Under blue light, when the GFP device is equipped"], #25
                ["Flagella quickly disappear one by one"], #26

    # Devices
                ["A plasmid - it makes it possible to equip an additional device"], #27

    # Device symbols
                ["It generates green fluorescence"], #28
                ["It makes it possible to move faster"], #29
                ["It generates antibiotic resistance"], #30
                ["It generates green fluorescence in presence of l-arabinose"], #31

    # Device symbols
                ["It generates green fluorescence"], #32
                ["It makes it possible to move faster"], #33
                ["It generates antibiotic resistance"], #34
                ["It generates green fluorescence in presence of l-arabinose"], #35

    # Beyond the game
                ["After being induced, it would produce more and"], #36
                ["If it produces YFP under cyan light",
                 "If it produced YFP under cyan light"], #37
                ["<NAME>"], #38
                ["Flagella"], #39
                ["Ampicillin"], #40

    # Remarks
                [], #41

    # ID
                [], #42

    # Language
                [], #43

    # Temporality
                [], #44

            ], index = gformEN.columns
    )
    #correctAnswersEN<jupyter_output><empty_output><jupyter_text>Demographic questions<jupyter_code>if processGFormEN:
    interestPositives = ["A lot", "Extremely", "Moderately"]

    gameInterestPositives = interestPositives
    frequencyPositives = interestPositives
    agePositives = [18,19,20,21,22,23]
    genderPositives = ["Female"]

    biologyStudyPositives = ["Until bachelor's degree", "At least until master's degree"]
    biologyInterestPositives = interestPositives
    yesNoIdontknowPositives = ["Yes"]

    previousPlayPositives = ["Multiple times","A few times","Once","Yes"]

    languagePositives = [enLanguageID]

    temporalityPositives = [answerTemporalities[1]]


    demographicAnswersEN = pd.Series(
        [

    # Timestamp
                [], #1

    # Basic demographics questions
                interestPositives, #2
                frequencyPositives, #3
                agePositives, #4
                genderPositives, #5

    # Basic biology questions
                biologyStudyPositives, #6
                biologyInterestPositives, #7
                yesNoIdontknowPositives, #8
                yesNoIdontknowPositives, #9

    # Your experience with Hero.Coli
                previousPlayPositives, #10
                previousPlayPositives, #11
                previousPlayPositives, #12
                previousPlayPositives, #13

    # General mechanics of the game
                [], #14
                [], #15

    # BioBricks
                [], #16
                [], #17
                [], #18
                [], #19

    # BioBrick functions
                [], #20
                [], #21
                [], #22
                [], #23

    # Devices
                [], #24
                [], #25
                [], #26

    # Devices
                [], #27

    # Device symbols
                [], #28
                [], #29
                [], #30
                [], #31

    # Device symbols
                [], #32
                [], #33
                [], #34
                [], #35

    # Beyond the game
                [], #36
                [], #37
                [], #38
                [], #39
                [], #40

    # Remarks
                [], #41

    # ID
                [], #42

    # Language
                languagePositives, #43

    # Temporality
                temporalityPositives, #44

            ], index = gformEN.columns
    )
    #demographicAnswersEN<jupyter_output><empty_output><jupyter_text>Language selection<jupyter_code>if processGFormEN:
    correctAnswers = correctAnswersEN
if processGFormEN:
    demographicAnswers = demographicAnswersEN<jupyter_output><empty_output><jupyter_text>Basic operations  AccessFor instance, access to the correct answer to the 19th question.<jupyter_code>#correctAnswers.loc[gformEN.columns[19]]<jupyter_output><empty_output><jupyter_text>Checkpoint / Question matching  cf [Hero.Coli knowledge content document](https://docs.google.com/spreadsheets/d/1QF8YZzeRwrWxsWMMGpS5yeZBCtco9PqpzoPUdrKldbI/editgid=0)<jupyter_code>if processGFormEN:
    checkpointQuestionMatching = pd.DataFrame(
        {
            'checkpoint' : [

                # "Timestamp", # 1
                '',

            # Basic demographics questions
                # "Are you interested in video games?", # 2
                '',
                # "Do you play video games?", # 3
                '',
                # "How old are you?", # 4
                '',
                # "What is your gender?", # 5
                '',

            # Basic biology questions
                # "How long have you studied biology?", # 6
                '',
                # "Are you interested in biology?", # 7
                '',
                # "Before playing Hero.Coli, had you ever heard about synthetic biology?", # 8
                '',
                # "Before playing Hero.Coli, had you ever heard about BioBricks?", # 9
                '',

            # Your experience with Hero.Coli
                # "Have you ever played an older version of Hero.Coli before?", # 10
                '',
                # "Have you played the current version of Hero.Coli?", # 11
                '',
                # "Have you played the arcade cabinet version of Hero.Coli?", # 12
                '',
                # "Have you played the Android version of Hero.Coli?", # 13
                '',

            # General mechanics of the game
                # "In order to modify the abilities of the bacterium, you have to...", # 14
                'tutorial1.Checkpoint00',
                # "What are BioBricks and devices?", # 15
                'tutorial1.Checkpoint00',

            # BioBricks
                # "What is the name of this BioBrick?", # 16
                'tutorial1.Checkpoint05',
                # "What is the name of this BioBrick?", # 17
                'tutorial1.Checkpoint05',
                # "What is the name of this BioBrick?", # 18
                'tutorial1.Checkpoint02',
                # "What is the name of this BioBrick?", # 19
                'tutorial1.Checkpoint01',

            # BioBrick functions
                # "What does this BioBrick do?", # 20
                'tutorial1.Checkpoint05',
                # "What does this BioBrick do?", # 21
                'tutorial1.Checkpoint05',
                # "What does this BioBrick do?", # 22
                'tutorial1.Checkpoint02',
                # "What does this BioBrick do?", # 23
                'tutorial1.Checkpoint01',

            # Devices
                # "Pick the case where the BioBricks are well-ordered:", # 24
                'tutorial1.Checkpoint01',
                # "When does green fluorescence happen?", # 25
                'tutorial1.Checkpoint02',
                # "What happens when you unequip the movement device?", # 26
                'tutorial1.Checkpoint00',

            # Devices
                # "What is this?", # 27
                'tutorial1.Checkpoint05',

            # Device symbols
                # "What does this device do?", # 28
                'tutorial1.Checkpoint02',
                # "What does this device do?", # 29
                'tutorial1.Checkpoint02',
                # "What does this device do?", # 30
                'tutorial1.Checkpoint13',
                # "What does this device do?", # 31
                'tutorial1.Checkpoint05',

            # Device symbols
                # "What does this device do?", # 32
                'tutorial1.Checkpoint02',
                # "What does this device do?", # 33
                'tutorial1.Checkpoint02',
                # "What does this device do?", # 34
                'tutorial1.Checkpoint13',
                # "What does this device do?", # 35
                'tutorial1.Checkpoint05',

            # Beyond the game
                # "Guess: what would a device producing l-arabinose do, \
                    # if it started with a l-arabinose-induced promoter?", # 36
                'tutorial1.Checkpoint05',
                # "Guess: the bacterium would glow yellow...", # 37
                'tutorial1.Checkpoint02',
                # "What is the species of the bacterium of the game?", # 38
                'tutorial1.Checkpoint00',
                # "What is the scientific name of the tails of the bacterium?", # 39
                'tutorial1.Checkpoint00',
                # "Find the antibiotic:", # 40
                'tutorial1.Checkpoint02',

            # Remarks
                # "You can write down remarks here.", # 41
                '',

            # Thanks to have filled this study!
                # "Do not edit -  pre-filled anonymous ID" # 42
                '',

                # Language
                '',

                # Temporality
                '',
            ]
        }, index = gformEN.columns
    )
    #checkpointQuestionMatching
#checkpointQuestionMatching['checkpoint'][20]
#checkpointQuestionMatching.loc[gformEN.columns[20], 'checkpoint']
if processGFormEN:
    def getUniqueSortedCheckpoints( checkpoints ):
        result = checkpoints.unique()
        result = result[result!='']
        result = pd.Series(result)
        result = result.sort_values()
        result.index = range(0, len(result))
        return result
if processGFormEN:
    validableCheckpoints = getUniqueSortedCheckpoints(checkpointQuestionMatching['checkpoint'])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10220302916510202, 'fraction_numerical': 0.022718738265114533, 'mean_word_length': 1.8251414427157002, 'pattern_counts': {'":': 0, '<': 38, '<?xml version=': 0, '>': 38, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '9', 'dir': 'jupyter-structured-clean-dedup', 'id': '344258', 'license': 'CC0-1.0', 'n_tokens_mistral': 4861, 'n_tokens_neox': 4218, 'n_words': 1282, 'path': 'v1.52/Static data/English localization.ipynb', 'repo_name': 'CyberCRI/herocoli-metrics-redwire', 'size': '15979'}