-m change
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user