File size: 795 Bytes
85e3d20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import subprocess
import pandas as pd

taskname = "google-research-identify-contrails-reduce-global-warming"
download_dir = "../env"

input(f"Consent to the competition at https://www.kaggle.com/competitions/{taskname}/data; Press any key after you have accepted the rules online.")

subprocess.run(["kaggle", "competitions", "download", "-c", taskname], cwd=download_dir) 
subprocess.run(["unzip", "-n", f"{taskname}.zip"], cwd=download_dir) 
subprocess.run(["rm", f"{taskname}.zip"], cwd=download_dir) 


subprocess.run(["rm", "-r", "test"], cwd=download_dir) 
subprocess.run(["mv", "validation", "test"], cwd=download_dir) 
subprocess.run(["cp","-r", "test", "../scripts/test_answer"], cwd=download_dir) 
subprocess.run(["rm test/*/human_pixel_masks.npy"], cwd=download_dir, shell=True)