Download solutions/format-code-task-000666.py from akseljoonas/mimo-openenv-software: direct link, hf CLI and curl.
- Browser
- Download file 480 Bytes
-
https://huggingface.co/datasets/akseljoonas/mimo-openenv-software/resolve/main/solutions/format-code-task-000666.py
- Command line
-
hf download hf://datasets/akseljoonas/mimo-openenv-software/solutions/format-code-task-000666.py
-
curl -L -o format-code-task-000666.py https://huggingface.co/datasets/akseljoonas/mimo-openenv-software/resolve/main/solutions/format-code-task-000666.py
480 Bytes
| """Deterministic reference repair; verification fixture only.""" | |
| from pathlib import Path | |
| path = Path('/workspace/repo/src/pyromat/__init__.py') | |
| source = path.read_text() | |
| assert '\ndef get(' not in source | |
| source += ''' | |
| def get(idstr): | |
| try: | |
| return dat.data[idstr] | |
| except KeyError: | |
| utility.print_error('No substance named ' + str(idstr) + ' was found.') | |
| raise utility.PMParamError('Invalid substance ID: ' + str(idstr)) | |
| ''' | |
| path.write_text(source) | |