Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Iris
RefinedC
Commits
8bdc717a
Commit
8bdc717a
authored
Nov 18, 2020
by
Rodolphe Lepigre
Browse files
Script adjustment.
parent
8c1aaae7
Pipeline
#37793
passed with stage
in 14 minutes and 42 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
destructive_gen_data.py
View file @
8bdc717a
...
...
@@ -100,7 +100,7 @@ def parse_file(f):
def
compute_annots
(
FILES
):
total
=
{}
o
=
subprocess
.
check_output
([
"tokei"
,
"--output=json"
,
"--files"
]
+
FILES
)
print
(
o
)
#
print(o)
inner
=
json
.
loads
(
o
)
if
"CHeader"
not
in
inner
:
inner
[
"CHeader"
]
=
{
"code"
:
0
,
"reports"
:
[]}
...
...
@@ -263,6 +263,9 @@ stats = [ {
# liInst Hevar γ.
stats
[
5
][
"progs"
][
0
][
"stats"
][
"annot"
]
+=
6
print
(
json
.
dumps
(
stats
,
indent
=
2
))
with
open
(
'data.json'
,
'w'
)
as
f
:
# print(json.dumps(stats, indent=2))
output_file
=
'data.json'
with
open
(
output_file
,
'w'
)
as
f
:
json
.
dump
(
stats
,
f
,
indent
=
2
)
print
(
"Data written to [{}]."
,
output_file
)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment