Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tiago Peixoto
graph-tool
Commits
5bbbfc4b
Commit
5bbbfc4b
authored
Mar 12, 2018
by
Tiago Peixoto
Browse files
collection: Update konect URL
parent
f32baccc
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/graph_tool/collection/__init__.py
View file @
5bbbfc4b
...
...
@@ -37,11 +37,10 @@ This module contains an assortment of useful networks.
Dictionary containing :class:`~graph_tool.Graph` objects, indexed by the
name of the graph, fetched from the `Koblenz Network Collection
<http://konect.uni-koblenz.de/>`_. See the website for a list of available
data. The key of the dictionary must correspond to the name of the file
minus the ``.tar.bz2`` part. This is a "lazy" dictionary, i.e. it only
downloads the graphs from the web when the items are accessed for the first
time.
<http://konect.cc/>`_. See the website for a list of available data. The key
of the dictionary must correspond to the name of the file minus the
``.tar.bz2`` part. This is a "lazy" dictionary, i.e. it only downloads the
graphs from the web when the items are accessed for the first time.
Examples
========
...
...
src/graph_tool/collection/konect.py
View file @
5bbbfc4b
...
...
@@ -93,7 +93,7 @@ def load_koblenz_dir(dirname):
def
get_koblenz_network_data
(
name
):
with
tempfile
.
TemporaryFile
(
mode
=
'w+b'
)
as
ftemp
:
response
=
urlopen
(
'http://konect.
uni-koblenz.de
/download
s/
tsv
/
%s.tar.bz2'
%
name
)
response
=
urlopen
(
'http://konect.
cc/files
/download
.
tsv
.
%s.tar.bz2'
%
name
)
buflen
=
1
<<
20
while
True
:
buf
=
response
.
read
(
buflen
)
...
...
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