mirror of https://github.com/tqdm/tqdm.git
do the rest
This commit is contained in:
parent
ad34684b5e
commit
d8d2a6661d
|
@ -23,8 +23,7 @@ iterable with "tqdm(iterable)", and you're done!
|
|||
|
||||
Here's what the output looks like:
|
||||
|
||||
``76%|████████████████████ | 7641/10000 [00:34<00:10,
|
||||
222.22 it/s]``
|
||||
``76%|████████████████████████████ | 7568/10000 [00:33<00:10, 229.00it/s]``
|
||||
|
||||
``trange(N)`` can be also used as a convenient shortcut for
|
||||
``tqdm(xrange(N))``.
|
||||
|
@ -689,7 +688,7 @@ precompute this by ourselves:
|
|||
``process_content_with_progress2()`` is better than the naive approach because
|
||||
now we have predictive information:
|
||||
|
||||
50%|████████████\ \| 2/4 [00:00<00:00, 4.06it/s]
|
||||
``50%|████████████ | 2/4 [00:00<00:00, 4.06it/s]``
|
||||
|
||||
However, the progress is not smooth: it increments in steps, 1 step being
|
||||
1 file processed. The problem is that we do not just walk through files tree,
|
||||
|
@ -731,7 +730,8 @@ Below we implement this approach using a manually updated ``tqdm`` bar, where
|
|||
And here is the result: a much smoother progress bar with meaningful
|
||||
predicted time and statistics:
|
||||
|
||||
47%|████████████\ \| 152K/321K [00:03<00:03, 46.2KB/s]
|
||||
``47%|████████████ | 152K/321K [00:03<00:03, 46.2KB/s]``
|
||||
|
||||
|
||||
|
||||
Contributions
|
||||
|
|
Loading…
Reference in New Issue