rolisz's site

Sweating in Hong Kong

Landing in Hong Kong

Landing in Hong Kong

At the beginning of the year, a dear brother and good friend, whom I met in New York, invited me to his wedding which was going to be in Hong Kong. What better excuse to go to visit "China" than going for a wedding? This also made the decision of where to go on vacation this year quite easy to figure out. So we booked a hotel and the 12 hour flights, with a layover in Zurich, because we missed it/because it was the cheapest flight.

First impression after we got there: it's hot. Like really, really, really hot. And humid. Buckets of water continue.

Repairing Linux and Windows boot partitions

My Windows in­stal­la­tion was on a 120 GB SSD and I decided it was time to upgrade that to 256 GB. Because I didn't want to reinstall my Windows, I copied it with CloneZilla. Everything seemed to work fine, until I formatted the old partition. Then the Windows partition stopped booting. I could access the files from ArchLinux. I tried to run some commands from the Windows Recovery Console, but I held it wrong and the result was that my Archlinux stopped booting too! Yaaay.

After lots of digging on various tutorials, I managed to put together the following to fix it. First, download a Live continue.

Evaluating 2018 goals

Another half a year has passed from my latest goals and this is what seems like one of my worst per­for­mances so far. Turns out tran­si­tion­ing to a full time remote job is quite hard and time consuming. Also, not having a gym right at work makes it much harder to go to one :/

Weight watching
Ahahaha. :( I am "glad" to report that I am the same weight as I was when I posted this. Score: 0. At least I didn't gain weight (though I definitely got fatter :( )
Exercise three times a week
I averaged about 1.5 times a week. Score 0.5.
Juggle for 5 minutes continue.

Setting up SSH keys

Lately my computer network setup has grown more and more com­pli­cat­ed. I have my server in the cloud, a NAS, a desktop work machine, a laptop and soon some Raspberry Pis too. In order to be able to easily connect from one to another I need to setup SSH between them. The default arguments to generate the keys are insecure and many sites on the Internet don't follow the best practices, so I am writing them down here so I can find them more easily.

We first need to generate a key on the source machine. There are several options available for algorithm choice: RSA is older, continue.

The Expanse

The Expanse poster

I'm a huge sci-fi fan. I love sci-fi TV shows, but in the last couple of years, most of them have been... lacking, to put it gently. But finally, Sy-Fy made a new great show: The Expanse, based on a novel by James S. A. Corey.

The Expanse is a space opera, set two hundred years into the future. Humanity has colonized most of the solar system, but they haven't managed to get any further. Most asteroids have colonies on them, either for mining(Ceres) or for growing food (Ganymede). Mars has broken free of Earth control and the two are in constant political struggle with each other, continue.

Fiddler on the Roof

Fiddler on the Roof

The last time I went to the theater was sometime in elementary school. I think it might have been The Lion King, but I'm not sure. I definitely don't remember anything that happened on stage. I vaguely remember the chairs and some of my classmates.

But about a month ago, my wife told me that the theater from Oradea will be doing The Fiddler on the Roof and that they still have tickets. She was going to have an exam that day, so what better way to relax than to go to the theater?

I have seen the movie twice and I really liked it. continue.

Regular Expressions for Objects

For work I recently needed to do something that is very similar to regexes, but with a twist: it should operate on lists of objects, not only on strings. Luckily, Python came to the rescue with REfO, a library for doing just this.

My usecase was selecting phrases from Part-of-Speech (POS) annotated text. The text was lemmatized and tagged using SpaCy and it resulted in lists of the following form:

s = [['i', 'PRON'], ['look', 'VERB'], ['around', 'ADP'], ['me', 'PRON'],
 ['and', 'CCONJ'], ['see', 'VERB'], ['that', 'ADP'], ['everyone', 'NOUN'],
 ['be', 'VERB'], ['run', 'VERB'], ['around', 'ADV'], ['in', 'ADP'],
 ['a', 'DET'], ['hurry', 'NOUN']]

From these sentences we want to extract human continue.

Real estate cohort analysis

After in the last post we looked how to get the data, now we are going to start analyzing it. The first question we are interested in is how quickly do houses sell. We don't have access to actual contracts, so we will use a proxy to measure this: how long is an ad­ver­tis­ment for a house still displayed. We are going to estimate that this is roughly the time it takes to sell a house.

We will do a cohort analysis, where each cohort will be composed of ads that were shown for the first time on that day and we will track what continue.

Scraping for houses

Having moved back to Romania, I decided I would need a place to live in, ideally to buy. So we started looking online for various places, we went to see a lot of them. Lots of work, especially footwork. But, being the data nerd that I am, I wanted to get smart about it and analyze the market.

For that, I needed data. For data, I turned to scraping. For scraping, I turned to Scrapy. While I did write a scraper 5 years ago, I didn't want to reinvent the wheel yet again, so I turned to Scrapy because it's a well-known, much used scraping framework in continue.

Synology and Docker

After more than a year of using my NAS only to collect dust and the occasional backup, I decided this month to start self hosting various web apps on it. Synology has a visual Docker interface, so I installed that and I started trying to install my first app: Monica, which is a personal re­la­tion­ship manager (I love to track things).

Un­for­tu­nate­ly, modern technology has not yet solved this problem of deploying apps seamlessly. :(

Installing from the Docker registry

Installing Monica from the Docker registry

Installing the Monica Docker container was fairly simple: you search for it, click download, set the en­vi­ron­ment variables in the GUI, carefully copy pasting their names from the doc­u­men­ta­tion, continue.