
python
宁静致远wyd
这个作者很懒,什么都没留下…
展开
-
seaborn
%matplotlib inlineimport pandas as pdimport numpy as npimport seaborn as snsfrom sklearn import preprocessingimport matplotlib.pyplot as pltnp.random.seed(sum(map(ord, "aesthetics")))def sinplot(原创 2016-05-31 19:43:49 · 2589 阅读 · 0 评论 -
Python 空间数据处理
Geopy测试GeoCodeing:得出具体的地址from geopy.geocoders import Nominatimgeolocator = Nominatim()location = geolocator.geocode("中国人民大学")print(location.address)中国人民大学, 人民大学北路, 稻香园南社区, 海淀区, 北京市, 100872, 中国经纬度信息原创 2016-09-10 16:32:52 · 4289 阅读 · 0 评论 -
Scipy-矩阵运算
Scipy-矩阵运算:http://blog.sina.com.cn/s/blog_70586e000100moen.html原创 2016-08-30 15:10:54 · 1767 阅读 · 0 评论 -
python 库知识
推荐11个Python 库:http://www.jb51.net/article/60255.htm原创 2016-08-26 17:21:22 · 489 阅读 · 0 评论 -
urllib2 使用代理服务器
相关博客: Python 爬虫入门(二)—— IP代理使用: http://www.cnblogs.com/hearzeus/p/5157016.html python爬虫如何抓取代理服务器: https://segmentfault.com/n/1330000005070016# The proxy address and port:proxy_info = { 'host' : 'pr原创 2016-08-25 12:11:43 · 19795 阅读 · 0 评论 -
利用代理服务器的简单爬虫程序
简单的爬虫,用到的知识点: 1、代理服务器 2、多线程 需要提高的: 1、分布式机制#encoding=utf8import osfrom bs4 import BeautifulSoupimport urllib2from multiprocessing import Poolimport randomdef proxys(): proxy_cont=open("pro原创 2016-08-26 14:06:39 · 2041 阅读 · 0 评论 -
Python 文件操作
File模块 文档filepath=r"E:\workpalce\Python\data\Andersen's_Fairy_Tales\100.txt"f=file(filepath,mode='a+')### 模式f.mode### 判断是否关闭f.closed### 编码f.encoding### 终端是否能访问f.isatty()f.fileno()f.namef.readline()##原创 2016-09-27 19:49:28 · 654 阅读 · 0 评论 -
python 中的hash
simhashimport re from simhash import Simhashdef get_features(s): withd=4 s=s.lower() s=re.sub(r'[^\w]+','',s) return [s[i:i+withd] for i in range(max(len(s)-withd+1,1))]Simhash(get_fea原创 2016-09-27 20:43:05 · 13188 阅读 · 0 评论 -
python datetime
python datetime 处理时间: http://www.cnblogs.com/lhj588/archive/2012/04/23/2466653.html 官方文档:https://docs.python.org/2/library/datetime.html转载 2016-08-05 14:01:54 · 356 阅读 · 0 评论 -
python django
djangoj教程 :http://www.ziqiangxuetang.com/django/django-deploy.html原创 2016-06-22 22:31:00 · 276 阅读 · 0 评论 -
python 模块的使用
html2text#html2text 是一个 Python 包可以将 HTML 转成 Markdown 格式。import html2texth = html2text.HTML2Text()h.ignore_links = Trueprint h.handle("<p>Hello, <a href='http://earth.google.com/'>world</a>!")原创 2016-06-26 23:37:30 · 263 阅读 · 0 评论 -
python urllib使用
简介:urllib2是Python的一个获取url(Uniform Resource Locators,统一资源定址器)的模块。它用urlopen函数的形式提供了一个非常简洁的接口。这使得用各种各样的协议获取url成为可能。它同时 也提供了一个稍微复杂的接口来处理常见的状况-如基本的认证,cookies,代理,等等。这些都是由叫做opener和handler的对象来处理的。 以下是获取url最简单转载 2016-06-26 23:51:42 · 301 阅读 · 0 评论 -
python 模拟登陆
http协议http://kb.cnblogs.com/page/130970/http://www.blogjava.net/zjusuyong/articles/304788.htmlfiddlerhttp://kb.cnblogs.com/page/130367/转载 2016-06-28 17:20:59 · 241 阅读 · 0 评论 -
python 装饰器
Python装饰器学习(九步门):http://www.cnblogs.com/rhcad/archive/2011/12/21/2295507.htmlPython装饰器学习:http://blog.youkuaiyun.com/thy38/article/details/4471421原创 2016-06-29 21:15:06 · 291 阅读 · 0 评论 -
Python @property __slots__
@property对于类的方法,装饰器一样起作用。Python内置的@property装饰器就是负责把一个方法变成属性调用的:class Student(object): def get_score(self): return self._score def set_score(self, value): if not isinstance(value,原创 2016-06-29 22:17:12 · 417 阅读 · 0 评论 -
Python format用法
format using method#location"{0},{1}".format('weiyudang',23)'weiyudang,23'"I love you ,{},{}".format('weiyudang',18)'I love you ,weiyudang,18'"Write applications quickly in Java, {}, Python, {}.原创 2016-06-20 09:24:57 · 735 阅读 · 0 评论 -
使用PyCharm配置Spark的Python开发环境(基础)
在本地搭建好Spark 1.6.0后,除了使用spark-submit提交Python程序外,我们可以使用PyCharm这个IDE在本地进行开发调试,提升我们的开发效率。配置过程也十分简单,在stackoverflow上搜索到的。同时,IntelliJ IDEA加入Python插件后也可以使用Python开发Spark程序,配置步骤一致。0.安装PyCharm和py4j我的系统环境(Ubuntu 1原创 2016-07-06 18:21:50 · 8746 阅读 · 2 评论 -
python mysql
MYySQL :http://www.cnblogs.com/mr-wid/archive/2013/05/09/3068229.html原创 2016-06-22 18:50:45 · 244 阅读 · 0 评论 -
py2neo3.0 批处理方案
py2neo 批处理方案neo4j是是一个高性能的NOSQL图形数据库,它将结构化的数据存储在网络上而不是表中。它是一个嵌入式的,基于磁盘的、具备完备的事务特性的JAVA持续化引擎,但是它将结构化数据存储在网络(从数学角度叫做图)上而不是表中。neo4j 建立数据库有多种方式:cypher load csv REST API第一种方式不适合批量导入,第二种需要前期的处理,因为比较喜欢pyth原创 2017-12-14 23:10:22 · 4464 阅读 · 0 评论