R function for calculating confusion matrix rates

Last updated: 2023/03/10 I often forget the names and aliases (and how to calculate them) of confusion matrix rates and have to look them up. Finally, I had enough and was looking for a single function that could calculate the most commonly used rates, like sensitivity or precision, but I couldn’t find one that didn’t…

Continue Reading

Grepping PowerPoint files

Last updated: 2023/03/07 I’m not really a fan of PowerPoint but it’s ubiquitous in research, so I have to work with them. Sometimes I need to find a slide amongst a pile of PowerPoint files and waste a lot of time opening and closing files. I wondered whether I could grep PowerPoint files and sure…

Continue Reading

Running RStudio Server with R-4.2.2 with Docker

Last updated: 2023/02/28 Recently I have gotten several messages from users having problems with running RStudio Server with the latest R version (4.2.2) from The Rocker Project. The latest RStudio Server image is based on r-ver:4.2.2, which is based on ubuntu:jammy (Ubuntu 22.04). The RStudio Server image for r-ver:4.2.0 is based on ubuntu:focal (Ubuntu 20.04)….

Continue Reading

TIL that you can customise BLAST output

I am going to start a new series of posts based on new things (new to me) I learned about recently and they will be included in the TIL category. I learned about TIL from the bird app a while ago and it is based on the popular subreddit todayilearned. I used to post TIL…

Continue Reading

Stop BLAST from phoning home

Some time back I learned from Devon Ryan on the bird app (no link because I have stopped using said app) that BLAST phones home every time you used it, by default. I was never aware of this until I saw the post and I’m not really a fan of having this turned on by…

Continue Reading

Learning about ChatGPT via ChatGPT

By now you have probably heard of ChatGPT and may have already been testing it out. If you haven’t, you should check it out. In this post, I paste some of the answers ChatGPT came up with for questions I asked it and I finish off with some of my own (imperfect and human-generated) closing…

Continue Reading

Bash script that accepts short, long, and positional arguments

I asked ChatGPT to "Write me a Bash script that accepts short, long, and positional arguments" and it came up with the following: #!/bin/bash # Define short options options=":s:l:" # Define long options long_options=("short-option:" "long-option:") # Parse options and arguments while getopts "$options" opt; do case $opt in s) short_opt_arg="$OPTARG" ;; l) long_opt_arg="$OPTARG" ;; \?)…

Continue Reading

Running RStudio Server on Amazon EC2

I recently purchased an ASUS Chromebook as I wanted an affordable and portable (lightweight and decent battery life) laptop. The Chromebook can run Linux (Debian by default) using ChromeOS’s Linux development environment, so it essentially has everything I need for work. RStudio is an essential tool for my work and I could install and use…

Continue Reading

Amazon Elastic Block Store storage

Amazon Elastic Block Store (EBS) is a block-level storage that many EC2 instances use as storage (as the only option). Therefore if you plan to use EC2 instances, you should learn more about EBS or you’ll find out the hard (pricey) way that you can still get charged even with a stopped instance. EBS volumes…

Continue Reading

Twelfth year: Python

As this blog enters its twelfth year, I am finally using Python instead of Perl as my scripting language of choice (which is contrary to what I said two years ago!). As I wrote in my learning Python repo, my interest in deep learning finally tipped me over since several popular deep learning frameworks (TensorFlow,…

Continue Reading