MCPcopy Create free account
hub / github.com/pytorch/tutorials / download_file

Function download_file

tools/linter/adapters/run_from_link.py:49–53  ·  view source on GitHub ↗
(url: str, location: Path)

Source from the content-addressed store, hash-verified

47
48
49def download_file(url: str, location: Path) -> bytes:
50 response = urllib.request.urlopen(url)
51 content = response.read()
52 location.write_bytes(content)
53 return content
54
55
56def main() -> None:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected