forked from XushengLuo92/Hierarchical-LTL
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstats.py
49 lines (40 loc) · 1.08 KB
/
stats.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# import numpy as np
# # Create a sample matrix
# matrix = np.array([
# [148, 21.350098],
# [145, 21.106741],
# [147, 20.247928],
# [145, 22.657795],
# [148, 21.278369],
# [147, 21.339671],
# [150, 21.458046],
# [146, 21.645851],
# [149, 21.615585],
# [150, 21.237824],
# [152, 22.185375],
# [150, 22.316069],
# [148, 21.132294],
# [147, 21.061217],
# [144, 21.780337],
# [145, 21.596012],
# [147, 21.218222],
# [150, 21.410828],
# [150, 20.795024],
# [146, 21.439786],
# ])
# # Calculate mean and standard deviation of each column
# column_means = np.mean(matrix, axis=0)
# column_stds = np.std(matrix, axis=0)
# print("Mean of each column:", column_means)
# print("Standard deviation of each column:", column_stds)
import json
# Path to the JSON file
file_path = 'src/lego_config.json'
# Read and load the JSON file
with open(file_path, 'r') as file:
data = json.load(file)
# Generate a dictionary with 'id' as the key
brick_dict = {brick['id']: brick for brick in data['bricks']}
# Print the dictionary
for key, value in brick_dict.items():
print(f"ID: {key}, Details: {value}")