Github 中那些最佳实践+良好架构的项目

原文: PyCoder's Weekly - Issue #472

pycoder

  • 210512 Zoom.Quiet(大妈) 用时 42 分钟 完成快译
  • 210512 Zoom.Quiet(大妈) 用时 37 分钟 完成格式转抄.

There seems to be a lot going on in the Python JIT compiler space. Facebook recently open-sourced Instagram’s Cinder runtime, Pyston 2 returned as an open-source project, and the Pyjion project from Microsoft continues to grow. But Python creator Guido van Rossum has suggested that Python developers in need of more performance should consider writing parts of their code as C extensions, or use the PyPy runtime. This article explores Pythons turbulent history with performance optimization.

(是也乎:

对运行时性能的追求, 在 Python 宇宙引发了一系列有益的动荡...

)

While JIT compilers compete for Python performance improvements and some teams rush into asyncio adoption, one has to wonder what the outcome of additional complexity will be. This opinion piece argues that the cost of hurried and potentially unnecessary performance optimization is unstable and insecure code. It’s a good reminder that decisions about project dependencies should be thoroughly researched and made deliberately.

(是也乎:

高级语言的宿命

)

Learn about three of Python’s data structures: stacks, queue and priority queues. You’ll look at multiple types and classes for all of these and learn which implementations are best for your specific use cases.

(是也乎:

反正和官方的不同, 怪不得最好使用另外的运行时...

)


探讨/吐糟

Discussions

With Python installed, you’ve got a quick and easy-to-use calculator accessible from any terminal window!

(是也乎:

Never, 直到有 Jupyter 后...

)

This Reddit thread is full of GitHub repos that might make for some good code reading.

(是也乎:

这可能是价值最高的一则讨论了...

thuijskens/production-tools: A bare-bones repository demonstrating how to set up tools for data science projects that will help you write higher quality code.

psf/requests: A simple, yet elegant HTTP library.

Design Patterns in Python

The Architecture of Open Source Applications

Reading Great Code — The Hitchhiker's Guide to Python

API Evolution the Right Way

Evolution

cosmicpython/code: Example application code for the python architecture book

)


文章/教程/嗯哼

Articles, Tutorials and Talks

In this beginner-friendly tutorial, you’ll take your first steps with Natural Language Processing (NLP) and Python’s Natural Language Toolkit (NLTK). You’ll learn how to process unstructured data in order to be able to analyze it and draw conclusions from it.

(是也乎:

NLP

NLTK 应该是最易用的 NLP 处理模块了.

)

Django models are the single, definitive source of information about data in a Django application. That means that all the logic about your data should be located in the model—not in a view as too often can be seen. In this article, you’ll get to know Django models better including things like UUID fields, enumeration types, Meta classes, and custom .save() methods.

(是也乎:

Fluent 是这两年热门词.

)

Many web apps require long-running tasks, such as resizing image thumbnails or generating PDFs. Background tasks allow a web app to continue to process incoming requests while a task is executing. This tutorial walks you through setting up Celery and Redis to handle background tasks in a FastAPI application. You’ll learn how to containerize everything with Docker, save Celery logs to files, and monitor background tasks with Flower.

(是也乎:

FastAPI 替代 Flask 成为新的网红...

)

In this tutorial, you’ll learn about recursion in Python. You’ll see what recursion is, how it works in Python, and under what circumstances you should use it. You’ll finish by exploring several examples of problems that can be solved both recursively and non-recursively.

(是也乎:

Recursion

递归是最烧脑, 又最简洁的循环形式了.

)

If you’re a package maintainer and want to make type annotations available to all users of your library, how can you go about doing this? Just add the type annotations to your library, right? Well, no! Learn how type annotations are handled in package distributions in this short but informative article with links to a number of helpful resources.

Throughout 2020, Victor Shepelev worked on porting the hunspell spellchecker to Python in a project called spylls. In this post he shares his thoughts on spylls checking, noting that it is much more difficult than just comparing strings to an established dictionary. While the article is not technical, it’s a great read exploring some of the assumptions made by hunspell and how they fail in the real world.

(是也乎:

少有的分享失败经历的文章

)


好物/妙品/...

Interesting Projects, Tools and Libraries, Projects & Code

(是也乎:

pudb

多熟悉的布局哪, 简直就是 Vim 的再造.

)

(是也乎:

是的, Python 是开源的, 如果真心不满意运行时效率, 随时可以自行 fork 加强的.

)

(是也乎:

reviews

为什么大家都在 CLI 中折腾, 却不愿意在原生桌面上发布复杂的面板?

可以认为 MFC 立功了, 没人愿意将有限的精力投入到无限的隐藏接口挖掘上.

)


📆🐍 活动/大会

Events, MeetUp 真的是全球线下活动组织中心

(是也乎:

即便是线上的, 一样收费.

)

(是也乎:

反正很早都上 油管了, 随时可以 review, 当然, 这个随时, 随时了很多年都没刷光.

)


DAMA

❤️ Happy Pythonic ;-(大妈私人无责任播报)

(是也乎:

独创 logging + debug 模块

)

(是也乎:

老司机开新坑, 时隔10年, 沈游侠再次开声, 值得关注:

Bilibili

)

(是也乎:

私人初体验, 现在 http/https 资源混用浏览器越来越傲娇了, 最好有工具可以统一迁移...

)


PS:


好文笔,感叹号年度配额: 2/3

投稿/反馈邮箱:

askdama@googlegroups.com

(邮件列表地址, 当成正常邮件发送邮件就好, 不用注册, 不用翻越...)


ZoomQuiet/大妈

就是四处 是也乎,( ̄▽ ̄) 的那个大妈:

私自嗯哼: ZoomQuiet (订阅号: ZoomQuiet42)
公开课程: 蟒营 (订阅号: Mainium)
历史吐糟: Chaos42 (订阅号 PythoniCamp)

as 创始组织者:
    PyChina (订阅号: PyChinaOrg)
    本地社区: 
        GDG珠海 (订阅号: GDG-ZhuHai)
        TFUG珠海 (订阅号: ZH_TFUG)

NN 4376

RPP


Comments


大妈的多重宇宙 - YouTube

全新自媒体系列...科学幻想,读书,说故事...
点击注册~> 获得 100$ 体验券: DigitalOcean Referral Badge

订阅 substack 体验古早写作:
Zoom.Quiet’s Chaos42 | Substack


关注公众号, 持续获得相关各种嗯哼:
zoomquiet


蟒营®编程思维提高班Python版

**2021.01.11** 因大妈再次创业暂停定期开设, 转换为预约触发:
  • + 任何问题, 随时邮件提问可也:
    askdama@googlegroups.com
-->