随笔分类 -  python

python 获取系统时间,新建时间目录
摘要:import datetime import os theTime = datetime.datetime.now() print(theTime) theTime = str(theTime) date_split = theTime.strip().split(' ') date_today = 阅读全文

posted @ 2020-07-21 09:22 Maddock 阅读(416) 评论(0) 推荐(0)

在Ubuntu下后台持续运行Python程序
摘要:后台启动Python脚本可以使用下面的命令来启动上面的脚本,让Python在后台运行。 nohup python -u main.py > test.out 2>&1 &1来解释一下这几个命令的参数。这一段来自http://blog.csdn.net/tswisdom/article/details 阅读全文

posted @ 2020-07-18 18:52 Maddock 阅读(1895) 评论(0) 推荐(0)

matlab与python读取tiff文件
摘要:matlab python 阅读全文

posted @ 2019-01-22 20:44 Maddock 阅读(3824) 评论(0) 推荐(0)

Numpy 定义矩阵的方法
摘要:import numpy as np #https://www.cnblogs.com/xzcfightingup/p/7598293.html a = np.zeros((2,3),dtype=int) a = np.ones((2,3),dtype=int) a = np.eye(3)#3维单位矩阵 a = np.empty([2,3],dtype=int) a = np.rando... 阅读全文

posted @ 2018-09-14 08:51 Maddock 阅读(483) 评论(0) 推荐(0)

python 按照自然数排序遍历文件 python os.listdir sort by natural sorting
摘要:参考 https://stackoverflow.com/questions/4813061/non-alphanumeric-list-order-from-os-listdir Python for whatever reason does not come with a built-in wa 阅读全文

posted @ 2018-09-06 11:03 Maddock 阅读(821) 评论(0) 推荐(0)

numpy reshape resize用法
摘要:https://docs.scipy.org/doc/numpy/reference/generated/numpy.resize.html (100, 784)(100, 28, 28, 1)(100, 112, 112, 1) 阅读全文

posted @ 2018-08-15 10:09 Maddock 阅读(758) 评论(0) 推荐(0)

linux sh 读取文件内容,if判读语句,变量var打印
摘要:运行python的时候将程序PID写入文件,以方便kill程序。 sh 字符串匹配 https://blog.csdn.net/xy913741894/article/details/74355576 阅读全文

posted @ 2018-07-21 10:48 Maddock 阅读(603) 评论(0) 推荐(0)

python 读写二进制文件实例
摘要:本程序,首先写入一个矩阵到二进制文件中,然后读取二进制文件恢复到另外一个矩阵中。 阅读全文

posted @ 2018-07-16 23:51 Maddock 阅读(1294) 评论(0) 推荐(0)

python numpy访问行列元素的方法
摘要:[[ 2 1] [10 5]][1 5][10 5]5[[2]][Finished in 0.3s] 阅读全文

posted @ 2018-07-10 19:27 Maddock 阅读(477) 评论(0) 推荐(0)

numpy opencv matlab eigen SVD结果对比
摘要:参考 https://zhuanlan.zhihu.com/p/26306568 https://byjiang.com/2017/11/18/SVD/ http://www.bluebit.gr/matrix-calculator/ https://stackoverflow.com/questi 阅读全文

posted @ 2018-07-05 18:00 Maddock 阅读(1930) 评论(0) 推荐(0)

相似变换 SimilarityTransform 以及skimage源码
摘要:http://scikit-image.org/docs/dev/api/skimage.transform.html#skimage.transform.SimilarityTransform https://github.com/scikit-image/scikit-image/blob/ma 阅读全文

posted @ 2018-07-05 14:28 Maddock 阅读(3436) 评论(0) 推荐(0)

python 批量修改文件名
摘要:import os # with open("shijie_small_youtu_align_failed.txt","r") as face_file: # for line in face_file.readlines(): # srcpath = line.strip().split("/") # dstpath = "" # ... 阅读全文

posted @ 2018-07-05 10:32 Maddock 阅读(231) 评论(0) 推荐(0)

python numpy的transpose函数用法
摘要:#MXNET的N*C*H*W在numpy打印时比较直观#mxnet卷积层# 输入数据格式是:batch * inchannel * height * width# 输出数据格式是:batch * outchannel * height * width# 权重格式: output_channels * 阅读全文

posted @ 2018-07-03 19:22 Maddock 阅读(4479) 评论(0) 推荐(0)

python 百度图片爬虫
摘要:# -*- coding:utf-8 -*- #https://blog.csdn.net/qq_32166627/article/details/60882964 import requests import os import pinyin import simplejson def getManyPages(keyword,pages): params=[] ... 阅读全文

posted @ 2018-05-22 20:48 Maddock 阅读(417) 评论(0) 推荐(0)

python opencv 学习笔记
摘要:图片缩放 image=cv2.imread('test.jpg') res=cv2.resize(image,(32,32),interpolation=cv2.INTER_CUBIC) cv2.imshow('iker',res) cv2.imshow('image',image) cv2.wai 阅读全文

posted @ 2018-05-08 17:32 Maddock 阅读(319) 评论(0) 推荐(0)

Opencv-Python:图像尺寸、图像的读取、显示、保存与复制
摘要:Opencv-Python:图像尺寸、图像的读取、显示、保存与复制 原创 2017年11月23日 21:30:49 4440 原创 2017年11月23日 21:30:49 4440 在使用opencv的方法时,首先必须导入opencv包。新的opencv导入cv2,这里也和cv做了一个对比 [py 阅读全文

posted @ 2018-04-16 13:52 Maddock 阅读(19798) 评论(1) 推荐(1)

python文件夹批处理操作
摘要:如图所示,有一个test文件夹,里面有3个子文件夹,每个子文件夹中有若干图片文件 #场景1 读取一个文件夹中所有文件,存入到一个list表中 阅读全文

posted @ 2018-03-08 11:01 Maddock 阅读(6277) 评论(0) 推荐(0)

python中的矩阵、多维数组----numpy
摘要:https://docs.scipy.org/doc/numpy-dev/user/quickstart.html (numpy官网一些教程) numpy教程:数组创建 https://docs.scipy.org/doc/numpy-dev/user/quickstart.html (numpy官 阅读全文

posted @ 2018-03-05 15:17 Maddock 阅读(473) 评论(0) 推荐(0)

ubuntu16.04 安装caffe以及python接口
摘要:http://blog.csdn.net/qq_25073253/article/details/72571714http://blog.csdn.net/greed7480/article/details/68486039 首先在你要安装的路径下 clone :git clone https:// 阅读全文

posted @ 2017-11-16 10:59 Maddock 阅读(454) 评论(0) 推荐(0)

ubuntu 16.04 安装pycharm
摘要:Ubuntu16.04下安装Cuda8.0+Caffe+TensorFlow-gpu+Pycharm过程(Simple) ubuntu 16.04 安装pycharm 1、安装java jdk 直接打开终端,执行下面的命令; sudo add-apt-repository ppa:webupd8te 阅读全文

posted @ 2017-11-14 16:36 Maddock 阅读(3448) 评论(0) 推荐(0)

导航