partition stringclasses 3
values | func_name stringlengths 1 134 | docstring stringlengths 1 46.9k | path stringlengths 4 223 | original_string stringlengths 75 104k | code stringlengths 75 104k | docstring_tokens listlengths 1 1.97k | repo stringlengths 7 55 | language stringclasses 1
value | url stringlengths 87 315 | code_tokens listlengths 19 28.4k | sha stringlengths 40 40 |
|---|---|---|---|---|---|---|---|---|---|---|---|
train | SSHClient._auth | Try, in order:
- The key(s) passed in, if one was passed in.
- Any key we can find through an SSH agent (if allowed).
- Any "id_rsa", "id_dsa" or "id_ecdsa" key discoverable in ~/.ssh/
(if allowed).
- Plain username/password auth, if a password was given.
... | paramiko/client.py | def _auth(
self,
username,
password,
pkey,
key_filenames,
allow_agent,
look_for_keys,
gss_auth,
gss_kex,
gss_deleg_creds,
gss_host,
passphrase,
):
"""
Try, in order:
- The key(s) passed in, i... | def _auth(
self,
username,
password,
pkey,
key_filenames,
allow_agent,
look_for_keys,
gss_auth,
gss_kex,
gss_deleg_creds,
gss_host,
passphrase,
):
"""
Try, in order:
- The key(s) passed in, i... | [
"Try",
"in",
"order",
":"
] | paramiko/paramiko | python | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/client.py#L591-L756 | [
"def",
"_auth",
"(",
"self",
",",
"username",
",",
"password",
",",
"pkey",
",",
"key_filenames",
",",
"allow_agent",
",",
"look_for_keys",
",",
"gss_auth",
",",
"gss_kex",
",",
"gss_deleg_creds",
",",
"gss_host",
",",
"passphrase",
",",
")",
":",
"saved_exc... | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb |
train | KernelPushRequest.language | Sets the language of this KernelPushRequest.
The language that the kernel is written in # noqa: E501
:param language: The language of this KernelPushRequest. # noqa: E501
:type: str | kaggle/models/kernel_push_request.py | def language(self, language):
"""Sets the language of this KernelPushRequest.
The language that the kernel is written in # noqa: E501
:param language: The language of this KernelPushRequest. # noqa: E501
:type: str
"""
if language is None:
raise ValueError... | def language(self, language):
"""Sets the language of this KernelPushRequest.
The language that the kernel is written in # noqa: E501
:param language: The language of this KernelPushRequest. # noqa: E501
:type: str
"""
if language is None:
raise ValueError... | [
"Sets",
"the",
"language",
"of",
"this",
"KernelPushRequest",
"."
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/models/kernel_push_request.py#L229-L246 | [
"def",
"language",
"(",
"self",
",",
"language",
")",
":",
"if",
"language",
"is",
"None",
":",
"raise",
"ValueError",
"(",
"\"Invalid value for `language`, must not be `None`\"",
")",
"# noqa: E501",
"allowed_values",
"=",
"[",
"\"python\"",
",",
"\"r\"",
",",
"\... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KernelPushRequest.kernel_type | Sets the kernel_type of this KernelPushRequest.
The type of kernel. Cannot be changed once the kernel has been created # noqa: E501
:param kernel_type: The kernel_type of this KernelPushRequest. # noqa: E501
:type: str | kaggle/models/kernel_push_request.py | def kernel_type(self, kernel_type):
"""Sets the kernel_type of this KernelPushRequest.
The type of kernel. Cannot be changed once the kernel has been created # noqa: E501
:param kernel_type: The kernel_type of this KernelPushRequest. # noqa: E501
:type: str
"""
if ker... | def kernel_type(self, kernel_type):
"""Sets the kernel_type of this KernelPushRequest.
The type of kernel. Cannot be changed once the kernel has been created # noqa: E501
:param kernel_type: The kernel_type of this KernelPushRequest. # noqa: E501
:type: str
"""
if ker... | [
"Sets",
"the",
"kernel_type",
"of",
"this",
"KernelPushRequest",
"."
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/models/kernel_push_request.py#L260-L277 | [
"def",
"kernel_type",
"(",
"self",
",",
"kernel_type",
")",
":",
"if",
"kernel_type",
"is",
"None",
":",
"raise",
"ValueError",
"(",
"\"Invalid value for `kernel_type`, must not be `None`\"",
")",
"# noqa: E501",
"allowed_values",
"=",
"[",
"\"script\"",
",",
"\"noteb... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competition_download_leaderboard | Download competition leaderboard # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.competition_download_leaderboard(id, async_req=True)
>>> result = thread.get()
:param async_... | kaggle/api/kaggle_api.py | def competition_download_leaderboard(self, id, **kwargs): # noqa: E501
"""Download competition leaderboard # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.competition_download_leade... | def competition_download_leaderboard(self, id, **kwargs): # noqa: E501
"""Download competition leaderboard # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.competition_download_leade... | [
"Download",
"competition",
"leaderboard",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L52-L71 | [
"def",
"competition_download_leaderboard",
"(",
"self",
",",
"id",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"self",
"."... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competition_view_leaderboard | VIew competition leaderboard # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.competition_view_leaderboard(id, async_req=True)
>>> result = thread.get()
:param async_req bool... | kaggle/api/kaggle_api.py | def competition_view_leaderboard(self, id, **kwargs): # noqa: E501
"""VIew competition leaderboard # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.competition_view_leaderboard(id, a... | def competition_view_leaderboard(self, id, **kwargs): # noqa: E501
"""VIew competition leaderboard # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.competition_view_leaderboard(id, a... | [
"VIew",
"competition",
"leaderboard",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L141-L160 | [
"def",
"competition_view_leaderboard",
"(",
"self",
",",
"id",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"self",
".",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competitions_data_download_file | Download competition data file # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.competitions_data_download_file(id, file_name, async_req=True)
>>> result = thread.get()
:para... | kaggle/api/kaggle_api.py | def competitions_data_download_file(self, id, file_name, **kwargs): # noqa: E501
"""Download competition data file # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.competitions_data_... | def competitions_data_download_file(self, id, file_name, **kwargs): # noqa: E501
"""Download competition data file # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.competitions_data_... | [
"Download",
"competition",
"data",
"file",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L230-L250 | [
"def",
"competitions_data_download_file",
"(",
"self",
",",
"id",
",",
"file_name",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"ret... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competitions_data_list_files | List competition data files # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.competitions_data_list_files(id, async_req=True)
>>> result = thread.get()
:param async_req bool
... | kaggle/api/kaggle_api.py | def competitions_data_list_files(self, id, **kwargs): # noqa: E501
"""List competition data files # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.competitions_data_list_files(id, as... | def competitions_data_list_files(self, id, **kwargs): # noqa: E501
"""List competition data files # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.competitions_data_list_files(id, as... | [
"List",
"competition",
"data",
"files",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L327-L346 | [
"def",
"competitions_data_list_files",
"(",
"self",
",",
"id",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"self",
".",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competitions_list | List competitions # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.competitions_list(async_req=True)
>>> result = thread.get()
:param async_req bool
:param str group:... | kaggle/api/kaggle_api.py | def competitions_list(self, **kwargs): # noqa: E501
"""List competitions # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.competitions_list(async_req=True)
>>> result = threa... | def competitions_list(self, **kwargs): # noqa: E501
"""List competitions # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.competitions_list(async_req=True)
>>> result = threa... | [
"List",
"competitions",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L420-L443 | [
"def",
"competitions_list",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"self",
".",
"competitions_list_with_ht... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competitions_submissions_list | List competition submissions # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.competitions_submissions_list(id, async_req=True)
>>> result = thread.get()
:param async_req boo... | kaggle/api/kaggle_api.py | def competitions_submissions_list(self, id, **kwargs): # noqa: E501
"""List competition submissions # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.competitions_submissions_list(id,... | def competitions_submissions_list(self, id, **kwargs): # noqa: E501
"""List competition submissions # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.competitions_submissions_list(id,... | [
"List",
"competition",
"submissions",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L525-L545 | [
"def",
"competitions_submissions_list",
"(",
"self",
",",
"id",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"self",
".",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competitions_submissions_submit | Submit to competition # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.competitions_submissions_submit(blob_file_tokens, submission_description, id, async_req=True)
>>> result = threa... | kaggle/api/kaggle_api.py | def competitions_submissions_submit(self, blob_file_tokens, submission_description, id, **kwargs): # noqa: E501
"""Submit to competition # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = ... | def competitions_submissions_submit(self, blob_file_tokens, submission_description, id, **kwargs): # noqa: E501
"""Submit to competition # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = ... | [
"Submit",
"to",
"competition",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L622-L643 | [
"def",
"competitions_submissions_submit",
"(",
"self",
",",
"blob_file_tokens",
",",
"submission_description",
",",
"id",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competitions_submissions_upload | Upload competition submission file # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.competitions_submissions_upload(file, guid, content_length, last_modified_date_utc, async_req=True)
... | kaggle/api/kaggle_api.py | def competitions_submissions_upload(self, file, guid, content_length, last_modified_date_utc, **kwargs): # noqa: E501
"""Upload competition submission file # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
... | def competitions_submissions_upload(self, file, guid, content_length, last_modified_date_utc, **kwargs): # noqa: E501
"""Upload competition submission file # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
... | [
"Upload",
"competition",
"submission",
"file",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L735-L757 | [
"def",
"competitions_submissions_upload",
"(",
"self",
",",
"file",
",",
"guid",
",",
"content_length",
",",
"last_modified_date_utc",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competitions_submissions_url | Generate competition submission URL # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.competitions_submissions_url(id, content_length, last_modified_date_utc, async_req=True)
>>> resul... | kaggle/api/kaggle_api.py | def competitions_submissions_url(self, id, content_length, last_modified_date_utc, **kwargs): # noqa: E501
"""Generate competition submission URL # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> ... | def competitions_submissions_url(self, id, content_length, last_modified_date_utc, **kwargs): # noqa: E501
"""Generate competition submission URL # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> ... | [
"Generate",
"competition",
"submission",
"URL",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L856-L878 | [
"def",
"competitions_submissions_url",
"(",
"self",
",",
"id",
",",
"content_length",
",",
"last_modified_date_utc",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.datasets_create_new | Create a new dataset # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_create_new(dataset_new_request, async_req=True)
>>> result = thread.get()
:param async_req bool... | kaggle/api/kaggle_api.py | def datasets_create_new(self, dataset_new_request, **kwargs): # noqa: E501
"""Create a new dataset # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_create_new(dataset_new_re... | def datasets_create_new(self, dataset_new_request, **kwargs): # noqa: E501
"""Create a new dataset # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_create_new(dataset_new_re... | [
"Create",
"a",
"new",
"dataset",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L973-L992 | [
"def",
"datasets_create_new",
"(",
"self",
",",
"dataset_new_request",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"self",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.datasets_create_version | Create a new dataset version # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_create_version(owner_slug, dataset_slug, dataset_new_version_request, async_req=True)
>>> result... | kaggle/api/kaggle_api.py | def datasets_create_version(self, owner_slug, dataset_slug, dataset_new_version_request, **kwargs): # noqa: E501
"""Create a new dataset version # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> t... | def datasets_create_version(self, owner_slug, dataset_slug, dataset_new_version_request, **kwargs): # noqa: E501
"""Create a new dataset version # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> t... | [
"Create",
"a",
"new",
"dataset",
"version",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L1070-L1091 | [
"def",
"datasets_create_version",
"(",
"self",
",",
"owner_slug",
",",
"dataset_slug",
",",
"dataset_new_version_request",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.datasets_create_version_by_id | Create a new dataset version by id # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_create_version_by_id(id, dataset_new_version_request, async_req=True)
>>> result = thread.... | kaggle/api/kaggle_api.py | def datasets_create_version_by_id(self, id, dataset_new_version_request, **kwargs): # noqa: E501
"""Create a new dataset version by id # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = ap... | def datasets_create_version_by_id(self, id, dataset_new_version_request, **kwargs): # noqa: E501
"""Create a new dataset version by id # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = ap... | [
"Create",
"a",
"new",
"dataset",
"version",
"by",
"id",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L1183-L1203 | [
"def",
"datasets_create_version_by_id",
"(",
"self",
",",
"id",
",",
"dataset_new_version_request",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.datasets_download | Download dataset file # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_download(owner_slug, dataset_slug, async_req=True)
>>> result = thread.get()
:param async_req ... | kaggle/api/kaggle_api.py | def datasets_download(self, owner_slug, dataset_slug, **kwargs): # noqa: E501
"""Download dataset file # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_download(owner_slug, ... | def datasets_download(self, owner_slug, dataset_slug, **kwargs): # noqa: E501
"""Download dataset file # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_download(owner_slug, ... | [
"Download",
"dataset",
"file",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L1288-L1309 | [
"def",
"datasets_download",
"(",
"self",
",",
"owner_slug",
",",
"dataset_slug",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.datasets_download_file | Download dataset file # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_download_file(owner_slug, dataset_slug, file_name, async_req=True)
>>> result = thread.get()
:... | kaggle/api/kaggle_api.py | def datasets_download_file(self, owner_slug, dataset_slug, file_name, **kwargs): # noqa: E501
"""Download dataset file # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_downl... | def datasets_download_file(self, owner_slug, dataset_slug, file_name, **kwargs): # noqa: E501
"""Download dataset file # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_downl... | [
"Download",
"dataset",
"file",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L1393-L1415 | [
"def",
"datasets_download_file",
"(",
"self",
",",
"owner_slug",
",",
"dataset_slug",
",",
"file_name",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.datasets_list | List datasets # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_list(async_req=True)
>>> result = thread.get()
:param async_req bool
:param str group: Display... | kaggle/api/kaggle_api.py | def datasets_list(self, **kwargs): # noqa: E501
"""List datasets # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_list(async_req=True)
>>> result = thread.get()
... | def datasets_list(self, **kwargs): # noqa: E501
"""List datasets # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_list(async_req=True)
>>> result = thread.get()
... | [
"List",
"datasets",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L1506-L1533 | [
"def",
"datasets_list",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"self",
".",
"datasets_list_with_http_info"... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.datasets_list_files | List dataset files # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_list_files(owner_slug, dataset_slug, async_req=True)
>>> result = thread.get()
:param async_req b... | kaggle/api/kaggle_api.py | def datasets_list_files(self, owner_slug, dataset_slug, **kwargs): # noqa: E501
"""List dataset files # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_list_files(owner_slug,... | def datasets_list_files(self, owner_slug, dataset_slug, **kwargs): # noqa: E501
"""List dataset files # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_list_files(owner_slug,... | [
"List",
"dataset",
"files",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L1627-L1647 | [
"def",
"datasets_list_files",
"(",
"self",
",",
"owner_slug",
",",
"dataset_slug",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"retu... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.datasets_status | Get dataset creation status # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_status(owner_slug, dataset_slug, async_req=True)
>>> result = thread.get()
:param async_... | kaggle/api/kaggle_api.py | def datasets_status(self, owner_slug, dataset_slug, **kwargs): # noqa: E501
"""Get dataset creation status # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_status(owner_slug... | def datasets_status(self, owner_slug, dataset_slug, **kwargs): # noqa: E501
"""Get dataset creation status # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_status(owner_slug... | [
"Get",
"dataset",
"creation",
"status",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L1728-L1748 | [
"def",
"datasets_status",
"(",
"self",
",",
"owner_slug",
",",
"dataset_slug",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.datasets_upload_file | Get URL and token to start uploading a data file # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_upload_file(file_name, content_length, last_modified_date_utc, async_req=True)
... | kaggle/api/kaggle_api.py | def datasets_upload_file(self, file_name, content_length, last_modified_date_utc, **kwargs): # noqa: E501
"""Get URL and token to start uploading a data file # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
... | def datasets_upload_file(self, file_name, content_length, last_modified_date_utc, **kwargs): # noqa: E501
"""Get URL and token to start uploading a data file # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
... | [
"Get",
"URL",
"and",
"token",
"to",
"start",
"uploading",
"a",
"data",
"file",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L1829-L1850 | [
"def",
"datasets_upload_file",
"(",
"self",
",",
"file_name",
",",
"content_length",
",",
"last_modified_date_utc",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.datasets_view | Show details about a dataset # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_view(owner_slug, dataset_slug, async_req=True)
>>> result = thread.get()
:param async_r... | kaggle/api/kaggle_api.py | def datasets_view(self, owner_slug, dataset_slug, **kwargs): # noqa: E501
"""Show details about a dataset # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_view(owner_slug, d... | def datasets_view(self, owner_slug, dataset_slug, **kwargs): # noqa: E501
"""Show details about a dataset # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.datasets_view(owner_slug, d... | [
"Show",
"details",
"about",
"a",
"dataset",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L1942-L1962 | [
"def",
"datasets_view",
"(",
"self",
",",
"owner_slug",
",",
"dataset_slug",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.kernel_output | Download the latest output from a kernel # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.kernel_output(user_name, kernel_slug, async_req=True)
>>> result = thread.get()
:par... | kaggle/api/kaggle_api.py | def kernel_output(self, user_name, kernel_slug, **kwargs): # noqa: E501
"""Download the latest output from a kernel # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.kernel_output(use... | def kernel_output(self, user_name, kernel_slug, **kwargs): # noqa: E501
"""Download the latest output from a kernel # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.kernel_output(use... | [
"Download",
"the",
"latest",
"output",
"from",
"a",
"kernel",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L2043-L2063 | [
"def",
"kernel_output",
"(",
"self",
",",
"user_name",
",",
"kernel_slug",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.kernel_pull | Pull the latest code from a kernel # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.kernel_pull(user_name, kernel_slug, async_req=True)
>>> result = thread.get()
:param async... | kaggle/api/kaggle_api.py | def kernel_pull(self, user_name, kernel_slug, **kwargs): # noqa: E501
"""Pull the latest code from a kernel # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.kernel_pull(user_name, ke... | def kernel_pull(self, user_name, kernel_slug, **kwargs): # noqa: E501
"""Pull the latest code from a kernel # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.kernel_pull(user_name, ke... | [
"Pull",
"the",
"latest",
"code",
"from",
"a",
"kernel",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L2144-L2164 | [
"def",
"kernel_pull",
"(",
"self",
",",
"user_name",
",",
"kernel_slug",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"se... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.kernel_push | Push a new kernel version. Can be used to create a new kernel and update an existing one. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.kernel_push(kernel_push_request, async_req=True)
... | kaggle/api/kaggle_api.py | def kernel_push(self, kernel_push_request, **kwargs): # noqa: E501
"""Push a new kernel version. Can be used to create a new kernel and update an existing one. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=Tr... | def kernel_push(self, kernel_push_request, **kwargs): # noqa: E501
"""Push a new kernel version. Can be used to create a new kernel and update an existing one. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=Tr... | [
"Push",
"a",
"new",
"kernel",
"version",
".",
"Can",
"be",
"used",
"to",
"create",
"a",
"new",
"kernel",
"and",
"update",
"an",
"existing",
"one",
".",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L2245-L2264 | [
"def",
"kernel_push",
"(",
"self",
",",
"kernel_push_request",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"self",
".",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.kernel_status | Get the status of the latest kernel version # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.kernel_status(user_name, kernel_slug, async_req=True)
>>> result = thread.get()
:... | kaggle/api/kaggle_api.py | def kernel_status(self, user_name, kernel_slug, **kwargs): # noqa: E501
"""Get the status of the latest kernel version # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.kernel_status(... | def kernel_status(self, user_name, kernel_slug, **kwargs): # noqa: E501
"""Get the status of the latest kernel version # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.kernel_status(... | [
"Get",
"the",
"status",
"of",
"the",
"latest",
"kernel",
"version",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L2342-L2362 | [
"def",
"kernel_status",
"(",
"self",
",",
"user_name",
",",
"kernel_slug",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.kernels_list | List kernels # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.kernels_list(async_req=True)
>>> result = thread.get()
:param async_req bool
:param int page: Page numbe... | kaggle/api/kaggle_api.py | def kernels_list(self, **kwargs): # noqa: E501
"""List kernels # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.kernels_list(async_req=True)
>>> result = thread.get()
... | def kernels_list(self, **kwargs): # noqa: E501
"""List kernels # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.kernels_list(async_req=True)
>>> result = thread.get()
... | [
"List",
"kernels",
"#",
"noqa",
":",
"E501"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L2443-L2473 | [
"def",
"kernels_list",
"(",
"self",
",",
"*",
"*",
"kwargs",
")",
":",
"# noqa: E501",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"self",
".",
"kernels_list_with_http_info",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.authenticate | authenticate the user with the Kaggle API. This method will generate
a configuration, first checking the environment for credential
variables, and falling back to looking for the .kaggle/kaggle.json
configuration file. | kaggle/api/kaggle_api_extended.py | def authenticate(self):
"""authenticate the user with the Kaggle API. This method will generate
a configuration, first checking the environment for credential
variables, and falling back to looking for the .kaggle/kaggle.json
configuration file.
"""
config_data ... | def authenticate(self):
"""authenticate the user with the Kaggle API. This method will generate
a configuration, first checking the environment for credential
variables, and falling back to looking for the .kaggle/kaggle.json
configuration file.
"""
config_data ... | [
"authenticate",
"the",
"user",
"with",
"the",
"Kaggle",
"API",
".",
"This",
"method",
"will",
"generate",
"a",
"configuration",
"first",
"checking",
"the",
"environment",
"for",
"credential",
"variables",
"and",
"falling",
"back",
"to",
"looking",
"for",
"the",
... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L96-L119 | [
"def",
"authenticate",
"(",
"self",
")",
":",
"config_data",
"=",
"{",
"}",
"# Step 1: try getting username/password from environment",
"config_data",
"=",
"self",
".",
"read_config_environment",
"(",
"config_data",
")",
"# Step 2: if credentials were not in env read in configu... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.read_config_environment | read_config_environment is the second effort to get a username
and key to authenticate to the Kaggle API. The environment keys
are equivalent to the kaggle.json file, but with "KAGGLE_" prefix
to define a unique namespace.
Parameters
==========
config_d... | kaggle/api/kaggle_api_extended.py | def read_config_environment(self, config_data=None, quiet=False):
"""read_config_environment is the second effort to get a username
and key to authenticate to the Kaggle API. The environment keys
are equivalent to the kaggle.json file, but with "KAGGLE_" prefix
to define a uniqu... | def read_config_environment(self, config_data=None, quiet=False):
"""read_config_environment is the second effort to get a username
and key to authenticate to the Kaggle API. The environment keys
are equivalent to the kaggle.json file, but with "KAGGLE_" prefix
to define a uniqu... | [
"read_config_environment",
"is",
"the",
"second",
"effort",
"to",
"get",
"a",
"username",
"and",
"key",
"to",
"authenticate",
"to",
"the",
"Kaggle",
"API",
".",
"The",
"environment",
"keys",
"are",
"equivalent",
"to",
"the",
"kaggle",
".",
"json",
"file",
"b... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L121-L142 | [
"def",
"read_config_environment",
"(",
"self",
",",
"config_data",
"=",
"None",
",",
"quiet",
"=",
"False",
")",
":",
"# Add all variables that start with KAGGLE_ to config data",
"if",
"config_data",
"is",
"None",
":",
"config_data",
"=",
"{",
"}",
"for",
"key",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi._load_config | the final step of the authenticate steps, where we load the values
from config_data into the Configuration object.
Parameters
==========
config_data: a dictionary with configuration values (keys) to read
into self.config_values | kaggle/api/kaggle_api_extended.py | def _load_config(self, config_data):
"""the final step of the authenticate steps, where we load the values
from config_data into the Configuration object.
Parameters
==========
config_data: a dictionary with configuration values (keys) to read
... | def _load_config(self, config_data):
"""the final step of the authenticate steps, where we load the values
from config_data into the Configuration object.
Parameters
==========
config_data: a dictionary with configuration values (keys) to read
... | [
"the",
"final",
"step",
"of",
"the",
"authenticate",
"steps",
"where",
"we",
"load",
"the",
"values",
"from",
"config_data",
"into",
"the",
"Configuration",
"object",
"."
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L146-L199 | [
"def",
"_load_config",
"(",
"self",
",",
"config_data",
")",
":",
"# Username and password are required.",
"for",
"item",
"in",
"[",
"self",
".",
"CONFIG_NAME_USER",
",",
"self",
".",
"CONFIG_NAME_KEY",
"]",
":",
"if",
"item",
"not",
"in",
"config_data",
":",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.read_config_file | read_config_file is the first effort to get a username
and key to authenticate to the Kaggle API. Since we can get the
username and password from the environment, it's not required.
Parameters
==========
config_data: the Configuration object to save a username and... | kaggle/api/kaggle_api_extended.py | def read_config_file(self, config_data=None, quiet=False):
"""read_config_file is the first effort to get a username
and key to authenticate to the Kaggle API. Since we can get the
username and password from the environment, it's not required.
Parameters
==========
... | def read_config_file(self, config_data=None, quiet=False):
"""read_config_file is the first effort to get a username
and key to authenticate to the Kaggle API. Since we can get the
username and password from the environment, it's not required.
Parameters
==========
... | [
"read_config_file",
"is",
"the",
"first",
"effort",
"to",
"get",
"a",
"username",
"and",
"key",
"to",
"authenticate",
"to",
"the",
"Kaggle",
"API",
".",
"Since",
"we",
"can",
"get",
"the",
"username",
"and",
"password",
"from",
"the",
"environment",
"it",
... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L201-L237 | [
"def",
"read_config_file",
"(",
"self",
",",
"config_data",
"=",
"None",
",",
"quiet",
"=",
"False",
")",
":",
"if",
"config_data",
"is",
"None",
":",
"config_data",
"=",
"{",
"}",
"if",
"os",
".",
"path",
".",
"exists",
"(",
"self",
".",
"config",
"... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi._read_config_file | read in the configuration file, a json file defined at self.config | kaggle/api/kaggle_api_extended.py | def _read_config_file(self):
"""read in the configuration file, a json file defined at self.config"""
try:
with open(self.config, 'r') as f:
config_data = json.load(f)
except FileNotFoundError:
config_data = {}
return config_data | def _read_config_file(self):
"""read in the configuration file, a json file defined at self.config"""
try:
with open(self.config, 'r') as f:
config_data = json.load(f)
except FileNotFoundError:
config_data = {}
return config_data | [
"read",
"in",
"the",
"configuration",
"file",
"a",
"json",
"file",
"defined",
"at",
"self",
".",
"config"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L239-L248 | [
"def",
"_read_config_file",
"(",
"self",
")",
":",
"try",
":",
"with",
"open",
"(",
"self",
".",
"config",
",",
"'r'",
")",
"as",
"f",
":",
"config_data",
"=",
"json",
".",
"load",
"(",
"f",
")",
"except",
"FileNotFoundError",
":",
"config_data",
"=",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi._write_config_file | write config data to file.
Parameters
==========
config_data: the Configuration object to save a username and
password, if defined
indent: number of tab indentations to use when writing json | kaggle/api/kaggle_api_extended.py | def _write_config_file(self, config_data, indent=2):
"""write config data to file.
Parameters
==========
config_data: the Configuration object to save a username and
password, if defined
indent: number of tab indentations to use when writing j... | def _write_config_file(self, config_data, indent=2):
"""write config data to file.
Parameters
==========
config_data: the Configuration object to save a username and
password, if defined
indent: number of tab indentations to use when writing j... | [
"write",
"config",
"data",
"to",
"file",
"."
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L250-L260 | [
"def",
"_write_config_file",
"(",
"self",
",",
"config_data",
",",
"indent",
"=",
"2",
")",
":",
"with",
"open",
"(",
"self",
".",
"config",
",",
"'w'",
")",
"as",
"f",
":",
"json",
".",
"dump",
"(",
"config_data",
",",
"f",
",",
"indent",
"=",
"in... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.set_config_value | a client helper function to set a configuration value, meaning
reading in the configuration file (if it exists), saving a new
config value, and then writing back
Parameters
==========
name: the name of the value to set (key in dictionary)
value: the val... | kaggle/api/kaggle_api_extended.py | def set_config_value(self, name, value, quiet=False):
"""a client helper function to set a configuration value, meaning
reading in the configuration file (if it exists), saving a new
config value, and then writing back
Parameters
==========
name: the name ... | def set_config_value(self, name, value, quiet=False):
"""a client helper function to set a configuration value, meaning
reading in the configuration file (if it exists), saving a new
config value, and then writing back
Parameters
==========
name: the name ... | [
"a",
"client",
"helper",
"function",
"to",
"set",
"a",
"configuration",
"value",
"meaning",
"reading",
"in",
"the",
"configuration",
"file",
"(",
"if",
"it",
"exists",
")",
"saving",
"a",
"new",
"config",
"value",
"and",
"then",
"writing",
"back"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L262-L288 | [
"def",
"set_config_value",
"(",
"self",
",",
"name",
",",
"value",
",",
"quiet",
"=",
"False",
")",
":",
"config_data",
"=",
"self",
".",
"_read_config_file",
"(",
")",
"if",
"value",
"is",
"not",
"None",
":",
"# Update the config file with the value",
"config... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.unset_config_value | unset a configuration value
Parameters
==========
name: the name of the value to unset (remove key in dictionary)
quiet: disable verbose output if True (default is False) | kaggle/api/kaggle_api_extended.py | def unset_config_value(self, name, quiet=False):
"""unset a configuration value
Parameters
==========
name: the name of the value to unset (remove key in dictionary)
quiet: disable verbose output if True (default is False)
"""
config_data = self._rea... | def unset_config_value(self, name, quiet=False):
"""unset a configuration value
Parameters
==========
name: the name of the value to unset (remove key in dictionary)
quiet: disable verbose output if True (default is False)
"""
config_data = self._rea... | [
"unset",
"a",
"configuration",
"value",
"Parameters",
"==========",
"name",
":",
"the",
"name",
"of",
"the",
"value",
"to",
"unset",
"(",
"remove",
"key",
"in",
"dictionary",
")",
"quiet",
":",
"disable",
"verbose",
"output",
"if",
"True",
"(",
"default",
... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L290-L307 | [
"def",
"unset_config_value",
"(",
"self",
",",
"name",
",",
"quiet",
"=",
"False",
")",
":",
"config_data",
"=",
"self",
".",
"_read_config_file",
"(",
")",
"if",
"name",
"in",
"config_data",
":",
"del",
"config_data",
"[",
"name",
"]",
"self",
".",
"_wr... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.get_default_download_dir | Get the download path for a file. If not defined, return default
from config.
Parameters
==========
subdirs: a single (or list of) subfolders under the basepath | kaggle/api/kaggle_api_extended.py | def get_default_download_dir(self, *subdirs):
""" Get the download path for a file. If not defined, return default
from config.
Parameters
==========
subdirs: a single (or list of) subfolders under the basepath
"""
# Look up value for key "path" i... | def get_default_download_dir(self, *subdirs):
""" Get the download path for a file. If not defined, return default
from config.
Parameters
==========
subdirs: a single (or list of) subfolders under the basepath
"""
# Look up value for key "path" i... | [
"Get",
"the",
"download",
"path",
"for",
"a",
"file",
".",
"If",
"not",
"defined",
"return",
"default",
"from",
"config",
"."
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L321-L336 | [
"def",
"get_default_download_dir",
"(",
"self",
",",
"*",
"subdirs",
")",
":",
"# Look up value for key \"path\" in the config",
"path",
"=",
"self",
".",
"get_config_value",
"(",
"self",
".",
"CONFIG_NAME_PATH",
")",
"# If not set in config, default to present working direct... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.print_config_value | print a single configuration value, based on a prefix and separator
Parameters
==========
name: the key of the config valur in self.config_values to print
prefix: the prefix to print
separator: the separator to use (default is : ) | kaggle/api/kaggle_api_extended.py | def print_config_value(self, name, prefix='- ', separator=': '):
"""print a single configuration value, based on a prefix and separator
Parameters
==========
name: the key of the config valur in self.config_values to print
prefix: the prefix to print
separ... | def print_config_value(self, name, prefix='- ', separator=': '):
"""print a single configuration value, based on a prefix and separator
Parameters
==========
name: the key of the config valur in self.config_values to print
prefix: the prefix to print
separ... | [
"print",
"a",
"single",
"configuration",
"value",
"based",
"on",
"a",
"prefix",
"and",
"separator"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L338-L351 | [
"def",
"print_config_value",
"(",
"self",
",",
"name",
",",
"prefix",
"=",
"'- '",
",",
"separator",
"=",
"': '",
")",
":",
"value_out",
"=",
"'None'",
"if",
"name",
"in",
"self",
".",
"config_values",
"and",
"self",
".",
"config_values",
"[",
"name",
"]... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.print_config_values | a wrapper to print_config_value to print all configuration values
Parameters
==========
prefix: the character prefix to put before the printed config value
defaults to "- " | kaggle/api/kaggle_api_extended.py | def print_config_values(self, prefix='- '):
"""a wrapper to print_config_value to print all configuration values
Parameters
==========
prefix: the character prefix to put before the printed config value
defaults to "- "
"""
print('Configuratio... | def print_config_values(self, prefix='- '):
"""a wrapper to print_config_value to print all configuration values
Parameters
==========
prefix: the character prefix to put before the printed config value
defaults to "- "
"""
print('Configuratio... | [
"a",
"wrapper",
"to",
"print_config_value",
"to",
"print",
"all",
"configuration",
"values",
"Parameters",
"==========",
"prefix",
":",
"the",
"character",
"prefix",
"to",
"put",
"before",
"the",
"printed",
"config",
"value",
"defaults",
"to",
"-"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L353-L364 | [
"def",
"print_config_values",
"(",
"self",
",",
"prefix",
"=",
"'- '",
")",
":",
"print",
"(",
"'Configuration values from '",
"+",
"self",
".",
"config_dir",
")",
"self",
".",
"print_config_value",
"(",
"self",
".",
"CONFIG_NAME_USER",
",",
"prefix",
"=",
"pr... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competitions_list | make call to list competitions, format the response, and return
a list of Competition instances
Parameters
==========
page: the page to return (default is 1)
search: a search term to use (default is empty string)
sort_by: how to sort the result, ... | kaggle/api/kaggle_api_extended.py | def competitions_list(self,
group=None,
category=None,
sort_by=None,
page=1,
search=None):
""" make call to list competitions, format the response, and return
a list of C... | def competitions_list(self,
group=None,
category=None,
sort_by=None,
page=1,
search=None):
""" make call to list competitions, format the response, and return
a list of C... | [
"make",
"call",
"to",
"list",
"competitions",
"format",
"the",
"response",
"and",
"return",
"a",
"list",
"of",
"Competition",
"instances"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L369-L415 | [
"def",
"competitions_list",
"(",
"self",
",",
"group",
"=",
"None",
",",
"category",
"=",
"None",
",",
"sort_by",
"=",
"None",
",",
"page",
"=",
"1",
",",
"search",
"=",
"None",
")",
":",
"valid_groups",
"=",
"[",
"'general'",
",",
"'entered'",
",",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competitions_list_cli | a wrapper for competitions_list for the client.
Parameters
==========
group: group to filter result to
category: category to filter result to
sort_by: how to sort the result, see valid_sort_by for options
page: the page to return (default is 1)
... | kaggle/api/kaggle_api_extended.py | def competitions_list_cli(self,
group=None,
category=None,
sort_by=None,
page=1,
search=None,
csv_display=False):
""" a wrapper for ... | def competitions_list_cli(self,
group=None,
category=None,
sort_by=None,
page=1,
search=None,
csv_display=False):
""" a wrapper for ... | [
"a",
"wrapper",
"for",
"competitions_list",
"for",
"the",
"client",
"."
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L417-L451 | [
"def",
"competitions_list_cli",
"(",
"self",
",",
"group",
"=",
"None",
",",
"category",
"=",
"None",
",",
"sort_by",
"=",
"None",
",",
"page",
"=",
"1",
",",
"search",
"=",
"None",
",",
"csv_display",
"=",
"False",
")",
":",
"competitions",
"=",
"self... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competition_submit | submit a competition!
Parameters
==========
file_name: the competition metadata file
message: the submission description
competition: the competition name
quiet: suppress verbose output (default is False) | kaggle/api/kaggle_api_extended.py | def competition_submit(self, file_name, message, competition, quiet=False):
""" submit a competition!
Parameters
==========
file_name: the competition metadata file
message: the submission description
competition: the competition name
quie... | def competition_submit(self, file_name, message, competition, quiet=False):
""" submit a competition!
Parameters
==========
file_name: the competition metadata file
message: the submission description
competition: the competition name
quie... | [
"submit",
"a",
"competition!"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L453-L507 | [
"def",
"competition_submit",
"(",
"self",
",",
"file_name",
",",
"message",
",",
"competition",
",",
"quiet",
"=",
"False",
")",
":",
"if",
"competition",
"is",
"None",
":",
"competition",
"=",
"self",
".",
"get_config_value",
"(",
"self",
".",
"CONFIG_NAME_... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competition_submit_cli | submit a competition using the client. Arguments are same as for
competition_submit, except for extra arguments provided here.
Parameters
==========
competition_opt: an alternative competition option provided by cli | kaggle/api/kaggle_api_extended.py | def competition_submit_cli(self,
file_name,
message,
competition,
competition_opt=None,
quiet=False):
""" submit a competition using the client. Arguments ar... | def competition_submit_cli(self,
file_name,
message,
competition,
competition_opt=None,
quiet=False):
""" submit a competition using the client. Arguments ar... | [
"submit",
"a",
"competition",
"using",
"the",
"client",
".",
"Arguments",
"are",
"same",
"as",
"for",
"competition_submit",
"except",
"for",
"extra",
"arguments",
"provided",
"here",
".",
"Parameters",
"==========",
"competition_opt",
":",
"an",
"alternative",
"co... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L509-L533 | [
"def",
"competition_submit_cli",
"(",
"self",
",",
"file_name",
",",
"message",
",",
"competition",
",",
"competition_opt",
"=",
"None",
",",
"quiet",
"=",
"False",
")",
":",
"competition",
"=",
"competition",
"or",
"competition_opt",
"try",
":",
"submit_result"... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competition_submissions | get the list of Submission for a particular competition
Parameters
==========
competition: the name of the competition | kaggle/api/kaggle_api_extended.py | def competition_submissions(self, competition):
""" get the list of Submission for a particular competition
Parameters
==========
competition: the name of the competition
"""
submissions_result = self.process_response(
self.competitions_submission... | def competition_submissions(self, competition):
""" get the list of Submission for a particular competition
Parameters
==========
competition: the name of the competition
"""
submissions_result = self.process_response(
self.competitions_submission... | [
"get",
"the",
"list",
"of",
"Submission",
"for",
"a",
"particular",
"competition"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L535-L544 | [
"def",
"competition_submissions",
"(",
"self",
",",
"competition",
")",
":",
"submissions_result",
"=",
"self",
".",
"process_response",
"(",
"self",
".",
"competitions_submissions_list_with_http_info",
"(",
"id",
"=",
"competition",
")",
")",
"return",
"[",
"Submis... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competition_submissions_cli | wrapper to competition_submission, will return either json or csv
to the user. Additional parameters are listed below, see
competition_submissions for rest.
Parameters
==========
competition: the name of the competition. If None, look to config
co... | kaggle/api/kaggle_api_extended.py | def competition_submissions_cli(self,
competition=None,
competition_opt=None,
csv_display=False,
quiet=False):
""" wrapper to competition_submission, will return either... | def competition_submissions_cli(self,
competition=None,
competition_opt=None,
csv_display=False,
quiet=False):
""" wrapper to competition_submission, will return either... | [
"wrapper",
"to",
"competition_submission",
"will",
"return",
"either",
"json",
"or",
"csv",
"to",
"the",
"user",
".",
"Additional",
"parameters",
"are",
"listed",
"below",
"see",
"competition_submissions",
"for",
"rest",
"."
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L546-L582 | [
"def",
"competition_submissions_cli",
"(",
"self",
",",
"competition",
"=",
"None",
",",
"competition_opt",
"=",
"None",
",",
"csv_display",
"=",
"False",
",",
"quiet",
"=",
"False",
")",
":",
"competition",
"=",
"competition",
"or",
"competition_opt",
"if",
"... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competition_list_files | list files for competition
Parameters
==========
competition: the name of the competition | kaggle/api/kaggle_api_extended.py | def competition_list_files(self, competition):
""" list files for competition
Parameters
==========
competition: the name of the competition
"""
competition_list_files_result = self.process_response(
self.competitions_data_list_files_with_http_inf... | def competition_list_files(self, competition):
""" list files for competition
Parameters
==========
competition: the name of the competition
"""
competition_list_files_result = self.process_response(
self.competitions_data_list_files_with_http_inf... | [
"list",
"files",
"for",
"competition",
"Parameters",
"==========",
"competition",
":",
"the",
"name",
"of",
"the",
"competition"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L584-L592 | [
"def",
"competition_list_files",
"(",
"self",
",",
"competition",
")",
":",
"competition_list_files_result",
"=",
"self",
".",
"process_response",
"(",
"self",
".",
"competitions_data_list_files_with_http_info",
"(",
"id",
"=",
"competition",
")",
")",
"return",
"[",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competition_list_files_cli | List files for a competition, if it exists
Parameters
==========
competition: the name of the competition. If None, look to config
competition_opt: an alternative competition option provided by cli
csv_display: if True, print comma separated values
... | kaggle/api/kaggle_api_extended.py | def competition_list_files_cli(self,
competition,
competition_opt=None,
csv_display=False,
quiet=False):
""" List files for a competition, if it exists
Paramet... | def competition_list_files_cli(self,
competition,
competition_opt=None,
csv_display=False,
quiet=False):
""" List files for a competition, if it exists
Paramet... | [
"List",
"files",
"for",
"a",
"competition",
"if",
"it",
"exists"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L594-L625 | [
"def",
"competition_list_files_cli",
"(",
"self",
",",
"competition",
",",
"competition_opt",
"=",
"None",
",",
"csv_display",
"=",
"False",
",",
"quiet",
"=",
"False",
")",
":",
"competition",
"=",
"competition",
"or",
"competition_opt",
"if",
"competition",
"i... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competition_download_file | download a competition file to a designated location, or use
a default location
Paramters
=========
competition: the name of the competition
file_name: the configuration file name
path: a path to download the file to
force: force the d... | kaggle/api/kaggle_api_extended.py | def competition_download_file(self,
competition,
file_name,
path=None,
force=False,
quiet=False):
""" download a competition file to a designa... | def competition_download_file(self,
competition,
file_name,
path=None,
force=False,
quiet=False):
""" download a competition file to a designa... | [
"download",
"a",
"competition",
"file",
"to",
"a",
"designated",
"location",
"or",
"use",
"a",
"default",
"location"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L627-L657 | [
"def",
"competition_download_file",
"(",
"self",
",",
"competition",
",",
"file_name",
",",
"path",
"=",
"None",
",",
"force",
"=",
"False",
",",
"quiet",
"=",
"False",
")",
":",
"if",
"path",
"is",
"None",
":",
"effective_path",
"=",
"self",
".",
"get_d... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competition_download_files | a wrapper to competition_download_file to download all competition
files.
Parameters
=========
competition: the name of the competition
path: a path to download the file to
force: force the download if the file already exists (default False)
... | kaggle/api/kaggle_api_extended.py | def competition_download_files(self,
competition,
path=None,
force=False,
quiet=True):
""" a wrapper to competition_download_file to download all competition
fi... | def competition_download_files(self,
competition,
path=None,
force=False,
quiet=True):
""" a wrapper to competition_download_file to download all competition
fi... | [
"a",
"wrapper",
"to",
"competition_download_file",
"to",
"download",
"all",
"competition",
"files",
"."
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L659-L679 | [
"def",
"competition_download_files",
"(",
"self",
",",
"competition",
",",
"path",
"=",
"None",
",",
"force",
"=",
"False",
",",
"quiet",
"=",
"True",
")",
":",
"files",
"=",
"self",
".",
"competition_list_files",
"(",
"competition",
")",
"if",
"not",
"fil... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competition_download_cli | a wrapper to competition_download_files, but first will parse input
from API client. Additional parameters are listed here, see
competition_download for remaining.
Parameters
=========
competition: the name of the competition
competition_opt: an a... | kaggle/api/kaggle_api_extended.py | def competition_download_cli(self,
competition,
competition_opt=None,
file_name=None,
path=None,
force=False,
quiet=False)... | def competition_download_cli(self,
competition,
competition_opt=None,
file_name=None,
path=None,
force=False,
quiet=False)... | [
"a",
"wrapper",
"to",
"competition_download_files",
"but",
"first",
"will",
"parse",
"input",
"from",
"API",
"client",
".",
"Additional",
"parameters",
"are",
"listed",
"here",
"see",
"competition_download",
"for",
"remaining",
"."
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L681-L715 | [
"def",
"competition_download_cli",
"(",
"self",
",",
"competition",
",",
"competition_opt",
"=",
"None",
",",
"file_name",
"=",
"None",
",",
"path",
"=",
"None",
",",
"force",
"=",
"False",
",",
"quiet",
"=",
"False",
")",
":",
"competition",
"=",
"competi... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competition_leaderboard_download | Download competition leaderboards
Parameters
=========
competition: the name of the competition
path: a path to download the file to
quiet: suppress verbose output (default is True) | kaggle/api/kaggle_api_extended.py | def competition_leaderboard_download(self, competition, path, quiet=True):
""" Download competition leaderboards
Parameters
=========
competition: the name of the competition
path: a path to download the file to
quiet: suppress verbose output (default... | def competition_leaderboard_download(self, competition, path, quiet=True):
""" Download competition leaderboards
Parameters
=========
competition: the name of the competition
path: a path to download the file to
quiet: suppress verbose output (default... | [
"Download",
"competition",
"leaderboards"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L717-L738 | [
"def",
"competition_leaderboard_download",
"(",
"self",
",",
"competition",
",",
"path",
",",
"quiet",
"=",
"True",
")",
":",
"response",
"=",
"self",
".",
"process_response",
"(",
"self",
".",
"competition_download_leaderboard_with_http_info",
"(",
"competition",
"... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competition_leaderboard_view | view a leaderboard based on a competition name
Parameters
==========
competition: the competition name to view leadboard for | kaggle/api/kaggle_api_extended.py | def competition_leaderboard_view(self, competition):
""" view a leaderboard based on a competition name
Parameters
==========
competition: the competition name to view leadboard for
"""
result = self.process_response(
self.competition_view_leaderb... | def competition_leaderboard_view(self, competition):
""" view a leaderboard based on a competition name
Parameters
==========
competition: the competition name to view leadboard for
"""
result = self.process_response(
self.competition_view_leaderb... | [
"view",
"a",
"leaderboard",
"based",
"on",
"a",
"competition",
"name"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L740-L749 | [
"def",
"competition_leaderboard_view",
"(",
"self",
",",
"competition",
")",
":",
"result",
"=",
"self",
".",
"process_response",
"(",
"self",
".",
"competition_view_leaderboard_with_http_info",
"(",
"competition",
")",
")",
"return",
"[",
"LeaderboardEntry",
"(",
"... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.competition_leaderboard_cli | a wrapper for competition_leaderbord_view that will print the
results as a table or comma separated values
Parameters
==========
competition: the competition name to view leadboard for
competition_opt: an alternative competition option provided by cli
... | kaggle/api/kaggle_api_extended.py | def competition_leaderboard_cli(self,
competition,
competition_opt=None,
path=None,
view=False,
download=False,
... | def competition_leaderboard_cli(self,
competition,
competition_opt=None,
path=None,
view=False,
download=False,
... | [
"a",
"wrapper",
"for",
"competition_leaderbord_view",
"that",
"will",
"print",
"the",
"results",
"as",
"a",
"table",
"or",
"comma",
"separated",
"values"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L751-L796 | [
"def",
"competition_leaderboard_cli",
"(",
"self",
",",
"competition",
",",
"competition_opt",
"=",
"None",
",",
"path",
"=",
"None",
",",
"view",
"=",
"False",
",",
"download",
"=",
"False",
",",
"csv_display",
"=",
"False",
",",
"quiet",
"=",
"False",
")... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.dataset_list | return a list of datasets!
Parameters
==========
sort_by: how to sort the result, see valid_sort_bys for options
size: the size of the dataset, see valid_sizes for string options
file_type: the format, see valid_file_types for string options
licen... | kaggle/api/kaggle_api_extended.py | def dataset_list(self,
sort_by=None,
size=None,
file_type=None,
license_name=None,
tag_ids=None,
search=None,
user=None,
mine=False,
... | def dataset_list(self,
sort_by=None,
size=None,
file_type=None,
license_name=None,
tag_ids=None,
search=None,
user=None,
mine=False,
... | [
"return",
"a",
"list",
"of",
"datasets!"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L798-L864 | [
"def",
"dataset_list",
"(",
"self",
",",
"sort_by",
"=",
"None",
",",
"size",
"=",
"None",
",",
"file_type",
"=",
"None",
",",
"license_name",
"=",
"None",
",",
"tag_ids",
"=",
"None",
",",
"search",
"=",
"None",
",",
"user",
"=",
"None",
",",
"mine"... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.dataset_list_cli | a wrapper to datasets_list for the client. Additional parameters
are described here, see dataset_list for others.
Parameters
==========
sort_by: how to sort the result, see valid_sort_bys for options
size: the size of the dataset, see valid_sizes for string o... | kaggle/api/kaggle_api_extended.py | def dataset_list_cli(self,
sort_by=None,
size=None,
file_type=None,
license_name=None,
tag_ids=None,
search=None,
user=None,
... | def dataset_list_cli(self,
sort_by=None,
size=None,
file_type=None,
license_name=None,
tag_ids=None,
search=None,
user=None,
... | [
"a",
"wrapper",
"to",
"datasets_list",
"for",
"the",
"client",
".",
"Additional",
"parameters",
"are",
"described",
"here",
"see",
"dataset_list",
"for",
"others",
"."
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L866-L902 | [
"def",
"dataset_list_cli",
"(",
"self",
",",
"sort_by",
"=",
"None",
",",
"size",
"=",
"None",
",",
"file_type",
"=",
"None",
",",
"license_name",
"=",
"None",
",",
"tag_ids",
"=",
"None",
",",
"search",
"=",
"None",
",",
"user",
"=",
"None",
",",
"m... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.dataset_view | view metadata for a dataset.
Parameters
==========
dataset: the string identified of the dataset
should be in format [owner]/[dataset-name] | kaggle/api/kaggle_api_extended.py | def dataset_view(self, dataset):
""" view metadata for a dataset.
Parameters
==========
dataset: the string identified of the dataset
should be in format [owner]/[dataset-name]
"""
if '/' in dataset:
self.validate_dataset_stri... | def dataset_view(self, dataset):
""" view metadata for a dataset.
Parameters
==========
dataset: the string identified of the dataset
should be in format [owner]/[dataset-name]
"""
if '/' in dataset:
self.validate_dataset_stri... | [
"view",
"metadata",
"for",
"a",
"dataset",
"."
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L904-L923 | [
"def",
"dataset_view",
"(",
"self",
",",
"dataset",
")",
":",
"if",
"'/'",
"in",
"dataset",
":",
"self",
".",
"validate_dataset_string",
"(",
"dataset",
")",
"dataset_urls",
"=",
"dataset",
".",
"split",
"(",
"'/'",
")",
"owner_slug",
"=",
"dataset_urls",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.dataset_list_files | list files for a dataset
Parameters
==========
dataset: the string identified of the dataset
should be in format [owner]/[dataset-name] | kaggle/api/kaggle_api_extended.py | def dataset_list_files(self, dataset):
""" list files for a dataset
Parameters
==========
dataset: the string identified of the dataset
should be in format [owner]/[dataset-name]
"""
if dataset is None:
raise ValueError('A dat... | def dataset_list_files(self, dataset):
""" list files for a dataset
Parameters
==========
dataset: the string identified of the dataset
should be in format [owner]/[dataset-name]
"""
if dataset is None:
raise ValueError('A dat... | [
"list",
"files",
"for",
"a",
"dataset",
"Parameters",
"==========",
"dataset",
":",
"the",
"string",
"identified",
"of",
"the",
"dataset",
"should",
"be",
"in",
"format",
"[",
"owner",
"]",
"/",
"[",
"dataset",
"-",
"name",
"]"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L969-L989 | [
"def",
"dataset_list_files",
"(",
"self",
",",
"dataset",
")",
":",
"if",
"dataset",
"is",
"None",
":",
"raise",
"ValueError",
"(",
"'A dataset must be specified'",
")",
"if",
"'/'",
"in",
"dataset",
":",
"self",
".",
"validate_dataset_string",
"(",
"dataset",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.dataset_list_files_cli | a wrapper to dataset_list_files for the client
(list files for a dataset)
Parameters
==========
dataset: the string identified of the dataset
should be in format [owner]/[dataset-name]
dataset_opt: an alternative option to providing a dat... | kaggle/api/kaggle_api_extended.py | def dataset_list_files_cli(self,
dataset,
dataset_opt=None,
csv_display=False):
""" a wrapper to dataset_list_files for the client
(list files for a dataset)
Parameters
==========
... | def dataset_list_files_cli(self,
dataset,
dataset_opt=None,
csv_display=False):
""" a wrapper to dataset_list_files for the client
(list files for a dataset)
Parameters
==========
... | [
"a",
"wrapper",
"to",
"dataset_list_files",
"for",
"the",
"client",
"(",
"list",
"files",
"for",
"a",
"dataset",
")",
"Parameters",
"==========",
"dataset",
":",
"the",
"string",
"identified",
"of",
"the",
"dataset",
"should",
"be",
"in",
"format",
"[",
"own... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L991-L1016 | [
"def",
"dataset_list_files_cli",
"(",
"self",
",",
"dataset",
",",
"dataset_opt",
"=",
"None",
",",
"csv_display",
"=",
"False",
")",
":",
"dataset",
"=",
"dataset",
"or",
"dataset_opt",
"result",
"=",
"self",
".",
"dataset_list_files",
"(",
"dataset",
")",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.dataset_status | call to get the status of a dataset from the API
Parameters
==========
dataset: the string identified of the dataset
should be in format [owner]/[dataset-name] | kaggle/api/kaggle_api_extended.py | def dataset_status(self, dataset):
""" call to get the status of a dataset from the API
Parameters
==========
dataset: the string identified of the dataset
should be in format [owner]/[dataset-name]
"""
if dataset is None:
rai... | def dataset_status(self, dataset):
""" call to get the status of a dataset from the API
Parameters
==========
dataset: the string identified of the dataset
should be in format [owner]/[dataset-name]
"""
if dataset is None:
rai... | [
"call",
"to",
"get",
"the",
"status",
"of",
"a",
"dataset",
"from",
"the",
"API",
"Parameters",
"==========",
"dataset",
":",
"the",
"string",
"identified",
"of",
"the",
"dataset",
"should",
"be",
"in",
"format",
"[",
"owner",
"]",
"/",
"[",
"dataset",
"... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1018-L1038 | [
"def",
"dataset_status",
"(",
"self",
",",
"dataset",
")",
":",
"if",
"dataset",
"is",
"None",
":",
"raise",
"ValueError",
"(",
"'A dataset must be specified'",
")",
"if",
"'/'",
"in",
"dataset",
":",
"self",
".",
"validate_dataset_string",
"(",
"dataset",
")"... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.dataset_status_cli | wrapper for client for dataset_status, with additional
dataset_opt to get the status of a dataset from the API
Parameters
==========
dataset_opt: an alternative to dataset | kaggle/api/kaggle_api_extended.py | def dataset_status_cli(self, dataset, dataset_opt=None):
""" wrapper for client for dataset_status, with additional
dataset_opt to get the status of a dataset from the API
Parameters
==========
dataset_opt: an alternative to dataset
"""
dataset = ... | def dataset_status_cli(self, dataset, dataset_opt=None):
""" wrapper for client for dataset_status, with additional
dataset_opt to get the status of a dataset from the API
Parameters
==========
dataset_opt: an alternative to dataset
"""
dataset = ... | [
"wrapper",
"for",
"client",
"for",
"dataset_status",
"with",
"additional",
"dataset_opt",
"to",
"get",
"the",
"status",
"of",
"a",
"dataset",
"from",
"the",
"API",
"Parameters",
"==========",
"dataset_opt",
":",
"an",
"alternative",
"to",
"dataset"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1040-L1048 | [
"def",
"dataset_status_cli",
"(",
"self",
",",
"dataset",
",",
"dataset_opt",
"=",
"None",
")",
":",
"dataset",
"=",
"dataset",
"or",
"dataset_opt",
"return",
"self",
".",
"dataset_status",
"(",
"dataset",
")"
] | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.dataset_download_file | download a single file for a dataset
Parameters
==========
dataset: the string identified of the dataset
should be in format [owner]/[dataset-name]
file_name: the dataset configuration file
path: if defined, download to this location
... | kaggle/api/kaggle_api_extended.py | def dataset_download_file(self,
dataset,
file_name,
path=None,
force=False,
quiet=True):
""" download a single file for a dataset
Parameters
... | def dataset_download_file(self,
dataset,
file_name,
path=None,
force=False,
quiet=True):
""" download a single file for a dataset
Parameters
... | [
"download",
"a",
"single",
"file",
"for",
"a",
"dataset"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1050-L1094 | [
"def",
"dataset_download_file",
"(",
"self",
",",
"dataset",
",",
"file_name",
",",
"path",
"=",
"None",
",",
"force",
"=",
"False",
",",
"quiet",
"=",
"True",
")",
":",
"if",
"'/'",
"in",
"dataset",
":",
"self",
".",
"validate_dataset_string",
"(",
"dat... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.dataset_download_files | download all files for a dataset
Parameters
==========
dataset: the string identified of the dataset
should be in format [owner]/[dataset-name]
path: the path to download the dataset to
force: force the download if the file already exists... | kaggle/api/kaggle_api_extended.py | def dataset_download_files(self,
dataset,
path=None,
force=False,
quiet=True,
unzip=False):
""" download all files for a dataset
Parameters
... | def dataset_download_files(self,
dataset,
path=None,
force=False,
quiet=True,
unzip=False):
""" download all files for a dataset
Parameters
... | [
"download",
"all",
"files",
"for",
"a",
"dataset"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1096-L1157 | [
"def",
"dataset_download_files",
"(",
"self",
",",
"dataset",
",",
"path",
"=",
"None",
",",
"force",
"=",
"False",
",",
"quiet",
"=",
"True",
",",
"unzip",
"=",
"False",
")",
":",
"if",
"dataset",
"is",
"None",
":",
"raise",
"ValueError",
"(",
"'A dat... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.dataset_download_cli | client wrapper for dataset_download_files and download dataset file,
either for a specific file (when file_name is provided),
or all files for a dataset (plural)
Parameters
==========
dataset: the string identified of the dataset
should b... | kaggle/api/kaggle_api_extended.py | def dataset_download_cli(self,
dataset,
dataset_opt=None,
file_name=None,
path=None,
unzip=False,
force=False,
quiet=... | def dataset_download_cli(self,
dataset,
dataset_opt=None,
file_name=None,
path=None,
unzip=False,
force=False,
quiet=... | [
"client",
"wrapper",
"for",
"dataset_download_files",
"and",
"download",
"dataset",
"file",
"either",
"for",
"a",
"specific",
"file",
"(",
"when",
"file_name",
"is",
"provided",
")",
"or",
"all",
"files",
"for",
"a",
"dataset",
"(",
"plural",
")"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1159-L1189 | [
"def",
"dataset_download_cli",
"(",
"self",
",",
"dataset",
",",
"dataset_opt",
"=",
"None",
",",
"file_name",
"=",
"None",
",",
"path",
"=",
"None",
",",
"unzip",
"=",
"False",
",",
"force",
"=",
"False",
",",
"quiet",
"=",
"False",
")",
":",
"dataset... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.dataset_upload_file | upload a dataset file
Parameters
==========
path: the complete path to upload
quiet: suppress verbose output (default is False) | kaggle/api/kaggle_api_extended.py | def dataset_upload_file(self, path, quiet):
""" upload a dataset file
Parameters
==========
path: the complete path to upload
quiet: suppress verbose output (default is False)
"""
file_name = os.path.basename(path)
content_length = os.path... | def dataset_upload_file(self, path, quiet):
""" upload a dataset file
Parameters
==========
path: the complete path to upload
quiet: suppress verbose output (default is False)
"""
file_name = os.path.basename(path)
content_length = os.path... | [
"upload",
"a",
"dataset",
"file"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1191-L1211 | [
"def",
"dataset_upload_file",
"(",
"self",
",",
"path",
",",
"quiet",
")",
":",
"file_name",
"=",
"os",
".",
"path",
".",
"basename",
"(",
"path",
")",
"content_length",
"=",
"os",
".",
"path",
".",
"getsize",
"(",
"path",
")",
"last_modified_date_utc",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.dataset_create_version | create a version of a dataset
Parameters
==========
folder: the folder with the dataset configuration / data files
version_notes: notes to add for the version
quiet: suppress verbose output (default is False)
convert_to_csv: on upload, if data sho... | kaggle/api/kaggle_api_extended.py | def dataset_create_version(self,
folder,
version_notes,
quiet=False,
convert_to_csv=True,
delete_old_versions=False,
dir_mode='skip'):... | def dataset_create_version(self,
folder,
version_notes,
quiet=False,
convert_to_csv=True,
delete_old_versions=False,
dir_mode='skip'):... | [
"create",
"a",
"version",
"of",
"a",
"dataset"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1213-L1285 | [
"def",
"dataset_create_version",
"(",
"self",
",",
"folder",
",",
"version_notes",
",",
"quiet",
"=",
"False",
",",
"convert_to_csv",
"=",
"True",
",",
"delete_old_versions",
"=",
"False",
",",
"dir_mode",
"=",
"'skip'",
")",
":",
"if",
"not",
"os",
".",
"... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.dataset_create_version_cli | client wrapper for creating a version of a dataset
Parameters
==========
folder: the folder with the dataset configuration / data files
version_notes: notes to add for the version
quiet: suppress verbose output (default is False)
convert_to_csv: o... | kaggle/api/kaggle_api_extended.py | def dataset_create_version_cli(self,
folder,
version_notes,
quiet=False,
convert_to_csv=True,
delete_old_versions=False,
... | def dataset_create_version_cli(self,
folder,
version_notes,
quiet=False,
convert_to_csv=True,
delete_old_versions=False,
... | [
"client",
"wrapper",
"for",
"creating",
"a",
"version",
"of",
"a",
"dataset",
"Parameters",
"==========",
"folder",
":",
"the",
"folder",
"with",
"the",
"dataset",
"configuration",
"/",
"data",
"files",
"version_notes",
":",
"notes",
"to",
"add",
"for",
"the",... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1287-L1322 | [
"def",
"dataset_create_version_cli",
"(",
"self",
",",
"folder",
",",
"version_notes",
",",
"quiet",
"=",
"False",
",",
"convert_to_csv",
"=",
"True",
",",
"delete_old_versions",
"=",
"False",
",",
"dir_mode",
"=",
"'skip'",
")",
":",
"folder",
"=",
"folder",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.dataset_initialize | initialize a folder with a a dataset configuration (metadata) file
Parameters
==========
folder: the folder to initialize the metadata file in | kaggle/api/kaggle_api_extended.py | def dataset_initialize(self, folder):
""" initialize a folder with a a dataset configuration (metadata) file
Parameters
==========
folder: the folder to initialize the metadata file in
"""
if not os.path.isdir(folder):
raise ValueError('Invalid fo... | def dataset_initialize(self, folder):
""" initialize a folder with a a dataset configuration (metadata) file
Parameters
==========
folder: the folder to initialize the metadata file in
"""
if not os.path.isdir(folder):
raise ValueError('Invalid fo... | [
"initialize",
"a",
"folder",
"with",
"a",
"a",
"dataset",
"configuration",
"(",
"metadata",
")",
"file"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1324-L1349 | [
"def",
"dataset_initialize",
"(",
"self",
",",
"folder",
")",
":",
"if",
"not",
"os",
".",
"path",
".",
"isdir",
"(",
"folder",
")",
":",
"raise",
"ValueError",
"(",
"'Invalid folder: '",
"+",
"folder",
")",
"ref",
"=",
"self",
".",
"config_values",
"[",... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.dataset_create_new | create a new dataset, meaning the same as creating a version but
with extra metadata like license and user/owner.
Parameters
==========
folder: the folder to initialize the metadata file in
public: should the dataset be public?
quiet: suppress ver... | kaggle/api/kaggle_api_extended.py | def dataset_create_new(self,
folder,
public=False,
quiet=False,
convert_to_csv=True,
dir_mode='skip'):
""" create a new dataset, meaning the same as creating a version but
... | def dataset_create_new(self,
folder,
public=False,
quiet=False,
convert_to_csv=True,
dir_mode='skip'):
""" create a new dataset, meaning the same as creating a version but
... | [
"create",
"a",
"new",
"dataset",
"meaning",
"the",
"same",
"as",
"creating",
"a",
"version",
"but",
"with",
"extra",
"metadata",
"like",
"license",
"and",
"user",
"/",
"owner",
".",
"Parameters",
"==========",
"folder",
":",
"the",
"folder",
"to",
"initializ... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1355-L1433 | [
"def",
"dataset_create_new",
"(",
"self",
",",
"folder",
",",
"public",
"=",
"False",
",",
"quiet",
"=",
"False",
",",
"convert_to_csv",
"=",
"True",
",",
"dir_mode",
"=",
"'skip'",
")",
":",
"if",
"not",
"os",
".",
"path",
".",
"isdir",
"(",
"folder",... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.dataset_create_new_cli | client wrapper for creating a new dataset
Parameters
==========
folder: the folder to initialize the metadata file in
public: should the dataset be public?
quiet: suppress verbose output (default is False)
convert_to_csv: if True, convert data to ... | kaggle/api/kaggle_api_extended.py | def dataset_create_new_cli(self,
folder=None,
public=False,
quiet=False,
convert_to_csv=True,
dir_mode='skip'):
""" client wrapper for creating a new dataset... | def dataset_create_new_cli(self,
folder=None,
public=False,
quiet=False,
convert_to_csv=True,
dir_mode='skip'):
""" client wrapper for creating a new dataset... | [
"client",
"wrapper",
"for",
"creating",
"a",
"new",
"dataset",
"Parameters",
"==========",
"folder",
":",
"the",
"folder",
"to",
"initialize",
"the",
"metadata",
"file",
"in",
"public",
":",
"should",
"the",
"dataset",
"be",
"public?",
"quiet",
":",
"suppress"... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1435-L1464 | [
"def",
"dataset_create_new_cli",
"(",
"self",
",",
"folder",
"=",
"None",
",",
"public",
"=",
"False",
",",
"quiet",
"=",
"False",
",",
"convert_to_csv",
"=",
"True",
",",
"dir_mode",
"=",
"'skip'",
")",
":",
"folder",
"=",
"folder",
"or",
"os",
".",
"... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.download_file | download a file to an output file based on a chunk size
Parameters
==========
response: the response to download
outfile: the output file to download to
quiet: suppress verbose output (default is True)
chunk_size: the size of the chunk to stream | kaggle/api/kaggle_api_extended.py | def download_file(self, response, outfile, quiet=True, chunk_size=1048576):
""" download a file to an output file based on a chunk size
Parameters
==========
response: the response to download
outfile: the output file to download to
quiet: suppress ve... | def download_file(self, response, outfile, quiet=True, chunk_size=1048576):
""" download a file to an output file based on a chunk size
Parameters
==========
response: the response to download
outfile: the output file to download to
quiet: suppress ve... | [
"download",
"a",
"file",
"to",
"an",
"output",
"file",
"based",
"on",
"a",
"chunk",
"size"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1466-L1500 | [
"def",
"download_file",
"(",
"self",
",",
"response",
",",
"outfile",
",",
"quiet",
"=",
"True",
",",
"chunk_size",
"=",
"1048576",
")",
":",
"outpath",
"=",
"os",
".",
"path",
".",
"dirname",
"(",
"outfile",
")",
"if",
"not",
"os",
".",
"path",
".",... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.kernels_list | list kernels based on a set of search criteria
Parameters
==========
page: the page of results to return (default is 1)
page_size: results per page (default is 20)
dataset: if defined, filter to this dataset (default None)
competition: if defined,... | kaggle/api/kaggle_api_extended.py | def kernels_list(self,
page=1,
page_size=20,
dataset=None,
competition=None,
parent_kernel=None,
search=None,
mine=False,
user=None,
... | def kernels_list(self,
page=1,
page_size=20,
dataset=None,
competition=None,
parent_kernel=None,
search=None,
mine=False,
user=None,
... | [
"list",
"kernels",
"based",
"on",
"a",
"set",
"of",
"search",
"criteria"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1502-L1590 | [
"def",
"kernels_list",
"(",
"self",
",",
"page",
"=",
"1",
",",
"page_size",
"=",
"20",
",",
"dataset",
"=",
"None",
",",
"competition",
"=",
"None",
",",
"parent_kernel",
"=",
"None",
",",
"search",
"=",
"None",
",",
"mine",
"=",
"False",
",",
"user... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.kernels_list_cli | client wrapper for kernels_list, see this function for arguments.
Additional arguments are provided here.
Parameters
==========
csv_display: if True, print comma separated values instead of table | kaggle/api/kaggle_api_extended.py | def kernels_list_cli(self,
mine=False,
page=1,
page_size=20,
search=None,
csv_display=False,
parent=None,
competition=None,
... | def kernels_list_cli(self,
mine=False,
page=1,
page_size=20,
search=None,
csv_display=False,
parent=None,
competition=None,
... | [
"client",
"wrapper",
"for",
"kernels_list",
"see",
"this",
"function",
"for",
"arguments",
".",
"Additional",
"arguments",
"are",
"provided",
"here",
".",
"Parameters",
"==========",
"csv_display",
":",
"if",
"True",
"print",
"comma",
"separated",
"values",
"inste... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1592-L1632 | [
"def",
"kernels_list_cli",
"(",
"self",
",",
"mine",
"=",
"False",
",",
"page",
"=",
"1",
",",
"page_size",
"=",
"20",
",",
"search",
"=",
"None",
",",
"csv_display",
"=",
"False",
",",
"parent",
"=",
"None",
",",
"competition",
"=",
"None",
",",
"da... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.kernels_initialize | create a new kernel in a specified folder from template, including
json metadata that grabs values from the configuration.
Parameters
==========
folder: the path of the folder | kaggle/api/kaggle_api_extended.py | def kernels_initialize(self, folder):
""" create a new kernel in a specified folder from template, including
json metadata that grabs values from the configuration.
Parameters
==========
folder: the path of the folder
"""
if not os.path.isdir(fold... | def kernels_initialize(self, folder):
""" create a new kernel in a specified folder from template, including
json metadata that grabs values from the configuration.
Parameters
==========
folder: the path of the folder
"""
if not os.path.isdir(fold... | [
"create",
"a",
"new",
"kernel",
"in",
"a",
"specified",
"folder",
"from",
"template",
"including",
"json",
"metadata",
"that",
"grabs",
"values",
"from",
"the",
"configuration",
".",
"Parameters",
"==========",
"folder",
":",
"the",
"path",
"of",
"the",
"folde... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1634-L1666 | [
"def",
"kernels_initialize",
"(",
"self",
",",
"folder",
")",
":",
"if",
"not",
"os",
".",
"path",
".",
"isdir",
"(",
"folder",
")",
":",
"raise",
"ValueError",
"(",
"'Invalid folder: '",
"+",
"folder",
")",
"resources",
"=",
"[",
"]",
"resource",
"=",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.kernels_initialize_cli | client wrapper for kernels_initialize, takes same arguments but
sets default folder to be None. If None, defaults to present
working directory.
Parameters
==========
folder: the path of the folder (None defaults to ${PWD}) | kaggle/api/kaggle_api_extended.py | def kernels_initialize_cli(self, folder=None):
""" client wrapper for kernels_initialize, takes same arguments but
sets default folder to be None. If None, defaults to present
working directory.
Parameters
==========
folder: the path of the folder (No... | def kernels_initialize_cli(self, folder=None):
""" client wrapper for kernels_initialize, takes same arguments but
sets default folder to be None. If None, defaults to present
working directory.
Parameters
==========
folder: the path of the folder (No... | [
"client",
"wrapper",
"for",
"kernels_initialize",
"takes",
"same",
"arguments",
"but",
"sets",
"default",
"folder",
"to",
"be",
"None",
".",
"If",
"None",
"defaults",
"to",
"present",
"working",
"directory",
".",
"Parameters",
"==========",
"folder",
":",
"the",... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1668-L1678 | [
"def",
"kernels_initialize_cli",
"(",
"self",
",",
"folder",
"=",
"None",
")",
":",
"folder",
"=",
"folder",
"or",
"os",
".",
"getcwd",
"(",
")",
"meta_file",
"=",
"self",
".",
"kernels_initialize",
"(",
"folder",
")",
"print",
"(",
"'Kernel metadata templat... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.kernels_push | read the metadata file and kernel files from a notebook, validate
both, and use Kernel API to push to Kaggle if all is valid.
Parameters
==========
folder: the path of the folder | kaggle/api/kaggle_api_extended.py | def kernels_push(self, folder):
""" read the metadata file and kernel files from a notebook, validate
both, and use Kernel API to push to Kaggle if all is valid.
Parameters
==========
folder: the path of the folder
"""
if not os.path.isdir(folder)... | def kernels_push(self, folder):
""" read the metadata file and kernel files from a notebook, validate
both, and use Kernel API to push to Kaggle if all is valid.
Parameters
==========
folder: the path of the folder
"""
if not os.path.isdir(folder)... | [
"read",
"the",
"metadata",
"file",
"and",
"kernel",
"files",
"from",
"a",
"notebook",
"validate",
"both",
"and",
"use",
"Kernel",
"API",
"to",
"push",
"to",
"Kaggle",
"if",
"all",
"is",
"valid",
".",
"Parameters",
"==========",
"folder",
":",
"the",
"path"... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1680-L1788 | [
"def",
"kernels_push",
"(",
"self",
",",
"folder",
")",
":",
"if",
"not",
"os",
".",
"path",
".",
"isdir",
"(",
"folder",
")",
":",
"raise",
"ValueError",
"(",
"'Invalid folder: '",
"+",
"folder",
")",
"meta_file",
"=",
"os",
".",
"path",
".",
"join",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.kernels_push_cli | client wrapper for kernels_push, with same arguments. | kaggle/api/kaggle_api_extended.py | def kernels_push_cli(self, folder):
""" client wrapper for kernels_push, with same arguments.
"""
folder = folder or os.getcwd()
result = self.kernels_push(folder)
if result is None:
print('Kernel push error: see previous output')
elif not result.error:
... | def kernels_push_cli(self, folder):
""" client wrapper for kernels_push, with same arguments.
"""
folder = folder or os.getcwd()
result = self.kernels_push(folder)
if result is None:
print('Kernel push error: see previous output')
elif not result.error:
... | [
"client",
"wrapper",
"for",
"kernels_push",
"with",
"same",
"arguments",
"."
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1790-L1827 | [
"def",
"kernels_push_cli",
"(",
"self",
",",
"folder",
")",
":",
"folder",
"=",
"folder",
"or",
"os",
".",
"getcwd",
"(",
")",
"result",
"=",
"self",
".",
"kernels_push",
"(",
"folder",
")",
"if",
"result",
"is",
"None",
":",
"print",
"(",
"'Kernel pus... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.kernels_pull | pull a kernel, including a metadata file (if metadata is True)
and associated files to a specified path.
Parameters
==========
kernel: the kernel to pull
path: the path to pull files to on the filesystem
metadata: if True, also pull metadata
... | kaggle/api/kaggle_api_extended.py | def kernels_pull(self, kernel, path, metadata=False, quiet=True):
""" pull a kernel, including a metadata file (if metadata is True)
and associated files to a specified path.
Parameters
==========
kernel: the kernel to pull
path: the path to pull file... | def kernels_pull(self, kernel, path, metadata=False, quiet=True):
""" pull a kernel, including a metadata file (if metadata is True)
and associated files to a specified path.
Parameters
==========
kernel: the kernel to pull
path: the path to pull file... | [
"pull",
"a",
"kernel",
"including",
"a",
"metadata",
"file",
"(",
"if",
"metadata",
"is",
"True",
")",
"and",
"associated",
"files",
"to",
"a",
"specified",
"path",
".",
"Parameters",
"==========",
"kernel",
":",
"the",
"kernel",
"to",
"pull",
"path",
":",... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1829-L1963 | [
"def",
"kernels_pull",
"(",
"self",
",",
"kernel",
",",
"path",
",",
"metadata",
"=",
"False",
",",
"quiet",
"=",
"True",
")",
":",
"existing_metadata",
"=",
"None",
"if",
"kernel",
"is",
"None",
":",
"if",
"path",
"is",
"None",
":",
"existing_metadata_p... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.kernels_pull_cli | client wrapper for kernels_pull | kaggle/api/kaggle_api_extended.py | def kernels_pull_cli(self,
kernel,
kernel_opt=None,
path=None,
metadata=False):
""" client wrapper for kernels_pull
"""
kernel = kernel or kernel_opt
effective_path = self.kernels_pull(
... | def kernels_pull_cli(self,
kernel,
kernel_opt=None,
path=None,
metadata=False):
""" client wrapper for kernels_pull
"""
kernel = kernel or kernel_opt
effective_path = self.kernels_pull(
... | [
"client",
"wrapper",
"for",
"kernels_pull"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1965-L1978 | [
"def",
"kernels_pull_cli",
"(",
"self",
",",
"kernel",
",",
"kernel_opt",
"=",
"None",
",",
"path",
"=",
"None",
",",
"metadata",
"=",
"False",
")",
":",
"kernel",
"=",
"kernel",
"or",
"kernel_opt",
"effective_path",
"=",
"self",
".",
"kernels_pull",
"(",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.kernels_output | retrieve output for a specified kernel
Parameters
==========
kernel: the kernel to output
path: the path to pull files to on the filesystem
force: if output already exists, force overwrite (default False)
quiet: suppress verbosity (default is True... | kaggle/api/kaggle_api_extended.py | def kernels_output(self, kernel, path, force=False, quiet=True):
""" retrieve output for a specified kernel
Parameters
==========
kernel: the kernel to output
path: the path to pull files to on the filesystem
force: if output already exists, force ove... | def kernels_output(self, kernel, path, force=False, quiet=True):
""" retrieve output for a specified kernel
Parameters
==========
kernel: the kernel to output
path: the path to pull files to on the filesystem
force: if output already exists, force ove... | [
"retrieve",
"output",
"for",
"a",
"specified",
"kernel",
"Parameters",
"==========",
"kernel",
":",
"the",
"kernel",
"to",
"output",
"path",
":",
"the",
"path",
"to",
"pull",
"files",
"to",
"on",
"the",
"filesystem",
"force",
":",
"if",
"output",
"already",
... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1980-L2036 | [
"def",
"kernels_output",
"(",
"self",
",",
"kernel",
",",
"path",
",",
"force",
"=",
"False",
",",
"quiet",
"=",
"True",
")",
":",
"if",
"kernel",
"is",
"None",
":",
"raise",
"ValueError",
"(",
"'A kernel must be specified'",
")",
"if",
"'/'",
"in",
"ker... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.kernels_output_cli | client wrapper for kernels_output, with same arguments. Extra
arguments are described below, and see kernels_output for others.
Parameters
==========
kernel_opt: option from client instead of kernel, if not defined | kaggle/api/kaggle_api_extended.py | def kernels_output_cli(self,
kernel,
kernel_opt=None,
path=None,
force=False,
quiet=False):
""" client wrapper for kernels_output, with same arguments. Extra
argumen... | def kernels_output_cli(self,
kernel,
kernel_opt=None,
path=None,
force=False,
quiet=False):
""" client wrapper for kernels_output, with same arguments. Extra
argumen... | [
"client",
"wrapper",
"for",
"kernels_output",
"with",
"same",
"arguments",
".",
"Extra",
"arguments",
"are",
"described",
"below",
"and",
"see",
"kernels_output",
"for",
"others",
".",
"Parameters",
"==========",
"kernel_opt",
":",
"option",
"from",
"client",
"ins... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L2038-L2051 | [
"def",
"kernels_output_cli",
"(",
"self",
",",
"kernel",
",",
"kernel_opt",
"=",
"None",
",",
"path",
"=",
"None",
",",
"force",
"=",
"False",
",",
"quiet",
"=",
"False",
")",
":",
"kernel",
"=",
"kernel",
"or",
"kernel_opt",
"self",
".",
"kernels_output... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.kernels_status | call to the api to get the status of a kernel.
Parameters
==========
kernel: the kernel to get the status for | kaggle/api/kaggle_api_extended.py | def kernels_status(self, kernel):
""" call to the api to get the status of a kernel.
Parameters
==========
kernel: the kernel to get the status for
"""
if kernel is None:
raise ValueError('A kernel must be specified')
if '/' in kernel:
... | def kernels_status(self, kernel):
""" call to the api to get the status of a kernel.
Parameters
==========
kernel: the kernel to get the status for
"""
if kernel is None:
raise ValueError('A kernel must be specified')
if '/' in kernel:
... | [
"call",
"to",
"the",
"api",
"to",
"get",
"the",
"status",
"of",
"a",
"kernel",
".",
"Parameters",
"==========",
"kernel",
":",
"the",
"kernel",
"to",
"get",
"the",
"status",
"for"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L2053-L2071 | [
"def",
"kernels_status",
"(",
"self",
",",
"kernel",
")",
":",
"if",
"kernel",
"is",
"None",
":",
"raise",
"ValueError",
"(",
"'A kernel must be specified'",
")",
"if",
"'/'",
"in",
"kernel",
":",
"self",
".",
"validate_kernel_string",
"(",
"kernel",
")",
"k... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.kernels_status_cli | client wrapper for kernel_status
Parameters
==========
kernel_opt: additional option from the client, if kernel not defined | kaggle/api/kaggle_api_extended.py | def kernels_status_cli(self, kernel, kernel_opt=None):
""" client wrapper for kernel_status
Parameters
==========
kernel_opt: additional option from the client, if kernel not defined
"""
kernel = kernel or kernel_opt
response = self.kernels_status(ker... | def kernels_status_cli(self, kernel, kernel_opt=None):
""" client wrapper for kernel_status
Parameters
==========
kernel_opt: additional option from the client, if kernel not defined
"""
kernel = kernel or kernel_opt
response = self.kernels_status(ker... | [
"client",
"wrapper",
"for",
"kernel_status",
"Parameters",
"==========",
"kernel_opt",
":",
"additional",
"option",
"from",
"the",
"client",
"if",
"kernel",
"not",
"defined"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L2073-L2087 | [
"def",
"kernels_status_cli",
"(",
"self",
",",
"kernel",
",",
"kernel_opt",
"=",
"None",
")",
":",
"kernel",
"=",
"kernel",
"or",
"kernel_opt",
"response",
"=",
"self",
".",
"kernels_status",
"(",
"kernel",
")",
"status",
"=",
"response",
"[",
"'status'",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.download_needed | determine if a download is needed based on timestamp. Return True
if needed (remote is newer) or False if local is newest.
Parameters
==========
response: the response from the API
outfile: the output file to write to
quiet: suppress verbose outpu... | kaggle/api/kaggle_api_extended.py | def download_needed(self, response, outfile, quiet=True):
""" determine if a download is needed based on timestamp. Return True
if needed (remote is newer) or False if local is newest.
Parameters
==========
response: the response from the API
outfile:... | def download_needed(self, response, outfile, quiet=True):
""" determine if a download is needed based on timestamp. Return True
if needed (remote is newer) or False if local is newest.
Parameters
==========
response: the response from the API
outfile:... | [
"determine",
"if",
"a",
"download",
"is",
"needed",
"based",
"on",
"timestamp",
".",
"Return",
"True",
"if",
"needed",
"(",
"remote",
"is",
"newer",
")",
"or",
"False",
"if",
"local",
"is",
"newest",
".",
"Parameters",
"==========",
"response",
":",
"the",... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L2089-L2111 | [
"def",
"download_needed",
"(",
"self",
",",
"response",
",",
"outfile",
",",
"quiet",
"=",
"True",
")",
":",
"try",
":",
"remote_date",
"=",
"datetime",
".",
"strptime",
"(",
"response",
".",
"headers",
"[",
"'Last-Modified'",
"]",
",",
"'%a, %d %b %Y %X %Z'... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.print_table | print a table of items, for a set of fields defined
Parameters
==========
items: a list of items to print
fields: a list of fields to select from items | kaggle/api/kaggle_api_extended.py | def print_table(self, items, fields):
""" print a table of items, for a set of fields defined
Parameters
==========
items: a list of items to print
fields: a list of fields to select from items
"""
formats = []
borders = []
for f i... | def print_table(self, items, fields):
""" print a table of items, for a set of fields defined
Parameters
==========
items: a list of items to print
fields: a list of fields to select from items
"""
formats = []
borders = []
for f i... | [
"print",
"a",
"table",
"of",
"items",
"for",
"a",
"set",
"of",
"fields",
"defined"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L2113-L2139 | [
"def",
"print_table",
"(",
"self",
",",
"items",
",",
"fields",
")",
":",
"formats",
"=",
"[",
"]",
"borders",
"=",
"[",
"]",
"for",
"f",
"in",
"fields",
":",
"length",
"=",
"max",
"(",
"len",
"(",
"f",
")",
",",
"max",
"(",
"[",
"len",
"(",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.print_csv | print a set of fields in a set of items using a csv.writer
Parameters
==========
items: a list of items to print
fields: a list of fields to select from items | kaggle/api/kaggle_api_extended.py | def print_csv(self, items, fields):
""" print a set of fields in a set of items using a csv.writer
Parameters
==========
items: a list of items to print
fields: a list of fields to select from items
"""
writer = csv.writer(sys.stdout)
writ... | def print_csv(self, items, fields):
""" print a set of fields in a set of items using a csv.writer
Parameters
==========
items: a list of items to print
fields: a list of fields to select from items
"""
writer = csv.writer(sys.stdout)
writ... | [
"print",
"a",
"set",
"of",
"fields",
"in",
"a",
"set",
"of",
"items",
"using",
"a",
"csv",
".",
"writer"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L2141-L2153 | [
"def",
"print_csv",
"(",
"self",
",",
"items",
",",
"fields",
")",
":",
"writer",
"=",
"csv",
".",
"writer",
"(",
"sys",
".",
"stdout",
")",
"writer",
".",
"writerow",
"(",
"fields",
")",
"for",
"i",
"in",
"items",
":",
"i_fields",
"=",
"[",
"self"... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.process_response | process a response from the API. We check the API version against
the client's to see if it's old, and give them a warning (once)
Parameters
==========
result: the result from the API | kaggle/api/kaggle_api_extended.py | def process_response(self, result):
""" process a response from the API. We check the API version against
the client's to see if it's old, and give them a warning (once)
Parameters
==========
result: the result from the API
"""
if len(result) == 3... | def process_response(self, result):
""" process a response from the API. We check the API version against
the client's to see if it's old, and give them a warning (once)
Parameters
==========
result: the result from the API
"""
if len(result) == 3... | [
"process",
"a",
"response",
"from",
"the",
"API",
".",
"We",
"check",
"the",
"API",
"version",
"against",
"the",
"client",
"s",
"to",
"see",
"if",
"it",
"s",
"old",
"and",
"give",
"them",
"a",
"warning",
"(",
"once",
")"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L2181-L2201 | [
"def",
"process_response",
"(",
"self",
",",
"result",
")",
":",
"if",
"len",
"(",
"result",
")",
"==",
"3",
":",
"data",
"=",
"result",
"[",
"0",
"]",
"headers",
"=",
"result",
"[",
"2",
"]",
"if",
"self",
".",
"HEADER_API_VERSION",
"in",
"headers",... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.is_up_to_date | determine if a client (on the local user's machine) is up to date
with the version provided on the server. Return a boolean with True
or False
Parameters
==========
server_version: the server version string to compare to the host | kaggle/api/kaggle_api_extended.py | def is_up_to_date(self, server_version):
""" determine if a client (on the local user's machine) is up to date
with the version provided on the server. Return a boolean with True
or False
Parameters
==========
server_version: the server version string... | def is_up_to_date(self, server_version):
""" determine if a client (on the local user's machine) is up to date
with the version provided on the server. Return a boolean with True
or False
Parameters
==========
server_version: the server version string... | [
"determine",
"if",
"a",
"client",
"(",
"on",
"the",
"local",
"user",
"s",
"machine",
")",
"is",
"up",
"to",
"date",
"with",
"the",
"version",
"provided",
"on",
"the",
"server",
".",
"Return",
"a",
"boolean",
"with",
"True",
"or",
"False",
"Parameters",
... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L2203-L2233 | [
"def",
"is_up_to_date",
"(",
"self",
",",
"server_version",
")",
":",
"client_split",
"=",
"self",
".",
"__version__",
".",
"split",
"(",
"'.'",
")",
"client_len",
"=",
"len",
"(",
"client_split",
")",
"server_split",
"=",
"server_version",
".",
"split",
"("... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.upload_files | upload files in a folder
Parameters
==========
request: the prepared request
resources: the files to upload
folder: the folder to upload from
quiet: suppress verbose output (default is False) | kaggle/api/kaggle_api_extended.py | def upload_files(self,
request,
resources,
folder,
quiet=False,
dir_mode='skip'):
""" upload files in a folder
Parameters
==========
request: the prepared request
... | def upload_files(self,
request,
resources,
folder,
quiet=False,
dir_mode='skip'):
""" upload files in a folder
Parameters
==========
request: the prepared request
... | [
"upload",
"files",
"in",
"a",
"folder",
"Parameters",
"==========",
"request",
":",
"the",
"prepared",
"request",
"resources",
":",
"the",
"files",
"to",
"upload",
"folder",
":",
"the",
"folder",
"to",
"upload",
"from",
"quiet",
":",
"suppress",
"verbose",
"... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L2235-L2282 | [
"def",
"upload_files",
"(",
"self",
",",
"request",
",",
"resources",
",",
"folder",
",",
"quiet",
"=",
"False",
",",
"dir_mode",
"=",
"'skip'",
")",
":",
"for",
"file_name",
"in",
"os",
".",
"listdir",
"(",
"folder",
")",
":",
"if",
"(",
"file_name",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi._upload_file | Helper function to upload a single file
Parameters
==========
file_name: name of the file to upload
full_path: path to the file to upload
request: the prepared request
resources: optional file metadata
quiet: suppress verbose output
... | kaggle/api/kaggle_api_extended.py | def _upload_file(self, file_name, full_path, quiet, request, resources):
""" Helper function to upload a single file
Parameters
==========
file_name: name of the file to upload
full_path: path to the file to upload
request: the prepared request
... | def _upload_file(self, file_name, full_path, quiet, request, resources):
""" Helper function to upload a single file
Parameters
==========
file_name: name of the file to upload
full_path: path to the file to upload
request: the prepared request
... | [
"Helper",
"function",
"to",
"upload",
"a",
"single",
"file",
"Parameters",
"==========",
"file_name",
":",
"name",
"of",
"the",
"file",
"to",
"upload",
"full_path",
":",
"path",
"to",
"the",
"file",
"to",
"upload",
"request",
":",
"the",
"prepared",
"request... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L2284-L2325 | [
"def",
"_upload_file",
"(",
"self",
",",
"file_name",
",",
"full_path",
",",
"quiet",
",",
"request",
",",
"resources",
")",
":",
"if",
"not",
"quiet",
":",
"print",
"(",
"'Starting upload for file '",
"+",
"file_name",
")",
"content_length",
"=",
"os",
".",... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.process_column | process a column, check for the type, and return the processed
column
Parameters
==========
column: a list of values in a column to be processed | kaggle/api/kaggle_api_extended.py | def process_column(self, column):
""" process a column, check for the type, and return the processed
column
Parameters
==========
column: a list of values in a column to be processed
"""
processed_column = DatasetColumn(
name=self.get_... | def process_column(self, column):
""" process a column, check for the type, and return the processed
column
Parameters
==========
column: a list of values in a column to be processed
"""
processed_column = DatasetColumn(
name=self.get_... | [
"process",
"a",
"column",
"check",
"for",
"the",
"type",
"and",
"return",
"the",
"processed",
"column",
"Parameters",
"==========",
"column",
":",
"a",
"list",
"of",
"values",
"in",
"a",
"column",
"to",
"be",
"processed"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L2327-L2357 | [
"def",
"process_column",
"(",
"self",
",",
"column",
")",
":",
"processed_column",
"=",
"DatasetColumn",
"(",
"name",
"=",
"self",
".",
"get_or_fail",
"(",
"column",
",",
"'name'",
")",
",",
"description",
"=",
"self",
".",
"get_or_default",
"(",
"column",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.upload_complete | function to complete an upload to retrieve a path from a url
Parameters
==========
path: the path for the upload that is read in
url: the url to send the POST to
quiet: suppress verbose output (default is False) | kaggle/api/kaggle_api_extended.py | def upload_complete(self, path, url, quiet):
""" function to complete an upload to retrieve a path from a url
Parameters
==========
path: the path for the upload that is read in
url: the url to send the POST to
quiet: suppress verbose output (default ... | def upload_complete(self, path, url, quiet):
""" function to complete an upload to retrieve a path from a url
Parameters
==========
path: the path for the upload that is read in
url: the url to send the POST to
quiet: suppress verbose output (default ... | [
"function",
"to",
"complete",
"an",
"upload",
"to",
"retrieve",
"a",
"path",
"from",
"a",
"url",
"Parameters",
"==========",
"path",
":",
"the",
"path",
"for",
"the",
"upload",
"that",
"is",
"read",
"in",
"url",
":",
"the",
"url",
"to",
"send",
"the",
... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L2359-L2386 | [
"def",
"upload_complete",
"(",
"self",
",",
"path",
",",
"url",
",",
"quiet",
")",
":",
"file_size",
"=",
"os",
".",
"path",
".",
"getsize",
"(",
"path",
")",
"try",
":",
"with",
"tqdm",
"(",
"total",
"=",
"file_size",
",",
"unit",
"=",
"'B'",
",",... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.validate_dataset_string | determine if a dataset string is valid, meaning it is in the format
of {username}/{dataset-slug}.
Parameters
==========
dataset: the dataset name to validate | kaggle/api/kaggle_api_extended.py | def validate_dataset_string(self, dataset):
""" determine if a dataset string is valid, meaning it is in the format
of {username}/{dataset-slug}.
Parameters
==========
dataset: the dataset name to validate
"""
if dataset:
if '/' not in... | def validate_dataset_string(self, dataset):
""" determine if a dataset string is valid, meaning it is in the format
of {username}/{dataset-slug}.
Parameters
==========
dataset: the dataset name to validate
"""
if dataset:
if '/' not in... | [
"determine",
"if",
"a",
"dataset",
"string",
"is",
"valid",
"meaning",
"it",
"is",
"in",
"the",
"format",
"of",
"{",
"username",
"}",
"/",
"{",
"dataset",
"-",
"slug",
"}",
".",
"Parameters",
"==========",
"dataset",
":",
"the",
"dataset",
"name",
"to",
... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L2388-L2402 | [
"def",
"validate_dataset_string",
"(",
"self",
",",
"dataset",
")",
":",
"if",
"dataset",
":",
"if",
"'/'",
"not",
"in",
"dataset",
":",
"raise",
"ValueError",
"(",
"'Dataset must be specified in the form of '",
"'\\'{username}/{dataset-slug}\\''",
")",
"split",
"=",
... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.validate_kernel_string | determine if a kernel string is valid, meaning it is in the format
of {username}/{kernel-slug}.
Parameters
==========
kernel: the kernel name to validate | kaggle/api/kaggle_api_extended.py | def validate_kernel_string(self, kernel):
""" determine if a kernel string is valid, meaning it is in the format
of {username}/{kernel-slug}.
Parameters
==========
kernel: the kernel name to validate
"""
if kernel:
if '/' not in kernel... | def validate_kernel_string(self, kernel):
""" determine if a kernel string is valid, meaning it is in the format
of {username}/{kernel-slug}.
Parameters
==========
kernel: the kernel name to validate
"""
if kernel:
if '/' not in kernel... | [
"determine",
"if",
"a",
"kernel",
"string",
"is",
"valid",
"meaning",
"it",
"is",
"in",
"the",
"format",
"of",
"{",
"username",
"}",
"/",
"{",
"kernel",
"-",
"slug",
"}",
".",
"Parameters",
"==========",
"kernel",
":",
"the",
"kernel",
"name",
"to",
"v... | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L2404-L2423 | [
"def",
"validate_kernel_string",
"(",
"self",
",",
"kernel",
")",
":",
"if",
"kernel",
":",
"if",
"'/'",
"not",
"in",
"kernel",
":",
"raise",
"ValueError",
"(",
"'Kernel must be specified in the form of '",
"'\\'{username}/{kernel-slug}\\''",
")",
"split",
"=",
"ker... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.validate_resources | validate resources is a wrapper to validate the existence of files
and that there are no duplicates for a folder and set of resources.
Parameters
==========
folder: the folder to validate
resources: one or more resources to validate within the folder | kaggle/api/kaggle_api_extended.py | def validate_resources(self, folder, resources):
""" validate resources is a wrapper to validate the existence of files
and that there are no duplicates for a folder and set of resources.
Parameters
==========
folder: the folder to validate
resources:... | def validate_resources(self, folder, resources):
""" validate resources is a wrapper to validate the existence of files
and that there are no duplicates for a folder and set of resources.
Parameters
==========
folder: the folder to validate
resources:... | [
"validate",
"resources",
"is",
"a",
"wrapper",
"to",
"validate",
"the",
"existence",
"of",
"files",
"and",
"that",
"there",
"are",
"no",
"duplicates",
"for",
"a",
"folder",
"and",
"set",
"of",
"resources",
"."
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L2425-L2435 | [
"def",
"validate_resources",
"(",
"self",
",",
"folder",
",",
"resources",
")",
":",
"self",
".",
"validate_files_exist",
"(",
"folder",
",",
"resources",
")",
"self",
".",
"validate_no_duplicate_paths",
"(",
"resources",
")"
] | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.validate_files_exist | ensure that one or more resource files exist in a folder
Parameters
==========
folder: the folder to validate
resources: one or more resources to validate within the folder | kaggle/api/kaggle_api_extended.py | def validate_files_exist(self, folder, resources):
""" ensure that one or more resource files exist in a folder
Parameters
==========
folder: the folder to validate
resources: one or more resources to validate within the folder
"""
for item in res... | def validate_files_exist(self, folder, resources):
""" ensure that one or more resource files exist in a folder
Parameters
==========
folder: the folder to validate
resources: one or more resources to validate within the folder
"""
for item in res... | [
"ensure",
"that",
"one",
"or",
"more",
"resource",
"files",
"exist",
"in",
"a",
"folder"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L2437-L2449 | [
"def",
"validate_files_exist",
"(",
"self",
",",
"folder",
",",
"resources",
")",
":",
"for",
"item",
"in",
"resources",
":",
"file_name",
"=",
"item",
".",
"get",
"(",
"'path'",
")",
"full_path",
"=",
"os",
".",
"path",
".",
"join",
"(",
"folder",
","... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.validate_no_duplicate_paths | ensure that the user has not provided duplicate paths in
a list of resources.
Parameters
==========
resources: one or more resources to validate not duplicated | kaggle/api/kaggle_api_extended.py | def validate_no_duplicate_paths(self, resources):
""" ensure that the user has not provided duplicate paths in
a list of resources.
Parameters
==========
resources: one or more resources to validate not duplicated
"""
paths = set()
for ite... | def validate_no_duplicate_paths(self, resources):
""" ensure that the user has not provided duplicate paths in
a list of resources.
Parameters
==========
resources: one or more resources to validate not duplicated
"""
paths = set()
for ite... | [
"ensure",
"that",
"the",
"user",
"has",
"not",
"provided",
"duplicate",
"paths",
"in",
"a",
"list",
"of",
"resources",
"."
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L2451-L2466 | [
"def",
"validate_no_duplicate_paths",
"(",
"self",
",",
"resources",
")",
":",
"paths",
"=",
"set",
"(",
")",
"for",
"item",
"in",
"resources",
":",
"file_name",
"=",
"item",
".",
"get",
"(",
"'path'",
")",
"if",
"file_name",
"in",
"paths",
":",
"raise",... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | KaggleApi.convert_to_dataset_file_metadata | convert a set of file_data to a metadata file at path
Parameters
==========
file_data: a dictionary of file data to write to file
path: the path to write the metadata to | kaggle/api/kaggle_api_extended.py | def convert_to_dataset_file_metadata(self, file_data, path):
""" convert a set of file_data to a metadata file at path
Parameters
==========
file_data: a dictionary of file data to write to file
path: the path to write the metadata to
"""
as_metad... | def convert_to_dataset_file_metadata(self, file_data, path):
""" convert a set of file_data to a metadata file at path
Parameters
==========
file_data: a dictionary of file data to write to file
path: the path to write the metadata to
"""
as_metad... | [
"convert",
"a",
"set",
"of",
"file_data",
"to",
"a",
"metadata",
"file",
"at",
"path"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L2468-L2493 | [
"def",
"convert_to_dataset_file_metadata",
"(",
"self",
",",
"file_data",
",",
"path",
")",
":",
"as_metadata",
"=",
"{",
"'path'",
":",
"os",
".",
"path",
".",
"join",
"(",
"path",
",",
"file_data",
"[",
"'name'",
"]",
")",
",",
"'description'",
":",
"f... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | TqdmBufferedReader.read | read the buffer, passing named and non named arguments to the
io.BufferedReader function. | kaggle/api/kaggle_api_extended.py | def read(self, *args, **kwargs):
""" read the buffer, passing named and non named arguments to the
io.BufferedReader function.
"""
buf = io.BufferedReader.read(self, *args, **kwargs)
self.increment(len(buf))
return buf | def read(self, *args, **kwargs):
""" read the buffer, passing named and non named arguments to the
io.BufferedReader function.
"""
buf = io.BufferedReader.read(self, *args, **kwargs)
self.increment(len(buf))
return buf | [
"read",
"the",
"buffer",
"passing",
"named",
"and",
"non",
"named",
"arguments",
"to",
"the",
"io",
".",
"BufferedReader",
"function",
"."
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L2507-L2513 | [
"def",
"read",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"buf",
"=",
"io",
".",
"BufferedReader",
".",
"read",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
"self",
".",
"increment",
"(",
"len",
"(",
"buf"... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | ApiClient.parameters_to_tuples | Get parameters as list of tuples, formatting collections.
:param params: Parameters as dict or list of two-tuples
:param dict collection_formats: Parameter collection formats
:return: Parameters as list of tuples, collections formatted | kaggle/api_client.py | def parameters_to_tuples(self, params, collection_formats):
"""Get parameters as list of tuples, formatting collections.
:param params: Parameters as dict or list of two-tuples
:param dict collection_formats: Parameter collection formats
:return: Parameters as list of tuples, collection... | def parameters_to_tuples(self, params, collection_formats):
"""Get parameters as list of tuples, formatting collections.
:param params: Parameters as dict or list of two-tuples
:param dict collection_formats: Parameter collection formats
:return: Parameters as list of tuples, collection... | [
"Get",
"parameters",
"as",
"list",
"of",
"tuples",
"formatting",
"collections",
"."
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api_client.py#L407-L435 | [
"def",
"parameters_to_tuples",
"(",
"self",
",",
"params",
",",
"collection_formats",
")",
":",
"new_params",
"=",
"[",
"]",
"if",
"collection_formats",
"is",
"None",
":",
"collection_formats",
"=",
"{",
"}",
"for",
"k",
",",
"v",
"in",
"six",
".",
"iterit... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | ApiClient.prepare_post_parameters | Builds form parameters.
:param post_params: Normal form parameters.
:param files: File parameters.
:return: Form parameters with files. | kaggle/api_client.py | def prepare_post_parameters(self, post_params=None, files=None):
"""Builds form parameters.
:param post_params: Normal form parameters.
:param files: File parameters.
:return: Form parameters with files.
"""
params = []
if post_params:
params = post_... | def prepare_post_parameters(self, post_params=None, files=None):
"""Builds form parameters.
:param post_params: Normal form parameters.
:param files: File parameters.
:return: Form parameters with files.
"""
params = []
if post_params:
params = post_... | [
"Builds",
"form",
"parameters",
"."
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api_client.py#L437-L463 | [
"def",
"prepare_post_parameters",
"(",
"self",
",",
"post_params",
"=",
"None",
",",
"files",
"=",
"None",
")",
":",
"params",
"=",
"[",
"]",
"if",
"post_params",
":",
"params",
"=",
"post_params",
"if",
"files",
":",
"for",
"k",
",",
"v",
"in",
"six",... | 65f14b1386470c5784d4753e491478e7537660d9 |
train | ApiClient.__deserialize_file | Deserializes body to file
Saves response body into a file in a temporary folder,
using the filename from the `Content-Disposition` header if provided.
:param response: RESTResponse.
:return: file path. | kaggle/api_client.py | def __deserialize_file(self, response):
"""Deserializes body to file
Saves response body into a file in a temporary folder,
using the filename from the `Content-Disposition` header if provided.
:param response: RESTResponse.
:return: file path.
"""
fd, path = t... | def __deserialize_file(self, response):
"""Deserializes body to file
Saves response body into a file in a temporary folder,
using the filename from the `Content-Disposition` header if provided.
:param response: RESTResponse.
:return: file path.
"""
fd, path = t... | [
"Deserializes",
"body",
"to",
"file"
] | Kaggle/kaggle-api | python | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api_client.py#L521-L543 | [
"def",
"__deserialize_file",
"(",
"self",
",",
"response",
")",
":",
"fd",
",",
"path",
"=",
"tempfile",
".",
"mkstemp",
"(",
"dir",
"=",
"self",
".",
"configuration",
".",
"temp_folder_path",
")",
"os",
".",
"close",
"(",
"fd",
")",
"os",
".",
"remove... | 65f14b1386470c5784d4753e491478e7537660d9 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.