python
全杰cc
不安分的编程人员一枚
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
python数据分析
numpy ndarray ndarray的创建 数组间的算术运算 pandas的使用numpy参考文档:简书np.random.rand(3,4)#产生一个3行4列的矩阵(0-1之间的)ndarrayndarray的创建In [32]: data1=[1,2,3,4.0] In [34]: arr1 = np.array(data1)In [35]: arr1 Out[35]: array([原创 2016-05-26 15:18:53 · 548 阅读 · 0 评论 -
ipython安装
1准备环境 2安装Ipython1、准备环境yum groupinstall 'Development Tools' yum install python3-devel 2、安装Ipythonpip install jupyter原创 2016-08-09 16:17:06 · 395 阅读 · 0 评论 -
win7 X 64 tensorflow安装
环境说明 具体安装步骤 anaconda安装 python35虚拟环境的设置conda create -n tensorflow python35 特别说明 tensorflow安装 检验是否安装成功 anaconda常用方法小结 conda create -n tensorflow python35创建环境并指定python的版本号 conda remove -n tensorflow all删除原创 2017-06-02 19:36:53 · 714 阅读 · 0 评论 -
django rest framework and angularjs
1 2 3 4 5 1 pip install -r requirements.txt python setup.py develop 2 sudo apt-get install npm 3 sudo npm install -g express npm install -g grunt-cli bower 4 npm install bower insta原创 2016-12-27 14:19:08 · 787 阅读 · 0 评论 -
python2和3使用过程中的(重要)不同点记录
除法 - - - dict的iter除法 - - - > /python2: 3/2=1 python3:3/2=1.5dict的iterpython2: Hs.iteritems() python3:Hs.items()原创 2016-12-25 17:16:37 · 378 阅读 · 0 评论 -
requests应用step1
爬取说明 使用模块主要作用说明 代码解释 完整代码爬取说明爬取的是小黄鸭的图片并保存到本地使用模块主要作用说明import requests from urllib.request import urlretrieve import re import os urlretrieve:保存下载的图片 os:判断文件目录是否存在和文件目录的创建 re:正则模块,查找需要的内容代码解释设置了请求头:u原创 2016-09-05 17:20:40 · 342 阅读 · 0 评论 -
python爬虫总结
基础基础原创 2016-09-04 21:05:14 · 442 阅读 · 0 评论 -
selenium结合lxml爬取豆瓣电影相关信息
环境说明 重要代码解释 完整代码环境说明python3.5 centos7.2重要代码解释使用selenium加载网页:driver=webdriver.PhantomJS() driver.get("https://movie.douban.com/") 使用selenium和web进行互动将网页加在完全:end = True while (end): try: end原创 2016-09-04 21:02:52 · 1091 阅读 · 0 评论 -
python使用中的错误总结
pip使用错误 python中使用scrapy的错误python环境使用说明: centos7 python3.5.2pip使用错误错误描述:command 'gcc' failed with exit status 1 解决办法:yum -y install gcc gcc-c++ kernel-devel yum -y install python-devel libxslt-devel原创 2016-08-07 23:30:24 · 533 阅读 · 4 评论 -
pyspider
安装安装(1)、加如下的path到环境变量中export PYCURL_SSL_LIBRARY=nss (2)、使用pip安装pip install pyspider (3)、在浏览器中检查localhost:5000原创 2016-08-16 09:47:21 · 323 阅读 · 0 评论 -
centos7下安装python3
安装前的准备工作 安装一些环境 将usrbinpython重命名 修改usrbinyum 安装python3 将下载好的python3压缩包解压 进入解压目录 添加python快捷图标安装前的准备工作安装一些环境yum install openssl-devel 将/usr/bin/python重命名[root@]#cd /usr/bin/ [root@]#ls python* python py原创 2016-07-17 15:55:38 · 1636 阅读 · 0 评论 -
python相关
os 列出一个目录下的所有目录包括文件os列出一个目录下的所有目录(包括文件)#!/usr/bin/python import ospwd = os.path.abspath('.')[0]global a a=1def findName(path,name): global a print(a,path,os.path.isdir(path),path.__contains__(n原创 2016-07-11 17:16:00 · 310 阅读 · 0 评论 -
python 数据清理诺干错误
re问题 nltk问题re问题1、错误描述: TypeError: expected string or buffer TypeError: can't use a string pattern on a bytes-like object 解决办法: str(urlopen("http://pythonscraping.com/files/inaugurationSp原创 2016-06-04 20:06:32 · 906 阅读 · 0 评论 -
python_mysql
MySQLdb安装问题MySQLdb安装问题问题描述: Could not find a version that satisfies the requirement MySQLdb (from versions: ) No matching distribution found for MySQLdb 还有可能是下面的错误:error: command 'gcc' failed with exi原创 2016-04-19 21:41:06 · 579 阅读 · 0 评论 -
python编码问题
错误一 错误二错误一错误描述:UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xe5 in position 0: ordinal not in range(128) 错误原因:原因就是Python的str默认是ascii编码,和unicode编码冲突。 解决方法:import sys reload(sys) sys.setdefault原创 2017-07-31 15:58:28 · 313 阅读 · 0 评论
分享