09 2015 档案

HIVE Transform using 用法
摘要:select TRANSFORM(*, *, *)using 'python filter.py'as (*, *, *)from t_1HIVE支持pipe操作,将select出来的字段,用我们的脚本进行“操作”1, 分隔符为 \t 并没有采用hive原有的分隔符 \x01 之类的。 阅读全文

posted @ 2015-09-28 14:51 雨渐渐 阅读(1912) 评论(0) 推荐(0) 编辑

python 行转列
摘要:#encoding=utf-8 print '中国' #二维阵列变换 行转化成列,列转化成行 lista=[[1,2,3],[4,5,6],[7,8,9],[10,11,12]] #使用列表推导 listb=[[r[col] for r in lista] for col in... 阅读全文

posted @ 2015-09-24 10:26 雨渐渐 阅读(8623) 评论(0) 推荐(0) 编辑

nslookup
摘要:nslookupnslookup ip => hostnamenslookup hostname ===> ip 阅读全文

posted @ 2015-09-21 11:31 雨渐渐 阅读(135) 评论(0) 推荐(0) 编辑

c++ 常用数据接口 set
摘要:#include #include #include int main(void) { std::set sites; std::string site0 = "sina.com.cn"; std::string site1 = "sina.com.cn"; std::str... 阅读全文

posted @ 2015-09-18 14:38 雨渐渐 阅读(854) 评论(0) 推荐(0) 编辑

shell find and rm
摘要:按时间删除命令:删除当前目录下30天以前的所有文件:find . -type f -ctime +30 -exec rm -fr {} \; 删除当前目录下30天以前的所有目录:find . -type d -ctime +30 -exec rm -fr {} \; 删除/oracle/123目录下... 阅读全文

posted @ 2015-09-16 14:24 雨渐渐 阅读(1772) 评论(0) 推荐(0) 编辑

shell date
摘要:1.查看指定时间的时间戳查看当前时间#date +%s查看指定时间#date -d 2008-01-01 +%s 1199116800#date -d 20080101 +%s11991168002.将时间戳转换成date#date -d '1970-01-01 UTC 1199116800 sec... 阅读全文

posted @ 2015-09-16 14:19 雨渐渐 阅读(205) 评论(0) 推荐(0) 编辑

统计学中抽样比例一般占百分之多少
摘要:要具体问题具体分析,一般和要求的误差限、置信区间及总体方差有关系.比如最基本的简单随机抽样,其样本量确定公式就是1/n=1/N+d^2/(u^2*S^2).样本量和误差限成反比,和置信区间及总体方差成正比.请问一堆url怎么算方差。(。。。) 阅读全文

posted @ 2015-09-14 16:09 雨渐渐 阅读(8531) 评论(0) 推荐(0) 编辑

python logging TimedRotatingFileHandler 作用
摘要:max backup count这样的参数,即打印的日志文件数量超过这个阈值,发生rotate,从最老的文件开始清理未亲测。 阅读全文

posted @ 2015-09-14 15:57 雨渐渐 阅读(1149) 评论(0) 推荐(0) 编辑

c++ g++3.4.5 g++4.8.2 由编译器引起的编译异常
摘要:#include #include #include class Student {public: Student(std::string& name) { _name = name; } ~Student(){ } void printName(){ ... 阅读全文

posted @ 2015-09-08 22:37 雨渐渐 阅读(470) 评论(0) 推荐(0) 编辑

导航