蠎加载 13

原文: Issue 13 该读 ~ 文章, Blog, 教程… 构建扩展性足够好的 Python 3 REST 应用 开发者经常在一行代码没写前, 就陷入讨论如何扩展应用, 当然,这有助思考每个应用的可扩展性…. 性能12日 可能有关性能你怎么着都知道一些技巧, 可惜, 可能你根本没有学到真正有用的, 尽管有丰富的在线信息, 但是,我们依旧被爱好者的无知而惊讶…. (是也乎: 是有12节的系列分享,刚刚完成了前8篇, 不过,有关 web 应用的整体效能建议, mozilla 等等有完备的 checklist 值得收藏!) Django 官网全新设计 The Django project is excited to announce that after many years, we’re launching a redesign of our primary website. Have a look. 别在 Python 中折腾的事儿 这是帮助Pythoneer 从 trolls 们营救出来的手册. (是也乎: 看一次乐一次… “Premature optimization is the root of all evil (or at least most of it) in programming.” – Donald Knuth “过早优化是一切罪恶的根源(在绝大多数情况中)在编程” ~ 高德纳 ) 你的Django 故事: 遇见 Susan Tan Susan 是位 Piston 的程序媛, 在三潘一家云计算公司. Susan 很喜欢 Python 的 web 应用框架, 她是基于 Django 的应用 <www.openhatch.org> 核心提交者, 同时也在用 Rotten Tomatoes 来折腾. json vs simplejson vs ujson (是也乎:蠎周刊也曰了.) Without argument, one of the most common used data model is JSON. There are two popular packages used for handling json?—?first is the stock json package that comes with default installation of Python, the other one is simplejson which is an optimized and maintained package for Python. The goal of this blog post is to introduce ultrajson or Ultra JSON, a JSON library written mostly in C and built to be extremely fast. 如何用 ast 从 python 文件中提取文档字串? 有关 ast 模块的具体案例, 问题来了: 什么是 ast ? 简单的说,这是个神奇的模块, 用来理解 python 代码语法的, 能将 代码分解为语法成分, 理解了她就可以基于 Py 开发自个儿的 DSL 了, 又有问题了: 什么是 DSL ? Making a Mockery of Python Mocking 是这样一种技术, 通过伪造模块的外围环境,来纯化我们的测试过程,加速测试, 这里探讨了 Py 世界中的 Mocking 技术. 分享如何令我们测试的多快好省. 应该用哪种 Python 代码检查器? 有很多包可用的了 pylint, pyflakes, pep8, 和 pep257, 看起来 pep8 和 pep257 一样好, 但有些功能是包含在其它工具中的了. Mochi a programming language using Python3 Interpreter (是也乎:蠎周刊曰了,这是个神奇的语言,值得期待) Mochi is a dynamically typed programming language for functional programming and actor-style programming. Its interpreter is written in Python3. The interpreter translates a program written in Mochi to Python3’s AST / bytecode. The Python Concurrency Story, Part 1 未来是并发的,理解现代操作系统中的并发原语,不仅仅令你成为更好的 Python 程序猿, 而且有助于余生里掌握每一个语言更好的开端. (是也乎: 无法直视的广告辞哪,为了余生,跟了!-) 项目 ~ 包/模块/库/片段… ...

2014-12-19 · 3 min · 1263 words · ZoomQuiet

蠎周刊 Issue 145: Spa

原文: Pycoder’s Weekly (Issue #145): Spa 搜罗Py万物 的周刊 亲, 又一轮 TEE 活动已经结束,感谢购买的,下次请早 ;-) 大家多分享文章 俺们才折腾的出又一周的美好呢. 喜欢就 在 Gratipay 支持俺们吧! 当然的,俺们也在twitter ...

2014-12-13 · 3 min · 1206 words · ZoomQuiet

蠎加载 11

原文: ImportPython Newsletter Issue 11 - 4th December 该读 ~ 文章, Blog, 教程… 字符编码和伟大的 Unicode 所有 Python 程序猿总有一天会遇到这个问题的. 读这篇文章吧,开开天眼. 为小白介绍 Python 的 *args 和 **kwargs – 第一部分 对 Python 函式参数的 *args 和 **kwargs 变参形式, 是很多新人困惑的地方,此文进行了详进的论述. 并给出了很多实用建议. Python 中的修饰和描述符 Decorators 和 Descriptor 是 Python 中两个独立的功能, 而且,一起运用时,最爽! -基于 Apache/mod_wsgi 模块用 Docker 来部署 Python WSGI 应用. 目测这是第一篇, 用 Docker 部署 Apache/mod_wsgi 发布的 Python 应用的文章, 为此作者还提供了预先包装好的镜像. (是也乎: 不过, Apache/mod_wsgi ? 你确定是认真的?) 用 Python 扩展 SQLite 蠎周刊曰过了… SQLite is an embedded database, which means that instead of running as a separate server process, the actual database engine resides within the application. This post describes how to extend SQLite with Python, adding functions and aggregates that will be callable directly from any SQL queries you execute. 用 Signals 和 Redis 进行简单分析 Signals 能对你指定的部分代码暴露 hook 出来, 这儿有一些实例, 展示如何对 Django/Flask 应用, 通过 hooks 对网站运行进行分析. -你的 Django : 遭遇 Patrycja Szabłowska Your Django Story 系列文章, 这期是 程序媛 的极赞介绍. 在瑞典/挪威/芬兰僵尸爆发模型分析 疾病传播模式的研究, 造型为某种虚构的僵尸爆发;-) 当然, 可读性来自 numpy 和数据科学技巧. IBM, Databricks, GraphLab 支持 Notebooks 问以建立预测应用! 为毛应该学习 IPython? 因为 notebook 已经成为新型电子表格,可运行的那种. sprints 有啥特殊的? 什么是 sprints? 在 PyCon 之后, 大家周一~四,每天进行的冲次开发, 可以进行 功能增加/bug修复/应用|库移植. 代码 ~ 包/模块/库/片段… ...

2014-12-11 · 2 min · 949 words · ZoomQuiet

蠎加载 12

原文: ImportPython Newsletter Issue 12 - 11th December 该读 ~ 文章, Blog, 教程… 理解 Python 的 unicode, str, UnicodeEncodeError 和 UnicodeDecodeError 通过人为引发各种有关错误, 来理解这堆错误的差异和根本原因. (是也乎: 有时,也可以大吼一声 Py3大法好) Django Under The Hood - 视频和幻灯. Django: Under the Hood 又一个伟大的 Django 式发布, 社区发布了各种资料来忽悠大家使用… 包含各种视频和幻灯, 来自: Andrew Godwin, Armin Ronacher, Jannis Leidel, Tom Christie, Daniel Pyrathon, Anssi. IPython Notebook 嵌入 IDE 几周前发布的 Pycharm 4 已经能嵌入 IPython notebook 了. Python 中测试失败时 单元测试是好的, 但是,具体到测试失败时,应该怎么处置? 此文给出了详细的分析和建议. 用 Docker 来部署 Django 应用 “以往所见各种有关介绍,都不是针对完备的一个 Django 应用的, 此文首次对 syncdb 和 collecstatic 命令进行全面阐述. " 将代码从 Py 2 移植到 Py3 的手册 本文目标是如何更好的同时支持两种版本的运行环境 django-nocaptcha-recaptcha 介绍 本周 Google 发布了 reCAPTCHA, 所以,我们将其折腾到了 Django 中. Django 模型说明 在 Django 中如何能更加简洁的描述数据模型来包含更多业务? 利用内置的 Python 描述协议, 可以轻松的完成一个专用 DSL 来作这事儿. 配置 Raspberry Pi 来折腾 Python 和 C 本文旨在帮助初学者上手, 快速建立 树莓派环境来开始 Py 和 C 的开发. 设计 PyMongo 时4个令人桑心的决策 回顾当初的决定引发了多大的麻烦, 痛定思痛, 在 PyMongo 3.0 时,将全面解决的设计问题, 作为一个 悲伤的墓志铭故事,在此一述. (是也乎: “copy_database” 引发的血案…) 10 大企业 Python 传说 “I joined PayPal a few years ago, and chose Python to work on internal applications, but I’ve personally found production PayPal Python code from nearly 15 years ago. Here are the 10 myths I’ve had to debunk the most in eBay and PayPal’s enterprise environments.” - Mahmoud Hashemi (是也乎: 蠎周刊也曰过…) 项目 ~ 包/模块/库/片段… ...

2014-12-11 · 2 min · 984 words · ZoomQuiet