zimuzu.tv自动签到脚本(Python)
python2.7,需要requests库 #coding:utf8 ''' @author modm http://www.7mdm.com ''' import requests import urllib2 import string import random import uuid import time import re def sign(account,password):...
View Articlescrapy使用记录
玩爬虫也有很长一段时间了,一直没做一个记录,经常在同一个坑中跌倒,做个记录吧。 1.ImportError: Error loading object ‘scrapy.core.downloader.handlers.s3.S3DownloadHandler’: No module named win32api 安装pywin32 :...
View Article对豆瓣电影的一些可视化分析|movie.douban.com data visualization
最近发现之前玩scrapy的时候写过一个豆瓣电影的爬虫https://github.com/DormyMo/movieman/tree/master/crawler,一直没用起来,最近正值片慌,就想爬点数据,挖下冷门的好电影,顺便做些分析,感觉豆瓣的电影数量还是不够多,早期的信息也不是很规范,不过结果还是有点意思的,下次有时间爬下imdb看看。 数据截至:2015-08-01 新窗口打开↗...
View ArticleDjango实践,最佳?
官方文档: https://docs.djangoproject.com/en/1.8/intro/overview/ 学习过程中遇到的一些问题: 1.使用模板返回HttpResponse的两种形式: 1.1 template = loader.get_template('index.html') context = RequestContext(request,{ 'movies' :movies...
View ArticleWindows 10 使用体验
微软打开了一扇窗,让我们看到世界的光 因为之前加入过 windows insider 计划,在 729 就收到了 win10 的推送升级,升级过程有点漫长,不加上下载文件的时间,安装过程花了将近 2 个小时,好吧,两个小时就两个小时吧,为了体验史上最好的 windows 我只能 “坐和放宽” 了。 安装结束,锁屏界面让人眼前一亮的感觉。一束蓝色的光打在头像上,就差微软说:光是好的,于是就有了光。...
View Article且不能就此闲暇
时间是残忍的, 斑驳了记忆,侵蚀了年华, 在是非未辩时, 已为选择付出了该有的代价, 这或许就是时间的债, 欠下的是回不去的过去, 改变不了的决定, 对决定一次次修正中, 体会到的价值则是阅历, 阅历磨平了心中棱角, 对过去的不再耿耿于怀, 对决定不再优柔寡断, 这或许就是成长吧,且不能就此闲暇,别因懈怠辜负了时光。 —2015-08-06 杭州·下沙
View Articlekettle小试,抽取MongoDB数据至Mysql
1.MongoDB Input :填写连接信息,添加查询条件,如: {$query:{‘hp_stat_date’:’2015-09-28′}} 2.由于在Mongo中我的日期定义是Date类型,ISODate(“2015-08-25T00:00:00Z”),在MongoDB Input...
View ArticlePython中奇葩的unicode编码转换
1. unicode类型的utf8字符串 u'\xe4\xbd\xa0\xe5\xa5\xbd'.encode('latin1').decode('utf8') 2.utf8字符串类型的unicode字符串 '\\u4f60\\u597d'.decode("unicode-escape")
View ArticleSpring Data MongoDB 使用多个db
This configuration example works: <context:property-placeholder location="classpath:mongo.properties"/> <mongo:mongo id="mongo" host="${mongo.host}" port="${mongo.port}"> <mongo:options...
View Article命令行方式启动ssh tunnel
ssh \ -L local_port:service_host:service_port \ -p ssh_server_port \ -l ssh_server_username \ -N \ ssh_server_host
View ArticleApache Kylin使用
部署或建cube出问题大部分都是环境问题或hadoop hbase 版本问题 首先按照文档中所标注的版本进行部署 Recommended Hadoop Versions Hadoop: 2.4 – 2.7 Hive: 0.13 – 0.14 HBase: 0.98 – 0.99 JDK: 1.7+ 其中略坑的是 hbase的0.9*版本是不支持Hadoop...
View ArticleAndroid Studio + OpenCV
The below steps for using Android OpenCV sdk in Android Studio. This is a simplified version of this(1) SO answer. Download latest OpenCV sdk for Android from OpenCV.org and decompress the zip file....
View ArticleInstalling OpenCV 2.4.* with Python Support
Opencv的安装简直让想在图像处理方面试试水的新手抓耳挠腮,今天记录下心酸的安装过程,避免 fall in a same hole. 1. cd ~/ git clone https://github.com/Itseez/opencv.git git clone https://github.com/Itseez/opencv_contrib.git 2. cd ~/opencv mkdir...
View Articlepython opencv 去水印实现
主要利用了 opencv 的 inpaint 方法,实现类似蒙版的效果 http://docs.opencv.org/master/df/d3d/tutorial_py_inpainting.html#gsc.tab=0 效果:注意右下角&左上角 原图 处理后: ''' string to array ''' def get_opencv_img_from_string(data): arr...
View Article