Download Pytorch/Tools/scripts/checkpip.py from RayTBRP/codellama-CodeLlama-7b-Python-hf: direct link, hf CLI and curl.
- Browser
- Download file 793 Bytes
-
https://huggingface.co/RayTBRP/codellama-CodeLlama-7b-Python-hf/resolve/c0c5506eba15c7ab03ff4f59bbe251ee2db72517/Pytorch/Tools/scripts/checkpip.py
- Command line
-
hf download hf://RayTBRP/codellama-CodeLlama-7b-Python-hf@c0c5506eba15c7ab03ff4f59bbe251ee2db72517/Pytorch/Tools/scripts/checkpip.py
-
curl -L -o checkpip.py https://huggingface.co/RayTBRP/codellama-CodeLlama-7b-Python-hf/resolve/c0c5506eba15c7ab03ff4f59bbe251ee2db72517/Pytorch/Tools/scripts/checkpip.py
793 Bytes
| #!/usr/bin/env python3 | |
| """ | |
| Checks that the version of the projects bundled in ensurepip are the latest | |
| versions available. | |
| """ | |
| import ensurepip | |
| import json | |
| import urllib.request | |
| import sys | |
| def main(): | |
| outofdate = False | |
| for project, version in ensurepip._PROJECTS: | |
| data = json.loads(urllib.request.urlopen( | |
| "https://pypi.org/pypi/{}/json".format(project), | |
| cadefault=True, | |
| ).read().decode("utf8")) | |
| upstream_version = data["info"]["version"] | |
| if version != upstream_version: | |
| outofdate = True | |
| print("The latest version of {} on PyPI is {}, but ensurepip " | |
| "has {}".format(project, upstream_version, version)) | |
| if outofdate: | |
| sys.exit(1) | |
| if __name__ == "__main__": | |
| main() | |