Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CTDAS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Show more breadcrumbs
NearRealTimeCTDAS
CTDAS
Commits
70d83bba
Commit
70d83bba
authored
12 years ago
by
Peters, Wouter
Browse files
Options
Downloads
Patches
Plain Diff
needed minor update
parent
faf9475a
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
da/analysis/country_dictionary.dat
+0
-0
0 additions, 0 deletions
da/analysis/country_dictionary.dat
da/analysis/tools_country.py
+4
-3
4 additions, 3 deletions
da/analysis/tools_country.py
with
4 additions
and
3 deletions
da/analysis/country_dictionary.dat
+
0
−
0
View file @
70d83bba
No preview for this file type
This diff is collapsed.
Click to expand it.
da/analysis/tools_country.py
+
4
−
3
View file @
70d83bba
...
...
@@ -131,12 +131,12 @@ def get_countrydict():
import
mysettings
import
os
file
=
os
.
path
.
join
(
mysettings
.
pylibdir
,
'
datasets
'
,
'
country_dictionary.dat
'
)
file
=
os
.
path
.
join
(
'
country_dictionary.dat
'
)
try
:
countrydict
=
cPickle
.
load
(
open
(
file
,
'
rb
'
))
except
:
db
=
dbf
.
Dbf
(
os
.
path
.
join
(
mysettings
.
pylibdir
,
'
datasets/
GRIDCTRY.DBF
'
))
db
=
dbf
.
Dbf
(
os
.
path
.
join
(
'
GRIDCTRY.DBF
'
))
countrydict
=
{}
for
n
,
rec
in
enumerate
(
db
):
...
...
@@ -172,9 +172,10 @@ def get_countrydict():
countrydict
[
code
]
=
a
dummy
=
cPickle
.
dump
(
countrydict
,
open
(
file
,
'
wb
'
),
-
1
)
db
.
close
()
dummy
=
cPickle
.
dump
(
countrydict
,
open
(
file
,
'
wb
'
),
-
1
)
return
countrydict
if
__name__
==
"
__main__
"
:
...
...
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