蠎周刊 157: Martius

Pycoder's Weekly
Pycoder's Weekly

搜罗Py万物 的周刊

亲,

大家多分享文章
俺们才折腾的出又一周的美好呢.

喜欢就
Gratipay
支持俺们吧!
当然的,俺们也在twitter

新闻

三月将继续 Py 3 的征程,
请检出 功夫网!

djangowos.com

Shared by @nathforge

Django 党必读!

djangoproject.com

Shared by @myusuf3

Alpha 版本第2号,
已经从 3.5.0 分支上发布.
3.4 基础上新增 矩阵乘运算符(@),
% 字节数组,等等.
细节点击进入.

python.org

Shared by @mgrouchy

CFP 的 EuroPython 已经启动,
你应该抢先注册!

europython.eu

Shared by @mgrouchy

讨论

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()

...

)

工作

来自 猎豹移动 - 全球最大的移动工具开发商 ...

项目

能输出 FlameGraph 兼容的剖析统计数据.

github.com

Shared by @myusuf3

(是也乎:
简单的说, Python 运行时也能用 火焰图来观察了!

python-flamegraph
python-flamegraph

<3

)

实用!
将你的 Django 接口整理在单一代码块中!

github.com

Shared by @mgrouchy

专注管理 Django 模型转换的应用!

github.com

Shared by @myusuf3

将任意 IP 转换为 俳句(hipku) 的包,
细节链接之内.

github.com

Shared by @mgrouchy

通过 web 界面自动化运行命令行脚本.

github.com

Shared by @mgrouchy

文章

针对用 Docker 来部署 Python 应用,给出了一个模板容器.

twistedmatrix.com

Shared by @myusuf3

为你和客户以及对 plotly 有兴趣的 IPython notebook 案例

plot.ly

Shared by @myusuf3

对新人合理的介绍 pdb 进行调试.

howchoo.com

Shared by @myusuf3

-Python 用 Numba 进行 GPU-加速的图形分析

nvidia.com

Shared by @mgrouchy

每当你的代码只能在自个儿的机械中运行时,
那感觉总是无比苦涩的,
此文给出了一些策略,确保我们的代码是通行的.

pythonforengineers.com

Shared by @mgrouchy

非常赞!
Twilio 加上一点点 Python 脚本,
你就拥有了一个音频博客!

github.io

Shared by @myusuf3

非常 COOL 的教程!
展示如何用 Django 构建应用,
在 Amazon 的 Mechanical Turk 中
组织廉价众包任务.

scottlobdell.me

Shared by @mgrouchy

很赞的教程,
有关如何构建一个发布各种漫画的 web 服务.

ruslanspivak.com

Shared by @myusuf3

嗯啍 monkey 补丁!
本文论及补丁的多种使用方式,
其中有一种是为当前应用追加监控仪表盘...

dscpl.com.au

Shared by @mgrouchy

来及好书 Effective Python ,
讨论如何使用协程同时运行多个功能,
实例代码来自 Conway 的游戏人生.

effectivepython.com

Shared by @mgrouchy

DAMA

(大妈私人无责任播报)

PyCon Asia-Pacific 2015
PyCon Asia-Pacific 2015

PyCon APAC/Taiwan 2015 - Call for Proposals 议题召集已经释放,想去宝岛体验社区交流的,可以下手了!

是也乎

  • 150316 Zoom.Quiet 用时 42 分钟 完成快译.
  • 150314 Zoom.Quiet 用时 7 分钟 完成格式转抄.

转载于:https://my.oschina.net/zoomquiet/blog/1498733

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值