Download scripts/fake_data.py from OneScience-Group/NNCAM-Stable: direct link, hf CLI and curl.
- Browser
- Download file 323 Bytes
-
https://huggingface.co/OneScience-Group/NNCAM-Stable/resolve/main/scripts/fake_data.py
- Command line
-
hf download hf://OneScience-Group/NNCAM-Stable/scripts/fake_data.py
-
curl -L -o fake_data.py https://huggingface.co/OneScience-Group/NNCAM-Stable/resolve/main/scripts/fake_data.py
323 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());g=np.random.default_rng(2);x=g.normal(size=(128,122)).astype('f');y=x[:,:68]*.2;p=R/c['data']['path'];p.parent.mkdir(parents=True,exist_ok=True);np.savez(p,input=x,target=y);print(p) | |