玩命加载中 . . .

python操作MySQL数据库基础操作 python操作MySQL数据库基础操作
OverView Recently in the revision mysql database, deployed a set of environments, review the installation and deployment
2023-08-19
pyserial 使用指导 pyserial 使用指导
概述 利用pyserial,可以访问串口,发送串口命令,当然,根据串口返回结果,判断命令执行正确性。 本文简介pyserial一些常用函数的使用方法与场景,并做一些阐述。 实践 初始化(连接串口) 串口连接示例 >>> i
S3 Example S3 Example
概述 日常工作中经常使用的S3相关的动作,诸如上传Object,携带metadata等,简单做个汇总。 示例代码 #-*-coding:UTF-8-*- import boto import boto.s3.connection imp
2023-06-21
fio 校验文件写完整性 fio 校验文件写完整性
概述 今天在整理电脑,发现了之前写的一个利用fio,模拟ceph集群发生OSD Down、UP期间,数据写入内容准确性校验,是否存在业务持续写入过程中,ceph集群发生异常,引发数据丢失的可能。 实践 脚本分为三部分,一部分是fio写,一部
ceph PG 修复 ceph PG 修复
概述 3月份的时候,江苏电力这个客户发生PG状态异常(纯粹是友情支持,发生问题的环境非我司ceph集群,而是ceph 开源集群),需要进行手工修复。 应客户要求,临时写了个修复脚本,供客户设置定时任务,定期自动修复。 考虑到一些PG状态是无
2023-06-01
Testlink support Excel import/export test cases Testlink support Excel import/export test cases
Overview Testlink is used for writing and maintaining manual test cases. Sometimes, in order to write more efficiently,
Dead lock test Dead lock test
Scripts file_lock_test.py import fcntl import os, time import logging logger = logging.getLogger() hdlr = logging.File
2023-05-13
一行命令获取python当前默认的编码格式 一行命令获取python当前默认的编码格式
实践 Python2.x python -c 'import locale; print(locale.getpreferredencoding())' Python 3.x python3 -c 'import locale; prin
2023-04-17
Python下使用function timeout Python下使用function timeout
概述 今天在编写S3 multipart upload相关test case时,碰到一个Quota相关场景,即上传S3 Object超过了Bucket Quota 的设定,导致thread hang住,无法退出。一般情况下,无Quota下,
Windows下python fnctl Windows下python fnctl
概述 fcntl函数是linux下的一个文件锁函数,用以加密文件,给文件上锁,防止文件同时被多个进程操作。但是在windows下执行时发现并没有这个函数,不支持,所以就去找了各种方法来代替。 解决方法 有位网友,借助 pywin32 来解决
2022-10-03
python max 函数介绍 python max 函数介绍
Overview max()函数用于获得给定的可迭代对象中的最大值。 key是max()函数的一个参数,它辅助max函数找到最大元素。当max() 函数中有 key 参数时,求的是 value 的最大值,当没有 key 参数时,求的是 ke
2022-08-22
python any() 与 all() 函数介绍 python any() 与 all() 函数介绍
概述 最近碰到python的一个知识点盲区(any 与 all 函数相关),基础知识没有扎实,这里记录一下python的any 与 all 函数,填补一下部分盲区。 简单理解 all() 函数: 全部为真,一假为假 any() 函数:一真为
2022-08-16
«1 2 3 4