摘要: Linux任务调度的工作主要分为以下两类1、系统执行的工作:系统周期性所要执行的工作,如备份系统数据、清理缓存2、个人执行的工作:某个用户定期要做的工作,例如每隔10分钟检查邮件服务器是否有新信,这些工作可由每个用户自行设置。 分钟 小时 天数 月数 周数 minute hour day month 阅读全文
posted @ 2021-10-29 14:21 .未央 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 为了实现 断网了,自动连接网络原理:每隔一段时间ping一下百度,判断网络状态,没有联网的话,就模仿浏览器发一条Post给服务器import urllibimport hashlibimport subprocessimport osimport timedef getPass(password): 阅读全文
posted @ 2021-10-18 14:15 .未央 阅读(1097) 评论(0) 推荐(0) 编辑
摘要: import subprocess as spurl = 'www.baidu.com'status, result = sp.getstatusoutput("ping " + url + " -w 2000")print(status)print(result)if "请求超时" in resu 阅读全文
posted @ 2021-09-13 16:40 .未央 阅读(401) 评论(0) 推荐(0) 编辑
摘要: //例如要把User表中address字段删除根据实际情况进行改变 db.User.update({},{$unset:{'address':''}},false, true)//根据时间倒序查询db.getCollection('data_collect').find({}).sort({uplo 阅读全文
posted @ 2021-05-17 09:55 .未央 阅读(42) 评论(0) 推荐(0) 编辑
摘要: def is_today(target_date): """ Detects if the date is current date :param target_date: :return: Boolean """ # Get the year, month and day c_year = dat 阅读全文
posted @ 2020-12-15 17:03 .未央 阅读(1246) 评论(0) 推荐(0) 编辑
摘要: 通过这行代码确定每页的下一页,因为从淘宝的第4页 xpath就匹配不出下一页的位置#这是面向对象写法,不用的把self. 去掉即可next_button = self.driver.find_element_by_css_selector('li.item.next')if 'next-disabl 阅读全文
posted @ 2020-12-10 15:35 .未央 阅读(134) 评论(0) 推荐(0) 编辑
摘要: MySQL 获取当前日期及日期格式 获取系统日期: NOW() 格式化日期: DATE_FORMAT(date, format) 注: date:时间字段 format:日期格式 返回系统日期,输出 2009-12-25 14:38:59 格式化 当前日期 mysql> select date_fo 阅读全文
posted @ 2020-12-02 15:04 .未央 阅读(3781) 评论(0) 推荐(1) 编辑
摘要: Connecting to 192.168.1.41:22...Could not connect to '192.168.1.41' (port 22): Connection failed. Type `help' to learn how to use Xshell prompt. 一般配置好 阅读全文
posted @ 2020-11-25 09:49 .未央 阅读(9385) 评论(0) 推荐(0) 编辑
摘要: # 第一次使用会有进度条加载,直接可运行# 直接上源码 import asyncioimport randomimport cv2from pyppeteer import launchfrom urllib import request# 滑块的缺口距离识别async def get_distan 阅读全文
posted @ 2020-11-21 14:09 .未央 阅读(1875) 评论(0) 推荐(0) 编辑
摘要: 1. 查看当前python版本 [root@iZwz99sau950q2nhb3pn0aZ ~]# python Python 2.7.5 (default, Aug 7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux 阅读全文
posted @ 2020-11-10 14:08 .未央 阅读(293) 评论(0) 推荐(0) 编辑