Download scripts/fake_data.py from OneScience-Group/RainRunoff-LSTM: direct link, hf CLI and curl.
- Browser
- Download file 356 Bytes
-
https://huggingface.co/OneScience-Group/RainRunoff-LSTM/resolve/main/scripts/fake_data.py
- Command line
-
hf download hf://OneScience-Group/RainRunoff-LSTM/scripts/fake_data.py
-
curl -L -o fake_data.py https://huggingface.co/OneScience-Group/RainRunoff-LSTM/resolve/main/scripts/fake_data.py
356 Bytes
| from pathlib import Path | |
| import numpy as np,yaml | |
| R=Path(__file__).resolve().parents[1];c=yaml.safe_load((R/'conf/config.yaml').read_text());x=np.random.default_rng(1).normal(size=(12,365,5)).astype('f');y=(x[:,:,0].mean(1)+x[:,:,3].mean(1)).astype('f');p=R/c['data']['path'];p.parent.mkdir(parents=True,exist_ok=True);np.savez(p,input=x,target=y);print(p) | |