Interrupting an SSH session

I spend the majority of my days connected to remote servers via SSH. It’s a pleasant way of working in many aspects, but since I arrived in the US I’ve experienced my fair share of bad networks. At some points I’ve been thrown out from the network once a minute. In most cases, SSH is able to maintain the connection, but sometimes I have to reconnect. Unfortunately, SSH does not detect this right away. It just stands there, waiting for the connection to come back and doesn’t respond to signals while doing it.

Instead of closing the terminal window to speed up the restart of the connection, I have now found out that it is possible to close the connection using SSH escape sequences. In this case press Enter and then ~. to terminate the session. With ~? you can see other available escape sequences.


(Last?) First Post

So, I’m doing it again. Creating a blog that I probably won’t write anything in, that is. Anyway, I find this a bit more interesting than my previous attempts. This site was built using Jekyll, a static site generator. When I first heard about it I realized this was something I had been trying to achieve for a while; something where I could easily have a common header and footer for a website and just alter the main content. This is of course possible using e.g. PHP, but every time I’ve started such a project, I’ve ended up creating all kinds of “nice to have”-features that just ended up messing up the whole thing. I’ve also tried using Wordpress, but it’s just too bulky for my needs.


PLOS figures in R

I’m preparing a manuscript for PLOS ONE and saw this in the figure guidelines:

Figure text must be in Arial font, between 8 and 12 point.

Easy, I thought. Just a matter of specifying a font family in the device I print to.

Think again.


Authors and affiliations in LaTeX

Oh, that's right, I have a blog. Had almost forgotten about it.

I just faced the problem of setting multiple authors in a LaTeX document together with their affiliations. On top of that, one of the authors had multiple affiliations. Google returned this excellent answer on TeX StackExchange. In short; use the authblk package:


\title{More than one Author with different Affiliations}
\author[1]{Author A\thanks{}}
\author[2]{Author D\thanks{}}
\author[1,2]{Author E\thanks{}}
\affil[1]{Department of Computer Science, \LaTeX\ University}
\affil[2]{Department of Mechanical Engineering, \LaTeX\ University}


\thanks is useful to add footnotes to the authors, in this case their email addresses.


Python and XML

Today I faced a task where I had to parse huge XML-files. And when I say huge, I mean 6-14 GB. My weapon of choice is Python, since I’m comfortable with it. However, I had never parsed XML with it before. Because of the size of the files, it was unfeasible to load the entire file into memory, and for me that was not necessary either.


Minecraft: Pi Edition

I've never played Minecraft (if you don't count my futile attempts at playing Minicraft on my Windows Phone), but now it seems a (free) version of it is coming to the Raspberry Pi. Not only can you play it like the ordinary Minecraft, you can also program it in real time! Check out the video below.

So, if I haven't gotten started with Minecraft yet, this is a golden opportunity for some procrastination! It's hopefully going to be released by the end of this year, and I can barely wait!


Raspberry Pi Camera

My Raspberry Pi has been collecting dust for far too long now. I've had some projects in mind, but I haven't found any motivation for realising them yet. Now however, the Raspberry Pi camera is on its way! Hopefully it will be available sometime in the first half of next year, and I want one. For a while I've been thinking that I want to try to implement some machine learning methods for e.g. facial recognition, just for fun. This seems like a golden opportunity! It shoots 1080p at 30 fps according to DesignSpark.

Since I have a webcam in my computer, that should work as well, but I'm having trouble installing the Python bindings for OpenCV. It feels like I've tried every configuration possible, but I still can't get it to work. If I get some time on my hands I will primarily try to fix that, but the Raspberry Pi camera is a tempting option. Even if I get it to work on my Mac, I will probably buy it anyway.


Slow going

As of now, I’ve had Internet in my apartment for a few weeks, and as soon as I got it I apparently stopped posting here. Constructive, yeah I know.

Anyhow, today I had my start seminar for my PhD where I introduced my project to the rest of the group plus some other people. It went better than I expected, and I’m really excited to get started for real. However, there’s a lot of administrative stuff that has to be solved before I can really dig in.



I still don't have an Internet connection in my apartment, but now it should be on it's way!

Meanwhile, I found that this years Ig Nobel Prize in acoustics was awarded to Kazutaka Kurihara and Koji Tsukada for creating the SpeechJammer. It's a device that disturbs people's speech by simply playing back what the person is saying, but with a tiny delay. I've experienced this myself working at the technical support of a major swedish ISP. Sometimes I could hear my own voice in the headset, with a delay, and it was tremendously difficult trying to talk to the customer without stuttering.

If I only thought of this application back then (2007), I could've been awarded an Ig Nobel Prize instead. Ah, well...


Still no Internet

I'm still waiting to get the stuff I need to set up an Internet connection in my apartment. I couldn't imagine how restless I would become without an Internet connection, but it hasn't been all that bad. I managed to read through book six in the Dark Tower series by Stephen King, and I'm halfway through the seventh (and last) book. I highly recommend this series if you're a fan of the work of Stephen King, and even if you're not. I also managed to pick up an old hobby of mine; drawing. If I feel confident enough, maybe I'll post some of my drawings here.

Next week I will go to Umeå for some meetings, and a crash course in RNAseq data analysis. It'll be nice to come back "home" and see my girlfriend and her dog. Not that I don't like it here. I feel quite at home here in Norway. The people are friendly, and the infrastructure is nice. There's just one thing that I find really annoying: most supermarkets are closed on Sundays. That sucks.