In the middle of the desert you can say anything you want
One can use mount
without arguments to get the list of mounted filesystems! o
Killing anything that uses a directory:1
fuser -kim /address # kill any processes accessing file
unmount /address
(-k
is kill, -i
is “ask nicely before killing”)
rbgirshick/yacs: YACS – Yet Another Configuration System is a “lightweight library to define and manage system configurations, such as those commonly found in software designed for scientific experimentation”. It’s used by detectron2, serializes configs in yaml files. Nicely supports standard settings and experiment overrides and CLI overrides. Basically what I’ve been trying ot hack together in some of my scripts.
Got: FileNotFoundError: [Errno 2] No such file or directory: 'datasets/coco/annotations/instances_val2017.json
at the end of trainings.
Solution was to have cfg.DATASETS.TEST = ()
explicitly set, not commented out like I had. 2
so it’s a mystery why
cfg.DATASETS.TEST
is looking fordatasets/coco/annotations/instances_val2017.json
Indeed.
Example of how to use EvalHook to run functions: detectron2/train_net.py at master · facebookresearch/detectron2 (but I’d like to implement the eval as a subclass)
The python3 way to work with paths seems to be pathlib — Object-oriented filesystem paths — Python 3.9.2 documentation, not the old os.path.*
Split is Path (close to really-existing things), and PurePath - abstract paths, without connection to any real filesystem.
Shapely is awesome! And easy to play with in jupyter notebook
To access a Tensorboard (..or anything) running on a remote server servername
on port 6006:
ssh -L 6006:127.0.0.1:6006 me@servername
After this, tensorboard is bound to the local port 6006, so 127.0.0.1:6006
.
Tensorboard has to be run with --host=127.0.0.1
to make it accessible from outside.
Jupyter - the link with the token can simply be followed (or copypasted), if the port is the same in both localhost and server.
Unsurprisingly intuitive:
ax.set_ylim(1, 0)
(of course, problematic if you don’t know your actual limit)
EDIT Mi 10 Mär 2021 19:23:20 CET: There’s an even better solution! 1
ax.invert_yaxis()
Pytorch officially doesn’t do CUDA 10.0.x, but I found this, worked perfectly: How to Install PyTorch with CUDA 10.0 - VarHowto
Installing:
pip install torch==1.4.0 torchvision==0.5.0 -f https://download.pytorch.org/whl/cu100/torch_stable.html
Testing installation and GPU:
import torch
x = torch.rand(5, 3)
print(x)
torch.cuda.is_available()
Nice discussion: How do you manage your dotfiles across multiple and/or new developer machines? - DEV Community
This article also provides a really nice explanation of the general practice that many people seem to be taking: store dotfiles in GitHub, and then install them via a simple script that symlinks files and runs any additional init logic.
… not that I’ve ever used it or plan to (google, don’t ban me before I finished switching to FastMail!), but - NewPipe supports searching and playing videos from Youtube Music!
Serial-position effect “is the tendency of a person to recall the first and last items in a series best, and the middle items worst”. Related is the Von Restorff effect about the most different stimuli being easier to remember.
.. never used it because didn’t find it pleasant to use because no scrolling and clicking as I’m used to, but I can fix this! Google told me I should install synaptics stuff and use synclient
to config it, but..
(21:30:13/11094)~/$ synclient
Couldn't find synaptics properties. No synaptics driver loaded?
Google led me here: x11 - synclient does not find synaptics properties despite Synaptics Touchpad in xinput list - Unix & Linux Stack Exchange
So in fact the “problem” is that touchpads is nowadays handled by
libinput
, not bysynaptics
. This is why xinput still lists the device, but synclient cannot find it.The touchpad properties can also be controlled using xinput, via
xinput list-props
andxinput set-prop
Which works! xinput set-prop $device $propID $value
, where the property id is given in parentheses in xinput list-props
output:
libinput Tapping Drag Enabled Default (330): 1
So I (in case gets reset after restart):
xinput set-prop 15 327 1 #enabled tapping
xinput set-prop 15 312 0 1 0 # scroll through side of touchpad
Interestingly, xinput set-prop 15 312 1 1 0
didn’t work, apparently I have to choose one. (Same for “click methods”)
Now we pray the xorg/synaptics drivers I installed at the beginning don’t mess up everything after restart ^^ I followed this: How to Activate Two-Finger Scrolling in Ubuntu 18.04 LTS
The ArchWiki is excellent as usual. TIL a tap with three fingers is a shortcut for “paste” and you can change/remap that as everything else! Wow.
TODO - play with buttons and three-taps and two-taps and the physical buttons. Also, where does it define that button N is “paste”? And which clipboard are we talking about?
And - I can do it with my usb mouse!
Extremely helpful answer: Revisions to Passing a dictionary to a function as keyword parameters - Stack Overflow
I also really like this approach:
A few extra details that might be helpful to know (questions I had after reading this and went and tested):
- The function can have parameters that are not included in the dictionary
- You can not override a parameter that is already in the dictionary
- The dictionary can not have parameters that aren’t in the function. Examples:
(Connects with my long-forgotten way of ‘after reading something, ask questions, try to find faults, try to find places this isn’t going to work, try to find connections with stuff you already know, try to find contradictions with stuff you already know’ etc., I have to start doing this again)
Main culprit is this code, and changing that value to anything makes life better:
.adg3 .issue-container {
max-width: 1280px;
}
This line toggles between solarized-everything1 and the above snippet for making jira wide again.
config.bind(',c', 'config-cycle content.user_stylesheets "~/.config/qutebrowser/css/solarized-dark-generic.css" "~/.config/qutebrowser/css/jira.css"')
Sadly no automatic per-website-css possible yet, it seems.
alphapapa/solarized-everything-css: A collection of Solarized user-stylesheets for…everything?