更多代码请见:https://github.com/xubo245/AdamLearning
1解释
统计项目下各语言的代码量
例子:tensorflow
tensorflow 代码大概63万行
2.代码:
(1)代码下载
git clone https://github.com/tensorflow/tensorflow
(2)安装cloc:
sudo apt-get install cloc
(3)进行统计:
cloc .
3.结果:
hadoop@Master:~/Chng/tensorflow-git$ cloc .
3700 text files.
3664 unique files.
773 files ignored.
http://cloc.sourceforge.net v 1.60 T=19.83 s (153.0 files/s, 46529.7 lines/s)
--------------------------------------------------------------------------------
Language files blank comment code
--------------------------------------------------------------------------------
C++ 1049 45212 42065 268203
Python 610 26037 44022 90794
C/C++ Header 768 23193 44258 84909
Objective C 51 7173 5766 52168
Java 167 8296 17325 49374
C# 116 4285 8653 34347
HTML 77 893 258 18311
C 8 2302 2599 13059
Javascript 31 1634 4170 6276
Bourne Shell 57 969 1745 3904
Ruby 11 295 234 1924
make 5 116 79 1669
CMake 23 222 391 1323
Maven 7 42 24 980
m4 5 94 51 614
MSBuild scripts 5 0 35 479
Go 4 34 30 308
Bourne Again Shell 3 38 68 224
XML 21 97 205 218
Lisp 1 46 85 89
YAML 2 7 19 81
CSS 2 2 2 76
vim script 1 13 42 50
DOS Batch 2 9 0 33
ASP.Net 6 0 0 25
Objective C++ 1 8 45 16
--------------------------------------------------------------------------------
SUM: 3033 121017 172171 629454
--------------------------------------------------------------------------------
参考
【1】https://github.com/tensorflow/tensorflow
【2】https://github.com/xubo245/AdamLearning