Created
July 1, 2019 09:16
-
-
Save gatheluck/f61186185a84073730d579cc34cd36f2 to your computer and use it in GitHub Desktop.
simple progress meter by tqdm.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from tqdm import tqdm | |
import time | |
from collections import OrderedDict | |
from random import random | |
with tqdm(range(10000), ncols=10) as pbar: | |
for i in pbar: | |
pbar.set_postfix(OrderedDict( | |
output='{:06d}'.format(i), | |
loss='{:.4f}'.format(random()) | |
)) | |
time.sleep(0.01) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment