周刊
各种来源的…
background
世界高速变化
goal
定期 review 一周以来主要变化
trac
汇集各种渠道的周刊, 以及自己每周内省小结吧…
refer.
…TBD
各种来源的…
世界高速变化
定期 review 一周以来主要变化
汇集各种渠道的周刊, 以及自己每周内省小结吧…
…TBD
原文: Import Python Weekly Newsletter - Issue No 176 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Python 中自然语言处理速度提高100倍 NLP, spaCy How to take advantage of spaCy & a bit of Cython for blazing fast NLP 对 Python 的 GIL 以纯 Python 实现 gil There is an excellent presentation of how the modern GIL performs thread scheduling, but unfortunately, it lacks some interesting details (at least for me). I was trying to understand all the details of the GIL, and it took me some time to fully understand it from the CPython’s source code. So here is a simplified algorithm of the thread scheduling that is taken from CPython 3.7 and rewritten from C to pure Python for those, who are trying to understand all the details. (是也乎: PyPy 已经作过了? ) 吃一些代码 - 在Django中处理重复测试 testing When writing tests (unit and/or functional), one of the goal is to cover all edge-cases. DDT is a great way to write such tests; here is how to do so in Python and Django. Python 3 – 分配表达式 core-python I recently came across PEP 572, which is a proposal for adding assignment expressions to Python 3.8 from Chris Angelico, Tim Peters and Guido van Rossum himself! I decided to check it out and see what an assignment expression was. The idea is actually quite simple. The Python core developers want a way to assign variables within an expression using the following notation. (是也乎: 实现很简单,但是, 想确保追加到语法后不引发其它问题,太难… ) Mypy 0.610 发布ed new release We’ve just uploaded mypy 0.610 to the Python Package Index (PyPI). Mypy is an optional static type checker for Python. This release includes new features, bug fixes and library stub (typeshed) updates. 5种 Python 发行版用于掌握机器学习 machine learning From bare-bones to full-blown, learn which edition of Python is best for your machine learning projects. 创建和共享私有 Python 包 build How django-carrot uses PyPRI to store and distribute development build? (是也乎: 简单说,上 PyPRI 也是墙外的服务… ) 估计最希望谁赢得 FIFA 世界杯: 用 Python 嗯哼推文 twitter api Religious festival of all football followers?—?FIFA World Cup 2018,has just began in Russia.This month long prestigious sports bonanza will be celebrated across the globe till it’s mega finale scheduled on 15th July. TextBlob 和情感分析 machine learning Let’s see a very simple example to determine sentiment Analysis in Python using TextBlob. 保存和托管您的第一个机器学习模型指南 machine learning In this article, we’re going to build a simple sentiment analysis platform using Flask, a lightweight web application framework. Our platform will be able to classify a movie review as either positive or negative. We’ll use the IMDB dataset to build a simple sentiment analysis model, save it, and host it on Heroku. We’ll use Gunicorn to serve our model. Python 3.7.0rc1 和 3.6.6rc1 可用 new release 好物 ~ 包/模块/库/片段… ...
原文: Pycoders Weekly (Issue #320): Force 搜罗Py万物 的周刊 亲, 又一堆好文/项目在这周被发掘! 享受她们吧,学习的周末总是美好的! 大家多分享文章 俺们才折腾的出又一周的美好呢. 喜欢就多向俺们反馈吧! 当然的,俺们也在twitter –> Mahdi & Mike ...
原文: Import Python Weekly Newsletter - Issue No 174 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 中级 Python eBook - Free ebook If you are a beginner, intermediate or even an advanced programmer there is something for you in this book. Please note that this book is not a tutorial and does not teach you Python. The topics are not explained in depth, instead only the minimum required information is given. (是也乎: 叕一本免费入门书… 所以, 图书免费, 找作者干点儿什么再收费? ) 用特征标记驯服不可逆性 software engineering Feature Flags are a very simple technique to make features of your application quickly toggleable. The way it works is, everytime we change some behavior in our software, a logical branch is created and this new behavior is only accessible if some specific configuration variable is set or, in certain cases, if the application context respects some rules. (是也乎: 简单的说, 防御型软件架构, 远远没有到放弃的地步… ) Python 咯表驱动单元测试 unit testing Now days, table driven tests are pretty much industry standard. In my workplace, we use table driven tests when we write unit tests (in golang though). Here I shall share a simple code example using pytest that shows how to write table driven tests in Python. In table driven test, what you need to do is, to gather all the tests cases together in a single table. We can use dictionary for each test case and a list to store all the test cases. Instead of discussing it further, let me show you an example. (是也乎: 其实吧, 单元测试的难点不在技术, 而在成本的认同… ) Qt for Python: under the hood pyside When the PySide project was launched back in 2009, the team decided to use external tools to generate Python bindings from Qt C++ headers. One of the main concerns, besides using a tool that properly handles all the Qt C++ constructs, was the size of the final packages. The previous choice was using templates excessively, hence another alternative was required. After analyzing a few other options the team decided to write their own generator, Shiboken. (是也乎: Qt 当年的开源是自救,现在面对移动互联网, 却一直没找到嗯哼点… 当然从 PySide –> Shiboken , 可能也只是因为 Why not 毕竟客户不多… ) 用 Python 和 scrapy, xarray, 以及 cartopy 可视化全球土地温度 scrapy, xarry, cartopy A few years ago, I worked on a project that involved collecting data on a variety of global environmental conditions over time. Some of the data sets included cloud cover, rainfall, types of land cover, sea temperature, and land temperature. I enjoyed developing a greater understanding of our Earth by visualizing how these conditions vary over time around the planet. To get a sense of how fun and informative it can be to analyze environmental data over time, let’s work on visualizing global land surface temperatures from 2001 to 2016. (是也乎: 当然, 一切的开始, 还是得要先有公开数据 ) A Gilectomy 更新 gil In a rather short session at the 2018 Python Language Summit, Larry Hastings updated attendees on the status of his Gilectomy project. The aim of that effort is to remove the global interpreter lock (GIL) from CPython. Since his status report at last year’s summit, little has happened, which is part of why the session was so short. He hasn’t given up on the overall idea, but it needs a new approach. Gilectomy has been “untouched for a year”, Hastings said. He worked on it at the PyCon sprints after last year’s summit, but got tired of it at that point. He is “out of bullets” at least with that approach. With his complicated buffered-reference-count approach he was able to get his “gilectomized” interpreter to reach performance parity with CPython—except that his interpreter was running on around seven cores to keep up with CPython on one. (是也乎: 真的有人真正动手来清除所有 GIL , 虽然 Guido 不动手, 但是, 开源世界里, 不代表不可能… ) forge project forge is an elegant Python package for crafting function signatures. Its aim is to help you write better, more literate code with less boilerplate. (是也乎: 好闹… ) 用 Python 实现缝线雕刻 image processing Seam carving is a novel way to crop images without losing important content in the image. This is often called “content-aware” cropping or image retargeting. (是也乎: 内容感知向的图片智能裁剪 ) Bpython - 可选交互式 Python 解释器 - YouTube video Bpython - alternative interactive python interpreter (是也乎: 和 IPyNB 同时期诞生的交互增强, 可惜, 人家都独立为 Jupyter 了, Bpython 还在嗯哼… ) Python 中的抽象语法树(ast library) AST An Abstract Syntax Tree is a simplified syntactic tree representation of a programming language’s source code. Each node of the tree stands for an statement occurring in the code. This trees don’t show the entire syntactic clutter, just the important information for analyzing the code. If it showed the entire structure it would be a Concrete Syntax Tree, but it’s usually better to simplify it because the information we use when building compilers can be found on an abstract syntax tree. (是也乎: 内置的只是可用, 远远达不到大家的期待.. ) 好物 ~ 包/模块/库/片段… ...
原文: Import Python Weekly Newsletter - Issue No 173 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 集合理论与实践: Grok Pythonic收集类型 core-python, set Sets and logic are strongly related. That’s why proper use of set operations can eliminate lots of nested loops and ifs, producing code that is more readable and faster. Let’s talk about using sets in practice, and learn great API design ideas from Python’s set types. Luciano covered: - Python collection types - Theory and algebraic logic behind set-less and set types - Python protocols and operations for collections - Code examples for implementations of kinds of sets (是也乎: 善用 set 可以有效减少不必要的 循环和 if 判定 ) Pyre: Python 的快速类型检查 ...