对数据科学家有用的 Python 装饰器
原文: PyCoder's Weekly - Issue #527
- 220601 Zoom.Quiet(大妈) 用时 13 分钟 完成快译
- 220601 Zoom.Quiet(大妈) 用时 37 分钟 完成格式转抄.
- Python 的“函数”有时是类
- TREY HUNNER
Ever use list() or enumerate()? Think of them as functions? They’re not, they’re classes. Sometimes we call classes functions in Python. Why? And what’s a “callable”?
- 探索 Python 中的作用域和闭包
- REAL PYTHON COURSE
In this Code Conversation video course, you’ll take a deep dive into how scopes and closures work in Python. To do this, you’ll use a debugger to walk through some sample code, and then you’ll take a peek under the hood to see how Python holds variables internally.
(是也乎:
是的, 套娃, 幸好 Python 严密的用缩进进行了可视化先...
)
- 所有关于星号在 Python 中需要知道的
- BAS STEINS
The *
is for more than multiplication, it is also the basis for the two deconstruction operators: *
and **
. Learn the ins-and-outs of using
*args
, **kwargs
, deconstruction, and forcing keyword-arguments-only in functions.
- ctx 库被劫持以窃取 AWS 密钥
- AX SHARMA
(是也乎:
全新 Hijacked 姿势...
)
探讨/吐糟
Discussions
- 对数据科学家有用的 Python 装饰器
- HACKER NEWS
Marton Trencseni posted Useful Python decorators for Data Scientists, a follow-up to the article included in Issue #525. It got posted on Hacker News and strong opinions ensued. Read the article, then weigh in.
(是也乎:
Bytepawn - Marton Trencseni – Useful Python decorators for Data Scientists
数据科学常用修饰符函式
一键追加实用观察
)
- 近年来 Python 标准库的变化
- HACKER NEWS
Discussion based on the previously linked article Python Standard Library Changes in Recent Years.
(是也乎:
变化太多, 基本只用基本数据结构, 其它都用第三方模块了... )
文章/教程/嗯哼
Articles, Tutorials and Talks
- 如何使用 argparse 创建命令行应用程序
- MIKE DRISCOLL
Scripts often need either configuration or data to proceed and for many situations this can be passed in on the command line. The standard library argparse helps you parse arguments, add help info, and even alias your commands.
(是也乎:
推荐还是用类似 invoke 之类高度封装后的 CLI 开发框架
)
- Python Plots 设置动画的快速方法
- CHRISTOPHER TAO
There are lots of choices when developing animated plots, many of which have a steep learning curve. Learn how to create animated GIFs through matplotlib and ImageIO to bash something out quickly.
- 鲜为人知的 Django 管理命令
- GONÇALO VALÉRIO
You probably know about runserver, migrate and shell, but there are lots more Django management commands. Learn about diffsettings, sendtestemail, inspectdb, and showmigrations.
(是也乎:
为什么 鲜为人知
?
)
- 用 Python 和 Graphviz 对正则表达式动画化
- AYDIN SCHWARTZ
Visualizing regular expressions can help you understand how they work and what a particular expression accomplishes. Read on to learn how to use Graphviz to better understand your regex.
(是也乎:
aydinschwa/Regex-Engine: Educational, animated regular expression engine
亮了, 用 Python 分析清楚正则表达式的匹配顺序, 然后逐步用 Graphviz 可视化, 最后拼为动画
看起来更加乱了...
)
- 用 Django/React 和 Docker 构建 CRUD 应用程序
- MANGABO KOLAWOLE
Step-by-step instructions on creating a web application with a React front-end and the Django Rest Framework as a back-end and all tied together with Docker for distribution.
(是也乎:
虽然听起来 Low , 但是, CRUD 的确是绝大多数系统的核心使命, 真想作到也不容易...
)
- Python 中有什么/各版本...
- NED BATCHELDER
A quick listing of what features were added in which version of Python, going back to Python 2.1 and including links to corresponding PEPs.
(是也乎:
Python 3 以来关键版本的关键使命规划...
)
- Python 中的本机类型/Dunder 方法
- THEODOROS KARASAVVAS
Learn how to make your classes act like native data types through the implementation of double-underscore magic methods.
- f-strings and re.VERBOSE 不合理效果
- ANDGRAVITY.COM
A look at one or two ways to make life easier when working with Python regular expressions.
好物/妙品/...
Interesting Projects, Tools and Libraries, Projects & Code
- import-tracker: 跟踪库中的第 3 方依赖项
- GITHUB.COM/IBM
(是也乎:
IBM 作品
)
- dowsing: 不运行就能提取元数据
- GITHUB.COM/PYTHON-PACKAGING
(是也乎:
为了避开 PEP517 而构建
)
-
- GITHUB.COM/LINEALABS
-
- GITLAB.COM/MINDFULNESS-AT-THE-COMPUTER
(是也乎:
是的, 越来越多开源工程迁移到 GitLab 上来了
)
- PyDaddy: 从时间序列数据中发现 SDE 方程
- GITHUB.COM/TEE-LAB
- • Shared by Ashwin Karichannavar
📆🐍 活动/大会
Events, MeetUp 真的是全球线下活动组织中心
-
- June 1, 2022
-
Weekly Real Python Office Hours Q&A (Virtual)
- June 1, 2022
-
- June 2 to June 6, 2022
-
Sydney Python User Group (SyPy)
- June 2, 2022
-
- June 2, 2022
-
Virtual PythonCamp Cologne 2022
- June 4 to June 6, 2022
DAMA
❤️ Happy Pythonic ;-(
大妈私人无责任播报
)
- Zoom.Quiet’s Chaos42 | Substack
- 古早:新闻组式写作
- 欢迎订阅
(是也乎:
谈崩了, 之前通过 ACM 会员可以每年 $25 享受 O'REILLY 在线图书馆服务...现在没了
)
PS:
PPS:
不觉中蟒周刊快译已经到了第10个年头
去年开始有小伙伴加入承担 pythonisa
周刊的翻译,
从来没提醒过, 可就这么默默坚持下来了...
问为什么:
[皱眉]每周新闻资讯 怎么能错过
看看有什么新东西
当有新的发现时:
what f**k 还能这样玩? 还有这东西?
每周开彩蛋[吃瓜]
无法同意更多
...
很多社区贡献看起来辛苦,
其实受益最多的,
就是主动承担者也.
好文笔,感叹号年度配额: 1/3
投稿/反馈邮箱:
askdama@googlegroups.com
(邮件列表地址, 当成正常邮件发送邮件就好, 不用注册, 不用翻越...)
ZoomQuiet/大妈
就是四处 是也乎,( ̄▽ ̄)
的那个大妈:
私自嗯哼: ZoomQuiet (订阅号: ZoomQuiet42)
公开课程: 蟒营 (订阅号: Mainium)
历史吐糟: Chaos42 (订阅号 PythoniCamp)
as 创始组织者:
PyChina (订阅号: PyChinaOrg)
本地社区:
GDG珠海 (订阅号: GDG-ZhuHai)
TFUG珠海 (订阅号: ZH_TFUG)
Comments