Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.db.kboc16
Commits
b46ddd3e
Commit
b46ddd3e
authored
Jan 28, 2016
by
MGB
Browse files
minor fixes
parent
21643d35
Changes
3
Hide whitespace changes
Inline
Side-by-side
bob/db/KBOC16/create.py
View file @
b46ddd3e
...
...
@@ -21,7 +21,7 @@ import os,string
from
.models
import
*
# clients
userid_clients
=
range
(
1
,
30
0
)
userid_clients
=
range
(
1
,
30
1
)
def
nodot
(
item
):
"""Can be used to ignore hidden files, starting with the . character."""
...
...
@@ -29,7 +29,7 @@ def nodot(item):
def
add_clients
(
session
,
verbose
):
"""Add clients to the ATVS Keystroke database."""
for
c
d
id
in
userid_clients
:
for
cid
in
userid_clients
:
if
verbose
>
1
:
print
(
" Adding user '%s'"
%
(
cid
))
session
.
add
(
Client
(
cid
))
...
...
bob/db/KBOC16/query.py
View file @
b46ddd3e
...
...
@@ -107,14 +107,14 @@ class Database(bob.db.verification.utils.SQLiteDatabase,bob.db.verification.util
"""
groups
=
self
.
__group_replace_eval_by_genuine__
(
groups
)
groups
=
self
.
check_parameters_for_validity
(
groups
,
"group"
,
(
'Genuine'
,))
#
groups = self.check_parameters_for_validity(groups, "group", ('Genuine',))
# List of the clients
q
=
self
.
query
(
Client
)
if
groups
:
"""
if groups:
q = q.filter(Client.stype.in_(groups))
else:
q
=
q
.
filter
(
Client
.
stype
.
in_
([
'Genuine'
]))
q = q.filter(Client.stype.in_(['Genuine']))
"""
q
=
q
.
order_by
(
Client
.
id
)
return
list
(
q
)
...
...
@@ -200,7 +200,6 @@ class Database(bob.db.verification.utils.SQLiteDatabase,bob.db.verification.util
if
(
'eval'
in
groups
):
if
(
'enrol'
in
purposes
):
q
=
self
.
query
(
File
).
join
(
Client
).
join
((
ProtocolPurpose
,
File
.
protocolPurposes
)).
join
(
Protocol
).
\
filter
(
Client
.
stype
.
in_
([
'Genuine'
])).
\
filter
(
and_
(
Protocol
.
name
.
in_
(
protocol
),
ProtocolPurpose
.
sgroup
.
in_
(
groups
),
ProtocolPurpose
.
purpose
==
'enrol'
))
if
model_ids
:
q
=
q
.
filter
(
Client
.
subid
.
in_
(
model_ids
))
...
...
@@ -210,7 +209,6 @@ class Database(bob.db.verification.utils.SQLiteDatabase,bob.db.verification.util
if
(
'probe'
in
purposes
):
if
(
'client'
in
classes
):
q
=
self
.
query
(
File
).
join
(
Client
).
join
((
ProtocolPurpose
,
File
.
protocolPurposes
)).
join
(
Protocol
).
\
filter
(
Client
.
stype
.
in_
([
'Genuine'
])).
\
filter
(
and_
(
Protocol
.
name
.
in_
(
protocol
),
ProtocolPurpose
.
sgroup
.
in_
(
groups
),
ProtocolPurpose
.
purpose
==
'probe'
))
if
model_ids
:
q
=
q
.
filter
(
Client
.
subid
.
in_
(
model_ids
))
...
...
@@ -219,7 +217,6 @@ class Database(bob.db.verification.utils.SQLiteDatabase,bob.db.verification.util
if
(
'impostor'
in
classes
):
q
=
self
.
query
(
File
).
join
(
Client
).
join
((
ProtocolPurpose
,
File
.
protocolPurposes
)).
join
(
Protocol
).
\
filter
(
Client
.
stype
.
in_
([
'Impostor'
])).
\
filter
(
and_
(
Protocol
.
name
.
in_
(
protocol
),
ProtocolPurpose
.
sgroup
.
in_
(
groups
),
ProtocolPurpose
.
purpose
==
'probe'
))
if
model_ids
:
q
=
q
.
filter
(
Client
.
subid
.
in_
(
model_ids
))
...
...
setup.py
View file @
b46ddd3e
...
...
@@ -29,10 +29,10 @@ version = open("version.txt").read().rstrip()
# parameters that define our package.
setup
(
name
=
'bob.db.
atvskeystroke
'
,
name
=
'bob.db.
KBOC16
'
,
version
=
version
,
description
=
'KBOC16 Database Access API for Bob'
,
url
=
'http://github.com/
bioidiap
/bob.db.KBOC16'
,
url
=
'http://github.com/
mgbarrero
/bob.db.KBOC16'
,
license
=
'GPLv3'
,
author
=
'Marta Gomez-Barrero'
,
author_email
=
'marta.barrero@uam.es'
,
...
...
Write
Preview
Markdown
is supported
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