上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 38 下一页
摘要: linux shell启动:celery -A celery_study worker --loglevel=info linux shell#cd 到celery_study.py的目录 执行python >>from celery_study import add >>add.delay(3,4 阅读全文
posted @ 2017-10-27 13:33 howhy 阅读(255) 评论(1) 推荐(0)
摘要: yum install -y epel-release yum install -y redis vim /etc/redis.conf 修改:bind 0.0.0.0 requirepass foobared123 systemctl restart redis redis-cli >>auth  阅读全文
posted @ 2017-10-26 18:20 howhy 阅读(282) 评论(0) 推荐(0)
摘要: 操作: 后台shell命令: 执行mongo进入 help查看帮助命令 use test数据库 然后插入一条数据 数据库test才会创建 db.help;查看db命令 db.createUser({user:'dba',pwd:'123456',roles: [ { role: "userAdmin 阅读全文
posted @ 2017-10-26 09:50 howhy 阅读(170) 评论(0) 推荐(0)
摘要: 不可变类型是可hash #tuple str freezeset 可变类型是不可hash ##list set 阅读全文
posted @ 2017-10-25 22:51 howhy 阅读(2205) 评论(0) 推荐(0)
摘要: l:local e:enclosing g:global b:buitl-in 函数变量有作用域 if else while 变量没有作用域 不能修改全局变量 若要修改需加global 阅读全文
posted @ 2017-10-25 22:36 howhy 阅读(216) 评论(0) 推荐(0)
摘要: centos 6.x Python2.7x安装 yum install -y gcc gcc-develwget https://www.python.org/ftp/python/2.7.14/Python-2.7.14.tgztar xf Python-2.7.14.tgzcd /root/Py 阅读全文
posted @ 2017-10-23 13:34 howhy 阅读(166) 评论(0) 推荐(0)
摘要: import logging #logging.basicConfig(level=logging.DEBUG, # format='[line:%(lineno)d] %(asctime)s %(levelname)s %(message)s', # datefmt='%a,%Y %b %d %H:%M:%S', ... 阅读全文
posted @ 2017-10-21 11:16 howhy 阅读(202) 评论(0) 推荐(0)
摘要: 首先在window的文件夹窗口输入 : %APPDATA% 然后在底下新建pip文件夹,然后到pip文件夹里面去新建个pip.ini,然后再里面输入内容 [global] timeout = 6000 index-url = http://pypi.douban.com/simple trusted 阅读全文
posted @ 2017-10-19 09:39 howhy 阅读(763) 评论(0) 推荐(0)
摘要: """ 1. makestrans()用法 语法: str.maketrans(intab, outtab]); Python maketrans() 方法用于创建字符映射的转换表,对于接受两个参数的最简单的调用方式, 第一个参数是字符串,表示需要转换的字符,第二个参数也是字符串表示转换的目标。 注:两个字符串的长... 阅读全文
posted @ 2017-10-18 16:31 howhy 阅读(575) 评论(0) 推荐(0)
摘要: 1、locals() 和 globals() 是python 的内建函数,他们提供了字典的形式访问局部变量和全局变量的方式。 示例代码: 输出为: 2、locals() 返回是当前局部变量的深拷贝,修改locals() 中变量值的时候,实际上对于原变量本身是没有任何影响的。而globals()返回的 阅读全文
posted @ 2017-10-17 19:57 howhy 阅读(561) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 38 下一页