正文之前
因为Hadoop测试需要很多的数据,所以我还是习惯性的用脚本语言来写数据集生成脚本,所以也就有了如下的内容了
正文
import random
for i in range(200):
#生成随机数,浮点类型
a = random.uniform(10, 30)
#控制随机数的精度round(数值,精度)
print(str(round(a,1)) + " cat" +str(i) )
结果如下:
23.4 cat0
21.8 cat1
11.0 cat2
22.3 cat3
28.8 cat4
29.5 cat5
12.6 cat6
24.8 cat7
12.1 cat8
26.2 cat9
27.1 cat10
25.2 cat11
22.6 cat12
17.2 cat13
18.9 cat14
21.1 cat15
17.5 cat16
11.8 cat17
20.4 cat18
27.4 cat19
12.2 cat20
29.3 cat21
19.0 cat22
11.0 cat23
21.0 cat24
22.0 cat25
26.9 cat26
28.6 cat27
29.9 cat28
20.3 cat29
21.5 cat30
11.1 cat31
23.2 cat32
17.3 cat33
15.5 cat34
24.5 cat35
13.5 cat36
11.0 cat37
14.5 cat38
10.0 cat39
15.4 cat40
28.2 cat41
15.5 cat42
11.4 cat43
21.2 cat44
27.7 cat45
17.5 cat46
21.7 cat47
25.0 cat48
25.4 cat49
11.9 cat50
13.5 cat51
10.5 cat52
12.1 cat53
15.3 cat54
27.0 cat55
23.8 cat56
21.1 cat57
26.2 cat58
11.2 cat59
20.5 cat60
14.5 cat61
20.3 cat62
15.4 cat63
11.5 cat64
25.7 cat65
23.3 cat66
12.2 cat67
11.9 cat68
19.7 cat69
18.5 cat70
15.2 cat71
24.7 cat72
22.4 cat73
23.0 cat74
20.4 cat75
12.4 cat76
12.0 cat77
13.8 cat78
24.7 cat79
22.4 cat80
24.0 cat81
29.1 cat82
11.1 cat83
29.5 cat84
13.1 cat85
26.3 cat86
11.4 cat87
26.8 cat88
17.3 cat89
27.2 cat90
25.6 cat91
20.7 cat92
22.3 cat93
28.9 cat94
28.4 cat95
17.2 cat96
14.9 cat97
20.1 cat98
27.3 cat99
23.5 cat100
22.0 cat101
12.4 cat102
27.3 cat103
21.8 cat104
15.9 cat105
10.5 cat106
29.2 cat107
20.2 cat108
27.0 cat109
26.3 cat110
13.5 cat111
18.8 cat112
10.9 cat113
15.3 cat114
22.3 cat115
24.8 cat116
26.0 cat117
12.1 cat118
20.5 cat119
21.0 cat120
24.9 cat121
26.1 cat122
25.7 cat123
24.4 cat124
13.3 cat125
25.7 cat126
17.7 cat127
17.7 cat128
24.4 cat129
29.8 cat130
27.6 cat131
28.7 cat132
14.1 cat133
12.9 cat134
23.8 cat135
22.7 cat136
29.1 cat137
24.0 cat138
22.9 cat139
25.0 cat140
23.1 cat141
17.7 cat142
10.7 cat143
29.4 cat144
19.7 cat145
19.6 cat146
12.4 cat147
23.5 cat148
14.2 cat149
22.2 cat150
14.9 cat151
17.1 cat152
10.0 cat153
21.8 cat154
27.5 cat155
21.3 cat156
29.7 cat157
18.4 cat158
23.1 cat159
15.2 cat160
16.2 cat161
22.4 cat162
29.2 cat163
12.2 cat164
17.1 cat165
15.0 cat166
17.9 cat167
23.7 cat168
28.5 cat169
23.5 cat170
18.8 cat171
20.8 cat172
22.5 cat173
27.1 cat174
14.2 cat175
25.2 cat176
20.5 cat177
21.1 cat178
20.7 cat179
26.3 cat180
12.8 cat181
10.4 cat182
11.5 cat183
15.6 cat184
14.6 cat185
22.6 cat186
23.2 cat187
11.8 cat188
21.1 cat189
15.4 cat190
22.5 cat191
22.1 cat192
12.5 cat193
12.8 cat194
25.5 cat195
23.2 cat196
15.7 cat197
27.2 cat198
16.0 cat199
正文之后
待会如果测试成功了,那么我的Hadoop Top10算法也就算是差不多吃透了。。哈哈~
网友评论