Download rwd_date_insertion.py from jkushwaha/code: direct link, hf CLI and curl.
- Browser
- Download file 360 Bytes
-
https://huggingface.co/jkushwaha/code/resolve/main/rwd_date_insertion.py
- Command line
-
hf download hf://jkushwaha/code/rwd_date_insertion.py
-
curl -L -o rwd_date_insertion.py https://huggingface.co/jkushwaha/code/resolve/main/rwd_date_insertion.py
360 Bytes
| def update_report_date(data, new_date): | |
| if isinstance(data, dict): | |
| for key, value in data.items(): | |
| if key == 'report_date': | |
| data[key] = new_date | |
| else: | |
| update_report_date(value, new_date) | |
| elif isinstance(data, list): | |
| for item in data: | |
| update_report_date(item, new_date) |