## title: “Welcome to Jekyll!”

You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve, which launches a web server and auto-regenerates your site when a file is updated.

To add new posts, simply add a file in the _posts directory that follows the convention YYYY-MM-DD-name-of-post.ext and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.

Jekyll also offers powerful support for code snippets:

Check out the Jekyll docs for more info on how to get the most out of Jekyll. File all bugs/feature requests at Jekyll’s GitHub repo. If you have questions, you can ask them on Jekyll Talk.

Well, first of all, today I installed Jekyll and started writing this DTB :) I’ll be using the minimal vanilla theme, I don’t think I’ll need much more. This will be backed up in github, and in general I think it’s a win/win thing on all possible fronts.

Also today I’ll be reinstalling my Arch Linux, from a working arch Linux installation. I’ll be documenting here the process so I won’t have to google it for the third time later.

I’ll also (finally!) fix the following:

• fix all my configs so that they are optimal and readable
• especially the vim and i3 configs!
• better keyboard layout with explicit ru/ua thing to make my life easier.
• make the zsh statusbar count my taskwarrior todos by better tags. I’m currently using this excellent approach.

As I’m also learning Markdown, I’ll be using this as a reference.

## Installing Arch from an existing installation

I needed to install arch-install-scripts; after this I mounted the filesystems and followed the Arch wiki pacstrap gethsemane_root base base-devel

After that, just the wiki without too many changes.

That was harder than expected. Sadly couldn’t document it as I was doing it.

Audio – install pulse, use it as a default device, otherwise ALSA will have problems playing sounds at the same time. Additionally, devices are hard. HDMI seems to be my new default device, changed that in /etc/asound.conf. I’m not even sure what exactly of what I did helped at this point, sadly.

• Moved i3 configs to .i3/
• Needed to install gvim so that I’d have access to the system clipboard from vim.
• Needed to add $HOME/.gem/ruby/2.5.0/bin' to my $PATH in .zsh

Telegram adds a .desktop file after the first run based on where it is, so I had to change ~/.local/share/applications/telegramdesktop.desktop the lines TryExec and Exec.

## Anki

Ankiweb extension: for Anki, AnkiConnect is needed, code 2055492159 + restart. It also seems to have it’s files not in .config like normal people, but .local/share/Anki[2]; copying them didn’t help to save the profiles. Ankiweb sync did.

Today at the beginning I set mediawiki up, another one, and talked to M re everything connected with it. Now I’m doing my internship report.

For this I had to install latex, the package is texlive-most, which amongst other things contains xelatex.

### Mimetypes

Install perl-file-mimeinfo. After this, I could change the program to use as mimetype what.pdf.

### Tmux

I’m learning to use tmux, just because why not. I hear it’s better than screen. (And lighter than my current solution of multiple terminator instances.).

Best and greates tmux.conf

<C-b> d from inside tmux to detact the current session; tmux attach-session -t tb for attaching the session tb, also works with numbers. Can be tab-completed.

### Urxvt

Middle mouse button for pasting from primary, Ctrl+Meta(Alt?)+C/V for copypasting from clipboard. Uses .Xresources for config, and I’m using this one, it’s perfect.

### Jekyll

Added a Categories page, using this guide.

### Zsh prompt

Added the mod system from my calendar to my prompt, so I can see if the day divides cleanly by 3 5 10.

which gives me a prompt like: 2 [1] !!! sh•~/hs/dt» first number is the sprint number, in square brackets are the mod bits, then number of unfinished taskwarrior tasks.

Used this bash conditionals primer as reference.

## Quotes

Don’t plant at tree, plant an orchard. Source

## Food

Made humus, following this basically recipe:https://www.bodybuilding.com/recipes/traditional-hummus. Next comes either bodybilder’s hummus or pesto hummus.

## Drawing

Colored one page of my calendar and made one simple lineart drawing. The time has come to learn to add pictures to Jekyll. For reference: ![Hummus](https://pchr8.net/d/dtb/assets/pics/hummus.jpg)

. . .

Using this guide:

git config --global credential.helper cache
git config --global credential.helper 'cache --timeout=3600

Researched viability of it all, and got the impression that it doesn’t really make sense for me to get into it and that there are better ways to spend my time. Keep looking for ideas for other (but similar!) places where I can apply some of the approaches.

• would it make sense to focus on individual stocks that can be directly connected to something external, that can both be analyzed?
• can I find some more or less periodical stocs?
• Can I find stocks which more-or-less correlate with something external and easy to analyse?

## Quotes

Fish don’t know they are in water

### Keyboard layout

Realized that my Pchr8board layout uses only left alt as mod key, right alt stays as Alt and can be used for typical nice Alt-things like switching windows in tmux. TODO – still need to fix the tick. Or in the ideal world actually have one clean layout for two hands, one clean for one hand, separate Russian/Ukrainian ones and some kind of indicator, like the old one I wrote and forgot about.

### Praktikumsbericht

Mostly writing my internship report.

### Vim

To reload the .vimrc when you’re editing it, :so %.

#### Vocab

Staff meeting = Belegschaftversammlung
Data cleansing -> Datenbereinigung
Electric meter -> Stromzähler (m u. pl.)\ Пёстрый –> Zusammengewürfelt\ Die Einrichtung –> Institution, estabilishment\

#### Latex

Checkmark as per SO

Kept working on my internship report.

## Latex

for the % symbol: \% To use a simplier citation style, \bibliographystyle{unsrt}. For this I had to remove the package apacite. For using urls with underscores in Bibtex: \usepackage{hyperref}, and then howpublished = {\url{https://scikit-learn.org/stable/modules/outlier_detection.html}} for some reason worked for me, even though it shouldn’t have.

## German

Die Prognose
How I divided them between X und Y –> Wie ich die zwischen X und Y aufteilte.
Abweichungswerte – deviation values

Kept working on my internship report, hopefully I’ll finish it today. % Also tried to clean up the code for the algotrading thingy to make it use much more pandas.

### Latex

Comment in bibtex: no easy and compatible way to do it. (see this).
Page numbering:

To insert a tilde (~): \textasciitilde

And in general:

• Build the needed liquidity
• At the same time start slowly investing into stocks

In general, for less actionable steps:

• Look into diversifying income

In february maximally stick to a budget and learn finances.

## Resume

Added the new experience I forgot to add; very glad I could keep it still one page long.

TODO: Possibly change the template to make it less hack-y.

## Scratchbox/stack

• T P.HP Find something to do with the Scratchbox at the end of each day? All three of them
• T h.it Add my vim spellcheck files with my custom words also to my dotfiles repo.
• add aliases for zsh and basic taskwarrior tasks. t 123 start -> tws 123

## Latex

\& istead of &, like with \%.

## German

Again spellchecking everything, later will anki-fy this.

• Abschlüss -> Abschluss
• Nationale Technische Universität „Kiewer Polytechnisches Institut Ihor Sikorskyj“
• interdisziplinär

## PDF

Pdfunite is part of poppler. pdfunite in-1.pdf in-2.pdf in-n.pdf out.pdf

## Vim

Decided to map my insert mode things to +whatever, started with this suboptimal way to insert the date: imap d :put =strftime('%c')kJA

## Python

For progress bars:

## Productivity

A match made in heaven. http://www.infinitelooper.com/ is my new favourite website.

## Zsh

Added alias for anki-vim as av.

Added never-ending tasks like cleaning as the first numbers, so I can still track the time. To give them ids 1 and 2 etc., I moved them to the top of ~/.task/pending.data. I might consider making a patch so that it’s less of ahack? Or – even better – just scripts that interface with timewarrior with taskwarrior out of the picture completely?

## Jupyter/markdown

• Bulletpoints are one asterisk
• sub-bullet-points are +

## Scratchbox/stack

• I should make a better way to track repetitive tasks like cleaning with timewarrior. A bash script, prolly? Like track cl or sth similar.
• Create a day when I go through the scratchbox and paste it somewhere - let’s make it to a particular page on this DTB, and let’s make it wednesday.
• but ideally recheck it once a day
• Add to my statusline on the big screen the output of timew for th ecurrent “Tracking”.
• DONE
• Add a zsh command to make it easier to create new Jekyll posts, with correctly formatted name and content. I’m surprised that I have not found anything similar, it’s prolly there, but I haven’t looked enough.
• DONE!
• Fix dates in all posts – the ones inside the header, not the name
• DONE!
• add tags for not-work and deep-work to Taskwarrior, to better track time for clean work and various cleaning/social/lunch/whatever stuff.
• Calendar – add the symbols in a maximally configurable way instead of directly into tikz-kalender.cls
• DONE ?
• How does \ifdate work inside tikz calendar, it’s like a globally defined command? Interesting I didn’t get that before.

## German

• die Zahnbürste

## Sport

I will be doing the Stronglifts 5x5 program in February! Should also read this. And follow the drink a lot of milk calorie gain thing.

## Timewarrior

• For tasks with parentheses, they need to be escaped $$like this$$, so that they don’t conflict with zsh.
• Speaking of which, what do they conflict with?
• I should finally remember that it’s shorten @1 20min for timew, and 20m for utimer. I think it’d be easier to fix utimer than timew – I need to make them identical either way. I guess hypothetical TODO for later.

## Scratchbox/stack

• I should learn the names of the German letters: https://de.wikipedia.org/wiki/Deutsches_Alphabet#Benennung_der_Buchstaben.
• Learn bash/zsh parentheses – what do they do exactly.
• I could make a specific i3wm-config for when I want to do Deep Work in Cal Newport’s meaning of the word? With different background and only two workspaces or something like this. Bonus points if I can switch to it dynamically.
• T add the dynamic font size change perl addon to urxvt
• I should make two different kinds of Scratchboxes – the ones which are time-sensitive and ones that are not.
• And I should learn to ignore thoughts which are inconsequential and not with no chance to ever be acted on.
• Add to my timer the ability to do “tm 15:00” or something.

## Deutsch

• abseits ausgetretener Pfade – off the beaten track
• TODO Ankify this
• Not Synchronizität, Synchronität. (at least in Schaltungstechnik).

## Mediawiki

• [[File:File.jpg]] to use the full version of the file
• [[File:File.png|200px|thumb|left|alt text]] to use a 200 pixel wide rendition in a box in the left margin with “alt text” as description
• [[Media:File.ogg]] for directly linking to the file without displaying the file

copied directly from the Special:Upload page.

## Jekyll

If I make a post’s date in the future it will not appear until then? TODO research how does it work.

## Scratchbox/stack

• I need a way to finally organize all the things I finally want to (invest time to) learn. I seem to lose quite a lot. I need something more formal than my link wiki for this, I think. Or just change how I use it.
• Add to TW a planned-due field! As opposed to the real-deadline.
• Add to TW and create a system for some tasks for the year in the respective sprints, like change toothbrush every 3 month. Things with >1m periodicity.
• DONE
• And finally fix the public and private keys

## XKB Fun

Modified the default Russian layout to make it also Ukrainian at the same time:

Also in the file /usr/include/X11/keysymdef.h is the list of all possible keys to assign.

## Cooking

Couscous! Here is how to cook and ideas.

Also champignons in the oven.

## Scratchbox/stack

• More ideas for xkb fun:
• In vim, make nice shortcuts for usual things I use based on the mod/alt key or the Alt+F2
• DONE
• Why did the .html file extension survive better than .htm, but the same didn’t happen for .jpeg?

Today I’ll get my mechanical keyboard <3

## Deutsch

• Finally figure out bzw.

## Scratchbox/stack

• Should I find a way to synchronize all my stacks? TG+T+Jekyll+…
• Probably not
• Vim – add a way to delete things without it going to the y-regester
• "_d does this through the black hole register!

## Random / news

I discovered https://hckrnews.com/, its “top-10%” setting is awesome.

## Scratchbox/stack

• Finally learn English apostrophes
• It would also be interesting sometime later to analyze the words used in these entries

## Quotes

I feel like being obsessed with anything automatically makes it unattainable. It’s like the universe saying, “ you’re not behaving in a healthy way so you have not earned it being yours.” Its a handy way to keep myself in check. (Reddit.

## German

Finally figure out the Unterschied between the words Unterschied u. Unterschiedlichkeit From this German StackExchange answer:

• Anders
• Only word that works alone, without saying different from what
• Der Hund is anders; der andere Hund.
• Unterschiedlich
• An important but small attribute that makes things different that you want to accentuate:
• Wuffi und Kläffi sind unterschiedlich. Sie unterscheiden sich an den Ohren: Wuffi hat Stehohren, Kläffi hat Schlappohren.
• Verschieden
• Just different, without any specifics.
• Natürlich sind Kläffi und Törti verschieden! Es sind schließlich verschiedene Rassen!

Not from dict.cc, but from my intuition:

• die Unterschiedlichkeit – the difference in a more abstract meaning.
• der Unterschied – the difference – especially one in particular.

## Mechanical keyboards

Here are tips on how to improve ergonomics for better typing speed and comfort. TL;DR raise my wrists and lower my table/keyboard till I get a >90C angle.

## Typing

https://www.typingclub.com/sportal/program-3/328.play has a Dvorak layout!

## Scratchbox/stack

• it would be interesting to make a static structure for these entries. And then make a template for them, with the right name/date/…
• DONE! Made a script for this.

## Interesting stuff for later

Stenography! With plover and this tutorial. It’s what I was trying to do but much much better on so many levels. The world is a really fascinating place. Installed plover, I will definitely play with it later. “Steno Hero” also exists.

## Scratchbox/stack

• Why does Telegram open files in different programs than Telegram? Look again into xdg and the different mechanisms for this.
• I should try to make a Rührei sometime.
• And at this point I think I should remove the ‘purely technical’ part from the blog description, since until now there was more cooking than solved technical problems.
• DONE
• I should buy a garment steamer! Dampfglätter

## DNB and typing

• d3b 43% Thu 31 Jan 2019 08:36:05 AM CET
• d3b 36% Thu 31 Jan 2019 08:40:41 AM CET

• 87 WPM 97.2%
• 96 WPM 98.7%
• 101 WPM 98.5%

## Bash

Updated my timer script, now it outputs the time when the timer was set along with the reminder.

The dash after % removes them from the output: export SPRINT=$(date +%-U) Awesome. ### Rsync update behaviour rsync usually copies files if they are not on the target filesystem. The --update flag makes it check the timestamps, and overwrite if the target file is older than the source file. -c means also check the checksum. ### Rsync slash Trailing slash after the directory name copies the content of the directory, not the directory itself. Not consisten with mv, cp etc. ### Vnstat for traffic monitoring vnstat is the package and the service that needs to be enabled, and in /etc/vnstat.conf the default interface needs to be set. ### Mount by UUID to do this through mount, if for some reason I’ll need to do it manually: sudo mount UUID=%theUUID% /mnt/sth ## Taskwarrior and i3 A task gains an +ACTIVE tag if it’s started. I want to use it to get an output of the currently active task in my statusbar. t +ACTIVE | sed '4!d' gives the line with the currently active task. With sed I can get the needed column: I created a new report in taskwarrior because I did not want to think of columns. Then in the i3wrapper.py I added the following: It works! ### Bash and Taskwarrior – tasks with a periodicity Once every 12 sprints / 3 months brush, once a month backups, I’ll think what else: ## Vim Now I can look through this diary with Ag.vim and silver_searcher! :Ag is more than I could wish for. ## Stack • Add & / && to anki • Arch linux add traffic monitoring • DONE • Add currently “tracked” todo in taskwarrior to i3status • DONE ## Working on previous stacks Okay, this is going to be fun! ## To ankify ### German • Staff meeting = Belegschaftversammlung • Data cleansing -> Datenbereinigung • Electric meter -> Stromzähler (m u. pl.)\ • Пёстрый –> Zusammengewürfelt\ • Die Einrichtung –> Institution, estabilishment • Die Prognose • How I divided them between X und Y –> Wie ich die zwischen X und Y aufteilte. • Abweichungswerte – deviation valu • km^2 = Quadratmeter = km$^2
• Die Vergütung.
• Anomaly Detection - die Erkennung von Anomalien.
• verwenden
• 15 minute intervals -> 15-Minuten-Intervalls (auch “im Abständen von 15 Minuten”)
• Month rhythm -> Monat__s__rhythmus.
• basically -> im Gr__u__nde
• plöTZLich, EinflUss, drUck, grOßes, wöchiges, regelmäßig, DatenschUtz.
• reCHerCHiert, DiagraMM, Kategorie
• “und dann habe ich wieder von vorne angefangen”
• “fraghaft” existiert nicht, fragwürdig/flaglich
• Eingabedatei, not Eingangdatei
• Datei(f), Daten(pl)
• draft -> der Entwurf
• Abschlüss -> Abschluss
• Nationale Technische Universität „Kiewer Polytechnisches Institut Ihor Sikorskyj“
• interdisziplinär
• I should learn the names of the German letters: https://de.wikipedia.org/wiki/Deutsches_Alphabet#Benennung_der_Buchstaben.
• abseits ausgetretener Pfade – off the beaten track
• TODO Ankify this
• Not Synchronizität, Synchronität. (at least in Schaltungstechnik).
• Figure out bzw.
• From this German StackExchange answer:
• Anders
• Only word that works alone, without saying different from what
• Der Hund is anders; der andere Hund.
• Unterschiedlich
• An important but small attribute that makes things different that you want to accentuate:
• Wuffi und Kläffi sind unterschiedlich. Sie unterscheiden sich an den Ohren: Wuffi hat Stehohren, Kläffi hat Schlappohren.
• Verschieden
• Just different, without any specifics.
• Natürlich sind Kläffi und Törti verschieden! Es sind schließlich verschiedene Rassen!

Not from dict.cc, but from my intuition:

• die Unterschiedlichkeit – the difference in a more abstract meaning.
• der Unterschied – the difference – especially one in particular.
• der ZAhler — whoever pays. Der ZÄhler — counter.
• sich mit etw.(Dat) befassen: undertake/concert/deal/occupy/dabble in/with/whatever

### IT

for the % symbol: \% Add to Anki \wedge \vee and other latexy things I’ve used. \& istead of &, like with \%.

• _ is the black hole register in vim to delete stuff without yanking it
• Ankify import random and randInt(x, y)
• Here I learned about du. sudo du -h -d 1 shows the size of the directories in the folder (depth of one, human-readable).
• Vim newline when searching: in substitutions \r inserts a new line, \n inserts null. When searching \n matchesan end of line (newline)
• {} in German

### English

• Apostrophes rules!
• Sedition is overt conduct, such as speech and organization, that tends toward insurrection against the established order.

## Timewarrior

Apparently times and intervals are much more easy than I thought! I should actually read man pages sometime, instead of relying on tutorials.

Nice examples are, for example, w track 7min "something short" – which records something done the last X minutes including now, as a closed interval.

## Stack

• Python – memorize all different exception types!

## DNB

d3b 57% Mon 18 Feb 2019 10:38:29 AM CET
d3b 64% Mon 18 Feb 2019 10:40:15 AM CET
d3b 50% Mon 18 Feb 2019 10:41:48 AM CET
d3b 43% Mon 18 Feb 2019 10:43:54 AM CET
d3b 50% Mon 18 Feb 2019 10:49:25 AM CET
d3b 50% Mon 18 Feb 2019 10:51:01 AM CET
d3b 21% Mon 18 Feb 2019 10:52:45 AM CET
d3b 79% Mon 18 Feb 2019 10:54:51 AM CET


hidden: true

## DNB and Typing

d3b 71% Tue 19 Feb 2019 03:29:14 PM CET
d3b 57% Tue 19 Feb 2019 03:31:02 PM CET
d3b 43% Tue 19 Feb 2019 03:32:35 PM CET
d3b 64% tue 19 feb 2019 03:34:10 pm cet
d3b 43% tue 19 feb 2019 03:35:44 pm cet


## Done

Deleted VK account. Saw another Verteidigung. Backed up my Android. Finished a ton of small things that I was postponing for weeks.

## Backing up Android phone via ADB

Using this tutorial: adb backup -apk -shared -all -f backup-file.adb

To restore: adb restore backup-file.adb

## Ledger

-M gives monthly transactions.

## DNB and Typing

d3b 71% Thu 21 Feb 2019 10:40:21 AM CET
d3b 79% Thu 21 Feb 2019 10:41:57 AM CET
d3b 57% Thu 21 Feb 2019 10:43:33 AM CET
d3b 43% Thu 21 Feb 2019 10:45:08 AM CET
d3b 21% Thu 21 Feb 2019 10:46:44 AM CET
d3b 79% Thu 21 Feb 2019 10:53:03 AM CET
d3b 64% Thu 21 Feb 2019 10:54:41 AM CET
d3b 43% Thu 21 Feb 2019 10:56:15 AM CET
d3b 71% Thu 21 Feb 2019 10:57:47 AM CET
d3b 57% Thu 21 Feb 2019 10:59:25 AM CET


## Deutsch

• It’s säkular, not sekulär etc.
• Geöffnet, not geoffnet
• kümmert
• Brasilien
• hoche Spannungen – no umlaut
• begann
• The earlier we came -> je früher wir kamen
• Ein NN wird trainiert, nicht getraint. (Where did I get this word actually?)

## Linux exit codes

To check the exit code of a command you just ran, you need to output the special bash variable $?, so echo$? returns the exit code of the previous command.

I decided to make my sprint system a bit less stupid than it is now. I finally rewrote it using overrides.

In .zshrc, first I override the default sprint when adding tasks, then create command which shows my s report:

in .taskrc I modified the s report to look like this:

Now when I type s I get my current sprint todo, and when I add tasks they get added automatically to current sprint.

## i3lock-color

This is really nice, I had no idea a fork with more features existed! It doesn’t show my keyboard layout correctly, but otherwise it’s perfect. Will be using it from now on.

## Tmux resize-pane

You open the tmux command line with C-b :, and to resize a pane horizontally to an absolute size the command is :resize-pane -x %absolute size%.

## Vim-pekaboo and vim registers

Is a plugin which lets you preview the register contents before using one. Also you can paste stuff from registers in insert mode by pressing <c-R>.

## Stack

• I should actually spend 1h a day for thinking about business and passive income.
• Add a cron job to automagically move all undone tasks from the last sprint/week to the current one.
• Add all the German language I put together a couple of Days ago to Anki

## DNB and Typing

d3b 70% Mon 25 Feb 2019 12:16:05 PM CET
d3b 79% Mon 25 Feb 2019 12:17:50 PM CET
d3b 64% Mon 25 Feb 2019 12:19:26 PM CET
d3b 57% Mon 25 Feb 2019 12:21:00 PM CET
d3b 86% Mon 25 Feb 2019 12:22:34 PM CET
d3b 86% Mon 25 Feb 2019 12:24:38 PM CET
d3b 71% Mon 25 Feb 2019 12:27:23 PM CET
d3b 50% Mon 25 Feb 2019 12:28:57 PM CET


To exclude tasks of a certain project, the syntax for the filter is project.not:projectname.

Also added a new report for tasks which will never be finished – anki, cleaning, basic org etc., but that I still want to track with timewarrior. t m now returns me all such tasks.

## Vim searching at the beginning of line / that start with something

I find myself grepping through the dict.cc raw file, I might build a script to do that for me. But I often need to find a word with the condition that it’s the first thing on a line, instead as partof a bigger sentence.

^ helps. /^Dru gives me the lines which start with “Dru”.

## Ledger

Added a date format to my command line alias: alias le="ledger -f ~/p/f/l/ledger.txt --strict --date-format '%Y/%m/%d'" for my date formats.

Also to represent bought currencies, I think the way to do it is:

2019/02/25  Exchanged 100$for 74.81 at XXX Assets:Cash:Wallet E74.91 @$100
Assets:Cash:Fund:USD


## Stack

* It would be interesting to do an implementation of [this xkcd](https://xkcd.com/2112/) using data from Twitter with 'intensity' defined as 'more or less interaction that the norm for this user'


## Bash

I needed to copy all pictures from a folder to another place, while saving the paths and folder names. (from/one/two/three.jpg should become to/one/two/three.jpg)

The images were inside a number of different directories and doing it manually would’ve been hell.

Therefore, first I found all images and wrote their full path to a file: find . -type f -exec file {} \; | awk -F: '{ if ($2 ~/[Ii]mage|EPS/) print$1}' >> ~/allm  (I’m not pretending I understand the above line).

Then I wrote this basic script to create the folders and to copy the files inside them. This was much harder than expected, especially because of the spaces inside the filenames, which created problems at every step.

The final code was:

The IFS thing decides how should the elements of the file be split. By default it’s spaces and newlines, we needed to tell it to split only by newlines, explicitly.

The entire solution is quick and dirty (the “from_white_xxx” thing would be the first thing to refactor) but it works, no need for overengineering a quick one-time hack which I’ll prolly never need again.

## Keynav scrolling

Q: Can I use keynav to scroll?
A: Yes! X11 represents mouse scrolling as key presses, so you just add the relevant stanza to your keynavrc. Mouse buttons are 1=left, 2=middle, 3=right, 4=scroll-up, 5=scroll-down, 6=scroll-left, 7=scroll-right. So for example to scroll up with i and down with e:

i click 4,end
e click 5,end


## Stack

• Learn find, awk and other holy shell commands which I usually copypaste without actually taking time to learn the proper syntax
• Learn bash – again, formally.

## Arch linux thumbnails

The package is tumbler.

## Fixed my timers (Bash, redirects, >)

I had two problems with my timer system: that it doesn’t work when the files are empty (because of the split I did in the code), and the files that grew exponentially, because they did not get deleted at the end of the timer.

I am not sure why did the > in the timer command leave the previous file contents (I assume it’s some magic with terminals and ^M?), but I fixed it by adding : > outfile to the command at the beginning.

From this tutorial:


: > filename
# The > truncates file "filename" to zero length.
# If file not present, creates zero-length file (same effect as 'touch').
# The : serves as a dummy placeholder, producing no output.

> filename
# The > truncates file "filename" to zero length.
# If file not present, creates zero-length file (same effect as 'touch').
# (Same result as ": >", above, but this does not work with some shells.)


My zsh was apparently one of the shells where that doesn’t work, but the first one worked nicely. So the final line in .i3/config is:

The files-not-existing thing was fixed by an additional try/catch block. The final (still bad) code looks like this:

## Jekyll pagination fun

### Pagination – highlighted posts

I wanted to output the first couple of posts in full, and the next ones until the end of the page as excerpts for the first page, and for all the next pages – only the excerpts. This SO answer helped me, I didn’t know about offset and limit in for loops!

## Pagination – removing the pages from the header with unless

I’m not sure what happened, but I saw all the generated paginator pages in the menu, all called “Posts”. I removed it by overriding the layout with unless, which is another really nice operator.

The relevant code in _includes/header.html:

## Printing and scanning

scanimage (SANE) is a “a library and a command-line tool to use scanners”.

sudo scanimage -L to see the list of scanners, then to scan (for me also with sudo for some reason): sudo scanimage --device "xerox_mfp:libusb:002:004" --format=png > name.png

## Automagically cropping pictures

This tutorial and extension could separate about 30% of the pictures with the default settings. Margins (and margins to the sides of the image!) are important.

### Installing GIMP .scm plugins

is done by putting the .scm file to /usr/share/gimp/2.0/scripts/

## Creating LaTeX photoalbums

This tutorial is freaking awesome.

Given the number of images I was dealing with manually configuring each one was not an option. What I wanted was a service that would, given my image collection, just print me a photo album of approx 6x4 images, in chronological order, two per page, with a caption below each detailing the image file name and the date taken.

It provides a .tex album file and a Python2 file which reads the Exif data and creates a photos.tex which gets included in the main album file.

## Stack

QS: - finally find a semi-automatic way to get my Fitbit data - Hearbeat and sleep as priorities - Nomi too - Write something to centralize it all?

## i3

### i3-gaps for work/play mode

i3-gaps is fun but kinda nothing more. But I think it has potential for creating a right atmosphere for my work/play time and pomodoros.

I added the following in the config:

The idea is that there are two main designs, activated by the above keystrokes, one with gaps which I’ll use when I’m not doing anything important, and the other one when I have a timer/pomodoro running. Like a ritual and a way to subconsciously signal to myself that I should not distract myself right now.

We’ll see if it works out.

See if there's a way to do this on all workspaces. Is this what the global/local config thing is about?

yes. gaps inner all plus 5

### i3 backgrounds on different workspaces

i3-wpd from Github is nice. Could be another way to ritualize it all. We’ll see.

## Privacy

Updated my default search engine to startpage.com instead of DDG. I think the search results are much better.

## Python steganography

Decided to take a look again at my Bachelor’s thesis and do a nice rewrite in Python3 of the main code.

## Setting date in Linux

The date command can take STRINGS, which as mentioned in the man pages can be quite free-form. I moved my system clock back 1h with sudo date -s "1 hour ago". Wow.

## DNB and Typing

For the first time got 100% on D3B! And in general even though the results aren’t the most important thing in D3B they do actually motivate quite a lot. Keeping records and gamification for the win!

    d3b 64% Mon 25 Mar 2019 11:43:46 AM CET
d3b 100% Mon 25 Mar 2019 11:45:39 AM CET
d4b 39% Mon 25 Mar 2019 11:48:12 AM CET
d4b 33% Mon 25 Mar 2019 11:52:23 AM CET
d4b 44% Mon 25 Mar 2019 11:55:07 AM CET
d4b 50% Mon 25 Mar 2019 11:58:35 AM CET
d4b 50% Mon 25 Mar 2019 12:00:39 PM CET


## Python keyring

Is a python module to save secrets. python -m keyring [get/set] for help.

## Arch adding user to group

To be able to change backlight. sudo gpasswd -a sh video

## Clight and backlights

clight -b radeon_bl0 --day-temp=6000 --night-temp=2000 would be nice, but sadly my webcam is covered. But it might be a nice replacement for redshift, sometime.

## i3 borders

hide_edge_borders both #<none|vertical|horizontal|both>

## Setting time in Linux

date -s 13:17:50 also works. It’s more simple than I remembered.

## i3

removed border around all windows, we’ll see how I live with it and whether I need it. In work mode it might get confused with similar windows, in play mode it shouldn’t matter. We’ll see.

## DNB and Typing

    d4b 33% Tue 26 Mar 2019 01:36:16 PM CET
d4b 50% Tue 26 Mar 2019 01:38:22 PM CET
d4b 50% Tue 26 Mar 2019 01:40:42 PM CET
d4b 17% Tue 26 Mar 2019 01:42:47 PM CET
d4b 61% Tue 26 Mar 2019 01:44:48 PM CET
d4b 50% Tue 26 Mar 2019 01:48:32 PM CET
d4b 28% Tue 26 Mar 2019 01:50:32 PM CET
d4b 50% Tue 26 Mar 2019 01:52:31 PM CET
d4b 22% Tue 26 Mar 2019 01:54:36 PM CET
d4b 00% Tue 26 Mar 2019 01:57:40 PM CET
d4b 50% Tue 26 Mar 2019 02:02:24 PM CET
d4b 00% Tue 26 Mar 2019 02:04:32 PM CET

455 cpm 98.3%


## Anki-vim and importing

Anki’s manual says a lot about importing raw cards – and it’s much easier and more flexible to do this than I thought. I might drop anki-vim completely, or write something more minimalistic.

## Jekyll create.sh

Added to my “create” bash script a line that at the end opens the created file in vim, because this is what I do every single time.

## Urxvt transparency

urxvt*transparent: true


in .Xdefaults, so I get a small transparency in urxvt. Useful to make work/play mode even more defined - I can actually see the background.

## cmus-remote

cmus-remote controls cmus from another CLI. Added to .i3/config:

EDIT: And removed them, they interact strangely with workspace changes, later will look into this.

## DNB and Typing

d4b 28% Thu 28 Mar 2019 12:37:31 PM CET
d4b 44% Thu 28 Mar 2019 12:39:30 PM CET
d4b 17% Thu 28 Mar 2019 12:41:11 PM CET
d3b 93% Thu 28 Mar 2019 12:43:25 PM CET
d4b 44% Thu 28 Mar 2019 12:45:26 PM CET
d4b 78% Thu 28 Mar 2019 12:48:09 PM CET
d4b 06% Thu 28 Mar 2019 12:50:11 PM CET
d4b 28% Thu 28 Mar 2019 12:52:09 PM CET
d4b 39% Thu 28 Mar 2019 12:54:13 PM CET
d3b 93% Thu 28 Mar 2019 12:56:02 PM CET
d4b 0% Thu 28 Mar 2019 12:58:40 PM CET
d4b 39% Thu 28 Mar 2019 01:00:35 PM CET


## Clipboard

Added the alias alias xc='xclip -selection c' to .zshrc, now I can pipe stuff in my clipboard using echo test | xc. See this SO answer. alias xp='xclip -selection clipboard o' to paste.

## HoMe diploma

I’m starting again to work heavily on my diploma. I’ll be documenting most of what I do and learn here, and I think after this this semi-blog will become even more lively. I don’t think anyone will feel bad about me using this as my personal notepad, because this is exactly how this place was envisioned. For the “blog” blog with a bit more curated posts, feel free to go there.

### The plan

In the next couple of days - read maximally about interference in languages, first language identification etc. sci-hub.se - do a better cleanup of the tweets dataset (file for preprocessing it in batch instead of the same way in every notebook) - do some basic classification with tokens standing not for words, but for parts of speech, and with commas included, and see if that brings anything interesting (as per the influence/punctuation paper). - Create a working systemm for notes, papers, links etc etc. Most probably Note.vim or whatever was it called, but I need to research what exist. .. Or my wiki, which is nominally for knowledge management, and I’ve never seen a purer use-case for this.

## Python

### Importing modules

Modules downloaded from Github and placed in the same directory get prioritised automatically, because the first thing inside sys.path is an empty string, which represents the current folder the file runs from.

### Encodings

Are hell. I solved the problem of my utf-8 text being represented with weird \wha\te\ver characters while being utf-8 by changing the way csv is written. The old csvwriter.writerow([str(status.id_str).encode("utf-8") got replaced by csvwriter.writerow([str(status.id_str). It was wrong and now I understand why. It was writing the utf-8 bytes in the file, and when I read I got a string with the slashed that was already utf-8, the individual ‘', ‘w’ .. characters, not bytes.

## DNB and Typing

450 cpm 97.7%


## Random

Why we procrastinate

TL;DR procrastination is about negative emotions about doing what we do, not time management.

## Jekyll footnotes

For Jekyll footnotes you do

## Blog

Added a nice post about Pchr8board and edited the Projects page to have excerpts of posts belonging to that category.

## English

A Kludge kluge (/klʌdʒ, kluːdʒ/) is a workaround or quick-and-dirty solution that is clumsy, inelegant, inefficient, difficult to extend and hard to maintain.

## vim reload file currently open

:e is one way to do it.

## DNB and Typing

d4b 56% Wed 10 Apr 2019 10:18:00 AM CEST
d4b 33% Wed 10 Apr 2019 10:19:54 AM CEST
d4b 39% Wed 10 Apr 2019 10:21:51 AM CEST
d4b 17% Wed 10 Apr 2019 10:23:47 AM CEST
d3b 86% Wed 10 Apr 2019 10:25:24 AM CEST !
d4b 56% Wed 10 Apr 2019 10:27:22 AM CEST

d4b 56% Wed 10 Apr 2019 03:46:47 PM CEST
d4b 28% Wed 10 Apr 2019 03:48:45 PM CEST
d4b 39% Wed 10 Apr 2019 03:50:51 PM CEST

d4b 50% Wed 10 Apr 2019 05:47:24 PM CEST
d4b 61% Wed 10 Apr 2019 05:49:20 PM CEST
d4b 44% Wed 10 Apr 2019 05:51:17 PM CEST
d4b 22% Wed 10 Apr 2019 05:53:11 PM CEST
d4b 44% Wed 10 Apr 2019 05:55:03 PM CEST
d3b 71% Wed 10 Apr 2019 05:56:36 PM CEST !
d3b 71% Wed 10 Apr 2019 05:58:09 PM CEST !
d3b 86% Wed 10 Apr 2019 05:59:42 PM CEST !
d4b 39% Wed 10 Apr 2019 06:01:41 PM CEST


## Random

Day 100, how nice! I’m glad this diary happened :)

## Thesis

Today I’ll try to get as many not-NLP-features as possible – number of things, capitals, punctuation, etc and see if it predicts anything.

### Pandas balancing datasets

One way to balance a dataset, to leave an equal number of points in all classes, is the third answer here:

For each group, we get a sample from it, with the size of the smallest group. Quite beautiful actually.

### Basic non-NLP classification

• char_count, word_count, word_density
• puctuation_count, title_word_count, upper_case_word_count – though all relative, that is divided by number of words

Basic classification using scikit and the very basic features above. With four languages and the vanilla sklearn.svm.SVC I get the following confusion matrix:

array([[34, 22, 30, 24],
[26, 49, 24, 29],
[30, 33, 45, 25],
[32, 22, 34, 41]])


which is still more than chance!

### Papers with code

PWP is probably the best resource I’ve come across.

### Language interference

Reddit about this topic – I think I need to narrow the field of the thesis and focus on two languages.

### Ensemble learning

…would be very interesting to use. “Native language identification using ensemble learning” is a nice title. :) And gives me the opportunity to play with really a lot of algorithms.

## Recording microphone and speaker

With openbroadcaststudio, obs. For now it creates a video, to extract the audio: ffmpeg -i 2019-04-10\ 18-27-43.flv -map 0:1 -vn output.ac3.

Todo: how to do it without obs, or with obs – how to do it without video.

## Taking screenshots at regular intervals

The command is pretty predictable:

## Quotes

Michael Crichton invented the term Gell-Mann Amnesia as a reference to Nobel-winning physicist Murray Gell-Mann, who remarked that even though the newspapers were always wrong about his area of expertise (physics), he always found himself trusting them about everything else. (SSC)

## Thesis

0530_final_dataset.csv contains the final cleaned-up dataset with tokens, parts of speech, URIs/hashtags/mentions as their own POS, etc.

Changed the statusline to the following:

Now in zsh the statusline gets changed based on the amount of important tasks still pending. More simple than what was before.

## Quotes

“I’ve come up with a set of rules that describe our reactions to technologies: 1. Anything that is in the world when you’re born is normal and ordinary and is just a natural part of the way the world works. 2. Anything that’s invented between when you’re fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. 3. Anything invented after you’re thirty-five is against the natural order of things.” — Douglas Adams

“Be here now”

• “The mind is its own place, and in itself can make a heaven of hell, a hell of heaven.” From Milton’s ‘Paradise Lost’
• “Don’t kill the person inside you who wants to be alive.” Every time I feel down and/or have suicidal thoughts, I think about the part of me who went through so much shit to get to this place. I don’t want to throw away the effort of that person.
• Now I try and loosen up…moods come and moods go…I respect my feelings and those of others.
• “My cat wouldn’t understand where i went.”
• “If you’re going through hell, keep going.” - Winston Churchill
• – My meds keep me goin, fuck a quote. – Yeah I was about to quote: “300mg buproprion” -Dr. Baker Fuckin inspirational!
• “Bend, but don’t break.”
• ” Fireflies love the dark too.”
• “Only after disaster can we be resurrected. It’s only after you’ve lost everything that you’re free to do anything. Nothing is static, everything is evolving, everything is falling apart.”
• None of these keeps me going. For me it’s curiosity and nothing else.
• I think the saddest people always try their hardest to make people happy because they know what it’s like to feel absolutely worthless and they don’t want anyone else to feel like that. - Robin Williams
• “Death doesn’t stop depression, it just spreads it to somebody else.”
• “A smooth sea never made a skilled sailor” Franklin D. Roosevelt
• ‘Get busy living or get busy dying’. From The Shawshank Redemption.

## Stack

• Make finally a uniform and nice vim/bspwm/… keybinding system.
• Learn vim formally, all movements and everything, and get rid of my “vim antipatterns”

## Vim

### Vim digraphs

:digraphs to see the available digraphs. <C-k>+%digraph% inserts it. For example, <C-k>+Pd → £

### Vim movements

• '. - move to last modified line.
• D - delete everything until the end of the line.
• C - change everything until the end of the line
• U - undo all changes to this line
• S - substitute everything inside this line
• <C-a> - increment number at character
• <C-x> - decrement number at character
• F/f – move to prev/next occurrence of character
• T/t – move to before prev/next occurrence of character

Learn to use my ;->: mapping

## Using I/we/passive in a Bachelor’s thesis

No easy answer, but I liked here the joke “In your particular case, an inclusive we could be used to recognize the nematodes collaboration :) – Dr. belisarius May 10 ‘11 at 13:01”

• I asked another young professor whether one could use “I” and she said “Only if you want to sound like an arrogant bastard”, and observed that only old people with established reputations can get away with it.

• The passive voice should not be used to avoid writing I or we. If the entire thesis is written in the passive voice, it is much harder to read, and the sentences within it1 have to be reworded awkwardly so that some good transitions between the sentences within a paragraph are lost. On the other hand, if some sentences seem to require the passive voice, by all means those sentences should be written in the passive voice. But the passive voice should only be used where it is justified, that is, where its use improves readability of the thesis.

TL;DR use “we”, don’t use passive unless needed; don’t use “I” ever.

Also in Germany it’s bachelor’s thesis, apparently.

## Bachelor’s thesis tenses

This is also really nice:

### Past tense

#### Work done

We collected blood samples from . . . Consequently, astronomers decided to rename . . .

#### Work reported

Jankowsky reported a similar growth rate . . . In 2009, Chu published an alternative method to . . .

#### Observations

The mice in Group A developed, on average, twice as much . . . The conversion rate was close to 95% . . .

### Present tense

#### General truths

Microbes in the human gut have a profound influence on . . . The Reynolds number provides a measure of . . .

#### Atemporal facts

This paper presents the results of . . . Section 3.1 explains the difference between . . . Behbood’s 1969 paper provides a framework for . . .

### Future tense

#### Perspectives

In a follow-up experiment, we will study the role of . . . The influence of temperature will be the object of future research . . .

(As linked in the answer, taken from Effective Writing | Learn Science at Scitable.

## qutebrowser

### qutebrowser yanking URLs and markdown

This is amazing. ym yanks the URL with the title, like this: word choice - Bachelor thesis or Bachelor’s thesis - English Language & Usage Stack Exchange.

### qutebrowser passthrough mode

<C-v> enters passthrough mode, <Shift+Escape> to exit. It works very well with Jupyter-vim.

## Thesis vim marks

m means what it always means, n is the place I’ve been working at the last time, d is the end of the thesis.

## Resizing/converting/… a video with ffmpeg

 ffmpeg -i input.mkv -s 640x480 -c:a copy output.mp4

## Jupyter/pandas show all columns / limit maximum number of columns to show

pandas.set_option('display.max_columns', None).

javascript bookmarklets/quickmarks · Issue #221 · qutebrowser/qutebrowser · GitHub

:bind ,insta jseval alert("Hello World")

## Qutebrowser config.py

A Python config file is excellent. qutebrowser/configuring.asciidoc at master · qutebrowser/qutebrowser · GitHub For now this, then we’ll see:

«««< HEAD , All of the individual settings ======= All of the individual settings

• 5 Whys - Wikipedia - “5 Whys is an iterative interrogative technique used to explore the cause-and-effect relationships underlying a particular problem.”

The vehicle will not start. (the problem) Why? - The battery is dead. (First why) Why? - The alternator is not functioning. (Second why) Why? - The alternator belt has broken. (Third why) Why? - The alternator belt was well beyond its useful service life and not replaced. (Fourth why) Why? - The vehicle was not maintained according to the recommended service schedule. (Fifth why, a root cause)[2]

9cda76db80bd5b2c27d9886a9c01191c0676eac5

## Qutebrowser private windows

exist. qutebrowser --temp-basedir -s content.private_browsing true

## IntelliJ Idea

• Shift+Enter starts a new line without breaking the current one.
• To focus the code with ideavim, the custom property suppress.focus.stealing=false worked.

## Rclone and backing up Google Drive

rclone is nice. I followed the guide in Google drive, and the magic command to copy all content is rclone sync "drive:Google Photos" /mnt/data/Backups/GP, about 300kb/s, and about 4 hours left.

## Games

• Greed is absolutely wonderful and much more interesting than I thought at the beginning.

## Pandas apply() memory hell

This is a nice read about how Pandas’ apply needs to store the Series it creates, that there’s no magic, and that inelegant loops can sometimes be faster. Relevant is the official Enhancing performance guide, that I should read.

## Tensorflow

### Estimators

This is one of the best tutorials I’ve found. Todo: userscript that gives me back the real URL from outline.com.

### Tensorflow tensors and graphs

#### Tensors

A tensor is a generalization of vectors and matrices to potentially higher dimensions. Internally, TensorFlow represents tensors as n-dimensional arrays of base datatypes.

A tf.Tensor object represents a partially defined computation that will eventually produce a value. tf.Tensors do not have values, they are just handles to elements in the computation graph.1

Rank	Math entity
0	Scalar (magnitude only)
1	Vector (magnitude and direction)
2	Matrix (table of numbers)
3	3-Tensor (cube of numbers)
n	n-Tensor (you get the idea)ank	Math entity
0	Scalar (magnitude only)
1	Vector (magnitude and direction)
2	Matrix (table of numbers)
3	3-Tensor (cube of numbers)
n	n-Tensor (you get the idea)


#### Graphs

A computational graph is a series of TensorFlow operations arranged into a graph. The graph is composed of two types of objects.

• tf.Operation (or “ops”): The nodes of the graph. Operations describe calculations that consume and produce tensors.
• tf.Tensor: The edges in the graph. These represent the values that will flow through the graph. Most TensorFlow functions return tf.Tensors.

## Python

### Python functools partial functions

functools.partial(func[,*args][, **keywords])\

Return a new partial object which when called will behave like func called with the positional arguments args and keyword arguments keywords. If more arguments are supplied to the call, they are appended to args. The partial() is used for partial function application which “freezes” some portion of a function’s arguments and/or keywords resulting in a new object with a simplified signature. For example, partial() can be used to create a callable that behaves like the int() function where the base argument defaults to two

### Python lambda for hiding arguments

Same to above, also from Tensorflow: Here we wrap up our input_fn call in a lambda to capture the arguments while providing an input function that takes no arguments, as expected by the Estimator.

input_fn=lambda:iris_data.train_input_fn(train_x, train_y, args.batch_size)

### Python argparse

A nice example from the estimator example in tensorflow:

## Pandas pop column

pandas.DataFrame.pop — pandas 0.24.2 documentation. Works like a list .pop, df.pop('columnname'). Especially handy for ML.

## Qutebrowser

### Qutebrowser userscripts

Created my first qutebrowser userscript!

### Qutebrowser edit URL

go - set-cmd-text :open {url:pretty}. wO opens a new window.

## youtube-dl and mpv play audio

### Redirecting stdout and stderr in bash

some_command >file.log 2>&1  is the only one that works for me in all cases. (shell - Redirect stderr and stdout in Bash - Stack Overflow)

## Tensorflow

• TODO - why can’t tf.convert_to_tensor() convert stuff to other types (int64->float32) and I have to use tf.cast() afterwards?
• tf.in_train_phase() – both x and y have to be the same shape
• In a custom layer, compute_mask() can return a single None even if there are multiple output layers!

Erfahrungsmäßig

## Semantic highlighting

This is actually really nice as idea, and as usual someone on the internet thought about this more than I did: Making Semantic Highlighting Useful - Brian Will - Medium

I somehow really like the idea of having color giving me actual semantic information about the thing I’m reading, and there are a lot of potentially cool stuffs that can be done, such as datatypes etc. It’s very connected to my old idea of creating a writing system that uses color to better and more concisely mark different letters, like the apparently defunct Dotsies but even more interesting.

## Zsh autosuggestions (fish-like)

This is interesting: zsh-users/zsh-autosuggestions: Fish-like autosuggestions for zsh

Less noisy autocomplete than the default, should look similar to this:

As a side note I like the cat explanation.txt part for screenshots.

## Number bases in bash

bash - Value too great for base (error token is “08”) - Stack Overflow – tl dr bash/zsh see “018” as an octal number because it starts with 0. To fix this, we explicitly set the number base: 10#$varname. I updated my create.sh with this. Now the lines are like this: ## Hammock driven development (video); towatch Hammock Driven Development - Rich Hickey - YouTube looks like an interesting video. Also it’s transcripted! talk-transcripts/HammockDrivenDev.md at master · matthiasn/talk-transcripts Rich Hickey – Hammock Driven Development – melreams.com is a post about the same. ## Intellij idea bookmarks! Ctrl+Shift+3 to toggle bookmark 3, and Ctrl+3 to jump to it ## Tensorflow Building a data pipeline for tf.Dataset. title: “Intermezzo - 2” ## Три истории про Мерзебург Вот про Мерзебург надо писать на русском языке, на самом деле, хотя нереально объяснить почему. Сижу за идеально пустым столом комнатки где провел предыдущие 4 года. Вокруг какие-то непонятные бумаги на полу, какие-то ручки, как будто после урагана. Господи, сколько же всякого происходило тут за последние 4 года. Сижу за знакомым столом, который на идеальной высоте, куда идеально ложатся локти. Хотя все вещи кроме общажной мебели отсюда увезены, чудом осталась свечка и спички. Сейчас она горит и пахнет воском, тоже до боли знакомый запах, с точностью до всех нот - конкретно такие свечки и покупал 4 года подряд. И писал на таких листочках А4, тем же почерком, той же рукой. . Свеча выглядит как будто она догорит сегодня, и это лучшее и самое правильное совпадение этого мира. Комнатка прошла полный круг - а изменился ли я? А еще - город где была сфокусирована моя жизнь довольно долгое время. Сейчас тут пустая комната, за окном - темнота, хорошие люди в городе и самом общежитии в общем-то остались, но само нахождение тут как-то просто странно. Очень хороший повод порефлексировать о том, как можно себя чувствовать совершенно чужим в каком-то городе, особенно по вечерам. Помню летние месяцы тут - за окном лето, ты в напрочь пустом общежитии маленького городка восточной Германии, чувство свободы и пустоты, лето, бесконечное лето, лето как состояние. С работой это все будет стираться, и надо пытаться себя учить замечать маленькие детали в изменениях сезонов, иметь хоть какие-то ритуалы связанные с разными порами года, чтоб это не сливалось и чувствовать, к приеру, лето, про-живать, пере-живать сезоны. Постик об этом, отчасти. Но это все лирика, лирика которая не должна отвлекать нас от того, что на самом деле важно - ### Окна Слева от меня два огромных окна, традиционно жертвы моей любимой темы писать на окнах и давать хорошим людям писать на моих окнах. Очень много этих надписей связаны с вполне конкретными людьми и воспоминаниями. Все что следует написано очень многими разными почерками и размерами и цветами, кроме левой половины первого окна. . #### Окно 1, левая половина Life is a non-0-sum game. "Nothing exists except atoms and empty space. Everything else is opinion" - Democritus ____ - - - SIT, BE STILL AND LISTEN, BECAUSE YOU ARE DRUNK AND WE'RE ON THE EDGE OF THE ROOF - RUMI __________ BE A LIGHT UPON YOURSELF. ___________ ___________ I make my own coincidences, synchronicities, Luck, and Destiny. ____________ Rule your mind, or it will rule you. ____________ Безумие, безумие, безумие. (с) М. Рисунок роботов, вид сверху.  #### Окно 1, правая половина L'occhio del lupo Amazon P: admin123 __________ Рисунок круга с точкой внутри Leave tonight or live and die this way. padik is where your semki shells lie Еще одна схема робота, одного, вид прямо Рисунок слона, подписан Ellina Antal Szerb: Reise im Mondlicht Это все часть пути  Now playing: Händel - Sarabande, просто самая сильная извесная мне композиция. Мурашки по коже. Продолжаю. . #### Окно 2, левая половина -- Что мне терять на этоп этапе? -- Этап. Ойген Matthew 6:33 TachibanaPC2998 Wovor laüfst du weg? Непонятный рисунок с квадратиками, кружочками и штрих-пунктиром. We were dringking with Ukrainians! 19:01 Рисунок короны Рисунок трех синусоид, суммирующихся в 1 Две неразборчивых надписи 6C | 2-3 Wo bist du? Sergej Еще одна неразборчивая надпись Buch "Krabat" (↳ O.Preußler) Смайлик Логитип BMW Рисунок земли, над ней шар, вокруг шара концентрические стрелочки Под ним: "2001" I fucking like weather сука SOKOLY (I.M.T. SMILE)  #### Окно 2, правая половина  Большой рисунок каббалисткого Древа Жизни, с буквами на иврите внутри 10:45 am Мыло для бульбашек Рисунок лица в очках Сережа ня :3 "Я тебя щелкну как семку!" (с) Женя Рисунок Дао 25см (i) 1:17 Странный рисунок лошади (?) перехоящей в ботинок (?) Der kleine Prinz ist bei mir! - Yasmin P.S. lies das Parfüm! Рисунок графика и минимумов в нем PRIMETIME SPIRIT Он хотел историй Он ее получит [sic] HN GL DF ALeX  ## Инсмут Тут еще будет уместен этот линк на пост, написанный когда я только-только приехал сюда: Файне місто Мерзбург | Я сам, соломка, чай. Сложно написать что-то общее про Мерзебург и мое отношение к нему. Если бы писал, то “блеск и нищета” точно бы звучало. Чем-то очень темный город, маленький, по-своему в некотором роде некоторым образом уютный, без лишних претензий. Но все же, темный, давящий, причем давящий с самого начала. Все хорошее, что я мог про него говорить, было скорее стокгольмским синдромом и рационализацией. Если город маленький, общение с людьми приобретает чуть больше граней. И общение с городом-вообще, где ты знаешь в лицо всех кассирш ближайшего магазина, единственного филиала банка, где четыре года подряд ходишь в одну аптеку и тебя там узнают, и ты узнаешь всех (двух) людей, которых ты там когда-либо видел за прилавком. Как будто личности, которые часть этого города, имеют более прочную позицию в нем, имеют чуть большее значение. Ты встречаешь дедушку на лавочке, болтаешь с ним - дедушка важен, лавочка важна, озеро, около которого она, тоже важно. Ты не анонимен и лавочка не анонимна. Все имеет больший масштаб и связь между всем сильнее. Вне этого - если что-то тебя давит, то город беспощаден, и тебе в нем не затеряться и не отвлечься. Сенека что-то писал про то, что постоянные переезды и путешествия – признак беспокойного духа. Мне кажется надо иметь нереально спокойный дух, чтоб мочь долго жить в маленьком городке. ## Не Инсмут А если иметь спокойный дух - условия в принципе идеальные. Маленький универсистет, университет в 50 метров от общежития. 200 метров дальше - спортивный комплекс. Там можно играть в теннис с людьми, которых туда приглашаешь. По дороге туда встречаешь всех. А в тренажерном зале встречаешь местами преподавательницу немецкого языка, местами - ректора, который стоит и ждет своей очереди на тренажер у тебя над душой, что очень неловко всем. Мерзе это город где к тебе могут просто зайти и пригласить выйти погулять, и ты идешь и просто гуляешь по территории и по Tiergarten, до которого метров 500. Это город где шикарно гуляется ночью. И шикарно разговаривается ночью. Это город, в котором нереально хорошо видны звезды, все, и ночью можно ходить на них смотреть в кукурузные поля (до которых метров 700). Где есть крыша, на которую можно залазить и оттуда смотреть на затмение. Это город где ты идешь в магазин за едой и это интересно, и это развлекаловка, и ты резко понимаешь в чем может быть прелесть шоппинга. Мерзе меня многому научил. От того, как это, когда вокруг у тебя Мерзебург, где мало что происходит, а ты хочешь чего-то интересного - и ты учишься to make your own fun и организовываешь вещи. Эти 4 год атут были мне очень необходимыми и уместными, продлились ровно столько, сколько нужно, и закончились в идеальное для этого время. В эти секунды тушится свечка. Спасибо тебе, свечка, спасибо тебе, столик. Спасибо тебе, здание 5B. Спасибо тебе, Мерзебург, спасибо за все. ## Tensorflow py_function in mapping and Raggedtensors one is a RaggedTensor. This gives an error: TypeError: Tensors in list passed to 'input' of 'EagerPyFunc' Op have types [<NOT CONVERTIBLE TO TENSOR>, int32] that are invalid. Tensors: [tf.RaggedTensor(values=Tensor("RaggedFromVariant/RaggedTensorFromVariant:1", shape=(None,), dtype=int32), row_splits=Tensor("RaggedFromVariant/RaggedTensorFromVariant:0", shape=(None,), dtype=int64)), <tf.Tensor 'RaggedFromVariant_1/RaggedTensorFromVariant:0' shape=(None,) dtype=int32>] one.to_tensor() converts it to Tensor and this works. Additionally, if I set Tout to be only one value, I get a nice descriptive error: OperatorNotAllowedInGraphError: iterating over tf.Tensor is not allowed: AutoGraph is disabled in this function. Try decorating it directly with @tf.function. Giving a type for both outputs fixes this. ## Tensorflow RaggedTensor and Tensor evaluation Ragged tensors | TensorFlow Core gives a nice breakdown of the ways to evaluate a Tensor in general: • print(rt.to_list()) • print(rt[1].numpy()) • Printing the constutuents of it: • print(rt.values) • print(rt.row_splits) ## Python type hinting Allegedly one of the best tutorials to start with: Type hinting and annotations — Python for you and me 0.4.alpha1 documentation, link found here: A deep dive on Python type hints · Vicki Boykis. That blog in general is quite interesting, she’s the same person who wrote IT runs on Java 8 · Vicki Boykis. ## Random - good small datasets From the same blog above, Good small datasets · Vicki Boykis is nice. TIL datasets can have documentation. ## Tensorflow SequenceExamples to and from String tf.train.SequenceExample.FromString(se.numpy()).SerializeToString()==se, logically. They can be parsed without an extract function and tf.io.parse_single_sequence_example() ## Python truthy and falsy TIL that values considered true/false without being explicitly True/False have a name, and from python - What is Truthy and Falsy? How is it different from True and False? - Stack Overflow here’s a handy list of them: All values are considered “truthy” except for the following, which are “falsy”: • None • False • 0 • 0.0 • 0j • Decimal(0) • Fraction(0, 1) • [] - an empty list • {} - an empty dict • () - an empty tuple • '' - an empty str • b'' - an empty bytes • set() - an empty set • an empty range, like range(0) • objects for which • obj.__bool__() returns False • obj.__len__() returns 0 A “truthy” value will satisfy the check performed by if or while statements. We use “truthy” and “falsy” to differentiate from the bool values True and False. Truth Value Testing ## Intellij idea shortcut for closing tab Ctrl+F4 closes the current tab, which is not too easy to type. But I set a nice shortcut Ctrl-I which is not, action is “Close all unmodified”, it closes all the tabs I usually close manually - all internal TF stuffs that open when debugging and that I don’t want to change or edit (but breakpoints are okay, and they don’t seem to count as “modification”) ## qutebrowser edit current url go is the default shortcut for this. ## Tensorflow masking function not_equal This is very nice and easy and easy to forget: mask = tf.not_equal(inputs, '') It has sisters such as tf.math.less, etc. ## Tensorflow python unittests check for equality of two tensors tf.assertEqual(x, y) exists, can be used in unittests as is, if it raises an error the test automatically fails. ## Intellij idea generate tests This is awesome! Right click on class name -> Generate -> Test, and this creates a boilerplate file with the right name and right methods. ## English ## DNB And let’s come back to an old favourite of this Diensttagebuch… Today's Sets 1.D3B 86% 1m. 27s. 2.D4B 56% 1m. 48s. 3.D4B 28% 1m. 48s. 4.D4B 39% 1m. 48s. 5.D4B 39% 1m. 48s  ## Taskwarrior .zsh alias current sprint change Changed zsh alias to alias s='task s sprint.is:$SPRINT or sprint:c', it didn’t have the .is before showing me 40, 41… for sprint 4 etc.

For next year:

10270  for i in $(seq 4 9 52)\nt add project:h +MOD sprint:$i change toothbrush
10272  for i in $(seq 4 4 52)\nt add project:h +MOD sprint:$i Master monthly backup


## Adding concat.sh to dtb

One thing which I continuously missed was a way to quickly search through all the files visually - :Ag as fuzzy search is a really nice solution, but I still like the usual way. So now the following was added:

This is purely a text file that I plan to work with as a text file (though it gets compiled to .html during deployment), and we’ll see what happens next with it.

## Random / interesting

Compass rose - Wikipedia, especially the names of the winds. I wonder if they could become names for hostnames/servers or something.

## CNN Tutorial - Machine Learning

Simple Introduction to Convolutional Neural Networks is really nice and has pictures of swans.

## Tensorflow

tf.math.count_nonzero() works for booleans, as in “number of True elements in tensor”

## Python mutable/immutable dictionaries/lists changing inside a function

Tutorial: Why Functions Modify Lists, Dictionaries in Python just got bitten by this again :) TL;DR lists and dicts are mutable, therefore if I pass them to a function and it does stuff to it they will get changed outside the function too. dict.copy() helps.

## English / ML - ablation study/analysis

(20) In the context of deep learning, what is an ablation study? - Quora, may God forgive me for a Quora link -

An ablation study typically refers to removing some “feature” of the model or algorithm, and seeing how that affects performance.

and

An ablation study is where you systematically remove parts of the input to see which parts of the input are relevant to the networks output.

First seen in page 3 of Deep contextualized word representations

## Knowledge wikis

Gabor Melli’s Research Knowledge Base looks to be basically what I’ve tried to do. His layout for the posts is also interesting, for example see here: Personal Blog - GM-RKB It has a Context, Example(s), Counter-Example(s), and References. But I can't find any meta-level page describing this Gabor Melli’s Knowledge Base (GM-RKB) - GM-RKB. Usually the more interesting topics contain other stuff, such as Meaningless Universe Theory - GM-RKB the References contain actual quotes.

I really really really want to resurrect my own wiki.

## Tensorflow v1

The tf.global_variables_initializer() gets rid of “Attempting to use uninitialized value” errors.

## CNN visualization (ML)

How to visualize convolutional features in 40 lines of code has very cool pictures of intermediate layers of a CNN, along with pictures that seem to fit to it. This is realyl really cool.

## qutebrowser bindings

qutebrowser/.config/qutebrowser/autoconfig.yml · 39516940c80b70bab059e563a129709882f4a41e · Jay Kamat / dotfiles · GitLab has very interesting bindings, with interesting commands like fake-key and stuff, along with per-websites(?) bindings; javascript whitelisting.

## CNN tutorial

Again I come back to this nice resource: 6.4. Multiple Input and Output Channels — Dive into Deep Learning 0.7.1 documentation

It has a very nice explanation of CNNs and in/out channels and stuff.

Especially output channels:

Regardless of the number of input channels, so far we always ended up with one output channel. However, as we discussed earlier, it turns out to be essential to have multiple channels at each layer. In the most popular neural network architectures, we actually increase the channel dimension as we go higher up in the neural network, typically downsampling to trade off spatial resolution for greater channel depth. Intuitively, you could think of each channel as responding to some different set of features\o(6.4. Multiple Input and Output Channels — Dive into Deep Learning 0.7.1 documentation)

## Duckduckgo I’m feeling lucky

This is awesome! Works with a backslash: \tf.nn.maxpool

## Vim “Done” map/macro

The following inside the .vimrc moves the selected line to the end of the file and takes the cursor back: map <C-d> dGp''

The \. command will bring you to your last change.

The \ goes to a mark, and . is a “special” mark which is automatically set to the position where the last change was made. See :help . for some more information.

There is also  which will bring you back to where the cursor was before you made your last jump. See :help \\ for more information.

Another useful mark is \^; this is the position where the cursor was the last time when insert mode was stopped. See :help \^.

See :help mark-motions for some more general info about using marks (including some other “special” marks that are automatically set).

## Python ModuleNotFoundError ‘requests’

To get requests one has to install requests-html. requests might already be installed.

Why did I get ModuleNotFoundError instead of ImportError? Apparently it’s new in Python 3.6 and it’s a subclass of ImportError, just more precise; catching ImportError would work for it too.

## Programming cases name

• Flat case: myvariable
• Kebab case: my-variable (this is the most famous. Other names include: caterpillar case, dash case, hyphen case, lisp case, spinal case and css-case)
• Camel case: myVariable
• Pascal case: MyVariable (other names: capital camel case)
• Snake case: my_variable (other names: c case)
• Macro case: MY_VARIABLE (other names: upper case)
• Cobol case: COBOL-CASE (other names: Train case)

## unittest@skipUnless Python unit testing

models/transformer_main_test.py at master · tensorflow/models uses a neat thing:

## Linux keyboard compose key

Yet another change to the layout - now compose lives on rwin: setxkbmap -option -option 'grp:rctrl_toggle, compose:rwin' v4,ru &

This makes the entire file as follows:

## English

A Snowclone is a cliché and phrasal template that can be used and recognized in multiple variants.

Examples:

• Eskimo words for snow
• In space, no one can X
• X is the new Y
• The mother of all X
• X-ing while Y
• To X or not to X
• Have X, will travel
• X considered harmful

## Another explanation of Transformer - “The Annotated Transformer”

The Annotated Transformer seems the very best explanation I’ve found. It’s a Jupyter notebook, very detailed and containing an implementation. Link found here: course-nlp/8-translation-transformer.ipynb at master · fastai/course-nlp which in turn is a Jupyter Notebook used in this nice Youtube video lecture: Introduction to the Transformer (NLP video 17) - YouTube.

In this post I present an “annotated” version of the paper in the form of a line-by-line implementation. I have reordered and deleted some sections from the original paper and added comments throughout.

In general everything posted by the Harvard NLP team is very interesting for me especially: Code. It’s all nicely visualized and/or with source code.

## Linux watch command

It runs a command continuously and updates the screen when the output changes. Found in my zsh history, watch nvidia-smi is one example.

## Heaps’ law

Heaps’ law - Wikipedia “is an empirical law which describes the number of distinct words in a document (or set of documents) as a function of the document length (so called type-token relation)”. In “See also” it has quite a large amound of other “laws” which may be interesting.

## NLP Reddit

Natural Language Processing exists and is surprisingly active.

## Keras Transformer Bert implementation

kpot/keras-transformer: Keras library for building (Universal) Transformers, facilitating BERT and GPT models is a non-official Transformer and Bert implementation using Keras >= 2.0

## Stanford CS 224N - Natural Language Processing with Deep Learning

Stanford CS 224N | Natural Language Processing with Deep Learning has lectures, slides etc etc etc. Based on the lecture 06 from 2019, it’s freaking awesome, I really like the way the slides are done. I really really really like the way slides are done. In general that course would answer most of the questions I’ll ever have

It also has literature suggestions, all free to read online. Very glad I found it.

## Ambient sleeping pill

Ambient Sleeping Pill – Internet Radio for Sleep, Meditation & Relaxation is what it says it is. Background music is okay. “For sleep, meditation or study”. Nice alternative to brain.fm

## Emulate Python prompt during debugging in Intellij Idea

An interactive shell can be used during debugging in intellij idea! See Interactive console during debug? – IDEs Support (IntelliJ Platform) | JetBrains

## Keras saving model ‘Not JSON Serializable’ error

Cannot export Keras model TypeError: (‘Not JSON Serializable:’, b’\n…’) · Issue #27112 · tensorflow/tensorflow - yet another reason to use Keras’ own methods. tf.concat -> tf.keras.layers.Concatenate etc etc etc.

machine learning - How to load only specific weights on Keras - Stack Overflow

If your first 9 layers are consistently named between your original trained model and the new model, then you can use model.load_weights() with by_name=True. This will update weights only in the layers of your new model that have an identically named layer found in the original trained model.

## Transformer & BERT ML article

NLP — BERT & Transformer - Jonathan Hui - Medium is probably the best explanation of the Transformer and BERT I’ve even seen.

## Fill paragraph, Knuth and psychologically bad breaks

Implement Fill Paragraph for coments · Issue #2737 · intellij-rust/intellij-rust

This is fascinating problem, originally solved by Knuth himself, and a primarily example of dynamic programming: www.eprg.org/G53DOC/pdfs/knuth-plass-breaking.pdf. However interesting the problem might be, I’d rather my IDE solved it, and not me :-)

TODO - read it sometime maybe, I’ve skimmed through it and it looks very interesting.

## Intellij Idea ideavim plugin remove keybinding

Predictably to remove a keybinding imported from .vimrc in .ideavimrc the usual syntax is used: unmap <C-h>

The vim shortcut '' works in ideavim as well!

## General idea about Tensorflow and writing stuff for it

It’d be nice to have fixed values (and especially dimensions!) for my tensors that I use for testing stuff such as layers. If my input tensors’ dimensions are predictable, like [10, 9, 8, ...] for each dimension, I’d be able to recognize them immediately at various stages without having to think about it. For a level up, I can consider for example Fibonacci numbers or similar, that have different divisors, so that the program will fail early and predictably if I do something wrong.

Otherwise I kinda like the approach of Tensor Considered Harmful, especially the part where dimensions have human-readable names.

## Deutsch / Jour fixe

TIL: Jour fixe ist ein in einer kleinen Gruppe von Personen fest vereinbarter, regelmäßig wiederkehrender Termin (Regeltermin), zum Beispiel „jeder zweite Donnerstag im Monat“. In der Arbeitswelt wird zu diesem Regeltermin meist eine Besprechung durchgeführt.

## reStructuredText for Python documentation

7. Documenting Python — Python Developer’s Guide is something I can try to follow. PEP 287 – reStructuredText Docstring Format | Python.org has more examples.

Getting permanent links to files - GitHub Help tells me to press y for the URI to update to the permanent link to that version of the file.

Ideavim search seems “smart” by default, ignores case unless I use case in my search.

## Taskwarrior project:

project:myproject can be replaced by pro:myproject

## Meta - Diensttagebuch

Updated the layout to output 10 posts in full and 10 as links on the first page, instead of the previous 3/7.

## English Idioms

See the writing on the wall - Idioms by The Free Dictionary — “To notice and interpret apparent signs or indications that something will or is about to happen in the future, especially something bad or unfortunate.”, “To know something is about to happen”. Found here.

## Random

Spent a lot of time understanding why do i3 and my mouse and Intellij Idea not work, fix was removing the headphones that were pressing a mouse button on the laptop.

## Change volume on different soundcard

Added the following lines to .config/i3/config:

Now there are two shortcuts for two volumes :)

## Use vim to change encoding of file

:set fileencoding=utf8, then :w newfilename.

Added this to config.py: config.bind('<Ctrl-I>', 'download-clear')

## Python string sanitization

Different ways to ‘sanitize’ a list of strings to ensure they don’t contain any of the contents of another ‘ignored’ list

## Tensorflow Dataset API split to train/test

Splitting a tf Dataset is surprisingly hard. Best option is

Along with stuff like this if you know the dataset size:

(Though I don’t see any fuction to get a dataset size from the Dataset).

## Tensorflow running eagerly TODO

What is the difference between setting run_eagerly while compiling a tf.keras model vs setting it after compilation vs tf.config.experimental_run_functions_eagerly(True)?

## Tensorflow saving models blues

As of Di 03 Mär 2020 17:11:47 CETA, it seems saving weights both in .h5 format and tf format is broken. For TF format, [TF2.0] Bug when saving weights with custom layers · Issue #26811 · tensorflow/tensorflow, you should use .h5; For .h5, Tensorflow 2.x seems to use the same names of Variables if they are unnamed, which creates conflicts when saving. The fix is to name all the variables: Custom layer weights all have the same name by default · Issue #36650 · tensorflow/tensorflow

## Zinc for common colds

This paper: Zinc for the common cold—not if, but when says that it’s conclusive evidence that it helps at <24h after the start and that it reduces the risk of colds. I’m not sure I understand what’s the right dose though

## Python imports

Python ‘No module named’ error; ‘package’ is not a package - Stack Overflow TL;DR Beware of conflicting filenames.

I keep getting bitten by this - if I have a folder called something and inside it something called something.py and want to import something from the folder, it will take something to mean something.py instead of the folder.

I was using the same name for both a sub-package (directory) and a module (file) within it.

    /opt/mylib/myapi
/opt/mylib/myapi/__init__.py
/opt/mylib/myapi/myapi_creds.py        # gitignored file for user/pass
/opt/mylib/myapi/myapi.py              # base module, load creds and connect
/opt/mylib/myapi/myapi_dostuff.py      # call myapi.py and do work


The script ‘myapi.py’ imports credentials from myapi_creds.py via this statement:

    from myapi.myapi_creds import my_user, my_pass

Testing the module 'myapi.py' resulted in this error:

$./myapi.py Traceback (most recent call last): File "./myapi.py", line 12, in <module> from myapi.myapi_creds import my_user, my_pass File "/opt/mylib/myapi/myapi.py", line 12, in <module> from myapi.myapi_creds import my_user, my_pass ModuleNotFoundError: No module named 'myapi.myapi_creds'; 'myapi' is not a package  The solution was to rename myapi.py to myapi_base.py so it’s name does not collide with the sub-package name. ## Markdown code in quotes Is there a way to put code blocks in block quotes? - Meta Stack Overflow TL;DR Code is indented four spaces, but inside a quote (>) they have to be indented five spaces. ## English - dingbat dingbat - Wiktionary - crazy person - typographical ornament (like arrows) - small device/gadget the correct term for which is forgotten/unknown ## Scipy normality test scipy.stats.normaltest — SciPy v1.4.1 Reference Guide - function returns amongst other things p-value that the sample comes from a normal distribution. ## Meaning of buffer_size= in dataset.shuffle() tensorflow - Meaning of buffer_size in Dataset.map , Dataset.prefetch and Dataset.shuffle - Stack Overflow It affects how random the shuffle is. A buffer size of 1 would not shuffle at all, one bigger than the dataset would be perfect. It’s basically the size of the randomly created bucket from which we pick the next element. ## German - Geburtsname Geburtsname: Vorname oder Nachname - Das versteht man darunter - FOCUS Online Müssen Sie in einem Formular Ihren Geburtsnamen angeben, handelt es sich um Ihren Nachnamen, den Sie bei Ihrer Geburt erhalten haben. Sofern Sie nicht geheiratet und den Namen Ihres Ehemanns oder Ihrer Ehefrau angenommen oder eine Namensänderung beantragt haben, können Sie hier Ihren aktuellen Nachnamen angeben. ## Bash/terminal command with a certain percent chances of running [$[$RANDOM % 10] = 0 ] && do_this || do_that “s gives roughly a 1 in 10 chance of do_this running, and a 9 in 10 chance of do_that running. You can omit || do_that to just have a 10 percent chance of do_this running.” (seen here: Clear Your Terminal in Style - Adam.) ## Vim vimmotion plugin in visual mode The vim vim-easymotion plugin (easymotion/vim-easymotion: Vim motions on speed!) also works in select/visual mode! EDIT: there’s an intellij idea plugin! Just wow ## Intellij Idea / Ideavim / Easymotion plugin I’m very very very glad about this, this is one thing that I missed from vim! AlexPl292/IdeaVim-EasyMotion: EasyMotion emulation plugin for IdeaVim To activate I had to add set easymotion after setting the leader key in .ideavimrc. I just to not-forget about it. ## Matplotlib/pyplot reset styles If I set a style like paper with plt.style.use('paper') it changes some settings (esp. in Jupyter Notebook) that don’t get overwritten by the next calls to plt.style.use(). For this, plt.style.use('default') exists. (Found here: python - How to recover matplotlib defaults after setting stylesheet - Stack Overflow) ## Matplotlib have lines of the same colours when cycling / set line colour explicitly The idea is to access the colour cycle directly: Also I learned that there’s a nice way to get a value for ax when I don’t have it: ax=plt.gca() And that I should look into itertools because this is really neat (TODO: Look into itertools): ## Matplotlib get list of available styles The list of available styles in matplotlib: plt.style.available To use: plt.style.use('paper') ## Matplotlib adjust subplots When creating a plot with many subplots via a loop I had the issue that they were too close together. Fixed with plt.subplots_adjust(): matplotlib.pyplot.subplots_adjust(left=None, bottom=None, right=None, top=None, wspace=None, hspace=None) matplotlib.pyplot.subplots_adjust — Matplotlib 3.1.2 documentation ## Matplotlib subplots TODO add what I finally understood about the location of the subplots ## Tensorflow Keras reset states of everything Everytime I call model.fit() it does NOT reset the weights, DOES reset the hidden states (such as RNN/LSTM), does NOT reset optimizer settings. machine learning - keras.fit() re-initialises the weights - Stack Overflow If I want to reset them, keras.backend.clear_session() should clear the info from the previous model. ## Toread How to Make Yourself Into a Learning Machine - Superorganizers - fascinating practical use of the Zettelkasten method, amongst other things - don’t have time for this now but I will read it later. + Using Anki to Remember Everything You Read | Hacker News as my source. Adding to this: ## TODO Qutebrowser • Create a better ym that automatically escapes things like | • Resurrect pchr8.net/f/ since I really really miss it as my place to organize stuff ## Qutebrowser tab-give keybinding Added config.bind('tg', 'set-cmd-text -s :tab-give') to qutebrowser config.py. set-cmd-text is nice, -s means add space to the end, and now I know more about qutebrowser modes in general - for example, I can do keybindings even while I’m inserting a :command. The further it goes the more I love qutebrowser. ## Intellij idea debugger Debug tool window - Help | IntelliJ IDEA If I click and the Debugger pane disappears, Alt+5 makes it appear again in the previous state. ## cat compressed files with zcat This is very nice: zcat auth.log.3.gz ## Choose default webcam lenovo - 18.10: how to set system default webcam? - Ask Ubuntu ## Keras / Tensorflow why saving a subclassed model is hard Very nice R-centric explanation, but should be valid for Python too: Saving and serializing models A subclassed model differs in that it’s not a data structure, it’s a piece of code. The architecture of the model is defined via the body of the call method. This means that the architecture of the model cannot be safely serialized. To load a model, you’ll need to have access to the code that created it (the code of the model subclass). Alternatively, you could be serializing this code as bytecode (e.g. via pickling), but that’s unsafe and generally not portable. ## TODO Tensorflow model saving / prediction Why am I getting wildly different accuracies and losses after loading the model from .h5 file, when model.weights for both are identical and predictions (using model.predict()) too? This probably has something to do with me misunderstanding datasets, how exactly? ## Tensorflow/Keras ## Githubusing keys instead of passphrase This is very nice and concise: Setup SSH keys for use with GitHub/GitLab/BitBucket etc, along with this series: Generating a new SSH key and adding it to the ssh-agent - GitHub Help TL;DR generate a key, add it to Github, add it to the ssh-agent as $ eval "$(ssh-agent -s)" > Agent pid 59566$ ssh-add ~/.ssh/id_rsa


Test the results as

→ ssh -T git@github.com
Hi username! You've successfully authenticated, but GitHub does not provide shell access.


If the key is in a non-default location, Host github.com HostName github.com User jaeaess IdentityFile ~/.ssh/id_rsa_github_jaeaess is needed in the ~/.ssh/config file.

To push without being asked for passwords, the remote needs to be changed from HTTPS to SSH:

$git remote remove origin$ git remote add origin git@github.com:AquilineAdaeze/gitformyMac.git


Since it doesn’t seem to be persistent, the unsafe way (even though it’s considered unsafe in general) is to add ssh-add -q ~/.ssh/id_rsa_github to startup.

## Intellij Idea copy absolute path

To copy absolute path of a file, Ctrl+Shift+C works.

## Transformer Keras load a trained model and do some changes

Very interesting discussion: Loading a trained model, popping the last two layers, and then saving it · Issue #8772 · keras-team/keras

For the Sequential model, model.pop() also exists but not for the Functional one.

For a Functional model, after getting a model from an .h5 file, we can do things such as: new_model = Model(model.inputs, model.layers[-3].output)

## Changed font in the Terminal

Changed the font from Fira Code Light to Fira Code Medium (EDIT: now Bold. True-bold text still gets rendered as extra-bold, which is very nice too!). It works much better on not-bright-enough screens that stand in front of too-bright windows.

## Tensorflow saving model weird errors about init things

I could not save a Tensorflow Keras model, the issue was that I passed arguments from init as: self.whatever = whatever, then changed self.whatever to a different data type (string to b’ytes’ w/ .encode in my case), then in the get_config() function then I happily said {'whatever': self.whatever,} which then could not be encode()‘d.

## Random / interesting

Granular convection - Wikipedia is the process where biggerr parts of something float above when surrounded by smaller parts of something and vibration.

## History is happening

I’m not sure this is the place for this (oh wait, my blog, I decide the rules, it is now), but since the universe is interesting right now, I feel like preserving some parts. Not necessarily like a diary, just links that I feel will represent this interesting time better than many words could.

## German

The Mad Hatter in Alice im Wunderland in German is Der Hutmacher!

## Mediawiki + SMW update

This was so so so easy, oh my God. Even though I was updating basically everything from a very old version, to a different PHP and MariaDB version.

TL;DR move files, install manually my one extension needed, export/import mysql table data, point the wiki to the newly created table/db, run php maintenance/update.php and it just magically took care of everything. Only gotcha was that I forgot the db prefix, which gave me DBQueryError after restore; error in update.php on Project:Support desk, solved with the first google result. This was so much easier than expected.

EDIT2 - forgot about Extension:ParserFunctions - MediaWiki, and a couple of smaller ones. So:

EDIT3: Had to move the /images/ folder with its content. To check for them, Gallery of new files - Fiamma works

Now live again at pchr8.net/f/

EDIT4: properties seem to be broken and capitalized, which makes semantic search unusable. I’ll deal with it later.

## Jonatan Hui blog

Jonathan Hui blog Mostly ML stuff in a static html blog.

If I do: export PYTHON_PATH=$(pwd), then check it via $PYTHON_PATH hoping to see something like:\ zsh: command not found: Fr 20. Mär 19:48:01 CET 2020 - this won’t happen, as this is a path, and the result would be same as cd PYTHONPATH, therefore outputting nothing and leaving me with the impression that the value was not being set. ## History is happening My favourite corona-Dashboard has a nice new option to “align by date of 100th case”: Coronavirus charts It looks like this today: ## Bash print full path to a file I’m so glad this exists and I don’t have to do pwd+ls+copypaste anymore! # realpath example.txt /home/username/example.txt  Not a default shell built-in, readlink -e (or -m or -f) does the same. ## Quotes Moses was fond of repeating at this time a quote often used in Albany. “You can get an awful lot of good done in the world if you’re willing to let someone else take the credit for it.” (The power broker by Robert A. Caro, p.315) ## xclip using it right Copy and paste at the Linux command line with xclip | Opensource.com The line is yourcommand | xclip -sel clip which is aliased to xc, so yourcommand | xc. ## scp port forwarding If I have something running on servername:6006 reachable only from 127.0.0.1 (on the server itself), I can do this: ssh -L 4000:127.0.0.1:6006 servername Which makes it available for me from my localhost as 127.0.0.1:4000 To check if the thing running on servername can be reached from outside, netstat -tulpen A Guide to SSH Port Forwarding/Tunnelling - Boolean World ## qutebrowser tabs width Added this to qutebrowser’s config.py, two keybindings to make the tabs width smaller and back, to save screen space. ## English tetchy - “Easily annoyed or irritated; peevish, testy or irascible.” ## Podcasts Lost in Larrimah - Whooshkaa has 6 episodes 20 mins each and it sounds interesting. ## Python formatting PyFormat: Using % and .format() for great good! is a website dedicated completely to Python formatting that I could read through someday. ## History is happening ## Random / Interesting Why do color TVs make black and white snow? | Hacker News The other question is “why don’t you see that noise when the TV is tuned in?” The TV has automatic gain control. When the signal is weak, it will amplify it up to the right level. If the signal is just background noise, then it will amplify that background noise until it’s at the “right level” for a proper TV signal. So, the gain is lower for stronger signals, and very high when there is no signal at all. the artefacts created in the black and white picture by the colour signal are hardly noticeable, but they are enough to recover the colour from a black and white recording! The Unofficial Colour Recovery Wiki | Fandom ## Programmer competency matrix Programmer Competency Matrix – Sijin Joseph, I don’t agree with everything but looks like a nice blueprint ## Random Picture from xkcd what-if 0034 found on this article about evaluating LMs: Evaluation Metrics for Language Modeling and hotlinked from what-if 0034. ## Qutebrowser Added to config.py: c.tabs.pinned.frozen = False c.tabs.title.format_pinned = "{current_title}"  ## German / Deutsch Cabinfever is der Lagerkoller. ## Kitty - the terminal emulator Added bindsymms+Return exec ~/.local/kitty.app/bin/kitty to ~/.config/i3/config kitty - the fast, featureful, GPU based terminal emulator — kitty 0.17.1 documentation is really awesome actually, and noticeably faster than any other terminals I’ve used.

TODO - read through the documentation linked above, esp wrt zooming and config.

<Ctrl+Shift+F2> opens the config file. In general I love everything about Kitti for now, in all the tiny little details.

Changes:

font_family      FiraCode-Bold
font_size 10.0
scrollback_lines 5000
strip_trailing_spaces smart

background_image ~/test.png
background_image_layout tiled
background_tint 0.7


## Random / interesting

Waffle House Index - Wikipedia

If you get there and the Waffle House is closed? That’s really bad… — Craig Fugate, Former Head of the Federal Emergency Management Agency

## Qutebrowser writing python userscripts

Just wrote this and put it into ~/.local/share/qutebrowser/userscripts/yank.py.

This is an userscript that allows me to escape my only problematic markdown character (|) when copying with ym:

Added config.bind('ym', 'spawn --userscript yank.py') to config.py

## Python set environment variables

Why did I need to use with open(..) as f: in the above script and couldn’t just do os.environ['sth']='sth else'?

It took seeing qutebrowser/taskadd at master · qutebrowser/qutebrowser to learn that you can annotate tasks in taskwarrior! task 123 annotate my annotation that can be long adds a visible line with the annotation under the task that is shown whenever the task is shown. This is awesome and I should read manpages sometimes.

## Keyboard layout

I should finally put it in order, especially given that I mostly don’t use the left-hand part of the left-hand typing layout, I started today by putting my  and ~ no LALT+SHIFT+apostrophe by adding this:

key <AD01> { [ apostrophe,!quotedbl, grave, asciitilde] };

to /usr/share/X11/xkb/symbols/v4

## Making Fiamma / Semantic Mediawiki alive again

### {{=}} template

Using Template:= - Wikipedia as an example, I created a page located at = - Fiamma which I can include as {{=}} to replace URIs in parameters in my Template:B - Fiamma template. I’m not sure how would I edit all pages containing equal signs in parameters but this is a nice start. My source is Help:Template - Wikipedia, first bullet point.

Same works for |, for which there’s already the default template {{!}}.

### New javascript bookmarklets qutebrowser userscripts!

The old venerable bookmarklets I wrote about here Updated Fiamma “Add link” bookmarklet (now there are two of them!) | Я сам, соломка, чай. are as dead as it gets, I’ll write one userscript to rule them all :) Or one userscript and one vim script to expand it.

Current iteration is:

Pages to test this on:

### Running userscript in qutebrowser

I had issues with commands executing too early, for example before the previous one has executed. So:

Lastly for some reason the “later” sometimes are interpreted as starting at the same time, not from the time the last command finished executing.

### Vim macros for the vimwin

(sorry)


" let @H = 'gg??c??bi??c??b{{B|^[^[^[j0i|^[^[^[ji|j?kb^[^[^[ji|^[^[^[o}};q' " For the 5 lines
" let @L = 'ji{{$?kb%?kb#set:\^Mk=?kD^[o|+sep=,}}^[' " For the tags " let @C = 'i[[C;tj?kb?kb?kbategory: ^[^[^[A]];q' " For each individual category " let @F = 'jjVG:norm! @C\^M' "Apply that to all lines till the end " let @d = '@H@L@F' " let @q = '^[A^[bbbbbbi|??^B?kb^[:%s/=/{{=}}/ge^M' " Summed up: let @C = 'i[[C;tj?kb?kb?kbategory: ^[^[^[A]];q' " For each individual category let @H = '^[A^[bbbbbbi|??^B?kb^[:%s/=/{{=}}/ge^Mgg??c??bi??c??b{{B|^[^[^[j0i|^[^[^[ji|j?kb^[^[^[ji|^[^[^[o}};qji{{$?kb%?kb#set:^Mk=?kD^[o|+sep=,}}^[jjVG:norm! @C^M:x^M'
" let @d = '@H@L@F'



The above changes text like:

https://www.pchr8.net/d/dtb/
Diensttagebuch - A purely technical blog about things I did on particular days, for future reference and search.
5

tag1, tag tag2, tag3

Cat1
Cat2
And a category with space


to


{{B|https://www.pchr8.net/d/dtb/
|Diensttagebuch - A purely technical blog about things I did on particular days, for future reference and search.
|5
|6
}}
{{#set:
k=tag1, tag tag2, tag3
|+sep=, }}

[[Category: Cat1]]
[[Category: Cat2]]
[[Category: And a category with space]]



For the above, jekyll had issues with utf-8 encoding and the escaped characters, so I copy-pasted them with my mouse from my terminal.

Additionally it converts the equal sign to its template, and saves-and-closes gvim.

… And with the glorious new page Waffle House Index - Wikipedia - Fiamma a new era for that wiki starts again!

This raises the question about what is the role of this blog, but I think here we’ll stick to IT stuff

..especially when writing macros that replace stuff. The magic is the e option at the end:

:%s/x/y/ge

And the vim macro / script doesn’t break anymore.

## DTB Master file

Added some things to the concat.sh script, it’s even more ugly now but the resulting page is okay:

## History is happening

Hilariously aggressive Covid-19 propaganda banners in China - SupChina

Not gathering for a feast is so you can eat in the future, Not visiting others is so you still have relatives in the future

Everyone you encounter on the streets now is a wild ghost seeking to take your life

Stay in and don’t wander around, You have AC, television, and wifi as your friends

## Kitty zoom (=change font size)

To zoom in/out in Kitty:

map ctrl+shift+equal change_font_size all +1.0
map ctrl+shift+minus change_font_size all -1.0


## Fiamma qutebrowser userscript

Edited the userscript to pass selected text as a third parameter to the NewLink template, to which I added the third parameter, and removed the automatic closing of the window from the vim macro.

## i3 keybindings to move to / select a screen / output

# focus outputs
bindsym $ms+o focus output DP-1-1 bindsym$ms+e focus output HDMI-2

## Random

It’s quite cute how google interprets me looking for kitty paths linux as cat paths linux, as in I believe that they are kinda similar in many contexts.

That said, it’s very refreshing to see a program where reading the config file documentation on its official website doubles as basic tutorial for the program, since all the keyboard shortcuts used in the example config are the real ones.

## Tensorboard & SSH tunnelling

Not sure why this surprises me, but I can first start a SSH shell that does a tunnel (.. and opens a SSH shell), then from it start the thing on the port that I am tunnelling. This almost looks like something I could automate if I do it often enough.

## English

ferine - Wiktionary - “pertaining to wild, menacing animals” - same in Italian. First seen here: Ninco Nanco - Wikipedia.

## German

speiseöl | Übersetzung Englisch-Deutsch is basically any cooking oil.

If you want to learn more about the process and jump off the deep end, Peter Reinhart’s book “The Bread Baker’s Apprentice” is a great place to start. It is detailed without being pedantic, simple without being over-simplified, and oriented for the home baker without forgetting the reasons that professionals do things the way they do.

Why do you need to refrigerate bread dough overnight? - Seasoned Advice

## Qutebrowser edit url in editor

config.bind('E', 'set-cmd-text -s :edit-url') added to config.py allows me to press E and the command will be prefilled.

Interesting arguments 6:

-b, --bg: Open in a new background tab.
-t, --tab: Open in a new tab.
-w, --window: Open in a new window.
-p, --private: Open a new window in private browsing mode.


## Keyboard layout changes

Made the following changes and bumped the version to v5:

// Changing aoeu for umlauted letters

key <AC01> { [	    a,	A, adiaeresis,	s]	};
key <AC02> { [	    o,	O, odiaeresis,	n]	};
key <AC03> { [	    e,	E, ediaeresis,	t]	};
key <AC04> { [	    u,	U, udiaeresis,	u]	};

// Adding ~ to the better key for this

key <AD01> { [  apostrophe,	quotedbl,	grave,	asciitilde] };
key <AD02> { [	comma,	less,   r, asciitilde] };
// Adding parentheses in a better place

key <AD08> { [	    c,	C,	Up,	 parenleft	]	};
key <AD09> { [	    r,	R,	BackSpace,	parenright		]	};

key <AD07> { [	    g,	G,	bracketleft,	braceleft		]	};
key <AD10> { [	    l,	L,	bracketright,	braceright]	};

// Numbers!

key <AB01> { [   semicolon,	colon,1,	exclam] };
key <AB02> { [	    q,	Q,	2,	at		]	};
key <AB03> { [	    j,	J,	3,	numbersign		]	};
key <AB04> { [	    k,	K,	4,	dollar		]	};
key <AB05> { [	    x,	X,	5,	percent		]	};
key <AB06> { [	    b,	B,	6,	asciicircum]	};
key <AB07> { [	    m,	M,	7,	ampersand]	};
key <AB08> { [	    w,	W,	8,	asterisk]	};
key <AB09> { [	    v,	V,	9,	asterisk]	};
key <AB10> { [	    z,	Z,	0,	asterisk]	};

// A new delete key
key <AC06> { [	    d,	D,	KP_Delete,	asterisk]	};


Now I have brackets on my right hand letters :) I’ll think later what other symbols I still have not learned by heart and move the below. (Numbers, maybe?)

## Fiamma userscript update

Updated the userscript to the following, now it removes stuff Mediawiki doesn’t like from the name of the page (but not from the Title, which is not part of the URL!)

#!/usr/bin/python3
import os
from urllib.parse import quote_plus

def urlencode(string):
return quote_plus(string)

def replace(original):
new = original.replace("|", "-")
return new

def replace_name(original):
new = original.replace("|", "-")
new = new.replace("[", "(")
new = new.replace("]", ")")
new = new.replace("#", "(hash)")
new = new.replace("{", "(")
new = new.replace("}", ")")
new = new.replace("_", " ") # TODO test
return new

title = os.environ['QUTE_TITLE']
url = os.environ['QUTE_URL']
selected_text = os.environ['QUTE_SELECTED_TEXT']

newTitle = replace(title)
newArticleName = replace_name(title)
newUrl = replace(url)
newText = replace(selected_text)
print(newTitle)

article_title = urlencode(newTitle)
article_name = urlencode(newArticleName)
page_url = urlencode(newUrl)
selected_text = urlencode(newText)

fiammaUrl = 'https://pchr8.net/f/index.php'

with open(os.environ['QUTE_FIFO'], 'w') as f:
f.write("open -w {}".format(url))


## Random / Interesting

This is a nice wikipedia page that starts with “Q.” and not with “Q:”, because “Q:” is forbidden as start of page name: Q. Are We Not Men? A: We Are Devo! - Wikipedia

## Pizza dough

I’ll try to do this tomorrow: The Best Pizza Dough Recipe - Sugar Spun Run

## Mattermost and Python

For when I get to this, it’s easy, after I install matterhook:

>>> mwh = Webhook('https://chat.mycompany.de', 'myAPIhook')
>>> mwh.send('test',channel='notif')


Very nice explanation here: GitHub - numberly/matterhook: Interact with Mattermost incoming webhooks easily.

## Python run from command line / shell with all the imports and stuff

Say I’m in folder2 and want to run folder2/folder/main.py

python3 -m folder.main adds folder2 to $PATH, while python3 folder/main.py adds folder to $PATH. The first option makes all imports much much easier.

## Python -v

So apparently python -v exists, output includes the adresses of all loaded modules

## English

balmy - Wiktionary - soothing, fragrant, mild, pleasant. Found in Behemoth by Peter Watts.

## Vim modeline

I should check vim modelines (Vim documentation: options) out, systematically.

## Cooking

### Pasta

Try adding cauliflower in my pasta water 7

And pasting my favourite Reddit comment for posterity:

[deleted] 385 points · 1 year ago · edited 1 year ago

This isn’t wrong, but not the tradition Italian way. The way we do it in Italy (Sicily) is to split the sauce in half. Take the pasta out about a minute or less before al dente. If you’re going for the creamy flavor, sauce permitting, mix some butter with the pasta as you’re draining the water. Then put the pasta in the sauce pan with half of the sauce and a (tiny) bit of pasta water. 1/4 of a cup is too much in our opinion because you don’t want to cook the pasta in the sauce for too long. Use the other half of the sauce to top it off. That’s not to say this is the only way Italians do it, but my Southern Italian family has been using this method for generations. I’m not a fan of OP’s method, if you want this kind of pasta just make a cacio e pepe.

On a separate but related note, tomato sauces (without meat) should only be cooked for 30 minutes, after that they lose the aroma. Of course I’m biased, but a simple tomato sauce is one of the easiest and most delicious things in the world to make. Simmer garlic until sizzling (add red pepper flakes with garlic for arrabbiata) add decent plum tomatoes (buy whole ones and hand crush them) with S&P, basil, oregano. You can add some butter if you like. Stir occasionally, 30 minutes later you’re done.

Edit: I always used to laugh to myself when I saw people getting excited about getting their first gold, and now I’m that person. Thanks kind stranger. 8

You can freeze bread without problems:

He starts with what not to freeze: “I never recommend freezing things like baguettes or ciabatta. Anything that has a large surface-to-crumb ratio just never refreshes the same.” 9

If baking, let your bread cool completely. This will prevent it from becoming soggy or moldy. Wrap each loaf tightly in plastic wrap. Then wrap it in foil or freezer paper. The double-wrap is your secret weapon for freshness.10

Unfreezing works overnight in the refrigerator. 10

While I’m at it, the yeast ratio is 2 1/4 teaspoons dry active, instant, or rapid-rise yeast granules (usually one 1/4-ounce packet) = 2/3 ounce fresh yeast 11

## Markdown

If I do annotations / sources / references, I have to put the definition on a new ‘new’ line, so it’s a new block. This was my error back at the very beginning. Not one but two.

## TODO Vim

Vim macro to create an reference based on a selected line. 5ategories: []

## How to make perfect italian pizza

This is a really nice video: How to Make Perfect Pizza | Gennaro Contaldo - YouTube

## Qutebrowser mediawiki yank userscript

Using an userscript for this is overkill, but  #!/usr/bin/python3 import os title = os.environ['QUTE_TITLE'] url = os.environ['QUTE_URL'] with open(os.environ['QUTE_FIFO'], 'w') as f: f.write("yank inline \"[{} {}]\"".format(url, title))  Located at /home/shamotskyi/.local/share/qutebrowser/userscripts/yank_w.py. In the config, config.bind('yw', 'spawn --userscript yank_w.py')

EDIT: replaced this with config.bind('yw', 'yank inline "[{url} {title}]"').

I have not been using it to the fullest.

List tasks completed today: task all status:completed end:today This might be something I can copypaste into my pages or in my reports, such as my weekly sprint review! Adding it as a module to siom should be not too hard. Taskwarrior - Usage Examples contains more nice examples.

## Python3 glob

glob is not sorted! glob.glob().sorted() though is.

## Kitty

kitty - the fast, featureful, GPU based terminal emulator — kitty 0.17.2 documentation: ctrl+shift+s is paste from selection ctrl+shift+u for unicode characters

## Set default browser from the shell

sudo update-alternatives --config x-www-browser

Doesn’t seem to work for kitty, but in the config open_url_with qutebrowser works predictably.

## English

gratuitous - Wiktionary - given freely, unearned; without reason, unjustified, unnecessary, uncalled for. Seen first in Behemoth by Peter Watts.

## Taskwarrior / zsh / … week number

For the sake of consistency (to each other and especially to Google Calendar) now my sprint number and week number is the ISO week number: export SPRINT=$(date +%-V) Fixed this in: •$SPRINT environment variable
• weekNumberValue in siom
• i3 statusline:
tztime local {
format = "[%V] %a %Y-%m-%d %H:%M:%S"
}


Only place it’s left now is in my paper calendar, but I don’t use it too much these days.

## taskwarrior better ‘done / completed last week’ command filter

task all status:completed end.after:eow-2wk – I forgot you could do almost-math with the datetimes!

Editing the output, to sort it by project, divide different ones by newlines, and show the headers of the table but nothing else: task all status:completed end.after:eow-2wk rc.report.all.columns:project,entry,end,tags,description rc.report.all.labels=Project,Created,Finished,Tags,Description rc.report.all.sort:project-/,end rc.verbose:label

## screen naming screens

Screens named with screen -S myname and attached by screen -r myname - tab completion works with screen -r!

entry is the time the task was created. So:

task all sprint:$SPRINT status:pending entry.before:eow-3wk tags.not:s rc.report.all.columns:entry,end,tags,description rc.report.all.labels=Age,Done,Tags,Description rc.report.all.sort:end rc.verbose:label,blank is what I’ll use in SIOM. ## Google calendar has shortcuts! I missed this all my life. • j/k work predictably. • t Today • g Go to date • c create ## Tensorflow GPU use If more than 1 GPU are visible, tensorflow will take some memory on all of them, even if its actively using only one. Restricting visibility the usual way helps. ## Vim custom syntax highlighting For SIOM and my morning pages the following two commands highlight in yellow all lines starting with a “+” after zero or more of any kind of space: :syntax match mys /^\s*+.*$/


To do this everytime I open a markdown file:

fun! SetQuestions()
syn match mys /^\s*+.*$/ hi link mys Keyword endfu autocmd filetype markdown :call SetQuestions()  ## Python stalinsort testcases Never thought about it like this, but for simple algorithms the test cases can be put in a nice array and iterated through: stalin-sort/test_utils.py at master · gustavo-depaula/stalin-sort ## Other • Watched Southern Comfort, 7/10, expected more based on the one clip with the song, but no regrets • Drew a couple of things, TODO later paste here :) ## History is happening Mafia distributes food to Italy’s struggling residents In recent days, the police in Naples have intensified their presence in the poorest quarters of the city, where men tied to the Camorra, the Neapolitan mafia, have organised home delivery of food parcels. Magistrates have already begun an investigation against a group of people who were questioned while distributing food to local residents. ## Greater Good podcast The Science of Happiness | Greater Good is a podcast about happiness, found it while looking for The Happiness Lab which is also a podcast about happiness. ## Qutebrowser Added config.bind('tw', 'set-cmd-text -s :open -w') to config, now tw is like a, but for windows instead of tabs. ## Vim markdown references macro Added this macro: let @R = 'viw"oyi[^^[^[^[^[A]^[^[^[Go[^^[^[^[^["opA]: ^[^[^[^[' When the last word in the line is selected, it gets transformed immediately to a reference. I’ll use this vim cheatsheet as 12. As a bonus, this uses a non-default vim register so whatever is in my clipboard stays there. (But it destroys whatever I had in "o). ## Tensorflow Tensorboard download CSV Can I export a tensorflow summary to CSV? - Stack Overflow – yes I can, by clicking “show data download links” on the top left of interface and selecting what I want to download below the plots. ## Why does loss increase at the beginning of an epoch? machine learning - Why training loss is increased at the beginning of each epoch? - Stack Overflow - probably because the dataset is not random enough, and the network overfits on the structure of the dataset. Happens with buffer_size dramatically less then the size of the structured dataset. ## Qutebrowser open in new background tab c.tabs.background = True in config opens new tabs in the background when middle-clicking. ## History is happening Nurse blocking anti lockdown protests in Denver : PublicFreakout and the imgur album: Health care workers stand in the street in counter-protest to hundreds of people who gathered at the State Capitol to demand the stay-at-home order be lifted in Denver, Colo., on Sunday, April 19, 2020. Photos by Alyson McClaran - Album on Imgur. As someone said, I really imagine seeing this in history books. ## Screen logging To visualize logs of screen sessions, less -r filename (-R hates ^H progress bars but I search seems to work a bit better) works very well. Even for the (tf) progress bars almost. ansifilter exists but deals with progress bars much worse. Empirically - for searching and scrolling the same font size / terminal size is very helpful. ## Vim macros posting Just pasting the Vim macro on Day 469, while it did not break Jekyll this time (why?), seems to have broken the RSS script at the beginning of the page. This page contains the following errors: error on line 19 at column 73: PCDATA invalid Char value 27 Copypasted the lines from terminal and back, but I need a much better way to save and ‘publish’ the macros. Found Vim Macro Trickz • Hillel Wayne when looking for solutions. ## German grammar • You need a dot between things like ‘u. a.’ in German, apparently. • on a noisy dataset = auf ein Verrauschtes Dataset • Dataset = der Datensatz, learned this far too late :) ## Essential oils .. can be added in a bath, but only in a carrier oil, olive oil works. “For a single bath, three to 12 drops of essential oil in a tablespoon (15 ml) of carrier oil is sufficient to create a very aromatic, therapeutic bath” 12 ## German Zinseszins - Wiktionary - compound interest. Beyond logic ## pandas / python split string by multiple delimiters Split string with multiple delimiters in Python - Stack Overflow has this really nice idea of doing str.replace(':', '_') and then str.split('_'). ## Pandas split string to different columns Series.str.split(delim) can do Series.str.split(delim, expand=True), that returns different columns instead of a list. Also - if graphs don’t make sense, one way things have gone wrong is interpreting x and y as strings. ## Vim exclamation mark to switch parameters A ! either forces the action or toggles the action: :set cursorline, to turn off: :set nocursorline Is equivalent to: :set cursorline! 13 ## python tabulate module tabulate14 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 ## Tensorflow how does training happen with nan? TODO 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, ## Note Einstein / Netzah “do your own thing” ## History is happening We live in interesting times. ## English shambolic - Chaotic, disorganised or mismanaged. Found somewhere on The Guardian applied to Trump’s daily health briefings. ## German lutschen / an etwDat. lutschen - to suck (on) sth; Lutschtablette = lozenge. ## English lozenge: 1) A rhombus (shape); 2) A small (originall diamond-shaped!) tablet/sweet for a sore throat. ## Random / interesting 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 ## Random / interesting The Technium: 68 Bits of Unsolicited Advice My favourite parts: • Being enthusiastic is worth 25 IQ points. • Being able to listen well is a superpower. While listening to someone you love keep asking them “Is there more?”, until there is no more. • A worthy goal for a year is to learn enough about a subject so that you can’t believe how ignorant you were a year earlier. • Gratitude will unlock all other virtues and is something you can get better at. • Treating a person to a meal never fails, and is so easy to do. It’s powerful with old friends and a great way to make new friends. • Reading to your children regularly will bond you together and kickstart their imaginations. • Rule of 3 in conversation. To get to the real reason, ask a person to go deeper than what they just said. Then again, and once more. The third time’s answer is close to the truth. • Compare Five whys - Wikipedia* and death certificates with multiple “due to (or as a consequence of)” • The purpose of a habit is to remove that action from self-negotiation. You no longer expend energy deciding whether to do it. You just do it. Good habits can range from telling the truth, to flossing. • Promptness is a sign of respect. • If you are looking for something in your house, and you finally find it, when you’re done with it, don’t put it back where you found it. Put it back where you first looked for it. • Show up. Keep showing up. Somebody successful said: 99% of success is just showing up. • Separate the processes of creation from improving. You can’t write and edit, or sculpt and polish, or make and analyze at the same time. If you do, the editor stops the creator. While you invent, don’t select. While you sketch, don’t inspect. While you write the first draft, don’t reflect. At the start, the creator mind must be unleashed from judgement. • Perhaps the most counter-intuitive truth of the universe is that the more you give to others, the more you’ll get. Understanding this is the beginning of wisdom. • Friends are better than money. Almost anything money can do, friends can do better. In so many ways a friend with a boat is better than owning a boat. • You are what you do. Not what you say, not what you believe, not how you vote, but what you spend your time on. • When you die you take absolutely nothing with you except your reputation. • Before you are old, attend as many funerals as you can bear, and listen. Nobody talks about the departed’s achievements. The only thing people will remember is what kind of person you were while you were achieving. • When crisis and disaster strike, don’t waste them. No problems, no progress. • When you get an invitation to do something in the future, ask yourself: would you accept this if it was scheduled for tomorrow? Not too many promises will pass that immediacy filter. • Acquiring things will rarely bring you deep satisfaction. But acquiring experiences will. • Rule of 7 in research. You can find out anything if you are willing to go seven levels. If the first source you ask doesn’t know, ask them who you should ask next, and so on down the line. If you are willing to go to the 7th source, you’ll almost always get your answer. • When someone is nasty, rude, hateful, or mean with you, pretend they have a disease. That makes it easier to have empathy toward them which can soften the conflict. • Eliminating clutter makes room for your true treasures. • Experience is overrated. When hiring, hire for aptitude, train for skills. Most really amazing or great things are done by people doing them for the first time. • Buying tools: Start by buying the absolute cheapest tools you can find. Upgrade the ones you use a lot. If you wind up using some tool for a job, buy the very best you can afford. • Following your bliss is a recipe for paralysis if you don’t know what you are passionate about. A better motto for most youth is “master something, anything”. Through mastery of one thing, you can drift towards extensions of that mastery that bring you more joy, and eventually discover where your bliss is. • The universe is conspiring behind your back to make you a success. This will be much easier to do if you embrace this pronoia. ## Backup entire github account with all the 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. Except by clicking on them, f gives numbers you can follow;F outputs the link text in the statusbar. ## Anki::Import 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 regex reference 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: 8 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.

## Pinta and gthumb

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 global aliases and aliases that take arguments

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. ## Inkscape make handler nodes bigger microscopic handle nodes - Beyond the Basics - Inkscape Forum Confusingly, that setting is in Preferences > Input/Output > Input Devices. ## Krita lags Krita’s slowness can be fixed by looking at the settings of Display and looking through Krita FAQ — Krita Manual version 4.3.0. ## Blog categories 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? ## Jekyll images size ![ddr]({{site.url}}{{site.baseurl}}/wp-content/static/pentachronological/d2.jpg){:width="40%"} ## Random/Interesting If you really want to make something good, eat good food and drink good saki. (Welcome to the NHK, episode 20.) 12 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. 15 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. 16 And on the topic of fully enlightened people: ## Ad-hoc tables via tabulate 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 | | | >>>  ## Italian (wow?) debellare - Wiktionary - sconfiggere/eliminare. 16 ## Searching in quotes 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” ## To read / interesting /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). ## Editing bash scripts 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") ## Qutebrowser show all bindings :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) ## Rsync to slash or not to slash 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 • Source directory: • Slash: copy the contents of the source directory, without the directory itself • No slash: copy both the directory and its files • Destination directory: doesn’t matter 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. ## grep excluding matches On the topic of the things I keep forgetting: grep -v excludeme, mnemonic might be reVerse? #anki ## rsync show progress 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 ## Random / Interesting / Ukrainian Хештег - Як перекладається слово Хештег українською - Словотвір З огляду на технічну складову питання додам коротке обґрунтування назви “кришмітка”. Слово hash-tag отримало таку назву не просто із-за символа “решітка”, причиною використання цього символа є скорочення написання слова hash-tag, коріння якого по своїй суті заходить глибоко в науку про компьютери. Розробники використовють слово hash як скорочення слова dictionary (словничок) що є спеціальною структурою даних котра пришвидшує пошук. Hash-tag або “#tag” з технічної точки зору означає те що слово “tag” проіндексується (потрапить у індекс або іншими словами словничок) і надалі буде доступне для швидкого пошуку. Тепер про саме слово hash, у тій же компьютерній науці існує багато стуктур даних здатних виконувати роль словничка. Hash-словнички особливі тим що використовують спеціальну hash-функцію, котра дозволяє отримувати інформацію із найменшою кількістю дій над словничком (аналогія дії - перелистування сторінок словника, що є вкрай повільним). Hash-фунція на основі вхідної послідовності символів (текста чи слова) підраховує число. Якісна hash-функція буде генерувати числа особливим чином, якщо в тексті замінити бодай одну літеру число має змінитися кардинально, але визначальним є те що якщо на вхід подавати одну і ту ж саму послідовність число має залишитися незмінним. Таким чином після того як ваша послідовність символів потрапила у словничок, вам не потрібно гортати його сторінки для того щоб знайти необхідний ключ, ви підраховуєте хеш-функцію яка вам повертає номер сторінки де має знаходитись слово. Hash-функція отримала таку назву із-за дій що вона виконує над вхідними данними всередині себе. Фактично вона “кришить”, “рубає”, “перемішує”, “заплутує” вхідні данні, що відповідає англійському перекладу слова hash. Тобто логічним було б перекласти слово хеш у цьому контексті як “криш” або “міш”. Переклад слова “tag” вже здійснений, і це “мітка”, поєднавши ці варіанти отримаємо “кришмітка” що в одночас володіє певною милозвучністю. “Кришітка” є спрощеним варіантом новотвору “кришмітка”, запропонованого Денисом Яремовим. Але має кілька суттєвих переваг: 1) Милозвучніше; 2) Відповідає етимології (криш-мітка); 3) І до того ж співзвучне з назвою самого символу # - “решітка”. Знову захотілося писати Соломку українською мовою, просто щоб мати змогу використовувати слово “кришітка” :) ## Taskwarrior 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). ## Youtube mildly interesting statistics 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. ## English kibble is store-bought dry (mostly) cat food. To kibble = ‘to coarsely grind’. Found on Peter Watts’ The Kibble Fund ## DTB Todo 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. ## Random / interesting • fantascienza Problemi di pelle Sebastiano Diciassette • I feel like writing better reviews of the books I read on Goodreads or my blog. I miss having to put things into words, and one of my New Year’s resolutions one of the previous years has been “Less consuming, more creating. Doesn’t matter what it is, doesn’t matter if it’s bad.”, stolen from HN. There’s definitely something to it. Along with this quote: “Write it. Shoot it. Publish it. Crochet it, sauté it, whatever. MAKE.” ― Joss Whedon Also, from the Onion: This is America. Nobody deserves to be treated as a black man. Judge Rules White Girl Will Be Tried As Black Adult - YouTube ## Random / Interesting / Quotes If their absence brings you peace, you didn’t lose them. ## Vim read from stdin whatevercommand | vim - works nicely for some of the commands I’d usually use less for. Related TODO: that vim plugin to read man pages and the website I found it on. ## Random / Interesting / Quotes My favourite quote by Kerouac has a fuller version I forgot exists: “I don’t know, I don’t care, and it doesn’t make any difference.” ― Jack Kerouac From the 1-to-1: “You always meet twice in life” ## Tensorflow / ML Binary crossentropy is a special case of categorical crossentropy, for when you have one output. ## Zsh / Bash history I can use syntax like !10600 inside commands in the CLI! They get replaced when needed. ## Compressing PDF pdf2ps input.pdf tmp.ps ps2pdf -dPDFSETTINGS=/screen -dDownsampleColorImages=true -dColorImageResolution=200 -dColorImageDownsampleType=/Bicubic tmp.ps output.pdf , and you can tune dColorImageResolution. Out of all answers in that thread [^compr], it's the only one that decreased my 2.3M pdf to 1.3MB. (Needed less than 2MB) [^compr]: [pdftk compression option - Stack Overflow](https://stackoverflow.com/questions/5296667/pdftk-compression-option) ## Port knocking and using ports based on IP > My latest trick for deciding on external ports to forward is to combine the service port and the device's internal IP address. If my desktop was 10.0.1.36 and the service was SSH on port 22, the external port would be 22136. So far it's worked well, but it only really works if you force your router to only give out 10.0.1.2 through 10.0.1.99. (snazz @ [Port knocking \| Hacker News](https://news.ycombinator.com/item?id=23187662)) Also: **Port knocking** is a method of externally opening ports on a firewall by generating a connection attempt on a set of prespecified closed ports. Once a correct sequence of connection attempts is received, the firewall rules are dynamically modified to allow the host which sent the connection attempts to connect over specific port(s). [^wiki] [^wiki]: [Port knocking - Wikipedia](https://en.wikipedia.org/wiki/Port_knocking) ## Random / Interesting > I've noticed a similar way of counting that's still quite common today in China. They point with their thumb to each segment of their four fingers to count up to 12 on one hand. The other hand tracks the number of 12 counts, which lets you keep track all the way up to 144 with both hands. (modo_ at [Roman Finger Counting \| Hacker News](https://news.ycombinator.com/item?id=23175469)) ## English [All thumbs](https://idioms.thefreedictionary.com/all+thumbs) - Fig. very awkward and clumsy, especially with one's hands. [uncouth](https://en.wiktionary.org/wiki/uncouth) - clumsy, awkward, unrefined, crude. ## Python generator expressions are a thing [How to Use Generators and yield in Python – Real Python](https://realpython.com/introduction-to-python-generators/#building-generators-with-generator-expressions):  nums_squared_lc = [num2 for num in range(5)] nums_squared_gc = (num2 for num in range(5))  The second one is a generator expression, with all the nice memory thingsies that entails. In general How to Stand Out in a Python Coding Interview – Real Python has some very interesting bits I had no idea about. And from “Dive into python”, p.193: Using a generator expression instead of a list comprehension can save both RAM and CPU. If you’re building an list just to throw it away (e.g. passing it to tuple() or set()), use a generator expression instead! Generator expressions are functionally equivalent to generator functions. ## Python itertools The itertools module has a lot of awesome stuff! 17 cycle, count, repeat, etc etc etc. Scary to think how many hours of coding I could have done over my lifetime if I hadn’t read this. ## #!/usr/bin/env python and the env trick for running stuff From the Learning Python 5th Edition book, Chapter 3 page 60: #!/usr/bin/env python ...script goes here...  This is fascinating. The env$whatever command returns the location of $whatever, which may or may not be standard. And apparently this is the way to write trueъ portable scripts. This goes to show that reading some nice reference line-by-line is actually a good thing if you have basic random bits of knowledge about something. So currently: • Finish Diving into Python, at least the parts I feel are relevant If I decide I need more Python in my life, • Learning Python 5th edition, 1594 pages, focuses on the Python language which is the official prerequisite to… • Programming Python, 1628 pages. It focuses on libraries and tools. The latter two have actual “Test your knowledge” tests and exercises. All of them may or may not be helpfully available illegally online, especially on github, especially in a repo I cloned. ## “Vim plugins I use” + read man pages with vim The last one is freaking awesome. ## English spunk - spark (fire); courage, spirit, determination. ## Vim new highlight groups fun! SetBackslash() syn region mys matchgroup=ignore start=/^\\/ end=/$/ oneline
endfu

fun! SetQuestions()
syn region dash matchgroup=ignore start=/^\\\s*+/ end=/$/ oneline hi link dash Statement endfu  The backslash is a way to mark “pre-written” things is my todo files. Anything after them is special. The backslash itself doesn’t get shown (matchgroup=ignore), everything else either is colored as EndOfBuffer (blue) or, if it starts with a +, as Statement (=yellow). I’ll play with the colours a bit more later. matchgroup=18 is the colour in which we’ll print the things that are actually matched as start/end, can be different from the thing demarcated by them. ## Vim easymotion Changed the default <Leader><Leader> mapping to s, that I never use, now everything is much easier! ## Intellij Idea vim plugin The * thing to search for word under cursor also works! ## Random / Quotes “Шредингеров кот” (с) Андрей ## English An Ermine, aka Stoat, is the thing Lady with an Ermine holds. . Yes. Hotlinking is allowed from Wikimedia servers, but not generally recommended: this is because anyone could change, vandalise, rename or delete a hotlinked image. 19 First found in The Trouble with Tribbles which I found through Voltaire - The Trouble with Tribbles (Song Only) - YouTube ## Python backslashes and raw strings Why can’t Python’s raw string literals end with a single backslash? - Stack Overflow - raw strings are not that raw and can’t end in a single backslash. ## New vim highlight rules for markdown files fun! SetBackslash() syn region mys matchgroup=ignore start=/^\s*\\/ end=/$/ oneline
endfu

fun! SetQuestions()
syn region dash matchgroup=ignore start=/^\s*\\+/ end=/$/ oneline hi link dash Statement endfu " fun! SetQuestions() " syn match mys /^\s*+.*$/
" endfu
autocmd filetype markdown :call SetBackslash()
autocmd filetype markdown :call SetQuestions()


## Vim increase/decrease number under cursor

Ctrl+a increases the number under the cursor, \ Ctrl+x decreases the number under the cursor.

## Hypermodern python

Hypermodern Python · Claudio Jolowicz It has basics on how to write/run/publish a Python app in 2020, which is nice. Uses poetry and stuff. I don’t have much knowledge in such things. But next project I do will use some of the ways described in there, there’s no consensus on how to do it right but what’s described there is much better than nothing.

## Project idea

Yet another nice unfinished project! I need something to unite flashcards and actual study material. I see something that gets markdown flashcards as input, and generates (via genanki20?) actual flashcards to be imported into anki, but also (with pandoc?) nice readable latex/HTML thinges in column (a la “The little schemer”) form to review it better and/or print.

This is something I really miss now, since anki_import has some issues but I don’t want to learn perl to fix them. And I’d need the column format output.

## qutebrowser bindings with specifying mode

config.unbind('<Shift-Escape>', mode='passthrough')
config.bind('<Ctrl-Shift-Escape>', 'leave-mode', mode='passthrough')


Now I can use <Shift+Escape> in vim-mode of Jupyter Notebook! It’s used to go from insert mode inside a cell to operate on the cells themselves. I missed this. Additionally my bindings of “Ctrl” as “Escape” when clicked fast seem to work also inside other bindings! As in <Shift-fastCtrl> works as <Shift-Escape>. Wow.

## English

I rest my case | meaning in the Cambridge English Dictionary: - “what just happened proves my point” - said by lawyers in a law court when they have finished the explanation of their case

For weird stuff like symbols hard to escape and deleting annotations or whatever, the edit command exists that opens vim and makes everything very easy.

## numpy getting started

The Basics of NumPy Arrays | Python Data Science Handbook is a nice refresher on the numpy basics.

## German

grundlegend | Übersetzung Englisch-Deutsch is ‘basic’. I was confusing it with gründlich | Übersetzung Englisch-Deutsch, which is closer to ‘exhaustive’

## Python unzip

To do the reverse of zip(), the way is list(zip(*previously_zipped_data))

## You can write raw SVGs into HTML!

Just wow, I had no idea you could do that:

<b>Hi!</b>

<svg>
<line x1="0" y1="0" x2="10" y2="10" stroke="black"></line>
<rect x="0" y="0" width="10" height="10"></rect>
<circle cx="5" cy="5" r="5"></circle>
<ellipse cx="10" cy="5" rx="10" ry="5"></ellipse>
<polygon points="0,0 10,5 20,0 20,20 10,15 0,20"></polygon>
<polyline points="0,0 10,5 20,0 20,20 10,15 0,20" stroke="black"></polyline>
<path d="M65,10 a50,25 0 1,0 50,25"></path>
</svg>



(Found here: An introduction to d3.js in 10 basic examples)

## Random / interesting

Sai - Essays: Meditation & energy work techniques

“It’s simple but not easy”

## Random / Interesting

I really need to sort out where do I put my links, my short-form descriptions of links, my ideas, longer-form things if any.

I need to focus on “being happy” again; I know what to do, how to do it, and objectively - I have time for this.

All of the white people who joined Indian tribes loved it and refused to go back to white civilization. All the Indians who joined white civilization hated it and did everything they could to go back to their previous tribal lives. 21

The Happiness Lab is relevant.

I need to synthesize this all in one nice post or article or work on progress or whatever.

## Random / interesting / ety / History is happening

Trending Words

1. blacklist
2. family
3. race
4. master
5. chauvinism
6. human
7. sand
8. blackmail
9. racism
10. nice

Haha.

numpy.genfromtxt — NumPy v1.18 Manual - lines starting with “#” get discarded by default.

## Random / Interesting / English

Soapbox - Wikipedia - A soapbox is a raised platform which one stands on to make an impromptu speech, often about a political subject. The term originates from the days when speakers would elevate themselves by standing on a wooden crate originally used for shipment of soap or other dry goods from a manufacturer to a retail store.

## Random / Interesting

Playlist (Psilocybin for depression, Imperial College London, version 1.3) by Mendel Kaelen | Mixcloud

## timewarrior

Finally fixed the zsh function and tw command to be able to filter the output by adding escaped parentheses:

s () {task s $$sprint.is:(date +%-V) or sprint:c$$ "$@"}  That said, When they are not quoted,$* and $@ are the same. You shouldn’t use either of these, because they can break unexpectedly as soon as you have arguments containing spaces or wildcards. 22 ## random / todo Create a better vim macro that automatically generates some random text for the reference. ## History is happening Seen a nice newspaper in Italy from something like March 3: “$cityname: first person healed, one in reanimation”.

Also in the plane they give instructions about what to do if there’s a loss of cabin pressure: you take your mask off before you wear the oxygen one.

## Java Tutorial

Java Constructors is a nice series of Java tutorials! I’ll be following it to remember everything I’ve forgotten about java.

## Intellij Idea has a lot of shortcuts!

sout -> System.out.println() and a lot of other similar ones, TODO find full list.

## Random / Interesting

A Bolo tie is a weird kind of tie popular in the Western US; first found in “Pill Mills of Florida” creepypasta.

## History is happening

Catholic priest, laity defend statue of St. Louis as leftist protestors become increasingly violent | News | Lifesitenews

## Random / interesting / cats

Существует «теория благополучия животных», которая определяет «пять свобод», необходимых животным, которые живут рядом с человеком:

• свобода от голода и жажды;
• свобода от дискомфорта;
• свобода от травм и болезней;
• свобода поведения, характерного для вида животного;
• свобода от горя и страданий. 23