周刊
各种来源的…
background
世界高速变化
goal
定期 review 一周以来主要变化
trac
汇集各种渠道的周刊, 以及自己每周内省小结吧…
refer.
…TBD
各种来源的…
世界高速变化
定期 review 一周以来主要变化
汇集各种渠道的周刊, 以及自己每周内省小结吧…
…TBD
原文: Import Python Weekly Newsletter - Issue No 88 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… doctest — 通过文档测试 — PyMOTW 3 testing doctest tests source code by running examples embedded in the documentation and verifying that they produce the expected results. It works by parsing the help text to find examples, running them, then comparing the output text against the expected value. Many developers find doctest easier to use than unittest because, in its simplest form, there is no API to learn before using it. (是也乎: 这是进入测试最简单的形式, 但是,对于单元测试而言,并没有什么用, 只有设计精良的可测试代码, 对接口类的测试才 hold 的住… ) 用 twitter 订阅 getpy twitter If you like this newsletter and you are on twitter you want to follow getpy. Daily get selected ( 4 - 5 ) tweets super relevant to Python. (是也乎: 类似的通过 SNS 进行友好的技术新闻订阅的服务/工具/插件 有很多, 残念的是都在墙外… ) Django 用 Gunicorn 部署以及监察 django We deploy all Django applications with Gunicorn and Supervisor. I personally prefer Gunicorn to uWSGI because it has better configuration options and more predictable performance. In this article we will be deploying a typical Django application. We won’t be using async workers because we’re just serving HTML and there are no heavy-lifting task in background. Python 3 模式/技巧/约定 python3 What you see here is an early version of the book. 激进的规则: Facebook 中对 Python 文化的改进 video Today, services built on Python 3.5 using asyncio are widely used at Facebook. But as recently as May of 2014 it was actually impossible to use Python 3 at Facebook. Come learn how we cut the Gordian Knot of dependencies and social aversion to the point where new services are now being written in Python 3 and existing codebases have plans to move to Python 3.5. (是也乎: PyCon 上的分享,有关 fb 工程师为了 py3 作出的种种折腾… 值得嘛?!…. ) Brian Okken: 21: 术语: 测试夹具/皮下测试/端到端测试/系统测试 Covered in this episode: Test Fixtures, Subcutaneous Testing, End to End Testing (System Testing) . Curator’s note - Of all the podcast out there pythontesting is my fav podcast. (是也乎: 细思恐极, 又一个硬核技术的播客…. ) Reuven Lerner: 用列表解析实现 “zip” core python Simple tutorial with code snippets on zip. 自动化 OSINT: 暗网 OSINT 和 Python 第三部分: 可视化 security Welcome back! In this series of blog posts we are wrapping the awesome OnionScan tool and then analyzing the data that falls out of it. If you haven’t read parts one and two in this series then you should go do that first. In this post we are going to analyze our data in a new light by visualizing how hidden services are linked together as well as how hidden services are linked to clearnet sites. One of the awesome things that OnionScan does is look for links between hidden services and clearnet sites and makes these links available to us in the JSON output. Additionally it looks for IP address leaks or references to IP addresses that could be used for deanonymization. (是也乎: 网络安全实战系统分享,以分析 Onion 网络为实例讲解… ) 在容器引擎中运行 Django | Python | Google Cloud Platform django How to deploy Django app on Google Cloud Conda: 传说和误解 In the four years since its initial release, many words have been spilt introducing conda and espousing its merits, but one thing I have consistently noticed is the number of misconceptions that seem to remain in the (often fervent) discussions surrounding this tool. I hope in this post to do a small part in putting these myths and misconceptions to rest. (是也乎: Conda 是个传奇的 Python 发行版, 但是,在宣传中形成了很多误解,所以,作者… ) Brett Cannon: 介绍哪部电影 It’s a website to help you choose what movie you and your family/friends should watch together. Here is the code for the software https://github.com/which-film/which-film.info (是也乎: 开源了一个为家人自动推荐电影的网站代码.. ) Montreal Python 用户组: Montréal-Python 59: 召唤讲师 community, conference September is back and it’s for the Montreal Python community to gather again and share exciting new technologies and projects. This month, our friends from Ubisoft are welcoming us into their offices and are going to present to us how they are using Python and how they scaling it at large to powered some of their games. PEP-526 复审准备: 语法变量以及属性注释 core python Although type comments work well enough, the fact that they’re expressed through comments has some downsides. The majority of these issues can be alleviated by making the syntax a core part of the language. Read the PEP to know more. I think it is a very exciting PEP. (是也乎: 为了语言的运行性能修订语言形式本身, 嗯哼…. ) Python 周聊: 胶合在一起的字符串 Learn when and why you’d glue strings together using concatenation, interpolation, or other methods. 活动 ~ Upcoming Conference / User Group Meet ...
原文: Import Python Weekly Newsletter - Issue No 85 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Daniel Bader: Sublime Text 为 Python 开发 — 回顾2016 sublime When you ask for editor recommendations as a Python developer one of the top choices you’ll hear about is Sublime Text. In this post I’ll review the status of Python development with Sublime Text as of 2016. (是也乎: subl 从一开始就和 py 纠缠在一起… ) 69集 - PyCon Canada 和 Francis Deslauriers 以及 Peter McCormick podcast This week we interviewed Peter McCormick and Francis Deslauriers about their work organizing PyCon Canada to provide a venue for Canadians to talk about how they are using the language. If you happen to be near Toronto in November then you should get a ticket and help contribute to their success. 1M rows/s 从 Postgres 到 Python benchmark asyncpg is a new fully-featured open-source Python client library for PostgreSQL. It is built specifically for asyncio and Python 3.5 async / await. asyncpg is the fastest driver among common Python, NodeJS and Go implementations. (是也乎: Pg 输出全新的 py 客户端库,包含了最新的 py/node/go 的支持 ) Package of the Week: Flake8 Flake8 is a Python library that wraps PyFlakes, pycodestyle and Ned Batchelder’s McCabe script. It is a great toolkit for checking your code base against coding style (PEP8), programming errors (like “library imported but unused” and “Undefined name”) and to check cyclomatic complexity. (是也乎: 包含圈复杂度检测的代码风格工期 ) Brett Cannon: 网络协议, sans I/O (Hopefully) the future of network protocols in Python. I think it’s important to promote this approach to implementing network protocols, to the point that I have created a page at https://sans-io.readthedocs.io/ to act as a reference of libraries that have followed the approach I’ve outlined here. Basically what this means is that network protocol libraries will need to be rewritten so that they can be used by both synchronous and asynchronous I/O . (是也乎: 为了异步网络, 又一个协议包在冲进! ) 用 django-admin-honeypot 建立蜜罐 django Security is something we often ignore until it is too late. However, there are some things you can do right now that are easy to increase your security. Using django-admin-honeypot is one of those things you can do. It is super easy and provides you with the means of tracking who is trying to access your site. (是也乎: Django 越来越全能了… ) 你应该知道的 Django Admin 作为应用更 Bigger django admin panel The Django admin is a very powerful tool. We use it for day to day operations, browsing data and support. As we grew some of our projects from zero to 100K+ users we started experiencing some of Django’s admin pain points?—?long response times and heavy load on the database. (是也乎: 其实, 很久以前 Django Admin 当现成的 app 来使用就已经不是黑科技了… ) 介绍用 Python 进行自然语言处理 - Asyncjs video In this talk, Jess Bowden introduces the area of NLP (Natural Language Processing) and a basic introduction of its principles. She uses Python and some of its fundamental NLP packages, such as NLTK, to illustrate examples and topics, demonstrating how to get started with processing and analysing Natural Languages. She also looks at what NLP can be used for, a broad overview of the sub-topics, and how to get yourself started with a demo project. (是也乎: 对的, 也是很久之前, Py 就是自然处理的重要参与力量了, 毕竟对于非程序猿的科学家, 用 py 的阻力小很多… ) Simon: datetime vs Arrow vs Pendulum vs Delorean vs udatetime datetime I setup a benchmark, which can be found here to compare Python datetime, Arrow, Pendulum, Delorean and udatetime on a performance level. I picked 4 typical performance critical operations to measure the speed of those libraries. Decode a date-time string, Encode (serialize) a date-time string, Instantiate object with current time in UTC, Instantiate object with current time in local timezone, Instantiate object from timestamp in UTC, Instantiate object from timestamp in local timezone. (是也乎: 嗯哼, 日期处理是又常用又头痛的一件事儿…这么多年过去了, 依然没有什么完美的形式来打动 guido 收入标准库… ) PyPy 获得 Mozilla 的资助用以支持 Python 3.5 community Mozilla recently decided to award $200,000 to Baroque Software to work on PyPy as part of its Mozilla Open Source Support (MOSS) initiative. This money will be used to implement the Python 3.5 features in PyPy. Within the next year, we plan to use the money to pay four core PyPy developers half-time to work on the missing features and on some of the big performance and cpyext issues. (是也乎: 銭虽然不多, 但是可以看出 Mozilla 对 rust 并不放心, 还在继续确保其它可能性 ) 你的 Django 故事: 遇见 Katerina Kampardi djangogirls Katerina Kampardi is a Web Applications Developer from Greece who works as a freelancer. Like many aspiring developers, Katerina is self-taught and got her start with online tutorials. She later attended a Python Specialization. Today, she works on various Django projects as an independent developer. 活动 ~ Upcoming Conference / User Group Meet ...
原文: Import Python Weekly Newsletter - Issue No 86 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Python 打包现在不错了 Python packaging is not bad any more. If you’re a developer, and you’re trying to create or consume Python libraries, it can be a tractable, even pleasant experience. A historical perspective of how it’s evolved and where it stands today. (是也乎: 嗯哼?!谁说的?! ) Python 3.6.0 alpha 4 预览版释放 new release Python 3.6.0a4 has been released. 3.6.0a4 is the last of four planned alpha pre-releases of Python 3.6, the next major release of Python. During the alpha phase, Python 3.6 remains under heavy development: additional features will be added and existing features may be modified or deleted. Please keep in mind that this is a preview release and its use is not recommended for production environments. Python 3.6.0 is planned to be released by the end of 2016. The first beta pre-release, 3.6.0b1, is planned for 2016-09-12. (是也乎: 嗯哼,今年 PyCon16China 大会口号还有人提议: 就不用 Py3 老爹太囧了… ) 每个人都要的 Python Library core python Do you write programs in Python? You should be using attrs. (是也乎: Limodou 就写过类似模块;-) ) Django 技巧 #11 用 Chainable QuerySets 自定管理器 django In a Django model, the Manager is the interface that interacts with the database. By default the manager is available through the Model.objects property. The default manager every Django model gets out of the box is the django.db.models.Manager. It is very straightforward to extend it and change the default manager. dis — Python 字节码反编译器 — PyMOTW 3 core python The dis module includes functions for working with Python bytecode by “disassembling” it into a more human-readable form. Reviewing the bytecodes being executed by the interpreter is a good way to hand-tune tight loops and perform other kinds of optimizations. It is also useful for finding race conditions in multi-threaded applications, since it can be used to estimate the point in the code where thread control may switch. (是也乎: 推荐用来估计代码中线程可切换点 ) Python 基金会寻求一位 blogger ! community Are you the one ? Andrew Ng 的机器学习练习在 Python machine learning One of the pivotal moments in my professional development this year came when I discovered Coursera. I’d heard of the “MOOC” phenomenon but had not had the time to dive in and take a class. Earlier this year I finally pulled the trigger and signed up for Andrew Ng’s Machine Learning class. I completed the whole thing from start to finish, including all of the programming exercises. The experience opened my eyes to the power of this type of education platform, and I’ve been hooked ever since. Codementor: 如何使用 Python 上下文管理器制作 Sandwich core python Explains Context Manager using “Making a sandwich” as an example. (是也乎: ) Micropython 以及如何在老屏幕上使用 esp8266. embedded systems Wemos D1 mini is a 64x48 oled screen that can be mounted on the d1 really easily. The screen has an I2C interface and driven by a SSD1306 chip which is thankfully supported by micropython. Full details, code snippets, schematics can be found on this article. (是也乎: 又见 I2C … ) pyvideo is back video Brandon Rhodes on Twitter: “Welcome to the new http://pyvideo.org !” Thanks to the original maintainers, the new, & the PSF for this site! 活动 ~ Upcoming Conference / User Group Meet ...
原文: Import Python Weekly Newsletter - Issue No 87 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Daniel Bader 为Py开发者的 Youtube 频道 video Useful Youtube channel with short screencast/videos for Python developers to subscribe to. I learned on couple of sublime + Python tricks from here. (是也乎: 细心为 Pythonista 收集整理的油管频道, 包含了 subl+py 的技巧演示… ) dockerfiles/django-uwsgi-nginx: docker This Dockerfile shows you how to build a Docker container with a fairly standard and speedy setup for Django with uWSGI and Nginx. 有趣的 Python 教程 curated list I have read some interesting Python tutorials lately. I would love to share them with you. Kyoukai - 完全异步灵感源自 Flask 的Py3.5+ web 框架 web framework Kyoukai is a fast asynchronous Python server-side web framework. It is built upon asyncio and the Asphalt framework for an extremely fast web server. (是也乎: Kyōkai (境界) 嗯哼,因为日语有完全可发音的罗马形式,所以,总是被选为工程名嘛?! 也使用了 Blueprintslink 进行扩展,基本上就是 flask 的异步简化版本. ) 0停机的升级到 Python 3 with Zero Downtime · YPlan Tech Blog python3 We recently upgraded our 160,000 lines of backend Python code from Python 2 to Python 3. We did with zero downtime and no major errors! Here’s how we did it, hopefully it will help anyone else still stuck on Python 2! (是也乎: 终于有人成功尝试了, 一次性将 16万行 py2 代码升级为 py3 的… 你信嘛?!反正俺相信了. ) BangPypers: 有关自动化的讨论 - 2016 August Meetup automation Bangalore user group meet with Python Automation as the theme (是也乎: 看人家的 meetup 在讨论什么… 看人家的环境比我们也没有高哪儿去哪 ) Mike Driscoll: ANN: The wxPython Cookbook Kickstarter Kickstarter Campaign for wxPython Cookbook. (是也乎: 现在什么都能众筹了哪… ) 和俺说 Python: #72 时尚驱动的开源软件在 Zalando podcast What happens when you take a tech-driven online fashion company that is experiencing explosive growth and infuse it with a deep open-source mission? You’ll find out on this episode of Talk Python To Me. We’ll meet Lauri Apple and Rafael Caricio from Zalando where developers there have published almost 200 open source projects on Github. (是也乎: 可以下载 mp3 的播客, 有关 Fashion-driven 来自 Womens Shoes & Fashion | ZALANDO.CO.UK 团队 关键是这种播客坚持了很长时间…如何?为何?谁在听? 推荐 Machine learning at the new Microsoft 以及专属 rap Developers, Developers, Developers ) 访问控制: 一个 Django 许可的应用比较 django There are many ways to handle permissions in a project. For instance we may have model level permissions, object level permissions, fine grained user permission or role based. Either way we don’t need to be writing any of those from scratch, Django ecosystem has a vast amount of permission handling apps that will help us with the task. In this post we will compare how some popular permission apps work so you know which one suits your project needs. Machinalis: 搜索外星人 image processing Do you know what they are? If you are thinking of irrigation circles, you are wrong. Do not believe the lies of the conspirators. Those are, undoubtedly, proofs of extraterrestrial visitors on earth. As I want to be ready for the first contact I need to know where these guys are working. It should be easy with so many satellite images at hand. So I asked the machine learning experts around here to lend me a hand. Surprisingly, they refused. Mumbling I don’t know what about irrigation circles. Very suspicious. But something else they mentioned is that a better initial approach would be to use some computer-vision detection technique. Note - Code is here https://github.com/machinalis/satimg/blob/master/Searching%20for%20aliens.ipynb (是也乎: 标题党… ) 为何要学习 Python ? community Hopefully this post gave you some insight into why you should consider giving Python a go. This post is coming from someone who feels “guilty” for talking not so good about Python in the past and is now all over the hype train. In my defense, it was just a “personal preference thing”, when people asked me about which language they should learn first, for instance, I usually suggested Python. (是也乎: 嗯哼, 一切鳮汤都抵不上一个确切的职位… ) 活动 ~ Upcoming Conference / User Group Meet ...