Craig Thrall

bokeh, matplotlib, and twinx

Feb. 9, 2016, 11:53 p.m.

The best way to have multiple Y ranges on a plot, and use Bokeh, is to not use matplotlib. The library that Bokeh uses does not translate the multiple ranges correctly. I found others with this issue. What worked for me is to skip matplotlib (I was lucky, this is new code), and "extra_y_ranges" to add additional Y ranges to my plot.

Computer Swap with Ubuntu

Oct. 26, 2015, 5:16 p.m.

If you swap a hard drive into a spare computer with identical hardware specs, remember the MAC address on your ethernet ports will be different. The OS will see them as new and rename them, and they will not match your configured device in /etc/network/interfaces. Before you swap the drive, delete any lines that exist in /etc/udev/rules.d/70-persistent-net.rules. The OS will add lines for the ethernet devices in the new computer. If you've already swapped the drive in, just delete the lines with the old device names, and rename the new renamed devices with the old device names.

Flycheck and C/C++

Sept. 24, 2015, 11:22 a.m.

I wanted to chain three different Flycheck checkers, and use the cppcheck "--enable=all" setting. Adding this to my Emacs init file did the trick: (add-hook 'after-init-hook #'global-flycheck-mode) (require 'flycheck-google-cpplint) (flycheck-add-next-checker 'c/c++-gcc '(error . c/c++-cppcheck)) (flycheck-add-next-checker 'c/c++-cppcheck '(error . c/c++-googlelint)) (custom-set-variables '(flycheck-cppcheck-checks "all"))

Compressing iPhone Videos

Aug. 27, 2015, 1:44 p.m.

I copied about ten videos from my iPhone 6, and wanted a way to compress them in format that could be played back on Windows without having to install a different codec. I also wanted to remove the audio. I ended up using this ffmpeg command in Linux: ffmpeg -i <input_filename> -vcodec msmpeg4v2 -an <output_filename>