周刊
各种来源的…
background
世界高速变化
goal
定期 review 一周以来主要变化
trac
汇集各种渠道的周刊, 以及自己每周内省小结吧…
refer.
…TBD
各种来源的…
世界高速变化
定期 review 一周以来主要变化
汇集各种渠道的周刊, 以及自己每周内省小结吧…
…TBD
原文: Import Python Weekly Newsletter - Issue No 100 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 蠎加载百期知识竞赛 importpython It’s been 2 years of curating ImportPython and today is the 100th Issue. Wow. What a moment ?. Here is a python quiz competition. Five random() participants who answer all questions correctly win complete bundle of Writing Idiomatic python book by Jeff Knupp. If you take the quiz at the end of it is a link with discount too. This quiz is an our attempt at having fun and saying thanks to all you readers of ImportPython. Do take to twitter with the hashtag #importpython100 happy to hear what you have to say. (是也乎: 追查了一下, 2014-09-25 开始快译 蠎加载 的, 嗯哼,2012-02-17 开始翻译 蠎周刊 的, 当然 蠎周刊 之前有朋友翻译过前20期,俺是从 77 期开始坚持翻译到 200期,引人了新的快译小伙伴,老高, 然后,重心转移到 蠎加载; 风格也从之前正文的翻译,慢慢变成了主要进行 是也乎 的点评; 不变的是很少有人提交 PR,想来也是因为这种周刊,实在只是个定时 技术新闻点收集, 时效性太强,大家参与进来,并不能获得类似伟大的 字幕组 那种可以长期流传,洗脑天下的乐趣. 之于俺和小伙伴,最大的收获的确也就是: 定期翻译,形成周自学节奏 了解 Python 领域的主流变化 积累 Python 技术演化趋势概念 架构选型时帮助扩大思考范围 … 简单的说,定期快译一个技术新闻周刊,是种非常好的强迫自学的形式; 并不特别强烈的建议大家都来加入这种自学,毕竟太散了… 但是,的确是一个有效无意识提高领域技术语感的好形式. ) MLAlgorithms machine learning, algorithms Minimal and clean examples of machine learning algorithms 用 pip 从 github 安装 Python 模块 pip, github pip install --upgrade git+git://github.com/user/user_repository.git and you are done. (是也乎: 现代语言生态的标志行为:加载 github ) 迭代器和生成器 core-python Simple code snippets showing how iterators and generators work in Python. Patrick Kennedy: Flask 应用的单元测试 testing, flask This blog post provides an introduction to unit testing a Flask application. I’ve been on a big unit testing kick at work recently which is spilling over into updating the unit tests for my personal projects. Therefore, I thought it would be a good time to document the basics of unit testing a Flask application. (是也乎: 是的 Flask 的单元测试生态并没有兴起… ) DigitalOcean 中 Tensorflow 的 Python 支持 tensorflow, digitalocean The following steps will install TensorFlow1 on a fresh Digital Ocean virtual machine running Ubuntu. (是也乎: 数字海洋是唯一一个 AWS/GCP 之外最有成功相的 *aaS 厂商了 ) 用 Pandas 构建财务模型 - By Chris Moffitt pandas This specific post will discuss how to do financial modeling in pandas instead of Excel. For this example, I will build a simple amortization table in pandas and show how to model various outcomes. (是也乎: 谁说社科生不玩程序的?! 这在经济领域现在是必须的强项了… ) 定义过滤器和有序字典 django, python3 This week I ran into a minor problem that took a surprising amount of time to resolve. Getting a Django template to produce a dict in sorted order. While there were answers out there, none seemed to match the environment that I am using (python 3, Django 1.10). After some experimentation, I finally came up with what I think is a good solution. (是也乎: Django 中的模板看起来什么都能作,其实… ) 使用 BeautifulSoup 的 Web Scraping 教程 beautifulsoup In this tutorial, we’ll show you how to perform web scraping using Python 3 and the BeautifulSoup library. We’ll be scraping weather forecasts from the National Weather Service, and then analyzing them using the Pandas library. (是也乎: 国家天气局的数据抓取整理后给 美汤 分析. ) 在 Python 中构建动画 GIFs gif I first wrote a Python script to make a GIF illustration for any 5-unit color scheme. (是也乎: ) 如何通过 Pynini 在 Python 中获得卓越的文本分析能力 ? regex Regular expressions are the standard for string processing, but did you know you can often get better text untangling with Pynini’s finite-state transducers ? (是也乎: 利用 Pynini 的有限状态机来替代正则表达式来处理文本. ) CPython 内存管理 cpython This post is high level description of how CPython (just Python below) manages object life cycle. (是也乎: 在冯机框架之内, 执行效率总是得面对内存这一物理结构的额外问题 ) 针对 Python 3 的案例 python3 “There is high probability that Python 3 is such a failure it will kill Python” - Zed Shaw. As Curator of a Python Newsletter for 2+ years I can tell you at-least 20-30% of all articles I read of late have code written only for Python 3. Just recently I was at Pycon India and met lot of student who never wrote a single line in 2.x. Startup founders starting with new development choosing Python 3. Lot of people are sleeping on Python 3. A year more and hopefully everyone will be awake. (是也乎: 全球只有印度沉浸在 Py 3 的世界中..嗯哼,为什么?! 何况 Py 3 不是图灵完备的… ) 用 Python 进行研究 - 哈佛大学课程 - edx course, mooc Take your introductory knowledge of Python programming to the next level and learn how to use Python 3 for your research. You will learn Python 3 programming basics, Python tools (e.g., NumPy and SciPy modules) for research applications, How to apply Python research tools in practical settings. (是也乎: 介绍学界在 py 3 生态中如何进行研究 ) 在 Django 网站上水印图像 pillow, watermarking Have you ever noticed how stock photography sites add watermarks to the images shown on their catalogs ? They do that to make sure people don’t just take the free samples and use them without proper licensing. Turns out this is pretty easy to do it with Pillow. 元编程和 Django - 使用 Decorators django, decorators The article starts of with an introduction snippet to decorators and then goes on to explore some real world examples in context of Django. Personally one good find in the article was boltons library. JIRA 软件 Sponsor Start a free JIRA Software trial and get this shirt. (是也乎: 收购 bitbucekt.org 的靠谱软件管理开发商. ) 好物 ~ 包/模块/库/片段… ...
原文: Import Python Weekly Newsletter - Issue No 99 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 因长期运行而使用困难的数据如何激活在 Python core-python Jeff Knupp author of one of my favorite Python books “Writing Idiomatic Python” talks why Python is terrible for writing long-lived programs dealing with complicated data structures. He then goes to compare it with Go Programming languages where the datatype and data modeling has to be done before hand ( we are talking about complex nested data structures ) . Curator’s Note - If you are interested in golang do check out http://importgolang.com a weekly go programming newsletter. (是也乎: 当然的,和 golang 进行了对比,然后… ) Email API from SendGrid Sponsor Reliably deliver your emails with a quick and simple API or SMTP integration. Try for Free. Curator’s Note - Python and Django integration for sendgrid https://github.com/sendgrid/sendgrid-python and https://github.com/RyanBalfanz/django-sendgrid respectively. You can send 12,000 emails per month free. (是也乎: 一个实用的服务,值得关注的赞助商… 免费的话, 2K/月, 对小应用足够了 ) 用 Python 开发可扩展应用 scalability David Rodriguez attended the Udacity course: Developing Scalable Apps in Python - App Engine course and took these notes on building scalable apps. (是也乎: 可扩展应用本质上是个架构而不是语言问题… 当然,笔记在 docs.google 中,嗯哼. ) 用 Splinter 在 Python 中自动化 Web 测试 testing, automation Splinter is just an abstraction layer on top of Selenium and makes easy to write automation tests for web applications. This is a brief introduction to Splinter. (是也乎: 测试呢,最终还是得统一为 DSL, 当然,如果这个 DSL 和目标程序使用的相同,是最好的了. ) 命令行上的 HTTP 响应后端 code snippet httstat https://github.com/reorx/httpstat provides a HTTP response breakdown on command line. This saves you having to open up a browser and look at a visual network response waterfall. (是也乎: 目测是一个现成的无头浏览器的值守? ) 命令行上高速 Django 开发技巧 django David shares his list of command line alias for Django development. Curator’s note - Caution making alias for dot and double dot. keyboard opensource project Take full control of your keyboard with this small Python library. Hook global events, register hotkeys, simulate key presses and much more. (是也乎: PyHook 之后, 又一键盘控制模块,期望是跨平台兼容的…嗯哼,可怜的 M$ ) Monkey-patching 又一 Python 实例方案 core-python, monkey patching Dynamically adding or overwriting an instance method in Python is rarely needed, but it’s a good excuse to explore interesting aspects of the language that aren’t always well known: the descriptor protocol, types.MethodType and partial function applications. (是也乎: 猴补丁 ~ 方便了程序猿,逼死编译器的好物,令 Py 的加速大业又多一层壁垒 ) Django Model Managers django, models Model Managers (and custom QuerySets) are really useful. If you find yourself doing some complicated queryset logic over and over again, you can put that logic in one place and just refer to it with a simple name. (是也乎: 对于死也只用 SQL 的人来说,不存在哪… ) Django 在 instagram - Carl Meyer django, video Instagram operates at a scale unprecedented and is one of the largest users of Python/Django. In this video Carl talks about Django usage @instagram . What modification they made to Django and Why ?, How Django usage evolved over the years at instagram and more. 用 PyCharm 通过 SSH 工作在远程机器上 pycharm This article shows us the remote interpreter feature of PyCharm. Useful for those using PyCharm and want to execute scripts on a remove machine where the environment / data resides. (是也乎: 嗯哼,这样的界面,哪儿有心思写代码哪… ) 好物 ~ 包/模块/库/片段… ...
原文: Import Python Weekly Newsletter - Issue No 98 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Airflow 实用介绍 video, workflow engine Airflow is a popular pipeline orchestration tool for Python that allows users to configure complex (or simple!) multi-system workflows that are executed in parallel across any number of workers. A single pipeline might contain bash, Python, and SQL operations. With dependencies specified between tasks, Airflow knows which ones it can run in parallel and which ones must run after others. Airflow is written in Python and users can add their own operators with custom functionality, doing anything Python can do. (是也乎: 今年 PyCon 上出现的仙器,多后端/Pythonic 工作流/管道管理平台 ) Python 中时间测试的乐趣和收益 debug I was preparing to push some changes a couple of days ago and as I usually do, I ran the tests. I sat back in my chair as the dots raced across the screen when suddenly I noticed that one of the dots linger. ”OS is probably running some updates in the background or something” I said to myself, and ran the tests again just to be sure. I watched closely as the dots filled the screen and there it was again?—?I have a slow test! (是也乎: Matrix-样 数据观察形式看来是正确的 ) Become a pdb power-user pdb Good Tutorial on using pdb. (是也乎: ..It is not necessary to use pdb all the time 嗯哼,作者都说的很明白,其实大家都清楚,动用 pdb 的情景都是不得不作 接盘侠 时, 面对纠结在一起的代码时,不得不进行的刺探, 因为没有自信自己在看过所有代码,将思想扭曲为当初那位崩溃的程序猿相同状态后, 是否能恢复清明… ) 教程提案还有三周可以提交 pycon Talk proposals will be due on 2017 January 3.Poster proposals will be due on 2017 January 3.Tutorial proposals are due on 2017 November 30. Yes, that’s right — tutorial proposals are due in three weeks. awesome-asyncio async-io, curated list A curated list of awesome Python asyncio frameworks, libraries, software and resources. (是也乎: 是 github 带领中国程序猿重新认识了 awesome 这词儿, 现在最高效的领域技术搜索技巧就是在 github 中搜索 awesome+ 技术名 ) Some thoughts on asynchronous API design in a post-async/await world async-io I’ve recently been exploring the exciting new world of asynchronous I/O libraries in Python 3 – specifically asyncio and curio. These two libraries make some different design choices. This is an essay that I wrote to try to explain to myself what those differences are and why I think they matter, and distill some principles for designing event loop APIs and asynchronous libraries in Python. (是也乎: Py3 中内建的 asyncio 和 curio 成为两大焦点都在进行折腾… ) django-flat-responsive django An extension for Django admin that makes interface mobile friendly. 如何在 Python 中启动 Landsat 数据处理? google cloud Cloud Dataflow provides a fully-managed, autoscaling, serverless execution environment for data pipelines written in Apache Beam. In this article Lak Lakshmanan and Matt Hancher show us how to create a monthly vegetation index from Landsat images, available as a public dataset. (是也乎: GCP 中的 Cloud Dataflow 支持 Apache Beam 可以发布无主机数据处理流程… ) 好物 ~ 包/模块/库/片段… ...
原文: Import Python Weekly Newsletter - Issue No 97 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Pyvisgraph - Python 可见性图表 visualization, opensource project This is a super cool project build by Christian. Pyvisgraph builds a visibility graph given a set of simple obstacle polygons and find the shortest path between two points. Christian uses it at work for mapping vessel voyages.( Vessel as in ships ). Here are two blog post by him talking about the algorithm behind his code https://taipanrex.github.io/2016/09/17/Distance-Tables-Part-1-Defining-the-Problem.html and https://taipanrex.github.io/2016/10/19/Distanlogce-Tables-Part-2-Lees-Visibility-Graph-Algorithm.html . (是也乎: 可见性,以往用来寻找可以看见灯塔的安全航线的技术, 现在可以自动完成了. ) Chat bots 以及如何在 Alexa 上构建 chatbots Talking to technology has taken a whole new level since Amazon has announced their voice assistant Alexa and opened up their platform for developers to build custom bots just like when Apple announced about app store for developers to create and sell apps. Here I wanted to talk about the ease of building an Alexa skill using python which could be used as information provider to a attendee for a conference. (是也乎: Amazon 的语音助理 Alexa 平台化后, 当然就可以任性的调教了… ) 6 个快速调试技巧 debugging Nick gives us quick tour of debugging in Python. print statements, logging, pdb, pdb++, Debugging from the REPL and more. (是也乎: 再多的调试技巧,也无法弥补混乱的头脑写出的代码, 所以,亲!最重要的调试技巧就是保持充分的睡眠哪! ) 俺就是整不明白 Python 的 Asyncio async-io Armin Ronacher’s creator of Flask takes at length candidly about How it’s difficult for him to grasp Asyncio , it’s shortcomings, how David Beazley’s live demo hacked up asyncio replacement is twice as fast as it. Curator’s Note - Personally I learned Asyncio from the book Fluent Python. However once I went beyond the simple examples and try building something non trivial I ended up switching to golang and getting my job done faster. One key reason is the benchmark showed my asyncio’s throughput was an order of magnitude slower, code required a lot of hand holding for a new developer. (是也乎: 创造者分享了为什么人们理解了异步都都去用 golang 了… 这真是一个悲伤的故事. ) 避免被 Python 咬屎 core python Common pitfalls to avoid when writing Python software (是也乎: py coding 时常见的错误 ) django-sql-explorer django Easily share data across your company via SQL queries. From Grove Collab. 用 Daphne 部署 Django Channels django channels Daphne is a HTTP, HTTP2 and WebSocket protocol server for ASGI, and developed to power Django Channels. It supports automatic negotiation of protocols; there’s no need for URL prefixing to determine WebSocket endpoints versus HTTP endpoints. In this blog post Abu Ashraf shows us how to Deploy Django channels using Daphne. (是也乎: Channels 如此重要,又如此难用,所以, Django 创建了: ASGI 协议的专用服务器 Daphne ) 每周聊 Python: Dates 和 Times 在 Python video Let’s chat about working with dates and times in Python! We’ll talk about parsing, formatting, timezones, and date arithmetic. (是也乎: 简单的说,就是心塞,每次总感觉厂商有更加简洁的日期/时间处理手段的,,, 然而… ) Jupyter Notebook 教程 jupyter I want to share some concepts and ideas about using Jupyter Notebook that I would like to know when I started. (是也乎: medium 越来越好用了,所以,也早已被 功夫网 认证了… ) 如何在 Django 管理中追加自制按钮 - By Haki Benita django admin panel In this post Haki Benita shows us how he extended Django admin to include two Button which perform action on a record/row. It’s a well written step by step article to accomplish the task. 将媒体内容从 Linux 折腾到 Chromecast opensource project Are you searching for an easy way to stream media files from your LinuxBox to a Chromecast ? You can use Stream2chromecast, a simple Python script that makes the task of streaming media files to a Chromecast device ridiculously easy. (是也乎: WIDI 世界中,怎么可以少 Python 脚本?! ) Pandas 教程: Python 中的 DataFrames pandas Karlijn has written good article explaning what dataframes is and it’s workings. If you don’t know about Pandas and want to get a sense of what it’s ?, then have a read. 用 Kafka 来构建 Python 中的简单 Job Queue kafka, opensource project KQ (Kafka Queue) is a light-weight Python library which provides a simple API to queue and process jobs asynchronously in the background. It is backed by Apache Kafka and designed primarily for ease of use. (是也乎: KQ 一个专用模块,可以 Pythonic 化的使用 Kafka ) 从 NumPy 榨取更多性能 numpy This is the first featured recipe from the IPython Cookbook, the definitive guide to high-performance scientific computing and data science in Python. (是也乎: 来自 IPython Cookbook 的经典技巧 ) C++ vs. Python vs. PHP vs. Java vs. Others 性能评测 (2016 Q3) benchmark The benchmarks here do not try to be complete, as they are showing the performance of the languages in one aspect, and mainly: loops, dynamic arrays with numbers, basic math operations. (是也乎: 看起来 Py3 已经快过 Py2.7 了… ) Pycon Pune 2017 pycon Pycon Pune 2017 is announced. To be held on February 16-19 2017. Visit the website to know more. (是也乎: 又是一月就开始的…总结去年的当然早点开始好, 但是, PyConChian 的筹备节奏,我们只能程序猿节前后才可能折腾 ) 项目 ~ 包/模块/库/片段… ...