随笔分类 -  python

摘要:#!/usr/bin/env python # -*- coding:utf8 -*- # __author__ = '北方姆Q' import time from kubernetes import client, config from kubernetes.stream import stre 阅读全文
posted @ 2021-03-09 09:53 北方姆Q 阅读(248) 评论(0) 推荐(0) 编辑
摘要:1 #!/usr/bin/env python 2 # -*- coding:utf8 -*- 3 # __author__ = '北方姆Q' 4 5 6 import time 7 from concurrent.futures import ThreadPoolExecutor, as_comp 阅读全文
posted @ 2020-11-26 11:19 北方姆Q 阅读(111) 评论(0) 推荐(0) 编辑
摘要:await、async出来有一阵时间了,之前一直没有用到,这次工作中有需要用的,就赶快上网查查,怎奈大多都是互相抄袭理论知识,相同案例并无实际作用,本人也是浏览了很多相关帖子等,最后也是找到了一些参考,最后再自己封装成一个可直接调用类,方便后期使用。关于理论知识本人就不打字了,网上很多嘛,大家懂得 阅读全文
posted @ 2020-11-25 16:13 北方姆Q 阅读(184) 评论(0) 推荐(0) 编辑
摘要:链表 1 #!/usr/bin/env python 2 # -*- coding:utf8 -*- 3 # __author__ = '北方姆Q' 4 # __datetime__ = 2018/12/5 19:21 5 6 7 class Node(object): 8 """ 9 节点类 10 阅读全文
posted @ 2018-12-05 19:24 北方姆Q 阅读(203) 评论(0) 推荐(0) 编辑
摘要:先上大王博客https://www.cnblogs.com/alex3714/articles/5714238.html,说的很有道理,我都快信了,所以一直想把这个项目写出来,怎奈大王一直不讲,唉,实在没办法只好自己写了。理念就是模仿大王的,实际操作流程有些不一样: 我的流程就是这样,其实都是很简单 阅读全文
posted @ 2018-08-13 14:19 北方姆Q 阅读(854) 评论(0) 推荐(0) 编辑
摘要:https://influxdb-python.readthedocs.io/en/latest/examples.html 阅读全文
posted @ 2018-07-18 17:27 北方姆Q 阅读(254) 评论(0) 推荐(0) 编辑
摘要:https://kafka-python.readthedocs.io/en/master/apidoc/KafkaProducer.html 阅读全文
posted @ 2018-06-29 18:43 北方姆Q 阅读(81) 评论(0) 推荐(0) 编辑
摘要:使用django的小伙伴们应该都知道我们是无法开心的处理PUT跟DELETE的 1 $.ajax({ 2 url: 'XXX', 3 type: 'PUT', 4 dataType: 'json', 5 data: { 6 's': $("#select-id").find("option:sele 阅读全文
posted @ 2018-01-31 17:41 北方姆Q 阅读(7716) 评论(1) 推荐(2) 编辑
摘要:引用园友 无名小妖 的博客 https://www.cnblogs.com/wumingxiaoyao/p/6928297.html 写的很好,但是博客园不能转载,不过我已经点赞了~ 阅读全文
posted @ 2018-01-31 11:41 北方姆Q 阅读(200) 评论(0) 推荐(0) 编辑
摘要:1 #!/usr/bin/env python 2 # -*- coding:utf8 -*- 3 # __author__ = '北方姆Q' 4 5 import requests 6 import json 7 from django.conf import settings 8 from re 阅读全文
posted @ 2017-11-27 17:09 北方姆Q 阅读(296) 评论(0) 推荐(0) 编辑
摘要:1 #!/usr/bin/env python 2 # -*- coding:utf8 -*- 3 # __author__ = '北方姆Q' 4 5 from pyzabbix import ZabbixAPI 6 from plugins.duia.singleton import Singleton 7 8 9 class ZabbixFactor... 阅读全文
posted @ 2017-11-17 17:31 北方姆Q 阅读(431) 评论(0) 推荐(0) 编辑
摘要:http://python-jenkins.readthedocs.io/en/latest/index.html 阅读全文
posted @ 2017-08-01 14:24 北方姆Q 阅读(151) 评论(0) 推荐(0) 编辑
摘要:1 try: 2 import xmlrpclib 3 4 except ImportError as e: 5 import xmlrpc.client 6 7 8 SERVER_IP = '192.168.144.11' 9 10 11 try: 12 # 连接你的cobbler服务器,ip自改 阅读全文
posted @ 2017-07-10 17:14 北方姆Q 阅读(1094) 评论(0) 推荐(0) 编辑
摘要:1.合并可以匹配的条件 2.if条件避免与布尔值比较 此时等价于if True,属于False的值:None、False、数字0、空列表元组字典集合,但是有的时候数字0我们是有用的,所以我们用is来比较 so,我们可以看出is与==的意义是不同的,事情的真相是is比较的是内存地址,None在pyth 阅读全文
posted @ 2017-05-05 17:08 北方姆Q 阅读(326) 评论(0) 推荐(0) 编辑
摘要:1 #!/usr/bin/env python 2 import time 3 import datetime 4 5 # 格式自改 6 UTC_FORMAT = '%Y-%m-%dT%H:%M:%SZ' 7 LOCAL_FORMAT = '%Y-%m-%d %H:%M:%S' 8 9 10 def utc2local(utc_str): 11 utc_st = ... 阅读全文
posted @ 2017-03-21 15:34 北方姆Q 阅读(1341) 评论(0) 推荐(0) 编辑
摘要:1 #!/usr/bin/env python 2 from aliyunsdkcore import client 3 import json 4 from aliyunsdkcdn.request.v20141111 import DescribeUserDomainsRequest # 获取CDN域名列表类 5 from aliyunsdkcdn.request.v20141... 阅读全文
posted @ 2017-03-20 18:30 北方姆Q 阅读(699) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示