It is a best practice to have a separate sandbox python from the system python. The guide below probably is the simplest way to install opencv inside virtualenv. The drawback though is that it won’t install the latest opencv. But if you just need something quick to get things running, the following probably is sufficient….
Category: About computer
Migrating wordpress to different server
I was migrating one of my wordpress site to a new server. I followed this digitalocean post to setup the server initially. It was my first time to try to migrate it to a new server. The following is supposed to work Setup nginx in new server as in the old server Copy /etc/letsencrypt folder…
Debugging Torch with Zerobrane
I am kind of new to Zerobrane studio and followed this guide to try to debug Torch code. However, I came across with the error attempt to index a nil value (global ‘utils’) for printf = utils.printf It turns out that the path was not setup correctly. In the config file (Edit | Preferences |…
Problem upgrading Tensorflow under Anaconda
I tried to upgrade tensorflow today. I have a virtualenv for version 2 installed under anaconda 3. If I simply run pip install -U tensorflow I got error like Cannot remove entries from nonexistent file /home/user/dummy/anaconda32/envs/tst/lib/site-pack ages/easy-install.pth It turns out that this appears to be a bug from Ananconda, adding “–ignore-installed” seems to be able…
Virtualbox usb not detected
It is quite annoying that usb does no longer work out of the box for Virtualbox with ubuntu host. The issue seems to affect multiple Linux distros. As of version 5.1.18, it seems that the bug is still not fixed. The workaround is not very complicated. But it is a nuisance nonetheless. Update: If…
Xournal for presentation
I am using more and more beamer this year. Since I used linux, I used to use evince to display my slides. But in my last class, I would like to write something on the slides and I was not prepared for that. My laptop is a nice good old X230t with a stylus on it….
A simple voting example with node.js
Backstory It started that I would like to have my students to vote for their peers’ presentations. And I don’t like to do it the old fashion paper way. I thought of using some commercial products. But since I was reading a little bit JavaScript couple weeks ago, I guess it probably would be a…
Why I use Linux
This is a re-post of a blog post I wrote for my department blog couple years ago. I just read it again and I found it still relevant. For those of you who have been to my office or have taken my classes will know that I am a big Linux fan. I started to…
Playing StarCraft on Ubuntu 14.04 and X230
I recently got a used X230 tablet and tried to have some fun on it. StarCraft runs well with wine but cannot run on full screen. One possible solution is to open another X server following this post. But I need some tweaks for 14.04 and for touch and stylus to work. First, one needs to add Section…
Goagent experience
I am in Shanghai a couple days and it is quite inconvenient with many websites blocked. I heard about “breaking” the wall but I didn’t realize it is quite fast and easy. All one needs is a software called goagent. It takes advantage of the google app engine. Here, I will assume that ones already…