原文: 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 发布;