(1)awk-F,‘{a[$2]++}END{for(iina)printi""a[i]}‘文件名.txt(2)cat文件名.txt|cut-d,-f2|sort|uniq-c|sort-n
分类:
系统相关 时间:
2015-04-27 23:58:14
阅读次数:
242
jieba中文分词的使用
import jieba
sentences = ["我喜欢吃土豆","土豆是个百搭的东西","我不喜欢今天雾霾的北京", 'costumer service']
# jieba.suggest_freq('雾霾', True)
# jieba.suggest_freq('百搭', True)
words = [list(jieba.cut(doc)) for...
分类:
编程语言 时间:
2015-04-27 16:58:00
阅读次数:
301
<inputname="number"type="text"id="number"value="1"size="4"onblur="changePrice()"style="border:1pxsolid#ccc;"/>修改为<spanclass="goods_cut"
_src="p_w_picpaths/plus1.gif"
alt="减少"width="15"height="15"/></span><inputname="number"type="te..
分类:
其他好文 时间:
2015-04-27 15:31:06
阅读次数:
154
Greg has a weighed directed graph, consisting of n vertices. In this graph any pair of distinct vertices has an edge between them in both directions. Greg loves playing with the graph and now he has in...
分类:
其他好文 时间:
2015-04-27 15:17:42
阅读次数:
112
查看机器型号:
dmidecode | grep"Product Name"查看网卡信息:
dmesg | grep -ieth
查看CPU信息:
cat /proc/cpuinfo
只看CPU型号:
cat/proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
查看物理CPU个数:
grep "physical id" /proc/cp...
分类:
系统相关 时间:
2015-04-27 15:17:18
阅读次数:
178
Typical tree recursion works. The key is: ANY node can be treated as the root, since it is about edge, not about node. This simplifies things a lot.#i...
分类:
其他好文 时间:
2015-04-27 14:59:09
阅读次数:
120
题目链接:http://poj.org/problem?id=3017题意:给你一个长度为n的数列,要求把这个数列划分为任意块,每块的元素和小于m,使得所有块的最大值的和最小分析:这题很快就能想到一个DP方程f[i]=min{f[j]+max{a[k]}}(b[i] 2 #include 3 #i....
分类:
其他好文 时间:
2015-04-26 22:24:00
阅读次数:
191
http://soj.sysu.edu.cn/show_problem.php?pid=1005&cid=1779 1 #include 2 3 using namespace std; 4 5 int graph[101][101]; 6 int kind[101][101]; 7 int...
分类:
其他好文 时间:
2015-04-26 18:18:43
阅读次数:
141
学习目的及应用:导航 、GPS、网络规划、路径规划
交通流可以用一个图来模型化,每一条街道交叉口表示一个顶点,而每一条街道就是一条边。边的值可能是代表限制速度,或者是容量(车道的数目)等等。此时我们可能需要找出一条最短路,或用该信息找出最可能产生交通瓶颈的位置,
图的定义:
是由顶点的有穷非空集合和顶点之间边的集合组成一种数据结构
表示方法:
graph = ( V,E )
...
分类:
其他好文 时间:
2015-04-26 09:33:22
阅读次数:
209
BoxTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others) 【Problem Description】There are N boxes on the ground, which are la...
分类:
其他好文 时间:
2015-04-25 13:29:16
阅读次数:
159