Skip to content
Snippets Groups Projects
Commit 31419c41 authored by Baptiste Bauvin's avatar Baptiste Bauvin
Browse files

COmpression beggining

parent 2ca756c4
No related branches found
No related tags found
No related merge requests found
import os
import shutils
import mmap
def simplify_plotly(html_file_path):
with open(html_file_path, 'r+') as html_file:
s = mmap.mmap(html_file.fileno(), 0, access=mmap.ACCESS_WRITE)
print(s.find(b'<script type="text/javascript">/**'))
print(s.find(b'27)}));</script> ', ))
s = s[:181] + b'<script src="../_static/plotly_js.js"></script>' + s[3538962+17:]
print(s)
mmap.flush()
if __name__=="__main__":
simplify_plotly("/home/baptiste/Documents/Gitwork/summit/results/hepatitis/debug_started_2022_03_16-15_06_55__/hepatitis-mean_on_10_iter-balanced_accuracy_p.html")
\ No newline at end of file
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment