Here I explain how to fix Python SSL errors when downloading web pages using the https protocol in Python (e.g. by using the urllib, urllib2, httplib or requests. This error looks like (possibly with a line number different from 509):

read more

Notifications on both apple watch and phone?

On Apple website, it says “Your notifications will go to your iPhone or your Apple Watch, depending on the device that you’re using.”

When I’m at home, I have my phone, computer, there’re clocks all over the house. So I take the apple watch off. However, since all notifications will send to my Apple Watch, I won’t get them from my phone. What can I do? There are two ways:

On the Apple website, it also says “If your iPhone is locked or asleep, you’ll get notifications on your Apple Watch, unless your Apple Watch is locked with your passcode.” So the first solution is to set passcode on your watch. You’re probably thinking, “But, I don’t want to enter a passcode on that tiny screen every time I want to use my watch.” Luckily, that’s not the case. You only have to enter the passcode on your Apple Watch in a few situations, such as when:

read more

How to check README.rst file before uploading to PyPI

During the first launch of a package, I went through a series of releases because of rendering issues of README.rst on pypi. I pulled up my new package on pypi and was met with unseemly, unformatted text instead of a spiffy display. To avoid that, you can use

python check --restructuredtext

It tested the READEM.rst locally, and it would “warn” you errors.

《Deep Learning》(深度学习)中文版开放下载

Deep Learning》(深度学习)是一本皆在帮助学生和从业人员进入机器学习领域的教科书,以开源的形式免费在网络上提供,这本书是由 Ian Goodfellow、Yoshua Bengio 和 Aaron Courville 合力打造。


read more

D-link DIR-628 connection dropouts


I am using a D-link DIR-628 and experiencing regular Wireless signal dropout. It is occurring on multiple wireless devices in my home, including a Macbook, an iPad, and an iPhone. It is hard for them to connect to the router when I come back home, and it frequently loses connection thereafter.

I am sure there is no problem of the incoming internet because my desktop that connects the internet via ethernet never dropouts. BTW, I am using a 5GHz wireless network, so there shouldn’t be many conflicts.

read more

How to use xRDP for remote access to Ubuntu

Since the current desktop manager of Ubuntu does not work with xRDP, an alternative desktop manager needs to be installed. In this post, we will use XFCE.

Install xRDP and XFCE

sudo apt-get install xrdp xfce4 xfce4-terminal gnome-icon-theme-full tango-icon-theme

Configure xRDP

First, create an .xsession file in the home directory.

echo xfce4-session >~/.xsession

Then edit the startup file for xRDP /etc/xrdp/

read more