15.6. getopt — C-style parser for command line options — Python 2.7.16 documentation, especially the part
optlist, args = getopt.getopt(args, 'abc:d:') – the options with a colon following need to have a value. Otherwise GetOptError will be raised.
Counter is much faster than count() in cases when you need to count multiple objects – you don’t have to iterate once for each object.
Jupyter notebook tqdm
from tqdm import tqdm_notebook as tqdm instead of usual vanilla tqdm.
vimdiff file1 file2 opens a nice vim session with two buffers.
]c jump back and forward between changes. (See http://vimcasts.org/episodes/comparing-buffers-with-vimdiff/)
Switch splits’ position in vim
<C-w> <C-r> just rotates all the splits, and
<C-w> x to switch the current window with the next one. (split - Swap the position of two windows - Vi and Vim Stack Exchange)