<commit_before>import time
start = time.time()
import redcap
import array
import string
import csv
import numpy
import sys
import glob
from datetime import datetime
import numpy
from numpy import genfromtxt
import numpy as np
import pandas
from pandas import DataFrame

data = pandas.read_excel('aseba_prep/new_script/asr_scored_partial.xlsx', 
			 sheet_name=0)  # return first sheet

today=time.strftime("%m%d%Y")
myfile_name='aseba_prep/asr_outcome_reformate_'+today+'.csv'
data = data.rename(columns={
    'asr_middlename': 'subject',
    'asr_lastname': 'visit',
    'asr_firstname': 'study_id',
    'Personal_Strengths_Total':'asr_strength_raw',
    'Personal_Strengths_TScore':'asr_strength_t',
    'Personal_Strengths_Percentile':'asr_strength_pct',
    'Anxious__Depressed_Total':'asr_anxdep_raw',
    'Anxious__Depressed_TScore':'asr_anxdep_t',
    'Anxious__Depressed_Percentile':'asr_anxdep_pct',
    'Withdrawn_Total':'asr_withdrawn_raw',
    'Withdrawn_TScore':'asr_withdrawn_t',
    'Withdrawn_Percentile':'asr_withdrawn_pct',
    'Somatic_Complaints_Total':'asr_somaticraw',
    'Somatic_Complaints_TScore':'asr_somatic_t',
    'Somatic_Complaints_Percentile':'asr_somatic_pct',
    'Thought_Problems_Total':'asr_thought_raw',
    'Thought_Problems_TScore':'asr_thought_t',
    'Thought_Problems_Percentile':'asr_thought_pct',
    'Attention_Problems_Total':'asr_attention_raw',
    'Attention_Problems_TScore':'asr_attention_t',
    'Attention_Problems_Percentile':'asr_attention_pct',
    'Aggressive_Behavior_Total':'asr_aggressive_raw',
    'Aggressive_Behavior_TScore':'asr_aggressive_t',
    'Aggressive_Behavior_Percentile':'asr_aggressive_pct',
    'Rule_Breaking_Behavior_Total':'asr_rulebreak_raw',
    'Rule_Breaking_Behavior_TScore':'asr_rulebreak_t',
    'Rule_Breaking_Behavior_Percentile':'asr_rulebreak_pct',
    'Intrusive_Total':'asr_intrusive_raw',
    'Intrusive_TScore':'asr_intrusive_t',
    'Intrusive_Percentile':'asr_intrusive_pct',
    'Internalizing_Problems_Total':'asr_internal_raw',
    'Internalizing_Problems_TScore':'asr_internal_t',
    'Internalizing_Problems_Percentile':'asr_internal_pct',
    'Externalizing_Problems_Total':'asr_external_raw',
    'Externalizing_Problems_TScore':'asr_external_t',
    'Externalizing_Problems_Percentile':'asr_external_pct',
    'Total_Problems_Total':'asr_totprob_raw',
    'Total_Problems_TScore':'asr_totprob_t',
    'Total_Problems_Percentile':'asr_totprob_pct',
    'Depressive_Problems_Total':'asr_dep_dsm_raw',
    'Depressive_Problems_TScore':'asr_dep_dsm_t',
    'Depressive_Problems_Percentile':'asr_dep_dsm_pct',
    'Anxiety_Problems_Total':'asr_anx_dsm_raw',
    'Anxiety_Problems_TScore':'asr_anx_dsm_t',
    'Anxiety_Problems_Percentile':'asr_anx_dsm_pct',
    'Somatic_Problems_Total':'asr_somat_dsm_raw',
    'Somatic_Problems_TScore':'asr_somat_dsm_t',
    'Somatic_Problems_Percentile':'asr_somat_dsm_pct',
    'Avoidant_Personality_Problems_Total':'asr_avoid_dsm_raw',
    'Avoidant_Personality_Problems_TScore':'asr_avoid_dsm_t',
    'Avoidant_Personality_Problems_Percentile':'asr_avoid_dsm_pct',
    'AD_H_Problems_Total':'asr_adhd_dsm_raw',
    'AD_H_Problems_TScore':'asr_adhd_dsm_t',
    'AD_H_Problems_Percentile':'asr_adhd_dsm_pct',
    'Antisocial_Personality_Total':'asr_antisoc_dsm_raw',
    'Antisocial_Personality_TScore':'asr_antisoc_dsm_t',
    'Antisocial_Personality_Percentile':'asr_antisoc_dsm_pct',
    'Inattention_Problems_Subscale_Total':'asr_inatten_raw',
    'Inattention_Problems_Subscale_TScore':'asr_inatten_t',
    'Inattention_Problems_Subscale_Percentile':'asr_inatten_pct',
    'Hyperactivity_Impulsivity_Problems_Subscale_Total':'asr_hyper_raw',
    'Hyperactivity_Impulsivity_Problems_Subscale_TScore':'asr_hyper_t',
    'Hyperactivity_Impulsivity_Problems_Subscale_Percentile':'asr_hyper_pct',
    'Sluggish_Cognitive_Tempo_Total':'asr_slugcog_raw',
    'Sluggish_Cognitive_Tempo_TScore':'asr_slugcog_t',
    'Sluggish_Cognitive_Tempo_Percentile':'asr_slugcog_pct',
    'Obsessive_Compulsive_Problems_Total':'asr_ocd_raw',
    'Obsessive_Compulsive_Problems_TScore':'asr_ocd_t',
    'Obsessive_Compulsive_Problems_Percentile':'asr_ocd_pct'})

namelist=['strength_raw',
'strength_t',
'strength_pct',
'anxdep_raw',
'anxdep_t',
'anxdep_pct',
'withdrawn_raw',
'withdrawn_t',
'withdrawn_pct',
'somaticraw',
'somatic_t',
'somatic_pct',
'thought_raw',
'thought_t',
'thought_pct',
'attention_raw',
'attention_t',
'attention_pct',
'aggressive_raw',
'aggressive_t',
'aggressive_pct',
'rulebreak_raw',
'rulebreak_t',
'rulebreak_pct',
'intrusive_raw',
'intrusive_t',
'intrusive_pct',
'internal_raw',
'internal_t',
'internal_pct',
'external_raw',
'external_t',<commit_msg>Correct typo in variable name<commit_after>import time
start = time.time()
import redcap
import array
import string
import csv
import numpy
import sys
import glob
from datetime import datetime
import numpy
from numpy import genfromtxt
import numpy as np
import pandas
from pandas import DataFrame

data = pandas.read_excel('aseba_prep/new_script/asr_scored_partial.xlsx', 
			 sheet_name=0)  # return first sheet

today=time.strftime("%m%d%Y")
myfile_name='aseba_prep/asr_outcome_reformate_'+today+'.csv'
data = data.rename(columns={
    'asr_middlename': 'subject',
    'asr_lastname': 'visit',
    'asr_firstname': 'study_id',
    'Personal_Strengths_Total':'asr_strength_raw',
    'Personal_Strengths_TScore':'asr_strength_t',
    'Personal_Strengths_Percentile':'asr_strength_pct',
    'Anxious__Depressed_Total':'asr_anxdep_raw',
    'Anxious__Depressed_TScore':'asr_anxdep_t',
    'Anxious__Depressed_Percentile':'asr_anxdep_pct',
    'Withdrawn_Total':'asr_withdrawn_raw',
    'Withdrawn_TScore':'asr_withdrawn_t',
    'Withdrawn_Percentile':'asr_withdrawn_pct',
    'Somatic_Complaints_Total':'asr_somatic_raw',
    'Somatic_Complaints_TScore':'asr_somatic_t',
    'Somatic_Complaints_Percentile':'asr_somatic_pct',
    'Thought_Problems_Total':'asr_thought_raw',
    'Thought_Problems_TScore':'asr_thought_t',
    'Thought_Problems_Percentile':'asr_thought_pct',
    'Attention_Problems_Total':'asr_attention_raw',
    'Attention_Problems_TScore':'asr_attention_t',
    'Attention_Problems_Percentile':'asr_attention_pct',
    'Aggressive_Behavior_Total':'asr_aggressive_raw',
    'Aggressive_Behavior_TScore':'asr_aggressive_t',
    'Aggressive_Behavior_Percentile':'asr_aggressive_pct',
    'Rule_Breaking_Behavior_Total':'asr_rulebreak_raw',
    'Rule_Breaking_Behavior_TScore':'asr_rulebreak_t',
    'Rule_Breaking_Behavior_Percentile':'asr_rulebreak_pct',
    'Intrusive_Total':'asr_intrusive_raw',
    'Intrusive_TScore':'asr_intrusive_t',
    'Intrusive_Percentile':'asr_intrusive_pct',
    'Internalizing_Problems_Total':'asr_internal_raw',
    'Internalizing_Problems_TScore':'asr_internal_t',
    'Internalizing_Problems_Percentile':'asr_internal_pct',
    'Externalizing_Problems_Total':'asr_external_raw',
    'Externalizing_Problems_TScore':'asr_external_t',
    'Externalizing_Problems_Percentile':'asr_external_pct',
    'Total_Problems_Total':'asr_totprob_raw',
    'Total_Problems_TScore':'asr_totprob_t',
    'Total_Problems_Percentile':'asr_totprob_pct',
    'Depressive_Problems_Total':'asr_dep_dsm_raw',
    'Depressive_Problems_TScore':'asr_dep_dsm_t',
    'Depressive_Problems_Percentile':'asr_dep_dsm_pct',
    'Anxiety_Problems_Total':'asr_anx_dsm_raw',
    'Anxiety_Problems_TScore':'asr_anx_dsm_t',
    'Anxiety_Problems_Percentile':'asr_anx_dsm_pct',
    'Somatic_Problems_Total':'asr_somat_dsm_raw',
    'Somatic_Problems_TScore':'asr_somat_dsm_t',
    'Somatic_Problems_Percentile':'asr_somat_dsm_pct',
    'Avoidant_Personality_Problems_Total':'asr_avoid_dsm_raw',
    'Avoidant_Personality_Problems_TScore':'asr_avoid_dsm_t',
    'Avoidant_Personality_Problems_Percentile':'asr_avoid_dsm_pct',
    'AD_H_Problems_Total':'asr_adhd_dsm_raw',
    'AD_H_Problems_TScore':'asr_adhd_dsm_t',
    'AD_H_Problems_Percentile':'asr_adhd_dsm_pct',
    'Antisocial_Personality_Total':'asr_antisoc_dsm_raw',
    'Antisocial_Personality_TScore':'asr_antisoc_dsm_t',
    'Antisocial_Personality_Percentile':'asr_antisoc_dsm_pct',
    'Inattention_Problems_Subscale_Total':'asr_inatten_raw',
    'Inattention_Problems_Subscale_TScore':'asr_inatten_t',
    'Inattention_Problems_Subscale_Percentile':'asr_inatten_pct',
    'Hyperactivity_Impulsivity_Problems_Subscale_Total':'asr_hyper_raw',
    'Hyperactivity_Impulsivity_Problems_Subscale_TScore':'asr_hyper_t',
    'Hyperactivity_Impulsivity_Problems_Subscale_Percentile':'asr_hyper_pct',
    'Sluggish_Cognitive_Tempo_Total':'asr_slugcog_raw',
    'Sluggish_Cognitive_Tempo_TScore':'asr_slugcog_t',
    'Sluggish_Cognitive_Tempo_Percentile':'asr_slugcog_pct',
    'Obsessive_Compulsive_Problems_Total':'asr_ocd_raw',
    'Obsessive_Compulsive_Problems_TScore':'asr_ocd_t',
    'Obsessive_Compulsive_Problems_Percentile':'asr_ocd_pct'})

namelist=['strength_raw',
'strength_t',
'strength_pct',
'anxdep_raw',
'anxdep_t',
'anxdep_pct',
'withdrawn_raw',
'withdrawn_t',
'withdrawn_pct',
'somatic_raw',
'somatic_t',
'somatic_pct',
'thought_raw',
'thought_t',
'thought_pct',
'attention_raw',
'attention_t',
'attention_pct',
'aggressive_raw',
'aggressive_t',
'aggressive_pct',
'rulebreak_raw',
'rulebreak_t',
'rulebreak_pct',
'intrusive_raw',
'intrusive_t',
'intrusive_pct',
'internal_raw',
'internal_t',
'internal_pct',
'external_raw',
'external_t',
{'fraction_non_alphanumeric': 0.1178343949044586, 'fraction_numerical': 0.00021231422505307856, 'mean_word_length': 9.433001107419711, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2965670', 'n_tokens_mistral': 4089, 'n_tokens_neox': 3717, 'n_words': 307}