comaparison code optimization and cal sum/total mh dc and laying

This commit is contained in:
2026-01-20 16:33:45 +05:30
parent 90c18383da
commit 68a694d2c7
15 changed files with 286 additions and 34 deletions

10
app/utils/plot_utils.py Normal file
View File

@@ -0,0 +1,10 @@
import base64
from io import BytesIO
import matplotlib
matplotlib.use("Agg")
def plot_to_base64(plt):
img = BytesIO()
plt.savefig(img, format="png", bbox_inches="tight")
img.seek(0)
return base64.b64encode(img.read()).decode("utf-8")