franciszzj commited on
Commit
e7e7179
·
verified ·
1 Parent(s): d6e767b

Add files using upload-large-folder tool

Browse files
.gitattributes CHANGED
@@ -183,3 +183,22 @@ random_mdps/A_Jackal_Fountain_Library_Fri_Oct_29_9.bag filter=lfs diff=lfs merge
183
  random_mdps/B_Spot_Library_Greg_Thu_Nov_11_77.avi filter=lfs diff=lfs merge=lfs -text
184
  random_mdps/A_Spot_AHG_Library_Mon_Nov_8_24.bag filter=lfs diff=lfs merge=lfs -text
185
  random_mdps/A_Spot_AHG_AHG_Mon_Nov_8_27.avi filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  random_mdps/B_Spot_Library_Greg_Thu_Nov_11_77.avi filter=lfs diff=lfs merge=lfs -text
184
  random_mdps/A_Spot_AHG_Library_Mon_Nov_8_24.bag filter=lfs diff=lfs merge=lfs -text
185
  random_mdps/A_Spot_AHG_AHG_Mon_Nov_8_27.avi filter=lfs diff=lfs merge=lfs -text
186
+ random_mdps/A_Spot_Library_AHG_Thu_Nov_4_22.bag filter=lfs diff=lfs merge=lfs -text
187
+ random_mdps/A_Spot_Boatbuilding_AHG_Thu_Nov_4_23.avi filter=lfs diff=lfs merge=lfs -text
188
+ random_mdps/A_Spot_Library_AHG_Mon_Nov_8_33.avi filter=lfs diff=lfs merge=lfs -text
189
+ random_mdps/A_Spot_Fountain_Library_Mon_Nov_8_26.avi filter=lfs diff=lfs merge=lfs -text
190
+ random_mdps/B_Jackal_Library_Sanjac_Sat_Nov_13_88.bag filter=lfs diff=lfs merge=lfs -text
191
+ random_mdps/A_Spot_Jester_Jester_Wed_Nov_10_63.bag filter=lfs diff=lfs merge=lfs -text
192
+ random_mdps/A_Spot_Fountain_Library_Fri_Nov_12_85.avi filter=lfs diff=lfs merge=lfs -text
193
+ random_mdps/A_Jackal_Brackenridge_Greg_Sat_Nov_13_94.avi filter=lfs diff=lfs merge=lfs -text
194
+ random_mdps/B_Spot_Ahg_Library_Thu_Nov_11_68.avi filter=lfs diff=lfs merge=lfs -text
195
+ random_mdps/A_Spot_Fountain_Greg_Mon_Dec_20_138.bag filter=lfs diff=lfs merge=lfs -text
196
+ random_mdps/B_Spot_AHG_Library_Tue_Nov_9_34.bag filter=lfs diff=lfs merge=lfs -text
197
+ random_mdps/A_Spot_AHG_GDC_Tue_Nov_9_41.bag filter=lfs diff=lfs merge=lfs -text
198
+ random_mdps/B_Spot_JCL_JCL_Thu_Nov_11_76.avi filter=lfs diff=lfs merge=lfs -text
199
+ random_mdps/C_Spot_SanJac_Bass_Fri_Nov_26_125.avi filter=lfs diff=lfs merge=lfs -text
200
+ random_mdps/A_Jackal_Library_Fountain_Thu_Oct_28_5.bag filter=lfs diff=lfs merge=lfs -text
201
+ random_mdps/A_Jackal_Libraryfront_Librarydoors_Thu_Nov_4_20.avi filter=lfs diff=lfs merge=lfs -text
202
+ random_mdps/A_Spot_JCL_JCL_Wed_Nov_10_66.avi filter=lfs diff=lfs merge=lfs -text
203
+ random_mdps/B_Spot_Parlin_NHB_Wed_Nov_10_52.bag filter=lfs diff=lfs merge=lfs -text
204
+ random_mdps/B_Spot_RLM_RLM_Wed_Nov_10_45.avi filter=lfs diff=lfs merge=lfs -text
random_mdps/A_Jackal_Brackenridge_Greg_Sat_Nov_13_94.avi ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2f95d9d07916dd90b8dc35f754ae7e49e53738a8415dbabc30e4c75de6a42295
3
+ size 83944550
random_mdps/A_Jackal_Library_Fountain_Thu_Oct_28_5.bag ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:55d9f809308f2b14ad7d0b32b8272f93c684369d5dbaeed420f19c47909ca716
3
+ size 813143775
random_mdps/A_Jackal_Libraryfront_Librarydoors_Thu_Nov_4_20.avi ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3c17487662cdf474cb52c6f35b44231a346dadabf1f08ff410702d96ddd2914c
3
+ size 24248726
random_mdps/A_Spot_AHG_GDC_Tue_Nov_9_41.bag ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1b06ce8da912934f633242c5db5b0d1fa40e26f203df1b8eb4ea921202836fc4
3
+ size 2798793692
random_mdps/A_Spot_Boatbuilding_AHG_Thu_Nov_4_23.avi ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c1610198983c5f3e5c71d7a20b71d1ae020224cb5f1eb96976b164f89a322635
3
+ size 60517166
random_mdps/A_Spot_Fountain_Greg_Mon_Dec_20_138.bag ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8cee5e9d4965938bb00c3102445d23d854535781e3a93d8a1fdb37c92119a4cc
3
+ size 1859693845
random_mdps/A_Spot_Fountain_Library_Fri_Nov_12_85.avi ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5e46a9e8c7c716d72d628b347f2e7b71fba11ac5b80648e23e8055e0120a57a6
3
+ size 116354488
random_mdps/A_Spot_Fountain_Library_Mon_Nov_8_26.avi ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d29976a90f1f0a93ff505c9c7b3ff52bcb6ee30ac6f6b689b491fa451b644615
3
+ size 131942996
random_mdps/A_Spot_JCL_JCL_Wed_Nov_10_66.avi ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e5c641298433b4edd8e1d13356f9ccdc339740ad354dcc74aeef1747fd606db
3
+ size 15879666
random_mdps/A_Spot_Jester_Jester_Wed_Nov_10_63.bag ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2468e6de5f47966ee63b92f55d88c77dc84cb17d61bdb4f65a8d0f0744448b53
3
+ size 1250901857
random_mdps/A_Spot_Library_AHG_Mon_Nov_8_33.avi ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b7bd50102de5613951c5ce6882cfef3b0ce39da7fda9a055af893c55a913aee
3
+ size 401998934
random_mdps/A_Spot_Library_AHG_Thu_Nov_4_22.bag ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9a2d689bd13bdea77fd3d0ac97ada4e869008ae097628bc3d63c79473ff3b7d9
3
+ size 4980371984
random_mdps/B_Jackal_Library_Sanjac_Sat_Nov_13_88.bag ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:de1699c2558d3eaab771e7d42feddf382a5648b4dadedf45109006eabfc9e994
3
+ size 1248621564
random_mdps/B_Spot_AHG_Library_Tue_Nov_9_34.bag ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ce65e8adf70ad2fcb7ac73cf91abcbef05b494b6d609a50cc40a29f6a06e50b6
3
+ size 4182020174
random_mdps/B_Spot_Ahg_Library_Thu_Nov_11_68.avi ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:14490d395c66b006e268fa0a98257d2db87b77f61313e2ee2702feaf019b992d
3
+ size 382093582
random_mdps/B_Spot_JCL_JCL_Thu_Nov_11_76.avi ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:69782e0321454882f2969d2c5a1e66f2351947c3d2b74028dc5ef92e28bca31b
3
+ size 61234624
random_mdps/B_Spot_Parlin_NHB_Wed_Nov_10_52.bag ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0a205d370ccc13962bac063314d497fd8b27761fb8fe4c568b81ade9284d2d80
3
+ size 5164150370
random_mdps/B_Spot_RLM_RLM_Wed_Nov_10_45.avi ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f3301f6bbb43d36fafcc27ffffa9023d32a613c33db4c03ddfe17635d3c8a5bb
3
+ size 25430506
random_mdps/C_Spot_Foodtruck_Bass_Fri_Nov_26_133.mp4 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d57eaa005d1ce23d8d37dc6f383ee4d956402f7fc3f03ab48c0e5c69abdd3202
3
+ size 14219807
random_mdps/C_Spot_SanJac_Bass_Fri_Nov_26_125.avi ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:55cfb2985e5b2f02714a2d122cff78533d5c61ddf61788cf50e8cb0e849a4330
3
+ size 112965438
random_mdps/download_data.py ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import time
3
+ from pyDataverse.api import NativeApi, DataAccessApi
4
+ from pyDataverse.models import Dataverse
5
+ import requests
6
+
7
+ base_url = 'https://dataverse.tdl.org/'
8
+ api_token = "70fcc8fa-3717-4c1b-863d-2da0fb5d9d35"
9
+ api = NativeApi(base_url, api_token)
10
+ data_api = DataAccessApi(base_url)
11
+
12
+ DOI = "doi:10.18738/T8/0PRYRH"
13
+ dataset = api.get_dataset(DOI)
14
+
15
+ if not os.path.exists("random_mdps"):
16
+ os.makedirs("random_mdps")
17
+ if not os.path.exists("delivery_mdp"):
18
+ os.makedirs("delivery_mdp")
19
+
20
+ files_list = dataset.json()['data']['latestVersion']['files']
21
+
22
+ # Function to download a file with retry mechanism and exponential backoff
23
+ def download_file(download_url, headers, dir, filename):
24
+ max_retries = 5
25
+ backoff_factor = 1
26
+ for attempt in range(max_retries):
27
+ try:
28
+ with requests.get(download_url, headers=headers, stream=True) as response:
29
+ response.raise_for_status()
30
+ with open(os.path.join(dir, filename), "wb") as f:
31
+ for chunk in response.iter_content(chunk_size=8192):
32
+ f.write(chunk)
33
+ print(f"Successfully downloaded: {filename}")
34
+ return
35
+ except requests.RequestException as e:
36
+ wait_time = backoff_factor * (2 ** attempt)
37
+ print(f"Error downloading {filename}: {str(e)}. Retrying in {wait_time} seconds...")
38
+ time.sleep(wait_time)
39
+ print(f"Failed to download {filename} after {max_retries} attempts.")
40
+
41
+ for file in files_list:
42
+ filename = file["dataFile"]["filename"]
43
+ file_id = file["dataFile"]["id"]
44
+ print(f"Downloading: File name {filename}, id {file_id}")
45
+
46
+ # Construct the download URL
47
+ download_url = f"{base_url}api/access/datafile/{file_id}"
48
+
49
+ # Set up the request headers with the API token
50
+ headers = {'X-Dataverse-key': api_token}
51
+
52
+ # Determine the directory
53
+ dir = "delivery_mdp/" if "DELIVERY" in filename else "random_mdps/"
54
+
55
+ # Download the file
56
+ download_file(download_url, headers, dir, filename)
57
+
58
+ print("Download process completed.")