MCPcopy Create free account
hub / github.com/Pometry/Raphtory / download_data

Function download_data

raphtory-benchmark/python/benchmark_driver.py:159–183  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

157
158
159def download_data():
160 # Download the data
161 print("Downloading data...")
162 urls = {
163 "simple-profiles.csv.gz": "https://osf.io/download/w2xns/",
164 "simple-relationships.csv.gz": "https://osf.io/download/nbq6h/",
165 }
166
167 # make the data directory
168 create_directory("data")
169
170 for name, url in urls.items():
171 dl_file(url, "data/" + name)
172
173 # Unzip the files
174 for name in urls.keys():
175 print("Unzipping " + name + "...")
176 with gzip.open("data/" + name, "rb") as f_in:
177 with open("data/" + name[:-3], "wb") as f_out:
178 shutil.copyfileobj(f_in, f_out)
179 print("Done unzipping " + name + "...")
180 os.remove("data/" + name)
181
182 # return the file paths
183 return "data/simple-profiles.csv", "data/simple-relationships.csv"
184
185
186def main(docker, choice):

Callers 1

mainFunction · 0.85

Calls 5

create_directoryFunction · 0.85
dl_fileFunction · 0.85
itemsMethod · 0.45
keysMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected