selenium python web

python 计算一个字符串中每个字符出现的次数

def count_str(a): count = {} for i in a: if i in count: count[i] += 1 else: count[i] = 1 return count a = 'ASAAAAAADDDDDDDDDDDDDDDFFFFFFFFFFFFFFFFFFFF ......
字符 字符串 次数 python

python篇-kivy-kv

1,Label 遗留问题:加上 markup: True之后,文本不显示了 解决方法:把text_size和color属性注释掉就出现了 kivytest.py # coding:utf-8 from kivy.app import App from kivy.uix.floatlayout imp ......
kivy-kv python kivy kv

Python装饰器

简单装饰器 1.装饰器的本质就是一个函数,在不改变原函数功能的情况下,动态为函数增加功能 def info(func): --本质就是一个函数 print(f'调用函数 -> {func.__name__}') return func --为函数增加一个打印日志的功能:显示调用的函数名称 原函数 @ ......
Python

二分图最优匹配——Python实现

二分图是一种特殊的图结构,二分图可以描述和解决许多实际问题,帮助我们做出更有效的决策和优化方案。二分图在经济与管理中具有重要的作用,譬如二分图在市场与供应链管理中发挥着关键作用,在供应链中二分图可以用来描述供应商与分销商之间的关系,帮助确定最佳的供应商-分销商匹配方案。通过建立供应商与分销商之间的连 ......
Python

python中dict.copy()用法

# 浅拷贝和深拷贝 浅拷贝:只会对最表层的进行拷贝,也就是相当于二者共有 深拷贝:会申请一块新的内存进行存储,相当于自己独占 对于dict的copy来说,是对最表层的键值对进行了深拷贝,举例来说: ```python a = {'one': 1, 'two': 2, 'three': [1,2,3] ......
python dict copy

在PyInstaller中打包Python代码

在PyInstaller中打包Python代码 在实际开发中,我们经常需要将Python代码打包成可独立运行的可执行文件,以便更方便地分享和部署。`PyInstaller`是一个常用的Python打包工具,可以将Python脚本打包成单个可执行文件。 ##### 以下是如何使用PyInstaller ......
PyInstaller 代码 Python

Python框架Flask

# 项目配置 ### debug模式 ![](https://img2023.cnblogs.com/blog/3027493/202306/3027493-20230624200009941-702819214.png) ![](https://img2023.cnblogs.com/blog/3 ......
框架 Python Flask

python入门(八):文件操作

# Python文件操作指南 - [原文](https://www.fivcan.com/) | [大纲](https://www.fivcan.com/index.php/2023/06/20/python入门(一):python入门大纲/) | [首页](./index.php) ![image ......
文件 python

python入门(九):异常处理

# Python异常处理指南 - [原文](https://www.fivcan.com/) | [大纲](https://www.fivcan.com/index.php/2023/06/20/python入门(一):python入门大纲/) | [首页](./index.php) ![image ......
python

python入门(五):流程控制语句

# Python控制流语句指南 - [原文](https://www.fivcan.com/) | [大纲](https://www.fivcan.com/index.php/2023/06/20/python入门(一):python入门大纲/) | [首页](./index.php) ![imag ......
语句 流程 python

python入门(七):函数和模块

# Python函数和模块指南 - [原文](https://www.fivcan.com/) | [大纲](https://www.fivcan.com/index.php/2023/06/20/python入门(一):python入门大纲/) | [首页](./index.php) ![imag ......
函数 模块 python

python入门(十):面向对象编程

# Python面向对象编程指南 - [原文](https://www.fivcan.com/) | [大纲](https://www.fivcan.com/index.php/2023/06/20/python入门(一):python入门大纲/) | [首页](./index.php) ![ima ......
对象 python

python入门(六):数据结构和容器

# Python数据结构和容器指南 - [原文](https://www.fivcan.com/) | [大纲](https://www.fivcan.com/index.php/2023/06/20/python入门(一):python入门大纲/) | [首页](./index.php) ![im ......
数据结构 容器 结构 数据 python

python入门(四):运算符和表达式

# Python运算符和表达式指南 - [原文](https://www.fivcan.com/) | [大纲](https://www.fivcan.com/index.php/2023/06/20/python入门(一):python入门大纲/) | [首页](./index.php) ![im ......
运算符 表达式 python

python入门(一):python入门大纲

## 什么是Python? - [原文](https://www.fivcan.com/) | [大纲](https://www.fivcan.com/index.php/2023/06/20/python入门(一):python入门大纲/) | [首页](./index.php) ![image] ......
python 大纲

python入门(二):python安装和pycharm安装

## Python的安装 - [原文](https://www.fivcan.com/) | [大纲](https://www.fivcan.com/index.php/2023/06/20/python入门(一):python入门大纲/) | [首页](./index.php) ![image]( ......
python pycharm

python入门(三):变量和数据类型

# 变量和数据类型指南 - [原文](https://www.fivcan.com/) | [大纲](https://www.fivcan.com/index.php/2023/06/20/python入门(一):python入门大纲/) | [首页](./index.php) ![image](h ......
变量 类型 数据 python

python学习日志,五大容器的比较

# 列表的使用: 1. 列表.append(元素):向列表中追加一个元素 2. 列表.extend(容器): 将数据容器的内容依次取出,追加到列表尾部 3. 列表.insert(下标,元素):在指定下标处,插入指定的元素 4. del列表[下标]:删除列表指定下标元素 5. 列表.pop(下标):删 ......
容器 python 日志

Python random模块

## Python random模块 ### random模块 > 用于生成随机数 ```python import random print(random.random()) print(random.randint(1, 100)) print(random.randrange(1,100)) ......
模块 Python random

python实现文件批量压缩

## python实现文件夹下文件的批量压缩 ### 初级版本 压缩之前 ![image-20230624173118646](https://img2023.cnblogs.com/blog/2637088/202306/2637088-20230624175641855-81910240.png ......
文件 python

Python configparser模块

## Python configparser模块 > 用于生成和修改常见配置文档,当前模块的名称在 python 3.x 版本中变更为 configparser。 - 常见文档格式如下 ``` [DEFAULT] ServerAliveInterval = 45 Compression = yes ......
configparser 模块 Python

0.组织Python代码的技巧

# 组织Python代码技巧 [英文版链接](https://guicommits.com/organize-python-code-like-a-pro/) ## 一.构建Python项目 首先关注目录结构、文件命名和模块组织。 我 建议把所有的模块都放在src目录下,所有测试都和它并排。 pyt ......
代码 技巧 Python

Python json和pickle模块

## json和pickle模块 > - 用于序列化的两个模块 ### 序列化模块:json 和 pickle ``` json,用于字符串 和 python数据类型间进行转换 pickle,用于python特有的类型 和 python的数据类型间进行转换 Json模块提供了四个功能:dumps、d ......
模块 Python pickle json

Python潮流周刊#8:Python 3.13 计划将解释器提速 50%!

你好,我是猫哥。这里每周分享优质的 Python 及通用技术内容,部分为英文,已在小标题注明。(标题取自其中一则分享,不代表全部内容都是该主题,特此声明。) 首发于我的博客:[https://pythoncat.top/posts/2023-06-24-weekly](https://pythonc ......
解释器 Python 周刊 潮流 3.13

【python基础】文件-初识文件

文本文件可存储的数据量是非常多的。每当需要分析或修改存储在文件中的信息时,首先就是读取文件到内存中,为此可以一次性读取文件的全部内容,也可以以每次一行的方式逐步读取。 # 1.读取文件 ## 1.1读取整个文件 要读取文件,需要一个包含几行文本的文件。下面首先来创建一个poems文本文件,,里面存储 ......
文件 基础 python

Google Cloud |Web开发

为啥选择使用 Durable 耐用性 available scalable - distributed storage 可拓展性 inexpensive 为什么不把音视频直接放进DB中 可以用GCS 放DB比放入file system的速度慢 太大了 无法做数据库优化操作,比如说添加index GC ......
Google Cloud Web

Python subprocess模块

## Python subprocess模块 ### subprocess模块 可以执行shell命令的相关模块和函数有: ```python os.system os.spawn* os.popen* --废弃 popen2.* --废弃 commands.* --废弃,3.x中被移除 ``` 以 ......
subprocess 模块 Python

Python shutil模块

## Python shutil模块 > 高级的 文件、文件夹、压缩包 处理模块 ### 将文件内容拷贝到另一个文件中,可以部分内容 ```python shutil.copyfileobj(fsrc, fdst[, length]) ``` - 例子 ```python import shutil ......
模块 Python shutil

Python hashlib模块

## Python hashlib模块 ### hashlib模块 * 用于加密相关的操作,代替了md5模块和sha模块 * 主要提供 SHA1, SHA224, SHA256, SHA384, SHA512 ,MD5 算法 ```python # md5废弃 import md5 hash = m ......
模块 hashlib Python

Python os模块

## Python os模块 ### os模块 > 用于提供系统级别的操作 ```python os.getcwd() # 获取当前工作目录,即当前python脚本工作的目录路径 os.chdir("dirname") # 改变当前脚本工作目录;相当于shell下cd os.curdir # 返回当 ......
模块 Python