Spaces:
Running
Running
Download examples.py from kugguk/electrocheap: direct link, hf CLI and curl.
- Browser
- Download file 708 Bytes
-
https://huggingface.co/spaces/kugguk/electrocheap/resolve/main/examples.py
- Command line
-
hf download hf://spaces/kugguk/electrocheap/examples.py
-
curl -L -o examples.py https://huggingface.co/spaces/kugguk/electrocheap/resolve/main/examples.py
708 Bytes
| from pathlib import Path | |
| import pandas as pd | |
| ROOT=Path(__file__).resolve().parent | |
| def examples(): | |
| quotes=pd.read_csv(ROOT/'data/example_quotes.csv',keep_default_na=False).to_dict('records') | |
| pt=[q for q in quotes if q['country']=='PT'] | |
| sample={'country':'PT','region':'PT-mainland','annual_kwh':3500,'current_annual_bill':1200,'peak_share':.5,'meter_type':'standard','allow_illustrative':True,'as_of':'2026-10-10','offers':pt} | |
| ngo={'offers':pt,'allow_illustrative':True,'as_of':'2026-10-10','profiles':[{'profile_id':'household-001','country':'PT','region':'PT-mainland','customer_type':'consumer','annual_kwh':3500,'current_annual_bill':1200,'meter_type':'standard'}]} | |
| return sample,ngo | |