原文: PyCoder's Weekly - Issue #366

realpython


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.

(是也乎:

简单说, 不一定要到现场, 认真复习一切就好

)

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 :)

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

)

Learn how to use OpenCV and machine learning to automatically detect Parkinson's disease in hand-drawn images of spirals and waves.

(是也乎:

玩具级别...

)

An examination of a malicious piece of macOS software (adware) which leverages Python and various levels of obfuscation to hinder analysis.

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

For example, repeatfunc(random, 10) would be a shortcut for (random() for i in range(10))

"Lame Lame Lame, DO NOT USE THIS!!!"

(是也乎:

winreg — Windows registry access — Python 3.7.3 documentation

官方已经修正...

)

文章,教程和嗯哼

Articles, Tutorials and Talks

"Our first Annual Report shows you just a few ways the generous support from our partners and friends helps us support our mission"

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.

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 之外最友好的了...

)

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 应用了?

)

Why Python packaging is hard: just because you both installed v1.2.3, doesn't mean you installed the same thing...

(是也乎:

好问题...

)

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 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 化...

)

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.

Super short article to show you the basics of Mercurial, a distributed version control system written in Python.

(是也乎:

可怜的 Hg, 明明是 Python 官方推荐的哪... 可惜没有 github 类似明星平台... 虽然自己构建发布一个非常简单, 但是, 没了 社会化代码社交场景, VCS 就比较容宅寂了

)

A summary of the best Python libraries for the GraphQL query language.

(是也乎:

现在问题不在客户端吧...

)

(是也乎:

叕一则 gif 生成工具, discord 插件...

)

Covers various ways to write a Python context manager that measures execution time.

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

Enhances dataclasses to perform basic type checking and makes the dataclass JSON serializable.

This free online tool can decompile Python bytecode (.pyc) back into equivalent Python source code.

(是也乎:

反正加密 Python 代码是个技术活

)

(是也乎:

pyflame

没什么可说的: 神器

uber 开源...

)

(是也乎:

嗯哼, 从以往几十M , 要变成几百M 了? 真的是 SSD 时代思路了...

)

(是也乎:

叕一种类型嗯哼的方案, 反正怎么用都是个累...

)

(是也乎:

出时时, 调用桟更加可用的嗯哼...

File demo.py, line 10, in <module>
    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 <lambda>
    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!

(大妈私人无责任播报)

  • 蟒营 Python 入门班
    • 已开班, 进入 ch03
    • 下期可能 7月中
  • [突发]Trio 作者质疑 Requests 作者 Kenneth Reitz 存在不当行为](https://mp.weixin.qq.com/s/5BWZYUvc5HXnvaqiawKBVA)

Jobs:

...

是也乎

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

Comments


大妈的多重宇宙 - YouTube

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

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


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


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

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