Issue 411

2020 应该如何享用 Jupyter? 原文: PyCoder’s Weekly - Issue #411 200311 Zoom.Quiet(大妈) 用时 42 分钟 完成快译 200311 Zoom.Quiet(大妈) 用时 17 分钟 完成格式转抄. Post-Mortem Python 绘图 ANDY JONES Who loves debugging things that only fail occasionally? Just me? Maybe you need to check out Andy Jones’ extract() function that “magically” extracts a caller’s environment into an IPython interpreter session. Mix in a little post-mortem debugging with Jupyter’s %debug magic command, and you’ll be painlessly debugging finicky code in no time. (是也乎: 神奇的事后验尸, extract() 能将调用者环境装配人 Jupyter 进行细致的检验. ) 2020 年如何用 Jupyter 笔记本 LJ MIRANDA In this first of a three-part blog post, LJ Miranda surveys the data science landscape and discusses the forces that push data science tools to evolve. (是也乎: 一个系列, 刚刚发布第一篇, 1: 数据科学的笔记本 /2: 2020我的笔记本 /3: 笔记本的未来.. 是的, 笔记本从实体的, 到电脑形态, 现在又是一种可计算文档的指代了… 其实, 对 Jupyter 的发展是看好的, 但是, 对其最终产品形态不明朗, 因为 notebook 形式非常创意的将 开发/调试/笔记/发行 很好的揉合在一起; 唯独没对运行时有考虑…这就比较尴尬了… ) 思考 psycopg3 DANIELE VARRAZZO A core maintainer of the popular psycopg2 PostgreSQL adapter for Python discusses breaking changes he would like to see in a hypothetical pyscopg3 project, including better query/parameter separation, more sensible context manager behavior with connections, and async support. (是也乎: 当大家大规模从 MySQL 迁移到 Pq , 各种模块就大发展起来了… ) Alexa Python 开发: 构建和部署 Alexa Skill REAL PYTHON In this tutorial, you’ll become an Alexa Python developer by deploying your own Alexa skill. You’ll build an application that users will interact with using voice commands to Amazon Alexa devices. Your skill will respond back with a random joke when invoked by the user! (是也乎: Amazon 全家桶开发环境… ) PyCon 2020 为 COVID-19 更新 PYCON.BLOGSPOT.COM “PyCon continues to closely monitor the Coronavirus (also known as COVID-19) situation. As of March 6, PyCon 2020 in Pittsburgh, Pennsylvania is scheduled to take place.” (是也乎: PyCon 官方还在使用 BLOGSPOT.COM, 最早也最稳定的 blog 服务. ) 讨论 Discussions ...

2020-03-12 · 5 min · 2409 words · ZoomQuiet

Issue 410

EOF不是字符 原文: PyCoder’s Weekly - Issue #410 200304 Zoom.Quiet(大妈) 用时 42 分钟 完成快译 200304 Zoom.Quiet(大妈) 用时 17 分钟 完成格式转抄. Python Requests 高级用法 DANI HODOVIC “While it’s easy to immediately be productive with requests because of the simple API, the library also offers extensibility for advanced use cases. If you’re writing an API-heavy client or a web scraper you’ll probably need tolerance for network failures, helpful debugging traces and syntactic sugar.” EOF不是字符 RUSLAN SPIVAK Do you know how an application knows when a read operation reaches the end of a file? In this interesting read, explore what EOF (end-of-file) really is by writing your own version of the Linux cat command in ANSI C, Python, Go, and JavaScript. 用 Django ORM 进行双重检查的锁定 LUKE PLANT The double-checked locking pattern is useful when you need to restrict access to a certain resource to stop simultaneous process from working on it at the same time. Learn how to apply this pattern in Django using the ORM and database level locking features. Python Bindings: 从 Python 调用 C 或 C++ REAL PYTHON What are Python bindings? Should you use ctypes, CFFI, or a different tool? In this step-by-step tutorial, you’ll get an overview of some of the options you can use to call C or C++ code from Python. (是也乎: 虽然 Py 们好用又好写, 但是, 真正比拼的还是对 C/C++ 们的调用能力, 毕竟这个世界底层是 C 家族的. ) PyPy 状态 Blog: PyPy 和 CFFI 已迁移到 Heptapod MOREPYPY.BLOGSPOT.COM PyPy has moved the center of their development off Bitbucket and to the new foss.heptapod.net/pypy (是也乎: 因为 Bitbucket 凉了… 俺的仓库也得迁移了… foss.heptapod.net <- GitLab企业版, 免费使用环境… ) PyCon 2020: March 2 COVID-19 下的更新 PYCON.BLOGSPOT.COM “As of March 2, PyCon 2020 in Pittsburgh, PA is scheduled to happen.” (是也乎: 技术大会也被疫情了 ) 对匹兹堡 PyCon 感到兴奋的 19 个理由 EMILY MOREHOUSE (是也乎: Pittsburgh PyCon 的宣传文案来了… ) 讨论 Discussions ...

2020-03-04 · 5 min · 2480 words · ZoomQuiet

Issue 409

PyCon2020US 按时开始注册,没受疫情影响 原文: PyCoder’s Weekly - Issue #409 200205 Zoom.Quiet(大妈) 用时 42 分钟 完成快译 200205 Zoom.Quiet(大妈) 用时 17 分钟 完成格式转抄. 分析NBA助攻: 如何使用Python可视化数据中的隐藏关系 JP HWANG Using basketball as the background setting, the author discusses several different strategies for uncovering relationships and producing beautiful visualizations with Python. (是也乎: 其实, 前提是有老司机能先识别出关系, 才能找到数据模型来提取. ) PyCon美国2020年 Packaging 峰会:注册和主题提案 PYTHON.ORG Registration is open for the PyCon US 2020 Packaging Summit. Topic proposals are also being accepted. Both registration and topic proposals close on March 7, 2020. (是也乎: 来了, 来了, 没受疫情影响 ) Django 安全漏洞: CVE-2020-7471 MITRE.ORG Django 1.11 before 1.11.28, 2.2 before 2.2.10, and 3.0 before 3.0.3 allows SQL Injection if untrusted data is used as a StringAgg delimiter (e.g., in Django applications that offer downloads of data as a series of rows with a user-specified column delimiter). 用 Python 处理 PDF REAL PYTHON video In this step-by-step course, you’ll learn how to work with a PDF in Python. You’ll see how to extract metadata from preexisting PDF files. You’ll also learn how to merge, split, watermark, and rotate pages in PDFs using Python and the PyPDF2 library. (是也乎: 在中国虽然 PDF 不怎么受待见, 但是, 人家的确是世界第一通用文档格式哪 ) 生产中的 Python HYNEK SCHLAWACK Hynek Schlawack feels that discussions of Python web applications in production are missing from Python conferences. He is offering to mentor people who are interested in proposing conference talks on the subject Python 中的 Null : 了解 NoneType 对象 REAL PYTHON Learn about the NoneType object None, which acts as the “null” in Python. This object represents emptiness, and you can use it to mark default parameters and even show when you have no result. (是也乎: Python 中, 万物皆对象, 没有对象本身也是一种对象 ) PEP 584 PR 已合并 (Dictionary Union) GITHUB.COM/PYTHON This will add the following dictionary operations: dict1 | dict2 (copy + update) and dict1 |= dict2 (update). See PEP 584 for example use cases. 讨论 Discussions ...

2020-02-26 · 4 min · 1931 words · ZoomQuiet

Issue 408

一起寻找完美的 Python 代码编辑器吧? 原文: PyCoder’s Weekly - Issue #408 200205 Zoom.Quiet(大妈) 用时 42 分钟 完成快译 200205 Zoom.Quiet(大妈) 用时 17 分钟 完成格式转抄. 寻找完美的Python代码编辑器 REAL PYTHON video Find your perfect Python development setup with this review of Python IDEs and code editors. Writing Python using IDLE or the Python REPL is great for simple things, but not ideal for larger programming projects. With this course you’ll get an overview of the most common Python coding environments to help you make an informed decision. (是也乎: 真蟒引战技巧越来越好了, 无论计算机发展到哪儿, 嘦说最好的编辑器, 一定一地鳮毛的 Vim/Thonny/repl.it/Visual Studio Code/PyCharm/Jupyter 这都哪和哪儿比哪…根本比不到点儿上的… ) Python 重载函数 ARPIT BHAYANI Python does not natively support function overloading (having multiple functions with the same name.) See how you can implement and add this functionality using common language constructs like decorators and dictionaries. Related discussion on Hacker News. PEP 614 (草稿): 放宽装饰器语法限制 PYTHON.ORG “Python currently requires that all decorators consist of a dotted name, optionally followed by a single call. This PEP proposes removing these limitations and allowing decorators to be any valid expression.” For example, this would become a valid decoration: @buttons[1].clicked.connect (是也乎: 老爹支持的一则草案 希望将类似: button_1 = buttons[1] … @button_1.clicked.connect def eggs(): … 合理化为: @buttons[1].clicked.connect def eggs(): … ) 建立良善的 Python 测试 CHRIS NEJAME • Shared by Chris NeJame A collection of testing maxims, tips, and gotchas, with a few pytest-specific notes. Things to do and not to do when it comes to writing automated tests. (是也乎: 深切体会过, 好的测试, 必须有好的可测试代码配合. 否则, 太南了 ) Python 类型边缘 STEVE BRAZIER Adding more strict typing around the edges of a Python system for better error messages and design, using Pydantic and mypy. Interesting read! Python 3.9 StatsProfile DANIEL OLSHANSKY The author of the profiling API improvements coming to Python 3.9 demonstrates the feature and explains how it was added to CPython. 机器人/生成艺术和Python,我的天哪 GEOFFREY BRADWAY How to make cool looking plotter art with NumPy, SciPy, and Matplotlib. (是也乎: 简直就是抖音课程营销必备展示小视频 ) PyCon US 2020 教程时间表 PYCON.ORG Python 3.8.2rc2 可用以测试 PYTHON INSIDER 讨论 Discussions NIL ...

2020-02-19 · 6 min · 2535 words · ZoomQuiet