In the middle of the desert you can say anything you want
Object-Detection-Metrics/_init_paths.py at master · rafaelpadilla/Object-Detection-Metrics doesn’t use a main function in the files it runs, but has this neat snippet to add the library to PATH. TODO - at which point does this file get run and using what mechanism?
Add :undo –window by toofar · Pull Request #4807 · qutebrowser/qutebrowser adds this ability, mapped to U
by default. Works for windows!
In general with autosave set, if I’m disciplined enough to close it with :quit
or something mapped to it, it should reopen all of them.
So, again:
Adding the files to /etc/cron.hourly
/daily/weekly/… makes them executed at least once a X. Better than standard way for instances where the computer can be turned off during the planned time, and then it won’t execute - the way above makes sure it will.
Miller (mlr
) is a tool for doing stuff to csvs like jq is for jsqn: Quick examples — Miller 5.10.2 documentation
cocoapi/pycocoDemo.ipynb at master · cocodataset/cocoapi has a nice example of a use case that’s not printlns:
dataDir='..'
dataType='val2017'
annFile='{}/annotations/instances_{}.json'.format(dataDir,dataType)
Nothing was working, neither tqdm nor atpbar, till I used “emulate terminal” in the running config. As soon as I did all bars started working!
Nested loops - for tqdm, nothing needed except just calling it twice. The inner loop, tqdm(iterator, leave=False)
removes the 100% completed inner bar and restarts from 0, so only two bars are seen at the same time.
atpbar (alphatwirl/atpbar: Progress bars for threading and multiprocessing tasks on terminal and Jupyter Notebook) is basically like tqdm. Can’t find an option similar to leave=True
(though didn’t look), and output looks juuust a bit nicer than vanilla tqdm.
Since speedtest-cli is dead, this is an option that works:
curl -o /dev/null http://speedtest-blr1.digitalocean.com/100mb.test
vim -u NONE
. vim -u filenaem
reads only that filename as .vimrc
, NONE
is a key to not use anything.
Finally decided to undertand this part: Vim documentation: pattern
\m
is magic, \M
is nomagic. \m
/magic is the default.\v
is verymagic, \V
is very nomagicHandy table from the documentation:
Examples:
after: \v \m \M \V matches
'magic' 'nomagic'
$ $ $ \$ matches end-of-line
. . \. \. matches any character
* * \* \* any number of the previous atom
() \(\) \(\) \(\) grouping into an atom
| \| \| \| separating alternatives
\a \a \a \a alphabetic character
\\ \\ \\ \\ literal backslash
\. \. . . literal dot
\{ { { { literal '{'
a a a a literal 'a'
Practically:
\v
/verymagic - almost everything has a special meaning (numbers, letters and _
are the only ones parsed as-is)\V
/verynomagic - almost nothing has a special meaning, everything interpreted as-is EXCEPT \
A Vim Guide for Adept Users has these nice tips that I’ll stick to:
My advice in this madness: remember that very magic will allow you to use every regex metacharacter without escaping them, and that very nomagic oblige you to escape these metacharacters to use them.
and
I propose this simple rule:
- When you need a regex, use “very magic” by adding \v before your pattern.
- When you don’t need a regex, use “very nomagic” by adding \V before your pattern.
It also has this nice list:
\s or [:blank:] - whitespace characters.
[A-Z] or \u or [:upper:] - Uppercase.
[a-z] or \l or [:lower:] - Lowercase.
[0-9] or \d or [:digit:] - Digits.
\_ - Character class with end of line included.
pkill aw-
kills all processes whose name starts with aw-
!
rsync.net is a nice no-nonsense offering. They have special prices for borg backups: Cloud Storage for Offsite Backups - borg support
Blog post about setting it up: Remote Backups with Borg | The Cucurbit Developer
rsync.net itself has nice documetation about a lot of stuff: rsync.net Cloud Storage for Offsite Backups
:fill
works not just for moving stuff, but also tracking!
If I tracked A from 11:00 to 11:23 and now it’s 11:30, I can do timew track 2min B :fill
- it will create B
from the end of the previous one until now, so 11:24 - 11:30.
<C-R>
gets vi-mode into search mode, after returning to Normal mode n
/N
work just as expected to do a case-insensitive search of similar things in history
How to Change Your Default Google Account on Mac or PC says that the first one I log into will be the default one.
Webmin is cool and allows to move iptables rules!