From 1f8045fc9ffa411fc0b5c7d4d1b46ac2f545aeb9 Mon Sep 17 00:00:00 2001 From: pants Date: Thu, 31 Jul 2025 12:06:36 -0700 Subject: [PATCH] ye --- python/other/slop.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 python/other/slop.py 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()