摘要: https://xlsxwriter.readthedocs.io/worksheet.html#worksheet-insert-image 阅读全文
posted @ 2021-03-11 16:43 diracy 阅读(51) 评论(0) 推荐(0)
摘要: 用法: import pyttsx3 engine = pyttsx3.init() engine.say("I will speak this text") engine.runAndWait() 更改语音、速率和音量: import pyttsx3 engine = pyttsx3.init() 阅读全文
posted @ 2021-01-19 10:31 diracy 阅读(619) 评论(0) 推荐(0)
摘要: # import requests# from lxml import etree# import time,random# header={# 'User-Agent':'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KH 阅读全文
posted @ 2020-12-30 09:18 diracy 阅读(66) 评论(0) 推荐(0)
摘要: import os, base64,reli=os.listdir(r'C:\Users\lenovo\Desktop\苕溪诗切图320jpg')try: for i in li: print(i) path=os.path.join(r'C:\Users\lenovo\Desktop\苕溪诗切图3 阅读全文
posted @ 2020-12-22 10:26 diracy 阅读(550) 评论(0) 推荐(0)
摘要: import requests from lxml import etree import re from pprint import pprint import json class Bili(object): def __init__(self,url_num): self.name = "av 阅读全文
posted @ 2020-12-03 11:19 diracy 阅读(69) 评论(0) 推荐(0)
摘要: import os, base64,reli=os.listdir(r'C:\Users\lenovo\Desktop\allsvg')os.chdir(r'C:\Users\lenovo\Desktop\allsvg')print(li)for i in li: with open(i,mode= 阅读全文
posted @ 2020-11-30 18:24 diracy 阅读(1736) 评论(0) 推荐(0)
摘要: class ShortInputError(Exception): def __init__(self): pass def __str__(self): return f'向量的长度不对'class Vector: # 构造方法,初始化,定义向量,需要把参数的各元素转化为浮点数 def __ini 阅读全文
posted @ 2020-11-28 09:35 diracy 阅读(212) 评论(0) 推荐(0)
摘要: import requestsimport reimport xlwtworkbook=xlwt.Workbook(encoding='utf-8')worksheet=workbook.add_sheet('大乐透')# from collections import Counter# c=[]# 阅读全文
posted @ 2020-11-27 15:42 diracy 阅读(288) 评论(0) 推荐(0)
摘要: def son_gen(): avg_num,sum_num,count=0,0,1 while True: num = yield avg_num if num: sum_num += num avg_num = sum_num/count count += 1 else:break return 阅读全文
posted @ 2020-11-17 16:48 diracy 阅读(99) 评论(0) 推荐(0)
摘要: import timedef sleep(n): print('start sleep') yield time.time() + n print('end sleep')def func(n): print(123) yield from sleep(n) print(456)def run_un 阅读全文
posted @ 2020-11-16 22:15 diracy 阅读(85) 评论(0) 推荐(0)