周刊
各种来源的…
background
世界高速变化
goal
定期 review 一周以来主要变化
trac
汇集各种渠道的周刊, 以及自己每周内省小结吧…
refer.
…TBD
各种来源的…
世界高速变化
定期 review 一周以来主要变化
汇集各种渠道的周刊, 以及自己每周内省小结吧…
…TBD
原文: Import Python Weekly Newsletter - Issue No 164 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Python 3 cheatsheet python3 What’s new in Python 3 via code snippets. (是也乎: 文字版本的作弊条儿… Py 3.7 有了内置的 breakpiont 支持, 可以不依赖 IDE 进行单点嗯哼了… 可是…好吧… ) 俺的 Python 开发环境, 2018 版 - Jacob Kaplan-Moss pyenv, pipsi For years I’ve noodled around with various setups for a Python development environment, and never really found something I loved – until now. (是也乎: Python 的开发环境至今没有很好的解决几个关键问题: 模块依赖, 多版本环境切换, 应用打包发布/备份/部署/升级/… 当前最靠谱的可能就是这个组合了: 用 Pyenv 管理版本环境, 在其中用 Pipenv 管理模块依赖, Pipsi 作控制界面… 可是, 依然没有触及发布后场景…当然,现在有 Docker 了… 问题是 Docker 在 windows 世界中实在是那什么…. ) 用 Python 收集您自己的 Fitbit 数据 fitbit I’m going to teach you how to collect your own Fitbit data using nothing but a little Python code. (是也乎: 现在智能硬件, 如果没有一个易用的云接口,简直了… ) standford 电影评论数据库的情感分类 machine learning In this tutorial we will be using the hand labelled Standford movie review database (0) to build a sentiment classifier. Our work will highlight how to use Jupyter Notebooks with Python, Scikit-learn, and Pandas (including Numpy) to build and crossvalidate a sentiment classifier. We will also throw in a bit of EDA with the help of Matplotlib and Seaborn. (是也乎: 公开数据集越来越多了… 但是, 分析套路越来越一致化 EDA 是唯一能结合直觉的阵地了… 不过用 seaborn 进行图表风格化就是个人口味选择了… ) 象 Python 一般调试 C debugging I use the Python interpreter interactively and pdb (as well as ipdb) a lot and they let me understand my programs’ state and test new things out quickly. (是也乎: pdb 体验的 gdb 模拟… ) Elasticsearch 和 Django 第 1 部分 elasticsearch Searching from a complex set of data has become a routine in almost all kind of applications. So I am creating a series on Elasticsearch integration with Django. I this part of series, I will be giving you a brief information about Elasticsearch and its installation on a Linux based system. PEP 563 提及 Python 4.0, 究尽什么事儿? - Reddit discussion 4.0 PEP 563 as well as this page declare that postponed evaluation of type annotations will become the default in Python 4.0. The authors don’t give any further explanation nor do they seem to think there is any further explanation required. I’ve never seen Python 4.0 mentioned seriously before and I find this a bit unsettling. Can somebody provide more details? (是也乎: 没有回头路了… Py3 到 Py4 就象 Py1 到 Py2 没有伤害…哈? ) Truthiness and Short-Circuit Evaluation in Python core-python 通过 Python 中的 HTTP 代理建立套接字连接 codesnippets Using Django signals for database logging django (是也乎: 看来 signals 技术用的人不多… ) 好物 ~ 包/模块/库/片段… ...
原文: Import Python Weekly Newsletter - Issue No 163 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 如何用 Jupyter Notebooks 以及 pandas 来分析数据? pandas, jupyter Last year we discovered an extensive dataset on the subject of traffic on German roads provided by the BASt. It holds detailed numbers of cars, trucks and other vehicle groups passing more than 1,500 automatic counting stations. The amazing thing about this dataset is that the records for each counting station are provided on an hourly basis and they reach back to the year 2003. As an attempt to get to know the structure and to find a good way for dealing with the massive size of the dataset, we set up some Jupyter (formerly IPython) Notebooks. (是也乎: 叕一篇 ipynb 的软文, 问题在, 依然没有解决从探索到作品的转化时机和技巧问题. ) 编写 Unit Tests 来测试 REST APIs testing I’m working on a project called BadgeYay. It is a badge generator with a simple web UI to add data and generate printable badges in PDF. BadgeYay’s back-end is now shifted to REST-APIs and to test functions used in REST-APIs, we need some testing technology that will test each and every function used in the API. For our purposes, we chose the popular unit tests Python test suite. In this blog post, I’ll be discussing how I have written unit tests to test BadgeYay’s REST-API. 极简 AWS Lambda + Python + Terraform 配置 aws, lambda I want to write and deploy the simplest function possible on AWS Lambda, written in Python, using Terraform. (是也乎: 是的, OSX 中实现的… ) 4 个途径来提升 DevOps Testing - Free eBook sponsor You already know the longer it takes to detect a problem, the more expensive it is to resolve. Your testing needs to happen earlier in the development pipeline while taking into account all aspects of privacy, security and monitoring. Read the 4-part eBook to learn how to detect problems earlier in your DevOps testing processes by:… 用 Python 创建 Discord Bot bot In this video we’ll cover how to create a bot for Discord. This bot will be able to join a server and show up in the user list. It will be able to interact in chat rooms and private messages and respond to custom commands. 用 Redis+Python 创建共享单车应用 project, web application Learn how to use Redis and Python to build location-aware applications. (是也乎: 很久没有听到 SOLOMO/LBS 的实例了… ) 介绍 Datalore - 叕一则用 Python 来进行机械学习的工具 data, jetbrains This Monday, February the 12th, we launched a public beta of Datalore - an intelligent web application for data analysis and visualization in Python, brought to you by JetBrains. This tool turns the data science workflow into a delightful experience with the help of smart coding assistance, incremental computations, and built-in tools for machine learning. 用 Python 和 Scikit-Learn 实现 K-Nearest 邻居算法 scikit-learn In this article, we will see how KNN can be implemented with Python’s Scikit-Learn library. But before that let’s first explore the theory behind KNN and see what are some of the pros and cons of the algorithm. The Flask Mega-Tutorial Part XI: Facelift flask This is the eleventh installment of the Flask Mega-Tutorial series, in which I’m going to tell you how to replace the basic HTML templates with a new set that is based on the Bootstrap user interface framework. Apache Airflow 作为分布式系统的外部调度程序 airflow So have you ever needed a reliable External scheduler for your distributed systems? Apache Airflow (by Airbnb) has a good stable scheduler. So how can we use Airflow for this purpose, here’s how we did. (是也乎: 可能是俺错觉, 凡是发布在 medium 中的技术文章都比较科普… 没有作者在自己 blog 上的文章来的有用… ) 什么是单元和覆盖测试以及如何在 Python 中实现和使用它们 unit testing 好物 ~ 包/模块/库/片段… ...
原文: Import Python Weekly Newsletter - Issue No 162 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 免费 Python 书: 开始 Python, 高级 Python, 以及 Python 练习 book This document is a self-learning document for a course in Python programming. This course contains (1) a part for beginners, (2) a discussion of several advanced topics that are of interest to Python programmers, and (3) a Python workbook with lots of exercises. (是也乎: 叕一本 Python 入门书. ) 类似Snapchat AR 过滤器 augmentedreality My project lets you try on virtual pairs of sunglasses or masks. To achieve this I utilized python, Dlib, OpenCV, Scipy, and Numpy. The pipeline involves opening a live webcam feed, detecting keypoints on faces in the feed, warping a png image of sunglasses to match the face, rotating the png with face movements, and blending the two images together so they look like one real image. (是也乎: 叕一个 Python 实现的简易 AV 面具嗯哼工具 ) Python - Clean Design 的分类 core-python Some Python programmers like to think of their language as flawless. I personally know some Python programmers claiming that Python is superior to other languages in its clean design and unmatched elegance. This however isn’t true. Python has at least as many deep and fundamental flaws as most other languages, despite parts of its community claiming something different. 将Python项目打包到Debian .deb 第1部分 packaging Hi, Have you ever try to package your code/project to became .deb or in official Debian or Ubuntu Repository to share to the rest of the world? (是也乎: 发布 Python 工程为 .deb … 是的, 很少有人发布为 .exe/.msi ) Python 弱性能问题 performance What changed in my reasoning? First of all, I’m working on other problems. Whereas I used to do a lot of work that was very easy to map to numpy operations (which are fast as they use compiled code), now I write a lot of code which is not straight numerics. And, then, if I have to write it in standard Python, it is slow as molasses. I don’t mean slower in the sense of “wait a couple of seconds”, I mean “wait several hours instead of 2 minutes.” (是也乎: Python 中的囧问题, 几小时都算不出来的场景.. ) 信用建模与 Dask dask This post explores a real-world use case calculating complex credit models in Python using Dask. It is an example of a complex parallel system that is well outside of the traditional “big data” workloads. NumPy 教程第1部分 - Python 数组入门 numpy Numpy is the most basic and a powerful package for scientific computing in python. This is part 1 of a mega-tutorial covering all the core aspects of performing data manipulation and analysis with numpy’s ndarrays. 63.8% – Python 3 移植数据库 python3, community, fedora This is a dashboard to track progress of porting Fedora packages to Python 3. From Mordor, with love: 从头开始设计异步任务调度库 - Part-2 future In layman terms, a future is an object which can hold the value or result of some computation done asynchronously. What does that mean ? Python to Google Sheets google sheets (是也乎: docs.google 的表格终于有 Python 接口了, 当然, 大陆用不了. ) “Group By” 在 SQL 以及 Python: 比较 pandas, sql Exploring the overlapping functionality of SQL and Python can help those of us familiar with one language become more adept with the other. And with a deep understanding of both, we can all make smarter decisions about how to combine and leverage each, making it easy to always choose the right tool for every task. (是也乎: Group By 的叕一个嗯哼… ) 好物 ~ 包/模块/库/片段… ...
原文: Import Python Weekly Newsletter - Issue No 161 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… “装饰器模式” 以及 Python “wrapt” 模块. wrapt Brandon Rhodes published a post today about the Decorator Pattern and how that translates into Python. He explains the manual way that the pattern can be implemented in Python as a wrapper, as well as how you can try to minimise the amount of work you need to do by overriding special methods of a Python object. The wrapt package I authored was purpose built for this task of creating wrappers which Brandon describes, and much more. To avoid some of the name confusion around Decorator Pattern versus Python decorators, which Brandon highlights as an issue, I tend to refer to the wrappers as transparent object proxies. (是也乎: 叕一个对原生特性增强的模块,来自 Hear no evil, see no evil, patch no evil: Or, how to monkey-patch safely. - YouTube https://www.youtube.com/watch?v=GCZmGgtWi3M NZPyUG 的年度大会 KiwiPyCon 2017… 14年就发布的老梗, 作者还在一直讲… ) 预测第一投手的薪水 data science, jupyter Today’s post focuses on applying linear regression techniques to a less-than-ideal dataset. In order to do so, I need a scenario from which to work. As of this writing, the MLB free agent signing period (or ‘Hot Stove’ as it is affectionately named) is in full effect. Therefore, I chose the following problem statement as my challenge: my client, a professional baseball team, is interested in offering a contract to a free agent starting pitcher and wants a recommendation for the annual salary it should propose. Now that I have my problem, I can begin working on the answer! (是也乎: 线性回归技术的一个真实案例 ) 用 AWS Lambda 来爬取数千产品 Selenium, lamda, chromedriver Or how to run Headless Chrome on AWS Lambda together with Python, Selenium and Chromedriver (是也乎: 无头 Chrome 的又一个嗯哼案例 ) Zulko/moviepy: 用Python编辑视频 video MoviePy (full documentation) is a Python library for video editing: cutting, concatenations, title insertions, video compositing (a.k.a. non-linear editing), video processing, and creation of custom effects. See the gallery for some examples of use. (是也乎: MoviePy 的确是一个完备的视频折腾工具, 可以说是 FFmpeg 的 Pythonic 包装 ) Django — Asset compression and Storages django The problem was, once we change something in the CSS/JS, that change was not getting reflected on the client side and browser was taking the old files from the cache. To avoid this, we needed a mechanism to refresh the cache once anything has changed in the CSS/JS. The obvious approach was to change the name or attach a version number to a CSS file each time we make a change. But we wanted this process to be automated so we came across Django-compressor. 在 Windows,Mac 和 Linux 上处理文件路径的简单方法 core-python Python 3.4 introduced a new standard library for dealing with files and paths called pathlib?—?and it’s great! (是也乎: Py3 的软文叕一则 ) Jupyter Notebook 技巧来提高 Data Science 效率 jupyter (是也乎: 叕一则 Jupyter 的数据科学嗯哼技巧 ) 用 Bounter pt. 2 有效地计数: CountMinSketch counter In my previous post on the new open source Python Bounter library we discussed how we can use its HashTable to quickly count approximate item frequencies in very large item sequences. Now we turn our attention to the second algorithm in Bounter, CountMinSketch (CMS), which is also optimized in C for top performance. Reportlab: 用 Python 进行 PDF 处理 ~ Mike Driscoll — Kickstarter kickstarter Learn how to create PDFs using the popular Python programming language and the ReportLab toolkit. Kickstarter campaign. gist-evernote project, gist, evernote A Python application that sync Github Gists and save them to Evernote notebook as screenshots. Python 中监督机器学习算法 machine learning The main goal of this reading is to understand enough statistical methodology to be able to leverage the machine learning algorithms in Python’s scikit-learn library and then apply this knowledge to solve a classic machine learning problem. The first stop of our journey will take us through a brief history of machine learning. Then we will dive into different algorithms. On our final stop, we will use what we learned to solve the Titanic Survival Rate Prediction Problem. 用 Python 解压缩 zip 文件的最快方法 code snippet, zip So the context is this; a zip file is uploaded into a web service and Python then needs extract that and analyze and deal with each file within. In this particular application what it does is that it looks at the file’s individual name and size, compares that to what has already been uploaded in AWS S3 and if the file is believed to be different or new, it gets uploaded to AWS S3. (是也乎: 不是不用解压缩就能使用所有内容的嘛? ) 好物 ~ 包/模块/库/片段… ...