Download audit_corpus/viol_try_except.py from npc-worldwide/guac-coder: direct link, hf CLI and curl.
- Browser
- Download file 232 Bytes
-
https://huggingface.co/npc-worldwide/guac-coder/resolve/main/audit_corpus/viol_try_except.py
- Command line
-
hf download hf://npc-worldwide/guac-coder/audit_corpus/viol_try_except.py
-
curl -L -o viol_try_except.py https://huggingface.co/npc-worldwide/guac-coder/resolve/main/audit_corpus/viol_try_except.py
232 Bytes
| import logging | |
| logger = logging.getLogger(__name__) | |
| def load(path): | |
| try: | |
| with open(path) as fh: | |
| return fh.read() | |
| except Exception: | |
| return None | |
| if __name__ == "__main__": | |
| load("data.txt") | |