PyScript 飞翔在浏览器中吧 Python 君.

原文: PyCoder's Weekly - Issue #529

pycoder

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

In this tutorial, you’ll learn about PyScript, a new framework that allows for running Python in the web browser with few or no code modifications and excellent performance. You’ll leverage browser APIs and JavaScript libraries to build rich, highly interactive web applications with Python.

(是也乎:

PyScript

虽然是实验项目, 但是, 大家都很兴奋...

)

Your Django app is up. You’ve got users. Your users are hitting bugs. How do you debug to fix the problems? This article dives deep into to how to find and squish the bugs in your Django code.

(是也乎:

Django 已经平台化了, 此时的 debug 就得有新姿势了

)

Lots of applications require some form of authentication, password handling, or the use of secure credentials. What are the best practices in Python for dealing with this?

(是也乎:

安全口令在 Python 中管理的姿势... xkcd

最后给出的建议意味深长...

)

(是也乎:

调查结果出来了: 到处都是 Pythoneer

)


探讨/吐糟

Discussions

Luke Plant’s article Raising exceptions or returning error objects in Python has folks weighing in.

(是也乎:

来了, 嵌入式系统终于出圈了

)


文章/教程/嗯哼

Articles, Tutorials and Talks

In this step-by-step project, you’ll build a Python quiz application for the terminal. Your app will ask you multiple-choice questions that you can use to strengthen your own knowledge or challenge your friends to test theirs.

(是也乎:

Quiz

...quiz 这个词于 1781 年首次用于表示古怪的人; 如今,它主要用于描述对琐事或专业知识的简短测试...

嗯哼? MUD 游戏原型? 交互式测试题库...

)

When you’re processing data with Pandas, vectorized operations can speed up your code. In some cases though, they can actually make it slower, or at least no faster and memory hungry. Learn when it is helpful and when it is harmful to use vectorization.

(是也乎:

火焰图分析法

)

In this interview practice session, you’ll tackle creating a function that will double every character within a string. This challenge is typical of what you might encounter in a Python job interview. You’ll explore how to add tests to your code.

(是也乎:

Practice )

Dates and times in code can be more complicated than they first appear. Consider how datetime and date interact and how incorrect use can result in a TypeError even though they’re considered correct by type annotations.

(是也乎:

主要是提供了太多对象种类? 其实对于日期时间, 从没见象 Python 这象提供一堆内建支持的语言

)

Sampling can be done with and without replacement: when an item is sampled it may or may not be returned to the population for the next sample. Learn the differences and how it effects your statistical code.

“How you ship your code to production in a way that is fast and reliable, is a question more engineers and engineering leaders should educate themselves on.” Read on for a comparison between two extremes.

(是也乎:

分散开来看, 都是常识, 但是, 能在每个项目中将所有点都贯彻下来, 真. 不容易.

)

Three different mechanisms are common for having a single instance of a DB connection in your Python code: module level imports, the lru_cache decorator, or through singletons. See examples of each.

(是也乎:

从 dynamodb -> Redis , Python 运行时对象真的可以任性缓存到各种介质中...

)

Needing a random value happens a lot when you’re coding. This article describes different ways of getting random information in Python and how to choose amongst them.

(是也乎:

真随机, Python 是认真的

)

Through the use of an example Django web application, this article illustrates a variety of concurrency issues and how to handle them without locks.

(是也乎:

好象很早 沈游侠 就发现, 如果整个数据桟都由 Python 完成, 就可以无锁高速, 彻底的...

)


好物/妙品/...

Interesting Projects, Tools and Libraries, Projects & Code

(是也乎:

Gravatar 真的是解决了一个互联网中基础需求, 不知道在 Web 3 元宇宙中是否已经复制启用. )

(是也乎:

叕一个复合指令提示/组织界面...

)

(是也乎:

叕一个 PDF 支持库, 自从发明以来, pdf 的确变成了一个事实的通用文档格式.

)

(是也乎:

Postgres 真.神通, 一个数据库完成所有的感觉.

)


📆🐍 活动/大会

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


DAMA

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

ACM-O

(是也乎:

谈崩了, 之前通过 ACM 会员可以每年 $25 享受 O'REILLY 在线图书馆服务...现在没了

)


PS:

PPS:

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

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

问为什么:

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

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


好文笔,感叹号年度配额: 1/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
-->