蟒周刊-401-Python 2.7 今天正式退休

2020/01/01 18:13
阅读数 211

原文: PyCoder's Weekly - Issue #401


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

Python 2.7 will not be maintained past Jan 1st, 2020. So long Python 2, and thank you for your years of faithful service. Python 3, your time is now!


当然, 海量 Py2.7 兼容代码, 将继续在非官方支持下良好运行到永远...


“The Zen of Python is not ‘the rules of Python’ or ‘guidelines of Python’. It is full of contradiction and allusion. It is not intended to be followed: it is intended to be meditated upon. In this spirit, I offer this series of meditations on the Zen of Python.”


蟒之禅 的原义就是引发沉思,而不是终止之...


Learn how to use Python timer functions to monitor how fast your programs are running. You’ll use classes, context managers, and decorators to measure your program’s running time. You’ll learn the benefits of each method and which to use given the situation.



总之: codetiming 内置计时器;

time.perf_counter() 提供精确计时;

timeit 专用运行时计时;

cProfile 专用性能分析器;

pstats CLI 性能分析工具;

KCachegrind GUI 工具来观察性能分析数据;

KcgShot3Small.gif (GIF Image, 260 × 218 pixels)

line_profiler 单行代码性能监察;

memory-profiler 内存监察工具.


The creator of Flask reflects on the Python 2 to 3 migration and how the Python community handled the transition. Interesting read!


数字游民 不同, 移民指就基础运行平台的迁移, 不象 Python 1.x -> 2.x 的迁移, 亳无压力, 因为, 当年根本就没什么成规模的 1.x 工程.

所以, 技术工程迁移, 多数阻力不在技术, 而在情绪, 就象人月神话,以及其它真实软件工程心理学著作中论及的...

代码相处时间久了, 一样有感情的, 被迫迁移到完全无感觉的新平台中, 就象改嫁...


Some good tips and ways to minimize the context interruption when moving between the shell and a Python session.


厨子说的总是有用的.... )

Embedded systems engineer builds a card-sized computer that boots Linux and runs MicroPython. Cool!




已经有人准备将之复制并配置为实体 BTC 銭包了...



> Discussions



> Articles, Tutorials and Talks

“[It] seems worthwhile for me to write-up my perspective as one of the lead architects for that ecosystem on how I characterize the overall problem space of software publication and distribution, where I think we are at the moment, and where I’d like to see us go in the future.”


简单的说, 还在春秋战国时代, 远没有稳定下来


I was a guest on Mike Kennedy’s Talk Python podcast and we discussed a shortlist of 10 interesting tutorials published on Real Python in 2019. So if you’re looking to expand your year-end reading list you’ll find some inspiration there. It’s always a treat to be on Mike’s show—definitely check out his podcast!


果然, 每年必须的 top1 文章/问题/讨论都是相同的:

如何运行你的 Python 脚本?

这其实, 也展示出了编程和非编程世界的根本差异.


In this step-by-step course, you’ll learn how to sort in Python. You’ll know how to sort various types of data in different data structures, customize the order, and work with two different ways of sorting in Python.



Python 丰富的数据类型, 也就意味着有丰富的排序技巧...


Creating data batches for model training evaluated in context of loading data using Python generators, HDF5 files and NumPy using a sound processing machine-learning model as an example.

Dummy variables (or binary/indicator variables) are often used in statistical analyses as well as in more simple descriptive statistics.

This post covers mypy in general terms as well many examples demonstrating the syntax and capabilities of this type checker.

Here you will learn how to install, uninstall, & upgrade Python packages using the pipx tool.









> Interesting Projects, Tools and Libraries, Projects & Code

Handles the hassle of handling the amount of fields to be serialized and queryset changes for each request for you.


Astropy -> 熵, 好词儿 )


formula 其实, FFmpeg 本身的控制界面足够稳了...


ffmpeg -i input.mp4 -i overlay.png -filter_complex "[0]trim=start_frame=10:end_frame=20[v0];\
-map [v5] output.mp4


import ffmpeg

in_file = ffmpeg.input('input.mp4')
overlay_file = ffmpeg.input('overlay.png')
        in_file.trim(start_frame=10, end_frame=20),
        in_file.trim(start_frame=30, end_frame=40),
    .drawbox(50, 50, 120, 120, color='red', thickness=5)




C++ 专属领域终于也被入侵了... )

📆🐍 活动/大会

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


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

(( ̄▽ ̄):

第4期已开始, 为期6周;

当前 ch2
200112 按时结束


200203 值得上线




最后3秒, Python 疯狂反转一切.



> NN 3879

101camp4py 进行中

官网 https://py.101.camp/

  • 191201 正式开课
  • 200112 按时结束
  • 5py 大年初十开始报名


Powered by: Zoom.Quiet / 昧因科技®

> 本文由博客一文多发平台 OpenWrite 发布!

点击引领话题📣 发布并加入讨论🔥
0 评论
0 收藏