In the middle of the desert you can say anything you want
Created a new basedir, where I symlinked the config.py from the original one:
11399 5.11.2020 09:54 ln -s ~/.config/qutebrowser/config.py ../profile2/config/config.py
To run with it, python3 qutebrowser.py -B ../profile2
(-B
is the same as --basedir
)
My use case would be to run a separate instance with tabs on top instead of in the left, for jupyter and similar. I can’t set tab position per window in the same profile.
As I seem to do that often:
xrealpath() {
realpath "$1"
realpath "$1" | xc
}
xpwd() {
pwd
pwd | xc
}
Both outputs to screen and saves to buffer. xc
is still this:
alias xp='xclip -selection clipboard o'
Nullable integer data type — pandas 1.1.4 documentation
Usual int
cannot contain NaN
values, and things like df[0].astype(int)
fail in that case.
To use nullable ints: df[0].astype('Int64')
. (Note - it’s a string. int
works both ways.)
Pandas can do styling! Had no idea: Styling — pandas 1.1.4 documentation
def _color_original(s):
if s[5]==-1:
return ['background-color: lightgrey']*len(s)
elif s[5]>0.9:
return ['background-color: #a5a1ff']*len(s)
elif s[5]>0.8:
return ['background-color: #bebaff']*len(s)
elif s[5]>0.7:
return ['background-color: #d8d6ff']*len(s)
else:
#print(s)
return ['background-color: white']*len(s)
df.style.apply(_color_original, axis=1)
style.applymap()
is elementwise, style.apply()
is per row/column/table.
<Ctrl-Shift-R>
does a hard-restart that sometimes fixes issues with Electron apps such as Slack. (TS)
~
inverts boolean values.
Used like this:
dd[~dd.companyName.str.contains("po")]
-> “does not contain”
Sehr schönes deutschsprächiges Buch über Java, dem ich nützen könnte, um mein IT-Wortschatz zu verbessern:
Rheinwerk Computing :: Java ist auch eine Insel - Inhaltsverzeichnis
The commit window is (as with conflict resolution) a fully-functioning text editor, including all the usual ideavim bindings! All changes/diffs get automatically updated as they get changed.
“Copy”-ed files get pasted as the filename with all the extensions. “Copy filename” does only the file name, w/o the last extension.
I’ve been bitten by this before at least twice. When copypasting them, for example even from another Intellij running configuration, check for spaces at the end. Not visible at all ever in any of the context one might hope to see them.
Called jshell
on my box. Has tab-completion etc. Really nice!
jshell> NavigableSet original = new TreeSet();
...> original.add("1");
...> original.add("2");
...> original.add("3");
...>
original ==> []
jshell> original.floor("2")
| Warning:
| unchecked call to floor(E) as a member of the raw type java.util.NavigableSet
| original.floor("2")
| ^-----------------^
$8 ==> "2"
Think about compareTo()
and equals()
of the classes if I’m doing something that may need it. Such as using Pair
s as keys in a TreeSet
and expecting that they will be compared only based on first value.
Java: Integer equals vs. == - Stack Overflow
Using !=
/==
… works only for Integers -128..127. Otherwise they will likely be different Objects => not equal.
And of course, -128..127 is exactly the kind of numbers one might see in tests as opposed to real world situations.
The way to do it is if (!one.equals(two)) {
TODO read this: Java gotchas - OWASP
(Link from AA in the context of comparing integers)
I usually use
sleep 5m && foobar
, so if I change my mind and^C
thesleep
, the next command doesn’t run. – Peter Cordes May 28 ‘16 at 14:07 1
And sleep
is installed by default in a lot of places!
sleep 5m && foobar
From the man page:
SUFFIX may be ’s’ for seconds (the default), ’m’ for minutes, ‘h’ for hours or ’d’ for days. Unlike most implementations that require NUMBER be an integer, here NUMBER may be an arbitrary floating point number.
!wa now plus 12.5h
bash - unix diff side-to-side results? - Stack Overflow
diff -y
(NB not git diff
) does really nice side by side viewing, and still colours output in the columns.
Found Think Java in my old notes and it’s really nice.
Ctrl+C - “Steuerung-C” - Strg.
Intersection over Union (IoU) for object detection - PyImageSearch TODO + add to Fiamma
This again, but:
\v
- very magic - everything has special meaning\V
- not magic - everything has literal meaning meaning, \
to activate specialFor my log, it would be interesting to create a keybinding that prepends current time to the beginning of the new created line and stays in insert mode.
Hot keys and keyboard shortcuts – Zoom Help Center
<Alt-A>
- mute/unmute microphone.Confluence saves draft version of the things you write if a page already exists. If the page is not created yet, no draft version is saved.
Project settings are not separate, but part of the general ‘Settings’.
Conditional formatting, especially the one that does gradient, is really nice. Butif you enter numbers with “.” as decimal point, while the sheet has “,” as decimal “point”, it will silently fail and color everything white.
TODO:
Lookarounds look useful: Regex Tutorial - Lookahead and Lookbehind Zero-Length Assertions
If TC triggers Sonar, it will provide a link to it once it finishes in the build log! (Same for CheckStyle - if it breaks because of it, going to the error and scrolling up in the log will lead to the problematic file and line.)
tig
(git)TS showed it to me some days ago, installed it, does really nice and colorful visualizations of branches statuses etc etc etc. Keyboard-driven and configurable and basically everything I might want, including easy to remember name.
This is awesome: Bar Plots in Python using Pandas DataFrames | Shane Lynn
Система моніторингу поширення епідемії коронавірусу
TL;DR use only one screen and they work.
I have a potential fix for this! I have 2 screens (internal laptop monitor, and external monitor). I noticed that the problem only presents when I’m using “dual monitor” mode and have “gallery view” enabled. The controls also don’t appear if I have “full screen” enabled. They also won’t appear if I have either window on the external monitor.
It works in “dual monitor” mode if I have the controls window set to “speaker view” and not in “full screen” with both windows on the internal (laptop) monitor. I can then move either window to the external monitor. If I’ve accidentally started Annotation mode “wrong”, I have to cancel it and move all windows to the internal monitor before re-starting Annontation mode.
I have my controls back! This is with version 5.2.458699.0906 1
I have version 5.3.47…. (no way to copypaste) and they don’t, but using only one monitor helped. Though I get a black screen underneath annotations when/as I’m writing them.