Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120457989
exp-statistics.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Jul 4, 13:19
Size
563 B
Mime Type
text/x-python
Expires
Sun, Jul 6, 13:19 (2 d)
Engine
blob
Format
Raw Data
Handle
27174071
Attached To
R3704 elastic-yarn
exp-statistics.py
View Options
#!/usr/bin/env python
import
sys
from
os
import
listdir
from
os.path
import
isfile
,
join
if
len
(
sys
.
argv
)
!=
3
:
print
"Usage: "
+
sys
.
argv
[
0
]
+
" <exp_folder> <exp_type>"
exit
(
1
)
exp_folder
=
sys
.
argv
[
1
]
exp_type
=
sys
.
argv
[
2
]
file_suffix
=
".jrt.cdf"
for
f
in
listdir
(
exp_folder
):
if
isfile
(
join
(
exp_folder
,
f
)):
if
exp_type
in
f
and
f
.
endswith
(
file_suffix
)
and
not
"avg"
in
f
:
print
f
with
open
(
join
(
exp_folder
,
f
),
"r"
)
as
in_file
:
lines
=
in_file
.
readlines
()
print
len
(
lines
)
Event Timeline
Log In to Comment