原文: PyCoder’s Weekly - Issue #366 realpython

  • 如何充分利用 PyCon
    • REAL PYTHON PyCon is about to kick off! Whether you’re a first-timer or a seasoned attendee, this guide will help you get ready to have a great PyCon. (是也乎: 简单说, 不一定要到现场, 认真复习一切就好 )
  • 在 PyCharm PyCon Booth 上结识 Python 内容创建者
    • PAUL EVERITT If you’re at PyCon this week come and meet yours truly, along with Michael Kennedy from the Talk Python podcast, Brian Okken from Test & Code, Miguel Grinberg, Chris Medina, PyBites, and the Real Python Team. Be sure to stop by and say hi :)
  • 用 PyGame Zero 教孩子编码
    • MATT LAYMAN How can you excite a kid about computers? In this article the author shares his experience teaching his six year old son some programming using PyGame Zero. (是也乎: 一样是游戏创作, PyGame 比 Scratch 要靠谱的多… logo )
  • 用计算机视觉检测帕金森病
    • ADRIAN ROSEBROCK Learn how to use OpenCV and machine learning to automatically detect Parkinson’s disease in hand-drawn images of spirals and waves. (是也乎: 玩具级别… )
  • Mac Adware, à la Python
    • OBJECTIVE-SEE.COM An examination of a malicious piece of macOS software (adware) which leverages Python and various levels of obfuscation to hinder analysis.
  • 使用 Django 和 GeoDjango 制作基于位置的 Web 应用程序
    • REAL PYTHON video Learn how to use Django and GeoDjango to build a location-based web application from scratch. You’ll be building a simple nearby shops application that lists the shops closest to a user’s location, powered by PostgreSQL and PostGIS. (是也乎: GeoDjango ~ Django 的特化道路将不会停止, 本质上已经从框架厂商, 变成方案厂商了. )

讨论

Discussions

文章,教程和嗯哼

Articles, Tutorials and Talks

  • 2019 PSF 年度报告
    • PYTHON.ORG “Our first Annual Report shows you just a few ways the generous support from our partners and friends helps us support our mission”
  • 使用 AST 在 Python 代码中检测 SQL 注入
    • ARTEM GOLUBIN Python has a built-in ast module that lets you inspect, parse and edit Python code. This article shows a real-world example of how you can use this module to detect SQL injection vulnerabilities in Python code.
  • Join a Community of 3.5 Million Developers on DigitalOcean
    • DIGITALOCEAN
    • sponsor Discover why Python developers love self-hosting their apps on DigitalOcean, the simplest cloud platform. Get started with a $100 credit for new users → (是也乎: DigitalOcean 这个广告愿意放… DigitalOcean 的文档是除 Heroku 之外最友好的了… )
  • Python 在 Netflix
    • AMJITH RAMANUJAM A sampling of how Python is used at Netflix: “We use Python through the full content lifecycle, from deciding which content to fund all the way to operating the CDN that serves the final video to 148 million members.” (是也乎: 所以, Netflix 已经是比 豆瓣更大的单体 Python 应用了? )
  • 分发与发布: 为什么 Python 包很难嗯哼
    • ALEX BECKER
    • • Shared by Alex Becker Why Python packaging is hard: just because you both installed v1.2.3, doesn’t mean you installed the same thing… (是也乎: 好问题… )
  • 了解 Python 3.7
    • CASEY FAIST Short & sweet article that covers some of the new features and improvements available in Python 3.7: data classes, async/await, and more. (是也乎: 叕一则 3.7 宣传文, 但是, 已经令和..不是, 马上 3.8 了… )
  • Python 在 Visual Studio Code: April 2019 Release
    • MICROSOFT.COM Python interactive now comes with a built-in variable explorer, debugging is easier to configure, and improvements to the Python Language Server have been made. (是也乎: VariableExplorer VSCode 终于完成了 IDE 化… )
  • Python KeyError 异常以及如何处理它们
    • REAL PYTHON Learn how to handle Python KeyError exceptions. They are often caused by a bad key lookup in a dictionary, but there are a few other situations when a KeyError can be raised as well.
  • Mercurial 版本控制入门
    • MOSHE ZADKA Super short article to show you the basics of Mercurial, a distributed version control system written in Python. (是也乎: 可怜的 Hg, 明明是 Python 官方推荐的哪… 可惜没有 github 类似明星平台… 虽然自己构建发布一个非常简单, 但是, 没了 社会化代码社交场景, VCS 就比较容宅寂了 )
  • Top 3 Python Libraries for GraphQL
    • OBERT MATYSZEWSKI A summary of the best Python libraries for the GraphQL query language. (是也乎: 现在问题不在客户端吧… )
  • 用 Python-Powered Discord Bot 提供 GIF
    • MAX ONG ZONG BAO (是也乎: 叕一则 gif 生成工具, discord 插件… )
  • 用 Python 创建自己的时序上下文管理器
    • FLORIAN DAHLITZ Covers various ways to write a Python context manager that measures execution time.
  • Python dis 模块和常量折叠
    • PYTHONTIPS.COM
    • • Shared by Jim Anderson Why is pow(3, 89) slower than 3 ** 89? Quick article looking at the dis module and when CPython’s constant folding kicks in.

好物

Interesting Projects, Tools and Libraries

  • typed-json-dataclass: 增强型数据类
    • GITHUB.COM/ABATILO Enhances dataclasses to perform basic type checking and makes the dataclass JSON serializable.
  • Python 反编译器
    • PYTHON-DECOMPILER.COM This free online tool can decompile Python bytecode (.pyc) back into equivalent Python source code. (是也乎: 反正加密 Python 代码是个技术活 )
  • pyflame: A ptrace -ing Profiler for Python
    • GITHUB.COM/UBER (是也乎: pyflame 没什么可说的: 神器 uber 开源… )
  • pydockenv: Python 虚拟环境,但由Docker支持
    • GITHUB.COM/SE7ENTYSE7EN (是也乎: 嗯哼, 从以往几十M , 要变成几百M 了? 真的是 SSD 时代思路了… )
  • pydantic: 使用 Python 类型提示进行数据验证和设置管理
    • HELPMANUAL.IO (是也乎: 叕一种类型嗯哼的方案, 反正怎么用都是个累… )
  • stackprinter: 可调试友好跟踪
    • GITHUB.COM/CKND (是也乎: 出时时, 调用桟更加可用的嗯哼… File demo.py, line 10, in 8 somelist = [[1,2], [3,4]] 9 anotherlist = [[‘5’, 6]] –> 10 dangerous_function(somelist + anotherlist) 11 except: ………………………………………….. somelist = [[1, 2], [3, 4]] anotherlist = [[‘5’, 6]] ………………………………………….. File demo.py, line 4, in dangerous_function 3 def dangerous_function(blub): –> 4 return sorted(blub, key=lambda xs: sum(xs)) ………………………………………….. blub = [[1, 2], [3, 4], [‘5’, 6]] ………………………………………….. File demo.py, line 4, in 2 3 def dangerous_function(blub): –> 4 return sorted(blub, key=lambda xs: sum(xs)) 5 ………………………………………….. xs = [‘5’, 6] ………………………………………….. TypeError: unsupported operand type(s) for +: ‘int’ and ‘str’ )

📆🐍 活动/大会

Events

DAMA

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

Jobs

是也乎

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