In the middle of the desert you can say anything you want
Analyzing this DTB would make for an interesting blog post, especially by plotting the frequency of words in the headers, length, time of the day they were created. Same goes for the link wiki. Same goes for list of URLs and graphing the number of them returning 404s or similar.
I also want to create better Python scripts that join everything to the master file (Master file | Diensttagebuch) with better formated dates.
This definitely goes into anki: Rsync – To Slash or Not To Slash? – Rants & Raves – The Blog!
Without a slash on the source directory means copy both the source directory, and the contents (recursively if specified) to the destination directory while adding a trailing slash means only copy the contents of the source directory, recursively if specified, to the destination. Without a slash on the source directory means copy both the source directory, and the contents (recursively if specified) to the destination directory while adding a trailing slash means only copy the contents of the source directory, recursively if specified, to the destination.
TL;DR: #anki
The difference between /target/source/source_content
and /target/source_content
.
Usually I want slash.
To memorize, the slash represents the contents of the directory in some way.
Also nice handy command tree
that I didn’t know I needed.
On the topic of the things I keep forgetting:
grep -v excludeme
, mnemonic might be reVerse
? #anki
rsync -ra --info=progress2 source target
#anki
Usually this is what I want, otherwise there’s pv
that I could never get to work reliably
Хештег - Як перекладається слово Хештег українською - Словотвір
З огляду на технічну складову питання додам коротке обґрунтування назви “кришмітка”. Слово hash-tag отримало таку назву не просто із-за символа “решітка”, причиною використання цього символа є скорочення написання слова hash-tag, коріння якого по своїй суті заходить глибоко в науку про компьютери. Розробники використовють слово hash як скорочення слова dictionary (словничок) що є спеціальною структурою даних котра пришвидшує пошук. Hash-tag або “#tag” з технічної точки зору означає те що слово “tag” проіндексується (потрапить у індекс або іншими словами словничок) і надалі буде доступне для швидкого пошуку. Тепер про саме слово hash, у тій же компьютерній науці існує багато стуктур даних здатних виконувати роль словничка. Hash-словнички особливі тим що використовують спеціальну hash-функцію, котра дозволяє отримувати інформацію із найменшою кількістю дій над словничком (аналогія дії - перелистування сторінок словника, що є вкрай повільним). Hash-фунція на основі вхідної послідовності символів (текста чи слова) підраховує число. Якісна hash-функція буде генерувати числа особливим чином, якщо в тексті замінити бодай одну літеру число має змінитися кардинально, але визначальним є те що якщо на вхід подавати одну і ту ж саму послідовність число має залишитися незмінним. Таким чином після того як ваша послідовність символів потрапила у словничок, вам не потрібно гортати його сторінки для того щоб знайти необхідний ключ, ви підраховуєте хеш-функцію яка вам повертає номер сторінки де має знаходитись слово. Hash-функція отримала таку назву із-за дій що вона виконує над вхідними данними всередині себе. Фактично вона “кришить”, “рубає”, “перемішує”, “заплутує” вхідні данні, що відповідає англійському перекладу слова hash. Тобто логічним було б перекласти слово хеш у цьому контексті як “криш” або “міш”. Переклад слова “tag” вже здійснений, і це “мітка”, поєднавши ці варіанти отримаємо “кришмітка” що в одночас володіє певною милозвучністю.
“Кришітка” є спрощеним варіантом новотвору “кришмітка”, запропонованого Денисом Яремовим. Але має кілька суттєвих переваг: 1) Милозвучніше; 2) Відповідає етимології (криш-мітка); 3) І до того ж співзвучне з назвою самого символу # - “решітка”.
Знову захотілося писати Соломку українською мовою, просто щоб мати змогу використовувати слово “кришітка” :)
Removed the dependency from $SPRINT
by simplifying basically everything in .zshrc
:
s () {task s sprint.is:$(date +%-V) or sprint:c $*}
A mostly-complete example:
youtube-dl --yes-playlist --cookies ~/D/cookies.txt --playlist-end 100 --playlist-start 18 --write-description --write-info-json --all-subs -o '%(playlist_index)s - %(title)s.%(ext)s' --user-agent "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.9.5 Chrome/56.0.2924.122 Safari/537.36" --min-sleep-interval 0 --max-sleep-interval 20 -i https://www.youtube.com/playlist\?list\=$MYPLAYLIST
-i
is for skipping errors (“ERROR: 1Jlvi4qTiyE: YouTube said: This video contains content from DisneyEnterprisesInc, who has blocked it on copyright grounds.”)
I could not get --user
to work, because I got error 400, but --cookies
works. qutebrowser’s cookies are not in the right format (but are located at ~/.local/share/qutebrowser/cookies
and nicely readable), and firefox’s cookies can be downloaded using cookies.txt – Get this Extension for 🦊 Firefox (en-US).
Out of 2279 videos, 1995 were available, that would mean 87.5%. Makes me a bit anxious about the links on my links wiki :) I should do some datahoarding/archiving there too.
And another interesting thing - the random quotes from my file usually are not easy to google, and the only result is my blog post with them (Private: ~/notes/quotes; ~/notes/phrases | Я сам, соломка, чай.)
Everything as-is, sadly I don’t have sources for everything, but should be pretty easy to google.
Ha.
kibble is store-bought dry (mostly) cat food. To kibble = ’to coarsely grind’. Found on Peter Watts’ The Kibble Fund
TIL DDG doesn’t allow me to search for exact matches in quotes, which I find absolutely idiotic. Yandex works, Google works. The usual “I want to like ddg but I honestly can’t”
/g/ - Let’s collect here programming books that are unusual in some sense, be it their approach, presentation, or simply just quality. “The little schemer” has a nice dialog-like structure, and I find this very interesting. I wonder if there are any other similar books (or threads).
Take care editing bash scripts
Well, after the 30 seconds elapses, the running script deletes all of my files. This happens because bash reads the content of the script in chunks as it executes, tracking where it’s up to with a byte offset. When I delete one character from the sleep line, the “next command” offset points at the r in #rm instead of the #. From the interpreter’s point of view, the # shifts backwards onto the previous line so it runs the unfortunate command.
javascript:(function(){(function () {var i, elements = document.querySelectorAll('body *');for (i = 0; i < elements.length; i++) {if (getComputedStyle(elements[i]).position === 'fixed') {elements[i].parentNode.removeChild(elements[i]);}}})();document.querySelector('body').style.setProperty('overflow','auto','important'); document.querySelector('html').style.setProperty('overflow','auto','important');})()
, found in One of my favorite bookmarklets to remove cookie notifications or other obnoxiou… | Hacker News
To run it as bookmarklet in qutebrowser, jseval
works:
:jseval (function(){(function () {var i, elements = document.querySelectorAll('body *');for (i = 0; i < elements.length; i++) {if (getComputedStyle(elements[i]).position === 'fixed') {elements[i].parentNode.removeChild(elements[i]);}}})();document.querySelector('body').style.setProperty('overflow','auto','important'); document.querySelector('html').style.setProperty('overflow','auto','important');})()
Now bound to ,b
:
config.bind(",b", ":seval (function(){(function () {var i, elements = document.querySelectorAll('body *');for (i = 0; i < elements.length; i++) {if (getComputedStyle(elements[i]).position === 'fixed') {elements[i].parentNode.removeChild(elements[i]);}}})();document.querySelector('body').style.setProperty('overflow','auto','important'); document.querySelector('html').style.setProperty('overflow','auto','important');})()")
And as a bonus, ,w
now takes me to the wayback machine for that page:
config.bind(",w", ":jseval javascript:location.href='https://web.archive.org/web/*/'+location.href")
:bind
opens a page with all the bindings as currently configured. This answered a lot of my quesions, especially about the caret mode bindings that are not documented anywhere I could find.
What’s interesting is the Ctrl-e
in Insert mode that opens the editor (I usually did Esc+e
)
TODO: Add links to categories in my blog, they might be useful for example for Pentachronological #0015 Праздник | Я сам, соломка, чай.. And in general maybe look into the blog itself - maybe I want to unite it with Diensttagebuch or something?
{%raw%}![ddr](/wp-content/static/pentachronological/d2.jpg){:width="40%"}{%endraw%}
If you really want to make something good, eat good food and drink good saki. (Welcome to the NHK, episode 20.) 1
A tv drama has a progressive plot, an emotional climax and a resolution, but our lives aren’t like that… all we get day after day are vague anxieties that are never resolved. 2
questo è uno di quegli anime che fanno morire una piccola parte di te, passi 1-2 giorni ripensando a ciò che hai visto malinconico. Al 3 giorno pensi un’ultima volta a ciò che ti ha trasmesso, sorridi e il vuoto che ti ha dato si riempie di fiori dandoti molto di più da ciò che ti aspettavi. 3
And on the topic of fully enlightened people:
tabulate
works surprisingly well to make random tables:
>>> x = tabulate.tabulate([['WHAT','Will happen','Will not happen'],['If I do this','',''],['If I don\'t do this','','']],tablefmt='grid')
>>> print(x)
+--------------------+-------------+-----------------+
| WHAT | Will happen | Will not happen |
+--------------------+-------------+-----------------+
| If I do this | | |
+--------------------+-------------+-----------------+
| If I don't do this | | |
+--------------------+-------------+-----------------+
>>>
(wow?) debellare - Wiktionary - sconfiggere/eliminare. 3
Welcome To The NHK 20 English Dub - YouTube, even though anime on Youtube is one of the more ephemeral things. ↩︎
Welcome to the NHK - Ep. 24 - Welcome to the N.H.K.! - END - YouTube ↩︎ ↩︎
microscopic handle nodes - Beyond the Basics - Inkscape Forum
Confusingly, that setting is in Preferences > Input/Output > Input Devices.
Krita’s slowness can be fixed by looking at the settings of Display and looking through Krita FAQ — Krita Manual version 4.3.0.
Except by clicking on them, f
gives numbers you can follow;F
outputs the link text in the statusbar.
The Anki::Import documentation doesn’t make it clear enough, but using a quote('
) works too for carrying on old tags along with the usual backtick, but for signalling an empty field only the backtick works.
Also I don’t think I can control the Cloze deletions - it automatically generates identifiers for them. Not going to get into perl to fix this :)
Vim Regular Expressions 101 is a really nice reference for vim’s search/replace/regex things. Maybe I’ll work through it later.
Most interesting is that groups are created with \(
-\)
and mentioned as \1
(will be handy for search-and-replace!)
I miss having a “now learning” textfile. (TODO)
Also this is a nice summary of the differences between vim and python/perl regexes, in vim characters are more likely to be literally interpreted: 1
Perl Vim Explanation
---------------------------
x? x\= Match 0 or 1 of x
x+ x\+ Match 1 or more of x
(xyz) \(xyz\) Use brackets to group matches
x{n,m} x\{n,m} Match n to m of x
x*? x\{-} Match 0 or 1 of x, non-greedy
x+? x\{-1,} Match 1 or more of x, non-greedy
\b \< \> Word boundaries
$n \n Backreferences for previously grouped matches
And regex101.com remains the best place to test usual regexes.
I’ve been looking for something simpler than GIMP for casual blurring / cropping / adding text, pinta
mostly fits the bill but I find it hard to use and no easy blur brush, gthumb is much more minimalistic in functions but is more pleasant to use.
Zsh has global aliases!
An Introduction to the Z Shell - Aliasing is awesome.
alias -g M='| more'
-> who M
This has a lot of potential for often-typed parts of commands.
But I went there to look for arguments, and apparently zsh explicitly doesn’t have them and wants functions instead. So:
% rm () { mv $* /tmp/wastebasket }
% rm foo.dvi
% ls /tmp/wastebasket
foo.dvi
So I changed my taskwarrior s
alias to:
#alias s='task s sprint.is:$SPRINT or sprint:c'
s () {task s sprint.is:$SPRINT or sprint:c $*}
Now I can finally filter my tasks for the sprint (s +F
)
// TODO replace dependence on $SPRINT by just usind current week number.
Not the first time I neglect to read the documentation of the software I switch to, being happy that it mostly works like the previous one.
The Technium: 68 Bits of Unsolicited Advice
My favourite parts:
Very nice tool: amitsaha/gitbackup: Tool to backup your GitHub and GitLab repositories
The Github token needed only the repo
scope, needed to add it to the env variable with:
export GITHUB_TOKEN=$MYGITHUBTOKEN
Command to backup was:
./gitbackup-0.5-linux-amd64 -backupdir $BACKUPDIR -service github
Should also work for gitlab.
Also magically it took something like 30 seconds for the all of the 3.5GB of all my repos.
lutschen / an etwDat. lutschen - to suck (on) sth; Lutschtablette = lozenge.
lozenge: 1) A rhombus (shape); 2) A small (originall diamond-shaped!) tablet/sweet for a sore throat.
Agnes Obel - Fuel To Fire (Official Video) - YouTube
First comment on the video:
All the people in this video are dead. Life is short, don’t do anything that makes you unhappy
I can’t believe I have to say this, but please don’t drink bleach.
— Joe Biden (@JoeBiden) April 24, 2020
We live in interesting times.
shambolic - Chaotic, disorganised or mismanaged. Found somewhere on The Guardian applied to Trump’s daily health briefings.
A !
either forces the action or toggles the action:
:set cursorline
, to turn off: :set nocursorline
Is equivalent to:
:set cursorline!
1
tabulate
2 generates nice tables of various formats! Things like:
print(tabulate.tabulate(db,headers=db.columns))
epoch loss val_loss val f-score
-- ------- ------ ---------- -------------
0 1 4.31 4.62 0.579
1 2 3.72 3.61 0.705
2 3 3.54 3.25 0.722
3 4 3.31 3.06 0.737
4 5 3.19 2.93 0.736
5 1 4.31 4.62 0.581
6 2 3.72 3.61 0.72
7 3 3.54 3.25 0.755
8 4 3.31 3.06 0.755
9 5 3.19 2.93 0.764
10 6 3.12 2.83 0.798
11 7 2.95 2.76 0.779
12 8 2.91 2.69 0.757
13 9 2.84 2.64 0.816
14 10 2.68 2.63 0.835
15 11 2.71 2.56 0.83
16 12 2.69 2.52 0.825
17 13 2.62 2.49 0.826
18 14 2.6 2.46 0.845
19 15 2.56 2.44 0.84
tabulate · PyPI is the basic documentation with visualizations of each tablefmt
. It even supports jira
! And pipe
is the usual markdown format. Let’s try:
epoch | loss | val_loss | val f-score | |
---|---|---|---|---|
0 | 1 | 4.31 | 4.62 | 0.579 |
1 | 2 | 3.72 | 3.61 | 0.705 |
2 | 3 | 3.54 | 3.25 | 0.722 |
3 | 4 | 3.31 | 3.06 | 0.737 |
4 | 5 | 3.19 | 2.93 | 0.736 |
5 | 1 | 4.31 | 4.62 | 0.581 |
6 | 2 | 3.72 | 3.61 | 0.72 |
7 | 3 | 3.54 | 3.25 | 0.755 |
8 | 4 | 3.31 | 3.06 | 0.755 |
9 | 5 | 3.19 | 2.93 | 0.764 |
10 | 6 | 3.12 | 2.83 | 0.798 |
11 | 7 | 2.95 | 2.76 | 0.779 |
12 | 8 | 2.91 | 2.69 | 0.757 |
13 | 9 | 2.84 | 2.64 | 0.816 |
14 | 10 | 2.68 | 2.63 | 0.835 |
15 | 11 | 2.71 | 2.56 | 0.83 |
16 | 12 | 2.69 | 2.52 | 0.825 |
17 | 13 | 2.62 | 2.49 | 0.826 |
18 | 14 | 2.6 | 2.46 | 0.845 |
19 | 15 | 2.56 | 2.44 | 0.84 |
How does Tensorflow train stuff when loss is nan
? It keeps doing something, accuracy changes, etc etc etc. - is the gradient calculated per batch as normal,
Einstein / Netzah “do your own thing”