repo stringclasses 85
values | path stringlengths 8 121 | func_name stringlengths 1 82 | original_string stringlengths 112 65.5k | language stringclasses 1
value | code stringlengths 112 65.5k | code_tokens listlengths 20 4.09k | docstring stringlengths 3 46.3k | docstring_tokens listlengths 1 564 | sha stringclasses 85
values | url stringlengths 93 218 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
paramiko/paramiko | paramiko/packet.py | Packetizer.set_inbound_cipher | def set_inbound_cipher(
self, block_engine, block_size, mac_engine, mac_size, mac_key
):
"""
Switch inbound data cipher.
"""
self.__block_engine_in = block_engine
self.__block_size_in = block_size
self.__mac_engine_in = mac_engine
self.__mac_size_in = ... | python | def set_inbound_cipher(
self, block_engine, block_size, mac_engine, mac_size, mac_key
):
"""
Switch inbound data cipher.
"""
self.__block_engine_in = block_engine
self.__block_size_in = block_size
self.__mac_engine_in = mac_engine
self.__mac_size_in = ... | [
"def",
"set_inbound_cipher",
"(",
"self",
",",
"block_engine",
",",
"block_size",
",",
"mac_engine",
",",
"mac_size",
",",
"mac_key",
")",
":",
"self",
".",
"__block_engine_in",
"=",
"block_engine",
"self",
".",
"__block_size_in",
"=",
"block_size",
"self",
".",... | Switch inbound data cipher. | [
"Switch",
"inbound",
"data",
"cipher",
"."
] | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/packet.py#L164-L184 | train |
paramiko/paramiko | paramiko/packet.py | Packetizer.set_keepalive | def set_keepalive(self, interval, callback):
"""
Turn on/off the callback keepalive. If ``interval`` seconds pass with
no data read from or written to the socket, the callback will be
executed and the timer will be reset.
"""
self.__keepalive_interval = interval
... | python | def set_keepalive(self, interval, callback):
"""
Turn on/off the callback keepalive. If ``interval`` seconds pass with
no data read from or written to the socket, the callback will be
executed and the timer will be reset.
"""
self.__keepalive_interval = interval
... | [
"def",
"set_keepalive",
"(",
"self",
",",
"interval",
",",
"callback",
")",
":",
"self",
".",
"__keepalive_interval",
"=",
"interval",
"self",
".",
"__keepalive_callback",
"=",
"callback",
"self",
".",
"__keepalive_last",
"=",
"time",
".",
"time",
"(",
")"
] | Turn on/off the callback keepalive. If ``interval`` seconds pass with
no data read from or written to the socket, the callback will be
executed and the timer will be reset. | [
"Turn",
"on",
"/",
"off",
"the",
"callback",
"keepalive",
".",
"If",
"interval",
"seconds",
"pass",
"with",
"no",
"data",
"read",
"from",
"or",
"written",
"to",
"the",
"socket",
"the",
"callback",
"will",
"be",
"executed",
"and",
"the",
"timer",
"will",
... | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/packet.py#L216-L224 | train |
paramiko/paramiko | paramiko/packet.py | Packetizer.start_handshake | def start_handshake(self, timeout):
"""
Tells `Packetizer` that the handshake process started.
Starts a book keeping timer that can signal a timeout in the
handshake process.
:param float timeout: amount of seconds to wait before timing out
"""
if not self.__time... | python | def start_handshake(self, timeout):
"""
Tells `Packetizer` that the handshake process started.
Starts a book keeping timer that can signal a timeout in the
handshake process.
:param float timeout: amount of seconds to wait before timing out
"""
if not self.__time... | [
"def",
"start_handshake",
"(",
"self",
",",
"timeout",
")",
":",
"if",
"not",
"self",
".",
"__timer",
":",
"self",
".",
"__timer",
"=",
"threading",
".",
"Timer",
"(",
"float",
"(",
"timeout",
")",
",",
"self",
".",
"read_timer",
")",
"self",
".",
"_... | Tells `Packetizer` that the handshake process started.
Starts a book keeping timer that can signal a timeout in the
handshake process.
:param float timeout: amount of seconds to wait before timing out | [
"Tells",
"Packetizer",
"that",
"the",
"handshake",
"process",
"started",
".",
"Starts",
"a",
"book",
"keeping",
"timer",
"that",
"can",
"signal",
"a",
"timeout",
"in",
"the",
"handshake",
"process",
"."
] | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/packet.py#L229-L239 | train |
paramiko/paramiko | paramiko/packet.py | Packetizer.handshake_timed_out | def handshake_timed_out(self):
"""
Checks if the handshake has timed out.
If `start_handshake` wasn't called before the call to this function,
the return value will always be `False`. If the handshake completed
before a timeout was reached, the return value will be `False`
... | python | def handshake_timed_out(self):
"""
Checks if the handshake has timed out.
If `start_handshake` wasn't called before the call to this function,
the return value will always be `False`. If the handshake completed
before a timeout was reached, the return value will be `False`
... | [
"def",
"handshake_timed_out",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"__timer",
":",
"return",
"False",
"if",
"self",
".",
"__handshake_complete",
":",
"return",
"False",
"return",
"self",
".",
"__timer_expired"
] | Checks if the handshake has timed out.
If `start_handshake` wasn't called before the call to this function,
the return value will always be `False`. If the handshake completed
before a timeout was reached, the return value will be `False`
:return: handshake time out status, as a `bool` | [
"Checks",
"if",
"the",
"handshake",
"has",
"timed",
"out",
"."
] | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/packet.py#L241-L255 | train |
paramiko/paramiko | paramiko/packet.py | Packetizer.complete_handshake | def complete_handshake(self):
"""
Tells `Packetizer` that the handshake has completed.
"""
if self.__timer:
self.__timer.cancel()
self.__timer_expired = False
self.__handshake_complete = True | python | def complete_handshake(self):
"""
Tells `Packetizer` that the handshake has completed.
"""
if self.__timer:
self.__timer.cancel()
self.__timer_expired = False
self.__handshake_complete = True | [
"def",
"complete_handshake",
"(",
"self",
")",
":",
"if",
"self",
".",
"__timer",
":",
"self",
".",
"__timer",
".",
"cancel",
"(",
")",
"self",
".",
"__timer_expired",
"=",
"False",
"self",
".",
"__handshake_complete",
"=",
"True"
] | Tells `Packetizer` that the handshake has completed. | [
"Tells",
"Packetizer",
"that",
"the",
"handshake",
"has",
"completed",
"."
] | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/packet.py#L257-L264 | train |
paramiko/paramiko | paramiko/sftp_handle.py | SFTPHandle.close | def close(self):
"""
When a client closes a file, this method is called on the handle.
Normally you would use this method to close the underlying OS level
file object(s).
The default implementation checks for attributes on ``self`` named
``readfile`` and/or ``writefile``... | python | def close(self):
"""
When a client closes a file, this method is called on the handle.
Normally you would use this method to close the underlying OS level
file object(s).
The default implementation checks for attributes on ``self`` named
``readfile`` and/or ``writefile``... | [
"def",
"close",
"(",
"self",
")",
":",
"readfile",
"=",
"getattr",
"(",
"self",
",",
"\"readfile\"",
",",
"None",
")",
"if",
"readfile",
"is",
"not",
"None",
":",
"readfile",
".",
"close",
"(",
")",
"writefile",
"=",
"getattr",
"(",
"self",
",",
"\"w... | When a client closes a file, this method is called on the handle.
Normally you would use this method to close the underlying OS level
file object(s).
The default implementation checks for attributes on ``self`` named
``readfile`` and/or ``writefile``, and if either or both are present,
... | [
"When",
"a",
"client",
"closes",
"a",
"file",
"this",
"method",
"is",
"called",
"on",
"the",
"handle",
".",
"Normally",
"you",
"would",
"use",
"this",
"method",
"to",
"close",
"the",
"underlying",
"OS",
"level",
"file",
"object",
"(",
"s",
")",
"."
] | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/sftp_handle.py#L55-L72 | train |
paramiko/paramiko | paramiko/sftp_handle.py | SFTPHandle._get_next_files | def _get_next_files(self):
"""
Used by the SFTP server code to retrieve a cached directory
listing.
"""
fnlist = self.__files[:16]
self.__files = self.__files[16:]
return fnlist | python | def _get_next_files(self):
"""
Used by the SFTP server code to retrieve a cached directory
listing.
"""
fnlist = self.__files[:16]
self.__files = self.__files[16:]
return fnlist | [
"def",
"_get_next_files",
"(",
"self",
")",
":",
"fnlist",
"=",
"self",
".",
"__files",
"[",
":",
"16",
"]",
"self",
".",
"__files",
"=",
"self",
".",
"__files",
"[",
"16",
":",
"]",
"return",
"fnlist"
] | Used by the SFTP server code to retrieve a cached directory
listing. | [
"Used",
"by",
"the",
"SFTP",
"server",
"code",
"to",
"retrieve",
"a",
"cached",
"directory",
"listing",
"."
] | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/sftp_handle.py#L180-L187 | train |
paramiko/paramiko | paramiko/util.py | generate_key_bytes | def generate_key_bytes(hash_alg, salt, key, nbytes):
"""
Given a password, passphrase, or other human-source key, scramble it
through a secure hash into some keyworthy bytes. This specific algorithm
is used for encrypting/decrypting private key files.
:param function hash_alg: A function which cre... | python | def generate_key_bytes(hash_alg, salt, key, nbytes):
"""
Given a password, passphrase, or other human-source key, scramble it
through a secure hash into some keyworthy bytes. This specific algorithm
is used for encrypting/decrypting private key files.
:param function hash_alg: A function which cre... | [
"def",
"generate_key_bytes",
"(",
"hash_alg",
",",
"salt",
",",
"key",
",",
"nbytes",
")",
":",
"keydata",
"=",
"bytes",
"(",
")",
"digest",
"=",
"bytes",
"(",
")",
"if",
"len",
"(",
"salt",
")",
">",
"8",
":",
"salt",
"=",
"salt",
"[",
":",
"8",... | Given a password, passphrase, or other human-source key, scramble it
through a secure hash into some keyworthy bytes. This specific algorithm
is used for encrypting/decrypting private key files.
:param function hash_alg: A function which creates a new hash object, such
as ``hashlib.sha256``.
:... | [
"Given",
"a",
"password",
"passphrase",
"or",
"other",
"human",
"-",
"source",
"key",
"scramble",
"it",
"through",
"a",
"secure",
"hash",
"into",
"some",
"keyworthy",
"bytes",
".",
"This",
"specific",
"algorithm",
"is",
"used",
"for",
"encrypting",
"/",
"dec... | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/util.py#L142-L170 | train |
paramiko/paramiko | paramiko/util.py | log_to_file | def log_to_file(filename, level=DEBUG):
"""send paramiko logs to a logfile,
if they're not already going somewhere"""
logger = logging.getLogger("paramiko")
if len(logger.handlers) > 0:
return
logger.setLevel(level)
f = open(filename, "a")
handler = logging.StreamHandler(f)
frm =... | python | def log_to_file(filename, level=DEBUG):
"""send paramiko logs to a logfile,
if they're not already going somewhere"""
logger = logging.getLogger("paramiko")
if len(logger.handlers) > 0:
return
logger.setLevel(level)
f = open(filename, "a")
handler = logging.StreamHandler(f)
frm =... | [
"def",
"log_to_file",
"(",
"filename",
",",
"level",
"=",
"DEBUG",
")",
":",
"logger",
"=",
"logging",
".",
"getLogger",
"(",
"\"paramiko\"",
")",
"if",
"len",
"(",
"logger",
".",
"handlers",
")",
">",
"0",
":",
"return",
"logger",
".",
"setLevel",
"("... | send paramiko logs to a logfile,
if they're not already going somewhere | [
"send",
"paramiko",
"logs",
"to",
"a",
"logfile",
"if",
"they",
"re",
"not",
"already",
"going",
"somewhere"
] | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/util.py#L245-L257 | train |
paramiko/paramiko | paramiko/proxy.py | ProxyCommand.send | def send(self, content):
"""
Write the content received from the SSH client to the standard
input of the forked command.
:param str content: string to be sent to the forked command
"""
try:
self.process.stdin.write(content)
except IOError as e:
... | python | def send(self, content):
"""
Write the content received from the SSH client to the standard
input of the forked command.
:param str content: string to be sent to the forked command
"""
try:
self.process.stdin.write(content)
except IOError as e:
... | [
"def",
"send",
"(",
"self",
",",
"content",
")",
":",
"try",
":",
"self",
".",
"process",
".",
"stdin",
".",
"write",
"(",
"content",
")",
"except",
"IOError",
"as",
"e",
":",
"# There was a problem with the child process. It probably",
"# died and we can't procee... | Write the content received from the SSH client to the standard
input of the forked command.
:param str content: string to be sent to the forked command | [
"Write",
"the",
"content",
"received",
"from",
"the",
"SSH",
"client",
"to",
"the",
"standard",
"input",
"of",
"the",
"forked",
"command",
"."
] | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/proxy.py#L61-L76 | train |
paramiko/paramiko | paramiko/proxy.py | ProxyCommand.recv | def recv(self, size):
"""
Read from the standard output of the forked program.
:param int size: how many chars should be read
:return: the string of bytes read, which may be shorter than requested
"""
try:
buffer = b""
start = time.time()
... | python | def recv(self, size):
"""
Read from the standard output of the forked program.
:param int size: how many chars should be read
:return: the string of bytes read, which may be shorter than requested
"""
try:
buffer = b""
start = time.time()
... | [
"def",
"recv",
"(",
"self",
",",
"size",
")",
":",
"try",
":",
"buffer",
"=",
"b\"\"",
"start",
"=",
"time",
".",
"time",
"(",
")",
"while",
"len",
"(",
"buffer",
")",
"<",
"size",
":",
"select_timeout",
"=",
"None",
"if",
"self",
".",
"timeout",
... | Read from the standard output of the forked program.
:param int size: how many chars should be read
:return: the string of bytes read, which may be shorter than requested | [
"Read",
"from",
"the",
"standard",
"output",
"of",
"the",
"forked",
"program",
"."
] | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/proxy.py#L78-L109 | train |
paramiko/paramiko | paramiko/_winapi.py | format_system_message | def format_system_message(errno):
"""
Call FormatMessage with a system error number to retrieve
the descriptive error message.
"""
# first some flags used by FormatMessageW
ALLOCATE_BUFFER = 0x100
FROM_SYSTEM = 0x1000
# Let FormatMessageW allocate the buffer (we'll free it below)
# ... | python | def format_system_message(errno):
"""
Call FormatMessage with a system error number to retrieve
the descriptive error message.
"""
# first some flags used by FormatMessageW
ALLOCATE_BUFFER = 0x100
FROM_SYSTEM = 0x1000
# Let FormatMessageW allocate the buffer (we'll free it below)
# ... | [
"def",
"format_system_message",
"(",
"errno",
")",
":",
"# first some flags used by FormatMessageW",
"ALLOCATE_BUFFER",
"=",
"0x100",
"FROM_SYSTEM",
"=",
"0x1000",
"# Let FormatMessageW allocate the buffer (we'll free it below)",
"# Also, let it know we want a system error message.",
"... | Call FormatMessage with a system error number to retrieve
the descriptive error message. | [
"Call",
"FormatMessage",
"with",
"a",
"system",
"error",
"number",
"to",
"retrieve",
"the",
"descriptive",
"error",
"message",
"."
] | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/_winapi.py#L19-L52 | train |
paramiko/paramiko | paramiko/_winapi.py | GetTokenInformation | def GetTokenInformation(token, information_class):
"""
Given a token, get the token information for it.
"""
data_size = ctypes.wintypes.DWORD()
ctypes.windll.advapi32.GetTokenInformation(
token, information_class.num, 0, 0, ctypes.byref(data_size)
)
data = ctypes.create_string_buffer... | python | def GetTokenInformation(token, information_class):
"""
Given a token, get the token information for it.
"""
data_size = ctypes.wintypes.DWORD()
ctypes.windll.advapi32.GetTokenInformation(
token, information_class.num, 0, 0, ctypes.byref(data_size)
)
data = ctypes.create_string_buffer... | [
"def",
"GetTokenInformation",
"(",
"token",
",",
"information_class",
")",
":",
"data_size",
"=",
"ctypes",
".",
"wintypes",
".",
"DWORD",
"(",
")",
"ctypes",
".",
"windll",
".",
"advapi32",
".",
"GetTokenInformation",
"(",
"token",
",",
"information_class",
"... | Given a token, get the token information for it. | [
"Given",
"a",
"token",
"get",
"the",
"token",
"information",
"for",
"it",
"."
] | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/_winapi.py#L351-L369 | train |
paramiko/paramiko | paramiko/_winapi.py | get_current_user | def get_current_user():
"""
Return a TOKEN_USER for the owner of this process.
"""
process = OpenProcessToken(
ctypes.windll.kernel32.GetCurrentProcess(), TokenAccess.TOKEN_QUERY
)
return GetTokenInformation(process, TOKEN_USER) | python | def get_current_user():
"""
Return a TOKEN_USER for the owner of this process.
"""
process = OpenProcessToken(
ctypes.windll.kernel32.GetCurrentProcess(), TokenAccess.TOKEN_QUERY
)
return GetTokenInformation(process, TOKEN_USER) | [
"def",
"get_current_user",
"(",
")",
":",
"process",
"=",
"OpenProcessToken",
"(",
"ctypes",
".",
"windll",
".",
"kernel32",
".",
"GetCurrentProcess",
"(",
")",
",",
"TokenAccess",
".",
"TOKEN_QUERY",
")",
"return",
"GetTokenInformation",
"(",
"process",
",",
... | Return a TOKEN_USER for the owner of this process. | [
"Return",
"a",
"TOKEN_USER",
"for",
"the",
"owner",
"of",
"this",
"process",
"."
] | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/_winapi.py#L383-L390 | train |
paramiko/paramiko | paramiko/dsskey.py | DSSKey.generate | def generate(bits=1024, progress_func=None):
"""
Generate a new private DSS key. This factory function can be used to
generate a new host key or authentication key.
:param int bits: number of bits the generated key should be.
:param progress_func: Unused
:return: new `.... | python | def generate(bits=1024, progress_func=None):
"""
Generate a new private DSS key. This factory function can be used to
generate a new host key or authentication key.
:param int bits: number of bits the generated key should be.
:param progress_func: Unused
:return: new `.... | [
"def",
"generate",
"(",
"bits",
"=",
"1024",
",",
"progress_func",
"=",
"None",
")",
":",
"numbers",
"=",
"dsa",
".",
"generate_private_key",
"(",
"bits",
",",
"backend",
"=",
"default_backend",
"(",
")",
")",
".",
"private_numbers",
"(",
")",
"key",
"="... | Generate a new private DSS key. This factory function can be used to
generate a new host key or authentication key.
:param int bits: number of bits the generated key should be.
:param progress_func: Unused
:return: new `.DSSKey` private key | [
"Generate",
"a",
"new",
"private",
"DSS",
"key",
".",
"This",
"factory",
"function",
"can",
"be",
"used",
"to",
"generate",
"a",
"new",
"host",
"key",
"or",
"authentication",
"key",
"."
] | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/dsskey.py#L198-L219 | train |
paramiko/paramiko | paramiko/client.py | SSHClient.load_system_host_keys | def load_system_host_keys(self, filename=None):
"""
Load host keys from a system (read-only) file. Host keys read with
this method will not be saved back by `save_host_keys`.
This method can be called multiple times. Each new set of host keys
will be merged with the existing s... | python | def load_system_host_keys(self, filename=None):
"""
Load host keys from a system (read-only) file. Host keys read with
this method will not be saved back by `save_host_keys`.
This method can be called multiple times. Each new set of host keys
will be merged with the existing s... | [
"def",
"load_system_host_keys",
"(",
"self",
",",
"filename",
"=",
"None",
")",
":",
"if",
"filename",
"is",
"None",
":",
"# try the user's .ssh key file, and mask exceptions",
"filename",
"=",
"os",
".",
"path",
".",
"expanduser",
"(",
"\"~/.ssh/known_hosts\"",
")"... | Load host keys from a system (read-only) file. Host keys read with
this method will not be saved back by `save_host_keys`.
This method can be called multiple times. Each new set of host keys
will be merged with the existing set (new replacing old if there are
conflicts).
If `... | [
"Load",
"host",
"keys",
"from",
"a",
"system",
"(",
"read",
"-",
"only",
")",
"file",
".",
"Host",
"keys",
"read",
"with",
"this",
"method",
"will",
"not",
"be",
"saved",
"back",
"by",
"save_host_keys",
"."
] | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/client.py#L81-L108 | train |
paramiko/paramiko | paramiko/client.py | SSHClient.load_host_keys | def load_host_keys(self, filename):
"""
Load host keys from a local host-key file. Host keys read with this
method will be checked after keys loaded via `load_system_host_keys`,
but will be saved back by `save_host_keys` (so they can be modified).
The missing host key policy `.A... | python | def load_host_keys(self, filename):
"""
Load host keys from a local host-key file. Host keys read with this
method will be checked after keys loaded via `load_system_host_keys`,
but will be saved back by `save_host_keys` (so they can be modified).
The missing host key policy `.A... | [
"def",
"load_host_keys",
"(",
"self",
",",
"filename",
")",
":",
"self",
".",
"_host_keys_filename",
"=",
"filename",
"self",
".",
"_host_keys",
".",
"load",
"(",
"filename",
")"
] | Load host keys from a local host-key file. Host keys read with this
method will be checked after keys loaded via `load_system_host_keys`,
but will be saved back by `save_host_keys` (so they can be modified).
The missing host key policy `.AutoAddPolicy` adds keys to this set and
saves th... | [
"Load",
"host",
"keys",
"from",
"a",
"local",
"host",
"-",
"key",
"file",
".",
"Host",
"keys",
"read",
"with",
"this",
"method",
"will",
"be",
"checked",
"after",
"keys",
"loaded",
"via",
"load_system_host_keys",
"but",
"will",
"be",
"saved",
"back",
"by",... | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/client.py#L110-L127 | train |
paramiko/paramiko | paramiko/client.py | SSHClient.set_missing_host_key_policy | def set_missing_host_key_policy(self, policy):
"""
Set policy to use when connecting to servers without a known host key.
Specifically:
* A **policy** is a "policy class" (or instance thereof), namely some
subclass of `.MissingHostKeyPolicy` such as `.RejectPolicy` (the
... | python | def set_missing_host_key_policy(self, policy):
"""
Set policy to use when connecting to servers without a known host key.
Specifically:
* A **policy** is a "policy class" (or instance thereof), namely some
subclass of `.MissingHostKeyPolicy` such as `.RejectPolicy` (the
... | [
"def",
"set_missing_host_key_policy",
"(",
"self",
",",
"policy",
")",
":",
"if",
"inspect",
".",
"isclass",
"(",
"policy",
")",
":",
"policy",
"=",
"policy",
"(",
")",
"self",
".",
"_policy",
"=",
"policy"
] | Set policy to use when connecting to servers without a known host key.
Specifically:
* A **policy** is a "policy class" (or instance thereof), namely some
subclass of `.MissingHostKeyPolicy` such as `.RejectPolicy` (the
default), `.AutoAddPolicy`, `.WarningPolicy`, or a user-create... | [
"Set",
"policy",
"to",
"use",
"when",
"connecting",
"to",
"servers",
"without",
"a",
"known",
"host",
"key",
"."
] | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/client.py#L172-L192 | train |
paramiko/paramiko | paramiko/client.py | SSHClient._families_and_addresses | def _families_and_addresses(self, hostname, port):
"""
Yield pairs of address families and addresses to try for connecting.
:param str hostname: the server to connect to
:param int port: the server port to connect to
:returns: Yields an iterable of ``(family, address)`` tuples
... | python | def _families_and_addresses(self, hostname, port):
"""
Yield pairs of address families and addresses to try for connecting.
:param str hostname: the server to connect to
:param int port: the server port to connect to
:returns: Yields an iterable of ``(family, address)`` tuples
... | [
"def",
"_families_and_addresses",
"(",
"self",
",",
"hostname",
",",
"port",
")",
":",
"guess",
"=",
"True",
"addrinfos",
"=",
"socket",
".",
"getaddrinfo",
"(",
"hostname",
",",
"port",
",",
"socket",
".",
"AF_UNSPEC",
",",
"socket",
".",
"SOCK_STREAM",
"... | Yield pairs of address families and addresses to try for connecting.
:param str hostname: the server to connect to
:param int port: the server port to connect to
:returns: Yields an iterable of ``(family, address)`` tuples | [
"Yield",
"pairs",
"of",
"address",
"families",
"and",
"addresses",
"to",
"try",
"for",
"connecting",
"."
] | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/client.py#L194-L216 | train |
paramiko/paramiko | paramiko/client.py | SSHClient.connect | def connect(
self,
hostname,
port=SSH_PORT,
username=None,
password=None,
pkey=None,
key_filename=None,
timeout=None,
allow_agent=True,
look_for_keys=True,
compress=False,
sock=None,
gss_auth=False,
gss_kex=F... | python | def connect(
self,
hostname,
port=SSH_PORT,
username=None,
password=None,
pkey=None,
key_filename=None,
timeout=None,
allow_agent=True,
look_for_keys=True,
compress=False,
sock=None,
gss_auth=False,
gss_kex=F... | [
"def",
"connect",
"(",
"self",
",",
"hostname",
",",
"port",
"=",
"SSH_PORT",
",",
"username",
"=",
"None",
",",
"password",
"=",
"None",
",",
"pkey",
"=",
"None",
",",
"key_filename",
"=",
"None",
",",
"timeout",
"=",
"None",
",",
"allow_agent",
"=",
... | Connect to an SSH server and authenticate to it. The server's host key
is checked against the system host keys (see `load_system_host_keys`)
and any local host keys (`load_host_keys`). If the server's hostname
is not found in either set of host keys, the missing host key policy
is used... | [
"Connect",
"to",
"an",
"SSH",
"server",
"and",
"authenticate",
"to",
"it",
".",
"The",
"server",
"s",
"host",
"key",
"is",
"checked",
"against",
"the",
"system",
"host",
"keys",
"(",
"see",
"load_system_host_keys",
")",
"and",
"any",
"local",
"host",
"keys... | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/client.py#L218-L438 | train |
paramiko/paramiko | paramiko/client.py | SSHClient.close | def close(self):
"""
Close this SSHClient and its underlying `.Transport`.
.. warning::
Failure to do this may, in some situations, cause your Python
interpreter to hang at shutdown (often due to race conditions).
It's good practice to `close` your client obj... | python | def close(self):
"""
Close this SSHClient and its underlying `.Transport`.
.. warning::
Failure to do this may, in some situations, cause your Python
interpreter to hang at shutdown (often due to race conditions).
It's good practice to `close` your client obj... | [
"def",
"close",
"(",
"self",
")",
":",
"if",
"self",
".",
"_transport",
"is",
"None",
":",
"return",
"self",
".",
"_transport",
".",
"close",
"(",
")",
"self",
".",
"_transport",
"=",
"None",
"if",
"self",
".",
"_agent",
"is",
"not",
"None",
":",
"... | Close this SSHClient and its underlying `.Transport`.
.. warning::
Failure to do this may, in some situations, cause your Python
interpreter to hang at shutdown (often due to race conditions).
It's good practice to `close` your client objects anytime you're
done ... | [
"Close",
"this",
"SSHClient",
"and",
"its",
"underlying",
".",
"Transport",
"."
] | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/client.py#L440-L457 | train |
paramiko/paramiko | paramiko/client.py | SSHClient.exec_command | def exec_command(
self,
command,
bufsize=-1,
timeout=None,
get_pty=False,
environment=None,
):
"""
Execute a command on the SSH server. A new `.Channel` is opened and
the requested command is executed. The command's input and output
s... | python | def exec_command(
self,
command,
bufsize=-1,
timeout=None,
get_pty=False,
environment=None,
):
"""
Execute a command on the SSH server. A new `.Channel` is opened and
the requested command is executed. The command's input and output
s... | [
"def",
"exec_command",
"(",
"self",
",",
"command",
",",
"bufsize",
"=",
"-",
"1",
",",
"timeout",
"=",
"None",
",",
"get_pty",
"=",
"False",
",",
"environment",
"=",
"None",
",",
")",
":",
"chan",
"=",
"self",
".",
"_transport",
".",
"open_session",
... | Execute a command on the SSH server. A new `.Channel` is opened and
the requested command is executed. The command's input and output
streams are returned as Python ``file``-like objects representing
stdin, stdout, and stderr.
:param str command: the command to execute
:param ... | [
"Execute",
"a",
"command",
"on",
"the",
"SSH",
"server",
".",
"A",
"new",
".",
"Channel",
"is",
"opened",
"and",
"the",
"requested",
"command",
"is",
"executed",
".",
"The",
"command",
"s",
"input",
"and",
"output",
"streams",
"are",
"returned",
"as",
"P... | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/client.py#L459-L509 | train |
paramiko/paramiko | paramiko/client.py | SSHClient.invoke_shell | def invoke_shell(
self,
term="vt100",
width=80,
height=24,
width_pixels=0,
height_pixels=0,
environment=None,
):
"""
Start an interactive shell session on the SSH server. A new `.Channel`
is opened and connected to a pseudo-terminal us... | python | def invoke_shell(
self,
term="vt100",
width=80,
height=24,
width_pixels=0,
height_pixels=0,
environment=None,
):
"""
Start an interactive shell session on the SSH server. A new `.Channel`
is opened and connected to a pseudo-terminal us... | [
"def",
"invoke_shell",
"(",
"self",
",",
"term",
"=",
"\"vt100\"",
",",
"width",
"=",
"80",
",",
"height",
"=",
"24",
",",
"width_pixels",
"=",
"0",
",",
"height_pixels",
"=",
"0",
",",
"environment",
"=",
"None",
",",
")",
":",
"chan",
"=",
"self",
... | Start an interactive shell session on the SSH server. A new `.Channel`
is opened and connected to a pseudo-terminal using the requested
terminal type and size.
:param str term:
the terminal type to emulate (for example, ``"vt100"``)
:param int width: the width (in character... | [
"Start",
"an",
"interactive",
"shell",
"session",
"on",
"the",
"SSH",
"server",
".",
"A",
"new",
".",
"Channel",
"is",
"opened",
"and",
"connected",
"to",
"a",
"pseudo",
"-",
"terminal",
"using",
"the",
"requested",
"terminal",
"type",
"and",
"size",
"."
] | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/client.py#L511-L539 | train |
paramiko/paramiko | paramiko/client.py | SSHClient._key_from_filepath | def _key_from_filepath(self, filename, klass, password):
"""
Attempt to derive a `.PKey` from given string path ``filename``:
- If ``filename`` appears to be a cert, the matching private key is
loaded.
- Otherwise, the filename is assumed to be a private key, and the
... | python | def _key_from_filepath(self, filename, klass, password):
"""
Attempt to derive a `.PKey` from given string path ``filename``:
- If ``filename`` appears to be a cert, the matching private key is
loaded.
- Otherwise, the filename is assumed to be a private key, and the
... | [
"def",
"_key_from_filepath",
"(",
"self",
",",
"filename",
",",
"klass",
",",
"password",
")",
":",
"cert_suffix",
"=",
"\"-cert.pub\"",
"# Assume privkey, not cert, by default",
"if",
"filename",
".",
"endswith",
"(",
"cert_suffix",
")",
":",
"key_path",
"=",
"fi... | Attempt to derive a `.PKey` from given string path ``filename``:
- If ``filename`` appears to be a cert, the matching private key is
loaded.
- Otherwise, the filename is assumed to be a private key, and the
matching public cert will be loaded if it exists. | [
"Attempt",
"to",
"derive",
"a",
".",
"PKey",
"from",
"given",
"string",
"path",
"filename",
":"
] | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/client.py#L559-L589 | train |
paramiko/paramiko | paramiko/client.py | SSHClient._auth | 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... | python | 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",
",",
")",
":",
"saved_exc... | 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.
... | [
"Try",
"in",
"order",
":"
] | cf7d49d66f3b1fbc8b0853518a54050182b3b5eb | https://github.com/paramiko/paramiko/blob/cf7d49d66f3b1fbc8b0853518a54050182b3b5eb/paramiko/client.py#L591-L756 | train |
Kaggle/kaggle-api | kaggle/models/kernel_push_request.py | KernelPushRequest.language | 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... | python | 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",
")",
":",
"if",
"language",
"is",
"None",
":",
"raise",
"ValueError",
"(",
"\"Invalid value for `language`, must not be `None`\"",
")",
"# noqa: E501",
"allowed_values",
"=",
"[",
"\"python\"",
",",
"\"r\"",
",",
"\... | 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 | [
"Sets",
"the",
"language",
"of",
"this",
"KernelPushRequest",
"."
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/models/kernel_push_request.py#L229-L246 | train |
Kaggle/kaggle-api | kaggle/models/kernel_push_request.py | KernelPushRequest.kernel_type | 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... | python | 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",
")",
":",
"if",
"kernel_type",
"is",
"None",
":",
"raise",
"ValueError",
"(",
"\"Invalid value for `kernel_type`, must not be `None`\"",
")",
"# noqa: E501",
"allowed_values",
"=",
"[",
"\"script\"",
",",
"\"noteb... | 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 | [
"Sets",
"the",
"kernel_type",
"of",
"this",
"KernelPushRequest",
"."
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/models/kernel_push_request.py#L260-L277 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.competition_download_leaderboard | 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... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"self",
"."... | 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_... | [
"Download",
"competition",
"leaderboard",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L52-L71 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.competition_view_leaderboard | 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... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"self",
".",
... | 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... | [
"VIew",
"competition",
"leaderboard",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L141-L160 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.competitions_data_download_file | 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_... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"ret... | 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... | [
"Download",
"competition",
"data",
"file",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L230-L250 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.competitions_data_list_files | 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... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"self",
".",
... | 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
... | [
"List",
"competition",
"data",
"files",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L327-L346 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.competitions_list | 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... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"self",
".",
"competitions_list_with_ht... | 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:... | [
"List",
"competitions",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L420-L443 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.competitions_submissions_list | 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,... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"self",
".",
... | 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... | [
"List",
"competition",
"submissions",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L525-L545 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.competitions_submissions_submit | 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 = ... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
... | 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... | [
"Submit",
"to",
"competition",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L622-L643 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.competitions_submissions_upload | 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
... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
... | 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)
... | [
"Upload",
"competition",
"submission",
"file",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L735-L757 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.competitions_submissions_url | 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
>>> ... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
... | 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... | [
"Generate",
"competition",
"submission",
"URL",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L856-L878 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.datasets_create_new | 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... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"self",
... | 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... | [
"Create",
"a",
"new",
"dataset",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L973-L992 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.datasets_create_version | 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... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
... | 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... | [
"Create",
"a",
"new",
"dataset",
"version",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L1070-L1091 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.datasets_create_version_by_id | 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... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")... | 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.... | [
"Create",
"a",
"new",
"dataset",
"version",
"by",
"id",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L1183-L1203 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.datasets_download | 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, ... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return... | 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 ... | [
"Download",
"dataset",
"file",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L1288-L1309 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.datasets_download_file | 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... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req... | 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()
:... | [
"Download",
"dataset",
"file",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L1393-L1415 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.datasets_list | 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()
... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"self",
".",
"datasets_list_with_http_info"... | 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... | [
"List",
"datasets",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L1506-L1533 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.datasets_list_files | 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,... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"retu... | 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... | [
"List",
"dataset",
"files",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L1627-L1647 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.datasets_status | 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... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",... | 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_... | [
"Get",
"dataset",
"creation",
"status",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L1728-L1748 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.datasets_upload_file | 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
... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
... | 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)
... | [
"Get",
"URL",
"and",
"token",
"to",
"start",
"uploading",
"a",
"data",
"file",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L1829-L1850 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.datasets_view | 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... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
... | 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... | [
"Show",
"details",
"about",
"a",
"dataset",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L1942-L1962 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.kernel_output | 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... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"... | 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... | [
"Download",
"the",
"latest",
"output",
"from",
"a",
"kernel",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L2043-L2063 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.kernel_pull | 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... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"se... | 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... | [
"Pull",
"the",
"latest",
"code",
"from",
"a",
"kernel",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L2144-L2164 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.kernel_push | 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... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"self",
".",
... | 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)
... | [
"Push",
"a",
"new",
"kernel",
"version",
".",
"Can",
"be",
"used",
"to",
"create",
"a",
"new",
"kernel",
"and",
"update",
"an",
"existing",
"one",
".",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L2245-L2264 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.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(... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"... | 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()
:... | [
"Get",
"the",
"status",
"of",
"the",
"latest",
"kernel",
"version",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L2342-L2362 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api.py | KaggleApi.kernels_list | 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()
... | python | 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",
"kwargs",
"[",
"'_return_http_data_only'",
"]",
"=",
"True",
"if",
"kwargs",
".",
"get",
"(",
"'async_req'",
")",
":",
"return",
"self",
".",
"kernels_list_with_http_info",
... | 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... | [
"List",
"kernels",
"#",
"noqa",
":",
"E501"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api.py#L2443-L2473 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.authenticate | 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 ... | python | 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",
")",
":",
"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... | 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. | [
"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",
... | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L96-L119 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.read_config_environment | 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... | python | 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",
")",
":",
"# Add all variables that start with KAGGLE_ to config data",
"if",
"config_data",
"is",
"None",
":",
"config_data",
"=",
"{",
"}",
"for",
"key",
... | 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... | [
"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... | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L121-L142 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi._load_config | 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
... | python | 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",
")",
":",
"# Username and password are required.",
"for",
"item",
"in",
"[",
"self",
".",
"CONFIG_NAME_USER",
",",
"self",
".",
"CONFIG_NAME_KEY",
"]",
":",
"if",
"item",
"not",
"in",
"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
into self.config_values | [
"the",
"final",
"step",
"of",
"the",
"authenticate",
"steps",
"where",
"we",
"load",
"the",
"values",
"from",
"config_data",
"into",
"the",
"Configuration",
"object",
"."
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L146-L199 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.read_config_file | 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
==========
... | python | 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",
")",
":",
"if",
"config_data",
"is",
"None",
":",
"config_data",
"=",
"{",
"}",
"if",
"os",
".",
"path",
".",
"exists",
"(",
"self",
".",
"config",
"... | 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... | [
"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",
... | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L201-L237 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi._read_config_file | 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 | python | 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",
")",
":",
"try",
":",
"with",
"open",
"(",
"self",
".",
"config",
",",
"'r'",
")",
"as",
"f",
":",
"config_data",
"=",
"json",
".",
"load",
"(",
"f",
")",
"except",
"FileNotFoundError",
":",
"config_data",
"=",
... | read in the configuration file, a json file defined at self.config | [
"read",
"in",
"the",
"configuration",
"file",
"a",
"json",
"file",
"defined",
"at",
"self",
".",
"config"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L239-L248 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi._write_config_file | 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... | python | 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",
")",
":",
"with",
"open",
"(",
"self",
".",
"config",
",",
"'w'",
")",
"as",
"f",
":",
"json",
".",
"dump",
"(",
"config_data",
",",
"f",
",",
"indent",
"=",
"in... | 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 | [
"write",
"config",
"data",
"to",
"file",
"."
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L250-L260 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.set_config_value | 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 ... | python | 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",
")",
":",
"config_data",
"=",
"self",
".",
"_read_config_file",
"(",
")",
"if",
"value",
"is",
"not",
"None",
":",
"# Update the config file with the value",
"config... | 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... | [
"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"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L262-L288 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.unset_config_value | 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... | python | 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",
")",
":",
"config_data",
"=",
"self",
".",
"_read_config_file",
"(",
")",
"if",
"name",
"in",
"config_data",
":",
"del",
"config_data",
"[",
"name",
"]",
"self",
".",
"_wr... | 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) | [
"unset",
"a",
"configuration",
"value",
"Parameters",
"==========",
"name",
":",
"the",
"name",
"of",
"the",
"value",
"to",
"unset",
"(",
"remove",
"key",
"in",
"dictionary",
")",
"quiet",
":",
"disable",
"verbose",
"output",
"if",
"True",
"(",
"default",
... | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L290-L307 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.get_default_download_dir | 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... | python | 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",
")",
":",
"# 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... | 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 | [
"Get",
"the",
"download",
"path",
"for",
"a",
"file",
".",
"If",
"not",
"defined",
"return",
"default",
"from",
"config",
"."
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L321-L336 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.print_config_value | 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... | python | 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",
"=",
"': '",
")",
":",
"value_out",
"=",
"'None'",
"if",
"name",
"in",
"self",
".",
"config_values",
"and",
"self",
".",
"config_values",
"[",
"name",
"]... | 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 : ) | [
"print",
"a",
"single",
"configuration",
"value",
"based",
"on",
"a",
"prefix",
"and",
"separator"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L338-L351 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.print_config_values | 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... | python | 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",
"=",
"'- '",
")",
":",
"print",
"(",
"'Configuration values from '",
"+",
"self",
".",
"config_dir",
")",
"self",
".",
"print_config_value",
"(",
"self",
".",
"CONFIG_NAME_USER",
",",
"prefix",
"=",
"pr... | 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 "- " | [
"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",
"-"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L353-L364 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.competitions_list | 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... | python | 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",
")",
":",
"valid_groups",
"=",
"[",
"'general'",
",",
"'entered'",
",",
... | 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, ... | [
"make",
"call",
"to",
"list",
"competitions",
"format",
"the",
"response",
"and",
"return",
"a",
"list",
"of",
"Competition",
"instances"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L369-L415 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.competitions_list_cli | def competitions_list_cli(self,
group=None,
category=None,
sort_by=None,
page=1,
search=None,
csv_display=False):
""" a wrapper for ... | python | 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",
")",
":",
"competitions",
"=",
"self... | 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)
... | [
"a",
"wrapper",
"for",
"competitions_list",
"for",
"the",
"client",
"."
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L417-L451 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.competition_submit | 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... | python | 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",
")",
":",
"if",
"competition",
"is",
"None",
":",
"competition",
"=",
"self",
".",
"get_config_value",
"(",
"self",
".",
"CONFIG_NAME_... | 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) | [
"submit",
"a",
"competition!"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L453-L507 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.competition_submit_cli | def competition_submit_cli(self,
file_name,
message,
competition,
competition_opt=None,
quiet=False):
""" submit a competition using the client. Arguments ar... | python | 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",
")",
":",
"competition",
"=",
"competition",
"or",
"competition_opt",
"try",
":",
"submit_result"... | 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 | [
"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... | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L509-L533 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.competition_submissions | 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... | python | 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",
")",
":",
"submissions_result",
"=",
"self",
".",
"process_response",
"(",
"self",
".",
"competitions_submissions_list_with_http_info",
"(",
"id",
"=",
"competition",
")",
")",
"return",
"[",
"Submis... | get the list of Submission for a particular competition
Parameters
==========
competition: the name of the competition | [
"get",
"the",
"list",
"of",
"Submission",
"for",
"a",
"particular",
"competition"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L535-L544 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.competition_submissions_cli | def competition_submissions_cli(self,
competition=None,
competition_opt=None,
csv_display=False,
quiet=False):
""" wrapper to competition_submission, will return either... | python | 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",
")",
":",
"competition",
"=",
"competition",
"or",
"competition_opt",
"if",
"... | 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... | [
"wrapper",
"to",
"competition_submission",
"will",
"return",
"either",
"json",
"or",
"csv",
"to",
"the",
"user",
".",
"Additional",
"parameters",
"are",
"listed",
"below",
"see",
"competition_submissions",
"for",
"rest",
"."
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L546-L582 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.competition_list_files | 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... | python | 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",
")",
":",
"competition_list_files_result",
"=",
"self",
".",
"process_response",
"(",
"self",
".",
"competitions_data_list_files_with_http_info",
"(",
"id",
"=",
"competition",
")",
")",
"return",
"[",
... | list files for competition
Parameters
==========
competition: the name of the competition | [
"list",
"files",
"for",
"competition",
"Parameters",
"==========",
"competition",
":",
"the",
"name",
"of",
"the",
"competition"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L584-L592 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.competition_list_files_cli | def competition_list_files_cli(self,
competition,
competition_opt=None,
csv_display=False,
quiet=False):
""" List files for a competition, if it exists
Paramet... | python | 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",
")",
":",
"competition",
"=",
"competition",
"or",
"competition_opt",
"if",
"competition",
"i... | 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
... | [
"List",
"files",
"for",
"a",
"competition",
"if",
"it",
"exists"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L594-L625 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.competition_download_file | def competition_download_file(self,
competition,
file_name,
path=None,
force=False,
quiet=False):
""" download a competition file to a designa... | python | 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",
")",
":",
"if",
"path",
"is",
"None",
":",
"effective_path",
"=",
"self",
".",
"get_d... | 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... | [
"download",
"a",
"competition",
"file",
"to",
"a",
"designated",
"location",
"or",
"use",
"a",
"default",
"location"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L627-L657 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.competition_download_files | def competition_download_files(self,
competition,
path=None,
force=False,
quiet=True):
""" a wrapper to competition_download_file to download all competition
fi... | python | 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",
")",
":",
"files",
"=",
"self",
".",
"competition_list_files",
"(",
"competition",
")",
"if",
"not",
"fil... | 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)
... | [
"a",
"wrapper",
"to",
"competition_download_file",
"to",
"download",
"all",
"competition",
"files",
"."
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L659-L679 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.competition_download_cli | def competition_download_cli(self,
competition,
competition_opt=None,
file_name=None,
path=None,
force=False,
quiet=False)... | python | 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",
")",
":",
"competition",
"=",
"competi... | 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... | [
"a",
"wrapper",
"to",
"competition_download_files",
"but",
"first",
"will",
"parse",
"input",
"from",
"API",
"client",
".",
"Additional",
"parameters",
"are",
"listed",
"here",
"see",
"competition_download",
"for",
"remaining",
"."
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L681-L715 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.competition_leaderboard_download | 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... | python | 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",
")",
":",
"response",
"=",
"self",
".",
"process_response",
"(",
"self",
".",
"competition_download_leaderboard_with_http_info",
"(",
"competition",
"... | 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) | [
"Download",
"competition",
"leaderboards"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L717-L738 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.competition_leaderboard_view | 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... | python | 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",
")",
":",
"result",
"=",
"self",
".",
"process_response",
"(",
"self",
".",
"competition_view_leaderboard_with_http_info",
"(",
"competition",
")",
")",
"return",
"[",
"LeaderboardEntry",
"(",
"... | view a leaderboard based on a competition name
Parameters
==========
competition: the competition name to view leadboard for | [
"view",
"a",
"leaderboard",
"based",
"on",
"a",
"competition",
"name"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L740-L749 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.competition_leaderboard_cli | def competition_leaderboard_cli(self,
competition,
competition_opt=None,
path=None,
view=False,
download=False,
... | python | 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",
",",
"csv_display",
"=",
"False",
",",
"quiet",
"=",
"False",
")... | 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
... | [
"a",
"wrapper",
"for",
"competition_leaderbord_view",
"that",
"will",
"print",
"the",
"results",
"as",
"a",
"table",
"or",
"comma",
"separated",
"values"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L751-L796 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.dataset_list | def dataset_list(self,
sort_by=None,
size=None,
file_type=None,
license_name=None,
tag_ids=None,
search=None,
user=None,
mine=False,
... | python | 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"... | 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... | [
"return",
"a",
"list",
"of",
"datasets!"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L798-L864 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.dataset_list_cli | def dataset_list_cli(self,
sort_by=None,
size=None,
file_type=None,
license_name=None,
tag_ids=None,
search=None,
user=None,
... | python | 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",
",",
"m... | 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... | [
"a",
"wrapper",
"to",
"datasets_list",
"for",
"the",
"client",
".",
"Additional",
"parameters",
"are",
"described",
"here",
"see",
"dataset_list",
"for",
"others",
"."
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L866-L902 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.dataset_view | 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... | python | 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",
")",
":",
"if",
"'/'",
"in",
"dataset",
":",
"self",
".",
"validate_dataset_string",
"(",
"dataset",
")",
"dataset_urls",
"=",
"dataset",
".",
"split",
"(",
"'/'",
")",
"owner_slug",
"=",
"dataset_urls",
... | view metadata for a dataset.
Parameters
==========
dataset: the string identified of the dataset
should be in format [owner]/[dataset-name] | [
"view",
"metadata",
"for",
"a",
"dataset",
"."
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L904-L923 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.dataset_list_files | 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... | python | 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",
")",
":",
"if",
"dataset",
"is",
"None",
":",
"raise",
"ValueError",
"(",
"'A dataset must be specified'",
")",
"if",
"'/'",
"in",
"dataset",
":",
"self",
".",
"validate_dataset_string",
"(",
"dataset",
... | list files for a dataset
Parameters
==========
dataset: the string identified of the dataset
should be in format [owner]/[dataset-name] | [
"list",
"files",
"for",
"a",
"dataset",
"Parameters",
"==========",
"dataset",
":",
"the",
"string",
"identified",
"of",
"the",
"dataset",
"should",
"be",
"in",
"format",
"[",
"owner",
"]",
"/",
"[",
"dataset",
"-",
"name",
"]"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L969-L989 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.dataset_list_files_cli | 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
==========
... | python | 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",
")",
":",
"dataset",
"=",
"dataset",
"or",
"dataset_opt",
"result",
"=",
"self",
".",
"dataset_list_files",
"(",
"dataset",
")",
... | 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... | [
"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... | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L991-L1016 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.dataset_status | 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... | python | 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",
")",
":",
"if",
"dataset",
"is",
"None",
":",
"raise",
"ValueError",
"(",
"'A dataset must be specified'",
")",
"if",
"'/'",
"in",
"dataset",
":",
"self",
".",
"validate_dataset_string",
"(",
"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] | [
"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",
"... | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1018-L1038 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.dataset_status_cli | 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 = ... | python | 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",
")",
":",
"dataset",
"=",
"dataset",
"or",
"dataset_opt",
"return",
"self",
".",
"dataset_status",
"(",
"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 | [
"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"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1040-L1048 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.dataset_download_file | def dataset_download_file(self,
dataset,
file_name,
path=None,
force=False,
quiet=True):
""" download a single file for a dataset
Parameters
... | python | 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",
")",
":",
"if",
"'/'",
"in",
"dataset",
":",
"self",
".",
"validate_dataset_string",
"(",
"dat... | 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
... | [
"download",
"a",
"single",
"file",
"for",
"a",
"dataset"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1050-L1094 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.dataset_download_files | def dataset_download_files(self,
dataset,
path=None,
force=False,
quiet=True,
unzip=False):
""" download all files for a dataset
Parameters
... | python | 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",
")",
":",
"if",
"dataset",
"is",
"None",
":",
"raise",
"ValueError",
"(",
"'A dat... | 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... | [
"download",
"all",
"files",
"for",
"a",
"dataset"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1096-L1157 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.dataset_download_cli | def dataset_download_cli(self,
dataset,
dataset_opt=None,
file_name=None,
path=None,
unzip=False,
force=False,
quiet=... | python | 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",
"=",
"False",
")",
":",
"dataset... | 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... | [
"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",
")"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1159-L1189 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.dataset_upload_file | 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... | python | 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",
")",
":",
"file_name",
"=",
"os",
".",
"path",
".",
"basename",
"(",
"path",
")",
"content_length",
"=",
"os",
".",
"path",
".",
"getsize",
"(",
"path",
")",
"last_modified_date_utc",
... | upload a dataset file
Parameters
==========
path: the complete path to upload
quiet: suppress verbose output (default is False) | [
"upload",
"a",
"dataset",
"file"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1191-L1211 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.dataset_create_version | def dataset_create_version(self,
folder,
version_notes,
quiet=False,
convert_to_csv=True,
delete_old_versions=False,
dir_mode='skip'):... | python | 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'",
")",
":",
"if",
"not",
"os",
".",
"... | 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... | [
"create",
"a",
"version",
"of",
"a",
"dataset"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1213-L1285 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.dataset_create_version_cli | def dataset_create_version_cli(self,
folder,
version_notes,
quiet=False,
convert_to_csv=True,
delete_old_versions=False,
... | python | 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",
",",
"dir_mode",
"=",
"'skip'",
")",
":",
"folder",
"=",
"folder",
... | 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... | [
"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",... | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1287-L1322 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.dataset_initialize | 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... | python | 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",
")",
":",
"if",
"not",
"os",
".",
"path",
".",
"isdir",
"(",
"folder",
")",
":",
"raise",
"ValueError",
"(",
"'Invalid folder: '",
"+",
"folder",
")",
"ref",
"=",
"self",
".",
"config_values",
"[",... | initialize a folder with a a dataset configuration (metadata) file
Parameters
==========
folder: the folder to initialize the metadata file in | [
"initialize",
"a",
"folder",
"with",
"a",
"a",
"dataset",
"configuration",
"(",
"metadata",
")",
"file"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1324-L1349 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.dataset_create_new | 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
... | python | 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'",
")",
":",
"if",
"not",
"os",
".",
"path",
".",
"isdir",
"(",
"folder",... | 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... | [
"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... | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1355-L1433 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.dataset_create_new_cli | 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... | python | 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'",
")",
":",
"folder",
"=",
"folder",
"or",
"os",
".",
"... | 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 ... | [
"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"... | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1435-L1464 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.download_file | 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... | python | 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",
")",
":",
"outpath",
"=",
"os",
".",
"path",
".",
"dirname",
"(",
"outfile",
")",
"if",
"not",
"os",
".",
"path",
".",... | 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 | [
"download",
"a",
"file",
"to",
"an",
"output",
"file",
"based",
"on",
"a",
"chunk",
"size"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1466-L1500 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.kernels_list | def kernels_list(self,
page=1,
page_size=20,
dataset=None,
competition=None,
parent_kernel=None,
search=None,
mine=False,
user=None,
... | python | 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... | 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,... | [
"list",
"kernels",
"based",
"on",
"a",
"set",
"of",
"search",
"criteria"
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1502-L1590 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.kernels_list_cli | def kernels_list_cli(self,
mine=False,
page=1,
page_size=20,
search=None,
csv_display=False,
parent=None,
competition=None,
... | python | 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",
",",
"da... | 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 | [
"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... | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1592-L1632 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.kernels_initialize | 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... | python | 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",
")",
":",
"if",
"not",
"os",
".",
"path",
".",
"isdir",
"(",
"folder",
")",
":",
"raise",
"ValueError",
"(",
"'Invalid folder: '",
"+",
"folder",
")",
"resources",
"=",
"[",
"]",
"resource",
"=",
... | 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 | [
"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... | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1634-L1666 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.kernels_initialize_cli | 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... | python | 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",
")",
":",
"folder",
"=",
"folder",
"or",
"os",
".",
"getcwd",
"(",
")",
"meta_file",
"=",
"self",
".",
"kernels_initialize",
"(",
"folder",
")",
"print",
"(",
"'Kernel metadata templat... | 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}) | [
"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",... | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1668-L1678 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.kernels_push | 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)... | python | 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",
")",
":",
"if",
"not",
"os",
".",
"path",
".",
"isdir",
"(",
"folder",
")",
":",
"raise",
"ValueError",
"(",
"'Invalid folder: '",
"+",
"folder",
")",
"meta_file",
"=",
"os",
".",
"path",
".",
"join",
... | 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 | [
"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"... | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1680-L1788 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.kernels_push_cli | 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:
... | python | 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",
")",
":",
"folder",
"=",
"folder",
"or",
"os",
".",
"getcwd",
"(",
")",
"result",
"=",
"self",
".",
"kernels_push",
"(",
"folder",
")",
"if",
"result",
"is",
"None",
":",
"print",
"(",
"'Kernel pus... | client wrapper for kernels_push, with same arguments. | [
"client",
"wrapper",
"for",
"kernels_push",
"with",
"same",
"arguments",
"."
] | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1790-L1827 | train |
Kaggle/kaggle-api | kaggle/api/kaggle_api_extended.py | KaggleApi.kernels_pull | 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... | python | 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",
")",
":",
"existing_metadata",
"=",
"None",
"if",
"kernel",
"is",
"None",
":",
"if",
"path",
"is",
"None",
":",
"existing_metadata_p... | 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
... | [
"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",
":",... | 65f14b1386470c5784d4753e491478e7537660d9 | https://github.com/Kaggle/kaggle-api/blob/65f14b1386470c5784d4753e491478e7537660d9/kaggle/api/kaggle_api_extended.py#L1829-L1963 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.