06 2021 档案

摘要:import yamail# 邮箱username# passwordusername = "xxx@qq.com"password = "xxx"host = "smtp.qq.com" #qq# host = "smtp.163.com" #163# host = "smtp.126.com" 阅读全文
posted @ 2021-06-16 23:47 黑。白。 阅读(58) 评论(0) 推荐(0)
摘要:import requestsurl = "https://oapi.dingtalk.com/robot/send"import timeimport hmacimport hashlibimport base64import urllib.parsedef get_dd_sign(): time 阅读全文
posted @ 2021-06-16 23:46 黑。白。 阅读(287) 评论(0) 推荐(0)
摘要:# l = [1,2,3]# d = {"name":"11"}# import traceback# try:# name = d["name"]# # l[4]# # except KeyError as e:# # print(e)# # print("出现异常了")# # except In 阅读全文
posted @ 2021-06-16 23:44 黑。白。 阅读(41) 评论(0) 推荐(0)
摘要:1、网络请求 urllib 自带模块: 1、get 请求 2、post 请求 3、url 里面传参 4、body、josn 5、cookie 6、header 7、上传文件 8、k-v from urllib.request import urlopen from urllib.parse impo 阅读全文
posted @ 2021-06-16 23:41 黑。白。 阅读(997) 评论(0) 推荐(0)
摘要:# import xlrd# book = xlrd.open_workbook("test.xls")# # sheet = book.sheet_by_name("sheet1")# sheet = book.sheet_by_index(0)# # book.sheets() #获取所有she 阅读全文
posted @ 2021-06-16 23:40 黑。白。 阅读(72) 评论(0) 推荐(0)
摘要:redis 是一个数据库,他是非关系型数据库,nosql类型k-v 格式redis数据全部放在内存里面,每秒钟最大能支持10w的读写import redisr = redis.Redis(host="x.x.x.x",password="xxx",port=6379,db=4,decode_resp 阅读全文
posted @ 2021-06-16 23:39 黑。白。 阅读(187) 评论(0) 推荐(0)
摘要:在使用kubeadm init初始化k8s集群中的master主节点时,总是出错。这个地方卡了我很长时间,遇到了好几个不一样的错误,有的问题在网上也没有找到什么有效的解决方案,所以特此记录一下。以下错误均是在使用kubeadm init语句初始化k8s集群过程中出现的问题。 第一次初始化集群时,我的 阅读全文
posted @ 2021-06-13 10:01 黑。白。 阅读(2412) 评论(0) 推荐(0)
摘要:一.模块安装 pip3 install schedule 二.常用的使用案例 #基本格式#创建方法def func(): print("方法")#创建定时schedule.every().seconds.do(func) #每秒运行一次#如果方法需要传参的话do(func,参数1)#开循环while 阅读全文
posted @ 2021-06-10 23:53 黑。白。 阅读(3635) 评论(0) 推荐(0)