上一页 1 ··· 8 9 10 11 12 13 14 15 16 下一页
摘要: text = open('text.txt','r',encoding='utf-8').read()old,new = ['(',')',',','.'],['(',')',',','。']def replace(old,new): data = '' for i in text: if i in 阅读全文
posted @ 2022-06-20 16:23 记录——去繁就简 阅读(44) 评论(0) 推荐(0)
摘要: 方法一: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 阅读全文
posted @ 2022-06-20 16:22 记录——去繁就简 阅读(166) 评论(0) 推荐(0)
摘要: # 需要安装的模块# pip install pywifi# pip install comtypes# -*- coding: utf-8 -*-import timefrom pywifi import const, PyWiFi, Profileclass WiFi(object): # 创建 阅读全文
posted @ 2022-06-20 16:22 记录——去繁就简 阅读(1183) 评论(0) 推荐(0)
摘要: import difflibdef stri_similar(s1,s2): return difflib.SequenceMatcher(None,s1,s2).quick_ratio()data1 = '你好啊'data2 = '你好'# for i in range(len(data1)):# 阅读全文
posted @ 2022-06-20 16:20 记录——去繁就简 阅读(1018) 评论(0) 推荐(0)
摘要: 模型一: 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 = 阅读全文
posted @ 2022-06-15 12:09 记录——去繁就简 阅读(1170) 评论(0) 推荐(0)
摘要: 模型: 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) 阅读全文
posted @ 2022-06-14 21:59 记录——去繁就简 阅读(122) 评论(0) 推荐(0)
摘要: import sys,mathimport pygame#使用pygame之前必须初始化pygame.init()#设置主屏窗口screen = pygame.display.set_mode((800,600))#设置窗口标题pygame.display.set_caption('')# sour 阅读全文
posted @ 2022-04-30 18:19 记录——去繁就简 阅读(119) 评论(0) 推荐(0)
摘要: import sys,mathimport pygame#使用pygame之前必须初始化pygame.init()#设置主屏窗口screen = pygame.display.set_mode((800,600))#设置窗口标题pygame.display.set_caption('')# sour 阅读全文
posted @ 2022-04-30 16:47 记录——去繁就简 阅读(431) 评论(0) 推荐(0)
摘要: x0, y0 = 250, 250x1, y1 = 200, 200x2, y2 = 350, 200x3, y3 = 150, 300x4, y4 = 300, 300 d = True if y1 > 300: d = Falseelif y1 < 200: d = Trueif d == Fa 阅读全文
posted @ 2022-04-30 16:29 记录——去繁就简 阅读(121) 评论(0) 推荐(0)
摘要: 无约束:x1, y1, x2, y2, x3, y3, x4, y4 = 135, 135, 64, 135, 64, 64, 135, 64 x0,y0 = 100,100 y1 -= 10y2 -= 10y3 += 10y4 += 10 y1 += 10y2 += 10y3 -= 10y4 -= 阅读全文
posted @ 2022-04-30 13:31 记录——去繁就简 阅读(65) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 16 下一页