蠎加载 150

原文: Import Python Weekly Newsletter - Issue No 150 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 十个 Sublime 插件值得用于日常 Python/Django 开发 sublime Sublime text editor comes with its basic setup as a normal text editor. We need some set of plugins to make it useful for any real-time development. In this blog post we list ten plugins that will be useful for your daily python/Django development. 加速 SQLite 和 Python sqlite In this post I’d like to share with you some techniques for effectively working with SQLite using Python. 你应该使用哪个 Python 包管理器 ? package manager Everyone who touches code has different preferences when it comes to their programming environment. Vim versus emacs. Tabs versus spaces. Virtualenv versus Anaconda. Today I want to share with you my environment for working with data and doing machine learning. (是也乎: 无论哪种都应该配合 pyenv ) 用 tmtoolkit 在 Python 进行主题模型评估 topic modeling I introduce the Python package tmtoolkit which allows to utilize all availabel CPU cores in your machine by computing and evaluating the models in parallel. We will use topic models based on the Latent Dirichlet Allocation (LDA) approach by Blei et al., which is the most popular topic model to date. (是也乎: 基于 LDA 技术来突破 Py 应用的CPU 限制. ) Python 类的特殊方法或魔术方法 core-python What happens when we create an object in python class ? (是也乎: 叕一个 Python 内部机制解析嗯哼 ) 以 Flask 和 Asyncio 构建 Quart flask, asyncio I recently gave a talk at PyCon UK in Cardiff about building Quart from Flask and Asyncio. The talk itself is on youtube (linked below) and I’ve made the slides available via google slides (also linked below). jardin, a dataframe-based ORM for Python pandas Pandas can be fed a SQL query as a string to return a dataframe. (是也乎: SQL 实在是无法绕过的一个生产力工具 ) Python 来嗯哼 YouTube 数据 youtube The YouTube Data api v3 gives us the access to YouTube videos, channels, search, captions, comments and playlists. (是也乎: 非常好,只是… ) Restful API 测试 testing Tavern is a pytest plugin, command-line tool and Python library for automated testing of RESTful APIs, with a simple, concise and flexible YAML-based syntax. It’s very simple to get started, and highly customisable for complex tests. (是也乎: 叕一个 RESTful 测试工具, 基于 Yaml?! ) pyschemes awesome project PySchemes is a library for validating data structures in Python. PySchemes is designed to be simple and Pythonic. (是也乎: 那什么, 这种面向编程过程, 而不是编译过程的,应该嗯哼的… ) 从头开始编写基本的 x86-64 JIT 编译器 cpython In this post I’ll show how to write a rudimentary, native x86-64 just-in-time compiler (JIT) in CPython, using only the built-in modules. (是也乎: JIT 是另外一个优化姿势了… ) Don Jayamanne, creator of the Python extension for Visual Studio Code, joins Microsoft – Python Engineering at Microsoft Visual Studio I’m delighted to announce that Don Jayamanne, the author of the most popular Python extension for Visual Studio Code, has joined Microsoft! Starting immediately, Microsoft will be publishing and supporting the extension. You will receive the update automatically, or visit our Visual Studio Marketplace page and click “Install”. 构建一个 Python Autocompleter autocompleter Why do you need autocompletion, and how does it work? My talk at PyCon UK 2017 explains how – and why – we built an in-browser autocompleter for Anvil. (是也乎: 最新的浏览器内自动完成能力… ) tt - 布尔表达式工具箱 boolean tt (truth table) is a library aiming to provide a Pythonic toolkit for working with Boolean expressions and truth tables. Please see the project site for guides and documentation, or check out bool.tools for a simple web application powered by this library. (是也乎: 专注 boolean 运算支持的工具 PS: t.tt 不相干的 ) 好物 ~ 包/模块/库/片段… ...

2017-11-11 · 3 min · 1306 words · ZoomQuiet

蠎加载 149

原文: Import Python Weekly Newsletter - Issue No 149 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Python 技巧: 丹书 book With Python Tricks: The Book you’ll discover Python’s best practices with simple, yet practical examples. You’ll get one step closer to mastering Python, so you can write beautiful and idiomatic code that comes to you naturally. PySpark 用 UDF 引入矢量化 pyspark This blog post introduces the Vectorized UDFs feature in the upcoming Apache Spark 2.3 release that substantially improves the performance and usability of user-defined functions (UDFs) in Python. Pipfile 和 Pipenv : 依赖管理的未来 pipenv Yes, I heared you. pip is a great tool and has been around for quite a long time. But for 3 years or so, people (contributors) have been looking for a way to enhance our packages management experience. Think about the superpowers of composer, npm (or better, yarn) in your favorite tool. What they offer is (more or less) a replacement for the age-old requirements.txt file : the Pipfile. (是也乎: 是的, pip 的潜力远没有挖尽, 毕竟软件生命周期中部署和升级比开发要长的多… ) 用 Python 对排序算法进行可视化 - Python 艺术 visualization Last week there was a great sorting algorithm post by morolin, where they showed an animation of quite a few different sorting algorithms. Morolin built their visualization in Golang. Today, we’ll try implementing our own version, using Python 3. We’ll end up with the following visualizations. (是也乎: 三种排序算法的动态示意… ) 有蒙板的词云示例 visualization A word cloud is a pretty traditional, and maybe already old fashioned way to depict the content of a text or a corpus (a set of texts). Nevertheless it is still a good way to convey the general idea of the text. This form of communication can be further improved by generating a word cloud image which resembles the general idea of the text. This article intends to demonstrate how to generate such a word cloud. 了解分布式 Tensorflow tensorflow One of the biggest/best updates so far on tensorflow is the Distributed Tensorflow functionality. It allows you to scale your training to multiple machines. The tutorial here ?— https://www.tensorflow.org/deploy/distributed is great for folks who are very familiar with in’s and out’s of how tensorflow works. But it doesn’t really explain a lot of the terminology. This post is my journey of struggle with it. 为毛不能用 Python 列表过滤替代 SQL 过滤 benchmark Please don’t filter huge amounts of data in Python when trying to make a dashboard. But instead use a database, because in the end that is what it’s made for. (是也乎: DBA 是 Py 的一个常设领域,只是没有JS 嗯哼的快.. ) 在调查数据集上实践聚类技术 clustering We have practiced Regression problem last time, which is a category of Supervised learning. 数据检索器2.1:Python界面,自动完成和更多 new release We are exited to announce a new release of the Data Retriever, our software for making it quick and easy to get clean, ready to analyze, data. PyPy 状态博客:如何令您的代码快 80 倍 pypy I often hear people who are happy because PyPy makes their code 2 times faster or so. Here is a short personal story which shows PyPy can go well beyond that. (是也乎: 从快5倍开始优化的, 现在80倍了, 基本追上 golang 的基本线了? ) SQLAlchemy 中的多表过滤器 SQLAlchemy For my team at Spring, one of the benefits of moving from Go to Python was being able to use a mature, field-tested ORM library such as SQLAlchemy. When the system you’re putting together grows over fifty tables, you learn to appreciate this powerful tool. (是也乎: SQLAlchemy 终于多年的媳妇熬成婆了 ) Python 中更快的物理库 robotics, simulation We’re open-sourcing a high-performance Python library for robotic simulation using the MuJoCo engine, developed over our past year of robotics research. (是也乎: 机械人工厂也是 py 进入的领域了 ) 用 Python 探索美国警务数据 data science (是也乎: 等等, 这种操作合法嘛? ) 从Postgres 到 Python 的 1M行/秒 async 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 太屌了… ) 用 Python 收集 Twitter 数据 - Alexander Galea的博客 twitter This post explains generally how my Python 3 tweet searching script works. Twitter limits the maximum age of searchable tweets to roughly a week. As such, the script can search for tweets posted up to just over a week ago. Twitter also limits the maximum number of tweets downloaded in every 15 minute interval. (是也乎: 嗯哼?好象有开放接口可以直接获得的? ) 好物 ~ 包/模块/库/片段… ...

2017-11-05 · 3 min · 1472 words · ZoomQuiet

蠎加载 148

原文: Import Python Weekly Newsletter - Issue No 148 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… AWS Lambda 简化功能实现 aws lambda A Step by Step Guide with Code Snippets for Packing Your Python 2.7 Function for AWS Lambda. (是也乎: 从 Lambda 发布以来 AWS 就一直在折腾有关教程 但是, 和 Heroku 的海量友好文章相比, 内部工程师写的就一直非常嗯哼了… ) 如何对机器学习代码进行单元测试 testing, machine learning Over the past year, I’ve spent most of my working time doing deep learning research and internships. And a lot of that year was making very big mistakes that helped me learn a lot about not just about ML, but about how to engineer these systems correctly and soundly. One of the main principles I learned during my time at Google Brain was that unit tests can make or break your algorithm and can save you weeks of debugging and training time. (是也乎: 对 AI 的单元测试也必须是 AI 了? ) Zulip 1.7: Python 构造的开源团队聊天工具 new release Zulip is the world’s most productive team chat software, an alternative to Slack, HipChat, and IRC. Zulip combines the immediacy of chat with the asynchronous efficiency of email, and is 100% free and open source software. (是也乎: 叕一个 Slack 的嗯哼… ~ Zulip 价格 ~ 为什么选择Zulip … ) 学习树数据结构 tree, data structure This post is an attempt to we better understand the Tree Data Structure and clarify any doubts about it. We will learn about what is a tree, examples of it, its terminology, how it works, and a technical implementation (a.k.a code!) 跟踪你的数据新闻 journalism Do you really know how you ended up with those results after analyzing the data from Public Source? (是也乎: 虽然都是对公开数据的分析结果 但是,你真的保证人家分析过程中没有嗯哼? ) 超越 Python 惯用法 idiomatic Note - If you have read Writing Idiomatic Python - By Jeff Knupp. You might want to read what Oleksandr has to say in this post. Personally I learned a lot from the book and recommend it regularly to everyone. People don’t speak entirely in idioms unless they are totally off their rockers. Overusing idioms makes you seem more than self-confident, full of air, and frankly not playing with a full deck. It is fair to middling to spice your language with idioms a little bit, but build the whole speech entirely out of them is beside the point. (是也乎: 因为上一个版本时间太久了, 所以, 作者认为应该升级了…一切为了 Py3 ) TensorFlow 101 tensorflow TensorFlow is an open source machine learning library developed at Google. TensorFlow uses data flow graphs for numerical computations. Nodes in the graph represent mathematical operations, while the graph edges represent the multidimensional data arrays (tensors) communicated between them. In this post we will learn very basics of TensorFlow and we will build a Logistic Regression model using TensorFlow. (是也乎: 所以, PyTorch 在爆发… ) SciPy 发布 1.0.0 new release We are extremely pleased to announce the release of SciPy 1.0, 16 years after version 0.1 saw the light of day. It has been a long, productive journey to get here, and we anticipate many more exciting new features and releases in the future. (是也乎: 用了16年, 才升级到 v1.0,对比隔壁3年飙到 v56 的大家… ) Python 数据科学 手册 azure, jupyter This repository contains the entire Python Data Science Handbook, in the form of (free!) Jupyter notebooks. (是也乎: azure?! 哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈哈… 为 M$ 的营销工程师点赞… ) Dramatiq: 简单的任务处理 queue Dramatiq is a distributed task processing library for Python with a focus on simplicity, reliability and performance. (是也乎: 又双叒叕 一个分布式任务队列…. Dramatic 戏剧化的…惊喜或是相反 ) Bayesian-Modelling-in-Python: Bayesian Welcome to “Bayesian Modelling in Python” - a tutorial for those interested in learning how to apply bayesian modelling techniques in python (PYMC3). This tutorial doesn’t aim to be a bayesian statistics tutorial - but rather a programming cookbook for those who understand the fundamental of bayesian statistics and want to learn how to build bayesian models using python. The tutorial sections and topics can be seen below. 在 Clojure, R, 以及 Python 用 GraalVM 进行混合嵌入开发 Clojure In my talk at Clojure Conj I mentioned how a project from Oracle Labs named GraalVM might have to potential for Clojure to interop with Python on the same VM. At the time of the talk, I had just learned about it so I didn’t have time to take a look at it. Over the last week, I’ve managed to take it for a test drive and I wanted to share what I found. (是也乎: 所以? Clojure 在拼命包容其它语言来给自己续命? ) Sublime Text 用户应该用的 7 高能快捷键 sublime, offtopic Through my career as a software developer, I have appreciated one text editor the most, Sublime Text. I began with writing code in Notepad++ long long time ago, then tried IDEs as well but nothing came as close to working smoothly as Sublime Text. This blog is also written using Sublime Text. (是也乎: 港真 subl 的新logo 很丑… ) Cloud Jupyter Notebooks 更爽 – Gryd Notebooks jypyter Why are we offering cloud Jupyter notebooks? If you use Jupyter or IPython notebooks for your business or for working on assignments or research work, you are probably familiar with the challenges that come with setting up a stable Jupyter system on a machine. (是也乎: 可是谁敢用? ) 用 python/pandas 将嵌套 JSON 数据转换为 CSV code snippets (是也乎: 常见常用却从未形成统一转换思路的问题… 如同大自然的伟力, 总是一边堆高挖深, 另一边同时在尝试抹平… ) python-clustering-exercises scikit Exercises for k-means clustering with Python 3 and scikit-learn as Jupyter Notebooks, with full solutions provided as notebooks and as PDFs. These exercises teach the fundamentals of k-means using some great real-world datasets, including stock price movements, measurements of fish and seed dimensions. 在 Python 中生成狭缝扫描图像 - Make Art with Python image processing Slit-scan photography is a technique where a slit is moved between the camera and the subject. It’s effect lets the viewer see a tiny slice of a movement, through time. (是也乎: 基于 折腾出的: 对现实图片进行计算获得全新的嗯哼 ) 编写一个有限状态机来解析纯 Python 中的自定义语言 fsm I was once a huge fan of FSMs (Finite State Machines) as a mechanism to keep track of states. Automata theory is the basis of class of computational problems solvable by discrete math. I had used fysom in the past but this time I wanted something home grown. I was able to write complex language parse in a couple hours using only 200 lines of code. (是也乎: FSM 的 DSL 制造技术 ) 为毛 Pythonista 习惯将行限制为最多79个字符? humor :-p (是也乎: Because we count from 0. #Python #pythonprogramming #jokes 嗯哼 没毛病.. ) ...

2017-10-29 · 5 min · 2226 words · ZoomQuiet

蠎加载 147

原文: Import Python Weekly Newsletter - Issue No 147 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 10 项 Python 初学者常见嗯哼 core-python Do you still make one of these? 简单的选择就是 Pytest PyTest During my work as Python developer, I have seen many different approaches to software testing. Having such developed community and tools, it may seem that this topic should not leave much to discuss in the Python world. For many developers the choice of their test framework might be simple?—?Pytest. Python 中垃圾收集需要了解的事情 garbage collection This article describes garbage collection (GC) in Python 3.6. Usually, you don’t need to worry about memory management when the objects are no longer needed Python automatically reclaims the memory from them. However, understanding how GC works can help you write better Python programs. 使用 Parity&Django Rest Framework 创建 Ethereum API服务 ethereum Making a REST API Services will help you to connect any clients of choice to the Ether Network: Chrome Extensions, Mac App, iOS App or Android App. (是也乎: 以太坊 相关的文章也多了起来, 这是又一个领域的战国时代, 就看大家谁猜的对了… 俺猜, 嘦 google 推出类似的开源项目, 那么… ) Tensorflow 文本分类 text classification Text Classification is the task of assigning the right label to a given piece of text. This text can either be a phrase, a sentence or even a paragraph. Our aim would be to take in some text as input and attach or assign a label to it. Since we will be using Tensorflow deep learning library, we can call this the Tensorflow text classification system. (是也乎: 叕一则文本处理的案例,只是在 PyTorch 批量输出中文案例时, TF 就… ) 您的国家如何商业友好? data science World Development Indicators (WDI) are an extensive and comprehensive compilation of data by the World Bank. WDI includes 1,400 indicators for over 200 economies, and it presents the most current and accurate global development data available. (是也乎: 这简直是教大家怎么进行投资环境的分析哪… 世界发展指标(WDI)… ) 稳定排序 code snippets Stable sorting maintains the original order if two keys are the same 使用 UUID 作为主键 UUID If you’re designing a REST API, auto incremented primary keys can be a threat. They expose a lot of informations about your API and the internal structure. UUIDs can help to cover these information and make your API more secure. In the following I’m going to explain what a primary key is and what problems can occur with auto incremented primary keys. (是也乎: 最大的问题可能是走查时,阅读体验了… ) 构建 Nimoy: 测试运动员 testing Documenting the process of building Nimoy. 在Python中编写域特定语言(DSL) DSL Learn how to create your own Domain Specific Language with Python from scratch with this step-by-step tutorial. (是也乎: 叕叕一则 DSL 的 py 制造过程 ) 用Jupyter笔记本的10个技巧 jypyter Jupyter Notebook (a.k.a iPython Notebook) is brilliant coding tool. It is ideal for doing reproducible research. Here is my list of 10 tips on structuring Jupyter notebooks, I worked out over the time. Django 2.0 beta 1 发布 django Django 2.0 beta 1 is an opportunity for you to try out the assortment of new features in Django 2.0. 用 Python 预测政治偏见 news Recent scandals around fake news have spurred an interest in programmatically gauging the journalistic quality of an article. Companies like Factmata and Full Fact have received funding from Google, and Facebook has launched its “Journalism Project” earlier this year to fight the spread of fake stories in its feed. (是也乎: 国内已经有团队提供类似服务了… ) GetStream.io: 为什么我们从Python切换到Go golang Switching to a new language is always a big step, especially when only one of your team members has prior experience with that language. Early this year, we switched Stream’s primary programming language from Python to Go. This post will explain some of the reasons why we decided to leave Python behind and make the switch to Go. (是也乎: Pythonic 世界也包含 golang 的 简单的说还是性能的需求超过了其它的成本 ) 危险的 Pickles - Python 序列化 pickles Before we get elbow deep in opcodes here, let’s cover a little background. The Python standard library has a module called pickle that is used for serializing and deserializing objects. Except it’s not called serializing and deserializing, it’s pickling and unpickling. 用Python 的 Scikit 来介绍机器学习 scikit In this post, we’ll be doing a step-by-step walkthrough of a basic machine learning project, geared toward people with some knowledge of programming (preferably Python), but who don’t have much experience with machine learning. By the end of this post, you’ll understand what machine learning is, how it can help you, and be able to build your own machine learning classifiers for any dataset you want. Python 循环导入 core-python A circular dependency occurs when two or more modules depend on each other. This is due to the fact that each module is defined in terms of the other. PuDB debugging PuDB is a full-screen, console-based visual debugger for Python. (是也乎: 所以, CCDOS 的世界才是最好的.. ) 流数据帧 pandas This post describes a prototype project to handle continuous data sources of tabular data using Pandas and Streamz. (是也乎: 还有这种操作? DataFrames 不是整体处理的嘛?流式化了怎么矩阵运算? ) 3.7.0a2 release Python 3.7.0a2 now available for testing Python/flatten arbitrarily nested list code snippets python/named tuple magic code snippets Python/exotic pandas filters pandas 好物 ~ 包/模块/库/片段… ...

2017-10-21 · 5 min · 2089 words · ZoomQuiet