蠎加载 77

原文: Import Python Weekly Newsletter - Issue No 77 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… 让 Django 准备好 django This Blog is meant for the learners who wish to get an understanding of the framework “Django” and familiarize with web development concepts . Good entry level tutorial for Django. (是也乎: 从理解 Django 框架开始的最好的入门教程… ) Webcast: 和 Python 一起作数学题 webcast Join Amit Saha, author of Doing Math with Python, in this hands-on webcast, and learn how to use Python to solve calculus problems, make sense of numbers with graphs and statistics, do symbolic math with SymPy, and perform basic machine-learning tasks. (是也乎: Doing Math with Python 是新书, «««< HEAD 介绍了一系列数学相关的库,最后也引向了机器学习的命题. ======= 介绍了一系列数学相关的库,最后也引向了机械学习的命题. 05621f3c407be189efd9a1a68f20a4d5923eea9d ) ...

2016-06-16 · 3 min · 1455 words · ZoomQuiet

蠎加载 76

原文: Import Python Weekly Newsletter - Issue No 76 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Q&A: Guido van Rossum 有关 Python 未来策划 interview Python 创始者/仁义的暴君 Guido 老爹的采访 (是也乎: 老爹每年的公开分享, 都是 Python 的宏观规划,必须理解,在理解中理解… 简单的说:加紧 mobile 和 browser 的浸入,只是当前没有明确的好招; PyPy 很可用了, 但是 Py3 的目标也包含性能的;Py 的整体生态的是好的,没问题的. ) Python: 正则表达式介绍 core python Regular expressions are basically a tiny language all their own that you can use inside of Python and many other programming languages. You will often hear regular expressions referred to as “regex”, “regexp” or just “RE”. Some languages, such as Perl and Ruby, actually support regular expression syntax directly in the language itself. Python only supports them via a library that you need to import. The primary use for regular expressions is matching strings. You create the string matching rules using a regular expression and then you apply it to a string to see if there are any matches. (是也乎: 正则表达式几乎是一种独立语言了, 在 Py 中当然也能简洁的用起来. ) Python lambda 表达式的爆发 functional programming Lambda expressions provide a way to pass functionality into a function. Sadly, Python puts two annoying restrictions on lambda expressions. First, lambdas can only contain an expression, not statements. Second, lambdas can’t be serialized to disk. This blog shows how we can work around these restrictions and unleash the full power of lambdas. (是也乎: 如何在 Py 中真正引爆 Lambada 的能量? 用 dill 来替代 pickle! ANACONDA 内置实用序列化模块… ) 在 Python 折腾点集群 machine learning By definition, clustering is a task of grouping a set of objects in a way that objects in a particular group are more similar to each other rather than the objects in the other groups. It has multiple applications in almost every field. You can even segment your customers into different groups based on their purchase patterns. This is a Python script demonstrating the basic clustering algorithm, “k-means”. Also, it will plot the clusters using Plotly API. It uses sample data points for now, but you can easily feed in your dataset. (是也乎: 正热门的数据科学又一实例,“k-means” 完成聚类, 用 Plotly 接口进行可视化 ) Flask 规模化 flask If you are a flask user. You would greatly benefit by this pretty exhaustive (information wise) talk. Do you think that because Flask is a micro-framework, it must only be good for small, toy-like web applications? Well, not at all! In this tutorial I am going to show you a few patterns and best practices that can take your Flask application to the next level. (是也乎: 作为微型框架 flask 也可以提供大规模服务! PS: 同理 Bottle 也是可以的… ) 见 Python, 遇 Python Go, Go Python Go Today we’re going to make a Python library that is actually the Go webserver, for which we can write handlers in Python. It makes Python servers really fast, and—more importantly—it’s a bit fun and experimental. Andrey Petrov is the author of urllib3. If you have coded in Go you would realize this is pretty cool idea. (是也乎: 人生苦短, Python 当歌 !-) 从头创建 Python 框架 - Code walkthrough web framework You’re curious how web frameworks work because you want to become a better web developer. This post aims to describe what I learned by writing a small server and framework by explaining the design and implementation process step by step, function by function. (是也乎: 源发自 的框架实例… ) 5个值得爱上的 Django 包 — Medium django Lots of packages get a lot of love like django-rest-framework and wagtail, and rightfully so, they’re awesome! But I wanted to give some less well know ones some love. Pycon India CFP 来也 pycon PyCon India, the premier conference in India on using and developing the Python programming language is conducted annually by the Python developer community. It attracts the best Python programmers across the country and abroad. Submit your proposal here. 用装饰器维护 Python 硬盘缓存 code snippet Caches are important in helping to solve time complexity issues, and ensure that we don’t run a time-consuming program twice. You never know when your scripts can just stop abruptly, and then you lose all the information in your cache, and you have you run everything all over again.In order to counter this, saving your cache to a disk is something that can be very helpful in that it allows state to be saved to disk, and be retrieved from it anytime as long as its there. (是也乎: 保卫我们的运行时数据,用 修饰符, 随时导出到硬盘! ) 用 Python 从头实现神经网络 machine learning In this post we will implement a simple 3-layer neural network from scratch. We won’t derive all the math that’s required, but I will try to give an intuitive explanation of what we are doing. I will also point to resources for you read up on the details. Here I’m assuming that you are familiar with basic Calculus and Machine Learning concepts, e.g. you know what classification and regularization is. But even if you’re not familiar with any of the above this post could still turn out to be interesting ;) 用纸和 Python 实现的 Enigma 机 crytography It turns out my kids have been sending each other secret messages, enciphered with a substitution cipher of their own invention! They only let me see the secret key when I agreed to help them mix up a very complicated recipe for invisible ink. (是也乎: 二战中最强大的德军密码机,现在用纸+脚本就可以完美复刻. ) Python 类属性 core python I had a programming interview recently, a phone-screen in which we used a collaborative text editor. I was asked to implement a certain API, and chose to do so in Python. Abstracting away the problem statement, let’s say I needed a class whose instances stored some data and some other_data. As it turns out, we were both wrong. The real answer lay in understanding the distinction between class and instance attributes. (是也乎: 是的,虽然是 Python 的基础功能,但是,很少人用对味儿. ) 活动 ~ Upcoming Conference / User Group Meet ...

2016-06-10 · 5 min · 2017 words · ZoomQuiet

蠎加载 75

原文: Import Python Weekly Newsletter - Issue No 75 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Pycon US 2016 视频和演讲幻灯 pycon, video PyCon is the largest annual gathering for the community using and developing the open-source Python programming language. PyCon is organised by the Python community for the community. Currently underway in Portland and will conclude on 5th June. The talks from the conference are getting uploaded as we speak. You should glance the videos by title and see which one you like. Speaker’s slides will be published here soon https://speakerdeck.com/pycon2016 (是也乎: PyCon15US 的相关兴趣议题的视频30+G 在硬盘中还没有看过一遍, 又来一大波…虽然发布在不存在的网站中…感觉世界总是在持续的碾压着自己… 必须首先复习: Guido van Rossum - Python Language - PyCon 2016 明确 Py2 何时正式放弃… 应该去大学, 碾压一下当下心态良好的小白们了… ) PyCon 2016: Machete-mode 调试 来自 Ned Batchelder - coverage.py 创造者 pycon, debugging Python is simpler and more fluid than other languages. Sometimes you want this fluidity, but usually you don’t. Dynamic typing means that names may have values you don’t expect. Where other languages offer access control over the internals of objects, Python lets you examine and change anything. All of your program’s data is on the heap, and can be used throughout your program. All of this flexibility can be a powerful tool, but sometimes, things go wrong. The flexibility comes back to bite us, and causes problems that we have to debug. (是也乎: Python 是如此简洁又灵活,以致有时爱到不行,有时又恨到不行, 特别是在调试时… ) 关注 Pycon 议题在 twitter #pycon2016 pyconus, twitter Takes you to the top tweets on pycon. Python & Django 安全在 Shoestring: 资源 django, security Callisto is an online reporting system. It’s written in Django and provides a more empowering, transparent, and confidential reporting experience for survivors. It’s absolutely essential that we keep our users’ data secure Thankfully, although the infosec community can sometimes be intimidating, any one of us can learn how to build secure sites using Python. This talk covers the essential concepts behind securing your users’ data and offer examples of how we applied them to Callisto. (是也乎: 大圣们曰过:“计算机系统无非两种结局,简单的看不出明显的错误,复杂的没有明显的错误;-(” ) Oneliner-izer:约束编码练习 by Chelsea Voss pyconus Curator’s note - In every office you have that one guy who tries to accomplish a whole lot of things on one line. This is a talk that you want to show them. Ideas and implementation behind Oneliner-izer, a ““compiler”” which can convert most Python 2 programs into one line of code. As we discuss how to construct each language feature within this unorthodox constraint, we’ll explore the boundaries of what Python permits and encounter some gems of functional programming – lambda calculus, continuations, and the Y combinator. (是也乎: 又一基础轮子的再造练习,涉及一些函式语言的精华: 演算/连续/Y组合… ) pep8 再次重命名为 “pycodestyle” code quality Simple Python style checker in one Python file. Good bye PEP8 :) (是也乎: 名字起的好,项目活的了, 创始胡子长,项目久的了…. 对于 EPE8 这么经典的名称的放弃,也是老拥趸弃疗的开始… ) Python 201: importlib 简介 core python Python 将 importlib 作为内建模块包含在发行版本中, 目的就是提供导入语句 (函式 __import__()). 从而赋予程序猿在导入过程中使用自定对象的能力, (类似 importer) (是也乎: 米国大学课程编号,101一般都是入门课,201就是中级课了… ) JSON 格式日志 (Python) code snippet I have created a package that outputs JSON formatted lines to a log file. It can make use of the standard logging parameters and/or take custom input. The use of JSON in the log file allows for easy filtering and processing. Episode 59 - Pillow 和 Alex Clark podcast If you need to work with images the Pillow is the library to use. The Python Image Libary (PIL) has long been the gold standard for resizing, analyzing, and processing pictures in Python. Pillow is the modern fork that is bringing the PIL into the future so that we can all continue to use it moving forward. This week I spoke with Alex Clark about what first led him to fork the project and his experience maintaining it, including the migration to Python 3. (是也乎: 对 PIL 的历史接替人: Pillow 的创造者的访谈.. ) “通过实例学习 Python 2 标准库” #PyCon2016 期间超5折优惠! The Python Standard Library by Example (for Python 2) is the eBook deal of the day during PyCon 2016. Visit theinformit.com/deals to order your DRM-free copy (PDF, ePub, andMobi) for $19.99 today! *Offer ends 11:59 PST June 1, 2016 Django Community Jobs Section | Django job market In case you weren’t aware, django website has a job section. Django REST 框架已经接受追加基金 community If you use REST framework commercially we strongly encourage you to invest in its continued development by signing up for a paid plan. Tom Christie the creator of DRF is looking to raise funds and work on it full time. Support him. Jessica mckellar 为 PyCon 带来更多的程序媛. pyconus As many of you know we have been featuring interview of django girls from a long time now. It’s very important to encourage and aid women participation. Python and Django community is at the forefront. (是也乎: 所谓一妞扺十汉 海外技术社区也异常认同, 特别是 DjangoGirls 如此成功,以至 老爹也主动开始站台推荐了… ) 活动 ~ Upcoming Conference / User Group Meet ...

2016-06-04 · 4 min · 1879 words · ZoomQuiet

蠎加载 74

原文: Import Python Weekly Newsletter - Issue No 74 欢迎, 来 PyChina/weekly 共同翻译/增订/推荐 周刊 蠎消息 ;-) 该读 ~ 文章, Blog, 教程… Python 程序猿 2016年调查: 结果 community 我们想知道当今 Python 程序猿的真实生存状态, 在调查了 1000+ Python 程序猿后,得到一些有趣的结论, 在此分享大家; (是也乎: 简单的说:独自折腾的少,作为主语言和 JS 总是基在一起, 今年 Py 2 和 3 将战平, 框架中的 IPython/Falsk/numpy等科学计算框架, 在高速追上 Django; Debug 工具依然没有性能评估工具来的认同多,,,, 嗯哼,当然调查是 JETBRAINS 发起的… ) GitHub - SykoTheKiD/DockerDjangoRest: 有Travis CI 支持的 Django REST 接口 Docker镜像 docker A Docker setup for a Django REST API with Travis CI support. Includes Python 2.X and Python 3.X, PostgreSQL, Unicorn ,Nginx, Travis CI Integration. 如何在 Ubuntu 16.04 上用 uWSGI+NGINX 发布 Django 应用服务? | DigitalOcean django In this guide, we will demonstrate how to install and configure some components on Ubuntu 16.04 to support and serve Django applications. We will configure the uWSGI application container server to interface with our applications. We will then set up Nginx to reverse proxy to uWSGI, giving us access to its security and performance features to serve our apps. (是也乎: 所有 VIP 厂商中 DigitalOcean 的文章总是清晰又专注, 而且可以直接使用. ) Django Channels 作为后台任务 django This little tutorial is what you need to add a background task processor to Django using channels. Our task for this example will just be outputting “Hello, Channels!”, but you could image running a subprocess on some data or sending an email. Python 101: 基准代码简介 benchmark The main idea behind benchmarking or profiling is to figure out how fast your code executes and where the bottlenecks are. The main reason to do this sort of thing is for optimization. You will run into situations where you need your code to run faster because your business needs have changed. When this happens, you will need to figure out what parts of your code are slowing it down. This article will cover how to profile your code. 用 jxmlease 在 XML 和自然 Python 数据结构间转换 core python, xml One of the important realizations we made was that Python objects also have metadata. So, we can represent the XML data as normal Python objects, but store the XML metadata as metadata in the resulting Python objects. Using jxmlease, you can easily convert XML data to Python data structures. Here, the ‘xml’ variable contains the XML document shown in Example 2 (below). You convert it to Python data objects and print it. (是也乎: 嗯哼?! XML,现在还有什么场景一定要 XML 的!? ) Python 插件管理器: Stevedore 和 Pike 如果折腾过 OpenStack, 那么一定不得不折腾插件管理器: stevedore; 现在介绍另一个值得折腾的: pike Python 软件基金会新闻: Brett Cannon 赢得 Frank Willison Award core python This morning at OSCON, O’Reilly Media gave Brett Cannon the Frank Willison Memorial Award. The award recognises Cannon’s contributions to CPython as a core developer and project manager for over a decade. Kel — 用Python 和 Go 构建的基于 Kubernetes 的开源 PaaS Kel™ is an open-source Platform as a Service (PaaS) from Eldarion® that makes it easy to manage web application deployment and hosting through the entire software lifecycle. Kel helps DevOps professionals manage their application infrastructure through a layer of tools and components that make Kubernetes accessible and easier to use. Kel builds on Eldarion’s 7+ years experience running Gondor, one of the leading Python / Django PaaS solutions. 探索美国交通事故数据 data science At a ChiPy event, Nick Bennett gave an excellent talk on traffic fatalities and how he attempts to visualize the publicly available data. The accompanying GitHub repo shows how he accessed and manipulated some of that data with Python tools and then used a couple of different web mapping services to visualize it. The talk prompted some informative comments from the audience and inspired me to further analyze the data myself. bisect — 用 Orderr 保持列表排序 core python The bisect module implements an algorithm for inserting elements into a list while maintaining the list in sorted order. 活动 ~ Upcoming Conference / User Group Meet ...

2016-05-28 · 3 min · 1266 words · ZoomQuiet