摘要: # server端from flask import Flask from flask_socketio import SocketIO app = Flask(__name__) app.config["SECRET_KEY"] ="gsagdgasg436fgsdh" socketio = So 阅读全文
posted @ 2025-02-21 20:32 冷夜O 阅读(1) 评论(0) 推荐(0) 编辑
摘要: import getopt import sys r""" getopt.getopt(sys.argv[1:], "hf:", ["help", "file="]) sys.argv[1:]:这是要解析的命令行参数列表。sys.argv 是一个包含命令行参数的列表,其中 sys.argv[0] 是 阅读全文
posted @ 2025-01-21 17:34 冷夜O 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 1.flask框架应用模块跟uswgi 配置放在同一个目录 [root@localhost test_uwsgi]# ls app.py instance log __pycache__ uwsgi.ini 2.配置uwsgi文件 [uwsgi] #uwsgi启动时,所使用的地址和端口(这个是htt 阅读全文
posted @ 2025-01-10 16:59 冷夜O 阅读(6) 评论(0) 推荐(0) 编辑
摘要: import math # 实现数学除法商进一法 dividend = 153 divisor = 100 result = dividend / divisor # 结果1.53 # math.ceil 函数向上取整 rounded_result = math.ceil(result) # 结果2 阅读全文
posted @ 2024-10-28 10:17 冷夜O 阅读(6) 评论(0) 推荐(0) 编辑
摘要: import openpyxl from openpyxl import Workbook # 常用于数据批量读出来和写进去 # 往表格写入操作 def create_wb(): # 创建一个新的工作簿 wb = Workbook() # 选择默认的工作表 ws = wb.active # 假设这是 阅读全文
posted @ 2024-10-25 16:20 冷夜O 阅读(160) 评论(0) 推荐(0) 编辑
摘要: # server.py import asyncio import websockets async def echo(websocket, path): async for message in websocket: print(f"server Received: {message}") awa 阅读全文
posted @ 2024-10-11 17:44 冷夜O 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 一.adb命令 1.查询已连接的设备 C:\Users\Administrator>adb devices List of devices attached 127.0.0.1:21503 device 2.连接设备 adb connect 127.0.0.1:21503 3.登录设备shell C 阅读全文
posted @ 2024-09-28 20:45 冷夜O 阅读(23) 评论(0) 推荐(0) 编辑
摘要: 测试机每次adb安装apk都要弹安装提示,不操作就不往下走了,非常不利于自动化测试, 解决方法两步: 首先,开发者选项 -> 启动MIUI优化 ->关闭 (第一步过后授权管理 右上角才有设置按钮入口) 其次,设置 -> 授权管理 -> 右上角设置按钮 -> USB安装管理、应用权限监控 ->两个都关 阅读全文
posted @ 2024-06-16 12:25 冷夜O 阅读(347) 评论(0) 推荐(0) 编辑
摘要: # 运行 powershell 复制下面命令执行 Get-ChildItem -Directory | ForEach-Object { $folder = $_ $totalSize = (Get-ChildItem -Path $folder.FullName -Recurse | Measur 阅读全文
posted @ 2024-06-03 18:24 冷夜O 阅读(429) 评论(0) 推荐(0) 编辑
摘要: import time import random # python 列表 和元组通过千万级别的数据访问,对比耗时时间,元组访问速度不一定比列表快,还是列表略快过元组。 def ListTime(): print('正在计算访问列表元素耗时时间') l = [i for i in range(100 阅读全文
posted @ 2024-04-23 11:24 冷夜O 阅读(53) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示