Tag: misc

Interactive Voting System Simulator

Ka-Ping Yee's [cached]blog post about election methods and how to visualize them has long been one of my favourites. As always, a well chosen diagram or picture is much easier to understand than a verbose description, and can make corner cases directly leap into our face. The human visual system is a powerful pattern detector, we should make use of it whenever we can!

Inspired by Yee's blog post, I made an interactive simulator to allow you to explore the four main voting systems directly in your browser: Plurality (aka first past the post), Approval, Borda and Instant-runoff (Hare …


Taking Notes

Recently, I was once again looking for a note taking solution. Over time, I had used many: Evernote, a markdown based one I wrote myself, Joplin. For one reason or another, I had stopped using each of them in turn.

My requirements were simple:

  • Linux and Android support
  • Markdown first, with syntax highlighting
  • Automatic synchronization of all my devices
  • Plaintext backup to simple files, for easy migration
  • Copy & paste to insert images
  • Full-text search.

And the most important: Does it spark joy?

The best note-taking solution is of no use if you don't consistently use it. After trying many alternatives …


Open-Source MuZero Implementations

I'm sometimes asked if I'm aware of any open-source implementations of [cached]MuZero. In addition to the [cached]official pseudocode, a variety of researchers have made their own implementations and shared them online.

I have not checked these for correctness or completeness, but I still believe that you may find them useful. In no particular order:

If you know any others, please let me know and I'll add them!

If you want to replicate MuZero or try other RL ideas on …


Installing CUDA on Ubuntu 19.10

I just installed CUDA on my Ubuntu 19.10 desktop, and it was a pretty quick process, if non-obivous.

  1. Installed base CUDA with apt install nvidia-cuda-toolkit
  2. Downloaded libcudnn from [cached]nvidia and installed with dpkg -i. (I couldn't find it in the official Ubuntu repo, let me know if it is there)
  3. Set XLA_FLAGS=--xla_gpu_cuda_data_dir=/usr/lib/cuda/ so JAX can find the installed libraries.

Fixing stuck login screen for Ubuntu 19.10 and i3

Since upgrading to Ubuntu 19.10, I've had the issue that Ubuntu would just get stuck before or after the login screen.

After some searching I found the recommendation to remove quiet splash from the grub options, and indeed that fixes the issue for me!

Specifically, at the stuck login screen, change to a terminal by pressing e.g. ctrl+alt+f4, login, then run sudo nano /etc/default/grub to edit the configuration for grub (the bootloader). Find the line that says

1
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

and change it to

1
GRUB_CMDLINE_LINUX=""

save the file, then run sudo update-grub …


Splitting >4 GB ISO files for isostick

This is more of an archival post for myself since part of the documentation for [cached]isostick (a USB stick that can emulate optical drives) is down and the project does not seem maintained any more.

Since isostick only supports FAT32 filesystems, ISOs larger than 4 GB need to be split up into multiple parts.

Here's the explanation for how to do this from the now offline isostick forum:

The isostick can only read files from FAT32 partitions. Unfortunately, FAT32 has a maximum file size of 4GB. To overcome this, isostick can read ISO files which are split into multiple …


xmodmap and Umlaute

If you speak German but prefer using an English keyboard layout for programming (dvorak in my case), then you will frequently face the issue of how to conveniently enter Umlaute.

Luckily, there's an easy solution with xmodmap, just add the below to your .Xmodamp config:

1
2
3
4
5
6
7
8
clear mod1
keycode 108 = Mode_switch
add mod1 = Alt_L

keysym a = a A adiaeresis Adiaeresis
keysym o = o O odiaeresis Odiaeresis
keysym u = u U udiaeresis Udiaeresis
keysym s = s S ssharp

Where 108 is the keycode returned by xev for your Alt key.


Remap Caps Lock to Tab

Don't want to waste prime keyboard real estate on a key you never use?

First, find out the keycode of your Caps Lock key: run xev, repeatedly press Caps Lock, note the keycode you see in the logs.

Next, create or append to the .Xmodmap file in your home directory:

1
2
clear Lock
keycode 66 = Tab

Where you replace 66 with whichever keycode you saw in the output of xev.

Finally, load the map: xmodmap .Xmodmap.

You can of course replace it with any other key as well, not just tab.


Linux on the Alienware 13 R3 (2017)

I recently bought a new laptop because my trusty old Thinkpad (x230) finally got a bit too old for my taste (apart from the battery it still works perfectly though!).

After a lot of searching around and gnashing of teeth - how can current laptops be barely faster than my 4 year old Thinkpad?! And what do you mean, the laptop comes with at most 16 GB of RAM and I can't even upgrade it?!

Finally, I settled on the Alienware 13.

As a gaming laptop, it has a quad core i7 - 7th gen Kaby Lake - and a great GPU, the …


Standing Automation

I've had a standing desk at work for a long time, but I've always felt that I wasn't using it enough, that I still spent most of my timing sitting.

This week I finally decided to do something about it.

LV-MAXSONAR-EZ1

I bought a small sonar sensor (LV-MaxSonar-EZ1), hooked it up to an Arduino and added a little Python script to sample the sensor once a minute.

The sonar is mounted to my table and measures the distance to the floor, and with ~3 cm accuracy it's very easy to distinguish whether I'm sitting or standing.

Since the Sonar happily runs …

© Julian Schrittwieser. Built using Pelican. Theme by Giulio Fidente on github. .