機器狗已在公開發售,支持用 Python 對其編程...
原文: PyCoder's Weekly - Issue #427html
PEP 622: 結構模式匹配node
This PEP proposes adding pattern matching—a sort of enhanced switch statement—to the Python language. Read the PEP at the link above and follow the discussion on Reddit.python
(是也乎:
git
def is_tuple(node: Node) -> bool: match node: case Node(children=[LParen(), RParen()]): return True case Node(children=[Leaf(value="("), Node(), Leaf(value=")")]): return True case _: return False
這很是 Elixir 了.程序員
)github
Clinging to Memory: Python 函數調用如何增長內存使用量web
One of the advantages Python has over a language like C is that you don’t have to worry about how memeory is freed up during program execution. But sometimes Python’s memory management doesn’t work the way you’d expect.正則表達式
Python的 reduce(): 從實用風格到 Pythonic 風格編程
In this step-by-step tutorial, you’ll learn how Python’s reduce() works and how to use it effectively in your programs. You’ll also learn some more modern, efficient, and Pythonic ways to gently replace reduce() in your programs.網絡
(是也乎:
用 eomji 來解釋...
)
What makes Python… Python? Is it the language semantics? A set of features? What could you strip away and still have something you’d call Python? Everyone needs a little programming language existentialism now and then.
(是也乎:
這 logo 也忒萌了吧...
)
Python 模式匹配: 守衛和其餘模式可能不會以您指望的方式進行交互
There’s an implementation of PEP 622 that you can try out here. But it has some potentially confusing effects.
Boston Dynamics 如今向公衆出售機器狗,您可使用Python對其進行編程
It only took 28 year, but now you can have your very own robot dog. If you can stomach the price tag, that is. But hey, it’s got a Python SDK!
(是也乎:
嗯哼?大衆也能夠擁有軍事級機械人了?
)
Is that a corgi or a goldfish?
Discussions
Considering issues like floating-point representation error, is it ever a good idea to use a float as an index?
Is it, though? The square root of 2 might not be a good value for timing comparisons.
Articles, Tutorials and Talks
The Python heapq 模塊: 使用 Heaps 和優先級隊列
Explore the heap and priority queue data structures. You’ll learn what kinds of problems heaps and priority queues are useful for and how you can use the Python heapq module to solve them.
(是也乎:
)
The lru_cache decorator allows you to take advantage of memoization to optimize function calls.
In this course, you’ll get a Python-centric introduction to character encodings and Unicode. Handling character encodings and numbering systems can at times seem painful and complicated, but this guide is here to help with easy-to-follow Python examples.
(是也乎:
用無線電載波來形容 Unicode 流程, 好贊.
)
Author Victor Stinner argues that Python’s C API is too close to the CPython implementation, which limits available optimizations and hinders the addition of new features. PEP 622 proposes hiding implementation details from the C API.
Have you wanted to learn Regular Expressions in Python, but don’t know where to start? Have you stumbled into the dreaded pink SettingWithCopyWarning in Pandas? Then check out this episode of the Real Python Podcast.
(是也乎:
)
The Dependency Inversion Principle helps you design code that is more extensible and easier to test. You can use it to test code that makes HTTP requests without using mocks.
(是也乎:
隨着微服務的擴張,
RPC 盛大回歸,
基於 HTTP 的請求愈來愈少的了...
)
Red Hat Enterprise Linux 8.2 帶來更快的 Python 3.8 運行速度
Red Hat explains how they compiled CPython with GCC’s -fno-semantic-interposition flag to get run time speed improvements up to 30% faster than normal.
Should you use mutable objects for default function arguments? Conventional wisdom says no, but has the risk been overstated?
[Street Lanes Finder: 檢測無人駕駛汽車的街道車道[2019]](https://pycoders.com/link/437...
Learn how to use OpenCV to detect street lanes in an image of a road.
Interesting Projects, Tools and Libraries, Projects & Code
Nuitka: Nuitka是用Python寫的Python編譯器
(是也乎:
很久沒見這位的消息了,
還活着, 甚好.
)
TextAttack: NLP 中用於對抗性攻擊/數據加強和模型訓練的 Python 框架
(是也乎:
NLP 相關項目愈來愈多,
說明 AI 落地首先是這個方向?
)
konlpy: 用於 朝鮮語 天然語言處理的 Python軟件包
(是也乎:
嗯哼, 不多見的小語種 NLP 模塊哪...
目測是國家項目?
)
pyperclip: 跨平臺 剪貼板 功能的 Python 模塊
(是也乎:
這個能夠有,
經過Py 就能夠和遠程主機進行 剪貼板 自動同步操做了?
)
magnum: 輕量級和模塊化 C++11/C++14 圖形中間件,用於經過Python綁定進行遊戲和數據可視化
(是也乎:
反正 Python 從內核就設計的異常親 C,
因此, 各類 C++ 的模塊進行包裝很天然.
)
Events, MeetUp 真的是全球線下活動組織中心
(是也乎:
中國也已經接到有關通知, 容許線下集會申報了...
並且今年程序員節(10.24)可能有超級大會.
)
❤️ Happy Pythonic ;-(
大媽私人無責任播報
)
101camp10py 開始報名
課程規劃: 報名截止 2020.7.20 正式開課 2020.7.26 課程結束 2020.9.06
詳情 => 蟒營™ Python 入門班第10期
提醒: 首週報名再優惠 420 元.
NN 4061
好文筆,感嘆號年度配額: 1/3
投稿/反饋郵箱:
askdama@googlegroups.com
(郵件列表地址,
當成正常郵件發送郵件就好, 不用註冊, 不用翻越...)
ZoomQuiet/大媽
就是四處 是也乎,( ̄▽ ̄)
的那個大媽:
私自嗯哼: ZoomQuiet (訂閱號: ZoomQuiet42) 公開課程: 蟒營 (訂閱號: Mainium) 歷史吐糟: Chaos42 (訂閱號 PythoniCamp) as 創始組織者: PyChina (訂閱號: PyChinaOrg) 本地社區: GDG珠海 (訂閱號: GDG-ZhuHai) TFUG珠海 (訂閱號: ZH_TFUG)