Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.db.banca
Commits
bf7528d5
Commit
bf7528d5
authored
Aug 20, 2013
by
André Anjos
💬
Browse files
[python3] string class comparison using six
parent
48933d8c
Changes
2
Hide whitespace changes
Inline
Side-by-side
setup.py
View file @
bf7528d5
...
...
@@ -24,6 +24,7 @@ setup(
install_requires
=
[
'setuptools'
,
'six'
,
# py2/3 compatibility library
'bob'
,
# base signal proc./machine learning library
'xbob.db.verification.utils>=0.1.4'
# defines a set of utilities for face verification databases like this one.
],
...
...
xbob/db/banca/query.py
View file @
bf7528d5
...
...
@@ -7,6 +7,7 @@ BANCA database in the most obvious ways.
"""
import
os
import
six
from
bob.db
import
utils
from
.models
import
*
from
.driver
import
Interface
...
...
@@ -31,7 +32,7 @@ class Database(xbob.db.verification.utils.SQLiteDatabase, xbob.db.verification.u
"""Replace 'dev' by 'g1' and 'eval' by 'g2' in a list of groups, and
returns the new list"""
if
not
l
:
return
l
elif
isinstance
(
l
,
s
tr
):
return
self
.
__group_replace_alias__
((
l
,))
elif
isinstance
(
l
,
s
ix
.
string_types
):
return
self
.
__group_replace_alias__
((
l
,))
l2
=
[]
for
val
in
l
:
if
(
val
==
'dev'
):
l2
.
append
(
'g1'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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