随笔 - 1759  文章 - 0  评论 - 109  阅读 - 430万

随笔分类 -  Python

1 2 3 4 5 ··· 12 下一页
python判断文件夹是否存在不存在创建
摘要:(39条消息) python 判断目录和文件是否存在,若不存在即创建_仰望神的光的博客-CSDN博客 判断目录是否存在 import os dirs = '/Users/joseph/work/python/' if not os.path.exists(dirs): os.makedirs(dir 阅读全文
posted @ 2022-11-22 13:36 一杯明月 阅读(612) 评论(0) 推荐(0) 编辑
python移动文件或文件夹操作
摘要:(39条消息) python 移动文件或文件夹操作_北京小辉的博客-CSDN博客 6.移动文件(目录) shutil.move(“oldpos”,”newpos”) 阅读全文
posted @ 2022-11-22 13:01 一杯明月 阅读(693) 评论(0) 推荐(0) 编辑
Anaconda Python 环境查询,安装,卸载,克隆
摘要:(39条消息) Anaconda Python 环境查询,安装,卸载,克隆_编号1993的博客-CSDN博客 阅读全文
posted @ 2022-11-20 19:54 一杯明月 阅读(18) 评论(0) 推荐(0) 编辑
Python程序暂停
摘要:(39条消息) Python基础之程序暂停_zxnode的博客-CSDN博客_python暂停程序 当我们执行某些程序时,由于机器速度很快导致肉眼无法直接看到执行结果时程序便停止运行。这时候我们迫切需要在程序中暂停,专业术语叫做阻塞。下面列举几种常用的程序暂停方法: input()用法:直接在欲等待 阅读全文
posted @ 2022-10-31 00:20 一杯明月 阅读(4478) 评论(0) 推荐(0) 编辑
PCL错误提示:RuntimeError: : [pcl::PCDWriter::writeASCII] Could not open file for writing!
摘要:参考: (39条消息) PCL错误提示: what()::[pcl::PCDWriter::writeASCII] Could not open file for writing!_lykhahaha的博客-CSDN博客_[pcl::pcdwriter::writeascii] could not 阅读全文
posted @ 2022-10-30 19:50 一杯明月 阅读(310) 评论(0) 推荐(0) 编辑
python安装liblas
摘要:libLAS · PyPI pip install libLAS==1.8.1 阅读全文
posted @ 2022-10-30 19:14 一杯明月 阅读(60) 评论(0) 推荐(0) 编辑
python安装第三方包的方法
摘要:如果是.whl文件,则用下面的方法: 重新安装 python install liblas-1.8***.whl,安装成功 阅读全文
posted @ 2022-10-30 19:13 一杯明月 阅读(64) 评论(0) 推荐(0) 编辑
Python 正则表达式匹配数字及字符串中的纯数字
摘要:Python 正则表达式匹配数字 电话号码:\d{3}-\d{8}|\d{4}-\d{7} QQ号:[1-9][0-9]{4,} 中国邮政编码:[1-9]\d{5}(?!\d)身份证:\d{15}|\d{18}ip地址:\d+\.\d+\.\d+\.\d+ [1-9]\d* 正整数-[1-9]\d* 阅读全文
posted @ 2022-10-14 23:58 一杯明月 阅读(1144) 评论(0) 推荐(0) 编辑
python 修改图像大小和修改分辨率
摘要:python 修改图像大小和分辨率_51CTO博客_python修改图片分辨率 1 概念: 分辨率,指的是图像或者显示屏在长和宽上各拥有的像素个数。比如一张照片分辨率为1920x1080,意思是这张照片是由横向1920个像素点和纵向1080个像素点构成,一共包含了1920x1080个像素点。 dpi 阅读全文
posted @ 2022-09-28 13:33 一杯明月 阅读(2106) 评论(0) 推荐(0) 编辑
python中continue,break,exit的用法
摘要:(38条消息) python 判断后不执行任何语句_这样理解真是太透彻了,Python的for循环和while循环也就这么回事..._weixin_39583162的博客-CSDN博客 阅读全文
posted @ 2022-09-12 01:30 一杯明月 阅读(28) 评论(0) 推荐(0) 编辑
Python list列表删除元素(4种方法)
摘要:Python list列表删除元素(4种方法) (biancheng.net) (37条消息) Python一次性删除list中的一个或多个相同元素_Yale曼陀罗的博客-CSDN博客_python删除list多个元素 在 Python 列表中删除元素主要分为以下 3 种场景: 根据目标元素所在位置 阅读全文
posted @ 2022-09-11 10:52 一杯明月 阅读(6756) 评论(0) 推荐(0) 编辑
用Python复制文件的9个方法
摘要:用Python复制文件的9个方法 - 知乎 (zhihu.com) Python 中有许多“开盖即食”的模块(比如 os,subprocess 和 shutil)以支持文件 I/O 操作。在这篇文章中,你将会看到一些用 Python 实现文件复制的特殊方法。下面我们开始学习这九种不同的方法来实现 P 阅读全文
posted @ 2022-09-10 13:21 一杯明月 阅读(4761) 评论(0) 推荐(0) 编辑
python中判断列表中是否包含某个元素
摘要:在python中可以通过in和not in关键字来判读一个list中是否包含一个元素 theList = [‘a’,’b’,’c’]if ‘a’ in theList:print ‘a in the list’ if ‘d’ not in theList:print ‘d is not in the 阅读全文
posted @ 2022-09-10 12:25 一杯明月 阅读(368) 评论(0) 推荐(0) 编辑
Python把txt文件读入数组并存为numpy数组或列表
摘要:Python把txt文件读进数组并存为numpy数组或列表 1、读取数据,存为numpy数组: my_data = numpy.loadtxt('my_file.txt') 存为numpy数组以后,my_data的尺寸可以用my_data.shape进行查看,用numpy.reshape()进行修改 阅读全文
posted @ 2022-06-20 13:54 一杯明月 阅读(3806) 评论(0) 推荐(0) 编辑
Python-python中数组和列表读取一列的方法
摘要:转载自:https://blog.csdn.net/songyunli1111/article/details/78109976 在python中,普通的列表list和numpy中的数组array是不一样的,最大的不同是:一个列表中可以存放不同类型的数据,包括int、float和str,甚至布尔型; 阅读全文
posted @ 2022-06-20 12:12 一杯明月 阅读(4380) 评论(0) 推荐(0) 编辑
pip install 很慢
摘要:pip下载python库太慢怎么办? - 知乎 (zhihu.com) Python安装库太慢?配置好这个速度飞起 - 知乎 (zhihu.com) 经常听到初学python的小伙伴在抱怨,python安装第三方库太慢,很容易失败报错,如果安装pandas、tensorflow这种体积大的库,简直龟 阅读全文
posted @ 2022-06-20 10:57 一杯明月 阅读(729) 评论(0) 推荐(0) 编辑
如何让python程序暂停几秒钟
摘要:可以用两个线程来做这个事情,一个线程用来发网络包,另一个线程用来接收用户输入,然后用两个全局变量控制状态。 作者:二山的小馆er 链接:https://www.zhihu.com/question/366563329/answer/2099631519 来源:知乎 著作权归作者所有。商业转载请联系作 阅读全文
posted @ 2022-05-30 11:31 一杯明月 阅读(1183) 评论(0) 推荐(0) 编辑
python求平均值
摘要:import numpy as np #均值 np.mean(nums) #中位数 np.median(nums) 阅读全文
posted @ 2022-05-25 17:22 一杯明月 阅读(422) 评论(0) 推荐(0) 编辑
python设置图片标题
摘要:Matplotlib 轴标签和标题 | 菜鸟教程 (runoob.com) 我们可以使用 xlabel() 和 ylabel() 方法来设置 x 轴和 y 轴的标签。 实例 import numpy as npimport matplotlib.pyplot as pltx = np.array([ 阅读全文
posted @ 2022-05-25 16:45 一杯明月 阅读(2613) 评论(0) 推荐(0) 编辑
python读取图片、保存图片的方法
摘要:本文介绍一下,python读取图片、保存图片的方法。 工具/原料 python3.6(anaconda) matplotlib模块 opencv模块 pillow模块 photomosaic模块 方法/步骤 用opencv读取图片: import cv2 img = cv2.imread(path) 阅读全文
posted @ 2022-05-25 16:28 一杯明月 阅读(3335) 评论(0) 推荐(0) 编辑

1 2 3 4 5 ··· 12 下一页
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示