2019年6月12日

求整数数列螺旋存储中任意数到数据1的曼哈顿距离 spiral_memory

摘要: 1. Spiral MemoryYou come across an experimental new kind of memory stored on an infinite two-dimensional grid.Each square on the grid is allocated in 阅读全文

posted @ 2019-06-12 20:03 一剑风徽 阅读(415) 评论(0) 推荐(0) 编辑

2019年6月4日

python每天1道面试题(3)--字符串组合

摘要: 参考链接: https://blog.csdn.net/GetNextWindow/article/details/24202369,原文用java实现,具体思路可能有点不同. 阅读全文

posted @ 2019-06-04 23:49 一剑风徽 阅读(589) 评论(0) 推荐(0) 编辑

python每天1道面试题(2)--删除特定字符

摘要: 参考链接: https://blog.csdn.net/GetNextWindow/article/details/24133695 原文用java实现. 阅读全文

posted @ 2019-06-04 22:39 一剑风徽 阅读(338) 评论(0) 推荐(0) 编辑

python每天1道面试题(1)--翻转句子中单词的顺序

摘要: 本文参考链接: https://blog.csdn.net/GetNextWindow/article/details/24137657 原文基于java实现. 阅读全文

posted @ 2019-06-04 22:10 一剑风徽 阅读(988) 评论(0) 推荐(0) 编辑

python读取txt文件以空行作为数据的切分处理

摘要: 先举个例子,如下test.txt文件数据,需要提取每条数据的title和content, 单独保存到文件中: spiderTime:{'num':'12223'} title:中国保险1xxx summary: 请在xxx content: 当事人11sfdffghfhgfjjd tag:1 spi 阅读全文

posted @ 2019-06-04 08:34 一剑风徽 阅读(7470) 评论(0) 推荐(0) 编辑

2019年5月2日

TypeError: Iterator operand 0 dtype could not be cast from dtype('<M8[us]') to dtype('<M8[D]') according to the rule 'safe'

摘要: 先描述下博主遇到这个问题的情况,然后描述针对该情况的解决办法. 问题描述: 博主遇到这个问题是在 使用ricequant平台中封装的jupyter notebook中做单因子有效性分析使用 alphalens模块的时候,具体报错情况如下图: 当时也是网上搜索各种办法,大概定位问题 是时间的类型转换出 阅读全文

posted @ 2019-05-02 17:34 一剑风徽 阅读(982) 评论(0) 推荐(0) 编辑

2019年4月15日

Linux中matplotlib 中文显示问题解决

摘要: 1.下载中文 arial unicode ms (https://share.weiyun.com/5vxy0mH)字体到 /home 目录 2. 拷贝字体到 usr/share/fonts 下: sudo cp ~/arial\ unicode\ ms.ttf /usr/share/fonts/a 阅读全文

posted @ 2019-04-15 20:39 一剑风徽 阅读(2770) 评论(1) 推荐(0) 编辑

2019年4月9日

自己动手实现爬虫scrapy框架思路汇总

摘要: 自己动手实现爬虫scrapy框架思路汇总 阅读全文

posted @ 2019-04-09 14:14 一剑风徽 阅读(217) 评论(0) 推荐(0) 编辑

机器学习算法之多项式回归

摘要: 多项式回归,采用升维的方式,把x的幂当作新的特征,再利用线性回归方法解决 阅读全文

posted @ 2019-04-09 13:55 一剑风徽 阅读(1298) 评论(0) 推荐(0) 编辑

2019年3月27日

scrapy爬虫--苏宁图书

摘要: 实现业务逻辑如下: 1. 创建scrapy项目,并生成 爬虫2. 在suning.py中实现Schedul 和 Spider业务逻辑3. 修改start_urls为正确的初始请求地址4. 构造parse(self,response)函数(底部封装自动发送请求,)获取响应5. 根据响应,使用xpath 阅读全文

posted @ 2019-03-27 19:44 一剑风徽 阅读(952) 评论(0) 推荐(2) 编辑

导航