上一页 1 ··· 154 155 156 157 158 159 160 161 162 ··· 181 下一页
摘要: import pypinyin # 不带声调的(style=pypinyin.NORMAL) def pinyin(word): s = '' for i in pypinyin.pinyin(word, style=pypinyin.NORMAL): s += ''.join(i) return 阅读全文
posted @ 2021-01-31 14:21 myrj 阅读(1048) 评论(0) 推荐(1) 编辑
摘要: 1.确认安装位置:D:\Anaconda3 2.进入: D:\Anaconda3\Scripts 3.pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pypinyin 阅读全文
posted @ 2021-01-31 14:17 myrj 阅读(464) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2021-01-31 10:08 myrj 阅读(57) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/env python3 # -*- coding: utf-8 -*- '''对于单个字符的编码,Python提供了ord()函数获取字符的整数表示,chr()函数把编码转换为对应的字符: 并不局限于ascii编码 由于Python的字符串类型是str,在内存中以Unicode 阅读全文
posted @ 2021-01-30 22:01 myrj 阅读(166) 评论(0) 推荐(0) 编辑
摘要: #实时监控剪贴板内容的变化,并替换其中的回车,换行,逗号,再写入剪切板,以供使用。 import pyperclip import time last_string = pyperclip.paste() while True: # 检测频率 time.sleep(0.2) string = pyp 阅读全文
posted @ 2021-01-30 21:42 myrj 阅读(676) 评论(0) 推荐(0) 编辑
摘要: '''pandas 中 inplace 参数在很多函数中都会有,它的作用是:是否在原对象基础上进行修改 ​ inplace = True:不创建新的对象,直接对原始对象进行修改; ​ inplace = False:对数据进行修改,创建并返回新的对象承载其修改结果。 默认是False,即创建新的对象 阅读全文
posted @ 2021-01-30 08:46 myrj 阅读(143) 评论(0) 推荐(0) 编辑
摘要: import aircv as ac import matplotlib.pyplot as plt '''imshow()函数格式为: matplotlib.pyplot.imshow(X, cmap=None) X: 要绘制的图像或数组。 cmap: 颜色图谱(colormap), 默认绘制为R 阅读全文
posted @ 2021-01-29 07:29 myrj 阅读(239) 评论(0) 推荐(0) 编辑
摘要: arrarray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])arr1array([0, 1, 2, 3, 4])np.intersect1d(arr,arr1)#计算数组ARR ARR1的交集,并排序array([0, 1, 2, 3, 4])np.union1d(arr,arr 阅读全文
posted @ 2021-01-28 07:30 myrj 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 百分位数,统计学术语,如果将一组数据从小到大排序,并计算相应的累计百分位,则某一百分位所对应数据的值就称为这一百分位的百分位数。运用在教育统计学中,例如表现测验成绩时,称PR值。分位数是以概率将一批数据进行分割比如说,这里有一组6个同学的分数为[12, 31, 22, 61, 52, 88],然后我 阅读全文
posted @ 2021-01-28 07:09 myrj 阅读(1548) 评论(0) 推荐(0) 编辑
摘要: def gongyueshu(m,n): if m<n: m,n=n,m elif m==n: return m if m/n==int(m/n): return n else: for i in range(n,0,-1): if m/i==int(m/i) and n/i==int(n/i): 阅读全文
posted @ 2021-01-26 21:55 myrj 阅读(283) 评论(0) 推荐(0) 编辑
上一页 1 ··· 154 155 156 157 158 159 160 161 162 ··· 181 下一页