MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / download_from_url

Function download_from_url

imperative/python/megengine/utils/http_download.py:31–40  ·  view source on GitHub ↗

r"""Downloads file from given url to ``dst``. Args: url: source URL. dst: saving path.

(url: str, dst: str)

Source from the content-addressed store, hash-verified

29
30
31def download_from_url(url: str, dst: str):
32 r"""Downloads file from given url to ``dst``.
33
34 Args:
35 url: source URL.
36 dst: saving path.
37 """
38 dst = os.path.expanduser(dst)
39 smart_copy(url, dst, callback=Bar(total=smart_getsize(url)))
40 return smart_getmd5(dst)

Callers 2

load_raw_data_from_urlFunction · 0.85

Calls 1

BarClass · 0.85

Tested by

no test coverage detected