Reminders for myself for next time I re-install Regolith Ubuntu

  • Don’t try to install wifi drivers by downloading them on a USB and copying them over. You will be in dependency hell. Plug your phone in to tether the internet connexion, get the wifi drivers, then proceed normally
  • To get Bluetooth working:
  • Install Gnome-Tweaks, then change Appearance > Themes > Applications to Adwaita; there is no other way to have a non-dark theme
  • To install R:

Risk that a queer character was written for straight comfort assessment tool

Download as an .odt file

The following is a tool for assessing the risk that a fictional character was written mainly for the comfort of straight people. The version from 2020-04-15 is an early draft and will almost certainly be modified later.

Name of queer character and media in which they appear
Section A total
Section B total
Summary score: 30 + (Section A total) – (Section B total)

Section A

“Gay people just look like … people”

– Fucking JK Rowling

Score 0 for “doesn’t apply”; 1, “possibly or probably”; 2, “yes, for certain.”

StatementScore (0-2)
“They’re not a gay character; they’re a character who happens to be gay”
Frames queer rights mainly or exclusively in terms of “love wins,” “love is love,” etc.
Police officer, military or clergy
Regards gay marriage as the end-goal of the gay rights movement
Overtly patriotic
Has adopted children or children by surrogate
White gay man with no mental health issues
Sweater-vest or other non-threatening clothing
It would be in-character for them to say, “I’m not like other queer people”
Votes Republican
If trans, this character or their story uncritically places a high value on “passing”
“They break gay stereotypes”
Married or monogamous
Upper middle class
Encounters and overcomes the kind of discrimination that lets straights say “I would never do that”

Section B

“That thing that only gay people do? I hate it for non-homophobic reasons.”

– Old straight-people proverb

Score 0 for “doesn’t apply”; 1, “possibly or probably”; 2, “yes, for certain.” For Section B, score 0 if the statement applies, but only as a cautionary tale, a joke or a character flaw.

StatementScore (0-2)
Is trans
Has casual sex
Character highlights an intersection of queerness (e.g. being queer and Black)
Kink or fetish
Is single or has more than 1 partner
Lower level of formal education
Has difficulty with, or is critical of the police or other existing power structures
Engages in some stereotypically gay activity
Financial difficulty
In the closet, at least in some contexts
Flamboyantly gay or otherwise clearly queer-coded
Politically active in progressive causes
Sex worker
Depiction as a “good” character doesn’t depend on how chaste they are

Summary result

The range of possible scores for sections A and B are 0 to 30. These statements have been equally weighted, however there may be cases where some of them are important or even defining to the queer character in question and should be weighted more heavily.

Subtract the score from Section B from the score for Section A and add 30 for a single summary measure ranging from 0 to 60. The higher the score, the more likely it is that the character was written for straight comfort.

Introducing PubMed NCT Extractor

Inspired by talks at the 2019 METAxDATA un-conference, I wrote a little meta-research tool to batch extract (“NCT”) numbers from PubMed XML search results and test whether they correspond to legitimate entries.

It’s written for Python 3 on elementary OS 5.1, so I can’t guarantee it will work on anything else. I also wrote a paper based on this tool that I’m currently sending to journals for review. If you’re interested in reading a draft, let me know and I’ll be happy to share it with you.

You can get the code from Codeberg! If you try it out or use it for something, let me know!

The Stradivarielzebub: making an electric fiddle

On October 7, 2018, I was looking at electric fiddles, as is my habit from time to time. If you’ve never seen an electric violin before, you should check them out. They’re often shaped differently from acoustic violins and they are strange and wonderful. My favourite ones are the ones that look like skeletons of a violin. On a whim, it occurred to me that an electric fiddle that was gold-coloured would be a fun Devil Went Down to Georgia reference. So I started looking around and I couldn’t find one. Maybe I’m bad at online shopping, but as far as I could tell, they were just not for sale.

My current fiddle teacher has an electric fiddle that’s made of plexiglass, so it’s see-through, with multi-colour LED’s, and I suppose, partly inspired by that and by the lack of gold fiddles, I started looking into how hard it would be to make one myself. It turns out, it is very difficult to make a violin of any kind, however it is much less difficult to make an electric violin than it is to make an acoustic one.


I started by drawing out some concept sketches for the fiddle. If I was going to make the fiddle of the Devil himself, it would need some artistic flourishes along those lines.

Then I took some measurements from my acoustic fiddle, did some research, made a few assumptions, and drew a more specific plan.

Making rough cuts

My boyfriend and I went to the hardware store, picked out the wood and went to his father’s garage, to borrow his tools. I did the measuring and the drawing. My boyfriend operated the machines. His brother cut a small piece of metal for us to use to brace the strings at the back of the scroll.

It makes me really happy that this is a project I got to do together with my boyfriend and his family.

We had a couple false starts, but we’re starting to get the hang of it now!


Sanding is one of those things that’s terrible to have to do, but very satisfying to take before and after pictures of.

Staining and gluing the fingerboard on

Burning “Homo fuge” on the back

In Marlowe’s Doctor Faustus, after he cuts his arm to get the blood to sign the contract with Mephistopheles, his arm is miraculously healed, and as a warning from heaven, the words “Homo fuge”—”fly, o man” in Latin—appear there, as a warning for him to get out of that situation. So it seemed appropriate to burn that into the back of the neck of the Stradivarielzebub.

Gluing the pieces together

Applying varnish and tuning pegs

The (almost) final product

On October 7, 2019, we actually strung the fiddle and plugged it in to an amp for the first time.

But does it play?

What’s next?

So there’s a couple things that are left. I want to gild the tail and scroll with gold leaf, so that it can properly be referred to as a “shiny fiddle made of gold” as per The Devil Went Down to Georgia, and there’s a couple small adjustments that I’d like to make so that it’s a bit more playable. Even today, a day later, I’ve taken the strings off again to fix it up, and there’s a few things I want to do to make it better.

And I’ve already got a sketch for what to do for the next violin!

Update: 2019-10-11 (gold leaf; minor adjustments)

I took the fiddle apart for a couple days, made the adjustments I meant to, and put gold leaf on the Devil’s horns and tail. The Devil as they say, is in the details.

Putting gold leaf on something is terrible to do. It’s like working with tin foil, but a tin foil that’s so thin, if you breathe on it too hard, it’ll rip.

And here’s the final result!

Can you predict the outcome of Canada’s 43rd federal election?

In 2015, I collected predictions for the outcome of the federal election. It was a semi-scientific, just-for-fun endeavor, but one that I want to try again. When I was done, I analyzed the predictions and wrote up a little report, available on my blog.

This election is looking to be a close call (again), so I’m collecting predictions just for fun. Tell your friends!

I’m offering a beer to whoever (over drinking age) makes the best prediction.

Here’s the link:

You can make as many predictions as you like (but please give me an email address if you make more than one so I can combine yours together in analysis). The page will stop accepting new predictions when the last poll closes in Newfoundland on 2019 October 21.

Getting fountain-mode in Emacs working with imenu-list-mode and writeroom-mode

So I was playing around in Emacs recently [insert obligatory joke here] and saw a working environment that looked kinda like the following:

Emacs fountain-mode with olivetti-mode and imenu-list-minor-mode

I wanted to try it out, but some of the documentation for how to do so was missing. I did some searching around and contacted the people who run that site and was able to get my system to look the same, at least in all the ways that were relevant to me.

So, I wrote it all down, mostly for my own reference later, but maybe you will find it useful too.

My setup: elementary OS v 5.0 (based on Ubuntu 18.04) and Emacs v 25.2.1.

I’m going to assume that the reader knows how to use Emacs as a regular text editor already. There’s a tutorial built into Emacs that is better than what I would write anyway, so if this is your first time using this text editor, I recommend going through it.

Fountain is a markup language for screenwriting. Similar to Markdown, it is unformatted text that many common text editors can parse to apply a simple set of formatting rules. This allows one to focus on writing the story, rather than the details of making sure that Microsoft Word or whatever is correctly applying your stylesheets.

Installing Emacs packages

From inside Emacs, type:

M-x package-install RET fountain-mode RET

This will install the major mode for editing .fountain files. Now, if you open an example .fountain file, it should be parsed with the appropriate markup rules and have syntax-appropriate highlighting and formatting applied.

At this point, you can also already export the .fountain file as a file to be typset by LaTeX into a PDF, or an HTML file to publish online or a couple other formats.

M-x package-install RET olivetti RET

This command will install olivetti-mode, a minor mode which allows one to constrain the width of column in which you’re typing, regardless of the width of the window in which it is contained. This also eliminates distractions in one’s writing environment, as the number of characters you will see across a text file are consistent. This also reduces eye strain, because you can now maximize the window to cover your entire screen without having to follow a line of text that is hundreds of characters long.

M-x package-install RET imenu-list RET

This command installs imenu-list, a plugin that creates an automatically updated index for an Emacs buffer. This will help with navigating your document while you’re editing it.

M-x package-install RET writeroom-mode RET

This command installs a minor mode that makes Emacs go full-screen, and provides a “distraction-free” editing environment.

Installing Courier

Download Courier Prime Emacs, and install on your computer.

To make this work with fountain-mode, go to: Fountain > Customize Faces from the menu bar.

Fountain > Customize Faces in Emacs

This will bring up a page where you can customize the formatting applied in fountain-mode. Scroll down to the first “Fountain face / Default base-level face for ‘fountain-mode’ buffers.” Click on the disclosure triangle to the left of where it says “Fountain” and then click on “Show All Attributes.”

Click the “Font Family” box and then type “Courier Prime Emacs,” then click the “Height” box, change the units to 1/10 pt and enter “120.”

Now click the “State” button and “Save for future sessions.”

When you open fountain-mode, the font will now be 12pt Courier!

Turning these modes on automatically

Right now, fountain-mode should already start automatically when you open a .fountain file, but we want to have olivetti-mode too, as well as an imenu buffer for ease of navigation.

To have fountain-mode start other minor modes when it starts, go to: Fountain > Customize Mode from the menu bar.

Fountain > Customize Mode in Emacs

This will bring up an editor with a lot of options. Scroll down until you find “Fountain Mode Hook / Hook run after entering Fountain mode,” then click the disclosure triangle.

You can uncheck turn-on-visual-line-mode, because this is done by olivetti-mode.

Click the “INS” button and type “olivetti-mode” in the grey text box.

Click “INS” again and type “imenu-list-minor-mode” in the grey text box.

Click “State” and then “Save for future sessions.”

When you’re done editing it, it should look like the following:

Fountain Mode Hook editor

Now when you open a .fountain file, olivetti-mode and imenu-list-minor-mode will start.

I did not tell it to start writeroom-mode automatically, because I personally don’t always want that. If you want to start writeroom-mode, type the following command:

M-x writeroom-mode RET

This will make the current buffer full-screen, and it will hide the imenu buffer. If you want to see the navigation again, the following commands will work:

C-x 3
C-x o
C-x b

The first command listed above splits the window vertically, the second moves the focus to the new window (optional) and the third one prompts you to choose which buffer to switch to.

Type *Ilist* to select the buffer with the scenes and sections menu. Drag the vertical column divider to your liking and enjoy your distraction-free workspace!

But wait, I want to export to PDF

To export your screenplay, Go to Fountain > Export > Buffer to LaTeX.

If your .fountain file is named screenplay.fountain, then it will make a new file in the same directory named screenplay.tex.

LaTeX is not a PDF, but it’s a step in the right direction.

Open the terminal and type the following:

$ sudo apt install texlive-xetex

It will ask for your admin password, and then start installing some software. Once it finishes (it may take a while), in the terminal, navigate to the directory where your .tex file is saved and type the following:

$ xelatex screenplay.tex

This will produce a new file called screenplay.pdf, which will be your printable, final output. Note that section headings (if you used them in your .fountain file, they would have started with #’s) and comments are not included in the final PDF. They are for the writer’s reference only.

Here’s an R function that you can use to download clinical trial data

Sometimes you need to look at a lot of sets of clinical trial data, and you don’t want to go to and do searches manually, then save the files manually, then load them into R or Excel manually to get your work done.


get_ct_dot_gov_data_for_drugname <- function (drugname) {

   temp <- tempfile()

   download.file(paste0("", URLencode(drugname, reserved = TRUE), "&flds=a&flds=b&flds=y"), temp)

   trial_data <- read_delim(
     escape_double = FALSE,
     trim_ws = TRUE


   return (trial_data)


So here’s a function that you can use to download all the trials for a given drug name, and it returns a data frame with the trial metadata.