Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.example.faceverify
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
bob
bob.example.faceverify
Commits
6873cd6b
Commit
6873cd6b
authored
10 years ago
by
Manuel Günther
Browse files
Options
Downloads
Patches
Plain Diff
Fixed urllib for python 3.
parent
fbdf09fd
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+17
-10
17 additions, 10 deletions
.gitignore
bob/example/faceverify/utils.py
+7
-2
7 additions, 2 deletions
bob/example/faceverify/utils.py
with
24 additions
and
12 deletions
.gitignore
+
17
−
10
View file @
6873cd6b
*.swp
*~
*.swp
*.pyc
*.png
*.pdf
*.so
*.dylib
CMakeLists.txt
bin
eggs
parts
.installed.cfg
.mr.developer.cfg
eggs/
develop-eggs/
bob.example.faceverify.egg-info/
*.egg-info
develop-eggs
sphinx
dist
.nfs*
.gdb_history
build
*.egg
src/
bin/
dist/
sphinx/
Database/
*.png
*.pdf
This diff is collapsed.
Click to expand it.
bob/example/faceverify/utils.py
+
7
−
2
View file @
6873cd6b
...
...
@@ -41,14 +41,19 @@ def atnt_database_directory(atnt_user_directory = None):
os
.
mkdir
(
atnt_default_directory
)
# setup
import
urllib2
,
tempfile
import
sys
,
tempfile
if
sys
.
version_info
[
0
]
<=
2
:
import
urllib2
as
urllib
else
:
import
urllib.request
as
urllib
db_url
=
'
http://www.cl.cam.ac.uk/Research/DTG/attarchive/pub/data/att_faces.zip
'
import
logging
logger
=
logging
.
getLogger
(
'
bob
'
)
logger
.
warn
(
"
Downloading the AT&T database from
'
%s
'
to
'
%s
'
...
"
%
(
db_url
,
atnt_default_directory
))
# download
url
=
urllib
2
.
urlopen
(
db_url
)
url
=
urllib
.
urlopen
(
db_url
)
local_zip_file
=
tempfile
.
mkstemp
(
prefix
=
'
atnt_db_
'
,
suffix
=
'
.zip
'
)[
1
]
dfile
=
open
(
local_zip_file
,
'
w
'
)
dfile
.
write
(
url
.
read
())
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment