Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.pad.base
Commits
47666724
Commit
47666724
authored
Sep 20, 2016
by
Pavel KORSHUNOV
Browse files
Clean up some code
parent
749c6799
Pipeline
#3843
failed with stage
in 60 minutes and 33 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
MANIFEST.in
View file @
47666724
...
...
@@ -2,3 +2,4 @@ include README.rst bootstrap-buildout.py buildout.cfg develop.cfg version.txt re
recursive-include doc *.py *.rst
recursive-include bob *.txt *.hdf5
recursive-include bob *.sql3
recursive-include bob/pad/base/test/data scores-* *.sql3
bob/pad/base/tools/preprocessor.py
View file @
47666724
...
...
@@ -57,8 +57,6 @@ def preprocess(preprocessor, groups=None, indices=None, force=False):
# get the file lists
data_files
,
original_directory
,
original_extension
=
fs
.
original_data_list_files
(
groups
=
groups
)
preprocessed_data_files
=
fs
.
preprocessed_data_list
(
groups
=
groups
)
print
(
"len of data files: %s"
%
(
str
(
len
(
data_files
))))
print
(
"len of preprocessed data files (paths): %s"
%
(
str
(
len
(
preprocessed_data_files
))))
# select a subset of keys to iterate
if
indices
is
not
None
:
...
...
bob/pad/base/tools/scoring.py
View file @
47666724
...
...
@@ -112,14 +112,11 @@ def _save_scores(score_file, scores, toscore_objects, write_compressed=False):
for
i
,
toscore_object
in
enumerate
(
toscore_objects
):
id_str
=
(
str
(
toscore_object
.
client_id
)).
zfill
(
3
)
sample_name
=
str
(
toscore_object
.
make_path
())
print
(
"i=%d, scores=%s"
%
(
i
,
str
(
scores
)))
for
score
in
scores
[
i
]:
if
not
toscore_object
.
attack_type
or
toscore_object
.
attack_type
==
"None"
:
print
(
"- Scoring: %s, id: %s, real"
%
(
sample_name
,
id_str
))
_write
(
f
,
"%s %s %s %.12f
\n
"
%
(
id_str
,
id_str
,
sample_name
,
score
),
write_compressed
)
else
:
attackname
=
toscore_object
.
attack_type
print
(
"- Scoring: %s, id: %s, attack: %s"
%
(
sample_name
,
id_str
,
attackname
))
_write
(
f
,
"%s %s %s %.12f
\n
"
%
(
id_str
,
attackname
,
sample_name
,
score
),
write_compressed
)
_close_written
(
score_file
,
f
,
write_compressed
)
...
...
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