- 博客(7)
- 收藏
- 关注
原创 代码扫描工具之Klocwork
Klocwork is a static analysis tool used to scan software code at build time for security and logic flaws.https://help.klocwork.com/current/en-us/concepts/home.htm配置好server license 等相关信息之后可以在本地编译、扫描、上传报告。在coverity desktop 中create project之后,本地会生成project_root
2023-05-12 17:06:47
1889
1
原创 python 画图工具库matplotlib学习(一)
画图 import numpy as np import matplotlib.pyplot as plt x = np.linspace(-1, 1, 50) y1 = 2 * x + 1 y2 = x ** 2 plt.figure() plt.plot(x,y1) # figure num 参数设置show出来的图形为figure几,figsize设置图片的size plt.figure(num=3, figsize=(8, 5)) l1, = plt.plot(x, y2, label='up
2022-03-24 22:18:06
923
原创 python 将API获取到的数据写入exel
import os import urllib.request, urllib.parse, urllib.error, sys from urllib import request, parse import json import configparser import xlwt import time def write_to_exel(self): self.params['action'] = 'search' binary_data = urllib.parse
2022-03-24 19:35:17
871
原创 感觉很好用的configparser
configparser 从API获取到的数据要进行去除第三方库的清洗, 定义一个exclude_libraries.ini文件,在脚本中通过configparser调用这个ini文件数据并进行过滤. config = configparser.ConfigParser() config.read('exclude_libraries.ini', encoding='utf-8') exclude_libraries_list = config['Exclude_Libraries'].get('exclu
2022-03-24 19:29:50
310
原创 selenium学习以及总结
selenium的使用 安装selenium pip install delenium 下载浏览器驱动 谷歌:http://npm.taobao.org/mirrors/chromedriver/ 1.一些基本用操作 from selenium import webdriver from selenium.webdriver.common.keys import Keys import time driver = webdriver.Chrome() driver.get('https://www.b
2021-01-13 15:43:26
316
1
原创 pytest学习及总结(一)
@[TOC]pytest学习(一) pytest 1.捕获异常 pytest.raises(异常类型) 2.标记测试函数 1.显式指定函数名 pytest 脚本路径/***.py::函数名 2.使用模糊匹配 pytest -k 模糊匹配名 路径/test_*.py 3.pytest.mark 在函数前加上@pytest.mark.finished 测试时使用pytest -m finished 路径/***.py 3.跳过测试 如果测试中有一些函数需要被略过,则需要在需要被跳过的函数前加 1. @pyt
2020-12-08 09:25:02
344
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅