Keep Sharp

Android Coordinates: Camera, OpenCV in JNI, Canvas

This tip is about camera related coordinate system in android. When i develop camera related apps, inside onPreviewFrame() i need to do image processing on byte[] data and show results on top of the canvas and i use OpenCV for the image processing in jni. So the whole workflows is ...

Select PyQt4 rectangle by edge/stroke

This tip is about how to make pyqt4 rectangle selectable by its edge (or you call it stroke), by default it's selectable by inner area. To achieve this, basically you need to subclass QGraphicsRectItem and overwrite its shape() function so that its shape is not an area but a ...

Update Matplotlib Plot

This tip is about how to update matplotlib plot, it is based on this great tutorial: Speeding up Matplotlib

I learned two ways of updating matplotlib plot, both require first manually change the content of objects that to be updated. For example, lineObj.set_ydata() for line object, vlinesObj.set_paths() for ...

Debug Python code using Wingdb

This tip is about using wingide 's debugger to debug your python code. Sometimes the python code can run from terminal but not from wingide ui, it mostly is because the python related environmental variable settings are different when python kernel is start from terminal and from wingide. In this ...

Log of Setting Up Deep Learning Environment in Ubuntu14.04

[Hardware] Beginner's Configurations

  • EVGA Nvidia Graphics Card variation explaination

    • ACX 2.0+: advanced air cooling system
    • SC: slightly super clocked
    • Classified/FTW: highest super clocked
    • Hybrid: water loop cooling system
    • BP: pure esthetic considerations, black plate
    • K|NGP|N: pre-binned gpu
    • ideal options: GTX980Ti ACX 2.0+; GTX980Ti SC ...

Set Up VNC on CentOS

install tigervnc

yum groupinstall Desktop
yum install tigervnc-server

modify /etc/sysconfig/vncservers file

VNCSERVERS="1:user1 2:user2"
VNCSERVERARGS[1]="-geometry 1024x768 -localhost"
VNCSERVERARGS[2]="-geometry 1920x1080 -localhost"

-localhost option is to make vnc encrypted through an ssh tunnel

modify /etc/sysconfig/iptables file

add one line:

-A INPUT -m ...

Collection of Bloody Lessons

This will be the logs of my struggling in fixing all kinds of messy bugs

01/03/2015: converting ipython notebook into html, style is ugly, math symbols and tabels in markdown cell are not rendered, no title of the html page

Reason:

  • I was using ipython 1.2.1 ...