上一页 1 2 3 4 5 6 ··· 8 下一页
摘要: # 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 阅读(20) 评论(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 阅读(34) 评论(0) 推荐(0)
摘要: 测试机每次adb安装apk都要弹安装提示,不操作就不往下走了,非常不利于自动化测试, 解决方法两步: 首先,开发者选项 -> 启动MIUI优化 ->关闭 (第一步过后授权管理 右上角才有设置按钮入口) 其次,设置 -> 授权管理 -> 右上角设置按钮 -> USB安装管理、应用权限监控 ->两个都关 阅读全文
posted @ 2024-06-16 12:25 冷夜O 阅读(650) 评论(0) 推荐(0)
摘要: # 运行 powershell 复制下面命令执行 Get-ChildItem -Directory | ForEach-Object { $folder = $_ $totalSize = (Get-ChildItem -Path $folder.FullName -Recurse | Measur 阅读全文
posted @ 2024-06-03 18:24 冷夜O 阅读(513) 评论(0) 推荐(0)
摘要: import time import random # python 列表 和元组通过千万级别的数据访问,对比耗时时间,元组访问速度不一定比列表快,还是列表略快过元组。 def ListTime(): print('正在计算访问列表元素耗时时间') l = [i for i in range(100 阅读全文
posted @ 2024-04-23 11:24 冷夜O 阅读(87) 评论(0) 推荐(0)
摘要: 不依赖第三方库编写进度条 # 不依赖第三方库,进度条设计 X = 10000 for i in range(X): for j in range(X): k = j * i # 80 是进度条的在显示时的比例,按需分配;'\r':每次输出让光标都回到首行 print('进度', f'|{"█"*(( 阅读全文
posted @ 2024-03-13 10:20 冷夜O 阅读(6) 评论(0) 推荐(0)
摘要: #!/bin/bash cat > my_python_script.py <<EOF #!/usr/bin/env python3 print("Hello, World!") print('This is a Python script with both "double" and \'sing 阅读全文
posted @ 2024-03-12 10:34 冷夜O 阅读(12) 评论(0) 推荐(0)
摘要: hook get参数 // ==UserScript== // @name GET请求参数钩取脚本 // @namespace http://your-namespace.com // @version 1.0 // @description 钩取GET请求参数并输出到控制台 // @match h 阅读全文
posted @ 2024-02-12 18:16 冷夜O 阅读(47) 评论(0) 推荐(0)
摘要: import csv import json # 常规csv表格转换为json文件,表头作为字典key字段。 def convert_csv_to_json(csv_file_path, json_file_path): data = [] with open(csv_file_path, 'r', 阅读全文
posted @ 2024-01-21 15:16 冷夜O 阅读(11) 评论(0) 推荐(0)
摘要: from retrying import retry r''' 安装:pip install retrying Version: 1.3.4 作用:retrying库是Python中用于实现重试机制的库,它们的目的都是在遇到错误或异常时自动重试代码块,以增加代码的健壮性和可靠性. 下面的案例抽几个常 阅读全文
posted @ 2024-01-16 21:23 冷夜O 阅读(83) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 ··· 8 下一页