摘要: 曾想尝试在服务器端或电脑上向手机发送通知吗? 你曾烦恼过企业邮箱的防骚扰机制吗? 现在,我们可以用一种简单轻松的方法来代替企业邮箱了! 进行以下的实验,你需要做好以下准备 1)注册并在手机上下载IFTTT 2)Python3 下面是具体的操作步骤: 1. 首先注册一个IFTTT账号 (https:/ 阅读全文
posted @ 2021-10-08 11:50 tooltime 阅读(1462) 评论(1) 推荐(0) 编辑
摘要: 一、接口 基金实时信息:http://fundgz.1234567.com.cn/js/001186.js?rt=1463558676006 001186为基金代号 返回值:jsonpgz({"fundcode":"001186","name":"富国文体健康股票","jzrq":"2016-05- 阅读全文
posted @ 2021-10-08 11:34 tooltime 阅读(2494) 评论(0) 推荐(1) 编辑
摘要: 一、概述 最近在数据分析,需要判断当前时间是否为上班时间:9:00~18:00 二、代码实现 import datetime # 范围时间 d_time = datetime.datetime.strptime(str(datetime.datetime.now().date()) + '9:00' 阅读全文
posted @ 2021-10-08 11:32 tooltime 阅读(1199) 评论(0) 推荐(0) 编辑
摘要: 一、概述 最近在做数据分析,需要判断一个日期是否为工作日,节假日。 找到一个现成的插件,蛮好用的。 插件介绍 https://pypi.org/project/chinesecalendar/ 判断某年某月某一天是不是工作日/节假日。 支持 2004年 至 2020年,包括 2020年 的春节延长。 阅读全文
posted @ 2021-10-08 11:27 tooltime 阅读(1433) 评论(0) 推荐(0) 编辑
摘要: 一、概述 业务有一个需求,需要根据日期,判断周几。 二、代码 当前日期 import datetime today = datetime.datetime.now().weekday() + 1 print(today) 执行输出:5 指定日期 import datetime week = date 阅读全文
posted @ 2021-10-08 11:25 tooltime 阅读(936) 评论(0) 推荐(0) 编辑
摘要: python导出依赖包(requirements.txt)以及报错处理 pip install pipreqs 使用也很简单 pipreqs 路径名,使用时会出现如下报错 解决方法:直接修改pipreqs.py 的75行,将encoding改为utf-8 阅读全文
posted @ 2021-10-08 11:12 tooltime 阅读(330) 评论(0) 推荐(0) 编辑
摘要: >>> test1 = " string " ## 两边均为空格 >>> test1.rstrip() ## 删除右边空格,r为right ' string' >>> test1.lstrip() ## 删除左边空格,l为left 'string ' >>> test1.strip() ## 同时删 阅读全文
posted @ 2021-10-08 11:08 tooltime 阅读(456) 评论(0) 推荐(0) 编辑
摘要: pypinyin 1、安装 pip install pypinyin 2、使用方法 >>> from pypinyin import pinyin, lazy_pinyin >>> import pypinyin >>> pinyin(u'中心') [[u'zh\u014dng'], [u'x\u0 阅读全文
posted @ 2021-10-08 11:07 tooltime 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 处理 代码最上面加上编码格式 #coding:utf-8 阅读全文
posted @ 2021-10-08 11:03 tooltime 阅读(776) 评论(0) 推荐(0) 编辑
摘要: “底层逻辑”,“背后的商业底层逻辑”这两个词组满天飞,本人愚钝一直不得其解,恳请高人指点。 阅读全文
posted @ 2021-10-08 10:55 tooltime 阅读(2020) 评论(0) 推荐(0) 编辑