读取yaml和excel配置文件
摘要:1.读取yaml配置文件 from os.path import exists from yaml import safe_load_all, safe_load class File(object): def __init__(self, file_path: str): if not exist
阅读全文
unittest基本使用
摘要:1.unittest基本使用 import unittest from unittest import skip, skipIf, skipUnless @skip # 无条件的跳过测试 测试类中添加 直接跳过整个测试类 测试类的注解器优先级高于测试方法的注解器 class TestA(unitte
阅读全文
使用faker生成测试数据
摘要:1.使用faker生成测试数据 # 数据类(构造常用数据类型、UUID、文本、词组、文件链接、文件路径) # 安全类(构造操作系统信息、HASH加密、密码) # 信息类(构造个人信息数据和表单信息数据:姓名、地址、电话、工作、证件号、 # 银行卡号、公司、邮箱、生日) # 网络类(构造IP MAC
阅读全文
mysql 添加用户 赋权
摘要:mysql添加用户 insert into user(Host,User,Password) values("%","wulian",password("wulian")); CREATE USER 'wulian'@'localhost' IDENTIFIED BY 'wulian'; # 创建用
阅读全文
@property基本使用
摘要:特性一:只读属性 class Bank_acount: @property def password(self): return "123" andy = Bank_acount() print(andy.password) # 123 andy.password = '密碼:456' # Attr
阅读全文
pyecharts 简单使用
摘要:def plotlib_data(self): # 画图 Type Proportion(%) self.cursor.execute('select video_name from game_fps GROUP BY video_name') video_name = [i[0] for i in
阅读全文
[pyecharts学习笔记]——全局配置项(AxisOpts坐标轴配置项)
摘要:from pyecharts import options as opts from pyecharts.charts import Bar from pyecharts.faker import Faker from pyecharts.commons.utils import JsCode fr
阅读全文
这个Pandas函数可以自动爬取Web图表
摘要:import pandas as pd pd.set_option('display.max_columns', None) # 显示的最大行数 None:全部显示 pd.set_option('display.max_rows', None) # 显示的最大列数 None:全部显示 pd.set_
阅读全文