蠎周刊 160: 蛋

原文: Pycoders Weekly (Issue #160): Egg 搜罗Py万物 的周刊 亲, Lots of releases have happened since last week it seems! Enjoy and Have a great weekend 大家多分享文章 俺们才折腾的出又一周的美好呢. 喜欢就 在 Gratipay 支持俺们吧! 当然的,俺们也在twitter ...

2015-04-04 · 3 min · 1144 words · ZoomQuiet

蠎周刊 159: Tapas

原文: Pycoder’s Weekly (Issue #159): Tapas 搜罗Py万物 的周刊 亲, 大家多分享文章 俺们才折腾的出又一周的美好呢. 喜欢就 在 Gratipay 支持俺们吧! 当然的,俺们也在twitter 新闻 PyPy 2.5.1 发布! 菠萝凤梨(Pineapple Bromeliad)已经发布, 详细点击链接进入. blogspot.ca Shared by @myusuf3 讨论 你在工作生活中都用 Py 搞过哪些自动化? reddit.com Shared by @myusuf3 (是也乎: 果断和我们折腾过的一样哪,自动化: 下载 提醒 邮件 翻译 数据清理 录音 录像 关机 ,,, ) ...

2015-03-29 · 3 min · 1004 words · ZoomQuiet

蠎周刊 158: Madness

原文: Pycoder’s Weekly (Issue #158): Madness 搜罗Py万物 的周刊 亲, 又是一年春花时, 是时候从代码中抬头看看世界在发生什么了哈! 大家多分享文章 俺们才折腾的出又一周的美好呢. 喜欢就 在 Gratipay 支持俺们吧! 当然的,俺们也在twitter ...

2015-03-21 · 3 min · 1090 words · ZoomQuiet

蠎周刊 157: Martius

原文: Pycoder’s Weekly (Issue #157): Martius 搜罗Py万物 的周刊 亲, 大家多分享文章 俺们才折腾的出又一周的美好呢. 喜欢就 在 Gratipay 支持俺们吧! 当然的,俺们也在twitter 新闻 Django: 功夫网! 三月将继续 Py 3 的征程, 请检出 功夫网! djangowos.com Shared by @nathforge Django 安全版本以及增益提案! Django 党必读! djangoproject.com Shared by @myusuf3 Python 发布 3.5.0a2 Alpha 版本第2号, 已经从 3.5.0 分支上发布. 3.4 基础上新增 矩阵乘运算符(@), % 字节数组,等等. 细节点击进入. python.org Shared by @mgrouchy EuroPython 2015: 主题召集启动 CFP 的 EuroPython 已经启动, 你应该抢先注册! europython.eu Shared by @mgrouchy 讨论 有哪些漂亮的 Py 脚本是你忍不住想分享的!? reddit.com Shared by @mgrouchy (是也乎: 大爱好问, 值得逐一收藏下来! 最方便内置服务器: python3 -m http.server python -m SimpleHTTPServer 最方便内置 邮件 发送: python -m smtpd -c DebuggingServer -n 俺在哪儿: from os.path import expanduser home_dir = expanduser(’~’) 丫在哪儿: cdp () { cd “$(python -c “import os.path as , ${1}; print(.dirname(_.realpath(${1}.file[:-1])))” )” } ~ $ cdp os /usr/lib/python2.7 $ ~ $ cdp os.path /usr/lib/python2.7 $ 人性化排序: »> from distutils.version import StrictVersion »> versions = [‘1.3.12’, ‘1.3.3’, ‘1.2.5’, ‘1.2.15’, ‘1.2.3’, ‘1.2.1’] »> versions.sort(key=StrictVersion) »> print versions [‘1.2.1’, ‘1.2.3’, ‘1.2.5’, ‘1.2.15’, ‘1.3.3’, ‘1.3.12’] »> l = [‘v1.3.12’, ‘v1.3.3’, ‘v1.2.5’, ‘v1.2.15’, ‘v1.2.3’, ‘v1.2.1’] »> l.sort(key=LooseVersion) »> l [‘v1.2.1’, ‘v1.2.3’, ‘v1.2.5’, ‘v1.2.15’, ‘v1.3.3’, ‘v1.3.12’] 终端真数学: $ pmath ‘3 + 4’ 7 $ pmath -f’.4f’ ‘pow(2000, 1/3)’ 12.5992 $ pmath -f’.4f’ ‘sin(pi/2)’ 1.0000 $ pmath -c ’exp(1j*pi).real’ -1.0 $ pmath ‘x=3;x+2’ 5 $ echo ‘3+4’ | pmath 7 最方便合成器: ‘’.join(itertools.islice(handle, lines)) 最方便 实时分析: import pdb; pdb.set_trace() or in IPython: import ipdb; ipdb.set_trace() … ) ...

2015-03-14 · 3 min · 1135 words · ZoomQuiet