<jupyter_start><jupyter_text>sanity check<jupyter_code>### save the data we have collected
filename = '../scripts/{}.h5'.format('joints_data')
os.remove(filename) if os.path.isfile(filename) else None
time.sleep(4)
with h5py.File(filename, 'w') as f:
    pos_grp = f.create_group('workspace_coords')
    pos_grp.create_dataset("joint_positions", data=qs, dtype=np.float32, compression="gzip", compression_opts=9)
    pos_grp.create_dataset("joint_velocities", data=qdots,  dtype=np.float32, compression="gzip", compression_opts=9)
    targ_grp = f.create_group('workspace_targets')
    targ_grp.create_dataset("joint_positions", data=joint_workspace['pts3']['q'],  dtype=np.float32, compression="gzip", compression_opts=9)
    targ_grp.create_dataset("joint_velocities", data=joint_workspace['pts3']['qdot'],  dtype=np.float32, compression="gzip", compression_opts=9)
    
a = np.random.randn(4, 7)
for i in range(7):
    a[:, i] = i
    
print(a)
for i in range(7):
#     for (x, y, xd, yd) in (a[:,i]):
    x, y, xd, yd = a[:,i]
    print(x, y, xd, yd)<jupyter_output>0.0 0.0 0.0 0.0
1.0 1.0 1.0 1.0
2.0 2.0 2.0 2.0
3.0 3.0 3.0 3.0
4.0 4.0 4.0 4.0
5.0 5.0 5.0 5.0
6.0 6.0 6.0 6.0
{'fraction_non_alphanumeric': 0.17612193056731584, 'fraction_numerical': 0.06519898391193904, 'mean_word_length': 4.5233644859813085, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '150411', 'license': 'MIT', 'n_tokens_mistral': 526, 'n_tokens_neox': 506, 'n_words': 103, 'path': 'notes/joints_saver.ipynb', 'repo_name': 'jacknlliu/lyapunovearner', 'size': '1181'}