上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 24 下一页
摘要: 原文 : https://cloud.tencent.com/developer/ask/188486 import os, sys class HiddenPrints: def __enter__(self): self._original_stdout = sys.stdout sys.std 阅读全文
posted @ 2019-11-16 20:45 cup_leo 阅读(819) 评论(0) 推荐(0)
摘要: 高效方法:dfs[dfs['delta'].isnull()==False].sort_values(by='delta', ascending=True).groupby('Call_Number', as_index=False).first() 阅读全文
posted @ 2019-10-30 13:36 cup_leo 阅读(3554) 评论(0) 推荐(0)
摘要: 链接:https://blog.csdn.net/ZWX2445205419/article/details/80113472 1. 安装Anaconda 2. 创建虚拟环境 > conda create -n myenv python=3.5> conda info -e # 查看虚拟环境12 3 阅读全文
posted @ 2019-10-30 13:33 cup_leo 阅读(487) 评论(0) 推荐(0)
摘要: 1 from pyDes import des, CBC, PAD_PKCS5 2 import binascii 3 4 # 秘钥 5 KEY = 'mHAxsLYz' 6 7 8 from pyDes import des, CBC, PAD_PKCS5 9 import binascii 10 11 # 秘钥 12 KEY = 'mHAxsLYz' 13 14 ... 阅读全文
posted @ 2019-10-22 14:38 cup_leo 阅读(433) 评论(0) 推荐(0)
摘要: 这里说的字符串不是一般意义上的字符串,是指在读取日期类型的数据时,如果还没有及时解析字符串,它就还不是日期类型,那么此时的字符串该怎么与时间戳之间进行转换呢? ① 时间字符串转化成时间戳 将时间字符串转化成时间戳分为两步: 第一步:将时间字符串转换成时间元组 第二步:将时间元组转换成时间戳类型 ② 阅读全文
posted @ 2019-10-12 15:08 cup_leo 阅读(3050) 评论(0) 推荐(0)
摘要: If order does not matter, you can use foo = "mppmt" "".join(set(foo)) set() will create a set of unique letters in the string, and "".join() will join 阅读全文
posted @ 2019-09-26 09:51 cup_leo 阅读(11911) 评论(0) 推荐(0)
摘要: 安装之前先检查一下系统有没有自带open-jdk 命令: rpm -qa |grep java rpm -qa |grep jdk rpm -qa |grep gcj 如果没有输入信息表示没有安装。 如果安装可以使用rpm -qa | grep java | xargs rpm -e --nodep 阅读全文
posted @ 2019-09-20 15:07 cup_leo 阅读(3344) 评论(0) 推荐(0)
摘要: def asr_to_correct(text): rep = dict((re.escape(k), v) for k, v in error_asr_map.items()) pattern = re.compile("|".join(rep.keys())) text = pattern.sub(lambda m: rep[re.escape(m.group(0))], text) retu 阅读全文
posted @ 2019-09-09 11:16 cup_leo 阅读(1337) 评论(0) 推荐(0)
摘要: 原文 https://spaces.ac.cn/archives/4256/comment-page-1#comments 阅读全文
posted @ 2019-09-04 15:44 cup_leo 阅读(468) 评论(0) 推荐(0)
摘要: import re import pymongo from tqdm import tqdm import hashlib db = pymongo.MongoClient().weixin.text_articles md5 = lambda s: hashlib.md5(s).hexdigest() def texts(): texts_set = set() for a in tqdm(db 阅读全文
posted @ 2019-09-04 11:14 cup_leo 阅读(299) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 24 下一页