summaryrefslogtreecommitdiff
path: root/src/python/gudhi/datasets/remote.py
diff options
context:
space:
mode:
authorHind-M <hind.montassif@gmail.com>2021-06-02 11:30:09 +0200
committerHind-M <hind.montassif@gmail.com>2021-06-02 11:30:09 +0200
commitc2f0cf79af04ea3586a70c0a121a200353e989ac (patch)
treedbd994ebc9a34a13914b8bc51a5165466be91e73 /src/python/gudhi/datasets/remote.py
parentf0c12fbdce04d09bf13b141d549e5e385c64caad (diff)
Add wrapping function to fecth spiral_2d.csv directly
Diffstat (limited to 'src/python/gudhi/datasets/remote.py')
-rw-r--r--src/python/gudhi/datasets/remote.py24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/python/gudhi/datasets/remote.py b/src/python/gudhi/datasets/remote.py
index 27076785..4a300b15 100644
--- a/src/python/gudhi/datasets/remote.py
+++ b/src/python/gudhi/datasets/remote.py
@@ -46,11 +46,11 @@ def fetch(url, filename, dirname = "remote_datasets", checksum_flag = False, fil
Parameters
----------
url : string
- The url to fetch the dataset from
+ The url to fetch the dataset from.
filename : string
- The filename to download
+ The name to give to downloaded file.
dirname : string
- The directory to save the file to.
+ The directory to save the file to. Default is "remote_datasets".
checksum_flag : boolean
To set if the user wants the file checksum. Default is 'False'.
Note that if checksum_flag is set to 'True', the file_checksum must be provided.
@@ -83,3 +83,21 @@ def fetch(url, filename, dirname = "remote_datasets", checksum_flag = False, fil
file_checksum))
return file_path
+
+def fetch_spiral_2d(filename = "spiral_2d.csv", dirname = "remote_datasets"):
+ """
+ Fetch spiral_2d.csv remotely
+
+ Parameters
+ ----------
+ filename : string
+ The name to give to downloaded file. Default is "spiral_2d.csv"
+ dirname : string
+ The directory to save the file to. Default is "remote_datasets".
+
+ Returns
+ -------
+ file_path: string
+ Full path of the created file.
+ """
+ return fetch("https://raw.githubusercontent.com/Hind-M/gudhi-data/main/spiral_2d.csv", filename, dirname, True, '37530355d980d957c4ec06b18c775f90a91e446107d06c6201c9b4000b077f38')