蠎加载 154

原文: Import Python Weekly Newsletter - Issue No 154 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 专访:站在数据科学最重要工具背后的人 pandas Interview with none other then Wes McKinney of Pandas. (是也乎: Pandas 之父 Wes McKinney …. ) 优化ed Python docker Turns out there are some optimizations you can do when compiling Python 3.5 and 3.6 that give you some significant speed improvements without any real downside. We’ve paired with with Google’s base Debian image that rips out systemd and all it’s dependencies which yields a MUCH smaller image. (是也乎: 也就是说专用版本的 Python 发行有了标准的渠道 ) 概率论基础 - Peter Norvig probabilty This notebook covers the basics of probability theory, with Python 3 implementations. (You should have some background in probability and Python.) (是也乎: 叕一个 py3 完成的基础学科教程 ) 比较5个数据可视化 Python 工具 visualization It could be challenging to pick the right data visualization tool in Python. There are so many options available. Summarizing most common tools, then testing and comparing different techniques would help to pick the best fit and method for the needed visualization. (是也乎: 5大常见数据可视化框架的比较: 果断 Bokeh 最均衡 ) misocoin bitcoin Barebones bitcoin-like protocol implemented in Python 3.6. (是也乎: 叕一个 Btc-样 协议框架 ) Python 3 整备 pypi This site shows Python 3 support for 360 most downloaded packages on PyPI. (是也乎: 动态统计 py 3 环境下载使用频率最高的 Top 360 包 ) 推荐引擎 - Yelp machine learning Using user review data from Yelp, our aim was to develop a recommendation system to provide a new restaurant suggestion that a user might like. The project was motivated by the fact that recommendation problems are ubiquitious, including the infamous Netflix challenge and “similar items you might like” suggestions from Amazon. Given the diverse application of this problem, we wanted to learn how to develop and implement such system using machine learning. (是也乎: 实战的推荐系统架构经验 ) html5lib-python 1.0 released open source, new release Yesterday, Geoffrey released html5lib 1.0 [1]! The changes aren’t wildly interesting.The more interesting part for me is how the release happened. I’m going to spend the rest of this post talking about that. Those looking to manage / understand the workings behind becoming a maintainer of a open source project should read this. (是也乎: 叕一个尝试嗯哼 H5 的库… ) 为 Selenium Chrome 和 Python 设置 Digital Ocean 服务器 testing (是也乎: FF 发疯关闭 扩展渠道后, 基于 Chrome 扩展的工具就多了起来… ) 用 Wallaroo 在 Python 中嗯哼 Multi-Stream 处理 distributed computing Wallaroo is a high-performance, open-source framework for building distributed stateful applications. (是也乎: 叕一个分布式计算框架 ) Kaggle 内核简介 machine learning On this episode of AI Adventures, find out what Kaggle Kernels are and how to get started using them. Though there’s no popcorn in this episode, but I can assure that Kaggle Kernels are popping! (是也乎: 叕一个 ML 入门教材 ) 用 Python 优化你的 Cryptocurrency 组合 cryptocurrency Bitcoin is now mainstream. While the debate on whether it’s a speculative bubble or the greatest thing since the internet continues, one thing that is irrefutable is that it has attracted a significant amount of investor interest to cryptocurrency and digital assets. (是也乎: 数字货币的入门最佳姿势, 总是从 py 开始… ) 在 Python 中更专业的嗯哼日期时间对象 datetime (是也乎: 多谢 @Geek Cheng 的嗯哼, 一时不查露过了机器翻译的… ) 使用 Apache Spark DataFrames API 进行结构化流式传输 spark 使用 Facebook 的 Prophet 库预测比特币价格 prediction This is just a quick post to show how you can use Facebook’s Prophet forecasting library in python to forecast bitcoin hourly bitcoin prices. 介绍 pymatch 包 pymatch The pymatch Python package implements Propensity Score Matching (PSM) techniques intended for use with observational study designs. It was inspired by and adapted from Jasjeet Singh Sekhon’s Matching package in R. I wrote an adaptation in Python that is better suited for my work at Mozilla (是也乎: 倾向分数匹配(PSM)技术, Mozilla 适用版本… ) 好物 ~ 包/模块/库/片段… ...

2017-12-10 · 3 min · 1386 words · ZoomQuiet

蠎加载 153

原文: Import Python Weekly Newsletter - Issue No 153 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Awesome python talks videos An opinionated list of awesome videos related to Python, with a focus on training and gaining hands-on experience. (是也乎: 没有中文分享… ) 对象模型 core-python, oops Here, then, is a (very) brief run through the inner workings of objects in four very dynamic languages. I don’t think I really appreciated objects until I’d spent some time with Python, and I hope this can help someone else whet their own appetite. 用于数据分析的Python - 关键性逐行回顾 pandas A not so nice review of Python for Data Analysis Book (是也乎: 最怕逐行解释的图书了… ) Python软件基金会新闻: PSF 从 Mozilla 开放源代码项目中获得 $ 170,000 赠款,以提高 PyPI 的可持续性 PSF, mozilla Today we are excited to announce that we have applied for, and been awarded, a grant to help improve the sustainability of the Python Package Index in the amount of $170,000. This has been awarded by Mozilla, through the Foundational Technology track of their Open Source Support Program. We would like to thank Mozilla for their support. (是也乎: 细思恐极…mozilla? ) 免费 Apache Spark™ 指南 ebook, advert, free The Definitive Guide to Apache Spark. Download today! (是也乎: 这种广告越多越好 ) 使用 Python 的 Pathlib 模块 - 实用商用 Python pathlib The pathlib module was first included in python 3.4 and has been enhanced in each of the subsequent releases. Pathlib is an object oriented interface to the filesystem and provides a more intuitive method to interact with the filesystem in a platform agnostic and pythonic manner. I recently had a small project where I decided to use pathlib combined with pandas to sort and manage thousands of files in a nested directory structure. Once it all clicked, I really appreciated the capabilities that pathlib provided and will definitely use it in projects going forward. That project is the inspiration for this post. (是也乎: 最常用, 也最无奈的一个模块, 特别是遇到中文… ) 使用 NLTK 可视化 我最爱 专辑的歌词 NLTK A few weeks ago I was enrolled in Python for Data Science by UCSD on EdX.org. It is an introductory course so it starts with the basics but by the end of it you have worked with Twitter’s API, predicted weather using Machine Learning and even done some Natural Language Processing using NLTK. (是也乎: 前提是 lyrics 的语种都兼容吧? 果然和中文歌曲没什么关系 ) python cheat sheet core-python pypika sql PyPika is a Python API for building SQL queries. The motivation behind PyPika is to provide a simple interface for building SQL queries without limiting the flexibility of handwritten SQL. Designed with data analysis in mind, PyPika leverages the builder design pattern to construct queries to avoid messy string formatting and concatenation. It is also easily extended to take full advantage of specific features of SQL database vendors. (是也乎: 可以说叕一个 SQL 的 Py DSL ) 好物 ~ 包/模块/库/片段… ...

2017-12-02 · 3 min · 1305 words · ZoomQuiet

蠎加载 152

原文: Import Python Weekly Newsletter - Issue No 152 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Python 哈希和对等 core-python Most Python programmers don’t spend a lot of time thinking about how equality and hashing works. It usually just works. However there’s quite a bit of gotchas and edge cases that can lead to subtle and frustrating bugs once one starts to customise their behaviour – especially if the rules on how they interact aren’t understood. (是也乎: 任何概念深了说, 都不怎么平易 ) Pygame 搞的视频合成器 - Python 作艺 art, sound, pygame Critter and Guitari have built a bunch of insane video synthesizers that react to live music performance. They’re meant to enhance and automatically accompany a performance. Today, we’ll write a basic video synthesizer in Python, using aubio for Onset detection, and Pygame to display our graphics visually. We’ll end up with a program ready to be played out through a projector. (是也乎: 图样图森破哪…这东西还是硬件来的靠谱 ) Pandas 101: 索引 pandas I’m going to go in depth a bit on two main concepts of Series & Dataframes. And then, what I found helpful in life, is becoming fluent in indexing dataframes. (是也乎: 大坑…还是清洗时,针对最终输出嗯哼好就好 ) Python 去 Go 作弊条儿 golang For Python developer looking to get a taste of Go. Also do subscribe to http://importgolang.com/ to keep a track of Go Ecosystem. (是也乎: 那什么,在这儿推荐这种是否… ) CPython 内部探索 cpython This is a quick guide for people who are interested in learning more about CPython’s internals. It provides a summary of the source code structure and contains references to resources providing a more in-depth view. JIT编译 Python子集到 x86-64 bytecode, JIT This post shows how to write a basic JIT compiler for the Python bytecode, from scratch, using nothing but stock Python modules. (是也乎: scratch??? 的确 bytecode 是个待挖掘的宝藏, 其实从这个环节进行静态化, 优化为毛不行呢? ) GitHub - tryolabs/requestium: 请求到 Selenium 之间的集成层,用于自动化web动作 Selenium, requests Requestium is a python library that merges the power of Requests, Selenium, and Parsel into a single integrated tool for automatizing web actions. The library was created for writing web automation scripts that are written using mostly Requests but that are able to seamlessly switch to Selenium for the JavaScript heavy parts of the website, while maintaining the session. Requestium adds independent improvements to both Requests and Selenium, and every new feature is lazily evaluated, so its useful even if writing scripts that use only Requests or Selenium. (是也乎: Selenium 坚持这么多年,终于熬死了其它前端测试框架统一江湖了啊啊啊啊啊 ) 在5分钟内构建一个Python REST API – Python Rest API Toolkit rest In this post we introduce Arrested?—?A new framework for building REST APIs using Python. We’ll use Docker, SQLAlchemy, and other tools to build a Star Wars themed API in 5 minutes! (是也乎: 动用了 Docker 哪… ) 用Python分析1000多种希腊葡萄酒 scraping In this post I’ll play with the data I scraped from a Greek wine e-shop. In lieu of apology for sending a few more requests to their server I urge everyone browse through their catalog and maybe even buy a few bottles. (是也乎: 分析希腊酒品质分布… ) 用深度学习预测加密货币价格 pandas, LSTM We’ve collected some crypto data and fed it into a supercool deeply intelligent machine learning LSTM model. Unfortunately, its predictions were not that different from just spitting out the previous value. How can we make the model learn more sophisticated behaviours? 10 个Python 面试问题必知必会 interview, 面试经 如何使用 Pandas-DataReade r获得免费的当日期权数据 pandas This is a simple reference article for readers that might wonder where I get/got my options data from. In this regard I would like to shout out the contributors to the pandas-datareader, without their efforts this process would be much more complex. JavaScript 的 Promises 等于 Python 的 asyncio asyncio, js JavaScript promises appear to be very different from Python’s asyncio. But they’re not that different! The code is written differently (the syntax is different), but what is happening under the hood is actually the same (the semantics are equivalent). (是也乎: 这种姿势来蹭热点, 良心不痛嘛? promises 那是被逼的, 在 py3 是原生的 ) 用 Keras 进行 AI 艺术风格转换 image processing, art (是也乎: 叕一个风格理解/合成工具 ) 真正简单的方法来编写 Python 衰变函数 decay At my exercise of reinforcement learning, I needed to write a decay function for ?-greedy strategy. (是也乎: decay … 哈哈, 好形象 ) 用Python 写个网格笔记纸张生成器 code snippets Testing Models with Django using Pytest and Factory Boy django Pytest and Factory Boy make a rad combo for testing Django Applications. pytest-annotate 开源鸟! mypy, dropbox Just a few days ago, Dropbox open-sourced PyAnnotate, a Python library that observes the execution of a Python program and automatically outputs Python type annotations. PyAnnotate greatly simplifies the process of using a type-checker (e.g. Mypy) with a legacy codebase. (是也乎: 老爹到了 Dropbox 后, 动作很多哪… 自动化类型声明补… ) 好物 ~ 包/模块/库/片段… ...

2017-11-26 · 4 min · 1752 words · ZoomQuiet

蠎加载 151

原文: Import Python Weekly Newsletter - Issue No 151 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 用 Python 和 OpenCV 搞增强现实(第1部分| Bites of code opencv You may (or may not) have heard of or seen the augmented reality Invizimals video game or the Topps 3D baseball cards. The main idea is to render in the screen of a tablet, PC or smartphone a 3D model of a specific figure on top of a card according to the position and orientation of the card. (是也乎: 嗯哼, 这个方向上 Py 也有很多积累 ) 高级 Python 程序猿最想把什么技巧传授给嫩枪们? core-python Must read thread. Instagram 在分析 CPython cpython, production Instagram employs Python in one of the world’s largest settings, using it to implement the “business logic” needed to serve 800 million monthly active users. We use the reference implementation of Python, known as CPython, as the runtime used to execute our code. As we’ve grown, the number of machines required toserve our users has become a significant contributor to our growing infrastructure needs. These machines are CPU bound, and as a result, we keep a close eye on the efficiency of the code we write and deploy, and have focused on building tools to detect and diagnose performance regressions. This continues to serve us well, but the projected growth of our web tier led us to investigate sources of inefficiency in the runtime itself. (是也乎: Instagram 用 Python 来服务8亿用户, 但是,依然只是 Python 单体应用最大之一 ) 如何学习 Pandas - 走向数据科学 pandas In this post, I will outline a strategy to ‘learn pandas’. For those who are unaware, pandas is the most popular library in the scientific Python ecosystem for doing data analysis. Pandas 开源采购 ptracer, 面向 Python 的系统跟踪库 Pinterest Making Pinterest faster and more reliable is a constant focus for our engineering team and using hardware resources more efficiently is a major part of this effort. Improving efficiency and reliability requires good diagnostic tools, and today we’re announcing our newest tracing tool: ptracer, which provides granular syscall tracing in Python programs. In this post we’ll cover background on Pinterest’s codebase, why we needed a better tracer and how ptracer can help solve certain engineering problems. Python wat core-python A “wat” is what I call a snippet of code that demonstrates a counterintuitive edge case of a programming language. (The name comes from this excellent talk by Gary Bernhardt.) If you’re not familiar with the language, you might conclude that it’s poorly designed when you see a wat. Often, more context about the language design will make the wat seem reasonable, or at least justified. (是也乎: wat ~ 笏 <– 反直觉的自然设计 ) Blender Python 教程 - 用10行代码实现多米诺骨牌效应 code snippets The Mypy Blog: Dropbox 发布 PyAnnotate – 为 mypy 自动生成类型注释 mypy For statically checking Python code, mypy is great, but it only works after you have added type annotations to your codebase. When you have a large codebase, this can be painful. At Dropbox we’ve annotated over 1.2 million lines of code (about 20% of our total Python codebase), so we know how much work this can be. It’s worth it though: the payoff is fantastic. Django 2.0 rc1 发布 django Django 2.0 release candidate 1 is the final opportunity for you to try out the assortment of new features before Django 2.0 is released. Tangent - By Google neural networks Tangent is a new, free, and open-source Python library for automatic differentiation. In contrast to existing machine learning libraries, Tangent is a source-to-source system, consuming a Python function f and emitting a new Python function that computes the gradient of f. This allows much better user visibility into gradient computations, as well as easy user-level editing and debugging of gradients. Tangent comes with many more features for debugging and designing machine learning models. (是也乎: 和其它机械学习没出息不同, Tangent 工作成果不是计算结果, 是针对具体问题的新代码, 然后再运行…. 哪什么…嗯哼, 你高兴就好. ) ...

2017-11-19 · 4 min · 1630 words · ZoomQuiet