Book Review: Swastika Night

I read this book a while back and thought it was alright. But then I read that it was written before World War 2. It predicts that both the Nazis and the Imperial Japanese conquer the world.

Is there a name for this construction?

Construction

Fun with negation and idioms

This is trivial but kind of fun.

How to change tabs to spaces

find [options here] -exec bash -c 'expand --initial --tabs=4 {} | sponge {}' +

Another Way to Write Conditional Probability

The \(p(\cdot | B)\) notation is convenient sometimes, but other times it obscures what’s going on, like in the definition of conditional independence and the law of total probability (when you fix the conditioning event).

Notes for May 9, 2019

  • Spotify’s “Medieval ambient” in your house is a great way to feel like you’re in Skyrim, especially when Streets Of Whiterun is playing.
  • Seabreeze Cafe has good fried catfish
  • I’m writing this because my post on math notation proved a lot longer than expected, so I’m copping out.

A tool to look at random images

It’s useful to look at image data before you do any ML with it. Usually I want to look at random samples. So I wrote a tool to do it. Actually, I wrote the same tool 3 times (today afternoon), improving something else each time.

Safeway

Apparently if you ask for a sample of any food or drink1 at Safeway, company policy is that they have to give you it. Even for fancy stuff like smoked salmon. Though they’ll throw away any open packets, so that’s on your conscience.

  1. Except alcohol. 

e-ink reminisces

I just remembered1 a Cisco employee event my dad took me and my brother to when I was about 8, around 2003.

  1. At 2:23 A.M. because of course that’s when I’d when I’d remember. 

Edwin Edwards

Former governor of Louisiana. All sorts of stuff wrong with him, but man, he had the quickest wit of any politician ever when it came to retorts.

Middle School by Bo Burnham

I’ll use middle school and high school interchangeably.

How to Disable Disqus Ads on your Blog

This only works if your blog is noncommercial.

Derivation of Reservoir Sampling

I had to implement reservoir sampling during an interview and I had no idea how to do that. So I had to figure it out on the spot. This is where all those years of induction paid off, since there’s a nice derivation based on writing down the definitions of everything and noticing that there’s a natural inductive pattern.

Fun with Python Iterators: Linked Lists Made Easy

This requires Python 3.7+, since I use the handy dataclasses library.

Notes for November 11, 2018

The final disappointment of heroism is to find that a just war was, in the end, just a war.

Underrated Vim Option: undofile and undodir

A feature I enjoy using myself is not known to many users, as I found out last weekend. Besides undo with as many levels as you like, Vim also offers storing the undo information in a file. So you can exit Vim, reboot your computer and still undo changes you made. See the help for undofile.

– Bram Moolenaar (Vim maintainer)