
python
小辣椒lllll
这个作者很懒,什么都没留下…
展开
-
ansible delete the “u” from the list output
https://stackoverflow.com/questions/21413613/convert-ansible-variable-from-unicode-to-asciiif you really do have an array:[u'string1', u'string2', u'string3']And you want your template/whateve...原创 2020-02-21 11:12:23 · 529 阅读 · 0 评论 -
python 学习地址收藏
1、张大神推荐:这个据说是最经典的教程:http://python3-cookbook.readthedocs.io/zh_CN/latest/http://book.pythontips.com/en/latest/index.html原创 2017-03-15 16:50:01 · 366 阅读 · 0 评论 -
多线程样例
#!/bin/env pythonimport threadingfrom time import sleep,ctimeloops = [4,2]def loop(nloop,nsec): print 'start loop', nloop, 'at:', ctime() sleep(nsec) print 'loop',nloop原创 2017-04-30 16:25:14 · 438 阅读 · 0 评论 -
wsgi-01
Out for a walk one day, a woman came across a construction site and saw three men working. She asked the first man, “What are you doing?” Annoyed by the question, the first man barked, “Can’t you see转载 2017-05-10 22:33:47 · 325 阅读 · 0 评论 -
wsgi-02
Remember, in Part 1 I asked you a question: “How do you run a Django application, Flask application, and Pyramid application under your freshly minted Web server without making a single change to th转载 2017-05-10 22:35:01 · 531 阅读 · 0 评论 -
python 实现9宫格
#!/bin/env pythonimport itertoolscount=0lst = [p for p in itertools.permutations(range(1,10),3) if sum(p) == 15 ]print lstfor a0_0,a0_1,a0_2 in lst: for a1_0,a1_1,a1_2 in lst:原创 2017-11-26 21:06:45 · 3231 阅读 · 0 评论 -
Ceph-ansible 部署
1、部署规划 主机名 IP地址 系统os 用途 备注 ansible-deployment 10.1.204.108 centos7.5 ansible 部署主机,当作部署客户端 node1 10.1.210.105 centos7.5 ...原创 2018-11-09 20:02:09 · 1414 阅读 · 0 评论