![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
volunteer1024
业精于勤
展开
-
pythonista 3 学习
pythonista 3URL Scheme打开ios程序需要知道app的url scheme,如淘宝:taobao:// 具体查找方式:sharecuts.cn运行代码:import webbrowserwebbrowser.open('twitter://')或者import shortcutsshortcuts.open_url('twitter://')Reference官网:http://omz-software.com/pythonista/文官方档:http:/原创 2020-10-22 11:10:59 · 628 阅读 · 0 评论 -
pythonista安装stash
pythonista安装stash新建文件New - Empty Script - (命名stash.py)Create拷贝代码import requests as rexec(r.get('https://raw.githubusercontent.com/ywangd/stash/master/getstash.py').text)import requests as r;exec(r.get(‘https://raw.githubusercontent.com/ywangd/stash原创 2020-10-22 09:54:07 · 1287 阅读 · 0 评论 -
爬虫入门
爬虫入门urlliburllib.request.urlopen()urllib.request.Request()urlliburllib.request.urlopen()可以直接得到网页html信息>>> urlopen(url1).read()# 格式化显示html代码>>> urlopen(url1).read().encode("utf...原创 2019-10-09 15:19:23 · 97 阅读 · 0 评论 -
python hashlib库 hmac库加密
hash 256的使用import hashlibhash = hashlib.sha256()hash.update('asd'.encode())print(hash.hexdigest())hash = hashlib.sha256()hash.update('a'.encode())hash.update('s'.encode())hash.update('d'.enc...原创 2019-09-01 08:02:30 · 500 阅读 · 0 评论 -
python-list
append()末尾添加一个元素apple = list('apple')apple.append([1, 2])print(apple)# result['a', 'p', 'p', 'l', 'e', [1, 2]]apple = list('apple')apple.append(1)print(apple)# reuslt['a', 'p', 'p', 'l', ...原创 2019-08-13 09:11:14 · 81 阅读 · 0 评论 -
matplotlib命令与格式:tick_params参数刻度线样式设置
matplotlib命令与格式:tick_params参数刻度线样式设置原文:https://blog.csdn.net/helunqu2017/article/details/78736554import csvimport matplotlib.pyplot as pltfrom datetime import datetimefile_path = r'E:\workplace\...原创 2019-08-11 11:19:20 · 1325 阅读 · 0 评论 -
python-使用API
python-使用APIGitHubAPI LimitAPI请求数据GitHubAPI Limithttps://api.github.com/rate_limit返回结果{ "resources": { "core": { "limit": 60, "remaining": 60, "reset": 1565748069 },...原创 2019-08-14 09:49:23 · 165 阅读 · 0 评论 -
Python文档
3. Python的非正式介绍数字/ 除法运算永远返回浮点数类型>>> print(1 / 1)1.0// 取整% 取余** 乘方复数 使用后缀 j 或者 J 就可以表示虚数部分Python中提供浮点数的完整支持;包含多种混合类型运算数的运算会把整数转换为浮点数>>> 4 * 3.75 - 114.0...原创 2019-08-13 22:47:21 · 72 阅读 · 0 评论 -
python学习------matplotlib
matplotlib绘制折线图绘制散点图随机漫步绘制折线图import matplotlib.pyplot as pltsquare = [1, 4, 9, 16, 25]input_square = [1, 2, 3, 4, 5]# 同时传入x,y坐标plt.plot(input_square, square, linewidth=5, color='red')plt.titl...原创 2019-07-30 20:42:17 · 108 阅读 · 0 评论 -
python学习------pythonic
pythonnic-python技巧交换两个数顺序同时判断多个标志位合并两个列表列表逆序输出交换两个数顺序a,b = b,a同时判断多个标志位a, b, c = 0, 1, 1if 1 in (a, b, c): print("passed")if any((a, b, c)): print('passed')if a or b or c: print...原创 2019-07-15 18:47:32 · 122 阅读 · 0 评论 -
Python学习(3)--正则表达式
正则表达式读取文件匹配精准匹配模糊匹配通配符参考资源读取文件加拿大诗歌:THE MAN FROM SNOWY RIVERhttp://members.iinet.net.au/~newtoy/snowyriver.htmimport rewith open('D:\\python\\txt\\the_man_from_snowy_river') as txt: contents...原创 2019-07-05 22:40:26 · 282 阅读 · 0 评论 -
Python学习(0)
python学习(0)python之禅python之禅import thisThe Zen of Python, by Tim PetersBeautiful is better than ugly.Explicit is better than implicit.Simple is better than complex.Complex is better than compl...原创 2019-06-28 22:29:14 · 61 阅读 · 0 评论 -
Python学习(2)--pygame游戏
pygam游戏pygame游戏开发安装可能出现的报错pygame最小游戏框架小球运动Rect对象version1version2version3屏幕绘制pygame游戏开发安装windows terminalpip install pygame可能出现的报错module 'pygame' has no attribute 'init'http://www.51testing.co...原创 2019-07-03 18:49:11 · 373 阅读 · 0 评论 -
Python学习(1)
Python列表列表#列表bycicle = ["1","2","3"]print(bycicle)print(bycicle[0])print(bycicle[-1]) #下标为-1即为最后一列.空列表会返回索引错误#修改列名bycicle[0] = "0"print(bycicle)#元素添加到列表末尾bycicle.append("4")print(bycicle)...原创 2019-06-16 13:20:41 · 317 阅读 · 0 评论