周刊
各种来源的…
background
世界高速变化
goal
定期 review 一周以来主要变化
trac
汇集各种渠道的周刊, 以及自己每周内省小结吧…
refer.
…TBD
各种来源的…
世界高速变化
定期 review 一周以来主要变化
汇集各种渠道的周刊, 以及自己每周内省小结吧…
…TBD
原文: Import Python Weekly Newsletter - Issue No 112 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 以 Python 介绍计算机科学和编程.MIT 视频系列 video Introduction to Computer Science and Programming in Python is intended for students with little or no programming experience. It aims to provide students with an understanding of the role computation can play in solving problems and to help students, regardless of their major, feel justifiably confident of their ability to write small programs that allow them to accomplish useful goals. The class uses the Python 3.5 programming language. (是也乎: 基于 py3.5 ) Python 代码仓库移入 GitHub core-python Python core developer Brett talks about the history the decision to move Python to GitHub (是也乎: 可怜的 Hg ) memoryview core python memoryview is a special type that can be used to work with data stored in other data-structures. (是也乎: 又一个全新数据类型 ) 又一个 Python-esque 类型系统: 鸭式静态类型 mypy I think the mypy static type checker is a fantastic initiative, and absolutely love it. My one complaint is that it relies a little too much on subclassing for determining compatibility. This post discusses nominal vs. structural subtyping, duck typing and how it relates to structural subtyping, subtyping in mypy, and using abstract base classes in lieu of a structural subtyping system. (是也乎: mypy 比 python 更快的 C++ 化ing… ) 无惧正则表达式 regex (是也乎: 的确, 如果每天都用 Vim 进行基于正则表达式的各种表达, 自然就嗯哼了 ) 在 Python 中使用 Apache Parquet 实现极高的并行 IO 性能 parquet, IO In this post, I show how Parquet can encode very large datasets in a small file footprint, and how we can achieve data throughput significantly exceeding disk IO bandwidth by exploiting parallelism (multithreading). (是也乎: 嗯哼,超越硬盘 IO 速度… 可是,现在不都在云端了? PK 的是内存速度了哪… ) 使用Scikit学习和Dask的两个简单的方法 sckit learn This post describes two simple ways to use Dask to parallelize Scikit-Learn operations either on a single computer or across a cluster. 对数学嗯哼的人来学习 AI — P4 — Tensors Illustrated (和喵!) tensorflow This the 4th part in the series. Kafka 入门 kafka Basically in this guide we will configure a basic Kafka instance in an Ubuntu environment & write a very very basic python producer & consumer. (是也乎: 卡夫卡 是西方现代派文学的宗师和探险者,表现主义大师,作品突出的是孤独感与恐惧感; 所以, 程序猿创建了 Kafka 工程来管理孤独的消息队列… ) 使用语音数据预测性别 machine learning, classification A beginner’s guide to implementing classification algorithms in Python Ergonomica shell Ergonomica is a Python-based console language, integrating modules such as os, shutil, and subprocess into a fast, easy-to use environment. It allows for functional programming tools and operations as well as data types that would otherwise require obscure grep or sed commands. (是也乎: 又一个使用纯Python 完成的 Shell 环境… ) 在 Google Compute Engine 中使用 Keras 进行深度学习 deep learning, keras Inception, a model developed by Google is a deep CNN. Against the ImageNet dataset (a common dataset for measuring image recognition performance) it performed top-5 error 3.47%. In this tutorial, you’ll use the pre-trained Inception model to provide predictions on images uploaded to a web server. Django Weekly Issue 26 django Django round up for this week. 好物 ~ 包/模块/库/片段… ...
原文: Import Python Weekly Newsletter - Issue No 111 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Sublime Text 3 和 Python - Kenneth Reitz sublime I decided to revisit my editor configuration the other night, and experimented with every possible editor I could think of / imagine. I heavily configured vim (neovim), PyCharm, Eclipse, Emacs (Spacemacs), VSCode, Atom, Textual, and more. I knew I was going to stay put with my choice of Sublime Text 3 (which I have been using for 5+ years), but it’s nice to have validation. (是也乎: 又一个心碎的故事,其实, 编辑器不好用, 只是因为我们成长的太快, 没有什么东西可以一直容纳我们所有的编程个性的… 所以,要不自己开发一个, UliEditor 就是这样来的, 要不个性化配置一个出来, 这就是 Vim/Emacs 成神成圣的原因 ) Think Python 第二版 - 免费下载 book This is the second edition of Think Python, which uses Python 3 is out. 如何使用 Python 和 Google Maps API 绘制自己的自行车/慢跑路线 Apart from being a data scientist, I also spend a lot of time on my bike. It is therefore no surprise that I am a huge fan of all kinds of wearable devices. Lots of the times though, I get quite frustrated with the data processing and data visualization software that major providers of wearable devices offer. That’s why I have been trying to take things to my own hands. Recently I have started to play around with plotting my bike route from Python using Google Maps API. My novice’s guide to all this follows in the post. 将 Vim 用成 Python IDE vim, editor I love vim and often use it to write Python code. Here are some useful plugins and tools for building a delightful vim python environment, escpecially for Vim8. (是也乎: TMUX 一直是 Vim 党的好朋友 ) Python 3.6 和性能 python3.6 Slides from Why Python 3.6 is faster than Python 3.5 talk. Also included a preview of new features of Python 3.6 (是也乎: 性能党的注意力果断从 py2 迁移到了 py3 ) 我们团队中的 3 种方式提高多系统构建速度. Sponsor How xMatters Uses Toolchains to Move Process Forward Python function 脑移植? core-python Did you know about __code__ ? (是也乎: def foo(): return “I’m foo!” def bar(): return “I’m bar!” foo.code = bar.code foo() 猜?! 最后输出什么!? ) K-Means和其他聚类算法:基于 Python 的快速入门 k-means, clustering 在 Python 中将 Postgres 数据作为 JSON 返回 postgres row_to_json and json_build_object usage along with code snippet for SQLAlchemy users. (是也乎: 可是,这本身不是 Pg 的一个特性嘛?! ) 在 Apache Spark 中用 UDF spark, user defined functions User-defined functions (UDFs) are a key feature of most SQL environments to extend the system’s built-in functionality. UDFs allow developers to enable new functions in higher level languages such as SQL by abstracting their lower level language implementations. Apache Spark is no exception, and offers a wide range of options for integrating UDFs with Spark SQL workflows. 在 Python 中进行 Encoding Categorical Values in Python datascience Many machine learning algorithms can support categorical values without further manipulation but there are many more algorithms that do not. Therefore, the analyst is faced with the challenge of figuring out how to turn these text attributes into numerical values for further processing. Python 的简单热门产品推荐引擎 machine learning, recommendation engine Pyweek Game Jam is 19th-26th February community, game development The Pyweek rules, in short, are Develop a game, In Python (mostly, at least!), As an individual or with a team, In exactly one week (or less!), From “scratch” - no personal codebases, only public, documented librarie, On a theme that is selected by vote, announced at the moment the contest starts. (是也乎: 用一周时间从0开始构建一个游戏的比赛 ) Seaborn 的 Python matplotlib, statistics Seaborn is a wrapper around Matplotlib that makes creating common statistical plots easy. The list of supported plots includes univariate and bivariate distribution plots, regression plots, and a number of methods for plotting categorical variables. The full list of plots Seaborn provides is in their API reference. 用 Amazon ML 对 Tweets 分类 aws, machine learning Python 新手经 humor 十小时 Python 解释器源代码通读 Python Video Series on CPython Internals. 使用 Python 在 Google 地球中打点 simplekml, kml First we need to import the library to create point in the Google Earth using simplekml module. 用 scikit-learn 的线性回归分析棋盘游戏数据 scikit-learn Doc2vec 简介 NLP, doc2vec Today I am going to demonstrate a simple implementation of nlp and doc2vec. The idea is to train doc2vec model from text document. I had about 20 text files to start with. Although the 20 document corpus seems small but the perk is it takes around 2 minutes to train the model. (是也乎: 比 perk 更加简洁以及高速的 NPL 模块 ) 好物 ~ 包/模块/库/片段… ...
原文: Import Python Weekly Newsletter - Issue No 110 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Python 支撑每秒百万请求 + Japronto implements a pretty solid feature set:HTTP 1.x implementation with support for chunked uploadsFull support for HTTP pipelining, Keep-alive connections with configurable reaper, Support for synchronous and asynchronous views, Master-multiworker model based on forking, Support for code reloading on changes, Simple routing. (是也乎: Japronto 出来的… ) Reuven Lerner: 设置 Jupyter 服务器的五分钟指南 jupyter Nearly every day, I teach a course in Python. And nearly every day, I thus use the Jupyter notebook: I do my live-coding demos in it, answer students’ questions using it, and also send it to my students at the end of the day, so that they can review my code without having to type furiously or take pictures of my screen. (是也乎: Jupyter 内置了… ) 使用 Django,Celery 和 rabbitMQ 构建异步任务 celery, rabbitmq In this post, I’ll be talking about setting up a distributed task processing system for doing asynchronous processing. As your website grows and handles lot of traffic, there naturally comes a need to ensure best performance for your users. While there are multiple things which need to be done to achieve that, one of the most important things is processing things in background. (是也乎: 这个组合,有点儿… ) 使用 Arduino 和 Python 构建简单的摆锤来测量运动 arduino We’ll build a classic and important physical system, the simple pendulum. We’ll use an Arduino and a potentiometer to measure the amplitude of the pendulum’s motion and Python to read and visualize our data. 什么是Flake8和为什么我们应该使用它?? linting There are a couple good python code linter tools you can use. The one I’ve recently discovered is a Flake8. Which is “the wrapper which verifies pep8, pyflakes and circular complexity “. It has low rate of false positives. (是也乎: 徦阳性少的 linter.. ) 用 Python 运动跟踪 motion tracking My daughter, Alex, was in the 6th grade this year. For her science fair project, Alex wanted to do something involving animals. I had read about an experiment where lab rats were recorded on video, and their motion was analyzed by a computer (to determine the effects of a neurotoxin). We owned 2 gerbils, Havoc and Zoom, so I suggested to Alex we do a similar experiment with the gerbils. For some reason, she didn’t want to test a neurotoxin on her pets, so instead she decided to test the effects of full spectrum lighting on their movement. (是也乎: 儿童行为心理学方面的嗯哼 ) 用 Pytest 测试 Python 应用 testing Pytest stands out among Python testing tools due to its ease of use. This tutorial will get you started with using pytest to test your next Python project. (是也乎: Pytest 已经成为标准了… ) 为什么要学习Python?这里有8个数据驱动的原因 core-python Is Python worth learning? We’ve interviewed experts and surveyed the job market to identify the key reasons why you should learn Python today. Python Excel 教程: 初级导引 excel Python 的黑客指南 - 作者访谈 book review 机器学习与 Jupyter 使用 Scala,Spark 和 Python:安装 jupyter, spark Google Python Style Guide style guide This guide has been there for a while, sharing it again. (是也乎: 这份文档,值得一读再读 ) 绘制IMDb平均评分 matplotlib In the previous post (Playing with IMDB, Python and Pandas), I tried to obtain the average IMDb rating of an actress. This time I’ll play with matplotlib in order to plot the evolution of an actress over the years. 在 Python 中处理ssh ssh Working with the remote servers is a common scenario for most of us. Sometimes, we do our actual work over those remote computers, sometimes our code does something for us in the remote systems. Even Vagrant instances on your laptop are also remote systems, you still have to ssh into those systems to get things done. (是也乎: 早已可以了… ) 使用 Docker,Python,Amazon SNS 和 SQS 构建实时事件驱动的访问日志系统 docker, aws, sns, sqs 简易构造符号链接 code snippet I never could remember how to use it, mixing the order of the parameters, and the man page did not help. So I thought, why not write a small wrapper around it? 好物 ~ 包/模块/库/片段… ...
原文: Import Python Weekly Newsletter - Issue No 109 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Pycon 2017 议题选择 pycon The acceptance and rejection letters for pycon arrived this week and so did the final list of selected talks for Pycon US 2017. (是也乎: 相对国外的 PyCon 都是年头儿对上年回顾,中国的总是挤在年尾回顾当年… 因为春节哈… ) Python 异步 I/O 嗯哼 video, asyncio In this 90-minute video series, I walk through a book chapter about asynchronous I/O in Python called A Web Crawler With asyncio Coroutines, which was co-authored by the creator of Python. (是也乎: 直播读书? ) Instagram 关闭了 Python 的 GC memory management, garbage collection By dismissing the Python garbage collection (GC) mechanism, which reclaims memory by collecting and freeing unused data, Instagram can run 10% more efficiently. Yes, you heard it right! By disabling GC, we can reduce the memory footprint and improve the CPU LLC cache hit ratio. If you’re interested in knowing why, buckle up! (是也乎: 随着 Py 在生产线上越来越嗯哼, 对 GC 的怨念总是在积累,终于,这一天来了… ) Python 中重塑数据 I want to focus exclusively on the process of reshaping data, i.e. converting or transforming data from one format to another. data manipulation (是也乎: 不仅仅是格式转换, 更要有垃圾清理… ) Wolfram 的自动机, 用 Python 简单嗯哼出了一个 + Complexity science is one of my favourite topics, ever. Studying complexity is how I ended up in the computer science bandwagon in the first place, and I constantly find myself thinking about how individual agents’ decisions affect the overall state of systems. Self-organization and emergence are fundamental aspects of how the pieces of the complexity puzzle fit together, and Wolfram’s elementary cellular automata are a great way to understand them. (是也乎: Wolfram 安身立命的核心技术, 成熟运行20多年, 哪儿这么简单的可以嗯哼出来哪… ) 加速 Python performance, benchmarking This blog post gives an introduction to some techniques for benchmarking, profiling and optimising Python code. (是也乎: 又一个收集各种技巧的 blog ,不过, Python 的本意就不是为了运行时速度哪, 而是开发时效率… 所以… ) 在 Sublime Text 中对 Python 3.6 代码进行 lint subl Writing consistent, well-formed code is important. Of course the functionality of the code is paramount, yet in addition the styling and structure should follow a commonly accepted standards. Not only will it make the code more approachable to others, but also to yourself, when you return to an old piece of software, which you have not looked at for months or even years. You might even squash some bugs early on, by writing code in consistent manner. The process of styling and checking of these code qualities, is often referred as linting. (是也乎: 历史一再证明,一个稳定又开放的系统,总是能孕育出各种神奇的小品来 ) Assert Statements in Python core-python How to use assertions to help automatically detect errors in your Python programs in order to make them more reliable and easier to debug. (是也乎: 断言,断的好,测试跑的好. ) 黑客统计 Jupyter notebook I’ve chosen to start with Harvard’s Data Science course. I’m currently on week 3 and one of the suggested readings for this week is Jake VanderPlas’ talk from PyCon 2016 titled “Statistics for Hackers”. As I was watching the video and following along with the slides, I wanted to try out some of the examples and create a set of notes that I could refer to later, so I figured why not create a Jupyter notebook. (是也乎: 一份课堂作业,总是可以嗯哼到 ipynb 中来… ) 用 Python 来开始 Spark Streaming + Kafka kafka, spark In this article I am going to look at Spark Streaming. This is one of several libraries that the Spark platform provides (others include Spark SQL, Spark MLlib, and Spark GraphX). Spark Streaming provides a way of processing “unbounded” data - commonly referred to as “streaming” data. It does this by breaking it up into microbatches, and supporting windowing capabilities for processing across multiple batches. You can read more in the excellent Streaming Programming Guide. (是也乎: EK/LS 越来越有标准相了,当然的 Python 的各种绑定也快速跟上了, 幸福. ) Sheila Miguez 和 Will Kahn-Greene 以及他们对 Python 社区的爱: Community Service Award Quarter 3 2016 Winners pyvideos Sheila Miguez and William Kahn-Greene for their monumental work in creating and supporting PyVideo over the years. (是也乎: 静静等待华人获得.. ) 列表推导和生成器表达式 core-python Do you know the difference between the following syntax? [x for x in range(5)] , (x for x in range(5)), tuple(range(5)) Let’s check it. (是也乎: 细微处见真情 ) 用Django 和 ngrok 处理 webhooks In this article we’ll go over how to handle webhooks using Django, create a webhook in GitHub, and test the webhook on your local machine using ngrok. But first a brief primer on webhooks. Python 自测 quiz Comprehensive Python quiz and questions from basic to advanced level that help you to review your Python knowledge and become the master of Python. (是也乎: 又一个 Python 能力测试卷,,,在答案剧透前,可以嗯哼一下 ) 100 行以内的算法代码 algorithmic trading If you’re familiar with financial trading and know Python, you can get started with basic algorithmic trading in no time. (是也乎: 值得收藏, 但是,其实,最好是变成一个内建模块哪 ) Python 101 在 Leanpub Permanently 免费了 ebook (是也乎: 可是,为什么呢? 哈! 因为 201 要来了 ) 在 Django 表单中覆盖字段小部件属性或如何将占位符添加到属性? django Let’s say we have a contact form and we want to add placeholders to this form inputs so our rendered form has these cool input labels. How do we do that? 好物 ~ 包/模块/库/片段… ...