蠎加载 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

蠎加载 69

原文: Import Python Weekly Newsletter - Issue No 69 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 学习用 Python 收集在线情报 Sponsor 通过代码自动追踪/提取/分析 网络和SNS 的数据. 倡议 法律/新闻/信息安全 以及其它有兴趣的专业学生加入 仅用三种特征就能基于名字确定性别精度达 80% machine learning 推荐这一简单的项目, 通过机械学习通过姓名来猜测性别! 经过摸索,发现仅仅需要关注三个特征,就能达到 80% 的精度! 作者自认不是 机器学习领域 专家, 大家有意见敬请吐糟. (是也乎: 源代码: NameGenderClassification/Gender Classification of Names.ipynb at master · ayoungprogrammer/NameGenderClassification 对的,一位华人小哥, 当然,不是天朝的… ) 潜入 OOPy core python 面向对象编程的幻灯. (是也乎: 细思恐极~果断发布在 不存在的 speakerdeck 中 167页的良心分享! 同作者另外一篇幻灯也必须推荐: Abstract Base Classes // Speaker Deck ) Hello World - 机器学习食谱 #1 video 首个机器学习案例只要6行! 这一集介绍什么是机械学习,以及为毛这么重要. 嗯哼,跟随代码来体验吧. (是也乎: 细思恐极~ 来自不存在的公司收购的不存在的视频分享平台上的频道: Google Developers 然! 猜对了, AlphaGo 团队的工程师亲自录制的教学录像! ) Admino 作为 Django 的模块提供 REST API 给管理终端. django 通过她, 终于可以自在的制造自己的管理面板了. 来注册成为 PyCon 2016 志愿者! pycon PyCon 志愿者的自豪是有传统的… is proud to be part of the long tradition of events that take place because the attendees themselves care and are willing to put forward hours of volunteer work to ensure that new arrivals are greeted at the registration desk, that speakers are guided to and from their session rooms, and — yes — that swag bags are all properly stuffed. Python Tensorflow 教程 machine learning 用 Tensorflow 完成的流行机器学习算法安全带. 目的是引导大家轻松的进入 Tensorflow. 必然的,都有 ipynb 版本, 可以下载到本地交互. Jaspy – 用 JS 实现的 Python VM Jaspy 是用 JS 完全从头完成的 Python VM. 支持多线程,并内置调试器可以远程调试, 并提供灵活的预处理架构. 速度并不是项目的主要目标. 旨在探索客户端 web 编程的全新可能性. (是也乎: 来自仙书 “500 Lines or Less | A Python Interpreter Written in Python” 中的案例 ) 海盗用 Flask, 海军用 Django · WakaTime django, flask 如果想测试/验证想法或是新产品. 就必须选择一个网络协议桟来构建. 对于 Pythonista Flask 和 Django 是两个最流行的 web 应用框架. 笔者的经验是选对了幸福一生! 为此专门创建了对比表格来帮助大家决策. (是也乎: 同时发布了决策桟,回答几个关键问题后自动给出最佳选择! Django vs Flask Worksheet · WakaTime ) EuroPython 2016: 日程发布 pycon 非常高兴的宣布 EuroPython 2016 将在 Bilbao 举行! 包含 180+ 分享, 150+ 讲者, 一天研讨, 5天大会/培训/主题分享/闪电演讲 以及 开方空间. 然后是2天的 sprints. EuroPython will be one of the most exciting and vibrant Python events this year. Susi 在哪儿? 空降猩猩追踪器 Python + React.js 一年前,折腾无人机时,提交了以下问题: 是否能用无人机在婆罗洲丛林上自动搜索猩猩身上的标签? 面对几千公顿的热带雨林,你需要追踪越来越多的猩猩. 怎么办!? SnipLime sublime 为 Sublime Text 收集的各种设计模式/惯用/片段. LRU 字典 (Python) code snippet 简单的 LRU 字典实现, by maximum capacity and by maximum time not being used. Django Cheat Sheet (Templateless) django 专注 Django 的 RESTful 应用. 包含了常用命令,配置,视图(即 控制器),模型, 如何通过 Django 查询信息. 免费在 Openshift 部署 Django 应用 django 是的免费! (是也乎: 不过,是否存在,不保证… ) 采访 Justin Seitz interview 灰帽子和黑帽子 Python 的作者! Justin is the principal consultant for Dark River Systems Inc. where he spends his time blogging, and training open source intelligence techniques using Python. He is the author of two books Gray Hat Python and Black Hat Python. calendar — 和日期工作 — 每月一模块系列 The calendar module implements classes for working with dates to manage year/month/week oriented values. 用 Python 创建 slack bot - part 1 bot 第一部分, 创建机器人来发送和接收简单的信息. 有很多现成可用的模块, 比如 python-rtmbot / slackbot, 不过,先使用基本的官方 API. 新书 ~ New Books ...

2016-04-21 · 4 min · 1792 words · ZoomQuiet

蠎加载 68

原文: Import Python Weekly Newsletter - Issue No 68 该读 ~ 文章, Blog, 教程… 有个 app 的念头? Sponsor Create a new app, free with Azure App Service, now. (是也乎: 可见 M$ 是有诚意的,只是一切必须透过 VS … 而且中国区指定世纪互联代理…呵呵… ) 基于 Falsk 创建可扩展/可容错的 REST 端服务 flask 展示如何用命令行工具,部署 Falsk 和 AngularJS 结合的应用到 IBM Bluemix® . 教程中, 选择了不同 Django, Pyramid, 或是 web2py 的框架, Flask, 因为更加小巧. 如果嘦一个 REST 接口服务,更加合用. 并展示了 REST 端服务如何在不同功能中进行多路复用. 15 则 Python 面试基本问题 interview 想获得 Python 职位? 首先得证明能用 Python 完成工作. 这里给出了一系列涵盖了 Python 语言相关的基础技能/问题. 只专注语言本身,没有涉及包/框架. 每个问题都有对应的教程, 希望得的上. Ruby vs. Python podcast Toptal 特别约专家 Damir Zekic 和 Amar Sahinovic, 来讨论这两个知名脚本语言的特性. 收听节目,还能投票反馈你的见解. (是也乎: PHP是最好的语言! ) 用 Django 创建公司前最希望知道的 11 件事儿: Computer Science, Math, and Statistics. 两年前创办了 Math & Pencil. 之前对 web 开发的经验基本为 0. 为了公司, 从头学习了HTTP, Javascript, AJAX, 以及 Django MVC. 虽然急促,但是技术桟是成熟的. 基于 D3.js, Backbone.js, Celery, Mongo, Redis, 等等一堆其它东西, 完成了数据科学相关的应用! 回顾写下来的代码, 认为这几件事儿,必须事先明确了. Christine Doig 写的 Data Science 漫游指南 data science 又一则 Hitchhickers Guide Slidedeck that shows tools needed to be productive as a data scientist. 将 Ember 和 Django 搞在一起: 待办应用演练 tutorial 教程包含 Django 的 JSON 接口服务,完成 CRUD 支持; 用 token 完成安全认证. 用 Watson TextToSpeech 创建语言警报和通知 IBM Watson 是自然语言处理和机器学习平台. 能从海量非结构数据挖掘出规律. 通过 Python 接口,可以快速完成 报警和通知系统. (是也乎: 目测不通中文.. ) 在 Azure 中构建 Django 应用 django, azure You will create an application using the Django web framework. You will create an application using the Django web framework (see alternate versions of this tutorial for Flask and Bottle). You will create the web app from the Azure Marketplace, set up Git deployment, and clone the repository locally. Then you will run the application locally, make changes, commit and push them to Azure. The tutorial shows how to do this from Windows or Mac/Linux. Curator Note - Our sponsor Azure is offering free $200 to use on Azure for Linux projects. Check it out.- http://goo.gl/fd17H9 简化 Segment 分析 Sponsor Segment 是可定制的数据平台, 开发者和分析师通过优雅的 API 同广泛的合作伙伴形成了兴盛的生态. 兼容 Python3 的关键字唯一参数传真修饰. code snippet Provides a very simple decorator (~40 lines of code) that can turn some or all of your default arguments into keyword-only arguments. You select one of your default arguments by name and the decorator turn this argument along with all default arguments on its right side into keyword only arguments. 和 NGINX 最大化 Python 性能, 第一部分 : Web 服务和缓存 nginx 所有人都希望自家网站和应用运行的更快. 可惜越来越多的流量以及冲击,总能引发宕机问题. 时常进入忙-崩-忙 的循环. 而且杯具的是,几乎所有崩溃问题都发生在业务增长的关键时刻. 这时就是 NGINX 大显身手的时刻了…. 依赖性注入在 Bottle/Flask 在一个 OOP 方式构成的系统中, 通常有两种类型的对象: 数据对象(存储数据) 和服务对象(操作数据). 例如, 有数据库在后端时,必然有服务对象和数据库进行交互… 深入 PyCharm 中的测试 pycharm 仅仅4分钟的视频中, 展示了 PyCharm 运行原生 pytest , 通过最近追加的 tox 支持,管理文档测试安全带, 并能理解本地配置… 甚至是用母语来表述的测试…. Python 3.6 的新特性 core python This article explains the new features in Python 3.6, compared to 3.5. 第52集 - Hypothesis 和 David MacIver podcast Writing tests is important for the stability of our projects and our confidence when making changes. One issue that we must all contend with when crafting these tests is whether or not we are properly exercising all of the edge cases. Property based testing is a method that attempts to find all of those edge cases by generating randomized inputs to your functions until a failing combination is found. This approach has been popularized by libraries such as Quickcheck in Haskell, but now Python has an offering in this space in the form of Hypothesis. 数据分析基础 II - 朴素贝叶斯网络 去年的文章中介绍了能简化复杂的概率计算的模型: 朴素贝叶斯. 在电子商务领域, 给用户的推广框功能,能预测用户最想买的商品. 实际应用中的效果不错. 这其实就是基于改进的 朴素贝叶斯网络 模型. 如何构建 Heroku 插件 Butter CMS 能协助我们快速构建/测试/发布 Heroku 插件. 针对年轻程序的教程开放注册了! pycon, community The Young Coders 工作坊, 通过游戏探索 Python 编程. 从基础的数据类型开始,快速体验基本语句, 然后就可以基于 pygame 的图书馆游戏结合构建自己的游戏了! 这次 PyCon 专门为儿童设立的全天教程活动! 推荐注册体验! 新书 ~ New Books ...

2016-04-14 · 4 min · 1976 words · ZoomQuiet

蠎加载 67

原文: Import Python Weekly Newsletter - Issue No 67 该读 ~ 文章, Blog, 教程… 和 Slack 一起更好的工作 Sponsor Slack 能将团队的所有消息聚集在一起的工具. 更少邮件/会议,嗯哼,作的更好. (是也乎: 其实,好象并不怎么得力… ) 应该如何准备 Python 面试 ? - Reddit Discussion. interview 自学编程,两年前开始用 Django, Bootstrap, Python, Javascript. 刚刚通知有个 Python 工程师的职位, 那么应该如何准备? 面向 Python 程序猿的 函式编程 介绍 core python 文章为已有 Python 编程经验的,给出了 函式编程 的介绍. Python 在 JavaScript | 特性! PyCharm 远程调试. pycharm 新功能展示 gif 动画, PyCharm 全桟用户应该看看 Python 3 中的类型比较 core python 如果在折腾 元编程, 一定发现需要一个类型排序. 不是对象,而是类型. 之前 Python2 的同类文章非常受欢迎, Eli Bendersky 又写出了面向 Python 3 的. Apache Kafka 生产者基线 - Java vs Jython vs Python benchmark 文章中,针对 Java, Jython 和 Python 进行了基线评测. 51 集 - Pyjion 和 Dino Viehland 以及 Brett Cannon podcast 为了提高 CPython 的性能, Dino Viehland 在暂定在 JIT 上进行改进. 他的公司 M$ , 决定赞助这一想法. 于是就有了 Pyjion 项目. 这集中,采访了核心成员,讨论了最新进展,以及一路上的困难. 当然,也跑题讨论了, 为什么 GIL 创造出来前,并没有想到这么可怕? 构建实时 apps Sponsor Syncano. Database. Backend. Middleware. Real-time. Support. Start for free! 用 Feather 进行数据标准化 pandas The 162 game marathon MLB season is officially underway. In honor of the opening of another season of America’s Pasttime I was working on a post that uses data from the MLB. What I realized was that as I was writing the post, I found that I kept struggling with inconsistent data across different seasons. It was really annoying and finally it hit me: This is what I should be writing about! Why not just dedicate an entire post to normalizing data! 如何扩展 Django: 超越基础 | DigitalOcean django 文章包含以下内容: 缓存技术, 包括用 Varnish 高速缓存整个儿网站, 或视图基础上进行缓存控制. 静态文件传送给 CDN 而不是 Django. 如何用 uWSGI 从网络服务器上运行 Django 来提高恬静. 最后,可以了解到如何尽可能多的分配内存给 应用程序. Python-lambda: 10分钟以内完成第一个 Python 的 Lambda 微应用 aws AWS Lambda 是种支持 Python/Jana/Node.js 的无主机应用发布平台. 只有在有请求时才真正运行的应用. 编写 Lambda 应用比较简单, 但是,绑定和部署没那么简单. Python-lambda 就是专门简化这方面麻烦的工具! 8 皇后问题 Raymond Hettinger 将之前的方案,升级为 Python 3. Channels 的 Docker 实例 django 在 Budapest 举行的 DjangoCon Europe 2016 中 sprints 项目之一, Andrew Godwin 的 Channels 框架很可能进入 Django 1.10 版本特性. 现在需要一个稳定的 WebSocket 方案, 其中基于 docker-compose 的很不错.上周宣布 Big Data Wrangling 和 Python Course 作者 Katharine Jarmul (Data Wrangling with Python) 将发布为期两天的课程, 包含数据采集和管理, 使用 Pandas 进行数据分析, 以及使用类似 Hadoop 和 PySpark 进行集成, 地点在 NY. 如何在 Python 和 Django 中用 Elasticsearch, 第4部分 -创建前端 这是最后一集, 讨论如何在前端增加功能项,包含查询/索引/更新… In the previous posts in this series ( shared in the previous issue of the newsletter ) we created a basic Django app and populated a database with automatically generated data. We also added data to the elasticsearch index in bulk, wrote a basic command, and added a mapping to the elasticsearch index. In this final article we will add functional frontend items, write queries, allow the index to update, and discuss a bonus tip. Airbnb 开源 Caravel, 基于 Python/Javascript 的数据探索/可视化平台! Caravel is a data exploration platform designed to be visual, intuitive and interactive. (是也乎: 类似 AJAX, Airbnb 组合现有的优秀框架,变成了一个任性的大数据通用分享平台! 后端:Flask+Pandas+SqlAlchemy; 前端: react+d3.js+nvd3.org 唯一原创的是 Druid ~ 近线通用数据存储. 异常活跃,已经有近千 Issue 了… ) rochacbruno/dynaconf: 为 Python 动态加载配置 dynaconf 是 OSM(对象设置映射器), 可以读取从不同的数据源, 比如 配置文件/环境变量/redis/memcached/ini文件/json文件/yaml文件, 甚至于可以自定义格式. (别说要从 xml 读取!) (是也乎: 非常需要,但是,看起来还不成就. 其实,最关键的是如何动态加载/更新 ) smarturls django smarturls 内置正则表达式模式库, 来轻松为 Django 构建路径表. 作者 Amit 是早期 Django 用户之一. 另外还有作品: importd (是也乎: 胡子不够哪… ) 新书 ~ New Books NULL ...

2016-04-07 · 5 min · 2045 words · ZoomQuiet