How To Deploy your Flask Application On Offline Servers
Recently, we had to migrate our 22 Flask micro-services to new servers. As automatic deployment was implemented for all of these, we thought it would be done in a glimpse. What a surprise when we...
View ArticleGit Workflow with Django
Git is the most popular version control software right now, and will be for a long time. The git workflow is branch based. What that means, is that you can experimenting with ideas, by open up a new...
View Article配置 fabric 穿越跳板机
在转这篇文章的时候,我觉得 很懒,所以我几乎没有排版就直接ctrl+c,ctrl+v就过来了 下面是正文,链接来源是:https://mozillazg.com/2013/12/python-fabric-gateway.html 说实话,跳板机给研发的日常工作添加了些许麻烦。 幸好 fabric 提供了穿越跳板机的功能,使跳板机不再影响我们的工作。 Python代码 $fab--version...
View ArticlePython 性能分析工具简介
性能分析和调优工具简介 总会遇到一个时候你会想提高程序执行效率,想看看哪部分耗时长成为瓶颈,想知道程序运行时内存和CPU使用情况。这时候你会需要一些方法对程序进行性能分析和调优。 By Context Manager 可以上下文管理器自己实现一个计时器, 参见之前的介绍 timeit 文章里做的那样,通过定义类的 __enter__ 和 __exit__ 方法来实现对管理的函数计时, 类似如: #...
View ArticleLessons From Using Org as an Init File
Over at the Emacs reddit, tiktaaliki asks how he can put his init.el file in Org format . As it turns out, I learned some really useful things from the post. First off, the easy answer to that...
View ArticleDjango | 反向关系添加对象:多对一
在关联的模型中,比如多对一或者多对多这些类型,在某些场景下,比如简单快速为特定用户添加标签,为了快速添加对象,会使用反向添加,这里简单描述多对一场景下 django 1.10.3 1 非自定义模型主键 1.1 模型示例 @python_2_unicode_compatible class Author(models.Model): name =...
View ArticleUsing Python UDF to Aggregate Data in Apache Pig
Apache Pig allows you to use the GROUP statement to combine data by a key, and unlike SQL you do not need to apply an aggregation function like SUM, MAX, MIX to return just a single row for each group....
View ArticleMaster Python Programming for just $29
Learning to program with python is not exactly the easiest process out there, but it is something that developers will have to conquer. Whether you are currently a programmer / developer or are looking...
View Article通俗 Python 设计模式 : 通俗 Python 设计模式――工厂模式
今天讲一下最简单常用的 工厂模式 。 工厂模式 ,从名字上来讲就已经说明了它的本质――像工厂一样,根据得到的材料构造需要的产品。但是根据书上的介绍 工厂模式 通常有 两种形式 :一种 工厂方法 ,一种是 抽象工厂 。我们分别来讲述一下 工厂模式 的这两种形式。 通俗的解释 工厂方法 就是是:给出固定的接口,根据你的输入,会得到与输入相对应的输出。也许这个说法还是不够通俗,那么我们来看一个例子。...
View ArticleAsync Through the Looking Glass
Async Through the LookingGlass Adventures in pythonLand A lot of talk has been happening in the python community about asyncio. Asynchronous programming is the new hot thing in python. Inmy last post...
View ArticleLennart Regebro: PyCharm (vs WingIDE, kinda)
I’ve been thinking of checking out PyCharm for a while, and the fact that the amazing Paul Everitt works for them now finally triggered me into doing it. This is some random notes. PyCharm by default...
View Article互联网数据分析能力如何养成?这是一份七周的提纲
互联网数据分析能力如何养成?这是一份七周的提纲 2016.11.16来源:雷锋网 导语:不论对数据分析或数据运营,我都希望它是一篇足够好的教材。 写这个系列,是希望在当初知乎某一个回答的基础上,单独完善出针对互联网产品和运营们的教程。不论对数据分析或数据运营,我都希望它是一篇足够好的教材。更准确地说,这是一份七周的互联网数据分析能力养成提纲。...
View Article如何将友言的评论导入多说
无法将友言评论备份或者迁移的朋友们有福了,我先前也和大家一样苦恼评论数据的丢失,最近终于将友言的评论数据迁移到了多说,接下来我和大家分享一下我是如何做到的。 背景...
View ArticleAnalysis of a Python performance issue
I am working on the Cpython benchmark suite ( performance ) and I run the benchmark suite to upload results to speed.python.org . While analying results, I noticed a temporary peak on the call_method...
View ArticlePython使用HTTP2实现苹果原生推送
说起苹果的推送,可能很多开发人员就开始头疼了,因为实现苹果推送服务是1个比较蛋疼的事情,于是便引入了第3方推送平台,比如极光、信鸽之类的服务。 由于苹果原生APNs蛋疼的协议,致使本来很简单的1个推送服务让人望而却步。直到苹果最近的HTTP2协议的出现才有所改善。...
View ArticleIteration in one language, then all theothers
Youmay have noticed that I like comparing features across different languages. I hope you like it too, because I’m doing itagain. I’m most familiar with python, and iteration is one of its major...
View Article如何在暗网中收集公开情报资源(下)
如何在暗网中收集公开情报资源(下) 一点号编程派2016.11.10 (一)、前情提要 在上集文章中,我们为OnionScan创建了一个自定义的封装器。在此,我们不得不感谢Sarah Jamie Lewis(@ sarajamielewis)所作出的努力,感谢他为我们开发出了这样一款非常经典的工具。...
View ArticlePython 与 Javascript 之比较
python 与 javascript 之比较 一点号编程派昨天 本文比较了Python和Javascript在概念,语法,类型等方面的差异。 作者:Naughty。原文链接: 本文总共 8659 字符,读完大约需要 18 分钟。...
View Article