绕过 GIL 进行并行处理

原文: PyCoder's Weekly - Issue #596

pycoder

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

In this video course, you’ll learn about the SOLID principles, which are five well-established standards for improving your object-oriented design in Python. By applying these principles, you can create object-oriented code that is more maintainable, extensible, scalable, and testable.

(是也乎:

OOP

)

Radon is a code metrics tool. This article introduces you to it and teaches you how you can improve your code based on its measurements.

(是也乎:

氡 ~ 真的是个好名字

)

Parallelism isn’t the only answer: often you can optimize low-level code to get significant performance improvements.


探讨/吐糟

Discussions

NULL


文章/教程/嗯哼

Articles, Tutorials and Talks

In this how-to tutorial, you’ll learn different ways of catching multiple Python exceptions. You’ll review the standard way of using a tuple in the except clause, but also expand your knowledge by exploring some other techniques, such as suppressing exceptions and using exception groups.

(是也乎:

多个异常

嗯哼...不过, 一般值得抓的只有第一个?

)

MNIST is a collection of hand-written digits that is commonly used to play with classification algorithms. It turns out that some compression mechanisms can double as classification tools. This article covers a bit of why with the added code-golf goal of a small amount of code.

In this tutorial, you’ll take a deep dive into parallel processing in Python. You’ll learn about a few traditional and several novel ways of sidestepping the global interpreter lock (GIL) to achieve genuine shared-memory parallelism of your CPU-bound tasks.

(是也乎:

GIL

)

This article talks about the different tools you commonly come across as part of the Python development experience. It gives an overview of black, nox, ruff, Mypy, and more, covering why you should use them when you code your own projects.

(是也乎:

WoW 如何发现并构建流行工具库,

...创建愉快且有意义的 Python 开发人员体验

前题是你本身必须是一名高强度开发者, 但是,在你已经习惯某些操作的同时, 又得敏锐的发现, 哪些操作值得进一步优化...

这就得有种自我撕裂的技巧了...

)

Ever wonder why there are so many ways libraries that have Dataframes in Python? This article talks about the different perspectives of the popular toolkits and why they are what they are.

(是也乎:

Dataframes

没办法, 名字太好了, 无论谁都想用

)

typing.Protocol enables type checking in a Java-esque interface like mechanism. Using it, you can declare that a duck-typed class conform to a specific protocol. Read on for details.

In this video course, you’ll learn all about Python’s name-main idiom. You’ll learn what it does in Python, how it works, when to use it, when to avoid it, and how to refer to it.

(是也乎:

__main__

老梗儿...

)

Dive into Python’s clever use of Bloom filters in string APIs for speedier performance. Find out how CPython’s unique implementation makes it more efficient.

Write a Python simulation to solve this classic probability puzzle that has stumped mathematicians and Nobel Prize winners!

(是也乎:

About Data School 这居然是独立站, 可以看为海外版本 寥雪峰 ...

)

The software industry is learning once again that complexity kills and trending back towards monoliths and larger services.

(是也乎:

宁可内部复杂, 也没办法控制外部复杂...

)

Tutorial on how to use the pytest plugin nbmake to automate end-to-end testing of notebooks.

(是也乎:

这可是 Jupter 成为生产工具的重大一关哪...

)


好物/妙品/...

Interesting Projects, Tools and Libraries, Projects & Code

(是也乎:

panther

赞助方不得了...

)


📆🐍 活动/大会

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


历史上这周


DAMA

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

         _~^|~~_
     () /  ◷ ^  \ ()
       '_   v   _'
       ( '--~--' \

...act by ferris-actor v0.2.4 (built on 23.0303.201916)

PS:

Happy Pythoning!

Copyright © 2023 PyCoder’s Weekly, All rights reserved.

PPS:

不觉中蟒周刊快译已经到了第10+2个年头

开始有小伙伴加入承担 pythonisa 周刊的翻译, 从来没提醒过, 可就这么默默坚持下来了...

问为什么:

[皱眉]每周新闻资讯 怎么能错过 
看看有什么新东西 
当有新的发现时:
    what f**k 还能这样玩? 还有这东西?
    每周开彩蛋[吃瓜]

无法同意更多... 很多社区贡献看起来辛苦, 其实受益最多的, 就是主动承担者也.

所以++> 锈周刊 -> Weekly :: China


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

投稿/反馈邮箱:

askdama@googlegroups.com

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


ZoomQuiet/大妈

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

全职嗯哼: 大妈的多重宇宙 - https://www.youtube.com/@Chaos42DAMA
私自嗯哼: ZoomQuiet (订阅号: ZoomQuiet42)
公开社群: 蟒营 (订阅号: Mainium)

as 创始组织者:
    CPyUG (mailling-list: python-cn@googlegroups.com)
    PyChina (订阅号: PyChinaOrg)
    本地社区: 
        GDG珠海 (订阅号: GDG-ZhuHai)
        AIGC珠海 


Comments


大妈的多重宇宙 - YouTube

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

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


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


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

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