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)