<jupyter_start><jupyter_text>Acceleration data<jupyter_code>import json
import math

from plotly.offline import download_plotlyjs, init_notebook_mode, plot, iplot
from plotly.graph_objs import Scatter, Layout
init_notebook_mode(connected=True)
accelData=[]
with open('coding-agents.raw', 'r') as accelDataFile:
    accelData=accelDataFile.readlines()
x=[json.loads(a.split('\'')[1])['x'] for a in accelData]
y=[json.loads(a.split('\'')[1])['y'] for a in accelData]
z=[json.loads(a.split('\'')[1])['z'] for a in accelData]
total={}
for index in range(len(x)):
    total2=[]
    for index2 in range(len(x[index])):
        total2.append(math.sqrt(x[index][index2]**2+y[index][index2]**2+z[index][index2]**2))
    totalsum=sum(total2)
    if totalsum<10*60:
        total['{}_lazy'.format(index)]=total2
    else:
        if totalsum<10.5*60:
            total['{}_normal'.format(index)]=total2
        else:
            total['{}_active'.format(index)]=total2
data=[]
for t in total.keys():
    data.append(Scatter(y=total[t], name=t))

iplot({
    'data': data,
    'layout': Layout(
        title='Acceleration profile of selected app users',
        yaxis=dict(title='Acceleration [m/s^2]',),
        xaxis=dict(title='Time since notification [s]',)
    )
})<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18153607447633824, 'fraction_numerical': 0.02017067494181536, 'mean_word_length': 4.560344827586207, 'pattern_counts': {'":': 0, '<': 7, '<?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': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '538603', 'license': 'MIT', 'n_tokens_mistral': 491, 'n_tokens_neox': 480, 'n_words': 86, 'path': 'accelerationdata.ipynb', 'repo_name': 'Nikolai-Hlubek/terawatt_v2', 'size': '1289'}