In the middle of the desert you can say anything you want
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
I had two modules, both marked as source roots, with conflicting subfolder names. It could not find modules inside the second folder. Right click → Unload modules helped; I could unload the conflicting module, after this it happily started importing the files from the second source root. This is a band-aid fix but for now it works; TODO later find out a better way to solve these problems.
If not, there are always uglier hacks like sys.path.extend(['folder_marked_as_source_root_that_doesn't_seem_to_get_added_to_$PATH'])
An interactive shell can be used during debugging in intellij idea! See Interactive console during debug? – IDEs Support (IntelliJ Platform) | JetBrains
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()
withby_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.
Natural Language Processing exists and is surprisingly active.
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 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.
A Snowclone is a cliché and phrasal template that can be used and recognized in multiple variants.
Examples:
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.
watch
commandIt 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 - 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.
unittest
@skipUnless
Python unit testingmodels/transformer_main_test.py at master · tensorflow/models uses a neat thing:
@unittest.skipUnless(tf.test.is_built_with_cuda(), 'requires GPU')
def test_train_1_gpu_with_dist_strat(self):
FLAGS.distribution_strategy = 'one_device'
t = transformer_main.TransformerTask(FLAGS)
t.train()}
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:
setxkbmap -option -option 'grp:rctrl_toggle, compose:rwin' v4,ru &
xrandr --output HDMI-2 --mode 2560x1440 --pos 1920x0 --rotate normal --output HDMI-1 --off --output DP-1 --off --output eDP-1 --primary --mode 1920x1080 --pos 0x0 --rotate normal --output DP-2 --off
xcape -e 'Control_L=Escape' -t 100 &
xmodmap ~/s/mod4 &
keynav &
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.
From naming - What are the different kinds of cases? - Stack Overflow:
myvariable
my-variable
(this is the most famous. Other names include: caterpillar case, dash case, hyphen case, lisp case, spinal case and css-case)myVariable
MyVariable
(other names: capital camel case)my_variable
(other names: c case)MY_VARIABLE
(other names: upper case)COBOL-CASE
(other names: Train case)The following inside the .vimrc moves the selected line to the end of the file and takes the cursor back:
map <C-d> dGp''
For details, cursor movement - How do I jump to the location of my last edit? - Vi and Vim Stack Exchange.
From the first answer:
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).
tf.math.count_nonzero()
works for booleans, as in “number of True elements in tensor”
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.
concat.sh
to dtbOne 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:
cat * | grep -v "layout: post" | grep -v "categories: \[\]" > ../master_file.md
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.
Compass rose - Wikipedia, especially the names of the winds. I wonder if they could become names for hostnames/servers or something.
Simple Introduction to Convolutional Neural Networks is really nice and has pictures of swans.
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
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