码迷,mamicode.com
首页 >  
搜索关键字:lines    ( 2570个结果
hive 初使用
1. create table创建一张目标表,指定分隔符和存储格式:create table tmp_2 (resource_id bigint ,v int)ROW FORMAT DELIMITED FIELDS TERMINATED BY '\,'LINES TERMINATED BY '\n'...
分类:其他好文   时间:2015-12-02 17:49:23    阅读次数:453
Python Regular expressions 正则表达式学习笔记
//search lines that start with the string “From:”import rehand = open('mbox-short.txt')for line in hand: line = line.rstrip() if re.search('?From:',.....
分类:编程语言   时间:2015-12-02 00:46:23    阅读次数:198
Container With Most Water
Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of ...
分类:其他好文   时间:2015-11-30 02:13:54    阅读次数:115
spark RDD transformation与action函数巩固 (未完)
1.创建RDDval lines = sc.parallelize(List("pandas","i like pandas"))2.加载本地文件到RDDval linesRDD = sc.textFile("yangsy.txt")3.过滤 filter 需要注意的是 filter并不会在原有RD...
分类:其他好文   时间:2015-11-28 14:52:54    阅读次数:213
[Redux] Implementing Store from Scratch
Learn how to build a reasonable approximation of the Redux Store in 20 lines. No magic!const counter = (state = 0, action) => { switch (action.type) ....
分类:其他好文   时间:2015-11-26 06:56:22    阅读次数:198
hdu 4496 D-City(并查集)
Problem DescriptionLuxer is a really bad guy. He destroys everything he met. One day Luxer went to D-city. D-city has N D-points and M D-lines. Each D...
分类:其他好文   时间:2015-11-25 19:15:06    阅读次数:210
统计HDFS 上字节数据统计
class HDFSWordCount { def main (args: Array[String]) { if (args.length > 0){ for (line 0){ val lines = Source.fromFile(args(0)).getLines...
分类:其他好文   时间:2015-11-21 18:35:51    阅读次数:152
POJ - 3662 Telephone Lines
有K根线是免费的。如果最大花费已知为mx,那么长度大于mx的线都是应该是免费的。线数量表示为d,那么d≤ K。mx越小,d越大,随着mx增大,可行性:00000111111。这就满足了决策单调性。把免费的线的权值设置为1,其他为0,判断mx的可行就是1到N是否有一条权值不超过K的路径。看样例猜题意系...
分类:其他好文   时间:2015-11-18 21:26:56    阅读次数:191
从代码中学Python语法(持续更新)
# -*- coding:utf-8 -*-__author__ = 'hunterhug'print("你好")#打印hello = "This 'is' \"a rather long string containing\n\ several lines of text just as y...
分类:编程语言   时间:2015-11-17 23:24:01    阅读次数:222
Linux之uniq命令
uniq - report or omit repeated lines 省去重复的行参数: -i 忽略大小写字符的不同 -c 对重复的行进行记数注意:uniq命令只会对相邻的重复的行进行去重,所以uniq常常和sort命令一起用,sort命令可将重复的行排在一起,然后使用uniq进行重复数统计.....
分类:系统相关   时间:2015-11-15 23:12:38    阅读次数:175
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!