第八课字符串中常用的方法:center方法#字符串方法:center#作用是:将字符串在一定的宽度区域内居中显示#这个方法和我们之前将的format中的^一样#^print("<"+"hello".center(30)+">")#<hello>#<hello>pri
分类:
其他好文 时间:
2020-01-05 09:44:30
阅读次数:
116
自动发掘dag实例 def process_file(self, filepath): mod_name, file_ext = os.path.splitext(os.path.split(filepath)[-1]) if file_ext != '.py': return try: log..... ...
分类:
其他好文 时间:
2020-01-04 20:39:44
阅读次数:
100
灰度图和RGB图 灰度图是一个二维数组,每个值都表示这个像素点的灰度值(0到255之间的一个值),数组的维度(shape)则表示这个图片的长宽(单位像素px),先看个例子 我们看一下显示的图片,会看到一个1。然后我们再去看data,你会发现也可以看到一个1。这是不是就很好理解了。 RGB图片是一个三 ...
分类:
其他好文 时间:
2020-01-03 12:44:12
阅读次数:
93
题目1 Python实现float数的四舍五入 def panf(f): if isinstance(f,float): #判断输入的数是否为float类型 isinstance(object, classinfo) 判断实例是否是这个类或者object是变量 b=int(str(f).split( ...
分类:
编程语言 时间:
2020-01-03 10:34:53
阅读次数:
85
微信授权获取code 1 入口文件 (其中,jumpUrl为获取code后返回处理的页面) <script> import { getOpenID } from "../../utils/access.js"; export default{ data(){ return {}, }, method ...
分类:
微信 时间:
2020-01-02 22:21:45
阅读次数:
336
<style> .time-range-contianer { display: inline-block; } </style>// html <div class="time-range-contianer"> <nz-timepicker [(ngModel)]="start" [nzForm ...
分类:
其他好文 时间:
2020-01-02 14:17:31
阅读次数:
143
import requests import webbrowser import matplotlib.pyplot as plot from urllib.request import urlopen with open('t1.txt','r')as f: x=f.read().split('\ ...
分类:
其他好文 时间:
2020-01-01 23:51:21
阅读次数:
81
1 input() # input()函数输入的任何量都会转为str类型,所以要映射为int l,r=map(int,input().split()) print(l, r, type(l)) # 输入 1 2 # 1 2 <class 'int'> View Code 2 sys.stdin.re ...
分类:
其他好文 时间:
2020-01-01 22:12:58
阅读次数:
126
join()和split()是两个互逆的函数 join语法格式: newstr = str.join(iterable) 各参数的含义如下: 1 newstr:表示合并后生成的新字符串; 2 str:用于指定合并时的分隔符; 3 iterable:做合并操作的源字符串数据,允许以列表、元组等形式提供 ...
分类:
其他好文 时间:
2020-01-01 20:16:05
阅读次数:
107
今天才发现IDEA中还有split view的功能,上网查的时候查到了很多莫名其妙的东西,实际上对想分屏显示的文件右键->Split Virtically/Split Horizontally 就可以啦。 ...
分类:
其他好文 时间:
2020-01-01 11:31:16
阅读次数:
307