Download scripts/fake_data.py from OneScience-Group/TropiCycloneNet: direct link, hf CLI and curl.
- Browser
- Download file 624 Bytes
-
https://huggingface.co/OneScience-Group/TropiCycloneNet/resolve/main/scripts/fake_data.py
- Command line
-
hf download hf://OneScience-Group/TropiCycloneNet/scripts/fake_data.py
-
curl -L -o fake_data.py https://huggingface.co/OneScience-Group/TropiCycloneNet/resolve/main/scripts/fake_data.py
624 Bytes
| from pathlib import Path | |
| import sys,json | |
| ROOT=Path(__file__).resolve().parents[1];sys.path.insert(0,str(ROOT)) | |
| from model.tropicyclonenet import * | |
| c=load_config(ROOT);o,g,e,y,gy=synthetic_sample(0);assert o.shape==(8,4) and g.shape==(8,1,81,81) and e.shape==(8,73) and y.shape==(4,4);p=ROOT/c["data"]["manifest"];p.parent.mkdir(parents=True,exist_ok=True);p.write_text(json.dumps({"format_version":c["data"]["format_version"],"data1d_history_shape":[8,4],"data3d_history_shape":[8,1,81,81],"environment_shape":[8,73],"target_shape":[4,4],"interval_hours":6,"basins":c["data"]["basins"],"synthetic":True},indent=2));print(p) | |