serhii.net

In the middle of the desert you can say anything you want

13 Feb 2020

Day 409

unittest @skipUnless Python unit testing

models/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()}

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:

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 &
Nel mezzo del deserto posso dire tutto quello che voglio.