06 2022 档案
摘要:#回归x = [[3,6],[6,9],[9,12],[12,15],[15,18],[18,21],[21,23]]# y = [[3],[6],[9],[12],[15],[18],[21]]y = [3,6,9,12,15,18,21]x1 = [[2,4],[4,6],[6,8],[8,10
阅读全文
摘要:#回归x = [[3,6],[6,9],[9,12],[12,15],[15,18],[18,21],[21,23]]y = [[3],[6],[9],[12],[15],[18],[21]]x1 = [[2,4],[4,6],[6,8],[8,10],[10,12]]y1 = [[2],[4],[
阅读全文
摘要:1,字 将字符以逗号,句号为一个段落,在对段落内的字符同一字进行对比 2,词 同一词语进行对比 import difflibdef stri_similar(s1,s2): return difflib.SequenceMatcher(None,s1,s2).quick_ratio()data1 =
阅读全文
摘要:「pdfplumber:」 pdfplumber库按页处理 pdf ,获取页面文字,提取表格等操作。 学习文档:https://github.com/jsvine/pdfplumber 「pypdf2:」 PyPDF2 是一个纯 Python PDF 库,可以读取文档信息(标题,作者等)、写入、分割
阅读全文
摘要:#单字符分割def division(text,strip): # 保留分割符 分隔符后换行 print('# 保留分割符 分隔符后换行') list = [] str = '' for i in text: if i in strip: str = '%s%s' % (str, i) list.a
阅读全文
摘要:text = open('text.txt','r',encoding='utf-8').read()old,new = ['(',')',',','.'],['(',')',',','。']def replace(old,new): data = '' for i in text: if i in
阅读全文
摘要:方法一:import os,psutildef file(d): f = os.listdir(d) files(d,f)def files(d,f): for i in f: try: if '.' in i: o = os.path.join(d+i) print(o) else: o = os
阅读全文
摘要:# 需要安装的模块# pip install pywifi# pip install comtypes# -*- coding: utf-8 -*-import timefrom pywifi import const, PyWiFi, Profileclass WiFi(object): # 创建
阅读全文
摘要:import difflibdef stri_similar(s1,s2): return difflib.SequenceMatcher(None,s1,s2).quick_ratio()data1 = '你好啊'data2 = '你好'# for i in range(len(data1)):#
阅读全文
摘要:模型一: x ,y ,z (0 ,0 ,1)(100 ,0 ,1)(0 ,0 ,100)(100 ,0 ,100) 模型二: x ,y ,z (0 ,0 ,1)(100 ,0 ,1)(0 ,100 ,1)(100 ,100 ,1) 正平行投影公式: a,b,c = 1,1.2,1 #投影方向x =
阅读全文
摘要:模型: def stereoscopic(): x1,x2 = -100,100 y1,y2 = 0,100 z1,z2 = 1,100 pygame.draw.line(screen, (1, 1, 1), Coordinate(x1,y1,z1), Coordinate(x2,y1,z1),2)
阅读全文