神奇/但绝不神秘-直接在shell中运行Py

原文: PyCoder's Weekly - Issue #420

RPP

PyCoder

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

Victor Stinner and Julien Danjou sat down (remotely, that is) with Anne-Laure Civeyrac to talk about Python’s performance. They discuss everything from profiling, why Python is slow, and projects aimed at improving Python’s performance. Check it out!

(是也乎:

pycoders

真杂志.

)

In this step-by-step tutorial, you’ll learn how to move a Django model from one app to another using Django migrations. You’ll explore three different techniques and learn some helpful guidelines for choosing the best approach for your situation and needs.

(是也乎:

所有基于 ORM 框架的必修课

Model

太空鱼雷重装填...

)

Naomi Ceder will not be running for re-election to the PSF board of directors. In this blog post, she explains her reasons and thanks the community for the chance to serve.

(是也乎:

标准人事变更

)

Python’s concurrent.futures module is a high-level interface for the threading and multiprocessing modules. You can use it to effortlessly code asynchronous tasks!

Take a deep dive into .pyc files, opcodes, and disassembling code in this in-depth article about decompiling a .pyc module with obfuscated opcodes.

(是也乎:

可以说是商业软件必修课 了...

)

Identifying streaks can be useful when dealing with sporting statistics, app logins, and more. Learn how to calculate streaks in Python using the pandas library and visualize them using Matplotlib.

讨论

Discussions

If you’re porting some Python 2 code to Python 3, you might want to check this out.

(是也乎:

标准引战帖...

)

Is this the new tabs vs. spaces? Which do you prefer?

文章,教程和嗯哼

Articles, Tutorials and Talks

This week, StellarGraph released a new version of its open source library for machine learning on graphs. One of the most exciting features of StellarGraph 1.0 is a new graph data structure — built using NumPy and Pandas — that results in significantly lower memory usage and faster construction times.

Learn how Python’s eval() built-in works and how to use it effectively in your programs. Additionally, you’ll learn how to minimize the security risks associated with the use of eval().

(是也乎:

能不用就不用, 如果真撞到合适场景, 就是仙器.

eval

)

Python’s portability, quick development time, and batteries-included philosophy make it an excellent choice for SysAdmins looking to automate command-line tasks.

(是也乎:

主要问题还是运行时部署了.... 这点 Ansible 已经解决愉快的使用吧.

)

Here are six ways you can refactor code to be more concise, more Pythonic, and more performant.

(是也乎:

实在哪, 不搞动不动几十条, 就6条, 真用好了, 其乐无穷.

基本上常见的:

压平嵌套 if
抽离重复语句
用 yield from 简化 yield any 简化条件循环
用 list() 替代 []
提升声明到循环外

嗯哼, 之前有另外5条, Nick 很6哪...

)

Docker is a common tool for Python developers creating and deploying applications, but what do you need to know if you want to use Docker for data science and machine learning? What are the best practices if you want to start using containers for your scientific projects? This week Christopher’s guest is Tania Allard, she is a Sr. Developer Advocate at Microsoft focusing on Machine Learning, scientific computing, research and open source.

(是也乎:

RPP

)

“The Python Language Summit is a small gathering of Python language implementers (both the core developers of CPython and alternative Pythons), as well third-party library authors and other Python community members. The summit features short presentations followed by group discussions. In 2020, the Summit was held over two days by videoconference […]”

In this course, you’ll learn how to use the Python mock object library, unittest.mock, to create and use mock objects to improve your tests. Obstacles like complex logic and unpredictable dependencies make writing valuable tests difficult, but unittest.mock can help you overcome these obstacles.

(是也乎:

Mock

)

Learn how to set-up Prometheus on a Flask application to serve up metrics like requests-per-second, average response time, memory usage, and CPU usage.

(是也乎:

Prometheus

自动化生成和实时更新

Prometheus->普罗米修斯,盗火者,

肿么说的?

项目名字起的好
社区一定活的久

Prometheus

)

好物

Interesting Projects, Tools and Libraries, Projects & Code

(是也乎:

# pyp like cut
ls | pyp 'x[:3]'
ps x | pyp 'line.split()[4]'

# pyp like wc -c
cat /usr/share/dict/words | pyp 'len(stdin.read())'

# pyp like awk
seq 1 5 | pyp 'sum(map(int, lines))'

就酱, 愉快的将各种 GNU 工具都可以用 Python 替代.

)

(是也乎:

来了来了, 谁说 Python 不能写 wasm 的?

)

(是也乎:

时隔多年, 叕一次推荐了...

tqdm

感觉一下人家的决心

)

(是也乎:

这名儿非常象 Mnesia 哪...

)

📆🐍 活动/大会

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

EuroPython has released part of their speaker lineup for the conference, which is slated to take place online from July 23–26, 2020.

(是也乎:

有网络就有可能.

)

DAMA

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

101camp8py 已经开始报名(能开发票 ;-)

报名

课程规划:
    报名截止 2020.5.24
    正式开课 2020.5.31
    课程结束 2020.7.12

详情 => 蟒营™ Python 入门班第8期

PS:


NN 4012

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

投稿/反馈邮箱:

askdama@googlegroups.com

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


ZoomQuiet/大妈

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

私自嗯哼: ZoomQuiet (订阅号: ZoomQuiet42)
公开课程: 蟒营 (订阅号: Mainium)
历史吐糟: Chaos42 (订阅号 PythoniCamp)

as 创始组织者:
    PyChina (订阅号: PyChinaOrg)
    本地社区: 
        GDG珠海 (订阅号: GDG-ZhuHai)
        TFUG珠海 (订阅号: ZH_TFUG)


Comments


大妈的多重宇宙 - YouTube

全新自媒体系列...科学幻想,读书,说故事...

任何问题

随时邮件提问可也:
askdama@googlegroups.com

-->