Planet DebugUself

May 15, 2019

蠎周刊

Issue 368

原文: PyCoder's Weekly - Issue #368

realpython


Among the new major new features and changes so far: Assignment expressions (PEP 572), Positional-only arguments (PEP 570), multiprocessing can now use shared memory to avoid pickling, typed_ast is back.

In this tutorial, you’ll learn about libraries that can be used for playing and recording sound in Python, such as PyAudio and python-sounddevice. You’ll also see code snippets for playing and recording sound files and arrays, as well as for converting between different sound file formats.

(是也乎:

Sound

总之有太多模块可以使用, 但是, 没有完美解决所有问题的... 所以, 要组合来嗯哼...

推荐外部专用软件来嗯哼, python 就进行管理就好.

)

“This blog post talks about reverse engineering the Dropbox client, breaking its obfuscation mechanisms, de-compiling it to Python code as well as modifying the client in order to use debug features which are normally hidden from view.”

(是也乎:

litb_tracing

终于有人站出来分析靠谱的 py 客户端技巧了...

litb_debugging

虽然有麻烦, 但是, 都能嗯哼掉

)

A discussion of PEP554 (subinterpreters) and how it relates to the global interpreter lock (GIL) in CPython.

(是也乎:

有关 PEP 的讨论越来越公开了...

毕竟, BDLF 退位了, 大家终于能愉快的吵架了...

)

Another discussion of subinterpreters (PEP 554) and how they will allow true in-process parallelism.

(是也乎:

叕一则鼓动使用 py3 新特性的文章...

问题是, 用 py2 的经验来写 py3 并无太大不同哪...

)

讨论

Discussions

It was auctioned off at PyCon 2019.

Inheritance vs Composition

(是也乎:

OOP 早已证明不是银弹, 为毛一直在讨论?

嗯哼, JAVA 在努力续命...

)

文章,教程和嗯哼

Articles, Tutorials and Talks

Which Docker image should you use for your Python app? There are many choices, and it may not be obvious which is the best for your situation. This article gives you a good overview of the current options available.

(是也乎:

嫑用 Alpine Linux
嫑用 Alpine Linux
嫑用 Alpine Linux

)

In this video series you’ll see how to install and set up the PyLint code linter tool. You’ll learn why you should use code linters like PyLint, Flake8, PyFlakes, or other static analysis tools—and how they can help you write cleaner and more Pythonic code.

(是也乎:

PyLint

嗯哼, 这次插图就不搭调了...

)

“I was able to find the cheapest flights with the minimal duration and the resulting prices were almost the same as on Google Flights.”

F-Strings will get a = format specifier that expands like a macro into = to serve as a debugging aid.

If you have a public facing Django site in multiple languages, you probably want to let Google and other search engines know about it. This article shows you the minimal setup necessary to support this use case.

Pandas has a relatively new API for styling output. This article shows examples of using the style API.

How to add basic search functionality to any Django website.

(是也乎:

叕一个声明式数据可视化库,

但是, 和 Bokeh 相比, 都少了一个 HTML 输出能力

)

好物

Interesting Projects, Tools and Libraries

(是也乎:

专注各种物理量之间的转化... 嗯哼, 反正时间是最麻烦的...

)

(是也乎:

supervised

叕一系列开源 AI 课程,

)

(是也乎:

所以, pi 开始的项目, 都不念 -> 应该是

)

(是也乎:

Type !help or !h for help
Playing puzzle index: 1
Your letters are: 
            _____
           /     \
          /       \
    ,----(    N    )----.
   /      \       /      \
  /        \_____/        \
  \   H    /     \    U   /
   \      /       \      /
    )----(    R'   )----(
   /      \       /      \
  /        \_____/        \
  \   G    /     \    D   /
   \      /       \      /
    `----(    O    )----'
          \       /
           \_____/

Max score: 88
Total words: 37
Your guess: GROUND

非常经典的拼写游戏了... RMS 在 emcase 中经常玩...

)

📆🐍 活动/大会

Events

DAMA

❤️ Happy Pythonic!

(大妈私人无责任播报)

(是也乎:

FF 自己作死, 闷杀了以往杀出重围的利器 -> 扩展生态

参考: 嫑升级 FireFox 到 56 以上

前几天又故意关闭了扩展认证...以至老版本 FF 中可用 扩展 也全部失效...

依赖的一系列精选生产力扩展无法使用, 只能全部迁移到 WaterFox 中;

这才恢复 ScrapBook 的的所有体验;

CoLT 也有一半功能失常, 今天又根据分享, 用 FormatLink 完成替代...

Legacy Firefox extensions - index

是收集过往传奇扩展并支持下载的非官方网站...

现在就差 docwhat/itsalltext: It's All Text! - Edit textareas in your browser with your favorite editor!

的完美替代了...

)

Jobs:

...

  • 北京文因互动诚招 Pythonner:

是也乎

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

by Zoom.Quiet at May 15, 2019 03:42 AM

May 09, 2019

蠎周刊

Elixir Weekly #148

原文: ElixirWeekly - Elixir Community Newsletter, one email every Thursday.

elixirweekly


Every Thursday: No frills, no click-through, no spam.

当周 不老药

This week in Elixir

Jack's makes the point that umbrella projects/apps are hard to maintain and shouldn’t be used unless you’re deploying the child apps individually.

(是也乎:

和微服务一样, 某一架构泛滥时,总是撞到不合适的场景

)

Darin wrote a blog post showing off some of the fantastic work that folks are doing with Phoenix LiveView.

Another amazing collection of demos and experiments that people are building with Phoenix LiveView by Leandro.

(是也乎:

Phoenix LiveView 杂耍

)

Horde 0.5.0 just got released and it’s a big one! Derek wrote about some of the highlights in this post.

Learn how to produce and report on telemetry metrics for your Elixir application in this post by Ben.

Adam wrote a blog post introducing his library EctoMorph!

📆🐍 社区

Even more from around the Elixir community

好物

Interesting Projects, Tools and Libraries

(是也乎:

和 golang 类似, 所有基础模块, 还在 PK 中...

                                       +----------+    +----------+    +----------+
                                       |Insights  |    |CostData  |    |CostData  |
                                 +---> |Producer  <----+Producer  <----+Consumer  |
                                 |     |          |    |Consumer  |    |          |
                                 |     +----------+    +----------+    +----------+
                                 |
  +------------+     +-----------+     +----------+    +----------+    +----------+
  |Campaigns   |     |Campaigns  |     |Insights  |    |CostData  |    |CostData  |
--|Producer    <-----+Consumer   +-->  |Producer  <----+Producer  <----+Consumer  |
  |            |     |Supervisor |     |          |    |Consumer  |    |          |
  +------------+     +-----------+     +----------+    +----------+    +----------+
                                 |
                                 |     +----------+    +----------+    +----------+
                                 |     |Insights  |    |CostData  |    |CostData  |
                                 +---> |Producer  <----+Producer  <----+Consumer  |
                                       |          |    |Consumer  |    |          |
                                       +----------+    +----------+    +----------+

)

Questions & Answers

俺能提交信息并发布到下一期周刊嘛 ?

当然, 简单的发布到 ElixirStatus 就等于落入编辑视野中.

(是也乎:

ElixirStatus

是纯 Elixir 开发的...值得拿来借鉴

)

俺的邮箱地址安全嘛?

必须的, 编辑都是好银, 难道你不是?

当然, 编辑是 开源Elixir社区 的活跃成员,也是 CredoElixirStatus 的维护者。 不会通过将您的数据出售给第三方来破坏我的声誉。

那为毛要确认俺提交的邮箱地址?

那什么, 这是所有新闻组必须的礼节, 双方确认, 以便检验邮箱的确是你本人使用, 否则, 我们也不想无意间变成那什么; 而且, 你也可以在开始接收周刊前明确订阅是安全的.

I just believe that requiring double opt-in to subscribe to any email-based system is a win for both parties: You are safe from unintentionally subscribing and I can be confident that you actually own the email address and want to receive the newsletter I send you :)

Contact

反馈? 问题? 或是其它?

请直接吼: René Föhring (email or tweet @rrrene 开展快速交流).

PS:

  • 有关中文版本快译的问题
  • 可以直接在每一页底部点评中反馈
  • 实在想直接吼人? -> zoomquiet+exs(at)gmail.com

DAMA

❤️ Happy Pythonic!

(大妈私人无责任播报)

是也乎

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

by Zoom.Quiet at May 09, 2019 11:42 AM

May 08, 2019

蠎周刊

Issue 367

原文: PyCoder's Weekly - Issue #367

realpython


PyCon 2019 in Cleveland was an amazing experience! A big Thank You to all of the organizers and volunteers who made it happen! At the link above you’ll find a list of tweets from the conference to give you a sense of what it was like there. Also check out the talk recordings on YouTube.

(是也乎:

今年大会是 Py2 在世最后一次了...

得看看, 大家怎么看 Py2 没有的世界...

)

“I did not enjoy at all when the central developers were sending me hints on Twitter questioning my authority and the wisdom of my decisions, instead of telling me in my face and having an honest debate about things.”

(是也乎:

网络暴力无论谁, 也无法真正无视...

因为人脑是自动化处理信息的, 主意识只能起个分流作用...

garbage in 
garbage out

)

“You’ve run your batch process with your scientific model, and after hours and hours it spit out a result. And the result is wrong.” Itamar’s article has some valuable tips on how to debug this type of situation in your own Python programs.

(是也乎:

如何避免长期运行后才有结果的程序, 给出错误结果...

)

Vettery specializes in developer roles and is completely free for job seekers. Interested? Submit your profile, and if accepted, you can receive interview requests directly from top companies seeking Python devs. Get started →

(是也乎:

想肉身翻越的可以一试...

另外 FCC 也是好渠道...

)

Challenges in making a package index turn a profit and what happened in the JavaScript community with NPM. Recommended reading!

(是也乎:

这是向服务厂商进化的必然, 就看 PFP 是否够胆了...

否则, PyPi 永远无法成为生产线中的一环...

)

This post discusses some of the current profiling tools and techniques for Python apps: “The official documentation has a whole section on the subject, but we shall go beyond that and have a look at some alternative solutions, especially in the area of sampling profilers.” Nice read!

(是也乎:

python_structs

真心没那么简单,好在早已有方便工具:

austin

)

This article shows you how to maintain your own GeoIP database and how to implement an API around it. Very cool, I had no idea this data was available for free.

Learn how to sort various types of data in different data structures, customize the order, and work with two different ways of sorting in Python.

(是也乎:

Guide_Watermarked

真蟒的插画真心可以出画册了..

)

讨论

Discussions

NIL

文章,教程和嗯哼

Articles, Tutorials and Talks

Learn how to use the “main function” pattern in Python, as well as some best practices to organize your code so it can be executed as a script and imported from another module.

(是也乎:

Function_Watermarked

)

A new & fun Python podcast hosted by two middle school teachers learning and teaching Python. Kelly & Shawn, nice meeting you at PyCon!

(是也乎:

等等,纯语音教授编程?

嗯哼, 如果不是盲人, 没必要这么拼吧...

)

“In this tutorial, we’ll be learning and creating RESTful APIs with Flask. To follow along with this tutorial, you should already have a good grasp of Python, Flask, and SQLAlchemy.”

New feature that allows you to edit locally and have your code and tools are running remotely inside of Docker containers, remote SSH hosts, and the Windows Subsystem for Linux (WSL).

(是也乎:

看起来很美, 暂时仅支持和 WSL 远程, 不过, 即使支持 nature linux,

可是, 为毛要修改远程主机文件? 直接的?

)

An intro to the benefits of distributed systems and how to move to distributed systems using RabbitMQ. Learn the fundamentals of RabbitMQ and how to interact with it using Python.

(是也乎:

其实, Jupyter 本身也具有类似能力了

)

Join the O’Reilly Open Source Software Conference (OSCON) this July to see what’s shaping software development—from AI and cloud technology to distributed computing—and learn how to put it to work for you. Save 25% with code PYCODER.

“How could ancient Sumerian wheel builders have calculated the ideal shape without modern computers and software? We may never know. Luckily, with today’s technology, it is relatively easy to rediscover the wheel’s optimal shape.” ;-)

(是也乎:

PyTorch 想追上 TF 首先, 得能进入 mobile 系统

)

Learn how context managers and the “with” statement work in Python, including the difference between class-based and function-based context managers.

Quick overview of the Black code formatter, one of my favorite developer productivity tools.

(是也乎:

叕一则 FP.py 的宣传..只是...

)

好物

Interesting Projects, Tools and Libraries

This is incredible, a clean-room reimplementation of the ZFS filesystem in Python, without reading the original C source code. Quote: “It seemed like it might be a fun project.”

(是也乎:

等等...意思是 ZFS 有复苏可能?

$ zexplore label -p tests/fixtures/feature_large_blocks
{b'errata': 0,
 b'features_for_read': {},
 b'guid': 6168868809305637343,
 b'hostid': 8323329,
 b'hostname': b'ubuntu-zesty',
 b'name': b'feature_large_blocks',
 b'pool_guid': 16637796155898928459,
 b'state': 1,
 b'top_guid': 6168868809305637343,
 b'txg': 16,
 b'vdev_children': 1,
 b'vdev_tree': {b'ashift': 9,
                b'asize': 62390272,
                b'create_txg': 4,
                b'guid': 6168868809305637343,
                b'id': 0,
                b'is_log': 0,
                b'metaslab_array': 33,
                b'metaslab_shift': 24,
                b'path': b'/vagrant/fixtures/feature_large_blocks',
                b'type': b'file'},
 b'version': 5000}

)

Pykka is a Python implementation of the actor model. The actor model introduces some simple rules to control the sharing of state and cooperation between execution units, which makes it easier to build concurrent applications.

(是也乎:

将一切化入 dict 对象

)

📆🐍 活动/大会

Events

DAMA

❤️ Happy Pythonic!

(大妈私人无责任播报)

(是也乎:

FF 自己作死, 闷杀了以往杀出重围的利器 -> 扩展生态

参考: 嫑升级 FireFox 到 56 以上

前几天又故意关闭了扩展认证...以至老版本 FF 中可用 扩展 也全部失效...

依赖的一系列精选生产力扩展无法使用, 只能全部迁移到 WaterFox 中;

这才恢复 ScrapBook 的的所有体验;

CoLT 也有一半功能失常, 今天又根据分享, 用 FormatLink 完成替代...

Legacy Firefox extensions - index

是收集过往传奇扩展并支持下载的非官方网站...

现在就差 docwhat/itsalltext: It's All Text! - Edit textareas in your browser with your favorite editor!

的完美替代了...

)

Jobs:

...

是也乎

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

by Zoom.Quiet at May 08, 2019 01:42 AM