summaryrefslogtreecommitdiff
path: root/python/other/slop.py
diff options
context:
space:
mode:
authorpants <niklasjo2004@gmail.com>2026-09-21 14:17:03 -0700
committerpants <niklasjo2004@gmail.com>2026-09-21 14:17:03 -0700
commit7b21727285e50b0b050c4ddd70d07542229c5366 (patch)
tree5d369153c5df5b41f3750d25479a68f20169c8ff /python/other/slop.py
init
Diffstat (limited to 'python/other/slop.py')
-rw-r--r--python/other/slop.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/python/other/slop.py b/python/other/slop.py
new file mode 100644
index 0000000..5ba8ccf
--- /dev/null
+++ b/python/other/slop.py
@@ -0,0 +1,21 @@
+import matplotlib.pyplot as plt
+import numpy as np
+
+# Open and read the file
+with open(".power_log", "r", encoding="utf-8") as f:
+ data = f.readlines()
+
+# Extract numerical values from each line
+measurements = [float(line.strip()) for line in data]
+
+# Generate time values (assuming measurements are taken every second)
+time_values = np.arange(len(measurements))
+
+# Plot the data
+plt.figure(figsize=(10, 6))
+plt.plot(time_values, measurements, marker='o', linestyle='-')
+plt.title('Power Measurements Over Time')
+plt.xlabel('Time (seconds)')
+plt.ylabel('Power Measurement')
+plt.grid(True)
+plt.show()