https://blog.csdn.net/weixin_32572129/article/details/112536413 https://blog.csdn.net/qq_33431368/article/details/84777906 https://www.cnblogs.com/For ...
分类:
编程语言 时间:
2021-04-20 14:30:22
阅读次数:
0
写一个符合 Promise A+ 规范的 Promise 类型定义 // MyPromise.ts type resType = (value?: any) => void; type rejType = (reason?: any) => void; type executorType = (re ...
分类:
其他好文 时间:
2021-04-20 14:26:37
阅读次数:
0
Pyinstaller原理详解 什么是Pyinstaller Pyinstaller可以把Python程序打包成exe文件,可以在没有Python的电脑上运行,主要用于生产用。 Python.h! 在讲原理之前,我们讲一下python.h这个东东。 众所周知,Python是用C语言编写的,内部各种复 ...
分类:
其他好文 时间:
2021-04-20 14:07:38
阅读次数:
0
Python自带的random库 函数名称函数功能 random.randint(n,m) 产生n-m间的一个随机数 random.random() 产生0-1间的浮点数 random.uniform(1.1,5.4) 产生n-m间的浮点数 random.randrange(n,m,k) 产生n-m ...
分类:
编程语言 时间:
2021-04-19 15:47:15
阅读次数:
0
技巧一:字典排序 在python的中,字典里的元素(键值对)是没有排列顺序的,因此想要对字典里的元素进行排序的想法是错误的。但如果我们想要按键或值的顺序查看键值对,可以使用sorted函数进行排序,再将结果打印出来即可。 d = {'刘一':22, '陈二':20, '张三':15, '李四':19 ...
分类:
编程语言 时间:
2021-04-19 15:39:07
阅读次数:
0
Panda模块读取txt文本文件 使用pandas.read_csv函数 1. 如果txt文本中有表头(标题行) import panda as pd data = pd.read_csv('data.txt') print(data) 2. 如果txt文本中无表头 import panda as ...
分类:
编程语言 时间:
2021-04-19 15:38:55
阅读次数:
0
1.用Requests发送百度请求 新建一个requests_test.py文件,输入如下内容。 import requests #请求百度网页response = requests.get("https://www.baidu.com", data=None,timeout=10)print(re ...
分类:
其他好文 时间:
2021-04-19 15:38:03
阅读次数:
0
特殊属性 1 # 2 # @author:浊浪 3 # @version:0.1 4 # @time: 2021/4/17 9:34 5 # 6 7 8 class A: 9 pass 10 class B: 11 pass 12 class C(A,B): 13 def __init__(self ...
分类:
编程语言 时间:
2021-04-19 15:35:56
阅读次数:
0
Ubuntu 20.04 更换阿里源 sudo cd /etc/apt/sources.list /etc/apt/sources.list.b // 备份原始文件 sudo chmod 777 /etc/apt/sources.list // 修改文件权限 sudo vi /etc/apt/sou ...
分类:
系统相关 时间:
2021-04-19 15:25:14
阅读次数:
0
import xlwt my_workbook = xlwt.Workbook(encoding='utf-8') my_sheet1 = my_workbook.add_sheet('sheet1') for i in range(0, 9): # i:行号 for j in range(0, i ...
分类:
编程语言 时间:
2021-04-19 15:12:06
阅读次数:
0