周刊
各种来源的…
background
世界高速变化
goal
定期 review 一周以来主要变化
trac
汇集各种渠道的周刊, 以及自己每周内省小结吧…
refer.
…TBD
各种来源的…
世界高速变化
定期 review 一周以来主要变化
汇集各种渠道的周刊, 以及自己每周内省小结吧…
…TBD
原文: Import Python Weekly Newsletter - Issue No 9 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Python 别名命令配合 virtualenv 玩的更好 Over the years, I’ve come up with my own Python aliases that play nice with virtual environments. For this post, I tried to stay as generic as possible such that any alias here can be used by every Pythonista. (是也乎: 使用 bash 中的配置别名也一样 ) 保持 Django 应用性能的详细记录. django, performance “Keep detailed records of the performance of your Django code.”. django-perf-rec is like Django’s assertNumQueries on steroids. It lets you track the individual queries and cache operations that occur in your code. This blog post explains the workings of this project https://tech.yplanapp.com/2016/09/26/introducing-django-perf-rec/ . 上周未工程师的实用 ML 分享 #pyconuk machine learning Last weekend I had the pleasure of introducing Machine Learning for Engineers (a practical walk-through, no maths) at PyConUK 2016 ( Video link on page ). My talk covered a practical guide to a 2 class classification challenge (Kaggle’s Titanic) with scikit-learn, backed by a longer Jupyter Notebook (github) and further backed by Ezzeri’s 2 hour tutorial from PyConUK 2014. Python 中的 Mocks 和 Monkeypatching testing This tutorial will help you understand why mocking is important, and show you how to mock in Python with Mock and Pytest monkeypatch. Abu Ashraf Masnun: 介绍 Django Channels Yet another introduction to Django Channels. This one is a lot more clear and step by step tutorial. If you still don’t know what Django channels is / how to get started, read this. (是也乎: 又一篇 Django Channels 的介绍, 可想是个多么复杂难言的功能点 ) Python Mocks: 温柔的介绍 - 部分1和2 testing, mock In this series of posts I am going to review the Python mock library and exemplify its use. I will not cover everything you may do with mock, obviously, but hopefully I’ll give you the information you need to start using this powerful library. Note it’s a two part series as of now, here is the second part’s url http://blog.thedigitalcatonline.com/blog/2016/09/27/python-mocks-a-gentle-introduction-part-2/#.V-ysf9HhXQo Decorators: 函式的功能 - 周末和 Trey Hunner 聊 Python webcast, video Decorators are one of those features in Python that people like to talk about. Why? Because they’re different. Because they’re a little weird. Because they’re a little mind-bending. Let’s talk about decorators: how do you make them and when should you use them? 简洁的图表和数据集 REST APIs charts The Plotly V2 API suite is a simple alternative to the Google Charts API. Make a request to a Plotly URL and get a link to a dataset or D3.js chart. Python code snippet are included on the page. (是也乎: Plot.ly 如日中天时,高调开源后,依然猛烈… ) Python 代码复审: Unplugged – 第 2 集 - Daniel Bader code review Daniel is doing a series of code review sessions with Python developers. Have a look at the accompanied video where he gives his opinion on a open source project by Milton. Python 的 C 面 c binding CPython, the primary implementation of Python used by millions, is written in C. Python core developers embraced and exposed Python’s strong C roots, taking a traditional tack on portability, contrasting with the “write once, debug everywhere” approach popularized elsewhere. The community followed suit with the core developers, developing several methods for linking to C. This has given us a lot of choices for interfacing with c, let us look at them. (是也乎: 又是 paypal 团队的分享, 看来 Py 在 paypal 家折腾的不轻… ) Django 技巧 #15 基于 Mixins 使用 Class-Based Views django General rules to use mixins to compose your own view classes with code examples. 如何设置 tab completion 来用 django-admin.py 和 manage.py ? django In this short article Mike shows us how to set auto complete for django-admin.py / manage.py arguments. Specially helpful if you have tons of management commands. M$ 中的 Python 工程 core python That’s the opening paragraph from the Python Insider blog post discussing the 2016 Python core sprint that recently took place. In the case of Microsoft’s participation in the sprint, both Steve Dower and I (Brett Cannon) were invited to participate (which meant Microsoft had one of the largest company representations at the sprint). Between the two of us we spent the week completing work on four of our own PEPs for Python 3.6: Adding a file system path protocol (PEP 519), Adding a frame evaluation API to CPython (PEP 523), Change Windows console encoding to UTF-8 (PEP 528), Change Windows filesystem encoding to UTF-8 (PEP 529). (是也乎: 发明了软件的 M$ ,好象没有哪个领域不掺合的 ) GitHub - beanbaginc/django: 非官方安全后端 Django: The Web framework for perfectionists with deadlines. security This is an unofficial fork of Django, which focuses entirely on backporting official, publicly-announced security fixes to Django 1.6.11. It does not contain any other bug fixes or features, and any branches other than security-backports/1.6.x are unlikely to be up-to-date. 活动 ~ Upcoming Conference / User Group Meet Reunión Python Valencia Sydney Python User Group PyConES - Almería Edmonton Python User Group IndyPy Monthly Meetup Python Brasil [12] Santa Cruz Python Meetup 项目 ~ 包/模块/库/片段… ...
原文: Import Python Weekly Newsletter - Issue No 91 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 俺出席在 新德里的 Pycon India 2016 importpython Hey guys, this is Ankur. Curator behind ImportPython. Will be attending PyconIndia. Happy to meet you all and discuss all things Python. Get your opinion on the newsletter, How to make it better ?. Ping me on ankur at outlook dot com or just reply to this email. I will respond back. See you there. (是也乎: Ankur 就是 ImportPython 的作者,原来是 印度人… ) 在 Quora 用 Python 和 asynq 进行异步编程 async-io asynq is a library for asynchronous programming in Python with a focus on batching requests to external services. It also provides seamless interoperability with synchronous code, support for asynchronous context managers, and tools to make writing and testing asynchronous code easier. asynq was developed at Quora and is a core component of Quora’s architecture. See the original blog post here. (是也乎: 嗯哼, 又一个没有进入 build-in 的优秀模块 其实,公司想成名, 将公司名嵌入到著名的开源模块中,一直是非常好的渠道. ) Python 包管理生态 - Nick Coghlan packaging There have been a few recent articles reflecting on the current status of the Python packaging ecosystem from an end user perspective, so it seems worthwhile for me to write-up my perspective as one of the lead architects for that ecosystem on how I characterise the overall problem space of software publication and distribution, where I think we are at the moment, and where I’d like to see us go in the future. (是也乎: 少见的长篇大论, 追根溯源 Python 包管理的的历史和发展; 这已经不是头一家从根儿上重构 py 包发行机制的尝试了. 当然, 事实也证明, 从一开始不完美的事物,往往能在其后发展出创始人也无法想象的花活儿来. 参考 JavaScript … 嗯哼, 那个连姓名都故意乱起的语言. ) 用 pkgsrc 部署现代 Python 应用到古老的基础设施上 infrastructure This team is responsible for supplying a variety of web apps built on a modern stack (mostly Celery, Django, nginx and Redis), but have almost no control over the infrastructure on which it runs, and boy, is some of that infrastructure old and stinky. We have no root access to these servers, most software configuration requires a ticket with a lead time of 48 hours plus, and the watchful eyes of a crusty old administrator and obtuse change management process. The machines are so old that many are still running on real hardware, and those that are VMs still run some ancient variety of Red Hat Linux, with, if we’re lucky, Python 2.4 installed. (是也乎: 就是上篇文章的另外一个分支, 分享 PayPal 的折腾成果. ) 创作公众可读的 Python notebooks ipython The notebook functionality of Python provides a really amazing way of analyzing data and writing reports in one place. However in the standard configuration, the pdf export of the Python notebook is somewhat ugly and unpractical. In the following I will present my choices to create almost publication ready reports from within IPython/Jupyter notebook. (是也乎: 讲真, 每次见到这么细心的一点点解决 LeTaX 和现实世界结合的分享, 就看见了20年前的 王珢 孤独的宣传 Emacs+TeX 的身影 ) SF Pybay 大会视频 Paul Bailey, “A Guide to Bad Programming”, at PyBay2016 was my fav talk amongst all. Check out the youtube channel. (是也乎: 哈! 其实烂代码指南比好代码手册,要更加有用的. ) 压缩和增强手写笔记 image processing I wrote a program to clean up scans of handwritten notes while simultaneously reducing file size. Some of my classes don’t have an assigned textbook. For these, I like to appoint weekly “student scribes” to share their lecture notes with the rest of the class, so that there’s some kind written resource for students to double-check their understanding of the material. The notes get posted to a course website as PDFs. (是也乎: ~ Left: input scan @ 300 DPI, 7.2MB PNG / 790KB JPG. Right: output @ same resolution, 121KB PNG 简单的说,经过复杂的处理,终于可以免去重新用电脑整理课堂笔记的事儿了! 大体积的扫描件经过处理,就能变成又小又清晰的 pdf 来卖了! ) Python 中的图像处理 - 教程 image processing This tutorial will show you how to transform an image with different filters and techniques to deliver different outputs. These methods are still in use and part of a process known as Computer-To-Plate (CTP), used to create a direct output from an image file to a photographic film or plate (depending on the process). Note - It’s a pretty good article that makes uses of Python 3, Pillow and is well written. (是也乎: WoW 强烈历史感的科普文, 将出版的图像处理和 python 的结合聊明白了. ) 每周聊 Python: 学习 Django 的技巧 video This is a Weekly Python Chat live video chat events. These events are hosted by Trey Hunner. This week Melanie Crutchfield and he are going to chat about things you’ll wish you knew earlier when making your first website with Django. Much watch for newbies building websites in Django. 2 步认证在 Django security If you are looking to implement 2 Factor Authentication as part of your product and don’t know where to start read this. 活动 ~ Upcoming Conference / User Group Meet PyCon DE 2016 PyCon CZ 2016 PyCon Ireland 2016 PyHPC 2016 PyData Cologne 2016 项目 ~ 包/模块/库/片段… ...
原文: Import Python Weekly Newsletter - Issue No 90 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 在 Python 中的实时数据流管道 streaming Motorway is a real-time data pipeline, much like Apache Storm - but made in Python :-) We use it over at Plecto and we’re really happy with it - but we’re continously developing it. The reason why we started this project was that we wanted something similar to Storm, but without Zookeeper and the need to take the pipeline down to update the topology. (是也乎: 类似 Apache Storm/Amazon SQS/Kinesis 的有界面数据流构建平台 ) 与数据流一起工作: 使用 Twitter API 捕获 tweets twitter This tutorial tries to teach event driven programming by making use of streaming API offered by twitter. 介绍 Python 生成器 generators In this guide we ’ll cover generators in depth . We ’ll talk about how and why to use them , the difference between generator functions and regular functions , the yield keyword , and provide plenty of examples.This guide assumes you have a basic knowledge of Python ( especially regular functions).Throughout this guide we are going to work towards solving a problem . (是也乎: 又一篇极简说明好文. ) Python 3.6.0 beta 1 发布! python3 Python 3.6.0b1 is the first of four planned beta releases of Python 3.6, the next major release of Python, and marks the end of the feature development phase for 3.6. There are quite many new features have a look. (是也乎: 对于 打死不用 Py3 党 成员而言, 历史模块库的不兼容, 是一个怎么也绕不过去的门槛. ) Channels 进入正式 Django 项目通道 django The Django team is pleased to announce that the Channels project is now officially part of the Django project, under our new Official Projects program. Channels is the effort to bring WebSockets, long-poll HTTP, and other non-request-response protocol and business logic handling to Django, as part of our ongoing effort to establish what makes a useful web framework in 2016. 在 Django 中测试日期 testing Django makes unit & functional testing easy (especially with WebTest). Tests on routing, permissions, database updates and emails are all straightforward to implement but how do you test dates & time? You might for example want to test regular email notifications. 介绍 Django Channels django The idea behind Channels is quite simple. To understand the concept, let’s first walk through an example scenario, let’s see how Channels would process a request. 节目 74 - Python 在 Zalando podcast, community Open source has proven its value in many ways over the years. In many companies that value is purely in terms of consuming available projects and platforms. In this episode Zalando describes their recent move to creating and releasing a number of their internal projects as open source and how that has benefited their business. We also discussed how they are leveraging Python and a couple of the libraries that they have published. (是也乎: Zalando 是又一个 Python 重度依赖公司,分享他们的折腾历史. ) 得书: 赢取 “Python 201” books To win your copy of this book, all you need to do is come up with a comment below highlighting the reason “why you would like to win this book”. Try your luck guys :) 机器学习一年记 machine learning Only people with masters degrees or Ph.D’s work with machine learning professionally isn’t true. The truth is you don’t need much maths to get started with machine learning, and you don’t need a degree to use it professionally. Here is Per Harald Borgen journey. Yes he is using Python. (是也乎: 传说机器学习得至少硕士以上学历的人才玩的了, 作者证明了,这不是真的…嗯哼. ) 在 JavaScript, Python, 和 Go 中对同一个算法的 12 个实现版本 languages I recently had to write nearly the same code in Go and Python on the same day, and I realized I had written it many times before in different languages. But it does point up some interesting language differences. This article explores many different ways to write the same code (是也乎: 简单的说, 算法优化到最后, Python 一行搞店, 其它语言, 嗯哼… ) 活动 ~ Upcoming Conference / User Group Meet ...
原文: Import Python Weekly Newsletter - Issue No 89 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 通过 Python 使用 Markov Chains 来构建 Slack bot 模拟同事. bot Imagine in your company slack team there’s this person (we’ll call him Jeff). Everything that Jeff says is patently Jeff. Maybe you’ve even coined a term amongst your group: a Jeffism. What if you could program a Slack bot that randomly generates messages that were undeniably Jeff? (是也乎: 西乔精确的预测了相同的 bot 在微信中诞生后导致人类灭亡的故事 ) Python 中是否有三元计算符? core python Learn how to use Python’s ternary operator to create powerful “one-liners” and enhance logical constructions of your arguments. (是也乎: 必须有, 不过,何必? ) 500行以内 | 用 Python 完成一个 Python 的解释器 Byterun is a Python interpreter implemented in Python. Through my work on Byterun, I was surprised and delighted to discover that the fundamental structure of the Python interpreter fits easily into the 500-line size restriction. This chapter will walk through the structure of the interpreter and give you enough context to explore it further. The goal is not to explain everything there is to know about interpreters—like so many interesting areas of programming and computer science, you could devote years to developing a deep understanding of the topic. (是也乎: 这几乎就是 PyPy 的诞生机制… PS: 500行内 已经成为 github 中包含最多脑洞的可用项目了… ) 第 73 集 - Alex Martelli Note from curator - I met Alex at Pycon Singapore / Py APAC as it was called then, I found him inspirational. We sat down and talked about Java developer’s obsession with design patterns. It was a blast. I wonder if he would remember. Here is a podcast where he is interviewed. Alex Martelli has dedicated a large part of his career to teaching others how to work with software. He has the highest number of Python questions answered on Stack Overflow, he has written and co-written a number of books on Python, and presented innumerable times at conferences in multiple countries. We spoke to him about how he got started in software, his work with Google, and the trends in development and design patterns that are shaping modern software engineering. (是也乎: Alex 是 Stack Overflow 中有关 Python 问题回答最多的人. 采访中分享了很多在 google 以及软件工程上的体验 ) Machinalis: OCR 和 Django 以及 Tesseract django, OCR A Django site that integrates with Tesseract to provide an OCR service. 使用消息框架 django Tutorial on how to use messages framework. 分版本统计 pip 的下载总量 benchmark Wow 3.x isn’t far behind. Couple of years may be. I see more and more companies using 3.x series for newer projects. (是也乎: 基本上差了一个量级… Py3 和 Py2 ) 连续分析新闻: 介绍 GeoViews GeoViews is a new Python library that makes it easy to explore and visualize geographical, meteorological, oceanographic, weather, climate, and other real-world data. GeoViews was developed by Continuum Analytics, in collaboration with the Met Office. GeoViews is completely open source, available under a BSD license freely for both commercial and non-commercial use, and can be obtained as described at the Github site. (是也乎: BSD 许可的 GeoViews 是一个完备的地理数据分析/展示相关的库. 可以轻巧的生成可互动的地理相关可视化图谱! 以上这图就是一行代码: url = ‘https://map1c.vis.earthdata.nasa.gov/wmts-geo/wmts.cgi’ gv.WMTS(url, layer=‘VIIRS_CityLights_2012’, crs=crs.PlateCarree(), extents=(0, -60, 360, 80)) ) Mike Driscoll: 当周PyDev: Reinout van Rees interview This week we welcome Reinout van Rees (@reinoutvanrees) as our PyDev of the Week! Reinout is the creator / maintainer of zest.releaser. He has a nice website that includes a Python blog that you might want to check out. I would also recommend checking his Github page to see what projects he’s a part of. Note - We have been including Reinout van Rees blogposts for long time now in importpython. Here you can know more about the person behind the blog. (是也乎: 又一位 van ;-) zest.releaser 的作者, 带大家如何分析一位程序猿的网络数据 ) Chris Moffitt: 从列表和字典构建 Pandas DataFrames pandas Whenever I am doing analysis with pandas my first goal is to get data into a panda’s DataFrame using one of the many available options. For the vast majority of instances, I use read_excel , read_csv , or read_sql . There are multiple methods you can use to take a standard python datastructure and create a panda’s DataFrame. For the purposes of these examples, I’m going to create a DataFrame with 3 months of sales information for 3 fictitious companies. (是也乎: 享受 Pandas 的便利,第一步就是将数据倒入为 DataFrames … ) 18 个最常见的 Python 列表问题 Go find how many you can answer (是也乎: 发布的网站倒是值得关注: datacamp.com 在线自学 R/Py 进行数据科学研究… ) Python 201 正式发布! book review Mike Driscoll’s second book Python 201: Intermediate Python is out. (是也乎: 嗯哼,封面很有爱… ) PayPal 中使用 Anaconda 进行 Python Packaging packaging At PayPal, we write and deploy our fair share of Python, and we wanted to devote a couple minutes to our story and give credit where credit is due. For conclusion seekers, without doubt or further ado: Continuum Analytics’ Anaconda Python distribution has made our lives so much easier. For small- and medium-sized teams, no matter the deployment scale, Anaconda has big implications. But let’s talk about how we got here. (是也乎: 历史原因… ) csssdbpy cssdbpy is a simple SSDB client written on Cython. Faster standart SSDB client. Semaphore Community: Dockerizing a Python Django Web Application docker Get an understanding of how to dockerize your Django application, using the Gunicorn web server, capable of serving thousands of requests in a minute. (是也乎: dockerize ~ 又一个新词儿 ) Python (Windows)中快又脏 的驱动器 code snippet While using Python’s os.path module in a project, I got the idea of using it to do a quick-and-dirty check for what drives exist on a Windows system. Actually, not really the physical drives, but the drive letters, that may in reality be mapped any of the following: physical hard disk drives or logical partitions of them, CD or DVD drives, USB drives, or network-mapped drives. 有用的 python 视频德语教程系列. video Note I haven’t personally gone through the video series, the no of upvotes and views looks pretty decent. Please make your own judgement. 活动 ~ Upcoming Conference / User Group Meet ...