摘要: 点旋转:def count(angle,length): # y = y2-y1 y = math.sin(math.pi * (angle / 180)) * length y2 = int(y + y1) # x = x2-x1 x = math.cos(math.pi * (angle / 1 阅读全文
posted @ 2022-04-30 10:48 记录——去繁就简 阅读(325) 评论(0) 推荐(0)
摘要: def count(angle): # y = y2-y1 y = math.sin(math.pi * (angle / 180)) * 50 y2 = int(y + y1) # x = x2-x1 x = math.cos(math.pi * (angle / 180)) * 50 x2 = 阅读全文
posted @ 2022-04-30 09:26 记录——去繁就简 阅读(142) 评论(0) 推荐(0)
摘要: import math import pygame from pygame.locals import * # 导入pygame定义的常量 width,height = 480,360 pygame.init() screen = pygame.display.set_mode((width,hei 阅读全文
posted @ 2022-04-29 16:48 记录——去繁就简 阅读(499) 评论(0) 推荐(0)
摘要: if y == 300 and x != 100: x -= 100 print(' x -= 100')elif x == 100 and y != 100: y -= 100 print(' y -= 100')elif y == 100 and x != 300: x += 100 print 阅读全文
posted @ 2022-04-29 09:43 记录——去繁就简 阅读(99) 评论(0) 推荐(0)
摘要: import sysimport pygame#使用pygame之前必须初始化pygame.init()#设置主屏窗口screen = pygame.display.set_mode((400,400))#设置窗口标题pygame.display.set_caption('')# source = 阅读全文
posted @ 2022-04-28 22:19 记录——去繁就简 阅读(288) 评论(0) 推荐(0)
摘要: 服务端: import sockethostname = socket.gethostname()port = 8888s = socket.socket()s.bind((hostname,port))s.listen()a,b = s.accept()f = open('__init__1.py 阅读全文
posted @ 2022-04-27 19:00 记录——去繁就简 阅读(45) 评论(0) 推荐(0)
摘要: import tkinterroot = tkinter.Tk()cv = tkinter.Canvas(root)# cv.create_arc(23,23,40,100) #x,y,w,h 圆心,x宽,h高 #扇形# cv.create_line(20,20,200,200) #x1,y1,x2 阅读全文
posted @ 2022-04-27 19:00 记录——去繁就简 阅读(62) 评论(0) 推荐(0)
摘要: import reimport osfrom pydub import AudioSegmentdef get_second_part_wav(main_wav_path, start_time, end_time, part_wav_path): """ 音频切片,获取部分音频,单位秒 :para 阅读全文
posted @ 2022-04-17 17:10 记录——去繁就简 阅读(1391) 评论(0) 推荐(0)
摘要: 服务端: #图片传输# import socket# hostname = socket.gethostname()# port = 8888# s = socket.socket()# s.bind((hostname,port))# s.listen()# a,b = s.accept()# f 阅读全文
posted @ 2022-04-17 17:09 记录——去繁就简 阅读(86) 评论(0) 推荐(0)
摘要: 服务端: #音频文件传输import socket,wavehostname = socket.gethostname()port = 8888#开始# 基本架构s = socket.socket()s.bind((hostname,port))s.listen()a,b = s.accept()c 阅读全文
posted @ 2022-04-17 17:09 记录——去繁就简 阅读(488) 评论(0) 推荐(0)