-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget_datasets.py
34 lines (23 loc) · 979 Bytes
/
get_datasets.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import subprocess
dblp_link = r"https://raw.githubusercontent.com/frbkrm/NtwPerceptionBias/master/datasets/DBLP_graph.gexf"
github_link = r"https://raw.githubusercontent.com/frbkrm/NtwPerceptionBias/master/datasets/github_mutual_follower_ntw.gexf"
aps_link = r"https://raw.githubusercontent.com/frbkrm/NtwPerceptionBias/master/datasets/sampled_APS_pacs052030.gexf"
import pathlib
print(pathlib.Path(__file__).parent.absolute())
parent = pathlib.Path(__file__).parent.absolute()
links = [dblp_link, github_link, aps_link]
names = ["dblp", "github", "aps"]
out_names = [str(parent/'notebooks'/name)+".gexf" for name in names]
print("downloading datasets")
print()
if True:
for link, out_name in zip(links, out_names):
command = "wget " + link +" -O " + out_name
subprocess.call(command, shell=True)
print()
print("downloading complete")
print()
#import unnet
#from unnet.GEXFConverter.py import *
#out_name = out_names[0]
#with open(out_names, 'r'):