自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(7)
  • 收藏
  • 关注

原创 python内部色彩总结

按个人喜好总结,并不包括所有颜色。黑色由深到浅'black': '#000000','dimgray': '#696969','gray': '#808080','darkgray': '#A9A9A9','silver': '#C0C0C0','lightgray': '#D3D3D3','gainsboro':

2021-03-24 15:17:45 1393

原创 python读取txt数据

读取数据模板:代码:建立read_txt(file_name)函数def read_txt(file_name): database=[] database2=[] with open('pythontest.txt','r') as f: #可省略f.close() datas=f.readlines() #按行读出 for data in datas: data1=data.strip(

2021-03-16 16:06:06 313

原创 python图像处理

import osimport numpy as npimport matplotlib.pyplot as plt from openpyxl import Workbookdef find_file(filepath): os.chdir(filepath) all_filename=os.listdir() all_filename_new=[] for i in all_filename: if os.path.splitext(i)[1]

2020-12-17 08:37:41 210 2

原创 python PIL模块使用案例

整体思路:求解的所有文件固定位置灰度值平均值,并作图from PIL import Imageimport osimport numpy as npimport matplotlib.pyplot as plt import matplotlib.animation as anios.chdir('D:\python\work\工作平台\diff-gate time') #建立所有文件名称的list,使用循环异常打开all_filename=os.listdir()print(al

2020-12-04 14:24:50 160

原创 python求一组数据的极大值

代码;def local_maximum(list_1): a=len(list_1) if a==0: return 'error' if a==1: return list_1 if a==2: if list_1[0]>list_1[1]: return list_1[0] elif list_1[0]<list_1[1]: return lis

2020-12-03 10:53:40 1560

原创 几个简单的例子

作业from numpy import *#把名字和缺的东西补全def studentname(myName,myEmail,myBBUsername): myName='liufengli' myEmail='xxx@xxx' myBBUsername='xxxxxx' return myName,myEmail,myBBUsername#第一个问题def calculateAverage(list_1): a=mean(list_1) re

2020-11-05 17:57:42 726

原创 python通过imageio模块实现GIF动图制作

1.python语法实现解析使用imageio实现动图制作主要分为两步:1.筛选要制作动图的图片,2.通过imageio.mimsave()函数实现GIF制作。1.1 筛选制作动图的图片代码:def seek_imagename(suffix): image_list=[] allfile_name=os.listdir() for i in allfile_name: if os.path.splitext(i)[1] == suffix:

2020-10-15 14:20:34 7311

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除