蠎加载 73

原文: Import Python Weekly Newsletter - Issue No 73 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Python 3: 加密介绍 python3, encryption Py 3 并没有增补更多加密相关的库, 本文专注第三方库: PyCrypto 和 cryptography, 展示如何进行加密以及对应的解密. 如何用 Python 为 Slack 构建短信机械人 bot Bots can be a super useful bridge between Slack channels and external applications. Let’s code a simple Slack bot as a Python application that combines the Slack API with the Twilio SMS API so a user can send and receive Slack messages via SMS. 并发修饰器 - Python 并发真的很容易 全新得趣的库 deco, 专门进行并发运行的修饰, 作者是 Alex Sherman 和 Peter Den Hartog, 都在 Wisconsin Madison 大学. Python 包索引的能量 pypi 介绍 PyPI 的真相. The Python Package Index, or as most call it “PyPI” is a central part of the ecosystem of Python. It serves as a central registry of names, helping to prevent collision between different projects as well as the default repository that most Python users go to when looking for software.For most, what powers this service is largely opaque to them — it’s (usually) there when they need it and who or what powers it is largely a mystery to them, but what and who really powers PyPI? 在 AWS 上部署 Django 接口为 Docker 容器 django, docker Docker is a wonderful technology revolutionazing how to run microservices. You may have some experience with it or may not. I will show in this short post how to run a Docker container in Amazon Web Services(EC2) with your whole API in it. This trick is only useful for APIs or django projects that doesn’t need to scale and doesn’t really have too much traffic. 扩展创业项目达到 200万点击/月 - 访谈 railwayapi.com 创始人 Kaustubh PythonAnywhere is a Python development and hosting environment that displays in your web browser and runs on our servers. They’re already set up with everything you need. It’s easy to use, fast, and powerful. There’s even a useful free plan. In this interview Kaustubh talks about his experience of using PythonAnywhere. Facebook 趋势 RSS 抓取 (w/ Python 3.5) 快速构建的 py3 脚本, 处理来者 RSS 的 PDF 列表,监察 facebook 有关突发新闻. Apache Spark 2.0: 结构化数据流介绍 machine learning Michael Armbrust and Tathagata Das explain updates to Spark version 2.0, demonstrating how stream processing is now more accessible with Spark SQL and DataFrame APIs. Video. Code snippets in Python. Python 贴士列表 :: 提升清单 core python Simple code snippets, stuff we need in everyday coding. Worth a quick glance. Pygrunn: 微型 Python, Pythonic 的物联网 - Lars de Ridder core python (嗯哼,为了 RAM 平台,我们不能使用 CPython) micropython is a project that wants to bring python to the world of microprocessors. Micropython is a lean and fast implementation of python 3 for microprocessors. It was funded in 2013 on kickstarter. Originally it only ran on a special “pyboard”, but it has now been ported to various other microprocessors. Why use micropython? Easy to learn, with powerful features. Native bitwise operations. Ideal for rapid prototyping. (You cannot use cpython, mainly due to RAM usage.) 从 Python 直接加载 C++ 文件! Anyone looking to speed up critical regions of their script should have a look. Python ASCII 动画生成器 : 也许有的人需要? Pretty cool decorator. Check out the gif screen-cast. (是也乎: 将CLI 的输出,折腾为 gif 动画片; 嗯哼,不够科学… ) Pygrunn: 理解 PyPy 并在生产中应用之 - Peter Odding/Bart Kroon pypy pypy is “the faster version of python”. There are actually quite a lot of python implementation. cpython is the main one. There are also JIT compilers. Pypy is one of them. It is by far the most mature. PyPy is a python implementation, compliant with 2.7.10 and 3.2.5. And it is fast!. Djangofriendly » Django 主机对比和资源 django Djangofriendly is a community resource for finding the friendliest Django hosting environments. Asterix - 完备的 python 初始化系统 core python Describe the initialization of your application and let asterix manage the startup for you. It will ensure that the correct dependencies are started in order, so you don’t need any dirty hacks to have your initialization flow. Also, it allows you to build separate stacks for test/dev/production and even for web/batch applications, loading just what you need. 新书 ~ New Books ...

2016-05-19 · 3 min · 1354 words · ZoomQuiet

蠎加载 72

原文: Import Python Weekly Newsletter - Issue No 72 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 生成器解析 core python Python has a compact syntax for constructing a list with a loop and a condition, called a list comprehension: my_list = [ f(x) for x in sequence if cond(x) ] . You can also build dictionaries with dictionary comprehensions, and sets with set comprehensions/// Asyncio 和 uvloop benchmark 上周看到了 uvloop 的简介, 号称比 Asyncio 快两倍以上, 不服来测! 嗯哼 基本属实 ;-) Today, I read an article about uvloop. I am aware of libuv and its behind nodejs. What caught me was “In fact, it is at least 2x faster than any other Python asynchronous framework.”. So I decided to give it a try with aiohttp. The test program was simple websocket code which receives a text message, doubles the content and echoes back. Here is the complete snippet with uvloop. I ran naive benchmark using thor and results favoured uvloop. uvloop was able to handle more connection on 8GB , non SSD Mac OSX . Asyncio was able to hold 154 connections and uvloop 243 connections with any socket errors . Python 成本分析脚本 - AWS EC2 vs AWS Lambda - reddit discussion (self.Python) aws 官方号称 Lambda 比 EC2 性价比高… So I decided AWS Lambda had been on the field enough time to make an analysis by my own. Lambda comes with a few problems like only Python 2.7 (they will fix it in the future I guess), libraries, etc. Also I had read some blogs like Flynn’s one. But skipping those problems I wanted to know… What about money ? 用 python, pandas, matplotlib 下载/分析/可视化 10年份 last.fm 音乐收听历史 (代码在 github) machine learning Using Python, pandas, matplotlib, and leaflet, I downloaded my listening history from Last.fm’s API, analyzed and visualized the data, downloaded full artist details from the Musicbrainz API, then geocoded and mapped all the artists I’ve played. All of my code used to do this is available in this GitHub repo, and is easy to re-purpose for exploring your own Last.fm history. All you need is an API key. (是也乎: 以及类似的分析 twitter/facebook/instagram … SNS 海量数据的根源都是: 人家开放了接口! ) 应该学写 Python 装饰器的五大理由 core python Python decorators are so easy to use. Anyone who knows how to write a Python function can learn to use a decorator. But writing decorators is a whole different skill set. And it’s not trivial; you have to understand. closures, how to work with functions as first-class arguments, variable arguments, argument unpacking, even, some details of how Python loads its source code (是也乎: bigger and bigger and bigger and bigger and bigger … ) TPOT: 自动化数据科学平台 赞助商 In this article, we’re going to go over three aspects of machine learning pipeline design that tend to be tedious but nonetheless important. After that, we’re going to step through a demo for a tool that intelligently automates the process of machine learning pipeline design, so we can spend our time working on the more interesting aspects of data science. 如何获得 Python 工作岗位? - Reddit Discussion core python Recently, I’ve been playing around with Python and found that I really enjoy the language. Now I am wondering how I should go about switching over to a Python job. I am tired of doing front-end web development, and am thinking that I would enjoy concentrating more on the back-end. However, the back-end Python jobs seem to require me being a data scientist. Also, it seems like most Python jobs are in QA automation or DevOps. (是也乎: 汇同 哪种语言/编辑最好 为三大月经贴… 其实,很简单…自个儿创造这个岗位! ) Why Python? What’s it good for? How is it special? core python Quick read justifying Python. 安装 Jupyter Notebook Extensions video Jonathan Whitmore demonstrates how to install pivot tables and showcases the features of this extension by examining a dataset of restaurant scores.Pivot tables are one of the many ways to extend the capabilities of the Jupyter Notebook. In this training segment, learn how to quickly and effectively analyze, scope, and visualize data using pivot tables in Jupyter Notebook. (是也乎: 高级特性, 数据透视表的深化折腾… ) davidmiller/pony-mode: Django mode for emacs emacs pony-mode - Django mode for emacs 用 ctypes 来从 Python 调用 C 代码 code snippet This recipe shows basic usage of the ctypes module to call C code from Python code. 给 Django 追加用户验证 django If you are building a new Django website from scratch, the first thing you implement is the User authentication. Here is a simple article showing you how to do it. Django, ELB 健康检查和持续交付 | Octopus Energy Tech blog aws A robust means of deploying web applications with Amazon Web Services is to use an Elastic Load Balancer (ELB) to balance requests between an “Auto Scaling Group” (ASG) of EC2 instances. As well as horizontally scaling, this set-up allows automated canary (aka blue-green) deployments, where new application versions are deployed as a new ASG which replaces the existing EC2 instances with new; a so-called “immutable infrastructure” approach. DjangoPaths - 为毛俺选择 Wagtail? cms 在折腾了 Django-CMS 和 Mezzanin 之后, 还是理智的入了 Wagtail 教. My decision to delve into Wagtail only came after I attempted to use Django-CMS and Mezzanine. Their strengths seemed to lie in having a comprehensive ecosystem in place with pluggable e-commerce systems and more. 部署 Django + Python 3 + PostgreSQL 到 AWS Elastic Beanstalk - Real Python aws The following is a soup to nuts walkthrough of how to set up and deploy a Django application, powered by Python 3, and PostgreSQL to Amazon Web Services (AWS) all while remaining sane.Elastic Beanstalk is a Platform As A Service (PaaS) that streamlines the setup, deployment, and maintenance of your app on Amazon AWS. It’s a managed service, coupling the server (EC2), database (RDS), and your static files (S3). You can quickly deploy and manage your application, which automatically scales as your site grows. Onion IoT 和 Lazar 以及 Zheng podcast IoT 物联网时代来了, OpenWRT 是其中最具成功相的平台. One of the biggest new trends in technology is the Internet of Things and one of the driving forces is the wealth of new sensors and platforms that are being continually introduced. In this episode we spoke with the founder and head engineer of one such platform named Onion. The Omega board is a new hardware platform that runs OpenWRT and lets you configure it using a number of languages, not least of which is Python. 新书 ~ New Books ...

2016-05-13 · 4 min · 1949 words · ZoomQuiet

蠎加载 71

原文: Import Python Weekly Newsletter - Issue No 71 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Python 元类解释 core python Python 的核心特性就是:一切为对象, 其实都是类的实例. 教程:如何基于 Django,Ngrok 构建 facebook 消息机械人 - Blog - Abhay Kashyap django 2016 是 Facebook 机械人元年, 基于地球上最大的短信平台, Facebook 推出了 Messenger 平台, 支持企业构建自己的自动应答系统; 此平台虽然还在 beta 阶段, 但是接入了 十亿 活跃用户,值得折腾…. uvloop: 异常快的 Python 网络 web framework asyncio 是当前 Python 的标准异步 I/O 网络框架. uvloop 则是能完全替代 asyncio 完备的更快的异步事务循环. 基于 libuv 以 Cython 构建; 事实上 uvloop 比 nodejs, gevent 或是其它异步框架快两倍以上. 性能接近 Go 语言实现的. Django 爱好者的 ES6 django The Django community is not one to fall to bitrot. Django supports every new release of Python at an impressive pace. Active Django websites are commonly updated to new releases quickly and we take pride in providing stable, predictable upgrade paths. We should be as adamant about keeping up that pace with our frontends as we are with all the support Django and Python put into the backend. I think I can make the case that ES6 is both a part of that natural forward pace for us, and help you get started upgrading the frontend half of your projects today. Growler web framework 利用通过 PEP 3156 包含在 Python 3.4 内建模块中的 asyncio 库, Growler 作为 web 应用框架, 类似 nodejs 的 express 库, 基于一系列中间件完成 HTTP 请求响应. 也通过中间件的串接完成复杂业务. (是也乎: 何时开始微型 web 框架都和瓶子干上了!? ) Redis 缓存修饰符 code snippet 用 redis 完成的髙水平的函式缓存. 应该聘请那种给力的 Python 开发者? Reddit Discussion I need some advice. I founded a SAAS startup that is doing pretty well. When I was looking to build out my software I found a developer I had worked with in the past and brought him on as a partner in the business. He held an equity stake and built out the backend of our software (restful API and database) all using Python. Front end is also Python based. Django bugfix 版本发布: 1.9.6 + 1.8.13 release Today we’ve issued bugfix releases for the 1.9 and 1.8 release series. Details can be found in the release notes for 1.9.6 and 1.8.13. Python 3 的功能卫士 code snippet 模块实现了功能卫士 - 根据不同的参数将运行时调用重定向到不同的函式上. 表现形式是 @guard 修饰符. 并提供缺省值表达式: _when 用 Python 来预测你更喜欢面条中加 Qdoba 还是 Chipotle. machine learning I’ve had a theory that for every Noodles, there’s a Qdoba that’s right next door. It might be some sort of selection bias however, since I can think of a couple locations where they’re directly next to each other. To me, Noodles and Qdoba have a special relationship, at least compared to other restaurants. I figured now was about the time I should test this, and I can use Chipotle to test. The question is: Which restaurant is more special to Noodles, Qdoba or Chipotle? 随机找到 bit.ly 地址 code snippet 如果有人有足够的计算能力会发生什么? PYCON上提出了澳大利亚教育研讨会的演讲!! community Involved in Australian education, whether formally or informally? Making use of Python in your classes, workshops or other activities? Interested in sharing your efforts with other Australian educators, and with the developers that create the tools you use? Able to get to the Melbourne Convention & Exhibition Centre on Friday August 12th, 2016? Then please consider submitting a proposal to speak at the Python in Australian Education seminar at PyCon Australia 2016! Get on Track w/ JIRA. Sponsor JIRA Software is the #1 software dev tool used by agile teams. Get started for free! 新书 ~ New Books ...

2016-05-06 · 3 min · 1373 words · ZoomQuiet

蠎加载 70

原文: Import Python Weekly Newsletter - Issue No 70 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 有 Python app. 的想法? Sponsor 在 Azure App Service 中创建 Python app. 免费的! 选择对应语言,就可以使用各种常见框架的模板来开始: django/flask/bottle … Python 分类排序 core python 对于 TIOBE 排行榜的其它语言, Python 有点不寻常,其它都有可排序的 字典/集合, 只有 Python 没有, 自称 预置电池 的语言,为毛?! Django 模型中的最佳实践 django 对于 Django 程序猿,非常实用和清晰的检查列表. 优化慢速 Django REST Framework Django Rest Framework DRF 中有个著名的 “N+1选择问题”, 这儿进行了深入的讨论, 但是,并没有什么好的的解决方案.. The Django REST Framework (DRF for short) allows Django developers to build simple yet robust standards-based REST API for their applications. Even seemingly simple, straightforward usage of the Django REST Framework and its nested serializers can kill performance of your API endpoints. At it’s root, the problem is called the “N+1 selects problem”; the database is queried once for data in a table (say, Customers), and then, one or more times per customer inside a loop to get, say, customer.country.Name. Using the Django ORM, this mistake is easy to make. Using DRF, it is hard not to make. select — 高效 I/O 中的等待 — PyMOTW 3 core python 模块选择特定平台 I/O 监察功能. 相当于 POSIX 中的 select(), 适用于 Windows 和 UNIX 平台. 也提供了 poll() , 仅 UNIX 可用. 54集 - Donald Stufft 论 Pip 以及 Python 包管理 podcast 作为 Python 程序猿,每天都在使用 pip 进行各种模块的管理. 但是从来没有详细探寻过为什么/怎么来的?! 这次请到了作者来聊聊,当初的设想… As Python developers we have all used pip to install the different libraries and projects that we need for our work, but have you ever wondered about who works on pip and how the package archive we all know and love is maintained? In this episode we interviewed Donald Stufft who is the primary maintainer of pip and the Python Package Index about how he got involved with the projects, what kind of work is involved, and what is on the roadmap. Give it a listen and then give him a big thank you for all of his hard work! django-river 状态机以及工作流库 Main goal of developing this framework is to be able to edit any workflow item on the fly. This means, all elements in workflow like states, transitions, user authorizations(permission), group authorization are editable. To do this, all data about the workflow item is persisted into DB. Hence, they can be changed without touching the code and re-deploying your application. 构建实时 apps. Sponsor Syncano. Database. Backend. Middleware. Real-time. Support. Start for free! 计算几何在 Python : 从理论到应用 When people think computational geometry, in my experience, they typically think one of two things: Wow, that sounds complicated. Oh yeah, convex hull. In this post, I’d like to shed some light on computational geometry, starting with a brief overview of the subject before moving into some practical advice based on my own experiences polyglot 的多分派手册 - 第三部分 core python 有关多分派系列第三部分. 第一部分介绍了概念以及 C++ 的实现; 第二部分在Python 中完成了部分特性; 这一节, 挖掘其根据 Common Lisp 中的实现, 来探讨 Python 在 OOP 框架中可以进行的. Your Django Story: Meet Margaret Myrick interview Margaret Myrick is a program manager at Indeed, and a musician on the side. She has lived in Texas since she was a child. YodaBot - 开源消息机械人将文本转换为 yoda 演讲 Master Yoda, I am. Left Degobah I have, and come to messenger as a bot. Message me. Reply in my own style, I would. Curator Note - Pretty funny check it out. (是也乎: 特川普之后, 又一个语言风格类工具. ) Python 提示符工具包 core python prompt_toolkit 专注用 Python 构建强力 CLI 工具界面. (是也乎: 嗯哼, 这样一来, GUI 越来越没有什么必要了… ) 雇主拒绝遵守 Python - Reddit Discussion core python Hey guys, Recently, I informed my manager that I was willing to go above-and-beyond and help improve some of our team operations by writing a handful of Python scripts. He is a stickler for following the rules, so he ordered me to ask permission to install Python on my development machine (I wasn’t intending on asking permission). My request has been refused. Despite providing evidence from the Python Foundation on their open licensing (especially for my purposes, which is just local machine – not production), they are still refusing on account that Python is type of GPL and it is interpretative. Have you guys run into something like this before? It seems ridiculous to me. (是也乎: 嗯哼, 可怜的 GPL. ) James Powell - from __past__ import print_statement: 达达主义者拒绝 Python 2 vs 3 video If the title doesn’t make any sense, then there’s no hope that the description will be any better. This talk will be a strange dive into interpreter hacks, the pointlessness of the Python 2 vs 3 debate, and the twisted artistic drive that pushes the speaker to come up with these perversions of the Python language. Prepared to be simultaneously repulsed, intrigued, and completely bored. 有趣,但是完全无聊… 用 Python 分析 Chrome 的浏览历史 从 SQLite 中扒出数据结构, 只需 Python 写个脚本,连接数据库,提取对应数据, 一切就随你折腾了. 在线用 Python 收集情报 Sponsor Learn how to write code to automatically extract and analyze data from the web and social media. Join students from around the world from law enforcement, journalism, information security and more. 新书 ~ New Books ...

2016-05-01 · 4 min · 1767 words · ZoomQuiet