This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import base64 | |
| def baseurl(url): | |
| if url.startswith('thunder://'): | |
| url = url[10:]+'\n' | |
| url = base64.decodestring(url) | |
| url = url[2:-2] | |
| elif url.startswith('flashget://'): | |
| url = url[11:url.find('&')]+'\n' | |
| url = base64.decodestring(url) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get install python-numpy python-scipy | |
| # below is optional | |
| sudo apt-get install python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| def download(url, save_path, chunk_size=10*1024*1024): | |
| r = requests.get(url, stream=True) | |
| with open(save_path, 'wb') as fout: | |
| for chunk in r.iter_content(chunk_size): | |
| if chunk: # filter out keep-alive new chunks | |
| fout.write(chunk) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| * { | |
| -webkit-font-smoothing: antialiased; | |
| font-family: 'Lantinghei SC', 'Open Sans', Arial, 'Hiragino Sans GB', 'Microsoft YaHei', 微软雅黑, STHeiti, 'WenQuanYi Micro Hei', SimSun, sans-serif; | |
| /*font-family: helvetica, Arial, 'Hiragino Sans GB', 'Microsoft YaHei', simsun;*/ | |
| font-size: 18px; | |
| line-height: 1.5; | |
| word-wrap: break-word; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo apt-get install libxml2-dev libxslt1-dev python-dev zlib1g-dev | |
| pip install lxml |