K*********n 发帖数: 2852 | 1 Scala纯新手,写了点测试代码:
###### build.sbt #########
name := "Train NB"
version := "1.0"
scalaVersion := "2.10.4"
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % "1.2.0",
"commons-io" % "commons-io" % "2.4",
"com.google.code.gson" % "gson" % "2.2.4",
"org.la4j" % "la4j" % "0.4.9"
)
javacOptions ++= Seq("-source", "1.7", "-target", "1.7")
####### scala code ##########
package app.mycompany
import org.apache.spark.SparkContext
import org.apache.spark.SparkContext._
import org.apa... 阅读全帖 |
|
w*****1 发帖数: 473 | 2 there are still some problems. could you help me to find out what's wrong?
rawdata = ReadList["energy.dat", Real];
data = Partition[rawdata, 10];
ListPlot3D[data, AspectRatio -> 1, Mesh -> False,
ColorFunction -> (ColorData["ThermometerColors"])]
then the output is:
ListPlot3D::arrayerr: data must be a valid array or a list of valid arrays.
>>
Thanks a lot! |
|
D******n 发帖数: 2836 | 3 cat rawdata| sed -n '1~2p' |tr ' ' '\n' >1.txt
cat rawdata| sed -n '2~2p' |tr ' ' '\n' >2.txt
paste 1.txt 2.txt > output.txt |
|
s*********y 发帖数: 34 | 4 Item 6 of 63 Mark item for review
The table WORK.PILOTS contains the following data:
WORK.PILOTS
Id Name Jobcode Salary
--- ------ ------- ------
001 Albert PT1 50000
002 Brenda PT1 70000
003 Carl PT1 60000
004 Donna PT2 80000
005 Edward PT2 90000
006 Flora PT3 100000
The data set was summarized to include average salary based on jobcode:
Jobcode Salary Avg
------- ------ ----... 阅读全帖 |
|
v*******e 发帖数: 11604 | 5 假定你数据已经读入为,名为rawdata
rawdata[order(rowdata$Chr, rowdata$pos),] |
|
x****i 发帖数: 82 | 6 在 2011-08-09 18:31:10,"明伯羽" 写道:
-------- 转发邮件信息 --------
发件人:"Song Guojun"
发送日期:2011-08-08 09:18:30
收件人:
主题:转发: 111千兆像素的全景照片
请打开下面的网址,欣赏西班牙塞维利亚市全景照。
高科技照片,叹为观止!
这张被称为世上最大的,最高的111千兆像素的照片,我上下左右,远远近近
转悠看了半小时还没看够。请不要放过页面下方一横列的每一张小照片,每张点一下,
就慢慢自动放大就可看到细节。
细细欣赏这个城市的美丽,安详,宁静,居民的悠闲自在,高高的女神像脚下的细微精
致的建筑工艺,清澈的河水,湛蓝的天空,有一家居民在享受自家的泳池。好一番自然
与人文景观,可惜猜不出这个城市的名字,居民的肤色好像不是白种人。
Subject: Fw:World's first 111 Giga Pixel Picture
世界上第一張111 Giga像素的照片
先睹为快
World's first... 阅读全帖 |
|
s**********s 发帖数: 7387 | 7 depending on your rawdata format
if you can do it like
data time
1.5 10min
1.3 10min
4.2 20min
1.2 40min
...
..
things will be much easier
i'd say pre-parse your data with perl and then feed it into R. |
|
q*z 发帖数: 13362 | 8 估计得换卡了,
raw里面是有一个jpg缩小图的,你在相机上预览,看的是jpg,相机的处理器无法实时解ra
w的.你的文件jpg部分没坏,rawdata部分坏了
?有个双保险?
其是landscape. |
|
x****i 发帖数: 82 | 9 在 2011-08-09 18:31:10,"明伯羽" 写道:
-------- 转发邮件信息 --------
发件人:"Song Guojun"
发送日期:2011-08-08 09:18:30
收件人:
主题:转发: 111千兆像素的全景照片
请打开下面的网址,欣赏西班牙塞维利亚市全景照。
高科技照片,叹为观止!
这张被称为世上最大的,最高的111千兆像素的照片,我上下左右,远远近近
转悠看了半小时还没看够。请不要放过页面下方一横列的每一张小照片,每张点一下,
就慢慢自动放大就可看到细节。
细细欣赏这个城市的美丽,安详,宁静,居民的悠闲自在,高高的女神像脚下的细微精
致的建筑工艺,清澈的河水,湛蓝的天空,有一家居民在享受自家的泳池。好一番自然
与人文景观,可惜猜不出这个城市的名字,居民的肤色好像不是白种人。
Subject: Fw:World's first 111 Giga Pixel Picture
世界上第一張111 Giga像素的照片
先睹为快
World's first... 阅读全帖 |
|
n*****s 发帖数: 10232 | 10 【 以下文字转载自 PhotoForum 讨论区 】
发信人: xinhui (hui), 信区: PhotoForum
标 题: 高科技照片,叹为观止!转发: 111千兆像素的全景照片
发信站: BBS 未名空间站 (Sun Aug 21 11:29:09 2011, 美东)
在 2011-08-09 18:31:10,"明伯羽" 写道:
-------- 转发邮件信息 --------
发件人:"Song Guojun"
发送日期:2011-08-08 09:18:30
收件人:
主题:转发: 111千兆像素的全景照片
请打开下面的网址,欣赏西班牙塞维利亚市全景照。
高科技照片,叹为观止!
这张被称为世上最大的,最高的111千兆像素的照片,我上下左右,远远近近
转悠看了半小时还没看够。请不要放过页面下方一横列的每一张小照片,每张点一下,
就慢慢自动放大就可看到细节。
细细欣赏这个城市的美丽,安详,宁静,居民的悠闲自在,高高的女神像脚下的细微精
致的建筑工艺,清澈的河水,湛蓝的天空... 阅读全帖 |
|
u******e 发帖数: 758 | 11 俺也说两句,我只用过3个apple的东西,在国内用过一个mac,一个ipod,还有刚到手的
iphone4
mac确实是真他妈的难用,俺承认那时候没下功夫研究,也可能是国内环境不适合,但真
的就是买了一摆设。其实本来是打算买来show off泡妹子的,结果我打算泡妹子时不得
不一左一右傻傻背两个笔记本,妹子自然也么泡到。
ipod很喜欢,同样是用来泡妹子很实用。
手机从国内就一直用nokia,在换手机前用的是国内带过来滴N95,信号确实比iphone强,
我实际做了5次测验,详细记录了结果。在信号整体都好的地方,两者没区别。在信号中
等的地方通话质量就看得出差别了,iphone在对方出现过声音断续的情况,Nokia的声音
一直很鲁棒。在信号弱的方,iphone频繁的处于搜索状态中,中间也确实出现过接听不
到的情况,Nokia在同一区域一直有3格左右信号,没有丢过电话。
最后再说一个,我们目前公司做的是视频处理相关的东西,俺当年负责在windows下开发
qt格式的一些相关接口。apple至少在qt rawdata这一块的sdk和对应手册写得那叫一个
鼻涕,恶心了我好长时间,映像极为深刻 |
|
a***y 发帖数: 19743 | 12 ☆─────────────────────────────────────☆
mariazw2007 (KiKi) 于 (Mon Jul 19 15:33:18 2010, 美东) 提到:
发信人: mariazw2007 (KiKi), 信区: PDA
标 题: 啰嗦地讲讲我的苹果产品经历,顺便咒骂一声iphone
发信站: BBS 未名空间站 (Mon Jul 19 13:47:07 2010, 美东)
很唐僧,先给摘要:
1.前后买过(拥有过)15个苹果产品
2.Macbook Air中看不中用。
3. iphone3G购买一年后无法通话,恨死了
全剧情:
如果仅从金钱购买角度讲,怎么看我也应该是个果粉才对。先后有过两个iPod mini,
一个80G传统iPod,iPod shuffle二代加三代6个(丢过一个,又买了两个自用,三
个送人),iPod nano四代3个(一个自用,两个送人),一个Macbook Air,一个
iPhone3G,一个iTouch(送人)。
1.iPod系列
最早看到iPod时舍不得银子。400美元对于一个月拿1千出头奖学金的学生来说还... 阅读全帖 |
|
j**i 发帖数: 419 | 13 do it like this for each table?
or is there a easier way?
SET PAGESIZE 0
SET FEEDBACK OFF
SET TERMOUT OFF
SPOOL C:\RawData\main.csv
select
TO_CHAR(mperiod,'YYYYMMDD')||','||Mstore||','||MITEM||','||MQ||','||MC||'
,'||MP
from Tablename1
/
SPOOL OFF
Thank you very much! |
|
w**********y 发帖数: 1691 | 14 来抢包子...
" analyze those 5 variables all together"
请google: multivariate ANOVA..
简单的说,你这5个response variale如果是independent的,那很好办啦,就一个一个的
做ANOVA就行了(不过你要adjust significant level)..
而MANOVA就是把这5个response当作一个vector,然后去比较你这A,B,C,D的response
vector有没有significant different..而test用的方法基本都是非参的方法..
SAS里面实现MANOVA的例子:
PROC GLM DATA=RAWDATA;
CLASS GROUP;
MODEL Y1 Y2 Y3 Y4 Y5 = GROUP;
manova h=_all_ / printe printh;
然后你的output会有,Wilks' Lambda,Pillai's Trace,Hotelling-Lawley Trace等方法
的test结果..你自己选一个用就行了.
至于要不要用 |
|
e****8 发帖数: 200 | 15 我选了c,非常不确定
Item 20 of 63 Mark item for review
The following SAS program is submitted:
data WORK.TEMP;
length A B 3 X;
infile RAWDATA;
input A B X;
run;
What is the length of variable A?
A.
3
B.
8
C.
WORK.TEMP is not created - X has an invalid length.
D.
Unknown. |
|
s***1 发帖数: 343 | 16 可不可以向楼主请教两个题,先谢谢了!!
11题ziqidonglai强帖给的答案是C,楼主可不可以帮忙解释一下code哪里有错吗?我自
己做的时候选了B。
The following SAS code is submitted:
data WORK.TEMP WORK.ERRORS / view=WORK.TEMP;
infile RAWDATA;
input Xa Xb Xc;
if Xa=. then output WORK.ERRORS;
else output WORK.TEMP;
run;
Which of the following is true of
the WORK.ERRORS data set?
A.
The data set is created when the
DATA step is submitted.
B.
The data set is created when the view
TEMP is u |
|
S********a 发帖数: 359 | 17 ADV12月真题 第11题
The following SAS code is submitted:
data WORK.TEMP WORK.ERRORS / view=WORK.TEMP;
infile RAWDATA;
input Xa Xb Xc;
if Xa=. then output WORK.ERRORS;
else output WORK.TEMP;
run;
Which of the following is true of
the WORK.ERRORS data set?
A.
The data set is created when the
DATA step is submitted.
B.
The data set is created when the view
TEMP is used in another SAS step.
C.
The data set is not created bec |
|
g******k 发帖数: 62 | 18 The following SAS program is submitted:
data WORK.TEMP;
length A B 3 X;
infile RAWDATA;
input A B X;
run;
What is the length of variable A?
A.3
B.8
C.WORK.TEMP is not created - X has an invalid length.
D.Unknown.
用SAS run了下,log里这样说 length A B 3 X; 这里expecting a numeric constant
什么的。答案选A,不知道为什么,有没有大侠可以解释下。 |
|
D**0 发帖数: 195 | 19 总是被这类的题弄晕。请大侠解释一下下面这些题。能解释几道都可以。多谢!
Item 6 of 63 Mark item for review
The table WORK.PILOTS contains the following data:
WORK.PILOTS
Id Name Jobcode Salary
--- ------ ------- ------
001 Albert PT1 50000
002 Brenda PT1 70000
003 Carl PT1 60000
004 Donna PT2 80000
005 Edward PT2 90000
006 Flora PT3 100000
The data set was summarized to include average
salary based on jobcode:
Jobcode Salary ... 阅读全帖 |
|
d*******o 发帖数: 493 | 20 proc sql;
select id, max(medicationcalss1), max(medicationcalss2), max(
medicationcalss3)
from rawdata
group by id
;quit; |
|
p****8 发帖数: 50 | 21 答案给C, 可我认为是B。把我弄糊涂了!
The following SAS code is submitted:
data WORK.TEMP WORK.ERRORS / view=WORK.TEMP;
infile RAWDATA;
input Xa Xb Xc;
if Xa=. then output WORK.ERRORS;
else output WORK.TEMP;
run;
Which of the following is true of
the WORK.ERRORS data set?
A.
The data set is created when the
DATA step is submitted.
B.
The data set is created when the view
TEMP is used in another SAS step.
C.
The data set is not cr... 阅读全帖 |
|
p****8 发帖数: 50 | 22 答案给C, 可我认为是B。把我弄糊涂了!
The following SAS code is submitted:
data WORK.TEMP WORK.ERRORS / view=WORK.TEMP;
infile RAWDATA;
input Xa Xb Xc;
if Xa=. then output WORK.ERRORS;
else output WORK.TEMP;
run;
Which of the following is true of
the WORK.ERRORS data set?
A.
The data set is created when the
DATA step is submitted.
B.
The data set is created when the view
TEMP is used in another SAS step.
C.
The data set is not cr... 阅读全帖 |
|
p****8 发帖数: 50 | 23 答案给C, 可我认为是B。把我弄糊涂了!
The following SAS code is submitted:
data WORK.TEMP WORK.ERRORS / view=WORK.TEMP;
infile RAWDATA;
input Xa Xb Xc;
if Xa=. then output WORK.ERRORS;
else output WORK.TEMP;
run;
Which of the following is true of
the WORK.ERRORS data set?
A.
The data set is created when the
DATA step is submitted.
B.
The data set is created when the view
TEMP is used in another SAS step.
C.
The data set is not cr... 阅读全帖 |
|
s********1 发帖数: 54 | 24 Question(1)The following is my sas code: Who can tell me why it is wrong?
###############################
data temm;
length A B 3 X;
input A B X;
cards;
10 20 3
23 34 56
run;
#################################3
Error message:
##########################
78 data temm;
79 length A B 3 X;
-
22
1 1
-
352
ERROR 22-322: Expecting a numeric constant.
ERROR 352-185: The length of numeric variables is 3-8.
80 input A B X;
81 cards;
NOTE: The SAS Sy... 阅读全帖 |
|
c******n 发帖数: 380 | 25 proc sql;
create table outdata as select unique id,date from rawdata group by id
having date=min(date);
quit; |
|
c******n 发帖数: 380 | 26 proc sql;
create table outdata as select unique id,date from rawdata group by id
having date=min(date);
quit; |
|
j******k 发帖数: 91 | 27 基本上还是63题 只有4-5题不太一样
新题基本上还是比较简单的 如果你63题都融会贯通的话
我是把SAS Adv Prepare Guide整本都读过一遍
考题不太懂得自己试过一遍 或者看别人怎么解
原本不怎么用SQL 现在开始在工作上也用看看 感觉SQL很powerful阿!
抱著还是想学一点新的东西去考的 挺有收获的!
置顶上有63题 可以下载 有两个我自己在书上或者网路上找到答案的:
* 答案A:
Item 7 of 63 Mark item for review
A quick rule of thumb for the space
required to run PROC SORT is:
A.
two times the size of the SAS data set being sorted.
* 答案A:
Item 20 of 63 Mark item for review
The following SAS program is submitted:
data WORK.TEMP;
length A B... 阅读全帖 |
|
d********g 发帖数: 376 | 28 %macro sorting();
%do i=1 %to i=12;
proc sort data=Rawdata&i;
by net_pos;
run;
%end;
%mend;
谢谢! |
|
n******r 发帖数: 13312 | 29 。。。。这道题正确答案应该是哪个?有的说是b, 有的说c
Item 11 of 63 Mark item for review
The following SAS code is submitted:
data WORK.TEMP WORK.ERRORS / view=WORK.TEMP;
infile RAWDATA;
input Xa Xb Xc;
if Xa=. then output WORK.ERRORS;
else output WORK.TEMP;
run;
Which of the following is true of
the WORK.ERRORS data set?
A.
The data set is created when the
DATA step is submitted.
B.
The data set is created when the view
TEMP is used in anothe... 阅读全帖 |
|
c**********2 发帖数: 62 | 30 SAS ADV 63题网上的答案有很多版本,貌似都有一些错误。下面是我仍然拿不准的一些
题目。欢迎讨论,指正。等考完若有时间再把整理的63题答案发出来积点人品。
Item 1 of 63 Mark item for review
When attempting to minimize memory usage, the most efficient way to do group
processing whenusing the MEANS procedure is to use:
A. the BY statement.
B. GROUPBY with the NOTSORTED specification.
C.the CLASS statement.
D.multiple WHERE statements.
答案选C,个人也认为C是对的。网上有人提到过用Sort再means,这样A更快。但是题目
问的是memeory,不是时间,所以觉得还是应该选C。
Item 11 of 63 Mark item for review
The following SAS code is subm... 阅读全帖 |
|
w*******9 发帖数: 1433 | 31 可以先选出符合条件的id, 在left join回去。
proc sql;
create table indicator as
select id, 1 as ind from RawData
group by id
having max(score) = min(score);
quit; |
|
w*******9 发帖数: 1433 | 32 It does not matter. You do not need its exact numeric value. If you're
worried about this, you can count the unique number of records within each
id, then flag those having 1 distinct value.
proc sql;
select id, count(distinct(score)) as count from RawData
group by id;
quit; |
|
H*******a 发帖数: 11 | 33 此题不懂,求懂的人讲解一下
11. The following SAS code is submitted:
data WORK.TEMP WORK.ERRORS / view=WORK.TEMP;
infile RAWDATA;
input Xa Xb Xc;
if Xa=. then output WORK.ERRORS;
else output WORK.TEMP;
run;
Which of the following is true of the WORK.ERRORS data set?
A. The data set is created when the DATA step is submitted.
B. The data set is created when the view TEMP is used in another SAS step.
C. The data set is not created because the DATA statement con... 阅读全帖 |
|
m*********k 发帖数: 10521 | 34 " 【Olympics】
buhuiba Aug 5. ● : [bssd] 田径拿第一金!强烈要求版主开仓发包子!
】"
成功奖励 10 伪币的用户: buhuiba, crystalcock, Sanada, hopeusw, omo, Anne,
ler7, fish2006, cyzzzz, Aroid, sps, leshan, dreamspark, ahmaswh,
xiaomaoxiong, Jingqg1979, microporous, shengliutale, roberthanks, ultidream,
ruler, zli, kominu, zfei518, IDjia, crabghh, bosmit, shirely, springwinter,
yelo, lh2006, spsangel, desmond2046, ppfounder, peacenin, tenue, yorkchen,
kanamit, MW123, utod, swanswan, hihicvs, Acartia, Ogden, Gobler, yyman... 阅读全帖 |
|
Z**0 发帖数: 1119 | 35 spark提供了一个专门的函数,randomSplit。
trainingData, testData = rawData.randomSplit([0.8,0.2], 10) |
|