Testing dates in Django
Django makes unit & functional testing easy (especially with WebTest). Tests on routing, permissions, database updates and emails are all straightforward to implement but how do you test dates...
View Article第一章 Python 基础知识
1.1 介绍 1.1.1 特点 python是一种面向对象、解释型计算机程序设计语言。语法简洁清晰,强制用空白符作为语句缩进。 Python具有丰富和强大的库,又被称为胶水语言。能把其他语言(主要C/C++)写的模块很轻松的结合在一起。 1.1.2 应用领域...
View ArticlePython数据分析之pandas学习(二)
有关pandas模块的学习与应用主要介绍以下8个部分: 1、数据结构简介:DataFrame和Series 2、数据索引index 3、利用pandas查询数据 4、利用pandas的DataFrames进行统计分析 5、利用pandas实现SQL操作 6、利用pandas进行缺失值的处理 7、利用pandas实现Excel的数据透视表功能 8、多层索引的使用 我们在...
View ArticlePyAutoGUI-python版的autoit/AHK
文本简单介绍各个图形界面自动操作的python库,类似按键精灵\autoit\ahk(autohotkey)等等这些自动化工具。 ============================================================ 第一推荐的库: PyAutoGUI 跨平台 PyAutoGUI 在windows下无依赖,只要执行命令pip install PyAutoGUI...
View Articlepython之最强王者(6)――列表(List)
1.python 列表 (List) 序列是 Python 中最基本的数据结构。序列中的每个元素都分配一个数字 - 它的位置,或索引,第一个索引是 0 ,第二个索引是 1 ,依此类推。 Python 有 6 个序列的内置类型,但最常见的是列表和元组。 序列都可以进行的操作包括索引,切片,加,乘,检查成员。 此外, Python 已经内置确定序列的长度以及确定最大和最小的元素的方法。 列表是最常用的...
View Article【Flask 系列】一个最简单的应用
我们在前面已经看到了一个简单的 Hello World 的例子,相信你已经成功地把它跑起来了,下面我们对这个程序进行讲解。回顾一下这个程序: $ cat hello.pyfrom flask import Flaskapp = Flask(__name__)@app.route("/")def hello(): return "Hello World!"if __name__ ==...
View Article教你阅读Python开源项目代码
注:本专栏文章未经允许请勿转载。 知乎上有不少人问和关注阅读开源项目代码这个问题,比如「 初学 python,有哪些 Pythonic 的源码推荐阅读? 」、「 github中适合新人阅读的Python项目有哪些? 」、「 如何去阅读并学习一些优秀的开源框架的源码? 」等。本文将从推荐可阅读的Python项目和如何阅读者2个方面聊聊这个话题。 阅读Python开源项目代码主要有如下三个原因: 1....
View Article深度学习中的Data Augmentation方法和代码实现
作者:AbsentM 前言 在深度学习中,为了避免出现过拟合(Overfitting),通常我们需要输入充足的数据量.为了得到更加充足的数据,我们通常需要对原有的图像数据进行几何变换,改变图像像素的位置并保证特征不变. 本页面主要记录下常用的数据增强(Data Augmentation)变换方法及其实现. 数据增强变换(Data Augmentation Transformation)...
View ArticlePyCon 上海 2016
内容简洁,只介绍见闻,感兴趣的需要自己去深挖。 使用python进行高效大数据工作流与任务调度 分享嘉宾是Splunk的丁来强,介绍了很多大数据的调度系统,说了很多,我只感兴趣Airbnb开源的 AirFlow ,看起来,蛮高端的。 AirFlow现在还是Apache的孵化项目,但是热度很大,GitHub上已经有3k多了,做大数据开发和应用的小伙伴们可以关注下~ 用高魔的姿势调 python 程序...
View ArticlePython & WebDAV- part one
What is WebDAV and what is it useful for? From wikipedia : Web Distributed Authoring and Versioning (WebDAV) is an extension of the Hypertext Transfer Protocol (HTTP) that allows clients to perform...
View Article说Python酷炫的10个理由
python部落(python.freelycode.com)组织翻译,禁止转载,欢迎转发。 创建交互式web应用的方法在过去几年发生了天翻地覆的变化。建站的选择似乎是无穷无尽的,并且一旦你开始了解某个框架或者技术栈的优缺点,你很快就会感到困惑。嗯..Django vs Ruby on Rails vs Flask vs Node.js vs Spring vs Yii vs Batman.js...
View ArticlePython For Data Analysis|Python书籍
导读:数据分析是一种核心能力,掌握这种能力,不仅要掌握相应方法论,也要熟悉常用工具箱。python语言是做数据分析的一个好工具。如何学习和应用Python语言做数据分析?若是要用Python做数据分析,需要学习那些Python知识和Python库,以及这些Python知识和Python库如何灵活巧妙应用?《Python For Data Analysis》这本书很好地解答了这些问题。 书籍描述:...
View ArticlePython 4 Kids: Python for Kids: Python 3 Project 9
python for Kids: Python 3 Project9 September 11, 2016 Leave a comment Using Python 3 in Project 9 of Python For Kids For Dummies In this post I talk about the changes that need to be made to the code...
View Article笨方法学python 33课
今天Eiffel看到了第33章,任务是把一个while循环改成一个函数。 我在把while循环改成函数上很顺利,但是不知道怎么写python的主函数,在参数的调用上也出现了问题。 通过查资料,发现python的main函数可以用如下的方式来表示: if __name__ == '__main__' 然后自然而然的想把main函数里声明的参数i,numbers,m传入loop()中。 最开始的想法:...
View Articlepython之最强王者(7)――元组(tuple)
1.序列(sequence): 说明:在前面的字符串列表中其实我们已经用到了序列,之所以放到这篇来讲主要是为了承上启下,方便理解和记忆。 python的数据访问模型:直接存取 ,序列 ,映射 对非容器类都可以直接存取,所有的 数值类型 归为此类。 序列类型是指 容器 内的元素从 0 开始的索引顺序访问,一次可以访问一个或者多个元素。 字符串、列表、元组 归到次类...
View Article超棒干货系列:Python框架、库、软件等等资源大全
Awesome python A curated list of awesome Python frameworks, libraries, software and resources. Inspired byawesome-php. Awesome Python Environment Management Package Management Package Repositories...
View ArticleFixing Python Unicode Errors
python has a lot of issues handling Unicode (there seem to be backwards compatibility issues https://en.wikipedia.org/wiki/History_of_Python). One common error you get will look like this: Traceback...
View ArticleScoring documents for quality in Python how often does a speaker say “um”?
An interesting realization here is that an automated transcription of a lecture is superior for this purpose than manual closed captions or a written transcript, as those edit the material down. You...
View ArticleData now featuring movies
So after so many grueling attempts to start usingdata.usmanity.com as a way of surfacing some data about myself, I finally got one type of data to display with some real data. If you go to /movies ,...
View ArticleWhy I chose Django over Java Frameworks for my recent project
I am an ex-Java developer. I built both enterprise and social web apps with Java technologies namely Spring Framework, Servlet, JSP, Hibernate, iBatis, Tomcat, WebSphere but recently I chose Django...
View Article