04 2021 档案

摘要:大概意思是,按照标准,URL只允许一部分ASCII字符,其他字符(如汉字)是不符合标准的,此时就要进行编码。 因为我在构造URL的过程中要使用到中文: >>> string = "全文搜索" >>> parse.quote(string) '%E5%85%A8%E6%96%87%E6%90%9C%E 阅读全文
posted @ 2021-04-29 19:53 半个程序猿Cohen_Lee 阅读(1376) 评论(0) 推荐(0) 编辑
摘要:PROXIES = [ 'http://183.136.177.77:3128', 'http://54.229.233.101:80', ........... 'http://194.167.44.91:80' ] USER_AGENTS = [ "Mozilla/5.0 (Windows NT 阅读全文
posted @ 2021-04-29 19:48 半个程序猿Cohen_Lee 阅读(836) 评论(0) 推荐(0) 编辑
摘要:python中时间、日期、时间戳的转换 1.简介 在编写代码时,往往涉及时间、日期、时间戳的相互转换。 2.示例 # 引入模块 import time, datetime 2.1 str类型的日期转换为时间戳 1 # 字符类型的时间 2 tss1 = '2013-10-10 23:40:00' 3 阅读全文
posted @ 2021-04-29 14:13 半个程序猿Cohen_Lee 阅读(472) 评论(0) 推荐(0) 编辑
摘要:窗口函数 row number + partition by 排序 数据排序后再取第一个值 select * from (select *, Row_Number() over (partition by uid order by created_at ) rank from ods_lps_kkb 阅读全文
posted @ 2021-04-28 15:54 半个程序猿Cohen_Lee 阅读(176) 评论(0) 推荐(0) 编辑
摘要:python中有一个轻量级的定时任务调度的库:schedule。他可以完成每分钟,每小时,每天,周几,特定日期的定时任务。因此十分方便我们执行一些轻量级的定时任务. 代码如下: 1 import schedule 2 import time 3 4 def job(name): 5 print("h 阅读全文
posted @ 2021-04-23 22:03 半个程序猿Cohen_Lee 阅读(2350) 评论(0) 推荐(0) 编辑
摘要:大数据基础 一、大数据时代的认识与简介 (一)学习大数据的意义 在未来,软件开发将是“面向 AI 编程”,软件的核心业务逻辑和价值将围绕机器学习的结果也就是 AI 展开,软件工程师的工作就是考虑如何将机器学习的结果更好地呈现出来,如何更好地实现人和 AI 的交互。 将来,数据会越来越成为公司的核心资 阅读全文
posted @ 2021-04-21 19:24 半个程序猿Cohen_Lee 阅读(197) 评论(0) 推荐(0) 编辑
摘要:###当地时间 import time time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time())) from datetime import datetime time = datetime.now().strftime("%H:%M 阅读全文
posted @ 2021-04-15 16:26 半个程序猿Cohen_Lee 阅读(41) 评论(0) 推荐(0) 编辑
摘要:sql 截取字符串: 1、LOCATE(substr , str ):返回子串 substr 在字符串 str 中第一次出现的位置,如果字符substr在字符串str中不存在,则返回0; 2、POSITION(substr IN str ):返回子串 substr 在字符串 str 中第一次出现的位 阅读全文
posted @ 2021-04-12 15:40 半个程序猿Cohen_Lee 阅读(592) 评论(0) 推荐(0) 编辑
摘要:在sql查询时将日期转为时间戳 from_unixtime(unix_timestamp('20170608111213', 'yyyyMMddHHmmss'), 'yyyy-MM-dd HH:mm:ss') NOW():当前日期时间 SELECT UNIX_TIMESTAMP(NOW()); 将日 阅读全文
posted @ 2021-04-10 13:59 半个程序猿Cohen_Lee 阅读(1597) 评论(0) 推荐(0) 编辑
摘要:清华(常用): https://pypi.tuna.tsinghua.edu.cn/simple阿里云: https://mirrors.aliyun.com/pypi/simple/中科大: https://pypi.mirrors.ustc.edu.cn/simple/豆瓣: https://p 阅读全文
posted @ 2021-04-08 11:37 半个程序猿Cohen_Lee 阅读(87) 评论(0) 推荐(0) 编辑
摘要:import smtplibfrom email.header import Headerfrom email.mime.text import MIMETextfrom email.mime.multipart import MIMEMultipartfrom email.utils import 阅读全文
posted @ 2021-04-07 21:38 半个程序猿Cohen_Lee 阅读(82) 评论(0) 推荐(0) 编辑
摘要:import smtplibfrom email.header import Headerfrom email.utils import formataddrfrom email.mime.text import MIMETextfrom email.mime.multipart import MI 阅读全文
posted @ 2021-04-07 19:33 半个程序猿Cohen_Lee 阅读(96) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示