原文: PyCoder's Weekly - Issue #410html
Python Requests 高級用法python
「While it’s easy to immediately be productive with requests because of the simple API, the library also offers extensibility for advanced use cases. If you’re writing an API-heavy client or a web scraper you’ll probably need tolerance for network failures, helpful debugging traces and syntactic sugar.」git
EOF不是字符github
Do you know how an application knows when a read operation reaches the end of a file? In this interesting read, explore what EOF (end-of-file) really is by writing your own version of the Linux cat command in ANSI C, Python, Go, and JavaScript.web
The double-checked locking pattern is useful when you need to restrict access to a certain resource to stop simultaneous process from working on it at the same time. Learn how to apply this pattern in Django using the ORM and database level locking features.segmentfault
Python Bindings: 從 Python 調用 C 或 C++windows
What are Python bindings? Should you use ctypes, CFFI, or a different tool? In this step-by-step tutorial, you’ll get an overview of some of the options you can use to call C or C++ code from Python.數據結構
(是也乎:
多線程
雖然 Py 們好用又好寫,
可是, 真正比拼的仍是對 C/C++ 們的調用能力,
畢竟這個世界底層是 C 家族的.
)
PyPy 狀態 Blog: PyPy 和 CFFI 已遷移到 Heptapod
PyPy has moved the center of their development off Bitbucket and to the new foss.heptapod.net/pypy
(是也乎:
由於 Bitbucket 涼了...
俺的倉庫也得遷移了...
foss.heptapod.net <- GitLab企業版, 無償使用環境...
)
PyCon 2020: March 2 COVID-19 下的更新
「As of March 2, PyCon 2020 in Pittsburgh, PA is scheduled to happen.」
(是也乎:
技術大會也被疫情了
)
(是也乎:
Pittsburgh PyCon 的宣傳文案來了...
)
Discussions
(是也乎:
被老爹點過名的品牌活動,
如今愈來愈會進行 SNS 營銷了.
)
(是也乎:
開始大討論了...
)
Articles, Tutorials and Talks
用 CMake 和 Setuptools 爲 C++ 項目打包和分發 cppyy 生成的 Python綁定
「I rewrote the cppyy CMake modules to be much more user friendly and to work using only Anaconda/PyPI packages, and to generate more feature-complete and customizable Python packages using CMake’s configure_file, while also supporting distribution of cppyy pythonization functions.」
(是也乎:
沈遊俠曰過:
每一個程序猿 總會去寫 本身反覆用一輩子的 makefile
實在是 CMake 這工具, 早已就解決了一切自動化編譯問題.
)
Polynomial regression is a core concept underlying machine learning. Learn how to build a polynomial regression model from scratch in Python by working you a real world example to predict salaries based on job position.
Learn how to implement a stack data structure in Python. You’ll see how to recognize when a stack is a good choice for data structures, how to decide which implementation is best for a program, and what extra considerations to make about stacks in a threading or multiprocessing environment.
(是也乎:
打年糕? 這梗用的好.
)
Eric Snow has been working on solving multi-core Python via subinterpreters since 2015. In this article, core developer Victor Stinner discusses how state is passed between interpreters and summarizes his proposal for explicitly passing state to internal C function calls.
(是也乎:
多線程狀態, 這一直是玄學問題哪...
不過, 這也是 PL 重要的科題了...能夠養活不少博士了.
)
A Python programming environment called nbdev, which allows you to create complete python packages, including tests and a rich documentation system, all in Jupyter Notebooks.
(是也乎:
這的確是 IPython 獨立爲 Jupyter 的緣由,
不過想學 smalltalk 們代碼/運行時合體, 還有距離哪
)
Learn about some of the common problems you encounter when dealing with legacy codebases and how to overcome them in an efficient way that balances delivery with code quality.
(是也乎:
俗稱屎山.
)
Python 中帶有 ordered_enum 的徹底有序枚舉
Python’s enum.Enum does not provide ordering by default. See how ordering can be added to enums and why these orderings are useful in the first place.
(是也乎:
不管字典們內部數據結構多科學,
排序, 仍是平常最多見的期待.
)
Sometimes your code has to take different paths based on the external environment. Make sure that your coverage follows it smoothly.
(是也乎:
爽滑的進行外部目錄依賴變動..
仍是靠人的事先清醒的規劃哪...
)
部署機器學習模型: gRPC 和 TensorFLow 服務
Learn how to deploy TensorFlow models and consume predictions via gRPC.
(是也乎:
叕見 gPRC ... 因此, 俺一直說:
人生苦短 Python 當歌
)
Plenty of Python in there…
(是也乎:
從 MySQL 到 Apache Druid ,
叕一則技術棧演變故事...
)
(是也乎:
當年, 這但是 Perl 的領域..如今也都是 Py 的了
)
(是也乎:
自動化批量處置 pdf 的好物
)
如何將 Python 字典數據 轉換爲 Pandas DataFrame
(是也乎:
很是實用哪...畢竟, 中間有 numpy 在亂來...
)
用 Arcade 和 Python-Banyan 進行點對點遊戲
Django Speed Handbook: 加快Django應用的速度
(是也乎:
分享人, 差點兒覺得是 西貝
...
)
Interesting Projects, Tools and Libraries, Projects & Code
(是也乎:
想法很好...
惋惜, 用起來太複雜了點兒...
)
(是也乎:
叕一則針對圖形的 ML 框架,
可是, 不是小樣本的..
)
(是也乎:
叕一個 Py->C++ 轉換工具, 不知道靠譜卟
)
(是也乎:
神奇哪, 首次見到在 windows 平臺上完成的示例, 並且老實的將錯誤也記錄下來了:
# load some example data import pandas as pd import matplotlib.pyplot as plt from pydataset import data from funnelplot.core import funnel # create a suitable axis fig,ax = plt.subplots(figsize=(4,6)) ax.set_frame_on(False) # funnel plot, using 0.5% -> 99.5% interval funnel(df=data("Caschool"), x="testscr", group="county", percentage=99.5, error_mode="data") C:\Users\John\Dropbox\devel\funnelplot\funnelplot\core.py:14: RuntimeWarning: invalid value encountered in true_divide return band / np.sqrt(group_size) C:\Users\John\Dropbox\devel\funnelplot\funnelplot\core.py:14: RuntimeWarning: divide by zero encountered in true_divide return band / np.sqrt(group_size)
)
flakehell: Legacy-First Wrapper Around Flake8 Linter 使其超讚
Parse: 基於 Python format() 語法的規範解析字符串
napkin: Python 做爲用編寫 PlantUML 序列圖的 DSL
(是也乎:
雖然 UML 的理想沒實現, 可是, UML 圖元是真正深刻人心了...
PlantUML 是很是讚的圖形腳本工具, 可是, 畢竟語法很囧;
這樣的圖, DSL 爲:
@napkin.seq_diagram() def distributed_control(c): user = c.object('User') order = c.object('Order') orderLine = c.object('OrderLine') product = c.object('Product') customer = c.object('Customer') with user: with order.calculatePrice(): with orderLine.calculatePrice(): product.getPrice('quantity:number') with customer.getDiscountedValue(order): order.getBaseValue().ret('value') c.ret('discountedValue')
嗯哼? 也沒好哪兒去哪...對比:
@startuml participant User participant Order participant OrderLine participant Product participant Customer User -> Order : calculatePrice() activate Order Order -> OrderLine : calculatePrice() activate OrderLine OrderLine -> Product : getPrice(quantity:number) OrderLine -> Customer : getDiscountedValue(Order) activate Customer Customer -> Order : getBaseValue() activate Order Customer <-- Order: value deactivate Order OrderLine <-- Customer: discountedValue deactivate Customer deactivate OrderLine deactivate Order @enduml
)
pytest-monitor: pytest插件/用於在測試會話期間分析資源使用狀況
Generate 從日期字符串生成Python strftime() 格式代碼
Events, MeetUp 真的是全球線下活動組織中心
⋅ HackBVICAM National Student’s Convention 2k20
❤️ Happy Pythonic ;-(
大媽私人無責任播報
)
(是也乎:
2020.2.29 CSDN 繼續線上技術峯會,
大媽, 吐糟完畢:
現場錄音-> CSDN/遠程辦公大考/大媽主持/吐糟生肉版/fm.101.camp 蟒營™電臺 鉤陳各類值得探討
)
NN 3942
好文筆,感嘆號年度配額: 1/3
ZoomQuiet/大媽
就是四處 是也乎,( ̄▽ ̄)
的那個大媽:
私自嗯哼: ZoomQuiet (訂閱號: ZoomQuiet42) 公開課程: 蟒營 (訂閱號: Mainium) 全國大會: PyChina (訂閱號: PyChinaOrg) 本地社區: GDG珠海 (訂閱號: GDG-ZhuHai) TFUG珠海 (訂閱號: ZH_TFUG) 歷史吐糟: Chaos42 (訂閱號 PythoniCamp)
蟒營™Python入門班 第6期 已開始報名:
蟒營™式 原創課程服務:
伴你重享學習樂趣
Powered by: Zoom.Quiet / 昧因科技®
本文由博客一文多發平臺 OpenWrite 發佈;