- 原文: Import Python Weekly Newsletter - Issue No 102
- 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-)
该读
~ 文章, Blog, 教程...
- 如何用 Python 代码来捕获环线地铁上的流氓?
- pandas
Singapore’s MRT Circle Line was hit by a spate of mysterious disruptions in recent months, causing much confusion and distress to thousands of commuters. Like most of my colleagues, I take a train on the Circle Line to my office at one-north every morning. So on November 5, when my team was given the chance to investigate the cause, I volunteered without hesitation.
(是也乎:
通过一系列的数据分析,将非法乘车的人群行为可视化, 相关 ipynb 下载:datagovsg-blog/circle-line-analytics
问题是, 新加坡哪! 传说中治安最好的国家之一呢...
)
- 线程异步魔法以及具体的折腾
- python3, asyncio
A dive into Python’s asyncio tasks and event loops. The asyncio package allows us to define coroutines. These are code blocks that have the ability of yielding execution to other blocks. They run inside an event loop which iterates through the scheduled tasks and executes them one by one. A task switch occurs when it reaches an await statement or when the current task completes.
(是也乎:
Py3 也就只能将这拿来说事儿了 )
- Python 加载语句中的命名约定.用 BigQuert 对 Github DB Dump 进行探索
- github, bigquery
Fun article by Florin Badita using BigQuery over entire github hosted Python project's code base.
(是也乎:
细思恐极~ GitHub Data | BigQuery Documentation | Google Cloud Platform
GitHub 应该是拿到了 Google 的免费接口支持, 所以能实时的将所有开源项目的仓库数据同步到 BigQuery 上, 这带来了一个直接后果: 我们提交的代码已经变成了互联网意识的一部分!
嗯哼,各种代码代码风格的优劣,现在有了直接的数据支持,可以客观的知道当前世界上程序猿们的真实心理动态了....
比如: 这个月使用 tab 的多过空格的, 可能是 win13 发布带来的小高潮...etc.
Tabs or spaces(圣战分析)
当然有很多技巧的, 主表 [bigquery-public-data:github_repos.contents] 已经 1.5 TB, 不是一般人承担的了查询费用的...
)
- Tensorflow: 如何用 Python 接口冻结模型并使用
- tensorflow, machinelearning
We are going to explore two parts of using a ML model in production. How to export a model and have a simple self-sufficient file for it ? How to build a simple python server (using flask) to serve it with TF ?.
(是也乎:
又一个用 Flask 落地 TF 服务的案例 )
What does the future hold for Python, aside from new versions of the language ?
(是也乎:
嗯哼, Py2 LL&P )
ChatBot is the new buzz word for a while. Microsoft Cognitive Services API allows you to built ones that allow your app to process natural language and learn how to recognize what users want.
(是也乎:
就是这种邪恶的免费接口,将程序猿训练为了向企业 AI 投食的机械人! 嗯哼,俺也将给 Cognitive 输入整个儿红楼梦,是否能变成可吟诗的 Bot ?
( ̄▽ ̄) 也支持 Jupyter ... M$ 一点儿也不落后. )
- 用 Python 可视化 Tweet 向量
- data-mining, gensim, tweets
I created a semi-practical application that reads from the Twitter stream, parses tweets, and does some machine learning magic to score the tweet’s sentiment and project it into a two-dimensional grid, where tweets with similar content will appear closer to each other. It does all of this more or less in real time using asynchronous messaging.
(是也乎:
实时获得 Twitter 的情绪变化
)
- 在 Xcode 中跑 Python : 步骤 — Erica Sadun
- xcode, apple
As I’m preparing for a project that will involve Python programming, I need to get up to speed with at least a basic level of Python mastery. However, I’m not a big fan of using the interactive Python REPL. I decided to use Xcode instead, and I’m finding it a much better solution for my needs:
(是也乎:
Hummm 何苦泥... )
- 用 Pickle 进行对象序列化
- pickle
Introductory article on usage of pickle module.
(是也乎:
之前曰过 eevee/camel: Python serialization for adults 更加嗯哼. )
- 和 AWS Lambda 一起用 Numba
- aws, lambda, numba
In a recent project, we decided to use Lambda to execute some fairly math-y Python code in response to user click events on a webpage. Originally this back-end Python code had utilized the Numba library to speed up its execution. However, we quickly found that it was not trivial to make Lambda and Numba play nicely together.
(是也乎:
事实一再证明 AWS 工程师不是吃素的...
Numba 这种基于 LLVM 加速的并发分析工具,都可以简单的移植到 Lambda 中跑起来... )
- unittest 中最赞的你应该知道却不一定知道的特性
- subTest
From time to time I like to read documentation of modules I think I know well. The python documentation is not a pleasant read but sometimes you strike a gem.
(是也乎:
所谓灯下黑呗.
终于有子测试了...
)
- Pytho 中的高级句式匹配
- string_maching
FuzzyWuzzy is a fantastic Python package which uses a distance matching algorithm to calculate proximity measures between string entries.
(是也乎:
使用距离算法来对整句进行相似度分析,当然不支持 中文先... )
- 通过异常类定义另你的自制类更加可读
- video, screencast, exception_handling
In this short screencast I’ll walk you through a simple code example that demonstrates how you can use custom exception classes in your Python code to make it easier to understand, easier to debug, and more maintainable.
(是也乎:
其实吧,还是代码写简单点儿最好了. )
好物
~ 包/模块/库/片段...
- universe
- 2867 Stars, 213 Fork
Universe is a software platform for measuring and training an AI's general intelligence across the world's supply of games, websites and other applications. This is the universe open-source library, which provides a simple Gym interface to each Universe environment. Universe allows anyone to train and evaluate AI agents on an extremely wide range of real-time, complex environments.
(是也乎:
统一通过 Gym 接口,训练各种 AI 在世界上各种游戏中自我训练.
喂! No Zuo No Die!
)
- tensorflow_chatbot
- 120 Stars, 36 Fork
This is the full code for 'How to Make an Amazing Tensorflow Chatbot Easily' by @Sirajology on Youtube. In this demo code, we implement Tensorflows Sequence to Sequence model to train a chatbot on the Cornell Movie Dialogue dataset. After training for a few hours, the bot is able to hold a fun conversation.
(是也乎:
如何创造惊人的 TF 图表一文对应的所有代码...
)
- showmemore
- 9 Stars, 1 Fork
ShowMeMore is an automated researcher. Given a list of tags to start with, it goes hunting for images, and over time grows its model in response to reactions, slowly reaching out to find things you weren't aware you already liked.
(是也乎:
死也不能给女友看到的东西! )
- speedtest-tweet-bot
- 8 Stars, 1 Fork
monitors internet speed and tweets when its slow
(是也乎:
一但 Twitter 变慢,立即监察网速的工具 )
- alfredworkflow-capkeystone
- 7 Stars, 1 Fork
Alfred Workflow to convert hex string to assembly and vice versa
(是也乎:
在 Alfred
工作流中快速将 16进制和汇编代码进行相互转换.
Alfred
简直就是本地的 PIPE 服务
)
是也乎
(嗯哼:
这真是一个悲哀的故事... )
- 161210 Zoom.Quiet 42 分钟完成快译
- 161210 Zoom.Quiet 用时 7 分钟完成格式化.
Comments