会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
破晓
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
下一页
2018年3月14日
python 单例模式
摘要: 使用创建函数__new__()
阅读全文
posted @ 2018-03-14 18:31 破晓e
阅读(98)
评论(0)
推荐(0)
2018年3月12日
linux 根据服务名称批量杀死进程
摘要: ps -ef |grep python |awk '{print $2}'|xargs kill -9
阅读全文
posted @ 2018-03-12 11:37 破晓e
阅读(384)
评论(0)
推荐(0)
2018年1月25日
python 任务计划
摘要: sched 模块 引用time类实现任务定时执行 任务参数书元组类型,必须加参数后边必须加,号
阅读全文
posted @ 2018-01-25 10:31 破晓e
阅读(408)
评论(0)
推荐(0)
2017年11月20日
python偏函数
摘要: 偏函数是将创建函数时,将固定参数写死,以至于以后直接调用函数,不用填入默认参数。 用到的库 functools 新方法名称 = functools.partial(方法名称, 默认参数) # 为某个方法添加固定参数
阅读全文
posted @ 2017-11-20 00:00 破晓e
阅读(220)
评论(0)
推荐(0)
2017年11月19日
scrapy 异步存储mysql
摘要: 1、在setting中设置MySQL连接信息 HOST=''MYSQL_DBNAME='anttest'MYSQL_PASSWORD=''MYSQL_USER='root'2、在pipeline中添加mysql异步连接类 from twisted.enterprise import adbapi i
阅读全文
posted @ 2017-11-19 23:11 破晓e
阅读(570)
评论(0)
推荐(0)
2017年11月3日
安装scrapy框架
摘要: 前提安装好python、setuptools。 1.安装Python 安装完了记得配置环境,将python目录和python目录下的Scripts目录添加到系统环境变量的Path里。在cmd中输入python如果出现版本信息说明配置完毕(如下面截图)。python下载网站,https://www.p
阅读全文
posted @ 2017-11-03 16:57 破晓e
阅读(138)
评论(0)
推荐(0)
2017年11月1日
python 分词
摘要: import jieba text = '我来到北京清华大学' default_mode =jieba.cut(text) full_mode = jieba.cut(text,cut_all=True) search_mode = jieba.cut_for_search(text) print "精确模式:","/".join(default_mode) prin...
阅读全文
posted @ 2017-11-01 11:29 破晓e
阅读(164)
评论(0)
推荐(0)
2017年10月15日
修改mysql 数据库编码
摘要: 查看编码 SHOW VARIABLES LIKE 'character_set_%'; 依次修改like出来的字段 例如 set character_set_results=utf8; 完了修改/etc/my.cof文件 添加以下内容 编辑 /etc/my.cnf, 在里面加入,已经有[XXX]的,
阅读全文
posted @ 2017-10-15 17:23 破晓e
阅读(164)
评论(0)
推荐(0)
sql 允许远程登录
摘要: grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option; flush privileges;
阅读全文
posted @ 2017-10-15 16:43 破晓e
阅读(166)
评论(0)
推荐(0)
linux 查看进程命令
摘要: ps -ef |grep xx
阅读全文
posted @ 2017-10-15 15:18 破晓e
阅读(224)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
下一页
公告