方法python index find

列表数据类型的内置方法

列表数据类型的内置方法 1.作用 列表的作用就是可以描述多个值,就比如一个人可以有很多的爱好 2.定义方式 hobby_list = ['play', 'swimming', 'dancing'] print(hobby_list) lt = list('randysun') print(lt) 3 ......
类型 方法 数据

数字、字符串类型内置方法

数据类型 1为什么要有数据类型 ​ 对于不同类型的变量需要用不同的数据类型去描述 ​ 常用:数字类型、字符串、列表、字典、布尔值 1.1数据类型的内置方法 1.1.1 整型 作用:年龄/身份证号码/身高/体重…… 定义方式: y = 10 id_num = 5201314 x = int(10) z ......
字符串 字符 类型 数字 方法

【Python&GIS】基于Python批量合并矢量数据

老样子最近有项目需要将N个矢量文件合并成一个,总不能用ArcGIS一个个导入吧。所以我就想着用Python编个程序实现批量合并矢量。我之前也发了一些关于Python操作矢量数据的文章:【Python&GIS】Python处理矢量数据的基本操作(查询、修改、删除、新建),如果大家感兴趣可以去我的主页看... ......
Python 矢量 数据 GIS amp

Python深浅拷贝

Python深浅拷贝 拷贝/浅拷贝/深拷贝 只针对可变数据类型 拷贝(赋值) 当lt2为lt的拷贝对象时,lt内的可变类型变化,lt2变化;lt内的不可变类型变化,lt2变化 简单的赋值 lt = [1, 2, 3] lt2 = lt lt.append(4) print(lt) # 因为列表是可变 ......
深浅 拷贝 Python

uni-app中的生命周期方法

重点面试题:uni-app中的生命周期方法 uni-app中的生命周期方法(方法名固定,在某个确定的时间点会自动调用)分为三组: 第一组:整个应用程序的生命周期方法 —— App.vue —— 高仿微信小程序 onLaunch():整个应用程序启动了 onShow():应用程序显示出来,例如:第一次 ......
周期 uni-app 生命 方法 uni

python实现可视化的MD5、sha256哈希加密小工具

python实现可视化的MD5、sha256哈希加密小工具,分享给大家,具体如下: 效果图: 刚启动的状态 超过十条不全量显示 import hashlib import tkinter as tk #窗口控制 windowss=tk.Tk() windowss.title('Python_md5' ......
工具 python MD5 256 sha

Unknown collation: 'utf8_0900_ai_ci' 的解决方法

Unknown collation: 'utf8_0900_ai_ci' 解决方法 Unknown collation: 'utf8_0900_ai_ci' 在使用 Navicat导入sql脚本的时候出现报错 Unknown collation: 'utf8_0900_ai_ci' 原因:当前要导入 ......
collation Unknown 方法 ai_ci 39

python selenium chrome 清缓存

from selenium import webdriver # 创建Chrome WebDriver实例 driver = webdriver.Chrome() # 执行CDP命令清除浏览器缓存 driver.execute_cdp_cmd('Network.clearBrowserCookies ......
缓存 selenium python chrome

深入理解 Python 虚拟机:进程、线程和协程

在本篇文章当中我们将通过分析部分源代码来详细分析 Python 当中的进程、线程和协程,重点讨论线程的创建过程和协程是如何被使用的。 ......
线程 进程 Python

python selenium 在新tab页打开URL

from selenium import webdriver # 启动浏览器驱动器 driver = webdriver.Chrome() # 打开一个新标签页 driver.execute_script("window.open('about:blank', '_blank')") # 切换到新标 ......
selenium python URL tab

使用Python指定列提取连续6位数据的单号(上篇)

大家好,我是皮皮。 一、前言 前几天在Python最强王者交流群【哎呦喂 是豆子~】问了一个Python数据提取的问题,一起来看看吧。 大佬们请问下 指定列提取连续6位数据的单号(该列含文字、数字、大小写字母等等),连续数字超过6位、小于6位的数据不要,这个为啥有的数据可以提取 有的就提取不出来? ......
单号 上篇 数据 Python

Python-操作kerberos验证的kafka

本笔记为python操作kerberos认证的kafka的操作方法,此仅记录作为使用者,连接客户提供的kafka并进行操作的流程。 1、依赖安装: python相关依赖库: pip3 install kafka-python pip3 install gssapi 系统(镜像):需要安装kerber ......
kerberos Python kafka

网站部署SSL证书后无法使用https访问的解决方法

网站要启用https加密访问,则需安装部署有效的SSL证书。但有时我们在服务器上安装部署SSL证书后,使用https协议访问网站,可能会出现页面加载缓慢、空白或提示 “无法访问”等问题,这时该如何解决? 网站部署SSL证书后无法使用https访问的可能原因及解决方法 1、服务器防火墙未开启443端口 ......
证书 方法 https 网站 SSL

[922] Implementation of zooming to selected features by Python

ref: ArcPy.mp Get Selected Features Extent ref: Python/ArcPy classes/Geometry # Set the path to your project file (.aprx) project_file = r"Map 1.3 Her ......

Windows Python 访问达梦数据库(操作示例)

Windows Python 访问达梦数据库(操作示例) 一、前提条件 本篇博客以访问本地达梦数据库(DM8)为基础进行演示。(前提:本地已经安装了 DM8 数据库,并配置了相应的 Python 访问环境!) 关于 Windows 安装达梦数据库,请参考博客:Windows 安装 达梦数据库 关于 ......
示例 Windows 数据库 数据 Python

在Java中,可以使用`java.nio.file`包中的`Files`类来进行文件搜索。以下是一种模糊搜索文件的方法

在Java中,可以使用`java.nio.file`包中的`Files`类来进行文件搜索。以下是一种模糊搜索文件的方法: ```javaimport java.io.IOException;import java.nio.file.*;import java.nio.file.attribute.B ......
文件 方法 Files Java java

Python + Selenium + Firefox 使用代理 auth 的用户名密码授权

Python + Firefox + 插件(closeproxy.xpi) 其中,closeproxy.xpi文件,需要Google、Bing搜下都能搜到下载地址 完整的测试代码如下: from selenium import webdriver from selenium.webdriver.fi ......
Selenium 用户名 密码 Firefox 用户

Windows 10连接网络打印机报错“0x0000011b”的解决方法

网络打印,win10/11都经常遇到这样那样的问题。今天遇到一台新装的windows 10系统连接网络打印机报错:0x0000011b 网上查了一圈,普遍说的是这个情况,微软官方介绍:通过命名管道使用 RPC 也就是网上说的最多的注册表方式: Windows Registry Editor Vers ......

关于Python的打包与编译

1、nuitka 编译成一个so文件 nuitka3 --module --include-module=target_file_or_dir target_file_or_dir 2、compileall 编译成pyc python3 -m compileall -b <dir> # 删除相关的p ......
Python

Django Message 组件使用方法源码分析

目录[Django Message超全总结教程]1.使用方法1.1 基础配置 [Django Message超全总结教程] 1.使用方法 1.1 基础配置 INSTALLED_APPS = [ ... 'django.contrib.messages', ... ] # 在django settin ......
使用方法 组件 源码 Message 方法

Python3+selenium3+Firefox 设置浏览器headless模式运行+下载文件

设置Firefox headless模式 def setUp(self): # Firefox headless模式运行 options = webdriver.FirefoxOptions() options.add_argument('-headless') self.driver = webd ......

python 文件拆分与合并

文件拆分与合并 有的时候,存储和传输对文件的大小有约束,这个时候就可以使用文件拆分与合并 import glob import sys # chunk_size的单位是byte def split_file(file_path, chunk_size): with open(file_path, ' ......
文件 python

Windows Python 访问达梦数据库(环境配置)

Windows Python 访问达梦数据库(环境配置) 一、前提条件 本篇博客以访问本地达梦数据库(DM8)为基础进行演示。(前提:本地已经安装了 DM8 数据库!) 关于 Windows 安装达梦数据库,请参考博客:Windows 安装 达梦数据库 关于 Docker 安装达梦数据库,请参考博客 ......
Windows 环境 数据库 数据 Python

【Python&RS】基于Python批量镶嵌拼接遥感影像/栅格数据

​ 我之前分享过【Python&RS】基于GDAL镶嵌拼接遥感影像,但是没有加入批量处理的代码。最近正好有这个需求,所以就对原来的代码进行了优化加入了批量拼接的代码。现在只需输入一个文件夹即可将其中的影像全部镶嵌起来。 ......
栅格 Python 遥感 影像 数据

[921] Replace texts, copy formats, align paragraphs in a Word document by Python

The whole steps of this function are as follows: Open the Word document. Replace the text with the new text. Copy the format from the source cell to t ......
paragraphs document Replace formats Python

electron打包报错的解决方法

报错信息: An unhandled rejection has occurred inside Forge:Error: Failed with exit code: 1���ڳ��Դӡ�eletest.nuspec�����ɳ������Authors is required.Descripti ......
electron 方法

Python猴子补丁

Python猴子补丁 介绍 猴子补丁是一种替换方法的方式。因为python是动态语言,所以我们在方法执行之前,可以将方法替换,以达到我们期望的结果。需要理解的是,python的方法在加上括号之前,代表的的只是方法的内存,可以被当做一个变量进行传递。 使用 # 示例class Test: a = 1 ......
猴子 补丁 Python

[918] Copy the formatting from one cell in a table of a Word document to another cell in Python

To copy the formatting from one cell in a table of a Word document to another cell, you can use the python-docx library in Python. Here's a step-by-st ......
cell formatting document another Python

[919] Change the horizontal alignment of a cell to center within a table of a Word document using Python

To change the horizontal alignment of a cell to center within a table of a Word document using Python and the python-docx library, you can set the ali ......
horizontal alignment document Change Python

[920] Copy the font style from one cell in a table of a Word document to another cell using Python

To copy the font style from one cell in a table of a Word document to another cell using Python and the python-docx library, you can access the font p ......
cell document another Python style