partition stringclasses 3
values | func_name stringlengths 1 134 | docstring stringlengths 1 46.9k | path stringlengths 4 223 | original_string stringlengths 75 104k | code stringlengths 75 104k | docstring_tokens listlengths 1 1.97k | repo stringlengths 7 55 | language stringclasses 1
value | url stringlengths 87 315 | code_tokens listlengths 19 28.4k | sha stringlengths 40 40 |
|---|---|---|---|---|---|---|---|---|---|---|---|
valid | Text.appendtext | Append string sequence.
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type ob... | atomac/ldtpd/text.py | def appendtext(self, window_name, object_name, data):
"""
Append string sequence.
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either fu... | def appendtext(self, window_name, object_name, data):
"""
Append string sequence.
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either fu... | [
"Append",
"string",
"sequence",
".",
"@param",
"window_name",
":",
"Window",
"name",
"to",
"type",
"in",
"either",
"full",
"name",
"LDTP",
"s",
"name",
"convention",
"or",
"a",
"Unix",
"glob",
".",
"@type",
"window_name",
":",
"string",
"@param",
"object_nam... | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/text.py#L272-L292 | [
"def",
"appendtext",
"(",
"self",
",",
"window_name",
",",
"object_name",
",",
"data",
")",
":",
"object_handle",
"=",
"self",
".",
"_get_object_handle",
"(",
"window_name",
",",
"object_name",
")",
"if",
"not",
"object_handle",
".",
"AXEnabled",
":",
"raise",... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | Text.getcursorposition | Get cursor position
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type object... | atomac/ldtpd/text.py | def getcursorposition(self, window_name, object_name):
"""
Get cursor position
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full ... | def getcursorposition(self, window_name, object_name):
"""
Get cursor position
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full ... | [
"Get",
"cursor",
"position",
"@param",
"window_name",
":",
"Window",
"name",
"to",
"type",
"in",
"either",
"full",
"name",
"LDTP",
"s",
"name",
"convention",
"or",
"a",
"Unix",
"glob",
".",
"@type",
"window_name",
":",
"string",
"@param",
"object_name",
":",... | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/text.py#L294-L311 | [
"def",
"getcursorposition",
"(",
"self",
",",
"window_name",
",",
"object_name",
")",
":",
"object_handle",
"=",
"self",
".",
"_get_object_handle",
"(",
"window_name",
",",
"object_name",
")",
"if",
"not",
"object_handle",
".",
"AXEnabled",
":",
"raise",
"LdtpSe... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | Text.setcursorposition | Set cursor position
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type object... | atomac/ldtpd/text.py | def setcursorposition(self, window_name, object_name, cursor_position):
"""
Set cursor position
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type... | def setcursorposition(self, window_name, object_name, cursor_position):
"""
Set cursor position
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type... | [
"Set",
"cursor",
"position",
"@param",
"window_name",
":",
"Window",
"name",
"to",
"type",
"in",
"either",
"full",
"name",
"LDTP",
"s",
"name",
"convention",
"or",
"a",
"Unix",
"glob",
".",
"@type",
"window_name",
":",
"string",
"@param",
"object_name",
":",... | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/text.py#L313-L333 | [
"def",
"setcursorposition",
"(",
"self",
",",
"window_name",
",",
"object_name",
",",
"cursor_position",
")",
":",
"object_handle",
"=",
"self",
".",
"_get_object_handle",
"(",
"window_name",
",",
"object_name",
")",
"if",
"not",
"object_handle",
".",
"AXEnabled",... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | Text.cuttext | cut text from start position to end position
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix gl... | atomac/ldtpd/text.py | def cuttext(self, window_name, object_name, start_position, end_position=-1):
"""
cut text from start position to end position
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param o... | def cuttext(self, window_name, object_name, start_position, end_position=-1):
"""
cut text from start position to end position
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param o... | [
"cut",
"text",
"from",
"start",
"position",
"to",
"end",
"position",
"@param",
"window_name",
":",
"Window",
"name",
"to",
"type",
"in",
"either",
"full",
"name",
"LDTP",
"s",
"name",
"convention",
"or",
"a",
"Unix",
"glob",
".",
"@type",
"window_name",
":... | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/text.py#L335-L365 | [
"def",
"cuttext",
"(",
"self",
",",
"window_name",
",",
"object_name",
",",
"start_position",
",",
"end_position",
"=",
"-",
"1",
")",
":",
"object_handle",
"=",
"self",
".",
"_get_object_handle",
"(",
"window_name",
",",
"object_name",
")",
"if",
"not",
"ob... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | Text.deletetext | delete text from start position to end position
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix... | atomac/ldtpd/text.py | def deletetext(self, window_name, object_name, start_position, end_position=-1):
"""
delete text from start position to end position
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@p... | def deletetext(self, window_name, object_name, start_position, end_position=-1):
"""
delete text from start position to end position
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@p... | [
"delete",
"text",
"from",
"start",
"position",
"to",
"end",
"position",
"@param",
"window_name",
":",
"Window",
"name",
"to",
"type",
"in",
"either",
"full",
"name",
"LDTP",
"s",
"name",
"convention",
"or",
"a",
"Unix",
"glob",
".",
"@type",
"window_name",
... | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/text.py#L398-L427 | [
"def",
"deletetext",
"(",
"self",
",",
"window_name",
",",
"object_name",
",",
"start_position",
",",
"end_position",
"=",
"-",
"1",
")",
":",
"object_handle",
"=",
"self",
".",
"_get_object_handle",
"(",
"window_name",
",",
"object_name",
")",
"if",
"not",
... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | Text.pastetext | paste text from start position to end position
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix ... | atomac/ldtpd/text.py | def pastetext(self, window_name, object_name, position=0):
"""
paste text from start position to end position
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Objec... | def pastetext(self, window_name, object_name, position=0):
"""
paste text from start position to end position
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Objec... | [
"paste",
"text",
"from",
"start",
"position",
"to",
"end",
"position",
"@param",
"window_name",
":",
"Window",
"name",
"to",
"type",
"in",
"either",
"full",
"name",
"LDTP",
"s",
"name",
"convention",
"or",
"a",
"Unix",
"glob",
".",
"@type",
"window_name",
... | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/text.py#L429-L456 | [
"def",
"pastetext",
"(",
"self",
",",
"window_name",
",",
"object_name",
",",
"position",
"=",
"0",
")",
":",
"object_handle",
"=",
"self",
".",
"_get_object_handle",
"(",
"window_name",
",",
"object_name",
")",
"if",
"not",
"object_handle",
".",
"AXEnabled",
... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | main | Main entry point. Parse command line options and start up a server. | atomac/ldtpd/__init__.py | def main(port=4118, parentpid=None):
"""Main entry point. Parse command line options and start up a server."""
if "LDTP_DEBUG" in os.environ:
_ldtp_debug = True
else:
_ldtp_debug = False
_ldtp_debug_file = os.environ.get('LDTP_DEBUG_FILE', None)
if _ldtp_debug:
print("Parent ... | def main(port=4118, parentpid=None):
"""Main entry point. Parse command line options and start up a server."""
if "LDTP_DEBUG" in os.environ:
_ldtp_debug = True
else:
_ldtp_debug = False
_ldtp_debug_file = os.environ.get('LDTP_DEBUG_FILE', None)
if _ldtp_debug:
print("Parent ... | [
"Main",
"entry",
"point",
".",
"Parse",
"command",
"line",
"options",
"and",
"start",
"up",
"a",
"server",
"."
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/__init__.py#L65-L94 | [
"def",
"main",
"(",
"port",
"=",
"4118",
",",
"parentpid",
"=",
"None",
")",
":",
"if",
"\"LDTP_DEBUG\"",
"in",
"os",
".",
"environ",
":",
"_ldtp_debug",
"=",
"True",
"else",
":",
"_ldtp_debug",
"=",
"False",
"_ldtp_debug_file",
"=",
"os",
".",
"environ"... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | LDTPServer.server_bind | Server Bind. Forces reuse of port. | atomac/ldtpd/__init__.py | def server_bind(self, *args, **kwargs):
'''Server Bind. Forces reuse of port.'''
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
# Can't use super() here since SimpleXMLRPCServer is an old-style class
SimpleXMLRPCServer.server_bind(self, *args, **kwargs) | def server_bind(self, *args, **kwargs):
'''Server Bind. Forces reuse of port.'''
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
# Can't use super() here since SimpleXMLRPCServer is an old-style class
SimpleXMLRPCServer.server_bind(self, *args, **kwargs) | [
"Server",
"Bind",
".",
"Forces",
"reuse",
"of",
"port",
"."
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/__init__.py#L53-L57 | [
"def",
"server_bind",
"(",
"self",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"self",
".",
"socket",
".",
"setsockopt",
"(",
"socket",
".",
"SOL_SOCKET",
",",
"socket",
".",
"SO_REUSEADDR",
",",
"1",
")",
"# Can't use super() here since SimpleXMLRP... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | ooldtp.log | Logs the message in the root logger with the log level
@param message: Message to be logged
@type message: string
@param level: Log level, defaul DEBUG
@type level: integer
@return: 1 on success and 0 on error
@rtype: integer | atomac/ooldtp/__init__.py | def log(self, message, level=logging.DEBUG):
"""
Logs the message in the root logger with the log level
@param message: Message to be logged
@type message: string
@param level: Log level, defaul DEBUG
@type level: integer
@return: 1 on success and 0 on error
... | def log(self, message, level=logging.DEBUG):
"""
Logs the message in the root logger with the log level
@param message: Message to be logged
@type message: string
@param level: Log level, defaul DEBUG
@type level: integer
@return: 1 on success and 0 on error
... | [
"Logs",
"the",
"message",
"in",
"the",
"root",
"logger",
"with",
"the",
"log",
"level"
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ooldtp/__init__.py#L322-L336 | [
"def",
"log",
"(",
"self",
",",
"message",
",",
"level",
"=",
"logging",
".",
"DEBUG",
")",
":",
"if",
"_ldtp_debug",
":",
"print",
"(",
"message",
")",
"self",
".",
"logger",
".",
"log",
"(",
"level",
",",
"str",
"(",
"message",
")",
")",
"return"... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | ooldtp.stoplog | Stop logging.
@return: 1 on success and 0 on error
@rtype: integer | atomac/ooldtp/__init__.py | def stoplog(self):
""" Stop logging.
@return: 1 on success and 0 on error
@rtype: integer
"""
if self._file_logger:
self.logger.removeHandler(_file_logger)
self._file_logger = None
return 1 | def stoplog(self):
""" Stop logging.
@return: 1 on success and 0 on error
@rtype: integer
"""
if self._file_logger:
self.logger.removeHandler(_file_logger)
self._file_logger = None
return 1 | [
"Stop",
"logging",
"."
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ooldtp/__init__.py#L375-L384 | [
"def",
"stoplog",
"(",
"self",
")",
":",
"if",
"self",
".",
"_file_logger",
":",
"self",
".",
"logger",
".",
"removeHandler",
"(",
"_file_logger",
")",
"self",
".",
"_file_logger",
"=",
"None",
"return",
"1"
] | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | ooldtp.imagecapture | Captures screenshot of the whole desktop or given window
@param window_name: Window name to look for, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param x: x co-ordinate value
@type x: integer
@param y: y co-ordinate value
... | atomac/ooldtp/__init__.py | def imagecapture(self, window_name=None, out_file=None, x=0, y=0,
width=None, height=None):
"""
Captures screenshot of the whole desktop or given window
@param window_name: Window name to look for, either full name,
LDTP's name convention, or a Unix glob.
@t... | def imagecapture(self, window_name=None, out_file=None, x=0, y=0,
width=None, height=None):
"""
Captures screenshot of the whole desktop or given window
@param window_name: Window name to look for, either full name,
LDTP's name convention, or a Unix glob.
@t... | [
"Captures",
"screenshot",
"of",
"the",
"whole",
"desktop",
"or",
"given",
"window"
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ooldtp/__init__.py#L406-L444 | [
"def",
"imagecapture",
"(",
"self",
",",
"window_name",
"=",
"None",
",",
"out_file",
"=",
"None",
",",
"x",
"=",
"0",
",",
"y",
"=",
"0",
",",
"width",
"=",
"None",
",",
"height",
"=",
"None",
")",
":",
"if",
"not",
"out_file",
":",
"out_file",
... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | ooldtp.onwindowcreate | On window create, call the function with given arguments
@param window_name: Window name to look for, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param fn_name: Callback function
@type fn_name: function
@param *args: arguments to ... | atomac/ooldtp/__init__.py | def onwindowcreate(self, window_name, fn_name, *args):
"""
On window create, call the function with given arguments
@param window_name: Window name to look for, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param fn_name: Callback f... | def onwindowcreate(self, window_name, fn_name, *args):
"""
On window create, call the function with given arguments
@param window_name: Window name to look for, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param fn_name: Callback f... | [
"On",
"window",
"create",
"call",
"the",
"function",
"with",
"given",
"arguments"
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ooldtp/__init__.py#L518-L534 | [
"def",
"onwindowcreate",
"(",
"self",
",",
"window_name",
",",
"fn_name",
",",
"*",
"args",
")",
":",
"self",
".",
"_pollEvents",
".",
"_callback",
"[",
"window_name",
"]",
"=",
"[",
"\"onwindowcreate\"",
",",
"fn_name",
",",
"args",
"]",
"return",
"self",... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | ooldtp.registerevent | Register at-spi event
@param event_name: Event name in at-spi format.
@type event_name: string
@param fn_name: Callback function
@type fn_name: function
@param *args: arguments to be passed to the callback function
@type *args: var args
@return: 1 if registratio... | atomac/ooldtp/__init__.py | def registerevent(self, event_name, fn_name, *args):
"""
Register at-spi event
@param event_name: Event name in at-spi format.
@type event_name: string
@param fn_name: Callback function
@type fn_name: function
@param *args: arguments to be passed to the callback ... | def registerevent(self, event_name, fn_name, *args):
"""
Register at-spi event
@param event_name: Event name in at-spi format.
@type event_name: string
@param fn_name: Callback function
@type fn_name: function
@param *args: arguments to be passed to the callback ... | [
"Register",
"at",
"-",
"spi",
"event"
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ooldtp/__init__.py#L551-L568 | [
"def",
"registerevent",
"(",
"self",
",",
"event_name",
",",
"fn_name",
",",
"*",
"args",
")",
":",
"if",
"not",
"isinstance",
"(",
"event_name",
",",
"str",
")",
":",
"raise",
"ValueError",
"(",
"\"event_name should be string\"",
")",
"self",
".",
"_pollEve... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | ooldtp.deregisterevent | Remove callback of registered event
@param event_name: Event name in at-spi format.
@type event_name: string
@return: 1 if registration was successful, 0 if not.
@rtype: integer | atomac/ooldtp/__init__.py | def deregisterevent(self, event_name):
"""
Remove callback of registered event
@param event_name: Event name in at-spi format.
@type event_name: string
@return: 1 if registration was successful, 0 if not.
@rtype: integer
"""
if event_name in self._pollE... | def deregisterevent(self, event_name):
"""
Remove callback of registered event
@param event_name: Event name in at-spi format.
@type event_name: string
@return: 1 if registration was successful, 0 if not.
@rtype: integer
"""
if event_name in self._pollE... | [
"Remove",
"callback",
"of",
"registered",
"event"
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ooldtp/__init__.py#L570-L583 | [
"def",
"deregisterevent",
"(",
"self",
",",
"event_name",
")",
":",
"if",
"event_name",
"in",
"self",
".",
"_pollEvents",
".",
"_callback",
":",
"del",
"self",
".",
"_pollEvents",
".",
"_callback",
"[",
"event_name",
"]",
"return",
"self",
".",
"_remote_dere... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | ooldtp.registerkbevent | Register keystroke events
@param keys: key to listen
@type keys: string
@param modifiers: control / alt combination using gtk MODIFIERS
@type modifiers: int
@param fn_name: Callback function
@type fn_name: function
@param *args: arguments to be passed to the call... | atomac/ooldtp/__init__.py | def registerkbevent(self, keys, modifiers, fn_name, *args):
"""
Register keystroke events
@param keys: key to listen
@type keys: string
@param modifiers: control / alt combination using gtk MODIFIERS
@type modifiers: int
@param fn_name: Callback function
... | def registerkbevent(self, keys, modifiers, fn_name, *args):
"""
Register keystroke events
@param keys: key to listen
@type keys: string
@param modifiers: control / alt combination using gtk MODIFIERS
@type modifiers: int
@param fn_name: Callback function
... | [
"Register",
"keystroke",
"events"
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ooldtp/__init__.py#L585-L603 | [
"def",
"registerkbevent",
"(",
"self",
",",
"keys",
",",
"modifiers",
",",
"fn_name",
",",
"*",
"args",
")",
":",
"event_name",
"=",
"\"kbevent%s%s\"",
"%",
"(",
"keys",
",",
"modifiers",
")",
"self",
".",
"_pollEvents",
".",
"_callback",
"[",
"event_name"... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | ooldtp.deregisterkbevent | Remove callback of registered event
@param keys: key to listen
@type keys: string
@param modifiers: control / alt combination using gtk MODIFIERS
@type modifiers: int
@return: 1 if registration was successful, 0 if not.
@rtype: integer | atomac/ooldtp/__init__.py | def deregisterkbevent(self, keys, modifiers):
"""
Remove callback of registered event
@param keys: key to listen
@type keys: string
@param modifiers: control / alt combination using gtk MODIFIERS
@type modifiers: int
@return: 1 if registration was successful, 0 ... | def deregisterkbevent(self, keys, modifiers):
"""
Remove callback of registered event
@param keys: key to listen
@type keys: string
@param modifiers: control / alt combination using gtk MODIFIERS
@type modifiers: int
@return: 1 if registration was successful, 0 ... | [
"Remove",
"callback",
"of",
"registered",
"event"
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ooldtp/__init__.py#L605-L621 | [
"def",
"deregisterkbevent",
"(",
"self",
",",
"keys",
",",
"modifiers",
")",
":",
"event_name",
"=",
"\"kbevent%s%s\"",
"%",
"(",
"keys",
",",
"modifiers",
")",
"if",
"event_name",
"in",
"_pollEvents",
".",
"_callback",
":",
"del",
"_pollEvents",
".",
"_call... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | ooldtp.windowuptime | Get window uptime
@param window_name: Window name to look for, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@return: "starttime, endtime" as datetime python object | atomac/ooldtp/__init__.py | def windowuptime(self, window_name):
"""
Get window uptime
@param window_name: Window name to look for, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@return: "starttime, endtime" as datetime python object
"""
tm... | def windowuptime(self, window_name):
"""
Get window uptime
@param window_name: Window name to look for, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@return: "starttime, endtime" as datetime python object
"""
tm... | [
"Get",
"window",
"uptime"
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ooldtp/__init__.py#L623-L645 | [
"def",
"windowuptime",
"(",
"self",
",",
"window_name",
")",
":",
"tmp_time",
"=",
"self",
".",
"_remote_windowuptime",
"(",
"window_name",
")",
"if",
"tmp_time",
":",
"tmp_time",
"=",
"tmp_time",
".",
"split",
"(",
"'-'",
")",
"start_time",
"=",
"tmp_time",... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | Value.verifyscrollbarvertical | Verify scrollbar is vertical
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type object... | atomac/ldtpd/value.py | def verifyscrollbarvertical(self, window_name, object_name):
"""
Verify scrollbar is vertical
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, eithe... | def verifyscrollbarvertical(self, window_name, object_name):
"""
Verify scrollbar is vertical
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, eithe... | [
"Verify",
"scrollbar",
"is",
"vertical"
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/value.py#L30-L50 | [
"def",
"verifyscrollbarvertical",
"(",
"self",
",",
"window_name",
",",
"object_name",
")",
":",
"try",
":",
"object_handle",
"=",
"self",
".",
"_get_object_handle",
"(",
"window_name",
",",
"object_name",
")",
"if",
"object_handle",
".",
"AXOrientation",
"==",
... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | Value.verifyscrollbarhorizontal | Verify scrollbar is horizontal
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type obje... | atomac/ldtpd/value.py | def verifyscrollbarhorizontal(self, window_name, object_name):
"""
Verify scrollbar is horizontal
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, e... | def verifyscrollbarhorizontal(self, window_name, object_name):
"""
Verify scrollbar is horizontal
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, e... | [
"Verify",
"scrollbar",
"is",
"horizontal"
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/value.py#L52-L72 | [
"def",
"verifyscrollbarhorizontal",
"(",
"self",
",",
"window_name",
",",
"object_name",
")",
":",
"try",
":",
"object_handle",
"=",
"self",
".",
"_get_object_handle",
"(",
"window_name",
",",
"object_name",
")",
"if",
"object_handle",
".",
"AXOrientation",
"==",
... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | Value.setmax | Set max value
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type object_name: string
... | atomac/ldtpd/value.py | def setmax(self, window_name, object_name):
"""
Set max value
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name... | def setmax(self, window_name, object_name):
"""
Set max value
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name... | [
"Set",
"max",
"value"
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/value.py#L74-L90 | [
"def",
"setmax",
"(",
"self",
",",
"window_name",
",",
"object_name",
")",
":",
"object_handle",
"=",
"self",
".",
"_get_object_handle",
"(",
"window_name",
",",
"object_name",
")",
"object_handle",
".",
"AXValue",
"=",
"1",
"return",
"1"
] | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | Value.setmin | Set min value
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type object_name: string
... | atomac/ldtpd/value.py | def setmin(self, window_name, object_name):
"""
Set min value
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name... | def setmin(self, window_name, object_name):
"""
Set min value
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name... | [
"Set",
"min",
"value"
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/value.py#L92-L108 | [
"def",
"setmin",
"(",
"self",
",",
"window_name",
",",
"object_name",
")",
":",
"object_handle",
"=",
"self",
".",
"_get_object_handle",
"(",
"window_name",
",",
"object_name",
")",
"object_handle",
".",
"AXValue",
"=",
"0",
"return",
"1"
] | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | Value.scrollup | Scroll up
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type object_name: string
... | atomac/ldtpd/value.py | def scrollup(self, window_name, object_name):
"""
Scroll up
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name c... | def scrollup(self, window_name, object_name):
"""
Scroll up
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name c... | [
"Scroll",
"up"
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/value.py#L110-L126 | [
"def",
"scrollup",
"(",
"self",
",",
"window_name",
",",
"object_name",
")",
":",
"if",
"not",
"self",
".",
"verifyscrollbarvertical",
"(",
"window_name",
",",
"object_name",
")",
":",
"raise",
"LdtpServerException",
"(",
"'Object not vertical scrollbar'",
")",
"r... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | Value.scrolldown | Scroll down
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type object_name: string
... | atomac/ldtpd/value.py | def scrolldown(self, window_name, object_name):
"""
Scroll down
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's na... | def scrolldown(self, window_name, object_name):
"""
Scroll down
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's na... | [
"Scroll",
"down"
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/value.py#L128-L144 | [
"def",
"scrolldown",
"(",
"self",
",",
"window_name",
",",
"object_name",
")",
":",
"if",
"not",
"self",
".",
"verifyscrollbarvertical",
"(",
"window_name",
",",
"object_name",
")",
":",
"raise",
"LdtpServerException",
"(",
"'Object not vertical scrollbar'",
")",
... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | Value.scrollleft | Scroll left
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type object_name: string
... | atomac/ldtpd/value.py | def scrollleft(self, window_name, object_name):
"""
Scroll left
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's na... | def scrollleft(self, window_name, object_name):
"""
Scroll left
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's na... | [
"Scroll",
"left"
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/value.py#L146-L162 | [
"def",
"scrollleft",
"(",
"self",
",",
"window_name",
",",
"object_name",
")",
":",
"if",
"not",
"self",
".",
"verifyscrollbarhorizontal",
"(",
"window_name",
",",
"object_name",
")",
":",
"raise",
"LdtpServerException",
"(",
"'Object not horizontal scrollbar'",
")"... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | Value.scrollright | Scroll right
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type object_name: string
... | atomac/ldtpd/value.py | def scrollright(self, window_name, object_name):
"""
Scroll right
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's ... | def scrollright(self, window_name, object_name):
"""
Scroll right
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's ... | [
"Scroll",
"right"
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/value.py#L164-L180 | [
"def",
"scrollright",
"(",
"self",
",",
"window_name",
",",
"object_name",
")",
":",
"if",
"not",
"self",
".",
"verifyscrollbarhorizontal",
"(",
"window_name",
",",
"object_name",
")",
":",
"raise",
"LdtpServerException",
"(",
"'Object not horizontal scrollbar'",
")... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | Value.onedown | Press scrollbar down with number of iterations
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
... | atomac/ldtpd/value.py | def onedown(self, window_name, object_name, iterations):
"""
Press scrollbar down with number of iterations
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to ... | def onedown(self, window_name, object_name, iterations):
"""
Press scrollbar down with number of iterations
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to ... | [
"Press",
"scrollbar",
"down",
"with",
"number",
"of",
"iterations"
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/value.py#L182-L214 | [
"def",
"onedown",
"(",
"self",
",",
"window_name",
",",
"object_name",
",",
"iterations",
")",
":",
"if",
"not",
"self",
".",
"verifyscrollbarvertical",
"(",
"window_name",
",",
"object_name",
")",
":",
"raise",
"LdtpServerException",
"(",
"'Object not vertical sc... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | Value.oneup | Press scrollbar up with number of iterations
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
... | atomac/ldtpd/value.py | def oneup(self, window_name, object_name, iterations):
"""
Press scrollbar up with number of iterations
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type... | def oneup(self, window_name, object_name, iterations):
"""
Press scrollbar up with number of iterations
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type... | [
"Press",
"scrollbar",
"up",
"with",
"number",
"of",
"iterations"
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/value.py#L216-L248 | [
"def",
"oneup",
"(",
"self",
",",
"window_name",
",",
"object_name",
",",
"iterations",
")",
":",
"if",
"not",
"self",
".",
"verifyscrollbarvertical",
"(",
"window_name",
",",
"object_name",
")",
":",
"raise",
"LdtpServerException",
"(",
"'Object not vertical scro... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | Value.oneright | Press scrollbar right with number of iterations
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
... | atomac/ldtpd/value.py | def oneright(self, window_name, object_name, iterations):
"""
Press scrollbar right with number of iterations
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name t... | def oneright(self, window_name, object_name, iterations):
"""
Press scrollbar right with number of iterations
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name t... | [
"Press",
"scrollbar",
"right",
"with",
"number",
"of",
"iterations"
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/value.py#L250-L282 | [
"def",
"oneright",
"(",
"self",
",",
"window_name",
",",
"object_name",
",",
"iterations",
")",
":",
"if",
"not",
"self",
".",
"verifyscrollbarhorizontal",
"(",
"window_name",
",",
"object_name",
")",
":",
"raise",
"LdtpServerException",
"(",
"'Object not horizont... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | Value.oneleft | Press scrollbar left with number of iterations
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
... | atomac/ldtpd/value.py | def oneleft(self, window_name, object_name, iterations):
"""
Press scrollbar left with number of iterations
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to ... | def oneleft(self, window_name, object_name, iterations):
"""
Press scrollbar left with number of iterations
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to ... | [
"Press",
"scrollbar",
"left",
"with",
"number",
"of",
"iterations"
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/value.py#L284-L316 | [
"def",
"oneleft",
"(",
"self",
",",
"window_name",
",",
"object_name",
",",
"iterations",
")",
":",
"if",
"not",
"self",
".",
"verifyscrollbarhorizontal",
"(",
"window_name",
",",
"object_name",
")",
":",
"raise",
"LdtpServerException",
"(",
"'Object not horizonta... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | PageTabList.selecttab | Select tab based on name.
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type ... | atomac/ldtpd/page_tab_list.py | def selecttab(self, window_name, object_name, tab_name):
"""
Select tab based on name.
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, eith... | def selecttab(self, window_name, object_name, tab_name):
"""
Select tab based on name.
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, eith... | [
"Select",
"tab",
"based",
"on",
"name",
".",
"@param",
"window_name",
":",
"Window",
"name",
"to",
"type",
"in",
"either",
"full",
"name",
"LDTP",
"s",
"name",
"convention",
"or",
"a",
"Unix",
"glob",
".",
"@type",
"window_name",
":",
"string",
"@param",
... | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/page_tab_list.py#L53-L71 | [
"def",
"selecttab",
"(",
"self",
",",
"window_name",
",",
"object_name",
",",
"tab_name",
")",
":",
"tab_handle",
"=",
"self",
".",
"_get_tab_handle",
"(",
"window_name",
",",
"object_name",
",",
"tab_name",
")",
"tab_handle",
".",
"Press",
"(",
")",
"return... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | PageTabList.selecttabindex | Select tab based on index.
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type... | atomac/ldtpd/page_tab_list.py | def selecttabindex(self, window_name, object_name, tab_index):
"""
Select tab based on index.
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type i... | def selecttabindex(self, window_name, object_name, tab_index):
"""
Select tab based on index.
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type i... | [
"Select",
"tab",
"based",
"on",
"index",
".",
"@param",
"window_name",
":",
"Window",
"name",
"to",
"type",
"in",
"either",
"full",
"name",
"LDTP",
"s",
"name",
"convention",
"or",
"a",
"Unix",
"glob",
".",
"@type",
"window_name",
":",
"string",
"@param",
... | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/page_tab_list.py#L73-L97 | [
"def",
"selecttabindex",
"(",
"self",
",",
"window_name",
",",
"object_name",
",",
"tab_index",
")",
":",
"children",
"=",
"self",
".",
"_get_tab_children",
"(",
"window_name",
",",
"object_name",
")",
"length",
"=",
"len",
"(",
"children",
")",
"if",
"tab_i... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | PageTabList.verifytabname | Verify tab name.
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type object_na... | atomac/ldtpd/page_tab_list.py | def verifytabname(self, window_name, object_name, tab_name):
"""
Verify tab name.
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either fu... | def verifytabname(self, window_name, object_name, tab_name):
"""
Verify tab name.
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either fu... | [
"Verify",
"tab",
"name",
".",
"@param",
"window_name",
":",
"Window",
"name",
"to",
"type",
"in",
"either",
"full",
"name",
"LDTP",
"s",
"name",
"convention",
"or",
"a",
"Unix",
"glob",
".",
"@type",
"window_name",
":",
"string",
"@param",
"object_name",
"... | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/page_tab_list.py#L99-L121 | [
"def",
"verifytabname",
"(",
"self",
",",
"window_name",
",",
"object_name",
",",
"tab_name",
")",
":",
"try",
":",
"tab_handle",
"=",
"self",
".",
"_get_tab_handle",
"(",
"window_name",
",",
"object_name",
",",
"tab_name",
")",
"if",
"tab_handle",
".",
"AXV... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | PageTabList.gettabcount | Get tab count.
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type object_name... | atomac/ldtpd/page_tab_list.py | def gettabcount(self, window_name, object_name):
"""
Get tab count.
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
... | def gettabcount(self, window_name, object_name):
"""
Get tab count.
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
... | [
"Get",
"tab",
"count",
".",
"@param",
"window_name",
":",
"Window",
"name",
"to",
"type",
"in",
"either",
"full",
"name",
"LDTP",
"s",
"name",
"convention",
"or",
"a",
"Unix",
"glob",
".",
"@type",
"window_name",
":",
"string",
"@param",
"object_name",
":"... | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/page_tab_list.py#L123-L138 | [
"def",
"gettabcount",
"(",
"self",
",",
"window_name",
",",
"object_name",
")",
":",
"children",
"=",
"self",
".",
"_get_tab_children",
"(",
"window_name",
",",
"object_name",
")",
"return",
"len",
"(",
"children",
")"
] | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | PageTabList.gettabname | Get tab name
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type object_name: ... | atomac/ldtpd/page_tab_list.py | def gettabname(self, window_name, object_name, tab_index):
"""
Get tab name
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full nam... | def gettabname(self, window_name, object_name, tab_index):
"""
Get tab name
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full nam... | [
"Get",
"tab",
"name",
"@param",
"window_name",
":",
"Window",
"name",
"to",
"type",
"in",
"either",
"full",
"name",
"LDTP",
"s",
"name",
"convention",
"or",
"a",
"Unix",
"glob",
".",
"@type",
"window_name",
":",
"string",
"@param",
"object_name",
":",
"Obj... | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/page_tab_list.py#L140-L163 | [
"def",
"gettabname",
"(",
"self",
",",
"window_name",
",",
"object_name",
",",
"tab_index",
")",
":",
"children",
"=",
"self",
".",
"_get_tab_children",
"(",
"window_name",
",",
"object_name",
")",
"length",
"=",
"len",
"(",
"children",
")",
"if",
"tab_index... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | Mouse.mouseleftclick | Mouse left click on an object.
@param window_name: Window name to look for, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to look for, either full name,
LDTP's name convention, or a Unix glob. Or menu ... | atomac/ldtpd/mouse.py | def mouseleftclick(self, window_name, object_name):
"""
Mouse left click on an object.
@param window_name: Window name to look for, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to look for, ei... | def mouseleftclick(self, window_name, object_name):
"""
Mouse left click on an object.
@param window_name: Window name to look for, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to look for, ei... | [
"Mouse",
"left",
"click",
"on",
"an",
"object",
".",
"@param",
"window_name",
":",
"Window",
"name",
"to",
"look",
"for",
"either",
"full",
"name",
"LDTP",
"s",
"name",
"convention",
"or",
"a",
"Unix",
"glob",
".",
"@type",
"window_name",
":",
"string",
... | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/mouse.py#L73-L94 | [
"def",
"mouseleftclick",
"(",
"self",
",",
"window_name",
",",
"object_name",
")",
":",
"object_handle",
"=",
"self",
".",
"_get_object_handle",
"(",
"window_name",
",",
"object_name",
")",
"if",
"not",
"object_handle",
".",
"AXEnabled",
":",
"raise",
"LdtpServe... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | Mouse.mouserightclick | Mouse right click on an object.
@param window_name: Window name to look for, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to look for, either full name,
LDTP's name convention, or a Unix glob. Or menu... | atomac/ldtpd/mouse.py | def mouserightclick(self, window_name, object_name):
"""
Mouse right click on an object.
@param window_name: Window name to look for, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to look for, ... | def mouserightclick(self, window_name, object_name):
"""
Mouse right click on an object.
@param window_name: Window name to look for, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to look for, ... | [
"Mouse",
"right",
"click",
"on",
"an",
"object",
".",
"@param",
"window_name",
":",
"Window",
"name",
"to",
"look",
"for",
"either",
"full",
"name",
"LDTP",
"s",
"name",
"convention",
"or",
"a",
"Unix",
"glob",
".",
"@type",
"window_name",
":",
"string",
... | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/mouse.py#L96-L117 | [
"def",
"mouserightclick",
"(",
"self",
",",
"window_name",
",",
"object_name",
")",
":",
"object_handle",
"=",
"self",
".",
"_get_object_handle",
"(",
"window_name",
",",
"object_name",
")",
"if",
"not",
"object_handle",
".",
"AXEnabled",
":",
"raise",
"LdtpServ... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | Mouse.generatemouseevent | Generate mouse event on x, y co-ordinates.
@param x: X co-ordinate
@type x: int
@param y: Y co-ordinate
@type y: int
@param eventType: Mouse click type
@type eventType: str
@param drag_button_override: Any drag_xxx value
Only relevant for ... | atomac/ldtpd/mouse.py | def generatemouseevent(self, x, y, eventType="b1c",
drag_button_override='drag_default_button'):
"""
Generate mouse event on x, y co-ordinates.
@param x: X co-ordinate
@type x: int
@param y: Y co-ordinate
@type y: int
@param eve... | def generatemouseevent(self, x, y, eventType="b1c",
drag_button_override='drag_default_button'):
"""
Generate mouse event on x, y co-ordinates.
@param x: X co-ordinate
@type x: int
@param y: Y co-ordinate
@type y: int
@param eve... | [
"Generate",
"mouse",
"event",
"on",
"x",
"y",
"co",
"-",
"ordinates",
".",
"@param",
"x",
":",
"X",
"co",
"-",
"ordinate",
"@type",
"x",
":",
"int",
"@param",
"y",
":",
"Y",
"co",
"-",
"ordinate",
"@type",
"y",
":",
"int",
"@param",
"eventType",
":... | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/mouse.py#L119-L203 | [
"def",
"generatemouseevent",
"(",
"self",
",",
"x",
",",
"y",
",",
"eventType",
"=",
"\"b1c\"",
",",
"drag_button_override",
"=",
"'drag_default_button'",
")",
":",
"if",
"drag_button_override",
"not",
"in",
"mouse_click_override",
":",
"raise",
"ValueError",
"(",... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | Mouse.doubleclick | Double click on the object
@param window_name: Window name to look for, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to look for, either full name,
LDTP's name convention, or a Unix glob. Or menu heir... | atomac/ldtpd/mouse.py | def doubleclick(self, window_name, object_name):
"""
Double click on the object
@param window_name: Window name to look for, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to look for, either fu... | def doubleclick(self, window_name, object_name):
"""
Double click on the object
@param window_name: Window name to look for, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to look for, either fu... | [
"Double",
"click",
"on",
"the",
"object",
"@param",
"window_name",
":",
"Window",
"name",
"to",
"look",
"for",
"either",
"full",
"name",
"LDTP",
"s",
"name",
"convention",
"or",
"a",
"Unix",
"glob",
".",
"@type",
"window_name",
":",
"string",
"@param",
"ob... | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/mouse.py#L221-L244 | [
"def",
"doubleclick",
"(",
"self",
",",
"window_name",
",",
"object_name",
")",
":",
"object_handle",
"=",
"self",
".",
"_get_object_handle",
"(",
"window_name",
",",
"object_name",
")",
"if",
"not",
"object_handle",
".",
"AXEnabled",
":",
"raise",
"LdtpServerEx... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | ComboBox.selectitem | Select combo box / layered pane item
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
... | atomac/ldtpd/combo_box.py | def selectitem(self, window_name, object_name, item_name):
"""
Select combo box / layered pane item
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to ... | def selectitem(self, window_name, object_name, item_name):
"""
Select combo box / layered pane item
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to ... | [
"Select",
"combo",
"box",
"/",
"layered",
"pane",
"item",
"@param",
"window_name",
":",
"Window",
"name",
"to",
"type",
"in",
"either",
"full",
"name",
"LDTP",
"s",
"name",
"convention",
"or",
"a",
"Unix",
"glob",
".",
"@type",
"window_name",
":",
"string"... | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/combo_box.py#L31-L83 | [
"def",
"selectitem",
"(",
"self",
",",
"window_name",
",",
"object_name",
",",
"item_name",
")",
":",
"object_handle",
"=",
"self",
".",
"_get_object_handle",
"(",
"window_name",
",",
"object_name",
")",
"if",
"not",
"object_handle",
".",
"AXEnabled",
":",
"ra... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | ComboBox.selectindex | Select combo box item / layered pane based on index
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a ... | atomac/ldtpd/combo_box.py | def selectindex(self, window_name, object_name, item_index):
"""
Select combo box item / layered pane based on index
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name... | def selectindex(self, window_name, object_name, item_index):
"""
Select combo box item / layered pane based on index
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name... | [
"Select",
"combo",
"box",
"item",
"/",
"layered",
"pane",
"based",
"on",
"index",
"@param",
"window_name",
":",
"Window",
"name",
"to",
"type",
"in",
"either",
"full",
"name",
"LDTP",
"s",
"name",
"convention",
"or",
"a",
"Unix",
"glob",
".",
"@type",
"w... | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/combo_box.py#L89-L173 | [
"def",
"selectindex",
"(",
"self",
",",
"window_name",
",",
"object_name",
",",
"item_index",
")",
":",
"object_handle",
"=",
"self",
".",
"_get_object_handle",
"(",
"window_name",
",",
"object_name",
")",
"if",
"not",
"object_handle",
".",
"AXEnabled",
":",
"... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | ComboBox.getallitem | Get all combo box item
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type object_name... | atomac/ldtpd/combo_box.py | def getallitem(self, window_name, object_name):
"""
Get all combo box item
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
... | def getallitem(self, window_name, object_name):
"""
Get all combo box item
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
... | [
"Get",
"all",
"combo",
"box",
"item"
] | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/combo_box.py#L179-L219 | [
"def",
"getallitem",
"(",
"self",
",",
"window_name",
",",
"object_name",
")",
":",
"object_handle",
"=",
"self",
".",
"_get_object_handle",
"(",
"window_name",
",",
"object_name",
")",
"if",
"not",
"object_handle",
".",
"AXEnabled",
":",
"raise",
"LdtpServerExc... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | ComboBox.showlist | Show combo box list / menu
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type... | atomac/ldtpd/combo_box.py | def showlist(self, window_name, object_name):
"""
Show combo box list / menu
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full na... | def showlist(self, window_name, object_name):
"""
Show combo box list / menu
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full na... | [
"Show",
"combo",
"box",
"list",
"/",
"menu",
"@param",
"window_name",
":",
"Window",
"name",
"to",
"type",
"in",
"either",
"full",
"name",
"LDTP",
"s",
"name",
"convention",
"or",
"a",
"Unix",
"glob",
".",
"@type",
"window_name",
":",
"string",
"@param",
... | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/combo_box.py#L221-L239 | [
"def",
"showlist",
"(",
"self",
",",
"window_name",
",",
"object_name",
")",
":",
"object_handle",
"=",
"self",
".",
"_get_object_handle",
"(",
"window_name",
",",
"object_name",
")",
"if",
"not",
"object_handle",
".",
"AXEnabled",
":",
"raise",
"LdtpServerExcep... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | ComboBox.hidelist | Hide combo box list / menu
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type... | atomac/ldtpd/combo_box.py | def hidelist(self, window_name, object_name):
"""
Hide combo box list / menu
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full na... | def hidelist(self, window_name, object_name):
"""
Hide combo box list / menu
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full na... | [
"Hide",
"combo",
"box",
"list",
"/",
"menu",
"@param",
"window_name",
":",
"Window",
"name",
"to",
"type",
"in",
"either",
"full",
"name",
"LDTP",
"s",
"name",
"convention",
"or",
"a",
"Unix",
"glob",
".",
"@type",
"window_name",
":",
"string",
"@param",
... | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/combo_box.py#L241-L258 | [
"def",
"hidelist",
"(",
"self",
",",
"window_name",
",",
"object_name",
")",
":",
"object_handle",
"=",
"self",
".",
"_get_object_handle",
"(",
"window_name",
",",
"object_name",
")",
"object_handle",
".",
"activate",
"(",
")",
"object_handle",
".",
"sendKey",
... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | ComboBox.verifydropdown | Verify drop down list / menu poped up
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
... | atomac/ldtpd/combo_box.py | def verifydropdown(self, window_name, object_name):
"""
Verify drop down list / menu poped up
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type i... | def verifydropdown(self, window_name, object_name):
"""
Verify drop down list / menu poped up
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type i... | [
"Verify",
"drop",
"down",
"list",
"/",
"menu",
"poped",
"up",
"@param",
"window_name",
":",
"Window",
"name",
"to",
"type",
"in",
"either",
"full",
"name",
"LDTP",
"s",
"name",
"convention",
"or",
"a",
"Unix",
"glob",
".",
"@type",
"window_name",
":",
"s... | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/combo_box.py#L260-L284 | [
"def",
"verifydropdown",
"(",
"self",
",",
"window_name",
",",
"object_name",
")",
":",
"try",
":",
"object_handle",
"=",
"self",
".",
"_get_object_handle",
"(",
"window_name",
",",
"object_name",
")",
"if",
"not",
"object_handle",
".",
"AXEnabled",
"or",
"not... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | ComboBox.verifyselect | Verify the item selected in combo box
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
... | atomac/ldtpd/combo_box.py | def verifyselect(self, window_name, object_name, item_name):
"""
Verify the item selected in combo box
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name ... | def verifyselect(self, window_name, object_name, item_name):
"""
Verify the item selected in combo box
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name ... | [
"Verify",
"the",
"item",
"selected",
"in",
"combo",
"box",
"@param",
"window_name",
":",
"Window",
"name",
"to",
"type",
"in",
"either",
"full",
"name",
"LDTP",
"s",
"name",
"convention",
"or",
"a",
"Unix",
"glob",
".",
"@type",
"window_name",
":",
"string... | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/combo_box.py#L331-L360 | [
"def",
"verifyselect",
"(",
"self",
",",
"window_name",
",",
"object_name",
",",
"item_name",
")",
":",
"try",
":",
"object_handle",
"=",
"self",
".",
"_get_object_handle",
"(",
"window_name",
",",
"object_name",
")",
"if",
"not",
"object_handle",
".",
"AXEnab... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | ComboBox.getcombovalue | Get current selected combobox value
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, either full name,
LDTP's name convention, or a Unix glob.
... | atomac/ldtpd/combo_box.py | def getcombovalue(self, window_name, object_name):
"""
Get current selected combobox value
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, ... | def getcombovalue(self, window_name, object_name):
"""
Get current selected combobox value
@param window_name: Window name to type in, either full name,
LDTP's name convention, or a Unix glob.
@type window_name: string
@param object_name: Object name to type in, ... | [
"Get",
"current",
"selected",
"combobox",
"value",
"@param",
"window_name",
":",
"Window",
"name",
"to",
"type",
"in",
"either",
"full",
"name",
"LDTP",
"s",
"name",
"convention",
"or",
"a",
"Unix",
"glob",
".",
"@type",
"window_name",
":",
"string",
"@param... | alex-kostirin/pyatomac | python | https://github.com/alex-kostirin/pyatomac/blob/3f46f6feb4504315eec07abb18bb41be4d257aeb/atomac/ldtpd/combo_box.py#L362-L379 | [
"def",
"getcombovalue",
"(",
"self",
",",
"window_name",
",",
"object_name",
")",
":",
"object_handle",
"=",
"self",
".",
"_get_object_handle",
"(",
"window_name",
",",
"object_name",
")",
"if",
"not",
"object_handle",
".",
"AXEnabled",
":",
"raise",
"LdtpServer... | 3f46f6feb4504315eec07abb18bb41be4d257aeb |
valid | MobileClientWrapper.login | Authenticate the gmusicapi Mobileclient instance.
Parameters:
username (Optional[str]): Your Google Music username. Will be prompted if not given.
password (Optional[str]): Your Google Music password. Will be prompted if not given.
android_id (Optional[str]): The 16 hex digits from an Android device ID.
... | gmusicapi_wrapper/mobileclient.py | def login(self, username=None, password=None, android_id=None):
"""Authenticate the gmusicapi Mobileclient instance.
Parameters:
username (Optional[str]): Your Google Music username. Will be prompted if not given.
password (Optional[str]): Your Google Music password. Will be prompted if not given.
andro... | def login(self, username=None, password=None, android_id=None):
"""Authenticate the gmusicapi Mobileclient instance.
Parameters:
username (Optional[str]): Your Google Music username. Will be prompted if not given.
password (Optional[str]): Your Google Music password. Will be prompted if not given.
andro... | [
"Authenticate",
"the",
"gmusicapi",
"Mobileclient",
"instance",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/mobileclient.py#L29-L67 | [
"def",
"login",
"(",
"self",
",",
"username",
"=",
"None",
",",
"password",
"=",
"None",
",",
"android_id",
"=",
"None",
")",
":",
"cls_name",
"=",
"type",
"(",
"self",
")",
".",
"__name__",
"if",
"username",
"is",
"None",
":",
"username",
"=",
"inpu... | 8708683cd33955def1378fc28319ef37805b851d |
valid | MobileClientWrapper.get_google_songs | Create song list from user's Google Music library.
Parameters:
include_filters (list): A list of ``(field, pattern)`` tuples.
Fields are any valid Google Music metadata field available to the Mobileclient client.
Patterns are Python regex patterns.
Google Music songs are filtered out if the given meta... | gmusicapi_wrapper/mobileclient.py | def get_google_songs(self, include_filters=None, exclude_filters=None, all_includes=False, all_excludes=False):
"""Create song list from user's Google Music library.
Parameters:
include_filters (list): A list of ``(field, pattern)`` tuples.
Fields are any valid Google Music metadata field available to the M... | def get_google_songs(self, include_filters=None, exclude_filters=None, all_includes=False, all_excludes=False):
"""Create song list from user's Google Music library.
Parameters:
include_filters (list): A list of ``(field, pattern)`` tuples.
Fields are any valid Google Music metadata field available to the M... | [
"Create",
"song",
"list",
"from",
"user",
"s",
"Google",
"Music",
"library",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/mobileclient.py#L88-L123 | [
"def",
"get_google_songs",
"(",
"self",
",",
"include_filters",
"=",
"None",
",",
"exclude_filters",
"=",
"None",
",",
"all_includes",
"=",
"False",
",",
"all_excludes",
"=",
"False",
")",
":",
"logger",
".",
"info",
"(",
"\"Loading Google Music songs...\"",
")"... | 8708683cd33955def1378fc28319ef37805b851d |
valid | MobileClientWrapper.get_google_playlist | Get playlist information of a user-generated Google Music playlist.
Parameters:
playlist (str): Name or ID of Google Music playlist. Names are case-sensitive.
Google allows multiple playlists with the same name.
If multiple playlists have the same name, the first one encountered is used.
Returns:
di... | gmusicapi_wrapper/mobileclient.py | def get_google_playlist(self, playlist):
"""Get playlist information of a user-generated Google Music playlist.
Parameters:
playlist (str): Name or ID of Google Music playlist. Names are case-sensitive.
Google allows multiple playlists with the same name.
If multiple playlists have the same name, the fi... | def get_google_playlist(self, playlist):
"""Get playlist information of a user-generated Google Music playlist.
Parameters:
playlist (str): Name or ID of Google Music playlist. Names are case-sensitive.
Google allows multiple playlists with the same name.
If multiple playlists have the same name, the fi... | [
"Get",
"playlist",
"information",
"of",
"a",
"user",
"-",
"generated",
"Google",
"Music",
"playlist",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/mobileclient.py#L125-L144 | [
"def",
"get_google_playlist",
"(",
"self",
",",
"playlist",
")",
":",
"logger",
".",
"info",
"(",
"\"Loading playlist {0}\"",
".",
"format",
"(",
"playlist",
")",
")",
"for",
"google_playlist",
"in",
"self",
".",
"api",
".",
"get_all_user_playlist_contents",
"("... | 8708683cd33955def1378fc28319ef37805b851d |
valid | MobileClientWrapper.get_google_playlist_songs | Create song list from a user-generated Google Music playlist.
Parameters:
playlist (str): Name or ID of Google Music playlist. Names are case-sensitive.
Google allows multiple playlists with the same name.
If multiple playlists have the same name, the first one encountered is used.
include_filters (li... | gmusicapi_wrapper/mobileclient.py | def get_google_playlist_songs(self, playlist, include_filters=None, exclude_filters=None, all_includes=False, all_excludes=False):
"""Create song list from a user-generated Google Music playlist.
Parameters:
playlist (str): Name or ID of Google Music playlist. Names are case-sensitive.
Google allows multipl... | def get_google_playlist_songs(self, playlist, include_filters=None, exclude_filters=None, all_includes=False, all_excludes=False):
"""Create song list from a user-generated Google Music playlist.
Parameters:
playlist (str): Name or ID of Google Music playlist. Names are case-sensitive.
Google allows multipl... | [
"Create",
"song",
"list",
"from",
"a",
"user",
"-",
"generated",
"Google",
"Music",
"playlist",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/mobileclient.py#L146-L191 | [
"def",
"get_google_playlist_songs",
"(",
"self",
",",
"playlist",
",",
"include_filters",
"=",
"None",
",",
"exclude_filters",
"=",
"None",
",",
"all_includes",
"=",
"False",
",",
"all_excludes",
"=",
"False",
")",
":",
"logger",
".",
"info",
"(",
"\"Loading G... | 8708683cd33955def1378fc28319ef37805b851d |
valid | cast_to_list | Cast the positional argument at given position into a list if not already a list. | gmusicapi_wrapper/decorators.py | def cast_to_list(position):
"""Cast the positional argument at given position into a list if not already a list."""
@wrapt.decorator
def wrapper(function, instance, args, kwargs):
if not isinstance(args[position], list):
args = list(args)
args[position] = [args[position]]
args = tuple(args)
return fun... | def cast_to_list(position):
"""Cast the positional argument at given position into a list if not already a list."""
@wrapt.decorator
def wrapper(function, instance, args, kwargs):
if not isinstance(args[position], list):
args = list(args)
args[position] = [args[position]]
args = tuple(args)
return fun... | [
"Cast",
"the",
"positional",
"argument",
"at",
"given",
"position",
"into",
"a",
"list",
"if",
"not",
"already",
"a",
"list",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/decorators.py#L12-L24 | [
"def",
"cast_to_list",
"(",
"position",
")",
":",
"@",
"wrapt",
".",
"decorator",
"def",
"wrapper",
"(",
"function",
",",
"instance",
",",
"args",
",",
"kwargs",
")",
":",
"if",
"not",
"isinstance",
"(",
"args",
"[",
"position",
"]",
",",
"list",
")",
... | 8708683cd33955def1378fc28319ef37805b851d |
valid | _pybossa_req | Send a JSON request.
Returns True if everything went well, otherwise it returns the status
code of the response. | pbclient/__init__.py | def _pybossa_req(method, domain, id=None, payload=None, params={},
headers={'content-type': 'application/json'},
files=None):
"""
Send a JSON request.
Returns True if everything went well, otherwise it returns the status
code of the response.
"""
url = _opts['e... | def _pybossa_req(method, domain, id=None, payload=None, params={},
headers={'content-type': 'application/json'},
files=None):
"""
Send a JSON request.
Returns True if everything went well, otherwise it returns the status
code of the response.
"""
url = _opts['e... | [
"Send",
"a",
"JSON",
"request",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L32-L66 | [
"def",
"_pybossa_req",
"(",
"method",
",",
"domain",
",",
"id",
"=",
"None",
",",
"payload",
"=",
"None",
",",
"params",
"=",
"{",
"}",
",",
"headers",
"=",
"{",
"'content-type'",
":",
"'application/json'",
"}",
",",
"files",
"=",
"None",
")",
":",
"... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | get_projects | Return a list of registered projects.
:param limit: Number of returned items, default 100
:type limit: integer
:param offset: Offset for the query, default 0
:type offset: integer
:param last_id: id of the last project, used for pagination. If provided, offset is ignored
:type last_id: integer
... | pbclient/__init__.py | def get_projects(limit=100, offset=0, last_id=None):
"""Return a list of registered projects.
:param limit: Number of returned items, default 100
:type limit: integer
:param offset: Offset for the query, default 0
:type offset: integer
:param last_id: id of the last project, used for pagination... | def get_projects(limit=100, offset=0, last_id=None):
"""Return a list of registered projects.
:param limit: Number of returned items, default 100
:type limit: integer
:param offset: Offset for the query, default 0
:type offset: integer
:param last_id: id of the last project, used for pagination... | [
"Return",
"a",
"list",
"of",
"registered",
"projects",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L170-L196 | [
"def",
"get_projects",
"(",
"limit",
"=",
"100",
",",
"offset",
"=",
"0",
",",
"last_id",
"=",
"None",
")",
":",
"if",
"last_id",
"is",
"not",
"None",
":",
"params",
"=",
"dict",
"(",
"limit",
"=",
"limit",
",",
"last_id",
"=",
"last_id",
")",
"els... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | get_project | Return a PYBOSSA Project for the project_id.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:rtype: PYBOSSA Project
:returns: A PYBOSSA Project object | pbclient/__init__.py | def get_project(project_id):
"""Return a PYBOSSA Project for the project_id.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:rtype: PYBOSSA Project
:returns: A PYBOSSA Project object
"""
try:
res = _pybossa_req('get', 'project', project_id)
if res.get('id')... | def get_project(project_id):
"""Return a PYBOSSA Project for the project_id.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:rtype: PYBOSSA Project
:returns: A PYBOSSA Project object
"""
try:
res = _pybossa_req('get', 'project', project_id)
if res.get('id')... | [
"Return",
"a",
"PYBOSSA",
"Project",
"for",
"the",
"project_id",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L199-L215 | [
"def",
"get_project",
"(",
"project_id",
")",
":",
"try",
":",
"res",
"=",
"_pybossa_req",
"(",
"'get'",
",",
"'project'",
",",
"project_id",
")",
"if",
"res",
".",
"get",
"(",
"'id'",
")",
":",
"return",
"Project",
"(",
"res",
")",
"else",
":",
"ret... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | find_project | Return a list with matching project arguments.
:param kwargs: PYBOSSA Project members
:rtype: list
:returns: A list of projects that match the kwargs | pbclient/__init__.py | def find_project(**kwargs):
"""Return a list with matching project arguments.
:param kwargs: PYBOSSA Project members
:rtype: list
:returns: A list of projects that match the kwargs
"""
try:
res = _pybossa_req('get', 'project', params=kwargs)
if type(res).__name__ == 'list':
... | def find_project(**kwargs):
"""Return a list with matching project arguments.
:param kwargs: PYBOSSA Project members
:rtype: list
:returns: A list of projects that match the kwargs
"""
try:
res = _pybossa_req('get', 'project', params=kwargs)
if type(res).__name__ == 'list':
... | [
"Return",
"a",
"list",
"with",
"matching",
"project",
"arguments",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L218-L233 | [
"def",
"find_project",
"(",
"*",
"*",
"kwargs",
")",
":",
"try",
":",
"res",
"=",
"_pybossa_req",
"(",
"'get'",
",",
"'project'",
",",
"params",
"=",
"kwargs",
")",
"if",
"type",
"(",
"res",
")",
".",
"__name__",
"==",
"'list'",
":",
"return",
"[",
... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | create_project | Create a project.
:param name: PYBOSSA Project Name
:type name: string
:param short_name: PYBOSSA Project short name or slug
:type short_name: string
:param description: PYBOSSA Project description
:type decription: string
:returns: True -- the response status code | pbclient/__init__.py | def create_project(name, short_name, description):
"""Create a project.
:param name: PYBOSSA Project Name
:type name: string
:param short_name: PYBOSSA Project short name or slug
:type short_name: string
:param description: PYBOSSA Project description
:type decription: string
:returns: ... | def create_project(name, short_name, description):
"""Create a project.
:param name: PYBOSSA Project Name
:type name: string
:param short_name: PYBOSSA Project short name or slug
:type short_name: string
:param description: PYBOSSA Project description
:type decription: string
:returns: ... | [
"Create",
"a",
"project",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L236-L257 | [
"def",
"create_project",
"(",
"name",
",",
"short_name",
",",
"description",
")",
":",
"try",
":",
"project",
"=",
"dict",
"(",
"name",
"=",
"name",
",",
"short_name",
"=",
"short_name",
",",
"description",
"=",
"description",
")",
"res",
"=",
"_pybossa_re... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | update_project | Update a project instance.
:param project: PYBOSSA project
:type project: PYBOSSA Project
:returns: True -- the response status code | pbclient/__init__.py | def update_project(project):
"""Update a project instance.
:param project: PYBOSSA project
:type project: PYBOSSA Project
:returns: True -- the response status code
"""
try:
project_id = project.id
project = _forbidden_attributes(project)
res = _pybossa_req('put', 'proj... | def update_project(project):
"""Update a project instance.
:param project: PYBOSSA project
:type project: PYBOSSA Project
:returns: True -- the response status code
"""
try:
project_id = project.id
project = _forbidden_attributes(project)
res = _pybossa_req('put', 'proj... | [
"Update",
"a",
"project",
"instance",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L260-L277 | [
"def",
"update_project",
"(",
"project",
")",
":",
"try",
":",
"project_id",
"=",
"project",
".",
"id",
"project",
"=",
"_forbidden_attributes",
"(",
"project",
")",
"res",
"=",
"_pybossa_req",
"(",
"'put'",
",",
"'project'",
",",
"project_id",
",",
"payload... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | delete_project | Delete a Project with id = project_id.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:returns: True -- the response status code | pbclient/__init__.py | def delete_project(project_id):
"""Delete a Project with id = project_id.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:returns: True -- the response status code
"""
try:
res = _pybossa_req('delete', 'project', project_id)
if type(res).__name__ == 'bool':
... | def delete_project(project_id):
"""Delete a Project with id = project_id.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:returns: True -- the response status code
"""
try:
res = _pybossa_req('delete', 'project', project_id)
if type(res).__name__ == 'bool':
... | [
"Delete",
"a",
"Project",
"with",
"id",
"=",
"project_id",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L280-L295 | [
"def",
"delete_project",
"(",
"project_id",
")",
":",
"try",
":",
"res",
"=",
"_pybossa_req",
"(",
"'delete'",
",",
"'project'",
",",
"project_id",
")",
"if",
"type",
"(",
"res",
")",
".",
"__name__",
"==",
"'bool'",
":",
"return",
"True",
"else",
":",
... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | get_categories | Return a list of registered categories.
:param limit: Number of returned items, default 20
:type limit: integer
:param offset: Offset for the query, default 0
:type offset: integer
:param last_id: id of the last category, used for pagination. If provided, offset is ignored
:type last_id: intege... | pbclient/__init__.py | def get_categories(limit=20, offset=0, last_id=None):
"""Return a list of registered categories.
:param limit: Number of returned items, default 20
:type limit: integer
:param offset: Offset for the query, default 0
:type offset: integer
:param last_id: id of the last category, used for paginat... | def get_categories(limit=20, offset=0, last_id=None):
"""Return a list of registered categories.
:param limit: Number of returned items, default 20
:type limit: integer
:param offset: Offset for the query, default 0
:type offset: integer
:param last_id: id of the last category, used for paginat... | [
"Return",
"a",
"list",
"of",
"registered",
"categories",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L300-L326 | [
"def",
"get_categories",
"(",
"limit",
"=",
"20",
",",
"offset",
"=",
"0",
",",
"last_id",
"=",
"None",
")",
":",
"if",
"last_id",
"is",
"not",
"None",
":",
"params",
"=",
"dict",
"(",
"limit",
"=",
"limit",
",",
"last_id",
"=",
"last_id",
")",
"el... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | get_category | Return a PYBOSSA Category for the category_id.
:param category_id: PYBOSSA Category ID
:type category_id: integer
:rtype: PYBOSSA Category
:returns: A PYBOSSA Category object | pbclient/__init__.py | def get_category(category_id):
"""Return a PYBOSSA Category for the category_id.
:param category_id: PYBOSSA Category ID
:type category_id: integer
:rtype: PYBOSSA Category
:returns: A PYBOSSA Category object
"""
try:
res = _pybossa_req('get', 'category', category_id)
if re... | def get_category(category_id):
"""Return a PYBOSSA Category for the category_id.
:param category_id: PYBOSSA Category ID
:type category_id: integer
:rtype: PYBOSSA Category
:returns: A PYBOSSA Category object
"""
try:
res = _pybossa_req('get', 'category', category_id)
if re... | [
"Return",
"a",
"PYBOSSA",
"Category",
"for",
"the",
"category_id",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L329-L345 | [
"def",
"get_category",
"(",
"category_id",
")",
":",
"try",
":",
"res",
"=",
"_pybossa_req",
"(",
"'get'",
",",
"'category'",
",",
"category_id",
")",
"if",
"res",
".",
"get",
"(",
"'id'",
")",
":",
"return",
"Category",
"(",
"res",
")",
"else",
":",
... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | find_category | Return a list with matching Category arguments.
:param kwargs: PYBOSSA Category members
:rtype: list
:returns: A list of project that match the kwargs | pbclient/__init__.py | def find_category(**kwargs):
"""Return a list with matching Category arguments.
:param kwargs: PYBOSSA Category members
:rtype: list
:returns: A list of project that match the kwargs
"""
try:
res = _pybossa_req('get', 'category', params=kwargs)
if type(res).__name__ == 'list':
... | def find_category(**kwargs):
"""Return a list with matching Category arguments.
:param kwargs: PYBOSSA Category members
:rtype: list
:returns: A list of project that match the kwargs
"""
try:
res = _pybossa_req('get', 'category', params=kwargs)
if type(res).__name__ == 'list':
... | [
"Return",
"a",
"list",
"with",
"matching",
"Category",
"arguments",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L348-L363 | [
"def",
"find_category",
"(",
"*",
"*",
"kwargs",
")",
":",
"try",
":",
"res",
"=",
"_pybossa_req",
"(",
"'get'",
",",
"'category'",
",",
"params",
"=",
"kwargs",
")",
"if",
"type",
"(",
"res",
")",
".",
"__name__",
"==",
"'list'",
":",
"return",
"[",... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | create_category | Create a Category.
:param name: PYBOSSA Category Name
:type name: string
:param description: PYBOSSA Category description
:type decription: string
:returns: True -- the response status code | pbclient/__init__.py | def create_category(name, description):
"""Create a Category.
:param name: PYBOSSA Category Name
:type name: string
:param description: PYBOSSA Category description
:type decription: string
:returns: True -- the response status code
"""
try:
category = dict(name=name, short_name... | def create_category(name, description):
"""Create a Category.
:param name: PYBOSSA Category Name
:type name: string
:param description: PYBOSSA Category description
:type decription: string
:returns: True -- the response status code
"""
try:
category = dict(name=name, short_name... | [
"Create",
"a",
"Category",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L366-L384 | [
"def",
"create_category",
"(",
"name",
",",
"description",
")",
":",
"try",
":",
"category",
"=",
"dict",
"(",
"name",
"=",
"name",
",",
"short_name",
"=",
"name",
".",
"lower",
"(",
")",
".",
"replace",
"(",
"\" \"",
",",
"\"\"",
")",
",",
"descript... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | update_category | Update a Category instance.
:param category: PYBOSSA Category
:type category: PYBOSSA Category
:returns: True -- the response status code | pbclient/__init__.py | def update_category(category):
"""Update a Category instance.
:param category: PYBOSSA Category
:type category: PYBOSSA Category
:returns: True -- the response status code
"""
try:
res = _pybossa_req('put', 'category',
category.id, payload=category.data)
... | def update_category(category):
"""Update a Category instance.
:param category: PYBOSSA Category
:type category: PYBOSSA Category
:returns: True -- the response status code
"""
try:
res = _pybossa_req('put', 'category',
category.id, payload=category.data)
... | [
"Update",
"a",
"Category",
"instance",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L387-L403 | [
"def",
"update_category",
"(",
"category",
")",
":",
"try",
":",
"res",
"=",
"_pybossa_req",
"(",
"'put'",
",",
"'category'",
",",
"category",
".",
"id",
",",
"payload",
"=",
"category",
".",
"data",
")",
"if",
"res",
".",
"get",
"(",
"'id'",
")",
":... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | delete_category | Delete a Category with id = category_id.
:param category_id: PYBOSSA Category ID
:type category_id: integer
:returns: True -- the response status code | pbclient/__init__.py | def delete_category(category_id):
"""Delete a Category with id = category_id.
:param category_id: PYBOSSA Category ID
:type category_id: integer
:returns: True -- the response status code
"""
try:
res = _pybossa_req('delete', 'category', category_id)
if type(res).__name__ == 'b... | def delete_category(category_id):
"""Delete a Category with id = category_id.
:param category_id: PYBOSSA Category ID
:type category_id: integer
:returns: True -- the response status code
"""
try:
res = _pybossa_req('delete', 'category', category_id)
if type(res).__name__ == 'b... | [
"Delete",
"a",
"Category",
"with",
"id",
"=",
"category_id",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L406-L421 | [
"def",
"delete_category",
"(",
"category_id",
")",
":",
"try",
":",
"res",
"=",
"_pybossa_req",
"(",
"'delete'",
",",
"'category'",
",",
"category_id",
")",
"if",
"type",
"(",
"res",
")",
".",
"__name__",
"==",
"'bool'",
":",
"return",
"True",
"else",
":... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | get_tasks | Return a list of tasks for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param limit: Number of returned items, default 100
:type limit: integer
:param offset: Offset for the query, default 0
:param last_id: id of the last task, used for pagination. If pro... | pbclient/__init__.py | def get_tasks(project_id, limit=100, offset=0, last_id=None):
"""Return a list of tasks for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param limit: Number of returned items, default 100
:type limit: integer
:param offset: Offset for the query, default 0... | def get_tasks(project_id, limit=100, offset=0, last_id=None):
"""Return a list of tasks for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param limit: Number of returned items, default 100
:type limit: integer
:param offset: Offset for the query, default 0... | [
"Return",
"a",
"list",
"of",
"tasks",
"for",
"a",
"given",
"project",
"ID",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L426-L454 | [
"def",
"get_tasks",
"(",
"project_id",
",",
"limit",
"=",
"100",
",",
"offset",
"=",
"0",
",",
"last_id",
"=",
"None",
")",
":",
"if",
"last_id",
"is",
"not",
"None",
":",
"params",
"=",
"dict",
"(",
"limit",
"=",
"limit",
",",
"last_id",
"=",
"las... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | find_tasks | Return a list of matched tasks for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param kwargs: PYBOSSA Task members
:type info: dict
:rtype: list
:returns: A list of tasks that match the kwargs | pbclient/__init__.py | def find_tasks(project_id, **kwargs):
"""Return a list of matched tasks for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param kwargs: PYBOSSA Task members
:type info: dict
:rtype: list
:returns: A list of tasks that match the kwargs
"""
try:... | def find_tasks(project_id, **kwargs):
"""Return a list of matched tasks for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param kwargs: PYBOSSA Task members
:type info: dict
:rtype: list
:returns: A list of tasks that match the kwargs
"""
try:... | [
"Return",
"a",
"list",
"of",
"matched",
"tasks",
"for",
"a",
"given",
"project",
"ID",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L457-L476 | [
"def",
"find_tasks",
"(",
"project_id",
",",
"*",
"*",
"kwargs",
")",
":",
"try",
":",
"kwargs",
"[",
"'project_id'",
"]",
"=",
"project_id",
"res",
"=",
"_pybossa_req",
"(",
"'get'",
",",
"'task'",
",",
"params",
"=",
"kwargs",
")",
"if",
"type",
"(",... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | create_task | Create a task for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param info: PYBOSSA Project info JSON field
:type info: dict
:param n_answers: Number of answers or TaskRuns per task, default 30
:type n_answers: integer
:param priority_0: Value between ... | pbclient/__init__.py | def create_task(project_id, info, n_answers=30, priority_0=0, quorum=0):
"""Create a task for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param info: PYBOSSA Project info JSON field
:type info: dict
:param n_answers: Number of answers or TaskRuns per tas... | def create_task(project_id, info, n_answers=30, priority_0=0, quorum=0):
"""Create a task for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param info: PYBOSSA Project info JSON field
:type info: dict
:param n_answers: Number of answers or TaskRuns per tas... | [
"Create",
"a",
"task",
"for",
"a",
"given",
"project",
"ID",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L479-L511 | [
"def",
"create_task",
"(",
"project_id",
",",
"info",
",",
"n_answers",
"=",
"30",
",",
"priority_0",
"=",
"0",
",",
"quorum",
"=",
"0",
")",
":",
"try",
":",
"task",
"=",
"dict",
"(",
"project_id",
"=",
"project_id",
",",
"info",
"=",
"info",
",",
... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | update_task | Update a task for a given task ID.
:param task: PYBOSSA task | pbclient/__init__.py | def update_task(task):
"""Update a task for a given task ID.
:param task: PYBOSSA task
"""
try:
task_id = task.id
task = _forbidden_attributes(task)
res = _pybossa_req('put', 'task', task_id, payload=task.data)
if res.get('id'):
return Task(res)
else... | def update_task(task):
"""Update a task for a given task ID.
:param task: PYBOSSA task
"""
try:
task_id = task.id
task = _forbidden_attributes(task)
res = _pybossa_req('put', 'task', task_id, payload=task.data)
if res.get('id'):
return Task(res)
else... | [
"Update",
"a",
"task",
"for",
"a",
"given",
"task",
"ID",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L514-L529 | [
"def",
"update_task",
"(",
"task",
")",
":",
"try",
":",
"task_id",
"=",
"task",
".",
"id",
"task",
"=",
"_forbidden_attributes",
"(",
"task",
")",
"res",
"=",
"_pybossa_req",
"(",
"'put'",
",",
"'task'",
",",
"task_id",
",",
"payload",
"=",
"task",
".... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | delete_task | Delete a task for a given task ID.
:param task: PYBOSSA task | pbclient/__init__.py | def delete_task(task_id):
"""Delete a task for a given task ID.
:param task: PYBOSSA task
"""
#: :arg task: A task
try:
res = _pybossa_req('delete', 'task', task_id)
if type(res).__name__ == 'bool':
return True
else:
return res
except: # pragma:... | def delete_task(task_id):
"""Delete a task for a given task ID.
:param task: PYBOSSA task
"""
#: :arg task: A task
try:
res = _pybossa_req('delete', 'task', task_id)
if type(res).__name__ == 'bool':
return True
else:
return res
except: # pragma:... | [
"Delete",
"a",
"task",
"for",
"a",
"given",
"task",
"ID",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L532-L546 | [
"def",
"delete_task",
"(",
"task_id",
")",
":",
"#: :arg task: A task",
"try",
":",
"res",
"=",
"_pybossa_req",
"(",
"'delete'",
",",
"'task'",
",",
"task_id",
")",
"if",
"type",
"(",
"res",
")",
".",
"__name__",
"==",
"'bool'",
":",
"return",
"True",
"e... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | get_taskruns | Return a list of task runs for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param limit: Number of returned items, default 100
:type limit: integer
:param offset: Offset for the query, default 0
:type offset: integer
:param last_id: id of the last tas... | pbclient/__init__.py | def get_taskruns(project_id, limit=100, offset=0, last_id=None):
"""Return a list of task runs for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param limit: Number of returned items, default 100
:type limit: integer
:param offset: Offset for the query, de... | def get_taskruns(project_id, limit=100, offset=0, last_id=None):
"""Return a list of task runs for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param limit: Number of returned items, default 100
:type limit: integer
:param offset: Offset for the query, de... | [
"Return",
"a",
"list",
"of",
"task",
"runs",
"for",
"a",
"given",
"project",
"ID",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L551-L580 | [
"def",
"get_taskruns",
"(",
"project_id",
",",
"limit",
"=",
"100",
",",
"offset",
"=",
"0",
",",
"last_id",
"=",
"None",
")",
":",
"if",
"last_id",
"is",
"not",
"None",
":",
"params",
"=",
"dict",
"(",
"limit",
"=",
"limit",
",",
"last_id",
"=",
"... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | find_taskruns | Return a list of matched task runs for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param kwargs: PYBOSSA Task Run members
:rtype: list
:returns: A List of task runs that match the query members | pbclient/__init__.py | def find_taskruns(project_id, **kwargs):
"""Return a list of matched task runs for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param kwargs: PYBOSSA Task Run members
:rtype: list
:returns: A List of task runs that match the query members
"""
try... | def find_taskruns(project_id, **kwargs):
"""Return a list of matched task runs for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param kwargs: PYBOSSA Task Run members
:rtype: list
:returns: A List of task runs that match the query members
"""
try... | [
"Return",
"a",
"list",
"of",
"matched",
"task",
"runs",
"for",
"a",
"given",
"project",
"ID",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L583-L601 | [
"def",
"find_taskruns",
"(",
"project_id",
",",
"*",
"*",
"kwargs",
")",
":",
"try",
":",
"kwargs",
"[",
"'project_id'",
"]",
"=",
"project_id",
"res",
"=",
"_pybossa_req",
"(",
"'get'",
",",
"'taskrun'",
",",
"params",
"=",
"kwargs",
")",
"if",
"type",
... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | delete_taskrun | Delete the given taskrun.
:param task: PYBOSSA task | pbclient/__init__.py | def delete_taskrun(taskrun_id):
"""Delete the given taskrun.
:param task: PYBOSSA task
"""
try:
res = _pybossa_req('delete', 'taskrun', taskrun_id)
if type(res).__name__ == 'bool':
return True
else:
return res
except: # pragma: no cover
raise | def delete_taskrun(taskrun_id):
"""Delete the given taskrun.
:param task: PYBOSSA task
"""
try:
res = _pybossa_req('delete', 'taskrun', taskrun_id)
if type(res).__name__ == 'bool':
return True
else:
return res
except: # pragma: no cover
raise | [
"Delete",
"the",
"given",
"taskrun",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L604-L616 | [
"def",
"delete_taskrun",
"(",
"taskrun_id",
")",
":",
"try",
":",
"res",
"=",
"_pybossa_req",
"(",
"'delete'",
",",
"'taskrun'",
",",
"taskrun_id",
")",
"if",
"type",
"(",
"res",
")",
".",
"__name__",
"==",
"'bool'",
":",
"return",
"True",
"else",
":",
... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | get_results | Return a list of results for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param limit: Number of returned items, default 100
:type limit: integer
:param offset: Offset for the query, default 0
:param last_id: id of the last result, used for pagination. If... | pbclient/__init__.py | def get_results(project_id, limit=100, offset=0, last_id=None):
"""Return a list of results for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param limit: Number of returned items, default 100
:type limit: integer
:param offset: Offset for the query, defau... | def get_results(project_id, limit=100, offset=0, last_id=None):
"""Return a list of results for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param limit: Number of returned items, default 100
:type limit: integer
:param offset: Offset for the query, defau... | [
"Return",
"a",
"list",
"of",
"results",
"for",
"a",
"given",
"project",
"ID",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L621-L649 | [
"def",
"get_results",
"(",
"project_id",
",",
"limit",
"=",
"100",
",",
"offset",
"=",
"0",
",",
"last_id",
"=",
"None",
")",
":",
"if",
"last_id",
"is",
"not",
"None",
":",
"params",
"=",
"dict",
"(",
"limit",
"=",
"limit",
",",
"last_id",
"=",
"l... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | find_results | Return a list of matched results for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param kwargs: PYBOSSA Results members
:type info: dict
:rtype: list
:returns: A list of results that match the kwargs | pbclient/__init__.py | def find_results(project_id, **kwargs):
"""Return a list of matched results for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param kwargs: PYBOSSA Results members
:type info: dict
:rtype: list
:returns: A list of results that match the kwargs
"""... | def find_results(project_id, **kwargs):
"""Return a list of matched results for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param kwargs: PYBOSSA Results members
:type info: dict
:rtype: list
:returns: A list of results that match the kwargs
"""... | [
"Return",
"a",
"list",
"of",
"matched",
"results",
"for",
"a",
"given",
"project",
"ID",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L652-L671 | [
"def",
"find_results",
"(",
"project_id",
",",
"*",
"*",
"kwargs",
")",
":",
"try",
":",
"kwargs",
"[",
"'project_id'",
"]",
"=",
"project_id",
"res",
"=",
"_pybossa_req",
"(",
"'get'",
",",
"'result'",
",",
"params",
"=",
"kwargs",
")",
"if",
"type",
... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | update_result | Update a result for a given result ID.
:param result: PYBOSSA result | pbclient/__init__.py | def update_result(result):
"""Update a result for a given result ID.
:param result: PYBOSSA result
"""
try:
result_id = result.id
result = _forbidden_attributes(result)
res = _pybossa_req('put', 'result', result_id, payload=result.data)
if res.get('id'):
ret... | def update_result(result):
"""Update a result for a given result ID.
:param result: PYBOSSA result
"""
try:
result_id = result.id
result = _forbidden_attributes(result)
res = _pybossa_req('put', 'result', result_id, payload=result.data)
if res.get('id'):
ret... | [
"Update",
"a",
"result",
"for",
"a",
"given",
"result",
"ID",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L674-L689 | [
"def",
"update_result",
"(",
"result",
")",
":",
"try",
":",
"result_id",
"=",
"result",
".",
"id",
"result",
"=",
"_forbidden_attributes",
"(",
"result",
")",
"res",
"=",
"_pybossa_req",
"(",
"'put'",
",",
"'result'",
",",
"result_id",
",",
"payload",
"="... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | _forbidden_attributes | Return the object without the forbidden attributes. | pbclient/__init__.py | def _forbidden_attributes(obj):
"""Return the object without the forbidden attributes."""
for key in list(obj.data.keys()):
if key in list(obj.reserved_keys.keys()):
obj.data.pop(key)
return obj | def _forbidden_attributes(obj):
"""Return the object without the forbidden attributes."""
for key in list(obj.data.keys()):
if key in list(obj.reserved_keys.keys()):
obj.data.pop(key)
return obj | [
"Return",
"the",
"object",
"without",
"the",
"forbidden",
"attributes",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L692-L697 | [
"def",
"_forbidden_attributes",
"(",
"obj",
")",
":",
"for",
"key",
"in",
"list",
"(",
"obj",
".",
"data",
".",
"keys",
"(",
")",
")",
":",
"if",
"key",
"in",
"list",
"(",
"obj",
".",
"reserved_keys",
".",
"keys",
"(",
")",
")",
":",
"obj",
".",
... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | create_helpingmaterial | Create a helping material for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param info: PYBOSSA Helping Material info JSON field
:type info: dict
:param media_url: URL for a media file (image, video or audio)
:type media_url: string
:param file_path: F... | pbclient/__init__.py | def create_helpingmaterial(project_id, info, media_url=None, file_path=None):
"""Create a helping material for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param info: PYBOSSA Helping Material info JSON field
:type info: dict
:param media_url: URL for a m... | def create_helpingmaterial(project_id, info, media_url=None, file_path=None):
"""Create a helping material for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param info: PYBOSSA Helping Material info JSON field
:type info: dict
:param media_url: URL for a m... | [
"Create",
"a",
"helping",
"material",
"for",
"a",
"given",
"project",
"ID",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L703-L734 | [
"def",
"create_helpingmaterial",
"(",
"project_id",
",",
"info",
",",
"media_url",
"=",
"None",
",",
"file_path",
"=",
"None",
")",
":",
"try",
":",
"helping",
"=",
"dict",
"(",
"project_id",
"=",
"project_id",
",",
"info",
"=",
"info",
",",
"media_url",
... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | get_helping_materials | Return a list of helping materials for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param limit: Number of returned items, default 100
:type limit: integer
:param offset: Offset for the query, default 0
:param last_id: id of the last helping material, use... | pbclient/__init__.py | def get_helping_materials(project_id, limit=100, offset=0, last_id=None):
"""Return a list of helping materials for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param limit: Number of returned items, default 100
:type limit: integer
:param offset: Offset ... | def get_helping_materials(project_id, limit=100, offset=0, last_id=None):
"""Return a list of helping materials for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param limit: Number of returned items, default 100
:type limit: integer
:param offset: Offset ... | [
"Return",
"a",
"list",
"of",
"helping",
"materials",
"for",
"a",
"given",
"project",
"ID",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L737-L765 | [
"def",
"get_helping_materials",
"(",
"project_id",
",",
"limit",
"=",
"100",
",",
"offset",
"=",
"0",
",",
"last_id",
"=",
"None",
")",
":",
"if",
"last_id",
"is",
"not",
"None",
":",
"params",
"=",
"dict",
"(",
"limit",
"=",
"limit",
",",
"last_id",
... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | find_helping_materials | Return a list of matched helping materials for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param kwargs: PYBOSSA HelpingMaterial members
:type info: dict
:rtype: list
:returns: A list of helping materials that match the kwargs | pbclient/__init__.py | def find_helping_materials(project_id, **kwargs):
"""Return a list of matched helping materials for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param kwargs: PYBOSSA HelpingMaterial members
:type info: dict
:rtype: list
:returns: A list of helping ma... | def find_helping_materials(project_id, **kwargs):
"""Return a list of matched helping materials for a given project ID.
:param project_id: PYBOSSA Project ID
:type project_id: integer
:param kwargs: PYBOSSA HelpingMaterial members
:type info: dict
:rtype: list
:returns: A list of helping ma... | [
"Return",
"a",
"list",
"of",
"matched",
"helping",
"materials",
"for",
"a",
"given",
"project",
"ID",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L768-L787 | [
"def",
"find_helping_materials",
"(",
"project_id",
",",
"*",
"*",
"kwargs",
")",
":",
"try",
":",
"kwargs",
"[",
"'project_id'",
"]",
"=",
"project_id",
"res",
"=",
"_pybossa_req",
"(",
"'get'",
",",
"'helpingmaterial'",
",",
"params",
"=",
"kwargs",
")",
... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | update_helping_material | Update a helping material for a given helping material ID.
:param helpingmaterial: PYBOSSA helping material | pbclient/__init__.py | def update_helping_material(helpingmaterial):
"""Update a helping material for a given helping material ID.
:param helpingmaterial: PYBOSSA helping material
"""
try:
helpingmaterial_id = helpingmaterial.id
helpingmaterial = _forbidden_attributes(helpingmaterial)
res = _pybossa_... | def update_helping_material(helpingmaterial):
"""Update a helping material for a given helping material ID.
:param helpingmaterial: PYBOSSA helping material
"""
try:
helpingmaterial_id = helpingmaterial.id
helpingmaterial = _forbidden_attributes(helpingmaterial)
res = _pybossa_... | [
"Update",
"a",
"helping",
"material",
"for",
"a",
"given",
"helping",
"material",
"ID",
"."
] | Scifabric/pybossa-client | python | https://github.com/Scifabric/pybossa-client/blob/998d7cb0207ff5030dc800f0c2577c5692316c2c/pbclient/__init__.py#L790-L806 | [
"def",
"update_helping_material",
"(",
"helpingmaterial",
")",
":",
"try",
":",
"helpingmaterial_id",
"=",
"helpingmaterial",
".",
"id",
"helpingmaterial",
"=",
"_forbidden_attributes",
"(",
"helpingmaterial",
")",
"res",
"=",
"_pybossa_req",
"(",
"'put'",
",",
"'he... | 998d7cb0207ff5030dc800f0c2577c5692316c2c |
valid | MusicManagerWrapper.login | Authenticate the gmusicapi Musicmanager instance.
Parameters:
oauth_filename (str): The filename of the oauth credentials file to use/create for login.
Default: ``oauth``
uploader_id (str): A unique id as a MAC address (e.g. ``'00:11:22:33:AA:BB'``).
This should only be provided in cases where the def... | gmusicapi_wrapper/musicmanager.py | def login(self, oauth_filename="oauth", uploader_id=None):
"""Authenticate the gmusicapi Musicmanager instance.
Parameters:
oauth_filename (str): The filename of the oauth credentials file to use/create for login.
Default: ``oauth``
uploader_id (str): A unique id as a MAC address (e.g. ``'00:11:22:33:AA... | def login(self, oauth_filename="oauth", uploader_id=None):
"""Authenticate the gmusicapi Musicmanager instance.
Parameters:
oauth_filename (str): The filename of the oauth credentials file to use/create for login.
Default: ``oauth``
uploader_id (str): A unique id as a MAC address (e.g. ``'00:11:22:33:AA... | [
"Authenticate",
"the",
"gmusicapi",
"Musicmanager",
"instance",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/musicmanager.py#L35-L73 | [
"def",
"login",
"(",
"self",
",",
"oauth_filename",
"=",
"\"oauth\"",
",",
"uploader_id",
"=",
"None",
")",
":",
"cls_name",
"=",
"type",
"(",
"self",
")",
".",
"__name__",
"oauth_cred",
"=",
"os",
".",
"path",
".",
"join",
"(",
"os",
".",
"path",
".... | 8708683cd33955def1378fc28319ef37805b851d |
valid | MusicManagerWrapper.get_google_songs | Create song list from user's Google Music library.
Parameters:
include_filters (list): A list of ``(field, pattern)`` tuples.
Fields are any valid Google Music metadata field available to the Musicmanager client.
Patterns are Python regex patterns.
Google Music songs are filtered out if the given meta... | gmusicapi_wrapper/musicmanager.py | def get_google_songs(
self, include_filters=None, exclude_filters=None, all_includes=False, all_excludes=False,
uploaded=True, purchased=True):
"""Create song list from user's Google Music library.
Parameters:
include_filters (list): A list of ``(field, pattern)`` tuples.
Fields are any valid Google Mus... | def get_google_songs(
self, include_filters=None, exclude_filters=None, all_includes=False, all_excludes=False,
uploaded=True, purchased=True):
"""Create song list from user's Google Music library.
Parameters:
include_filters (list): A list of ``(field, pattern)`` tuples.
Fields are any valid Google Mus... | [
"Create",
"song",
"list",
"from",
"user",
"s",
"Google",
"Music",
"library",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/musicmanager.py#L87-L139 | [
"def",
"get_google_songs",
"(",
"self",
",",
"include_filters",
"=",
"None",
",",
"exclude_filters",
"=",
"None",
",",
"all_includes",
"=",
"False",
",",
"all_excludes",
"=",
"False",
",",
"uploaded",
"=",
"True",
",",
"purchased",
"=",
"True",
")",
":",
"... | 8708683cd33955def1378fc28319ef37805b851d |
valid | MusicManagerWrapper.download | Download Google Music songs.
Parameters:
songs (list or dict): Google Music song dict(s).
template (str): A filepath which can include template patterns.
Returns:
A list of result dictionaries.
::
[
{'result': 'downloaded', 'id': song_id, 'filepath': downloaded[song_id]}, # downloaded
... | gmusicapi_wrapper/musicmanager.py | def download(self, songs, template=None):
"""Download Google Music songs.
Parameters:
songs (list or dict): Google Music song dict(s).
template (str): A filepath which can include template patterns.
Returns:
A list of result dictionaries.
::
[
{'result': 'downloaded', 'id': song_id, 'file... | def download(self, songs, template=None):
"""Download Google Music songs.
Parameters:
songs (list or dict): Google Music song dict(s).
template (str): A filepath which can include template patterns.
Returns:
A list of result dictionaries.
::
[
{'result': 'downloaded', 'id': song_id, 'file... | [
"Download",
"Google",
"Music",
"songs",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/musicmanager.py#L188-L248 | [
"def",
"download",
"(",
"self",
",",
"songs",
",",
"template",
"=",
"None",
")",
":",
"if",
"not",
"template",
":",
"template",
"=",
"os",
".",
"getcwd",
"(",
")",
"songnum",
"=",
"0",
"total",
"=",
"len",
"(",
"songs",
")",
"results",
"=",
"[",
... | 8708683cd33955def1378fc28319ef37805b851d |
valid | MusicManagerWrapper.upload | Upload local songs to Google Music.
Parameters:
filepaths (list or str): Filepath(s) to upload.
enable_matching (bool): If ``True`` attempt to use `scan and match
<http://support.google.com/googleplay/bin/answer.py?hl=en&answer=2920799&topic=2450455>`__.
This requieres ffmpeg or avconv.
transcode_... | gmusicapi_wrapper/musicmanager.py | def upload(self, filepaths, enable_matching=False, transcode_quality='320k', delete_on_success=False):
"""Upload local songs to Google Music.
Parameters:
filepaths (list or str): Filepath(s) to upload.
enable_matching (bool): If ``True`` attempt to use `scan and match
<http://support.google.com/googlepl... | def upload(self, filepaths, enable_matching=False, transcode_quality='320k', delete_on_success=False):
"""Upload local songs to Google Music.
Parameters:
filepaths (list or str): Filepath(s) to upload.
enable_matching (bool): If ``True`` attempt to use `scan and match
<http://support.google.com/googlepl... | [
"Upload",
"local",
"songs",
"to",
"Google",
"Music",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/musicmanager.py#L265-L369 | [
"def",
"upload",
"(",
"self",
",",
"filepaths",
",",
"enable_matching",
"=",
"False",
",",
"transcode_quality",
"=",
"'320k'",
",",
"delete_on_success",
"=",
"False",
")",
":",
"filenum",
"=",
"0",
"total",
"=",
"len",
"(",
"filepaths",
")",
"results",
"="... | 8708683cd33955def1378fc28319ef37805b851d |
valid | convert_cygwin_path | Convert Unix path from Cygwin to Windows path. | gmusicapi_wrapper/utils.py | def convert_cygwin_path(path):
"""Convert Unix path from Cygwin to Windows path."""
try:
win_path = subprocess.check_output(["cygpath", "-aw", path], universal_newlines=True).strip()
except (FileNotFoundError, subprocess.CalledProcessError):
logger.exception("Call to cygpath failed.")
raise
return win_path | def convert_cygwin_path(path):
"""Convert Unix path from Cygwin to Windows path."""
try:
win_path = subprocess.check_output(["cygpath", "-aw", path], universal_newlines=True).strip()
except (FileNotFoundError, subprocess.CalledProcessError):
logger.exception("Call to cygpath failed.")
raise
return win_path | [
"Convert",
"Unix",
"path",
"from",
"Cygwin",
"to",
"Windows",
"path",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/utils.py#L22-L31 | [
"def",
"convert_cygwin_path",
"(",
"path",
")",
":",
"try",
":",
"win_path",
"=",
"subprocess",
".",
"check_output",
"(",
"[",
"\"cygpath\"",
",",
"\"-aw\"",
",",
"path",
"]",
",",
"universal_newlines",
"=",
"True",
")",
".",
"strip",
"(",
")",
"except",
... | 8708683cd33955def1378fc28319ef37805b851d |
valid | _get_mutagen_metadata | Get mutagen metadata dict from a file. | gmusicapi_wrapper/utils.py | def _get_mutagen_metadata(filepath):
"""Get mutagen metadata dict from a file."""
try:
metadata = mutagen.File(filepath, easy=True)
except mutagen.MutagenError:
logger.warning("Can't load {} as music file.".format(filepath))
raise
return metadata | def _get_mutagen_metadata(filepath):
"""Get mutagen metadata dict from a file."""
try:
metadata = mutagen.File(filepath, easy=True)
except mutagen.MutagenError:
logger.warning("Can't load {} as music file.".format(filepath))
raise
return metadata | [
"Get",
"mutagen",
"metadata",
"dict",
"from",
"a",
"file",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/utils.py#L34-L43 | [
"def",
"_get_mutagen_metadata",
"(",
"filepath",
")",
":",
"try",
":",
"metadata",
"=",
"mutagen",
".",
"File",
"(",
"filepath",
",",
"easy",
"=",
"True",
")",
"except",
"mutagen",
".",
"MutagenError",
":",
"logger",
".",
"warning",
"(",
"\"Can't load {} as ... | 8708683cd33955def1378fc28319ef37805b851d |
valid | _mutagen_fields_to_single_value | Replace mutagen metadata field list values in mutagen tags with the first list value. | gmusicapi_wrapper/utils.py | def _mutagen_fields_to_single_value(metadata):
"""Replace mutagen metadata field list values in mutagen tags with the first list value."""
return dict((k, v[0]) for k, v in metadata.items() if v) | def _mutagen_fields_to_single_value(metadata):
"""Replace mutagen metadata field list values in mutagen tags with the first list value."""
return dict((k, v[0]) for k, v in metadata.items() if v) | [
"Replace",
"mutagen",
"metadata",
"field",
"list",
"values",
"in",
"mutagen",
"tags",
"with",
"the",
"first",
"list",
"value",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/utils.py#L46-L49 | [
"def",
"_mutagen_fields_to_single_value",
"(",
"metadata",
")",
":",
"return",
"dict",
"(",
"(",
"k",
",",
"v",
"[",
"0",
"]",
")",
"for",
"k",
",",
"v",
"in",
"metadata",
".",
"items",
"(",
")",
"if",
"v",
")"
] | 8708683cd33955def1378fc28319ef37805b851d |
valid | _split_field_to_single_value | Convert number field values split by a '/' to a single number value. | gmusicapi_wrapper/utils.py | def _split_field_to_single_value(field):
"""Convert number field values split by a '/' to a single number value."""
split_field = re.match(r'(\d+)/\d+', field)
return split_field.group(1) or field | def _split_field_to_single_value(field):
"""Convert number field values split by a '/' to a single number value."""
split_field = re.match(r'(\d+)/\d+', field)
return split_field.group(1) or field | [
"Convert",
"number",
"field",
"values",
"split",
"by",
"a",
"/",
"to",
"a",
"single",
"number",
"value",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/utils.py#L52-L57 | [
"def",
"_split_field_to_single_value",
"(",
"field",
")",
":",
"split_field",
"=",
"re",
".",
"match",
"(",
"r'(\\d+)/\\d+'",
",",
"field",
")",
"return",
"split_field",
".",
"group",
"(",
"1",
")",
"or",
"field"
] | 8708683cd33955def1378fc28319ef37805b851d |
valid | _normalize_metadata | Normalize metadata to improve match accuracy. | gmusicapi_wrapper/utils.py | def _normalize_metadata(metadata):
"""Normalize metadata to improve match accuracy."""
metadata = str(metadata)
metadata = metadata.lower()
metadata = re.sub(r'\/\s*\d+', '', metadata) # Remove "/<totaltracks>" from track number.
metadata = re.sub(r'^0+([0-9]+)', r'\1', metadata) # Remove leading zero(s) from ... | def _normalize_metadata(metadata):
"""Normalize metadata to improve match accuracy."""
metadata = str(metadata)
metadata = metadata.lower()
metadata = re.sub(r'\/\s*\d+', '', metadata) # Remove "/<totaltracks>" from track number.
metadata = re.sub(r'^0+([0-9]+)', r'\1', metadata) # Remove leading zero(s) from ... | [
"Normalize",
"metadata",
"to",
"improve",
"match",
"accuracy",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/utils.py#L67-L82 | [
"def",
"_normalize_metadata",
"(",
"metadata",
")",
":",
"metadata",
"=",
"str",
"(",
"metadata",
")",
"metadata",
"=",
"metadata",
".",
"lower",
"(",
")",
"metadata",
"=",
"re",
".",
"sub",
"(",
"r'\\/\\s*\\d+'",
",",
"''",
",",
"metadata",
")",
"# Remo... | 8708683cd33955def1378fc28319ef37805b851d |
valid | compare_song_collections | Compare two song collections to find missing songs.
Parameters:
src_songs (list): Google Music song dicts or filepaths of local songs.
dest_songs (list): Google Music song dicts or filepaths of local songs.
Returns:
A list of Google Music song dicts or local song filepaths from source missing in destination. | gmusicapi_wrapper/utils.py | def compare_song_collections(src_songs, dst_songs):
"""Compare two song collections to find missing songs.
Parameters:
src_songs (list): Google Music song dicts or filepaths of local songs.
dest_songs (list): Google Music song dicts or filepaths of local songs.
Returns:
A list of Google Music song dicts or ... | def compare_song_collections(src_songs, dst_songs):
"""Compare two song collections to find missing songs.
Parameters:
src_songs (list): Google Music song dicts or filepaths of local songs.
dest_songs (list): Google Music song dicts or filepaths of local songs.
Returns:
A list of Google Music song dicts or ... | [
"Compare",
"two",
"song",
"collections",
"to",
"find",
"missing",
"songs",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/utils.py#L91-L108 | [
"def",
"compare_song_collections",
"(",
"src_songs",
",",
"dst_songs",
")",
":",
"def",
"gather_field_values",
"(",
"song",
")",
":",
"return",
"tuple",
"(",
"(",
"_normalize_metadata",
"(",
"song",
"[",
"field",
"]",
")",
"for",
"field",
"in",
"_filter_compar... | 8708683cd33955def1378fc28319ef37805b851d |
valid | get_supported_filepaths | Get filepaths with supported extensions from given filepaths.
Parameters:
filepaths (list or str): Filepath(s) to check.
supported_extensions (tuple or str): Supported file extensions or a single file extension.
max_depth (int): The depth in the directory tree to walk.
A depth of '0' limits the walk to the... | gmusicapi_wrapper/utils.py | def get_supported_filepaths(filepaths, supported_extensions, max_depth=float('inf')):
"""Get filepaths with supported extensions from given filepaths.
Parameters:
filepaths (list or str): Filepath(s) to check.
supported_extensions (tuple or str): Supported file extensions or a single file extension.
max_dept... | def get_supported_filepaths(filepaths, supported_extensions, max_depth=float('inf')):
"""Get filepaths with supported extensions from given filepaths.
Parameters:
filepaths (list or str): Filepath(s) to check.
supported_extensions (tuple or str): Supported file extensions or a single file extension.
max_dept... | [
"Get",
"filepaths",
"with",
"supported",
"extensions",
"from",
"given",
"filepaths",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/utils.py#L112-L142 | [
"def",
"get_supported_filepaths",
"(",
"filepaths",
",",
"supported_extensions",
",",
"max_depth",
"=",
"float",
"(",
"'inf'",
")",
")",
":",
"supported_filepaths",
"=",
"[",
"]",
"for",
"path",
"in",
"filepaths",
":",
"if",
"os",
".",
"name",
"==",
"'nt'",
... | 8708683cd33955def1378fc28319ef37805b851d |
valid | exclude_filepaths | Exclude file paths based on regex patterns.
Parameters:
filepaths (list or str): Filepath(s) to check.
exclude_patterns (list): Python regex patterns to check filepaths against.
Returns:
A list of filepaths to include and a list of filepaths to exclude. | gmusicapi_wrapper/utils.py | def exclude_filepaths(filepaths, exclude_patterns=None):
"""Exclude file paths based on regex patterns.
Parameters:
filepaths (list or str): Filepath(s) to check.
exclude_patterns (list): Python regex patterns to check filepaths against.
Returns:
A list of filepaths to include and a list of filepaths to exc... | def exclude_filepaths(filepaths, exclude_patterns=None):
"""Exclude file paths based on regex patterns.
Parameters:
filepaths (list or str): Filepath(s) to check.
exclude_patterns (list): Python regex patterns to check filepaths against.
Returns:
A list of filepaths to include and a list of filepaths to exc... | [
"Exclude",
"file",
"paths",
"based",
"on",
"regex",
"patterns",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/utils.py#L146-L172 | [
"def",
"exclude_filepaths",
"(",
"filepaths",
",",
"exclude_patterns",
"=",
"None",
")",
":",
"if",
"not",
"exclude_patterns",
":",
"return",
"filepaths",
",",
"[",
"]",
"exclude_re",
"=",
"re",
".",
"compile",
"(",
"\"|\"",
".",
"join",
"(",
"pattern",
"f... | 8708683cd33955def1378fc28319ef37805b851d |
valid | _check_field_value | Check a song metadata field value for a pattern. | gmusicapi_wrapper/utils.py | def _check_field_value(field_value, pattern):
"""Check a song metadata field value for a pattern."""
if isinstance(field_value, list):
return any(re.search(pattern, str(value), re.I) for value in field_value)
else:
return re.search(pattern, str(field_value), re.I) | def _check_field_value(field_value, pattern):
"""Check a song metadata field value for a pattern."""
if isinstance(field_value, list):
return any(re.search(pattern, str(value), re.I) for value in field_value)
else:
return re.search(pattern, str(field_value), re.I) | [
"Check",
"a",
"song",
"metadata",
"field",
"value",
"for",
"a",
"pattern",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/utils.py#L175-L181 | [
"def",
"_check_field_value",
"(",
"field_value",
",",
"pattern",
")",
":",
"if",
"isinstance",
"(",
"field_value",
",",
"list",
")",
":",
"return",
"any",
"(",
"re",
".",
"search",
"(",
"pattern",
",",
"str",
"(",
"value",
")",
",",
"re",
".",
"I",
"... | 8708683cd33955def1378fc28319ef37805b851d |
valid | _check_filters | Check a song metadata dict against a set of metadata filters. | gmusicapi_wrapper/utils.py | def _check_filters(song, include_filters=None, exclude_filters=None, all_includes=False, all_excludes=False):
"""Check a song metadata dict against a set of metadata filters."""
include = True
if include_filters:
if all_includes:
if not all(field in song and _check_field_value(song[field], pattern) for field,... | def _check_filters(song, include_filters=None, exclude_filters=None, all_includes=False, all_excludes=False):
"""Check a song metadata dict against a set of metadata filters."""
include = True
if include_filters:
if all_includes:
if not all(field in song and _check_field_value(song[field], pattern) for field,... | [
"Check",
"a",
"song",
"metadata",
"dict",
"against",
"a",
"set",
"of",
"metadata",
"filters",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/utils.py#L184-L205 | [
"def",
"_check_filters",
"(",
"song",
",",
"include_filters",
"=",
"None",
",",
"exclude_filters",
"=",
"None",
",",
"all_includes",
"=",
"False",
",",
"all_excludes",
"=",
"False",
")",
":",
"include",
"=",
"True",
"if",
"include_filters",
":",
"if",
"all_i... | 8708683cd33955def1378fc28319ef37805b851d |
valid | filter_google_songs | Match a Google Music song dict against a set of metadata filters.
Parameters:
songs (list): Google Music song dicts to filter.
include_filters (list): A list of ``(field, pattern)`` tuples.
Fields are any valid Google Music metadata field available to the Musicmanager client.
Patterns are Python regex patt... | gmusicapi_wrapper/utils.py | def filter_google_songs(songs, include_filters=None, exclude_filters=None, all_includes=False, all_excludes=False):
"""Match a Google Music song dict against a set of metadata filters.
Parameters:
songs (list): Google Music song dicts to filter.
include_filters (list): A list of ``(field, pattern)`` tuples.
... | def filter_google_songs(songs, include_filters=None, exclude_filters=None, all_includes=False, all_excludes=False):
"""Match a Google Music song dict against a set of metadata filters.
Parameters:
songs (list): Google Music song dicts to filter.
include_filters (list): A list of ``(field, pattern)`` tuples.
... | [
"Match",
"a",
"Google",
"Music",
"song",
"dict",
"against",
"a",
"set",
"of",
"metadata",
"filters",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/utils.py#L208-L250 | [
"def",
"filter_google_songs",
"(",
"songs",
",",
"include_filters",
"=",
"None",
",",
"exclude_filters",
"=",
"None",
",",
"all_includes",
"=",
"False",
",",
"all_excludes",
"=",
"False",
")",
":",
"matched_songs",
"=",
"[",
"]",
"filtered_songs",
"=",
"[",
... | 8708683cd33955def1378fc28319ef37805b851d |
valid | filter_local_songs | Match a local file against a set of metadata filters.
Parameters:
filepaths (list): Filepaths to filter.
include_filters (list): A list of ``(field, pattern)`` tuples.
Fields are any valid mutagen metadata fields.
Patterns are Python regex patterns.
Local songs are filtered out if the given metadata fie... | gmusicapi_wrapper/utils.py | def filter_local_songs(filepaths, include_filters=None, exclude_filters=None, all_includes=False, all_excludes=False):
"""Match a local file against a set of metadata filters.
Parameters:
filepaths (list): Filepaths to filter.
include_filters (list): A list of ``(field, pattern)`` tuples.
Fields are any vali... | def filter_local_songs(filepaths, include_filters=None, exclude_filters=None, all_includes=False, all_excludes=False):
"""Match a local file against a set of metadata filters.
Parameters:
filepaths (list): Filepaths to filter.
include_filters (list): A list of ``(field, pattern)`` tuples.
Fields are any vali... | [
"Match",
"a",
"local",
"file",
"against",
"a",
"set",
"of",
"metadata",
"filters",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/utils.py#L253-L301 | [
"def",
"filter_local_songs",
"(",
"filepaths",
",",
"include_filters",
"=",
"None",
",",
"exclude_filters",
"=",
"None",
",",
"all_includes",
"=",
"False",
",",
"all_excludes",
"=",
"False",
")",
":",
"matched_songs",
"=",
"[",
"]",
"filtered_songs",
"=",
"[",... | 8708683cd33955def1378fc28319ef37805b851d |
valid | get_suggested_filename | Generate a filename for a song based on metadata.
Parameters:
metadata (dict): A metadata dict.
Returns:
A filename. | gmusicapi_wrapper/utils.py | def get_suggested_filename(metadata):
"""Generate a filename for a song based on metadata.
Parameters:
metadata (dict): A metadata dict.
Returns:
A filename.
"""
if metadata.get('title') and metadata.get('track_number'):
suggested_filename = '{track_number:0>2} {title}'.format(**metadata)
elif metadata.g... | def get_suggested_filename(metadata):
"""Generate a filename for a song based on metadata.
Parameters:
metadata (dict): A metadata dict.
Returns:
A filename.
"""
if metadata.get('title') and metadata.get('track_number'):
suggested_filename = '{track_number:0>2} {title}'.format(**metadata)
elif metadata.g... | [
"Generate",
"a",
"filename",
"for",
"a",
"song",
"based",
"on",
"metadata",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/utils.py#L304-L323 | [
"def",
"get_suggested_filename",
"(",
"metadata",
")",
":",
"if",
"metadata",
".",
"get",
"(",
"'title'",
")",
"and",
"metadata",
".",
"get",
"(",
"'track_number'",
")",
":",
"suggested_filename",
"=",
"'{track_number:0>2} {title}'",
".",
"format",
"(",
"*",
"... | 8708683cd33955def1378fc28319ef37805b851d |
valid | template_to_filepath | Create directory structure and file name based on metadata template.
Parameters:
template (str): A filepath which can include template patterns as defined by :param template_patterns:.
metadata (dict): A metadata dict.
template_patterns (dict): A dict of ``pattern: field`` pairs used to replace patterns with ... | gmusicapi_wrapper/utils.py | def template_to_filepath(template, metadata, template_patterns=None):
"""Create directory structure and file name based on metadata template.
Parameters:
template (str): A filepath which can include template patterns as defined by :param template_patterns:.
metadata (dict): A metadata dict.
template_patterns... | def template_to_filepath(template, metadata, template_patterns=None):
"""Create directory structure and file name based on metadata template.
Parameters:
template (str): A filepath which can include template patterns as defined by :param template_patterns:.
metadata (dict): A metadata dict.
template_patterns... | [
"Create",
"directory",
"structure",
"and",
"file",
"name",
"based",
"on",
"metadata",
"template",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/utils.py#L366-L395 | [
"def",
"template_to_filepath",
"(",
"template",
",",
"metadata",
",",
"template_patterns",
"=",
"None",
")",
":",
"if",
"template_patterns",
"is",
"None",
":",
"template_patterns",
"=",
"TEMPLATE_PATTERNS",
"metadata",
"=",
"metadata",
"if",
"isinstance",
"(",
"me... | 8708683cd33955def1378fc28319ef37805b851d |
valid | walk_depth | Walk a directory tree with configurable depth.
Parameters:
path (str): A directory path to walk.
max_depth (int): The depth in the directory tree to walk.
A depth of '0' limits the walk to the top directory.
Default: No limit. | gmusicapi_wrapper/utils.py | def walk_depth(path, max_depth=float('inf')):
"""Walk a directory tree with configurable depth.
Parameters:
path (str): A directory path to walk.
max_depth (int): The depth in the directory tree to walk.
A depth of '0' limits the walk to the top directory.
Default: No limit.
"""
start_level = os.path.a... | def walk_depth(path, max_depth=float('inf')):
"""Walk a directory tree with configurable depth.
Parameters:
path (str): A directory path to walk.
max_depth (int): The depth in the directory tree to walk.
A depth of '0' limits the walk to the top directory.
Default: No limit.
"""
start_level = os.path.a... | [
"Walk",
"a",
"directory",
"tree",
"with",
"configurable",
"depth",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/utils.py#L398-L418 | [
"def",
"walk_depth",
"(",
"path",
",",
"max_depth",
"=",
"float",
"(",
"'inf'",
")",
")",
":",
"start_level",
"=",
"os",
".",
"path",
".",
"abspath",
"(",
"path",
")",
".",
"count",
"(",
"os",
".",
"path",
".",
"sep",
")",
"for",
"dir_entry",
"in",... | 8708683cd33955def1378fc28319ef37805b851d |
valid | _BaseWrapper.get_local_songs | Load songs from local filepaths.
Parameters:
filepaths (list or str): Filepath(s) to search for music files.
include_filters (list): A list of ``(field, pattern)`` tuples.
Fields are any valid mutagen metadata fields. Patterns are Python regex patterns.
Local songs are filtered out if the given metada... | gmusicapi_wrapper/base.py | def get_local_songs(
filepaths, include_filters=None, exclude_filters=None, all_includes=False, all_excludes=False,
exclude_patterns=None, max_depth=float('inf')):
"""Load songs from local filepaths.
Parameters:
filepaths (list or str): Filepath(s) to search for music files.
include_filters (list): A ... | def get_local_songs(
filepaths, include_filters=None, exclude_filters=None, all_includes=False, all_excludes=False,
exclude_patterns=None, max_depth=float('inf')):
"""Load songs from local filepaths.
Parameters:
filepaths (list or str): Filepath(s) to search for music files.
include_filters (list): A ... | [
"Load",
"songs",
"from",
"local",
"filepaths",
"."
] | thebigmunch/gmusicapi-wrapper | python | https://github.com/thebigmunch/gmusicapi-wrapper/blob/8708683cd33955def1378fc28319ef37805b851d/gmusicapi_wrapper/base.py#L41-L91 | [
"def",
"get_local_songs",
"(",
"filepaths",
",",
"include_filters",
"=",
"None",
",",
"exclude_filters",
"=",
"None",
",",
"all_includes",
"=",
"False",
",",
"all_excludes",
"=",
"False",
",",
"exclude_patterns",
"=",
"None",
",",
"max_depth",
"=",
"float",
"(... | 8708683cd33955def1378fc28319ef37805b851d |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.