How to fix Python SSL CERTIFICATE_VERIFY_FAILED

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 setup.py 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

Problems

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/startwm.sh.

read more