-m change

This commit is contained in:
Jaewook Lee
2024-08-17 23:32:24 +09:00
parent afc58aac1f
commit 0ed37081d0

View File

@@ -3,10 +3,11 @@
def ensure(*packages):
for pkg in packages:
try: __import__(pkg)
except: import os; os.sytem(f'pip install -q {pkg}')
except: import os; os.system(f'pip install -q {pkg}')
ensure('pandas', 'tabulate')
import subprocess, multiprocessing as mp, warnings, pandas as pd
from tqdm.auto import tqdm
from tabulate import tabulate
warnings.filterwarnings("ignore")
R, G, B, W = (f'\x1b[{x}m' for x in (31, 32, 34, 0))
@@ -15,7 +16,8 @@ subprocess.run('neofetch')
command = lambda core: f'sysbench cpu --cpu-max-prime=20000 --time=1 --threads={core} run | grep second'
print(f'{G}$ {command("$(nproc)")}{W}')
print(f'{G}$ {command("$(nproc)")}{W}', flush=True)
def speed(core):
output = subprocess.run(