Skip to content

Commit

Permalink
replace broken download link
Browse files Browse the repository at this point in the history
  • Loading branch information
chistopher committed Nov 30, 2023
1 parent e5e31e3 commit 5a38286
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion data/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ all:
echo "hello"

fastestspeedrun:
wget -O fastestspeedrun.zip https://owncloud.hpi.de/s/tGKfRrmTUejNhRH/download
wget -O fastestspeedrun.zip https://bwsyncandshare.kit.edu/s/EfgSBYLrS7q9NyF/download/fastestspeedrun.zip
unzip fastestspeedrun.zip
rm fastestspeedrun.zip
./fastestspeedrun_convert.py
Expand Down
24 changes: 24 additions & 0 deletions data/fastestspeedrun_download.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/python3

import re
import requests
from os import path
from bs4 import BeautifulSoup

url = 'https://speedyguy17.info/icpc/data/nwerc/2018/fastestspeedrun/data/secret/'

page = requests.get(url)
soup = BeautifulSoup(page.text, features="lxml")

for link_tag in soup.find_all('a', href=re.compile("0.*\.(in)|(ans)")):
link = link_tag.get('href')
file_name = f'fastestspeedrun/{link}'

if path.isfile(file_name):
print(f'\t{file_name} is already present; skipping')
continue

print(f'found test {link}, trying to download')
f = requests.get(path.join(url, link))
open(file_name, 'wb').write(f.content)

2 changes: 1 addition & 1 deletion data/konect_download_directed.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
continue
if not link_tag.parent.parent.find('img', title='Unipartite, directed'):
continue
print(f'network {link[:-1]} seems to be directed, tying to download')
print(f'network {link[:-1]} seems to be directed, trying to download')

if link[:-1] in exclude:
print(f'skipping network because of manual exclude')
Expand Down
2 changes: 1 addition & 1 deletion data/sources.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ https://snap.stanford.edu/data/
fastestspeedrun:
NWERC2018 problem
https://speedyguy17.info/icpc/data/nwerc/2018/fastestspeedrun/data/secret/
wget -O data/fastestspeedrun.zip https://owncloud.hpi.de/s/tGKfRrmTUejNhRH/download
https://bwsyncandshare.kit.edu/s/EfgSBYLrS7q9NyF (obtained from above url with fastestspeedrun_download.py)

hrg:
generated hyperbolic random graphs
Expand Down

0 comments on commit 5a38286

Please sign in to comment.