-
Yet another opml checker
Just wrote a opml checker to test invalid rss feeds for my feedly subscriptions. The biggest motivation is that 無名小站 was closed at 26 December, 2014. Most of my friends’ blogs cannot be reached anymore. Usage: $ opml-checker feedly.opml Source Code: https://github.com/yhchan/opml-checker Performance: It analyzes my 510 feeds in 80 seconds.
-
Use connection pool in Python Requests
Requests is a great library for performing HTTP related request and response. As it’s description, it supports connection pool automatically. Requests takes all of the work out of Python HTTP/1.1 — making your integration with web services seamless. There’s no need to manually add query strings to your URLs, or to form-encode your POST data.…
-
concurrent.futures.ProcessPoolExecutor.map may be slow in some cases
A simple test using Python 3.3 Sample Code Result References: concurrent.futures.ProcessPoolExecutor.map() doesn’t batch function arguments by chunks
-
Using wheel for python deployment
I’ve discussed with my colleagues for better deployment process which replaces existing RPM based deployment. There are several projects provides binary format, virtualenv manipulation, and caching for python deployment. For example: Terrarium pip-accel They are both great projects, but somehow our requirements are trivial Install python package system-wise (may not be virtualenv) Avoid binary recompile,…
-
Use textwrap.dedent
If you’re writing long string in python, it will break indent and look like the followings You can use textwrap.dedent to solve it
-
Taipei.py 5月「測試可以簡單一點嗎?」投影片
Source Code https://github.com/yhchan/taipei.py-2013-05-slides Slides 測試可以簡單一點嗎? 內容包含 tox 跟 testfixtures 的一些簡單的介紹
-
Using tox and jenkins to have python continuous integration environment
在看幾個 github 上的專案,像是 celery 都會發現他們的 repo 有一個 tox.ini,剛好手邊有個小小的 python 專案,就順便看一下 tox 是什麼。 節錄 tox 官網的介紹。 Tox as is a generic virtualenv management and test command line tool you can use for: checking your package installs correctly with different Python versions and interpreters running your tests in each of the environments, configuring your test tool of…
-
Filter is good
Java PHP Python JavaScript 憑著直覺寫的,如果不能動的話再說 XD 這種寫法通常好讀又簡單,不過有些語言要寫的囉嗦一點…
-
用 Microsoft Translator API 翻譯 properties 檔案
因為另外一套要錢,所以來用 Microsoft Translator API 隨手寫寫,一年沒寫文章,也許有點刻意,差不多該是改變的時候了。
-
Use VERSIONER_PYTHON_PREFER_32_BIT=yes in Snow Leopard
In python, you can use ctype (dl is deprecated now) to load dynamic link library. In 10.4 and 10.5 it may work fine, but it may occur errors in 10.6, such as /Library/Frameworks/dummy.framework/dummy: no matching architecture in universal wrapper Since the python in Snow Leopard is 64-bit in default, for those libraries which does not…