蠎加载 87

原文: Import Python Weekly Newsletter - Issue No 87 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Daniel Bader 为Py开发者的 Youtube 频道 video Useful Youtube channel with short screencast/videos for Python developers to subscribe to. I learned on couple of sublime + Python tricks from here. (是也乎: 细心为 Pythonista 收集整理的油管频道, 包含了 subl+py 的技巧演示… ) dockerfiles/django-uwsgi-nginx: docker This Dockerfile shows you how to build a Docker container with a fairly standard and speedy setup for Django with uWSGI and Nginx. 有趣的 Python 教程 curated list I have read some interesting Python tutorials lately. I would love to share them with you. Kyoukai - 完全异步灵感源自 Flask 的Py3.5+ web 框架 web framework Kyoukai is a fast asynchronous Python server-side web framework. It is built upon asyncio and the Asphalt framework for an extremely fast web server. (是也乎: Kyōkai (境界) 嗯哼,因为日语有完全可发音的罗马形式,所以,总是被选为工程名嘛?! 也使用了 Blueprintslink 进行扩展,基本上就是 flask 的异步简化版本. ) 0停机的升级到 Python 3 with Zero Downtime · YPlan Tech Blog python3 We recently upgraded our 160,000 lines of backend Python code from Python 2 to Python 3. We did with zero downtime and no major errors! Here’s how we did it, hopefully it will help anyone else still stuck on Python 2! (是也乎: 终于有人成功尝试了, 一次性将 16万行 py2 代码升级为 py3 的… 你信嘛?!反正俺相信了. ) BangPypers: 有关自动化的讨论 - 2016 August Meetup automation Bangalore user group meet with Python Automation as the theme (是也乎: 看人家的 meetup 在讨论什么… 看人家的环境比我们也没有高哪儿去哪 ) Mike Driscoll: ANN: The wxPython Cookbook Kickstarter Kickstarter Campaign for wxPython Cookbook. (是也乎: 现在什么都能众筹了哪… ) 和俺说 Python: #72 时尚驱动的开源软件在 Zalando podcast What happens when you take a tech-driven online fashion company that is experiencing explosive growth and infuse it with a deep open-source mission? You’ll find out on this episode of Talk Python To Me. We’ll meet Lauri Apple and Rafael Caricio from Zalando where developers there have published almost 200 open source projects on Github. (是也乎: 可以下载 mp3 的播客, 有关 Fashion-driven 来自 Womens Shoes & Fashion | ZALANDO.CO.UK 团队 关键是这种播客坚持了很长时间…如何?为何?谁在听? 推荐 Machine learning at the new Microsoft 以及专属 rap Developers, Developers, Developers ) 访问控制: 一个 Django 许可的应用比较 django There are many ways to handle permissions in a project. For instance we may have model level permissions, object level permissions, fine grained user permission or role based. Either way we don’t need to be writing any of those from scratch, Django ecosystem has a vast amount of permission handling apps that will help us with the task. In this post we will compare how some popular permission apps work so you know which one suits your project needs. Machinalis: 搜索外星人 image processing Do you know what they are? If you are thinking of irrigation circles, you are wrong. Do not believe the lies of the conspirators. Those are, undoubtedly, proofs of extraterrestrial visitors on earth. As I want to be ready for the first contact I need to know where these guys are working. It should be easy with so many satellite images at hand. So I asked the machine learning experts around here to lend me a hand. Surprisingly, they refused. Mumbling I don’t know what about irrigation circles. Very suspicious. But something else they mentioned is that a better initial approach would be to use some computer-vision detection technique. Note - Code is here https://github.com/machinalis/satimg/blob/master/Searching%20for%20aliens.ipynb (是也乎: 标题党… ) 为何要学习 Python ? community Hopefully this post gave you some insight into why you should consider giving Python a go. This post is coming from someone who feels “guilty” for talking not so good about Python in the past and is now all over the hype train. In my defense, it was just a “personal preference thing”, when people asked me about which language they should learn first, for instance, I usually suggested Python. (是也乎: 嗯哼, 一切鳮汤都抵不上一个确切的职位… ) 活动 ~ Upcoming Conference / User Group Meet ...

2016-08-29 · 3 min · 1193 words · ZoomQuiet

蠎加载 84

原文: Import Python Weekly Newsletter - Issue No 84 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Django 图书全集 books Djangoweekly has a listing of all published Django books on one page. Note check publication date and which version of Django the book is using. 为毛应该用 Python 3? python3 The short answer is: because it’s the actively-developed version of the language, and you should use it for the same reason you’d use 2.7 instead of 2.6. If you’re here, I’m guessing that’s not enough. You need something to sweeten the deal. Well, friend, I have got a whole mess of sugar cubes just for you. (是也乎: 何时没有这种文章发布了, 才说明 Py3 真正获得用户肯定了 ) 和 Josh Gordon 学习机械学习 machine learning, video Series of Python Videos by Josh Gordon of Google teaching Machine learning basics. 流利的 Python: 特殊方法的威能 pythonic Pythonistas praise a good API by calling it “Pythonic.” That quality has much to do with proper use of the special methods used in the Python Data model, which define the essential behaviors that we expect in objects. Perhaps you’ve used Python for years. Do you really know it? This tutorial is intended for a Python programmer who has working/practical knowledge of the language plus an understanding of object-oriented programming, who now needs to learn how to write idiomatic APIs (是也乎: 正确用好内置数据结构是一组稳固 API 的基础. ) 如何构建 Django 信号 django The Django Signals is a strategy to allow decoupled applications to get notified when certain events occur. Let’s say you want to invalidate a cached page everytime a given model instance is updated, but there are several places in your code base that this model can be updated. You can do that using signals, hooking some pieces of code to be executed everytime this specific model’s save method is trigged. In this tutorial I will present you the built-in signals and give you some general advices about the best practices. (是也乎: 嗯哼,将 GUI 的信号/槽 机制用在 web 中. ) Semaphore 社区: 用 Behave 进行 Python 应用行为测试 testing Learn how to write behavioral tests for your next Python application using the Behave library. Django 1.10 发布 django, release Full text search for PostgreSQL. New-style middleware to solve the lack of strict request/response layering of the old-style of middleware. Official support for Unicode usernames. Check release notes for more info. 自动化 OSINT: 暗网 OSINT 使用 Python 和 OnionScan: 第一节 security You may have heard of this awesome tool called OnionScan that is used to scan hidden services in the dark web looking for potential data leaks. Recently the project released some cool visualizations and a high level description of what their scanning results looked like. What they didn’t provide is how to actually go about scanning as much of the dark web as possible, and then how to produce those very cool visualizations that they show. (是也乎: 类似 Zoomeye 服务,从 dark web 中为用户进行数据泄漏检验, 也是数据科学的一种, 所以, 必然的 Python 可以 ) “避免知识的诅咒”: 社区服务奖获得者 Ned Batchelder 曰 community The Python Software Foundation recognized Batchelder with a Community Service Award for his tireless work helping run the Boston Python user group, being a regular speaker at conferences, maintaining coverage.py, and being a friendly face for the community on IRC and elsewhere (是也乎: coverage.py 的创造者 ) Python 201: multiprocessing 教程 multiprocessing The multiprocessing module was added to Python in version 2.6. It was originally defined in PEP 371 by Jesse Noller and Richard Oudkerk. The multiprocessing module allows you to spawn processes in much that same manner than you can spawn threads with the threading module. The idea here is that because you are now spawning processes, you can avoid the Global Interpreter Lock (GIL) and take full advantages of multiple processors on a machine. (是也乎: Py2.6 就加入内置模块了, 但是,用起来的不多 ) Django Channels 和 Celery 样例 - Vincent Zhang django, celery In this tutorial, I will go over how to setup a Django Channels project to work with Celery and have instant notification when task starts and completes. Django Channels uses WebSockets to enable two-way communication between the server and browser client. It is assumed that the reader is comfortable with how to setup a normal Django project and we will only cover the parts relating to Channels and Celery. (是也乎: 华人,当然外国的… ) 用 Keras 和 Python 开始深度学习 deep learning Despite all the recent buzz about deep learning, the design and testing of a neural network pipeline may become a task for developers who aren’t machine learning specialists. This tutorial is intended for a software developer who has intermediate experience in Python, plus some hands-on experience developing data pipelines and working with machine learning use cases, who now needs to learn how to build high-performance classifiers based on deep learning. udatetime 已经支持 PyPy pypy I just finished the performance optimized pure Python implementation of my RFC3339 date-time library udatetime for PyPy and Python 3.5. The benchmark say PyPy is now officially the fastest with udatetime. Again it’s astonishing how good PyPy performs. 连续分析新闻: Dask 和 scikit-learn: 教程三部曲 scikit Dask core contributor Jim Crist has put together a series of posts discussing some recent experiments combining Dask and scikit-learn on his blog, Marginally Stable. The tutorial spans three posts, which covers model parallelism, data parallelism and combining the two with a real-life dataset. (是也乎: 主要分享 涵盖模型的并行,数据并行和两个与现实生活相结合的数据集 ) Python 内脏: Hello, ceval.c! core python The “Python’s Innards” series owes its existence, at least in part, to hearing one of the Python-Fu masters in my previous workplace say something about a switch statement so large that it was needed to break it up just so some compilers won’t choke on it. I remember thinking then: “Choke the compiler with a switch? Hrmf, let me see that code.” Turns out that this switch can be found in ./Python/ceval.c. (是也乎: 追查 switch 到源代码 ) 活动 ~ Upcoming Conference / User Group Meet ...

2016-08-04 · 4 min · 1555 words · ZoomQuiet

蠎加载 83

原文: Import Python Weekly Newsletter - Issue No 83 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Raymond Hettinger - 并发的思考 (Pycon RU 2016) video Walk through two examples of threading and multiprocessing to illustrate rules and best practices for taking advantage of concurrency. Documentation and code from the presentation is here - https://dl.dropboxusercontent.com/u/3967849/pyru/_build/html/index.html (是也乎: 俄国PyCon! ) 又一个 Python 来搞掂的故事 ~ 用类定义构建 DSL core python We didn’t invent a new DSL, we merely adapted Python’s existing syntax to our needs. A simple class structure and a metaclass definition gave us everything we needed to build the configuration parameter files we needed. 用 Python 构建 slackbot 从而帮助自己找到 SF 的公寓 bot Scrapes listings from Craigslist. Filter out listings that don’t match our criteria. Post the listings to Slack, a team chat tool, so we can discuss and rate them. Wrap the whole process into a persistent loop and deploy it to a server (so it would run continuously). Built by Vik Paruchuri - https://twitter.com/vikparuchuri (是也乎: 其实还是对 Craigslist 进行搜索,只是控制界面变成了 Slack; 嗯哼?! 为了上班不被人发现在刷房源?! ) 每天 mypy. 第三部分 mypy Earlier this year PEP-484 was accepted, the typing module was added to Python 3.5, and mypy moved into the umbrella of official python projects. Since it was a visible topic at the last Pycon.us, I decided to get some experience with it and see how it feels to use it. I decided I’d take a working, mature, open-source project that wasn’t written by me and “convert” it to mypy. Note this is a 3 part series with a follow up. Have a look at the latest post here - http://www.machinalis.com/blog/writing-type-stubs-for-numpy/ (是也乎: 细思恐极, PEP-484 已被接受?! 意思是 py3 为了性能,已经放弃动态语言这一特性了!? ) 登记开始: Django Under the Hood 2016 ! conference Based on the videos I have watched this is a must Go ( if you can that’s ) Django Conference. A. Jesse Jiryu Davis 对话 “撰写一个优秀的编程 Blog” podcast Michael Kennedy ( guy behind the TalkPython Podcast ) and I talked about writing about programming. What kind of writing is most valuable, how do you choose a topic, improve your writing, find an audience, and find the time to write? Listen to the podcast on the Talk Python To Me site. Django 页面加速速度 django Django and Python tips and tricks on how to improve website page load times by optimizing images. words2map: 用 word2vec, t-SNE 以及 HDBSCAN 构建的推荐框架来加强 overlap.ai At overlap.ai we’re building artificial intelligence to unite people through their overlapping passions, and here we introduce a framework we call words2map for considering what our users love, like these personal passions of ours. Github repo - https://github.com/overlap-ai/words2map (是也乎: 又一个推荐服务的框架 ) 用 Python 进行 Pizza 计数 security I’m a full time nerd, even when I’m ordering pizza online I can’t stop myself from investigating how the websites I’m ordering from work. My latest investigation was Dominoes where I found a neat way to count the number of orders that they process throughout the day. This post is supposed to highlight potential dangers when exposing integer ID’s, and how they can allow someone motivated (or sad) enough to track data you might not want to share. Simple Python Code to find it out has been shared. (是也乎: 对电商的又一个私人研究实践… ) 用 Django 和 D3 构建仪表盘 — dreisbach.us django, Django Rest Framework, d3 My workplace recently collaborated with several police departments to build a dashboard showing 911 (also known as Call for Service) data, allowing users to drill down into that data. When I started on the project, there was a prototype written in dc.js, a JavaScript framework for building dynamic dashboards with all the data on the frontend, built around records from Tampa, FL. I needed to take this and make it capable of handling much more data – millions of records. I took on the task of building this using Django and D3. Along the way, I found a set of tools that worked for me. 当周 PyDev 之星 : Nicholas Tollervey interview This week we welcome Nicholas Tollervey (@ntoll) as our PyDev of the Week. He is the author of the Python in Education booklet and the co-author of Learning jQuery Deferreds: Taming Callback Hell with Deferreds and Promises. He was one of the co-founders of the London Python Code Dojo. You should check out his website to see what he’s up to. Let’s spend some time learning more about our fellow Pythonista! (是也乎: 伦敦 Python Code Dojo, 代码道场! ) 基本 Django 的 uWSGI 配置 django Here are two basic examples of almost the same uWSGI configuration to run a Django project; one is configured via an ini configuration file and the other is configured via a command line argument. This does not represent a production-ready example, but can be used as a starting point for the configuration. 活动 ~ Upcoming Conference / User Group Meet ...

2016-07-29 · 3 min · 1310 words · ZoomQuiet

蠎加载 82

原文: Import Python Weekly Newsletter - Issue No 82 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 对100万酒店进行机械学习后有趣的发现 On this tutorial we learned how to scrape millions of reviews, analyze them with pre-trained classifiers within MonkeyLearn, indexed the results with Elasticsearch and visualize them using Kibana. Machine learning makes sense when you want to analyze big volumes of data in a cost effective way. The code repository is here - https://github.com/monkeylearn/hotel-review-analysis (是也乎: 以 tripadvisor 为数据源! 也就是说这世界上部分信息早已经开放了… ) Mike Driscoll: Python 进阶: 介绍 mock The unittest module now includes a mock submodule as of Python 3.3. It will allow you to replace portions of the system that you are testing with mock objects as well as make assertions about how they were used. A mock object is used for simulating system resources that aren’t available in your test environment. In other words, you will find times when you want to test some part of your code in isolation from the rest of it or you will need to test some code in isolation from outside services. (是也乎: 除非实在难以架构, 否则尽可能使用真实测试对象吧 ) Altair: 声明式 Python 统计可视化库, 基于 Vega-Lite pep8 Altair is a declarative statistical visualization library for Python. (是也乎: 基于 Pandas 的数据表 ) 又7个 Django Web 开发应知应会 django Set up Persistent Database Connections, Turn Cached Loading on, Store the Sessions in Cache, Keep the Application and Libraries Separate, Store All Templates in One Place, Install HTML5 Boilerplate, Monitor and Control Processes using Supervisor. (是也乎: 随着 Django 的高速发展, 这类最佳实践将是永无止境的 ) DSF 发布开发行为守则 community Today we’re proud to open source the documentation that describes how the Django Code of Conduct committee enforces our Code of Conduct. This documentation covers the structure of Code of Conduct committee membership, the process of handling Code of Conduct violations, our decision making process, record keeping, and transparency. 为毛 Python 中有些行为函式就是不用下刬线? 比如: setdefault, makedirs, isinstance? discussion I always wondered that. Here is a reddit discussion on the same. (是也乎: 因为作者当初睡着了… ) 如何用Python 写一个能写 Python 的 AI AI This post is about creating a machine that writes its own code. More or less. Introducing GlaDoS Skynet Spynet. More specifically, we are going to train a character level Long Short Term Memory neural network to write code itself by feeding it Python source code. The training will run on a GPU instance on EC2, using Theano and Lasagne. If some of the words here sound obscure to you, I will do my best to explain what is happening. (是也乎: 简单的说, 这就是 西乔 的 beta cat 的构建方法 ) 用 Flask-RESTful 写个 API REST This article will go over the details of how to create a RESTful API with Flask and Flask-RESTful. In Part 1 we will go over the API basics and how to implement a simple API. In Part 2 we will expand into advanced use cases powered by Flask-RESTful. All code that will be show is readily available on this repository. (是也乎: 虽然 Flask 比 Django 轻便很多倍,但是,依然… ) SciPy 2016 视频已经放 video Running Python Apps in the Browser by Almar Klein was a pretty interesting talk for me. See what interest you. Youtube channel. (是也乎: 如何在 浏览器 中运行 Py 应用!?这个视频值得关注. ) 如何构建自制 Django Middleware django In a nutshell, a Middleware is a regular Python class that hooks into Django’s request/response life cycle. Those classes holds pieces of code that are processed upon every request/response your Django application handles. Mike Driscoll: 介绍 coverage.py coverage Coverage.py is a 3rd party tool for Python that is used for measuring your code coverage. It was originally created by Ned Batchelder. The term “coverage” in programming circles is typically used to describe the effectiveness of your tests and how much of your code is actually covered by tests. You can use coverage.py with Python 2.6 up to the current version of Python 3 as well as with PyPy. (是也乎: 虽然没收入官方内建库, 但 coverage.py 已经是事实上最常用的覆盖测试模块 ) Django 的 Ajax 网站教程 django In this tutorial we’ll see a trivial example of how to do a ajax website with django. Good for students looking to learn the basics of Django/Ajax and see how it works. 订阅 Gitter 上 Python & Django 频道吧. community Gitter is like slack for developers. They have active Python, Django channels. Have a look. 介绍 Zipline Python has emerged as one of the most popular language for programmers in financial trading, due to its ease of availability, user-friendliness and presence of sufficient scientific libraries like Pandas, NumPy, PyAlgoTrade, Pybacktest and more. Zipline is a Python library for trading applications that powers the Quantopian service mentioned above. It is an event-driven system that supports both backtesting and live-trading. In this article we will learn how to install Zipline and then how to implement Moving Average Crossover strategy and calculate P&L, Portfolio value etc. (是也乎: 可能是最好的股票交易管理平台 ) 活动 ~ Upcoming Conference / User Group Meet ...

2016-07-22 · 4 min · 1536 words · ZoomQuiet