MCPcopy Index your code
hub / github.com/lazyprogrammer/machine_learning_examples / download_file

Function download_file

unsupervised_class3/util.py:160–170  ·  view source on GitHub ↗
(file_id, dest)

Source from the content-addressed store, hash-verified

158
159
160def download_file(file_id, dest):
161 drive_url = "https://docs.google.com/uc?export=download"
162 session = requests.Session()
163 response = session.get(drive_url, params={'id': file_id}, stream=True)
164 token = get_confirm_token(response)
165
166 if token:
167 params = {'id': file_id, 'confirm': token}
168 response = session.get(drive_url, params=params, stream=True)
169
170 save_response_content(response, dest)
171
172

Callers 1

get_celebFunction · 0.85

Calls 3

get_confirm_tokenFunction · 0.85
save_response_contentFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected