自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

vb112479

vb112479

  • 博客(76)
  • 收藏
  • 关注

原创 python 下载腾讯在线文档

python 下载腾讯在线文档

2024-02-02 17:46:53 273 1

原创 pycharm 管理ide设置

pycharm 管理ide设置,同步ide设置

2024-01-20 11:35:46 376

原创 python 文件夹中 __init__.py

python 文件夹中 __init__.py

2024-01-12 18:21:05 430

原创 python文件路径处理库,from pathlib import Path

Path.mkdir(mode, parents, exist_ok) #创建目录,想整个路径一起创建,就设置parents为True, 想要覆盖创建,就设置exist_ok为True。create_time = datetime.datetime.fromtimestamp(path.stat().st_ctime) #转换成日期格式。换成'w'就是以写模式打开文件。path.glob("**/*.py") #返回该目录下的所有.py文件。path.stat().st_mtime #上次修改文件时间。

2024-01-09 10:57:28 412

原创 python __call__

【代码】python __call__

2024-01-08 20:37:51 396

原创 python 正则 re

【代码】python 正则 re。

2023-11-02 15:40:06 84

原创 Python parse 比正则表达式好用的库

Python parse

2023-10-19 14:58:48 99

原创 failed to run the wc db work queue associated with

解决SVN Cleanup错误: Failed to run the WC DB work queue associated with - 灰信网(软件开发博客聚合)

2023-07-11 11:57:12 228

原创 LG G8手机连接adb

LG G8手机连接adb

2023-07-04 17:57:06 415 3

原创 python SyntaxError: unterminated string literal

SyntaxError: unterminated string literal

2023-04-19 12:58:25 3928

原创 python编码,乱码恢复

python字符串编码

2022-12-22 23:53:51 306

原创 pixel 6手机连接wifi,网络受限,wifi显示感叹号

pixel 6手机连接wifi,网络受限

2022-11-28 20:18:27 5782

原创 python mac连点

python mac连点,适用mac和win系统

2022-09-01 18:08:03 529

原创 xml.parsers.expat.ExpatError: mismatched tag: line 63, column 4

xml.parsers.expat.ExpatError: mismatched tag: line 63, column 4

2022-06-28 16:21:57 2839 2

原创 python excel PermissionError: [WinError 5]

python excel PermissionError: [WinError 5]

2022-05-11 23:06:16 320

原创 Mac git 自动补全

终端运行:brew install brew install bash-completion创建个文件夹,进入这个文件夹,取git源码,等会要用git clone git://git.kernel.org/pub/scm/git/git.git进入刚才的文件夹内,执行命令cp contrib/completion/git-completion.bash ~/.git-completion.bash找到这个文件没有这个文件,执行这个命令创建cd ~touch ..

2022-04-21 10:59:03 833

原创 Python json和dict

Json是字符串 type(json) out: str 所以所有字符串的方法json都能用 Dict是字典,有自己的key,value方法 Json和dict相互转换(dumps, loads),可以用到想要的方法loads,dumps带s的都是和字符串相关的,操作字符串 Json转字典用json.loads() 字典转json,把字符串存入数据库或excel,不需要操作文件,都用json.dumps()load,dump不带s的都是和文件相关的,操作文件 读以.js...

2022-03-31 12:14:50 1705

原创 python setdefault setdefault.append

dic1 = {}# 在字典中查找key"1",如果找不到,就创建一个以"1"为key,以缺省值[]为value的键值对dic1.setdefault('1', [])print("dic1: ", dic1)#dic1: {'1': []}# 如果字典中有该key,就啥也不做dic1.setdefault('1', [])print("dic1: ", dic1)#dic1: {'1': []}# 查找dict['1'], 定位到它的value[],列表使用appendd..

2022-03-28 10:51:16 1367

原创 git常用命令,学习笔记

【狂神说Java】Git最新教程通俗易懂_哔哩哔哩_bilibiligit config --system --list #系统配置git config --global --list #用户配置git config --global user.name "text" #设置用户名,该文件地址:C:\Users\x\.gitconfiggit config --global user.email "[email protected]" #设置邮箱#git

2022-03-12 23:16:36 563

原创 python抓取tb并汇总为excel

# coding=utf-8# 功能: 可选择忽略指定bug表单import requestsimport jsonimport timefrom openpyxl import Workbookclass TB: def __init__(self): self.get_current_time = int(time.time()) self.headers = { "password": "password" ...

2022-02-26 17:51:17 494

原创 PC文件夹/磁盘 共享/映射

PC 磁盘共享 文件夹共享

2022-01-25 16:32:38 319

原创 校验文件夹和子文件夹内的所有文件

校验文件夹和子文件夹内的所有文件

2022-01-15 11:28:48 472

原创 python修改注册表

def modify(): ''' 修改注册表 :return: ''' try: key = win32api.RegOpenKey(win32con.HKEY_CURRENT_USER, r'Software', 0, win32con.KEY_READ) win32api.RegCreateKey(key, '111...

2019-10-22 10:40:45 329

原创 python 接入支付宝

0.官方文档1. 使用国内源,安装依赖包:pip install -ihttps://pypi.douban.com/simplealipay-sdk-python2. 如安装步骤1中出现error: Microsoft Visual C++ 14.0 is required.让安装c++, 提取码:wkgv,选择默认安装即可3. 再次安装alipay-sdk-python,会出...

2019-10-11 11:39:34 1677 1

原创 python接入支付宝 40004 invalid-signature 错误原因: 验签出错

出现这个报错,可能是你代码中alipay_public_key的值填错了,打开这个网页,接口加签方式,点击复制支付宝公钥,替换即可解决

2019-10-10 19:15:42 1916

原创 pycrypto python error C2143: syntax error: missing

https://www.cnblogs.com/lyy-blog/p/9755806.html

2019-10-09 18:04:23 170

原创 selenium xpath 取@href

newest_version = driver.find_element_by_xpath('//*[@class="element-narrow"]/a').get_attribute('href')xpath获取到a标签,用get_attribute方法获取href

2019-07-16 14:20:54 2315

原创 python各种装饰器

1. @property @X.setter 用于属性修改的校验 等价于C#的get set,set用来限制属性的改变,get用来返回参数2. @abstractmethod 用于强制让你重写方法 被@abstractmethod装饰的方法的基类,无法进行实例化,继承于基类的子类,如果不重写被装饰的方法,也无法进行实例化3. __slots__魔法...

2019-07-09 14:52:55 174

原创 python @classmethod

深入理解python @classmethod被@classmethod装饰的方法1. 强制带个参数,cls,cls代表这个类本身2. 不用实例化,和静态方法一样,直接 类().方法() 即可调用3. cls是个位置参数,可随意换成其他词,如this如想获取类属性x的值,可直接cls.x,等价于A.xclass A(): x = 1 @classmethod...

2019-07-08 18:07:21 3381

原创 System.InvalidOperationException:“集合已修改;可能无法执行枚举操作。”

很久没遇到这个问题,都忘记是什么引起的了,记个笔记。首先foreach遍历是根据列表下标遍历的,foreach遍历前,会根据列表生成对标数组,如列表[1,2,3,4],生成的下标分别是(0,1,2,3),遍历的过程中删除元素,会导致列表变动,后面的元素前移。如遍历中要删除列表中的元素“1”,删除元素“1”后,列表依次前移,变为[2,3,4],而下一个下标是1,根据下标访问现在的列表,就访问...

2019-06-10 11:23:18 4404

原创 python excel xlwings 详解

官方文档: https://docs.xlwings.org/en/stable/quickstart.html# 导入库import xlwings as xw# 设为程序可见, 不新建工作薄# app = xw.App(visible=True, add_book=False)# 新建文档,保存wb = xw.Book()wb.save('test.xlsx')# 打开...

2019-05-29 20:40:19 10435 3

原创 python effective 笔记

python effective 笔记

2019-03-04 17:24:27 196 1

原创 You should either build your native code to x86 or install an ARM translation tool in your device

An error occured while deploying the file.This probably means that the app contians ARM native code and you Genymotion device cannot run ARM instructions.You should either build your native code to x8...

2019-02-18 00:22:10 1670

原创 Intel Haxm android VT

首先下载安装 :Intel Haxm,双击intelhaxm-android.exe安装1. 安装时可能会遇到提示让开windows VT硬件加速设置,win10开VT的方法2. 如果再上诉方法第六步中没有UEFI选项,选择【启动设置】,点击【立即重启】3. 重启前查下你的电脑的BIOS按钮,一般是F2或F8,4. 笔记本不要忘记按住Fn键再按F2或F85. 联想G510开启V...

2019-02-17 20:47:57 275

原创 appium 使用方法

因长时间未使用appium了,再次使用时一脸懵逼,所以这次记录一下0. appium解决每次运行都安装unlock和appiumsetting:  appium解决每次运行都需要安装Unlock以及AppiumSetting的问题1. 打开PC上的appium应用,下载appium,windows下载 appium-desktop-setup-1.10.0.exe 版本2. 运行uia...

2019-02-15 15:34:19 712

原创 python 数据结构

1. 顺序表: max=9 num=5 [1,2,3,4,5, , , , ] 优点: 1. 元素存储紧凑,节省空间,除表元素外,只需要O(1)空间存储辅助信息max,num 2. 查找速度快,通过下标进行快速定位 缺点: 1. 需要连续的存储区域,如果表很大就需要很大片的连续内存空间,如果很大的存储区只保存少量数据,会造成...

2019-01-28 17:25:24 148

原创 Genymotion 一直卡在starting virtual device

Genymotion 一直卡在starting virtual device一般卡这个界面超过五分钟就是有问题的,原因是Oracle VM VirtualBox装错路径了,你可能装的不是默认路径,把Oracle VM VirtualBox卸载,去他官网下载后,重装就好了,别改路径了...

2019-01-25 11:03:19 5377 5

原创 selenium Message: invalid selector: The result of the xpath expression

selenium的xpath表达式写错了, selenium不支持xpath中直接获取text 错误代码示例 :driver.find_element_by_xpath('//*[@class="signTime"]/text()')正确代码示例 : driver.find_element_by_xpath('//*[@class="signTime"]').text ...

2018-12-22 17:21:10 5306

原创 TypeError: 'Request' object is not iterable

猜测你的代码是这样的:return scrapy.Request(self.start_urls, callback=self.parse_link)有两种解决方法:1.使用yield, 把return换为yieldyield scrapy.Request(self.start_urls, callback=self.parse_link)2.使用return, 加个方括号, 转...

2018-11-14 16:10:59 2015 6

原创 python装饰器

# coding=utf-8# 所有能把函数作为参数传递的语言都能使用装饰器# 装饰器是特殊的函数,为已有函数增加功能,而不改变原代码块,如打日志,测试代码运行时间# 装饰器是根据闭包,作用域的特性实现的def print_hi(func): def inner(): print('hi') func() return inner...

2018-11-05 15:16:54 116

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除