ChatGPT 中断

原文: PyCoder's Weekly - Issue #570

pycoder

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

What are the core lessons you’ve learned along your Python development journey? What are key takeaways you would share with new users of the language? This week on the show, Duarte Oliveira e Carmo is here to discuss his recent talk, “Four Years of Python.”

(是也乎:

Learned

意大利 PyCon 的背景故事...

)

Pydantic is a Python library that provides data validation and settings management using Python type annotations. It allows developers to define a schema for their data, which includes the expected data types, default values, and validation rules.

On March 20th ChatGPT had an outage. It was caused by an asyncio redis-py client bug and also resulted in a data leak. Read more for details.

(是也乎:

暗网的自觉行动?

)

(是也乎:

看来还得等等, 看看后真相是什么

)


探讨/吐糟

Discussions

None


文章/教程/嗯哼

Articles, Tutorials and Talks

The 1+N database anti-pattern is common: fetch some rows from the database then re-fetch specific rows to get all the items. An ORM can hide this away and make you not realize it is happening. This article talks about how to stop it in Django. With added meta-bonus: he links to how he attempted to write the article with ChatGPT.

(是也乎:

ORM 毕竟不是编译器, 最大的问题就是隐藏了问题...

)

This article examines the original paper that proposed back propagation neural nets and relates what has changed and what is the same. Using that knowledge, it looks forward to what neural nets may be able to do decades from now. Includes accompanying code samples.

(是也乎:

和芯片制造一样, 没有几十年的持续投入, 随便炼点儿土钢, 不顶用的...

)

“A (reasonable) criticism of async is that it tends to proliferate in your code. In order to await something, your functions must be async all the way up the call-stack. Textual is an async framework, but doesn’t require the app developer to use the async.” Learn how Textual accomplishes async-agnosticism.

“While Python is not a pure functional programming language, you still can do a lot of functional programming in it. In fact, just one function - reduce() - can do most of it.” This article introduces you to reduce().

(是也乎:

from functools import reduce
import operator

# Signature:
reduce(function, iterable[, initializer])

# Factorial
reduce(lambda x, y: y*x, range(1, 6), 1)
reduce(operator.mul, range(1, 6))
(((((1 * 1) * 2) * 3) * 4) * 5)
# 120

没错瞬间变成 LISP 的法宝

)

In this tutorial, you’ll learn the difference between the string representations returned by .repr() vs .str() and understand how to use them effectively in classes that you define.

(是也乎:

__repr__

都是渊源的函数

)

Using .env files to specify configuration environments can be handy, but problematic when it comes to multiple platforms. Some toolsets are starting to explore the use of TOML instead.

(是也乎:

这才是趋势哪...

.toml.env 就好

)

A few simple steps can make all the difference in whether your project gets noticed. This article is about Django projects, but most of the advice applies across all code bases.

Learn how to run a Python server inside a read-only Docker container and how to pre-bundle the SCSS and JS files in a separate step.

(是也乎:

容器是个好想法, 但是, 用起来真心没有 BSD 的 jail 简洁;

)

Learn keyboard shortcuts that will make you a more efficient and productive Python programmer with VS Code.

Learn how to use Python to interface with OpenAI’s API to do image generation.


好物/妙品/...

Interesting Projects, Tools and Libraries, Projects & Code

(是也乎:

所以, 英文就应该是万事万物的指令层?

这等于将以往精确的 CLI 工具参数, 变成了自然语言陈述...

)

(是也乎:

应该是专门训练一个 CLI 专家模型

)

(是也乎:

nicegui

叕一个 web-based UI 框架, 只是, 这只已经发布到 1.0 版本, 可以尝试用了...

专注自动生成 UI , 而没考虑跨平台应用编译, 从而足够简洁.

)


📆🐍 活动/大会

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


历史上的这周


DAMA

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

          _~^--~_
      \/ /  ☉ +  \ \/
        '_   ⏡   _'
        / '--~--' )

...act by ferris-actor v0.2.4 (built on 23.0303.201916)

PS:

Happy Pythoning!

Copyright © 2023 PyCoder’s Weekly, All rights reserved.

PPS:

不觉中蟒周刊快译已经到了第10+2个年头

开始有小伙伴加入承担 pythonisa 周刊的翻译, 从来没提醒过, 可就这么默默坚持下来了...

问为什么:

[皱眉]每周新闻资讯 怎么能错过 
看看有什么新东西 
当有新的发现时:
    what f**k 还能这样玩? 还有这东西?
    每周开彩蛋[吃瓜]

无法同意更多... 很多社区贡献看起来辛苦, 其实受益最多的, 就是主动承担者也.

所以++> 锈周刊 -> Weekly :: China


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

投稿/反馈邮箱:

askdama@googlegroups.com

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


ZoomQuiet/大妈

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

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

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


Comments


大妈的多重宇宙 - YouTube

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

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


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


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

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