minor typos

This commit is contained in:
Casper da Costa-Luis 2020-09-13 00:59:28 +01:00
parent 6daa7015be
commit 3f7e8e9642
No known key found for this signature in database
GPG Key ID: 986B408043AE090D
2 changed files with 14 additions and 14 deletions

View File

@ -215,7 +215,7 @@ Perhaps the most wonderful use of ``tqdm`` is in a script or on the command
line. Simply inserting ``tqdm`` (or ``python -m tqdm``) between pipes will pass
through all ``stdin`` to ``stdout`` while printing progress to ``stderr``.
The example below demonstrated counting the number of lines in all Python files
The example below demonstrate counting the number of lines in all Python files
in the current directory, with timing information included.
.. code:: sh
@ -247,7 +247,7 @@ Backing up a large directory?
.. code:: sh
tar -zcf - docs/ | tqdm --bytes --total `du -sb docs/ | cut -f1` \
$ tar -zcf - docs/ | tqdm --bytes --total `du -sb docs/ | cut -f1` \
> backup.tgz
44%|██████████████▊ | 153M/352M [00:14<00:18, 11.0MB/s]
@ -255,8 +255,8 @@ This can be beautified further:
.. code:: sh
BYTES="$(du -sb docs/ | cut -f1)"
tar -cf - docs/ \
$ BYTES="$(du -sb docs/ | cut -f1)"
$ tar -cf - docs/ \
| tqdm --bytes --total "$BYTES" --desc Processing | gzip \
| tqdm --bytes --total "$BYTES" --desc Compressed --position 1 \
> ~/backup.tgz
@ -267,7 +267,7 @@ Or done on a file level using 7-zip:
.. code:: sh
7z a -bd -r backup.7z docs/ | grep Compressing \
$ 7z a -bd -r backup.7z docs/ | grep Compressing \
| tqdm --total $(find docs/ -type f | wc -l) --unit files \
| grep -v Compressing
100%|██████████████████████████▉| 15327/15327 [01:00<00:00, 712.96files/s]
@ -277,9 +277,9 @@ benefit from ``tqdm``'s ``--update`` and ``--update_to`` flags:
.. code:: sh
seq 3 0.1 5 | tqdm --total 5 --update_to --null
$ seq 3 0.1 5 | tqdm --total 5 --update_to --null
100%|████████████████████████████████████| 5.0/5 [00:00<00:00, 9673.21it/s]
seq 10 | tqdm --update --null # 1 + 2 + ... + 10 = 55 iterations
$ seq 10 | tqdm --update --null # 1 + 2 + ... + 10 = 55 iterations
55it [00:00, 90006.52it/s]
FAQ and Known Issues

View File

@ -215,7 +215,7 @@ Perhaps the most wonderful use of ``tqdm`` is in a script or on the command
line. Simply inserting ``tqdm`` (or ``python -m tqdm``) between pipes will pass
through all ``stdin`` to ``stdout`` while printing progress to ``stderr``.
The example below demonstrated counting the number of lines in all Python files
The example below demonstrate counting the number of lines in all Python files
in the current directory, with timing information included.
.. code:: sh
@ -247,7 +247,7 @@ Backing up a large directory?
.. code:: sh
tar -zcf - docs/ | tqdm --bytes --total `du -sb docs/ | cut -f1` \
$ tar -zcf - docs/ | tqdm --bytes --total `du -sb docs/ | cut -f1` \
> backup.tgz
44%|██████████████▊ | 153M/352M [00:14<00:18, 11.0MB/s]
@ -255,8 +255,8 @@ This can be beautified further:
.. code:: sh
BYTES="$(du -sb docs/ | cut -f1)"
tar -cf - docs/ \
$ BYTES="$(du -sb docs/ | cut -f1)"
$ tar -cf - docs/ \
| tqdm --bytes --total "$BYTES" --desc Processing | gzip \
| tqdm --bytes --total "$BYTES" --desc Compressed --position 1 \
> ~/backup.tgz
@ -267,7 +267,7 @@ Or done on a file level using 7-zip:
.. code:: sh
7z a -bd -r backup.7z docs/ | grep Compressing \
$ 7z a -bd -r backup.7z docs/ | grep Compressing \
| tqdm --total $(find docs/ -type f | wc -l) --unit files \
| grep -v Compressing
100%|██████████████████████████▉| 15327/15327 [01:00<00:00, 712.96files/s]
@ -277,9 +277,9 @@ benefit from ``tqdm``'s ``--update`` and ``--update_to`` flags:
.. code:: sh
seq 3 0.1 5 | tqdm --total 5 --update_to --null
$ seq 3 0.1 5 | tqdm --total 5 --update_to --null
100%|████████████████████████████████████| 5.0/5 [00:00<00:00, 9673.21it/s]
seq 10 | tqdm --update --null # 1 + 2 + ... + 10 = 55 iterations
$ seq 10 | tqdm --update --null # 1 + 2 + ... + 10 = 55 iterations
55it [00:00, 90006.52it/s]
FAQ and Known Issues