Skip to content

Instantly share code, notes, and snippets.

Avatar

Fabian Fichter ianfab

  • Heidelberg, Germany
View GitHub Profile
@karolzlot
karolzlot / tqdm_cpu_ram.py
Last active Aug 12, 2022
Monitoring real time cpu and ram usage with tqdm. If you like it please upvote this answer: https://stackoverflow.com/a/69511430/8896457
View tqdm_cpu_ram.py
from tqdm import tqdm
from time import sleep
import psutil
with tqdm(total=100, desc='cpu%', position=1) as cpubar, tqdm(total=100, desc='ram%', position=0) as rambar:
while True:
rambar.n=psutil.virtual_memory().percent
cpubar.n=psutil.cpu_percent()
rambar.refresh()
cpubar.refresh()
@niklasf
niklasf / bratko-kopec.py
Last active Feb 24, 2020
An implementation of the Bratko-Kopec Test using python-chess
View bratko-kopec.py
#!/usr/bin/python
import chess
import chess.uci
import sys
import time
MOVETIME = 120.0