代码改变世界

excel在不改变格式的情况下,对两个名字的某几个日期下的内容进行替换

2016-05-03 11:37 by LI桥IL, 1014 阅读, 0 推荐, 收藏, 编辑
摘要:1 #-*- coding: UTF-8 -*- 2 import xlrd 3 import sys 4 import locale 5 import os 6 import xlwt 7 from xlutils.copy import copy 8 9 reload(sys) 10 sys.setdefaultencoding( "utf-8" ) 11 homedir... 阅读全文

txt文件分解为固定条数的文件

2016-05-03 11:18 by LI桥IL, 215 阅读, 0 推荐, 收藏, 编辑
摘要:#-*- coding: UTF-8 -*- # import linecache # count = linecache.getline(filename,linenum) # 读取文件某一行的内容 # str = linecache.getlines(filename) # str为列表形式,每一行为列表中的一个元素 import sys import linecache reload(s... 阅读全文

txt1-txt2去重输出到txt3

2016-05-03 10:55 by LI桥IL, 239 阅读, 0 推荐, 收藏, 编辑
摘要:1 # -*- coding: utf-8 -*- 2 # python 2.7 3 import sys 4 reload(sys) 5 sys.setdefaultencoding( "utf-8" ) 6 # 本方法用于对txt1中含有的txt2内容进行去重,并输出到txt3 7 # 由于文件输出,写入过程中有不可见编码,所以用strip()进行扫尾 8 def txt_q... 阅读全文

xml元素定位

2016-05-03 10:48 by LI桥IL, 682 阅读, 0 推荐, 收藏, 编辑
摘要:1 #-*- coding: UTF-8 -*- 2 import sys 3 import lxml 4 import lxml.etree,StringIO 5 6 reload(sys) 7 sys.setdefaultencoding('utf-8') 8 9 10 def getxml_xpth_content(xpath,filepath,index=0): ... 阅读全文

redis安装;配置;启动;测试

2016-05-03 09:46 by LI桥IL, 656 阅读, 0 推荐, 收藏, 编辑
摘要:Redis官方是不支持windows的,只是 Microsoft Open Tech group 在 GitHub上开发了一个Win64的版本,项目地址是:https://github.com/MSOpenTech/redis/releases 下载后直接解压,然后用redis-server red 阅读全文

windows下redis安装

2016-04-27 15:33 by LI桥IL, 152 阅读, 0 推荐, 收藏, 编辑
摘要:http://blog.csdn.net/renfufei/article/details/38474435 阅读全文

scrapy问题

2016-04-27 14:55 by LI桥IL, 144 阅读, 0 推荐, 收藏, 编辑
摘要:http://www.lxway.com/560014996.htm 阅读全文

scrapy 链接数据库创表语句

2016-04-27 14:44 by LI桥IL, 267 阅读, 0 推荐, 收藏, 编辑
摘要:CREATE DATABASE cnblogsdb DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE TABLE `cnblogsinfo` ( `linkmd5id` char(32) NOT NULL COMMENT 'url 阅读全文