03 2024 档案

摘要:import re content = [] srt = [] with open('input.vtt','r') as open_file: for lines in open_file: lines = lines.replace('WEBVTT','') #删除WEBVTT # vtt文件中 阅读全文
posted @ 2024-03-21 21:56 华小电 阅读(171) 评论(0) 推荐(0) 编辑
摘要:In Python, a decorator is a design pattern that allows you to modify the functionality of a function by wrapping it in another function. The outer fun 阅读全文
posted @ 2024-03-16 20:43 华小电 阅读(6) 评论(0) 推荐(0) 编辑
摘要:def counter(list): c_dict = {} for i in list: if i in c_dict: c_dict[i] += 1 else: c_dict[i] = 1 return c_dict def entropy(x): counts = counter(x) #每个 阅读全文
posted @ 2024-03-09 10:08 华小电 阅读(122) 评论(0) 推荐(0) 编辑

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