<jupyter_start><jupyter_text>Parse all data<jupyter_code>#create timematrix - timeslice:activity list
output4=[]
for j in hkozdata:
    timematrix={}
    for i in hkozdata[j]:
        activity=i[:i.find('-')-1]
        timeslice=i[i.find('-')+2:]
        if timeslice not in timematrix:timematrix[timeslice]=[]
        timematrix[timeslice].append(actidict[activity])
    #create correct timeslice order to start day at 04:00
    parseorder=np.roll(np.sort(timematrix.keys()),-2)
    #create output list, with shared timeslots
    for x in range(3): #create 3 randomized person-instances
        output=[]
        for k in range(len(parseorder)):
            helper=timematrix[parseorder[k]]
            np.random.shuffle(helper)
            output.append(helper[:3]) #max 3 activities within 90 minutes, but create 3 randomized persons
        #create output CSV list: activity, duration, activity, duration, ...
        output2=[]
        fixed=90 # survey 90 min timeslices are fixed
        for k in range(len(output)):
            for z in range(len(output[k])):
                output2.append(output[k][z])
                output2.append(fixed/(len(output[k])))
        output4.append(str(output2)[1:-1].replace(' ',''))
savedata=pd.DataFrame(output4)
savedata.columns=['day']
savedata.to_csv('hkoz.csv',index=False)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1346153846153846, 'fraction_numerical': 0.019970414201183433, 'mean_word_length': 3.2149532710280373, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '281217', 'license': 'MIT', 'n_tokens_mistral': 454, 'n_tokens_neox': 434, 'n_words': 97, 'path': 'rutin/Untitled-Copy2.ipynb', 'repo_name': 'szekelydata/szekelydata', 'size': '1352'}