2015-12-20

[SHARE] Top 10 Python libraries of 2015

Top 10 Python libraries of 2015
As the new year approaches, we often sit back and think about what we have accomplished in 2015. Many of our projects would not have been as successful if it…

via Instapaper http://ift.tt/1mlUtTO

2015-12-19

[SHARE] Analyzing 91 years of Time magazine covers for visual trends - PyImageSearch

Analyzing 91 years of Time magazine covers for visual trends - PyImageSearch
Today’s blog post will build on what we learned from last week: how to construct an image scraper using Python + Scrapy to scrape ~4,000 Time magazine cover…

via Instapaper http://ift.tt/1Lk0RD4

Reverse HTTP (PTTH)

Reverse HTTP 是基於 HTTP 制定的通訊協定,其縮寫為 PTTH。目的為將使用者端(client)發送請求(request)而伺服器端(server)回應(response)的行為反轉,變成伺服器端發送請求而使用者端回應。透過這樣的反轉機制,使用者端可以接收從伺服器端發出的事件(event)或通知(notification),如此一來使用者端就不需要定期詢問伺服器端的狀態,伺服器端有發生變動時,會透過 PTTH 連線通知使用者端。使用範例可參考 Reverse HTTP。這個通訊協定為草稿階段(here)。會發現這個通訊協定是因為Apple TV利用 PTTH 來通知手持裝置影片的播放狀態的改變。

我在 GitHub 上發現有 Ruby 的實作(here),但是沒看到有 Python 的實作,因此就自己做了一份 Python 版的 PTTH Client (here)。原本想把實作建構於 Requests 之上,但是不知道怎麼取得 Requests 中 socket 的控制權,以便接收伺服器端的請求,因此直接用 socket 實作。

2015-12-13

[SHARE] Install OpenCV 3.0 and Python 2.7+ on OSX - PyImageSearch

Install OpenCV 3.0 and Python 2.7+ on OSX - PyImageSearch
As I mentioned last week, OpenCV 3.0 is finally here! And if you’ve been paying attention to my Twitter stream , you may have noticed a bunch of tweets…

via Instapaper http://ift.tt/1R0sAJo