上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 23 下一页
摘要: 文件名中不能有\/:*?"<>|这些符号 因为python存储的时候一直失败……就很糟心 下划线是可以的 希望对大家有所帮助 以上 阅读全文
posted @ 2019-12-30 09:32 醉生梦死_0423 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 首先引入time包 import time 然后获取当前时间戳 time_now = time.time() 将时间戳格式化为本地时间 time_now= time.locatetime(time.time()) 将此格式再格式化为标准时间样式 time_now = time.strftime('% 阅读全文
posted @ 2019-12-30 09:30 醉生梦死_0423 阅读(619) 评论(0) 推荐(0) 编辑
摘要: 杭电oj并没有反爬 所以直接爬就好了 直接贴源码(参数可改,循环次数可改,存储路径可改) import requests from bs4 import BeautifulSoup import time def write_in_file(number,string):#output functi 阅读全文
posted @ 2019-12-30 09:25 醉生梦死_0423 阅读(429) 评论(0) 推荐(0) 编辑
摘要: 基本操作,不再详述 直接贴源码(根据当前时间创建文件): import requests from bs4 import BeautifulSoup import time def input_to_file(number,time,str1): with open('D:\\python\\pyt 阅读全文
posted @ 2019-12-30 09:23 醉生梦死_0423 阅读(484) 评论(0) 推荐(0) 编辑
摘要: Python构造函数格式为__init__() 注:下划线为两个而不是一个 可以有无参构造 instance: class city: def printout(self,first,second): print(first+second) demo = city() demo.printout(1 阅读全文
posted @ 2019-12-25 14:45 醉生梦死_0423 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 如果在win7下的记事本直接另存为utf-8格式,是带有dom的utf-8,所以处理的时候需要注意,因为第一个字符是"?",而且不可见 阅读全文
posted @ 2019-06-16 15:37 醉生梦死_0423 阅读(349) 评论(0) 推荐(0) 编辑
摘要: 首先,了解一下IPv4网络分类 IPv4网络分为五种: A类:以0开始(8位网络位,24位主机位) B类:以10开始(16位网络位,16位主机位) C类:以110开始(24位网络位,8位主机位) D类和E类一般不用,只考虑前三种 D类:以1110开始 E类:以11110开始 那么问题来了,对于A类地 阅读全文
posted @ 2019-06-11 13:46 醉生梦死_0423 阅读(317) 评论(0) 推荐(0) 编辑
摘要: //emmmm爬虫使我快乐/捂脸 emmmm想在自己的网站上弄个每日一句,就写了个爬虫,写了一个半小时吧,网易还是有、东西的 大致流程如下: 先找到有道的官网网页-->点进去,F12-->刷新,查看network-->从上至下排查,找出可疑的包-->分析包-->编写程序-->json解析-->获取成 阅读全文
posted @ 2019-06-05 15:49 醉生梦死_0423 阅读(644) 评论(0) 推荐(0) 编辑
摘要: 伪代码是将自然语言和编程语言语法相结合的一种算法描述语言 其遵循以下要点:*变量用英文表示。省略声明和类型*结构语句使用多数编程语言通用的if、while、for语句*程序块用缩进表示,而不使用{}*使用C/C++语言的运算符。比如代入运算为“=”,等价运算为“==”,不等号为“!=”。逻辑运算符用 阅读全文
posted @ 2019-05-30 19:29 醉生梦死_0423 阅读(1053) 评论(0) 推荐(0) 编辑
摘要: Question: Super Jumping! Jumping! Jumping! Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 56626 阅读全文
posted @ 2019-05-29 08:14 醉生梦死_0423 阅读(118) 评论(0) 推荐(0) 编辑
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 23 下一页