摘要: 安装必要的依赖库文件 yum -y install zlib zlib-devel bzip2 bzip2-devel ncurses ncurses-devel readline readline-devel openssl openssl-devel openssl-static xz lzma 阅读全文
posted @ 2019-02-24 18:08 撒欢 阅读(231) 评论(0) 推荐(0) 编辑
摘要: ntpdate time.windows.com 阅读全文
posted @ 2019-02-24 15:41 撒欢 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 对数据: json = json.dumps(data) 编码 dict->string 排序sort_keys=True, 缩进indent=4, 分隔符separators=(',', ': ') json = json.loads(data) 解码 string->dict对文件: json. 阅读全文
posted @ 2018-08-12 15:55 撒欢 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 1、运行时加-u参数,如 # python3 -u test.py >> test.log &用man查看python的-u参数,说明如下: Force stdin, stdout and stderr to be totally unbuffered. On systems where it ma 阅读全文
posted @ 2018-08-12 15:54 撒欢 阅读(1259) 评论(0) 推荐(0) 编辑
摘要: >>> word = "Python" >>> word[:2] # character from the beginning to position 2 (excluded)'Py'>>> word[4:] # characters from position 4 (included) to th 阅读全文
posted @ 2018-08-12 15:53 撒欢 阅读(175) 评论(0) 推荐(0) 编辑
摘要: import threading def write_dbs(i): print(i)if __name__ == '__main__': for i in range(7): t = threading.Thread(target=write_dbs, args=(i,)) t.start() 阅读全文
posted @ 2018-08-12 15:39 撒欢 阅读(122) 评论(0) 推荐(0) 编辑
摘要: import threadingimport timeimport datetimedef exec_update(): time.sleep(5)def event_func(): now_time = datetime.datetime.now().strftime('%Y-%m-%d %H:% 阅读全文
posted @ 2018-08-12 15:37 撒欢 阅读(324) 评论(0) 推荐(0) 编辑
摘要: 判断是否存在:db.course.find({"filename": { $exists: true } }).count()移除字段:db.course.update({},{$unset:{"filename":""}},{multi:true})db.test.update({},{$unse 阅读全文
posted @ 2018-08-12 15:21 撒欢 阅读(161) 评论(0) 推荐(0) 编辑
摘要: chkconfig NetworkManager offsystemctl stop NetworkManagersystemctl disable NetworkManager 阅读全文
posted @ 2018-08-12 15:18 撒欢 阅读(6540) 评论(0) 推荐(2) 编辑
摘要: :nohl 可以取消高亮 阅读全文
posted @ 2018-08-12 15:06 撒欢 阅读(1252) 评论(0) 推荐(0) 编辑
摘要: 查看内存:free -h释放内存:echo 3 > /proc/sys/vm/drop_caches 阅读全文
posted @ 2018-08-12 15:05 撒欢 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 免费高清图片: https://pixabay.com/ https://unsplash.com/ 3D建模: https://ephtracy.github.io 播放器: http://potplayer.daum.net/?lang=zh_CN 创客贴_免费在线平面设计工具,免费设计图片素材 阅读全文
posted @ 2018-03-30 10:08 撒欢 阅读(3222) 评论(0) 推荐(0) 编辑
摘要: 浅谈HTTP事务的一个过程: https://www.cnblogs.com/LIUYANZUO/p/5428185.html 阅读全文
posted @ 2018-03-28 15:26 撒欢 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 中文博客:https://www.cnblogs.com/lijia0511/p/5644566.html 英文原文:http://yannesposito.com/Scratch/en/blog/Learn-Vim-Progressively/ #将整个文件的所有a替换为b:%s/a/b/g :n 阅读全文
posted @ 2018-03-23 09:00 撒欢 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 上传: scp myfile.txt username@192.168.1.1:/homw/下载: scp username@192.168.1.5:/home/myfile.txt /home/下载整个目录: scp -r root@192.168.1.1:/home/explorer/pytho 阅读全文
posted @ 2018-03-17 18:27 撒欢 阅读(173) 评论(0) 推荐(0) 编辑