发布时间:2021-08-24 17:19:24
# -*- codeing = utf-8 -*-# @Time : 2021/8/20 16:22# @File : translate.py# @Software : PyCharmimport requestsimport reimport tkinter as tkfrom tkinter import ttkfrom tkinter import *Findresult = re.compile(r'class="transtext">(.*?)</textarea><br />')head = {.........【阅读全文】
发布时间:2021-08-23 17:30:34
import jsonimport sys# 引入mqtt包import paho.mqtt.client as mqtt# 使用独立线程运行from threading import Thread# 建立mqtt连接def on_connect(client, userdata, flag, rc): if rc == 0: # 连接成功.........【阅读全文】
发布时间:2021-08-20 17:19:13
def start_game(): # 播放音乐 pygame.mixer.music.play(-1) # 定义存分数的全局变量 global score score = 0 # 定义存放玩家键盘输入运动方向的.........【阅读全文】
发布时间:2021-08-19 17:24:03
工具类代码# coding=utf-8import randomfrom io import BytesIOfrom PIL import Image,ImageFont,ImageDrawdef GetCode(): source = 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890' code = "" &nbs.........【阅读全文】
发布时间:2021-08-18 17:26:08
from PIL import Image, ImageFont, ImageDraw, ImageEnhanceimport matplotlib.pyplot as pltimport numpy as npimport randomimport randomimport osdef image_rotate(image,label): """ 对图像进行一定角度的旋转 &nbs.........【阅读全文】