Django1.8教程――从零开始搭建一个完整django博客(三)
这一节主要介绍对数据库的访问操作:通过管理器(manage),对对象进行检索、修改、删除等操作,详细介绍了如何针对不同的模型自定义管理器。 查询和管理工作...
View Article由python为入口回顾C++的lambda
lambda是一种匿名函数,python lambda可以使简单的函数简洁的表达,,C++的lambda使类似嵌套函数的功能得以实现 python的lambda lambda [arg1[,arg2,arg3....argN]]:expression#用def定义的函数def foo(): return 'hello...
View ArticleHeston Model Calibration Using QuantLib Python and Scipy Optimize
In this post we do a deep dive on calibration of Heston model using QuantLib python and Scipy's Optimize package. I have discussed parameter calibration in a couple of my earlier posts. In this post I...
View Article乌云公开漏洞、知识库爬虫和搜索
wooyun_public 乌云公开漏洞、知识库爬虫和搜索 crawl and search for wooyun.org public bug(vulnerability) and drops 1.安装相关组件 python 2.7和pip mongodb scrapy (pip install scrapy) flask (pip install Flask) pymongo (pip...
View Article2600 article
*A republication of my article on 2600, a hacker magazine* Greetings from Malaysia. This is my first time writing to 2600, although I’ve been a kindle subscriber for more than 2 years now. For my first...
View Article初学Python(二)
五、变量与赋值 python中的变量在声明时不需要指定其类型,它会根据你的赋值自动判断 对于数字和字符这种值类型的赋值,变量只是对它的引用,并不能直接删除其值(其实由于Python中的垃圾回收机制,你并不能真正删除任何东西,由Python自动判断它“没有人”了才会删除它) >>> a = 1>>> b = a>>> print(a, b)1...
View Article如何选择入行语言
前言: 本文转载自网站“ Delivoper: 实事求是的技术观 ” , 网址是 https://www.delivoper.com/t/topic/132 作者: itlr 已获得授权转载。 这篇文章讲的是如何选择入门的语言,其中很多观点我深为赞同, 转载过来分享给大家。...
View Article[原]多线程抽象编程模型(Python版)
最近需要完成一个多线程下载的工具,对其中的多线程下载进行了一个抽象,可以对所有需要使用到多线程编程的地方统一使用这个模型来进行编写。 主要结构: 1、基于Queue标准库实现了一个类似线程池的工具,用户指定提交任务线程 submitter 与工作线程 worker 数目,所有线程分别设置为后台运行,提供等待线程运行完成的接口。 2、所有需要完成的任务抽象成 task...
View Article自动化系列一之初识Python
1.1 python基础介绍 python的创始人为吉多范罗苏姆(Guido van Rossum)。1989年的圣诞节期间,吉多范罗苏姆为了打发时间,决心开发一个新的脚本解释程序,作为ABC语言的一种继承。 python是一种面向对象,直译式的计算机程序语言,Python崇尚优美、清晰、简单,是一个优秀并广泛使用的语言。 1.2Python应用领域 云计算: 应用OpenStack...
View ArticleKrzysztof uraw: Design by contract in python- part three
I covered py.contracts and zope.interface, now it's time to write about abc module from python standard library. I wanted to write about another library dpcontrancts , but unfortunately, I wasn't able...
View ArticleThomas Guest: Negative Sequence Indices in Python
Supply a negative index when accessing a sequence and python counts back from the end. So, for example, my_list[-2] is the penultimate element of my_list , which is much better than...
View ArticlePython FAQ: How do I port to Python3?
Part of my python FAQ , which is doomed to never befinished. Maybe you have a Python 2 codebase. Maybe you’d like to make it work with Python 3. Maybe you really wish someone would write a comically...
View ArticleGraham Dumpleton: Testing out deployment of Python based Opal health care...
When I was working on mod_wsgi, but also in a previous job where I was working on web application performance monitoring tools, I was always after good sample python web applications to test with....
View ArticleLoading Data into Memcached or How we built a Rube Goldberg machine with...
If you’ve watched tv recently, you’ve perhaps seen the introduction to Elementary , the latest in a string of Sherlock Holmes inspired shows. The intro depicts a machine in which a series of events...
View ArticleC++ & Python 多线程笔记
C++ Posix多线程 #include <stdio.h>#include <stdlib.h>#include <pthread.h>#include <vector>using std::vector;void* Proc(void* arg){ pthread_t pthread = *(pthread_t *)arg;...
View ArticleDjango application with puppet- part two
I end first post at the moment of pulling code from git. This text is how to setup additional stuff for geodjango application. It's a good practice in python word to have isolated environments per...
View Article为命令行火车票查询器添加自然语言交互界面
ps:采用 asciinema 制作了 演示视频 : 项目地址 先上项目源码: ibot iquery @sl前段时间跟我说,有个python写的命令行或者票查询器(iquery)很有趣,于是我玩了下,觉得挺好玩的,工具本身写得也干净利落。后来发现它只支持python3,还一度想让修改它使它兼容python2。 此后有了新主意:为它加一个自然语言交互界面,这样被围观时,比较拉风...
View ArticleAlexey Evseev: Django: signal or model method?
When I needed to implement some functionality on model saving, I always asked a question to myself - where to place it. In signal or in model method save() ? Let's see, what and when is more...
View Article工具 | 20招让你的Python飞起来!
工具 | 20招让你的python飞起来! 一点号数据玩家2016.7.29 限时干货下载: 回复【2】免费获取【超全数据分析资料免费下载(包含SQL,R语言,SPSS,SAS,python,数据挖掘)!】...
View ArticleAzure ML Studio now supports Microsoft R Open, Python 3
In Azure ML Studio , you use a browser-based "workbench" tool to flowdatathrough pre-built data munging,machine learning and predictive modeling modules. These pre-built components perform...
View Article