Issue 373

原文: PyCoder’s Weekly - Issue #373 如果将自己的包合理发布到 PyPI REAL PYTHON video Learn how to create a Python package for your project and how to publish it to PyPI, the Python Package Repository with this step-by-step tutorial. Quickly get up to speed on everything from naming your package to configuring it using setup.py. (是也乎: 虽然教程很多, 但是, 有专用题图的不多. ) 比较Rust,Haskell,C,Python,Scala和OCaml中的相同项目 TRISTAN HUME “A rare opportunity to compare implementations of large programs that all did the same thing, written by friends I knew were highly competent, and have a fairly pure opportunity to see what difference design and language choices could make.” 走向 “Kernel Python” GLYPH LEFKOWITZ opinion “We need a newer, leaner, unburdened ‘kernel’ Python. We need to dump the whole standard library out on the floor, adding back only the smallest bits that we need, so that we can tell what is truly necessary and what’s just nice to have.” 在 Python 中用 main.py SHANE O’NEILL “The magic file main.py is called when you run your project with the -m module flag. If you code is intended to be used a module first, and command line interface second, this makes perfect sense to use. Think of it as a place we can put whatever would be in our body of our if name === “main” statement.” PyPI现在支持通过 WebAuthn 进行双因登录 PYFOUND.BLOGSPOT.COM “To further increase the security of Python package downloads, we’re adding a new beta feature to the Python Package Index: WebAuthn support for U2F compatible hardware security keys as a two-factor authentication (2FA) login security method.” PSF公布2019年董事会选举结果 TWITTER.COM/THEPSF “The 4 available seats go to: Lorena Mesa @loooorenanicole , Kushal Das @kushaldas, Marlene Mhangami @marlene_zw, and Jannis Leidel @jezdez. Congratulations to Lorena, Kushal, Marlene, and Jannis!” Python 动态编程示例 NATHAN GOLDBAUM A short introduction to the (confusingly named) concept of dynamic programming with Python. 讨论 Discussions ...

2019-06-19 · 4 min · 1744 words · ZoomQuiet

Issue 372

原文: PyCoder’s Weekly - Issue #372 Python 预测未来4年将超越 C 和 Java ZDNET.COM “Python’s ascent continues among software developers, bolstered by its usability compared with Java and C.” (是也乎: Go 在 10年前就预测过自己将在10年以内超越 JAVA ) CPython 3.8.0b1 可用于测试 PYTHON.ORG New features include: f-string debugging, “async REPL” mode, AsyncMock in unittest.mock, async-support for unittest, math.comb added, Python embedding got better, and more. 如何用 Tweepy 制作 Python Twitter 机器人 REAL PYTHON Learn how to make a Twitter bot in Python with Tweepy, which is a package that provides a very convenient way to use the Twitter API. You can use your Twitter bot to automate all or part of your Twitter activity. (是也乎: 等等, 为什么那么多教程都在尝试向一个不存在的网站自动化收发不存在的嗯哼? ) 2019 目前 Python 打包势态 STEFANO BORINI “In this post, I will try to explain the intricate details of Python packaging. I spent the best part of my evenings in the past two months to gather as much information as possible about the problem, the current solutions, what is legacy and what is not.” Related discussion on Hacker News (是也乎: Poetry 硬广, 但是, 也揭示至今, 有关部署 Py 环境, 还是没有统一靠谱方案. ) macOS 未来版本将不包括 Python 2.7 MICHAEL TSAI The next macOS release deprecates built-in Python 2.7 and other system scripting languages, such as Ruby. The system scripting languages on macOS have always lagged behind the latest releases, for example, the macOS system Python is still on 2.7. You’ll still be able to install Python 2 or Python 3 as you would most likely anyway today. (是也乎: 虽然从来不用系统内置的 Python, 但是, 这又是一个不买新 MBP 的理由了… ) 解决 Python 编程难题 ~> 循序渐进 DONNACHA OISÍN KIDNEY “This post is a write-up of a solution to part of a programming puzzle I did yesterday. It’s a little different than the usual ‘solution + theory’ approach, though: I’m going to talk about the actual steps you’d need to take to get to the solution (i.e. what to google, what intermediate code looks like, etc.).” 为 PyTorch 编写玩具后端编译器 BRAM WASTI “This tutorial is designed as an end-to-end walkthrough detailing all that is necessary for building and integrating a compiler into PyTorch’s JIT.” 讨论 Discussions ...

2019-06-12 · 4 min · 1952 words · ZoomQuiet

Issue 371

原文: PyCoder’s Weekly - Issue #371 Python 中的指针: 有什么意义? REAL PYTHON Get a clearer understanding of Python’s object model and learn why pointers don’t really exist in Python. You’ll also cover ways to simulate pointers in Python without the memory-management nightmare. (是也乎: 这个插图真心没 got 到技术点儿… ) Python 和并发: CSP 和协同程序 YING WANG Nice overview of “communicating sequential processes” (CSP), a concurrency model similar to the notion of actor models, and how it can be implemented in Python. (是也乎: 珢神很久没嗯哼点儿什么了… 等等, 嚓同音, 不是珢神… 简单说, 并行计算在 Py 中不是难事儿, 困难的只是在生产环境中稳定嗯哼起来? 反正作为学术问题, 这个方向还够养活几个博士的… ) CNNs,第2部分:训练卷积神经网络 VICTOR ZHOU A nice walkthrough of deriving backpropagation for CNNs and implementing it from scratch in Python. 重写 Slack Python SDK RODNEY URQUHART The lead maintainer of the Slack Python SDK gives a retrospective about refactoring the current SDK and migrating it from Python 2 to Python 3. (是也乎: 嗯哼? 应该喜大普奔嘛? Py2->py3 ) Python 的 Caduceus 综合症 VICKI BOYKIS “Which of the two should the ecosystem tackle as a priority? Should they clean up all backwards compatibility first? (that would be PEP 594, ‘removing dead batteries from the standard library’) Should they focus on moving everyone over to the new features?” (是也乎: Caduceus Py2/3 变成现实中纠缠态事务,难以决策 ) PyPI 现在支持双因素身份验证 ERNEST W. DURBIN III Protect your PyPI login with two-factor authentication using Time-based One-time Password (TOTP) app. (是也乎: 但是, 镜像也就越来越困难… ) Language Summit 闪电演讲(摘要) A. JESSE JIRYU DAVIS • Shared by Ricky White Summaries of the lightning talks presented at the Python Language Summit at PyCon 2019. (是也乎: 其实, 闪电演讲才是一个大会的灵魂. ) PSF Q2 2019 筹款活动 PYTHON.ORG Support the Python Software Foundation by donating in the quarterly donation drive. Your donations help fund Python conferences, workshops, user groups, community web services, and more. 讨论 Discussions ...

2019-06-05 · 5 min · 2151 words · ZoomQuiet

Issue 370

原文: PyCoder’s Weekly - Issue #370 PEP 594: 从标准库中删除死电池 PYTHON.ORG “This PEP proposed a list of standard library modules to be removed from the standard library. The modules are mostly historic data formats (e.g. Commodore and SUN file formats), APIs and operating systems that have been superseded a long time ago (e.g. Mac OS 9), or modules that have security implications and better alternatives (e.g. password and login).” (是也乎: 死电池… ) 将数学结构转换为 Java,Python,Haskell 和 Racket 示例代码 MATT MIGHT Nice guide to translating the common discrete mathematical structures, such as sets, sequences, functions, disjoint unions, relations and syntax, into working code in Java, Python, Racket and Haskell. Python Logging: 漫步源代码 REAL PYTHON In this step-by-step tutorial, you’ll learn about how the Python logging package is designed from an OOP perspective. You’ll walk line by line down the package’s core module and become better equipped to know what your code is doing. (是也乎: 真蟒 ~ 看来是要上市了? 每周这么多好文章发布… ) 在生产中运用 Poetry MISHA BEHERSKY • Shared by Misha Behersky “In this article I want to share my experience of using the Poetry dependency manager in production environment.” (是也乎: Poetry 叕一个想替代 Pyenv/pipenv 的嗯哼 ) Keras: 深度学习提取大数据集特征 ADRIAN ROSEBROCK In this tutorial you will learn how to use Keras feature extraction on large image datasets with Deep Learning. We’ll also learn how to use incremental learning to train your image classifier on top of the extracted features. 在 Python 中从头实现卷积神经网络 VICTOR ZHOU A simple but detailed guide to what CNNs are, how they work, and how to build one from scratch in Python. (是也乎: 够硬核 ) 使用 GDB (GNU调试器) 探索Python EVAN BRODER “In order to demonstrate some of GDB’s flexibility, and show some of the steps involved in practical GDB work, we’ve put together a brief example of debugging Python with GDB.” (是也乎: 可能是复杂工程调试的最佳助推器 ) 1884年皇家天文学会告诉我们今天的 Python 开发者 SCOTT KILPATRICK Or: Why dealing with time zones is hard. (是也乎: 为什么处理时区很难… ) 为什么 Python 类语法这么不同 NED BATCHELDER Interesting language design discussion about Python’s class syntax and how it could be made more regular and beginner friendly. 讨论 Discussions ...

2019-05-31 · 4 min · 1709 words · ZoomQuiet