上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 45 下一页
摘要: 输入命令: sudo chmod 777 /Data 阅读全文
posted @ 2020-05-28 10:22 胸怀丶若谷 阅读(256) 评论(0) 推荐(0)
摘要: step1: 输入命令: sudo dpkg --add-architecture i386 step2: 1.切换成管理员权限: sudo su 2.打开源文件 vi /etc/apt/sources.list 3.修改文件内容 按下o建,代表从当前光标的下一行输入 输入:deb https:// 阅读全文
posted @ 2020-05-09 10:14 胸怀丶若谷 阅读(1875) 评论(0) 推荐(0)
摘要: point_x = [A_x, B_x, C_x, D_x] point_y = [A_y, B_y, C_y, D_y] points_tulpe = list(zip(point_x, point_y)) print(points_tulpe) >>>[(A_x,A_y),(B_x,B_y),( 阅读全文
posted @ 2020-05-07 13:29 胸怀丶若谷 阅读(5432) 评论(0) 推荐(0)
摘要: needdata = ' '.join(needdata.split()) 阅读全文
posted @ 2020-05-07 11:35 胸怀丶若谷 阅读(340) 评论(0) 推荐(0)
摘要: f3 = open(file=path,mode='rb') data = f3.read() # print(data) f3.close() result = chardet.detect(data) print(result) 结果: {'encoding': 'Big5', 'confide 阅读全文
posted @ 2020-05-07 10:34 胸怀丶若谷 阅读(233) 评论(0) 推荐(0)
摘要: linux环境自带有python2和python3 大部分与windows一致,不同的是激活环境: 在虚拟环境的上一级目录中,输入: source venv/bin/activate 阅读全文
posted @ 2020-05-07 10:22 胸怀丶若谷 阅读(1012) 评论(0) 推荐(0)
摘要: linux里没有那些度逻辑盘符比如说c: d: e: f: 这些.它用的是挂载在根目录/下的目录来进入内.比如说 cd /是进容入根目录. cd ~是进入当前用户的家目录. cd /etc是进入etc目录.除非你在根下创建了一个叫e的目录,否则你无法用cd /e来进入. 阅读全文
posted @ 2020-05-06 11:23 胸怀丶若谷 阅读(144) 评论(0) 推荐(0)
摘要: enumerate()(单词意思是枚举的意思)是python中的内置函数, enumerate(X,[start=0]) 函数中的参数X可以是一个迭代器(iterator)或者是一个序列, start是起始计数值,默认从0开始。X可以是一个字典。(注意观察下面的输出结果) >>> list1 = [ 阅读全文
posted @ 2020-04-29 09:31 胸怀丶若谷 阅读(1787) 评论(0) 推荐(0)
摘要: >>>list1 = ['key1','key2','key3'] >>>list2 = ['1','2','3'] >>>dict(zip(list1,list2)) {'key1':'1','key2':'2','key3':'3'} 阅读全文
posted @ 2020-04-29 09:13 胸怀丶若谷 阅读(894) 评论(0) 推荐(0)
摘要: def check_str(value): # 检查你输入的是否是字符类型 if isinstance(value, str): # 判断字符串以什么结尾 if value.endswith('.sh'): return '%s 是以.sh结尾的字符串' % value # 判断字符串以什么开头 e 阅读全文
posted @ 2020-04-27 09:15 胸怀丶若谷 阅读(1170) 评论(0) 推荐(0)
上一页 1 ··· 34 35 36 37 38 39 40 41 42 ··· 45 下一页