From e7de21daf6c674633ef1159c2fd042523c1ec32e Mon Sep 17 00:00:00 2001 From: KunoiSayami Date: Mon, 12 Jun 2023 00:51:30 +0800 Subject: refector: Rename last year experimental Signed-off-by: KunoiSayami --- expt_220702.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 expt_220702.py (limited to 'expt_220702.py') diff --git a/expt_220702.py b/expt_220702.py new file mode 100755 index 0000000..5ac42b0 --- /dev/null +++ b/expt_220702.py @@ -0,0 +1,23 @@ +#!/usr/bin/env python3 +import argparse +import os +import subprocess + +import matplotlib.pyplot as plt + + +def function_pdf(proc: str): + p = subprocess.Popen([proc], stdin=subprocess.PIPE, stdout=subprocess.PIPE) + output, _ = p.communicate(b"1024 1024\n32768 1024\n32768 32768\n") + p.stdin.close() + for index in range(0, len(lines := output.splitlines()), 2): + plt.hist(list(map(int, lines[index].split())), bins=100) + plt.title(f"stddev: {lines[index + 1].decode()}") + plt.show() + + +if __name__ == '__main__': + parser = argparse.ArgumentParser() + parser.add_argument('proc') + matches = parser.parse_args() + function_pdf(matches.proc) -- cgit v1.3.1