上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 17 下一页
摘要: #! /usr/bin/env python # -*- coding: utf-8 -*-# import re s = "你好2021" content = re.sub(r"(\S+?)(\d+)", r"**\1** ##\2##", s) print(content) 阅读全文
posted @ 2021-08-12 16:08 不能说的秘密 阅读(90) 评论(0) 推荐(0)
摘要: 读取和生成json文件 from json import load,dumps # 读取json文件 def read_json(file_path): file_json = None try: with open(file_path, mode='r', encoding="utf-8") as 阅读全文
posted @ 2021-08-11 09:02 不能说的秘密 阅读(218) 评论(0) 推荐(0)
摘要: 问题 直接使用pyinstaller -F test.py 进行打包,之后运行exe会报错 解决方法 将dat文件打包到exe中 修改spec文件 # -*- mode: python -*- block_cipher = None face_models = [ ('.\\face_recogni 阅读全文
posted @ 2021-08-09 11:15 不能说的秘密 阅读(352) 评论(0) 推荐(0)
摘要: pyyaml模块 pip install pyyaml 在安装的时候是pyyaml,但是在使用的时候是yaml. 具体使用 #! /usr/bin/env python # -*- coding: utf-8 -*-# # # Name: tools_01 # Author: yunhgu # Da 阅读全文
posted @ 2021-08-06 16:47 不能说的秘密 阅读(528) 评论(0) 推荐(0)
摘要: 问题所在 代码中控制条输出含有中文,引起编码错误 解决 打包的时候去修改gooey源码Libsite-packages/gooey/gui/processor.py def _forward_stdout(self, process): ''' Reads the stdout of `proces 阅读全文
posted @ 2021-07-26 15:46 不能说的秘密 阅读(636) 评论(0) 推荐(0)
摘要: NumPy 的统计函数可以实现对整个数组或者是沿着数组轴方向的统计计算,常用的统计函数有求最大值和最小值,求和与平均值,计算百分位数、中位数、标准差和方差等。 求最大值和最小值的函数 在 NumPy 中,求数组最大值的函数是 amax() 和 nanmax(),求数组最小值的函数是 amin() 和 阅读全文
posted @ 2021-07-26 09:32 不能说的秘密 阅读(2562) 评论(0) 推荐(0)
摘要: 一、壁纸 1.WallHaven:https://wallhaven.cc/ 2.10Wallpaper:https://www.10wallpaper.com/ 3.alphacoders:https://wall.alphacoders.com/?lang=Chinese 4.极简壁纸:http 阅读全文
posted @ 2021-07-22 17:20 不能说的秘密 阅读(738) 评论(1) 推荐(0)
摘要: 一、无敌全能综合导航站 1.虫部落(聚合搜索平台) https://search.chongbuluo.com 2.科塔学术(专业学术导航) https://site.sciping.com 3.码力全开(设计资源导航) https://design.maliquankai.com 4.SeeSee 阅读全文
posted @ 2021-07-22 17:03 不能说的秘密 阅读(3017) 评论(0) 推荐(0)
摘要: import numpy as np #创建数组arr arr = np.array([3,7,5,6,8,9,7,2,6,2,5,9,10]) print('第1个数组:',arr) print('第1个数组的去重(去重后的值)数组:') arr_u = np.unique(arr) print( 阅读全文
posted @ 2021-07-22 11:06 不能说的秘密 阅读(711) 评论(0) 推荐(0)
摘要: 原字符串左侧对齐, 右侧补零: str.ljust(width,'0') input: '789'.ljust(32,'0') output: '78900000000000000000000000000000' 原字符串右侧对齐, 左侧补零: 方法一: str.rjust(width,'0') i 阅读全文
posted @ 2021-07-22 10:39 不能说的秘密 阅读(1186) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 13 ··· 17 下一页