id int32 0 252k | repo stringlengths 7 55 | path stringlengths 4 127 | func_name stringlengths 1 88 | original_string stringlengths 75 19.8k | language stringclasses 1
value | code stringlengths 75 19.8k | code_tokens list | docstring stringlengths 3 17.3k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 87 242 |
|---|---|---|---|---|---|---|---|---|---|---|---|
29,200 | apple/turicreate | deps/src/boost_1_68_0/tools/build/src/tools/common.py | get_invocation_command | def get_invocation_command(toolset, tool, user_provided_command = [],
additional_paths = [], path_last = False):
""" Same as get_invocation_command_nodefault, except that if no tool is found,
returns either the user-provided-command, if present, or the 'tool' parameter.
"""
... | python | def get_invocation_command(toolset, tool, user_provided_command = [],
additional_paths = [], path_last = False):
""" Same as get_invocation_command_nodefault, except that if no tool is found,
returns either the user-provided-command, if present, or the 'tool' parameter.
"""
... | [
"def",
"get_invocation_command",
"(",
"toolset",
",",
"tool",
",",
"user_provided_command",
"=",
"[",
"]",
",",
"additional_paths",
"=",
"[",
"]",
",",
"path_last",
"=",
"False",
")",
":",
"assert",
"isinstance",
"(",
"toolset",
",",
"basestring",
")",
"asse... | Same as get_invocation_command_nodefault, except that if no tool is found,
returns either the user-provided-command, if present, or the 'tool' parameter. | [
"Same",
"as",
"get_invocation_command_nodefault",
"except",
"that",
"if",
"no",
"tool",
"is",
"found",
"returns",
"either",
"the",
"user",
"-",
"provided",
"-",
"command",
"if",
"present",
"or",
"the",
"tool",
"parameter",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/tools/common.py#L323-L347 |
29,201 | apple/turicreate | deps/src/boost_1_68_0/tools/build/src/tools/common.py | get_absolute_tool_path | def get_absolute_tool_path(command):
"""
Given an invocation command,
return the absolute path to the command. This works even if commnad
has not path element and is present in PATH.
"""
assert isinstance(command, basestring)
if os.path.dirname(command):
return os.path.di... | python | def get_absolute_tool_path(command):
"""
Given an invocation command,
return the absolute path to the command. This works even if commnad
has not path element and is present in PATH.
"""
assert isinstance(command, basestring)
if os.path.dirname(command):
return os.path.di... | [
"def",
"get_absolute_tool_path",
"(",
"command",
")",
":",
"assert",
"isinstance",
"(",
"command",
",",
"basestring",
")",
"if",
"os",
".",
"path",
".",
"dirname",
"(",
"command",
")",
":",
"return",
"os",
".",
"path",
".",
"dirname",
"(",
"command",
")"... | Given an invocation command,
return the absolute path to the command. This works even if commnad
has not path element and is present in PATH. | [
"Given",
"an",
"invocation",
"command",
"return",
"the",
"absolute",
"path",
"to",
"the",
"command",
".",
"This",
"works",
"even",
"if",
"commnad",
"has",
"not",
"path",
"element",
"and",
"is",
"present",
"in",
"PATH",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/tools/common.py#L350-L366 |
29,202 | apple/turicreate | deps/src/boost_1_68_0/tools/build/src/tools/common.py | check_tool_aux | def check_tool_aux(command):
""" Checks if 'command' can be found either in path
or is a full name to an existing file.
"""
assert isinstance(command, basestring)
dirname = os.path.dirname(command)
if dirname:
if os.path.exists(command):
return command
# Both NT a... | python | def check_tool_aux(command):
""" Checks if 'command' can be found either in path
or is a full name to an existing file.
"""
assert isinstance(command, basestring)
dirname = os.path.dirname(command)
if dirname:
if os.path.exists(command):
return command
# Both NT a... | [
"def",
"check_tool_aux",
"(",
"command",
")",
":",
"assert",
"isinstance",
"(",
"command",
",",
"basestring",
")",
"dirname",
"=",
"os",
".",
"path",
".",
"dirname",
"(",
"command",
")",
"if",
"dirname",
":",
"if",
"os",
".",
"path",
".",
"exists",
"("... | Checks if 'command' can be found either in path
or is a full name to an existing file. | [
"Checks",
"if",
"command",
"can",
"be",
"found",
"either",
"in",
"path",
"or",
"is",
"a",
"full",
"name",
"to",
"an",
"existing",
"file",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/tools/common.py#L404-L422 |
29,203 | apple/turicreate | deps/src/boost_1_68_0/tools/build/src/tools/common.py | check_tool | def check_tool(command):
""" Checks that a tool can be invoked by 'command'.
If command is not an absolute path, checks if it can be found in 'path'.
If comand is absolute path, check that it exists. Returns 'command'
if ok and empty string otherwise.
"""
assert is_iterable_typed(com... | python | def check_tool(command):
""" Checks that a tool can be invoked by 'command'.
If command is not an absolute path, checks if it can be found in 'path'.
If comand is absolute path, check that it exists. Returns 'command'
if ok and empty string otherwise.
"""
assert is_iterable_typed(com... | [
"def",
"check_tool",
"(",
"command",
")",
":",
"assert",
"is_iterable_typed",
"(",
"command",
",",
"basestring",
")",
"#FIXME: why do we check the first and last elements????",
"if",
"check_tool_aux",
"(",
"command",
"[",
"0",
"]",
")",
"or",
"check_tool_aux",
"(",
... | Checks that a tool can be invoked by 'command'.
If command is not an absolute path, checks if it can be found in 'path'.
If comand is absolute path, check that it exists. Returns 'command'
if ok and empty string otherwise. | [
"Checks",
"that",
"a",
"tool",
"can",
"be",
"invoked",
"by",
"command",
".",
"If",
"command",
"is",
"not",
"an",
"absolute",
"path",
"checks",
"if",
"it",
"can",
"be",
"found",
"in",
"path",
".",
"If",
"comand",
"is",
"absolute",
"path",
"check",
"that... | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/tools/common.py#L425-L434 |
29,204 | apple/turicreate | deps/src/boost_1_68_0/tools/build/src/tools/common.py | get_program_files_dir | def get_program_files_dir():
""" returns the location of the "program files" directory on a windows
platform
"""
ProgramFiles = bjam.variable("ProgramFiles")
if ProgramFiles:
ProgramFiles = ' '.join(ProgramFiles)
else:
ProgramFiles = "c:\\Program Files"
return ProgramFile... | python | def get_program_files_dir():
""" returns the location of the "program files" directory on a windows
platform
"""
ProgramFiles = bjam.variable("ProgramFiles")
if ProgramFiles:
ProgramFiles = ' '.join(ProgramFiles)
else:
ProgramFiles = "c:\\Program Files"
return ProgramFile... | [
"def",
"get_program_files_dir",
"(",
")",
":",
"ProgramFiles",
"=",
"bjam",
".",
"variable",
"(",
"\"ProgramFiles\"",
")",
"if",
"ProgramFiles",
":",
"ProgramFiles",
"=",
"' '",
".",
"join",
"(",
"ProgramFiles",
")",
"else",
":",
"ProgramFiles",
"=",
"\"c:\\\\... | returns the location of the "program files" directory on a windows
platform | [
"returns",
"the",
"location",
"of",
"the",
"program",
"files",
"directory",
"on",
"a",
"windows",
"platform"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/tools/common.py#L461-L470 |
29,205 | apple/turicreate | deps/src/boost_1_68_0/tools/build/src/tools/common.py | variable_setting_command | def variable_setting_command(variable, value):
"""
Returns the command needed to set an environment variable on the current
platform. The variable setting persists through all following commands and is
visible in the environment seen by subsequently executed commands. In other
words,... | python | def variable_setting_command(variable, value):
"""
Returns the command needed to set an environment variable on the current
platform. The variable setting persists through all following commands and is
visible in the environment seen by subsequently executed commands. In other
words,... | [
"def",
"variable_setting_command",
"(",
"variable",
",",
"value",
")",
":",
"assert",
"isinstance",
"(",
"variable",
",",
"basestring",
")",
"assert",
"isinstance",
"(",
"value",
",",
"basestring",
")",
"if",
"os_name",
"(",
")",
"==",
"'NT'",
":",
"return",... | Returns the command needed to set an environment variable on the current
platform. The variable setting persists through all following commands and is
visible in the environment seen by subsequently executed commands. In other
words, on Unix systems, the variable is exported, which is consistent... | [
"Returns",
"the",
"command",
"needed",
"to",
"set",
"an",
"environment",
"variable",
"on",
"the",
"current",
"platform",
".",
"The",
"variable",
"setting",
"persists",
"through",
"all",
"following",
"commands",
"and",
"is",
"visible",
"in",
"the",
"environment",... | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/tools/common.py#L481-L525 |
29,206 | apple/turicreate | deps/src/boost_1_68_0/tools/build/src/tools/common.py | path_variable_setting_command | def path_variable_setting_command(variable, paths):
"""
Returns a command to sets a named shell path variable to the given NATIVE
paths on the current platform.
"""
assert isinstance(variable, basestring)
assert is_iterable_typed(paths, basestring)
sep = os.path.pathsep
return va... | python | def path_variable_setting_command(variable, paths):
"""
Returns a command to sets a named shell path variable to the given NATIVE
paths on the current platform.
"""
assert isinstance(variable, basestring)
assert is_iterable_typed(paths, basestring)
sep = os.path.pathsep
return va... | [
"def",
"path_variable_setting_command",
"(",
"variable",
",",
"paths",
")",
":",
"assert",
"isinstance",
"(",
"variable",
",",
"basestring",
")",
"assert",
"is_iterable_typed",
"(",
"paths",
",",
"basestring",
")",
"sep",
"=",
"os",
".",
"path",
".",
"pathsep"... | Returns a command to sets a named shell path variable to the given NATIVE
paths on the current platform. | [
"Returns",
"a",
"command",
"to",
"sets",
"a",
"named",
"shell",
"path",
"variable",
"to",
"the",
"given",
"NATIVE",
"paths",
"on",
"the",
"current",
"platform",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/tools/common.py#L527-L535 |
29,207 | apple/turicreate | deps/src/boost_1_68_0/tools/build/src/tools/common.py | prepend_path_variable_command | def prepend_path_variable_command(variable, paths):
"""
Returns a command that prepends the given paths to the named path variable on
the current platform.
"""
assert isinstance(variable, basestring)
assert is_iterable_typed(paths, basestring)
return path_variable_setting_command(
... | python | def prepend_path_variable_command(variable, paths):
"""
Returns a command that prepends the given paths to the named path variable on
the current platform.
"""
assert isinstance(variable, basestring)
assert is_iterable_typed(paths, basestring)
return path_variable_setting_command(
... | [
"def",
"prepend_path_variable_command",
"(",
"variable",
",",
"paths",
")",
":",
"assert",
"isinstance",
"(",
"variable",
",",
"basestring",
")",
"assert",
"is_iterable_typed",
"(",
"paths",
",",
"basestring",
")",
"return",
"path_variable_setting_command",
"(",
"va... | Returns a command that prepends the given paths to the named path variable on
the current platform. | [
"Returns",
"a",
"command",
"that",
"prepends",
"the",
"given",
"paths",
"to",
"the",
"named",
"path",
"variable",
"on",
"the",
"current",
"platform",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/tools/common.py#L537-L545 |
29,208 | apple/turicreate | deps/src/boost_1_68_0/tools/build/src/tools/common.py | format_name | def format_name(format, name, target_type, prop_set):
""" Given a target, as given to a custom tag rule, returns a string formatted
according to the passed format. Format is a list of properties that is
represented in the result. For each element of format the corresponding target
informatio... | python | def format_name(format, name, target_type, prop_set):
""" Given a target, as given to a custom tag rule, returns a string formatted
according to the passed format. Format is a list of properties that is
represented in the result. For each element of format the corresponding target
informatio... | [
"def",
"format_name",
"(",
"format",
",",
"name",
",",
"target_type",
",",
"prop_set",
")",
":",
"if",
"__debug__",
":",
"from",
".",
".",
"build",
".",
"property_set",
"import",
"PropertySet",
"assert",
"is_iterable_typed",
"(",
"format",
",",
"basestring",
... | Given a target, as given to a custom tag rule, returns a string formatted
according to the passed format. Format is a list of properties that is
represented in the result. For each element of format the corresponding target
information is obtained and added to the result string. For all, but the... | [
"Given",
"a",
"target",
"as",
"given",
"to",
"a",
"custom",
"tag",
"rule",
"returns",
"a",
"string",
"formatted",
"according",
"to",
"the",
"passed",
"format",
".",
"Format",
"is",
"a",
"list",
"of",
"properties",
"that",
"is",
"represented",
"in",
"the",
... | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/tools/common.py#L607-L697 |
29,209 | apple/turicreate | deps/src/boost_1_68_0/tools/build/src/tools/common.py | Configurations.register | def register(self, id):
"""
Registers a configuration.
Returns True if the configuration has been added and False if
it already exists. Reports an error if the configuration is 'used'.
"""
assert isinstance(id, basestring)
if id in self.used_:
... | python | def register(self, id):
"""
Registers a configuration.
Returns True if the configuration has been added and False if
it already exists. Reports an error if the configuration is 'used'.
"""
assert isinstance(id, basestring)
if id in self.used_:
... | [
"def",
"register",
"(",
"self",
",",
"id",
")",
":",
"assert",
"isinstance",
"(",
"id",
",",
"basestring",
")",
"if",
"id",
"in",
"self",
".",
"used_",
":",
"#FIXME",
"errors",
".",
"error",
"(",
"\"common: the configuration '$(id)' is in use\"",
")",
"if",
... | Registers a configuration.
Returns True if the configuration has been added and False if
it already exists. Reports an error if the configuration is 'used'. | [
"Registers",
"a",
"configuration",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/tools/common.py#L108-L126 |
29,210 | apple/turicreate | deps/src/boost_1_68_0/tools/build/src/tools/common.py | Configurations.get | def get(self, id, param):
""" Returns the value of a configuration parameter. """
assert isinstance(id, basestring)
assert isinstance(param, basestring)
return self.params_.get(param, {}).get(id) | python | def get(self, id, param):
""" Returns the value of a configuration parameter. """
assert isinstance(id, basestring)
assert isinstance(param, basestring)
return self.params_.get(param, {}).get(id) | [
"def",
"get",
"(",
"self",
",",
"id",
",",
"param",
")",
":",
"assert",
"isinstance",
"(",
"id",
",",
"basestring",
")",
"assert",
"isinstance",
"(",
"param",
",",
"basestring",
")",
"return",
"self",
".",
"params_",
".",
"get",
"(",
"param",
",",
"{... | Returns the value of a configuration parameter. | [
"Returns",
"the",
"value",
"of",
"a",
"configuration",
"parameter",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/tools/common.py#L157-L161 |
29,211 | apple/turicreate | deps/src/boost_1_68_0/tools/build/src/tools/common.py | Configurations.set | def set (self, id, param, value):
""" Sets the value of a configuration parameter. """
assert isinstance(id, basestring)
assert isinstance(param, basestring)
assert is_iterable_typed(value, basestring)
self.params_.setdefault(param, {})[id] = value | python | def set (self, id, param, value):
""" Sets the value of a configuration parameter. """
assert isinstance(id, basestring)
assert isinstance(param, basestring)
assert is_iterable_typed(value, basestring)
self.params_.setdefault(param, {})[id] = value | [
"def",
"set",
"(",
"self",
",",
"id",
",",
"param",
",",
"value",
")",
":",
"assert",
"isinstance",
"(",
"id",
",",
"basestring",
")",
"assert",
"isinstance",
"(",
"param",
",",
"basestring",
")",
"assert",
"is_iterable_typed",
"(",
"value",
",",
"basest... | Sets the value of a configuration parameter. | [
"Sets",
"the",
"value",
"of",
"a",
"configuration",
"parameter",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/boost_1_68_0/tools/build/src/tools/common.py#L163-L168 |
29,212 | apple/turicreate | src/unity/python/turicreate/toolkits/_mxnet/_mxnet_utils.py | get_gpus_in_use | def get_gpus_in_use(max_devices=None):
"""
Like get_num_gpus_in_use, but returns a list of dictionaries with just
queried GPU information.
"""
from turicreate.util import _get_cuda_gpus
gpu_indices = get_gpu_ids_in_use(max_devices=max_devices)
gpus = _get_cuda_gpus()
return [gpus[index] ... | python | def get_gpus_in_use(max_devices=None):
"""
Like get_num_gpus_in_use, but returns a list of dictionaries with just
queried GPU information.
"""
from turicreate.util import _get_cuda_gpus
gpu_indices = get_gpu_ids_in_use(max_devices=max_devices)
gpus = _get_cuda_gpus()
return [gpus[index] ... | [
"def",
"get_gpus_in_use",
"(",
"max_devices",
"=",
"None",
")",
":",
"from",
"turicreate",
".",
"util",
"import",
"_get_cuda_gpus",
"gpu_indices",
"=",
"get_gpu_ids_in_use",
"(",
"max_devices",
"=",
"max_devices",
")",
"gpus",
"=",
"_get_cuda_gpus",
"(",
")",
"r... | Like get_num_gpus_in_use, but returns a list of dictionaries with just
queried GPU information. | [
"Like",
"get_num_gpus_in_use",
"but",
"returns",
"a",
"list",
"of",
"dictionaries",
"with",
"just",
"queried",
"GPU",
"information",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/_mxnet/_mxnet_utils.py#L100-L108 |
29,213 | apple/turicreate | src/unity/python/turicreate/_sys_util.py | make_unity_server_env | def make_unity_server_env():
"""
Returns the environment for unity_server.
The environment is necessary to start the unity_server
by setting the proper environments for shared libraries,
hadoop classpath, and module search paths for python lambda workers.
The environment has 3 components:
... | python | def make_unity_server_env():
"""
Returns the environment for unity_server.
The environment is necessary to start the unity_server
by setting the proper environments for shared libraries,
hadoop classpath, and module search paths for python lambda workers.
The environment has 3 components:
... | [
"def",
"make_unity_server_env",
"(",
")",
":",
"env",
"=",
"os",
".",
"environ",
".",
"copy",
"(",
")",
"# Add hadoop class path",
"classpath",
"=",
"get_hadoop_class_path",
"(",
")",
"if",
"(",
"\"CLASSPATH\"",
"in",
"env",
")",
":",
"env",
"[",
"\"CLASSPAT... | Returns the environment for unity_server.
The environment is necessary to start the unity_server
by setting the proper environments for shared libraries,
hadoop classpath, and module search paths for python lambda workers.
The environment has 3 components:
1. CLASSPATH, contains hadoop class path
... | [
"Returns",
"the",
"environment",
"for",
"unity_server",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/_sys_util.py#L22-L86 |
29,214 | apple/turicreate | src/unity/python/turicreate/_sys_util.py | set_windows_dll_path | def set_windows_dll_path():
"""
Sets the dll load path so that things are resolved correctly.
"""
lib_path = os.path.dirname(os.path.abspath(_pylambda_worker.__file__))
lib_path = os.path.abspath(os.path.join(lib_path, os.pardir))
def errcheck_bool(result, func, args):
if not result:
... | python | def set_windows_dll_path():
"""
Sets the dll load path so that things are resolved correctly.
"""
lib_path = os.path.dirname(os.path.abspath(_pylambda_worker.__file__))
lib_path = os.path.abspath(os.path.join(lib_path, os.pardir))
def errcheck_bool(result, func, args):
if not result:
... | [
"def",
"set_windows_dll_path",
"(",
")",
":",
"lib_path",
"=",
"os",
".",
"path",
".",
"dirname",
"(",
"os",
".",
"path",
".",
"abspath",
"(",
"_pylambda_worker",
".",
"__file__",
")",
")",
"lib_path",
"=",
"os",
".",
"path",
".",
"abspath",
"(",
"os",... | Sets the dll load path so that things are resolved correctly. | [
"Sets",
"the",
"dll",
"load",
"path",
"so",
"that",
"things",
"are",
"resolved",
"correctly",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/_sys_util.py#L88-L117 |
29,215 | apple/turicreate | src/unity/python/turicreate/_sys_util.py | get_library_name | def get_library_name():
"""
Returns either sframe or turicreate depending on which library
this file is bundled with.
"""
from os.path import split, abspath
__lib_name = split(split(abspath(sys.modules[__name__].__file__))[0])[1]
assert __lib_name in ["sframe", "turicreate"]
return __... | python | def get_library_name():
"""
Returns either sframe or turicreate depending on which library
this file is bundled with.
"""
from os.path import split, abspath
__lib_name = split(split(abspath(sys.modules[__name__].__file__))[0])[1]
assert __lib_name in ["sframe", "turicreate"]
return __... | [
"def",
"get_library_name",
"(",
")",
":",
"from",
"os",
".",
"path",
"import",
"split",
",",
"abspath",
"__lib_name",
"=",
"split",
"(",
"split",
"(",
"abspath",
"(",
"sys",
".",
"modules",
"[",
"__name__",
"]",
".",
"__file__",
")",
")",
"[",
"0",
"... | Returns either sframe or turicreate depending on which library
this file is bundled with. | [
"Returns",
"either",
"sframe",
"or",
"turicreate",
"depending",
"on",
"which",
"library",
"this",
"file",
"is",
"bundled",
"with",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/_sys_util.py#L452-L463 |
29,216 | apple/turicreate | src/unity/python/turicreate/_sys_util.py | get_config_file | def get_config_file():
"""
Returns the file name of the config file from which the environment
variables are written.
"""
import os
from os.path import abspath, expanduser, join, exists
__lib_name = get_library_name()
assert __lib_name in ["sframe", "turicreate"]
__default_config_... | python | def get_config_file():
"""
Returns the file name of the config file from which the environment
variables are written.
"""
import os
from os.path import abspath, expanduser, join, exists
__lib_name = get_library_name()
assert __lib_name in ["sframe", "turicreate"]
__default_config_... | [
"def",
"get_config_file",
"(",
")",
":",
"import",
"os",
"from",
"os",
".",
"path",
"import",
"abspath",
",",
"expanduser",
",",
"join",
",",
"exists",
"__lib_name",
"=",
"get_library_name",
"(",
")",
"assert",
"__lib_name",
"in",
"[",
"\"sframe\"",
",",
"... | Returns the file name of the config file from which the environment
variables are written. | [
"Returns",
"the",
"file",
"name",
"of",
"the",
"config",
"file",
"from",
"which",
"the",
"environment",
"variables",
"are",
"written",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/_sys_util.py#L466-L488 |
29,217 | apple/turicreate | src/unity/python/turicreate/_sys_util.py | setup_environment_from_config_file | def setup_environment_from_config_file():
"""
Imports the environmental configuration settings from the
config file, if present, and sets the environment
variables to test it.
"""
from os.path import exists
config_file = get_config_file()
if not exists(config_file):
return
... | python | def setup_environment_from_config_file():
"""
Imports the environmental configuration settings from the
config file, if present, and sets the environment
variables to test it.
"""
from os.path import exists
config_file = get_config_file()
if not exists(config_file):
return
... | [
"def",
"setup_environment_from_config_file",
"(",
")",
":",
"from",
"os",
".",
"path",
"import",
"exists",
"config_file",
"=",
"get_config_file",
"(",
")",
"if",
"not",
"exists",
"(",
"config_file",
")",
":",
"return",
"try",
":",
"config",
"=",
"_ConfigParser... | Imports the environmental configuration settings from the
config file, if present, and sets the environment
variables to test it. | [
"Imports",
"the",
"environmental",
"configuration",
"settings",
"from",
"the",
"config",
"file",
"if",
"present",
"and",
"sets",
"the",
"environment",
"variables",
"to",
"test",
"it",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/_sys_util.py#L491-L522 |
29,218 | apple/turicreate | src/unity/python/turicreate/_sys_util.py | write_config_file_value | def write_config_file_value(key, value):
"""
Writes an environment variable configuration to the current
config file. This will be read in on the next restart.
The config file is created if not present.
Note: The variables will not take effect until after restart.
"""
filename = get_confi... | python | def write_config_file_value(key, value):
"""
Writes an environment variable configuration to the current
config file. This will be read in on the next restart.
The config file is created if not present.
Note: The variables will not take effect until after restart.
"""
filename = get_confi... | [
"def",
"write_config_file_value",
"(",
"key",
",",
"value",
")",
":",
"filename",
"=",
"get_config_file",
"(",
")",
"config",
"=",
"_ConfigParser",
".",
"SafeConfigParser",
"(",
")",
"config",
".",
"read",
"(",
"filename",
")",
"__section",
"=",
"\"Environment... | Writes an environment variable configuration to the current
config file. This will be read in on the next restart.
The config file is created if not present.
Note: The variables will not take effect until after restart. | [
"Writes",
"an",
"environment",
"variable",
"configuration",
"to",
"the",
"current",
"config",
"file",
".",
"This",
"will",
"be",
"read",
"in",
"on",
"the",
"next",
"restart",
".",
"The",
"config",
"file",
"is",
"created",
"if",
"not",
"present",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/_sys_util.py#L525-L547 |
29,219 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/service_reflection.py | _ServiceBuilder.BuildService | def BuildService(self, cls):
"""Constructs the service class.
Args:
cls: The class that will be constructed.
"""
# CallMethod needs to operate with an instance of the Service class. This
# internal wrapper function exists only to be able to pass the service
# instance to the method that ... | python | def BuildService(self, cls):
"""Constructs the service class.
Args:
cls: The class that will be constructed.
"""
# CallMethod needs to operate with an instance of the Service class. This
# internal wrapper function exists only to be able to pass the service
# instance to the method that ... | [
"def",
"BuildService",
"(",
"self",
",",
"cls",
")",
":",
"# CallMethod needs to operate with an instance of the Service class. This",
"# internal wrapper function exists only to be able to pass the service",
"# instance to the method that does the real CallMethod work.",
"def",
"_WrapCallMe... | Constructs the service class.
Args:
cls: The class that will be constructed. | [
"Constructs",
"the",
"service",
"class",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/service_reflection.py#L133-L154 |
29,220 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/service_reflection.py | _ServiceBuilder._CallMethod | def _CallMethod(self, srvc, method_descriptor,
rpc_controller, request, callback):
"""Calls the method described by a given method descriptor.
Args:
srvc: Instance of the service for which this method is called.
method_descriptor: Descriptor that represent the method to call.
... | python | def _CallMethod(self, srvc, method_descriptor,
rpc_controller, request, callback):
"""Calls the method described by a given method descriptor.
Args:
srvc: Instance of the service for which this method is called.
method_descriptor: Descriptor that represent the method to call.
... | [
"def",
"_CallMethod",
"(",
"self",
",",
"srvc",
",",
"method_descriptor",
",",
"rpc_controller",
",",
"request",
",",
"callback",
")",
":",
"if",
"method_descriptor",
".",
"containing_service",
"!=",
"self",
".",
"descriptor",
":",
"raise",
"RuntimeError",
"(",
... | Calls the method described by a given method descriptor.
Args:
srvc: Instance of the service for which this method is called.
method_descriptor: Descriptor that represent the method to call.
rpc_controller: RPC controller to use for this method's execution.
request: Request protocol message... | [
"Calls",
"the",
"method",
"described",
"by",
"a",
"given",
"method",
"descriptor",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/service_reflection.py#L156-L171 |
29,221 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/service_reflection.py | _ServiceBuilder._GetRequestClass | def _GetRequestClass(self, method_descriptor):
"""Returns the class of the request protocol message.
Args:
method_descriptor: Descriptor of the method for which to return the
request protocol message class.
Returns:
A class that represents the input protocol message of the specified
... | python | def _GetRequestClass(self, method_descriptor):
"""Returns the class of the request protocol message.
Args:
method_descriptor: Descriptor of the method for which to return the
request protocol message class.
Returns:
A class that represents the input protocol message of the specified
... | [
"def",
"_GetRequestClass",
"(",
"self",
",",
"method_descriptor",
")",
":",
"if",
"method_descriptor",
".",
"containing_service",
"!=",
"self",
".",
"descriptor",
":",
"raise",
"RuntimeError",
"(",
"'GetRequestClass() given method descriptor for wrong service type.'",
")",
... | Returns the class of the request protocol message.
Args:
method_descriptor: Descriptor of the method for which to return the
request protocol message class.
Returns:
A class that represents the input protocol message of the specified
method. | [
"Returns",
"the",
"class",
"of",
"the",
"request",
"protocol",
"message",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/service_reflection.py#L173-L187 |
29,222 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/service_reflection.py | _ServiceBuilder._GetResponseClass | def _GetResponseClass(self, method_descriptor):
"""Returns the class of the response protocol message.
Args:
method_descriptor: Descriptor of the method for which to return the
response protocol message class.
Returns:
A class that represents the output protocol message of the specifie... | python | def _GetResponseClass(self, method_descriptor):
"""Returns the class of the response protocol message.
Args:
method_descriptor: Descriptor of the method for which to return the
response protocol message class.
Returns:
A class that represents the output protocol message of the specifie... | [
"def",
"_GetResponseClass",
"(",
"self",
",",
"method_descriptor",
")",
":",
"if",
"method_descriptor",
".",
"containing_service",
"!=",
"self",
".",
"descriptor",
":",
"raise",
"RuntimeError",
"(",
"'GetResponseClass() given method descriptor for wrong service type.'",
")"... | Returns the class of the response protocol message.
Args:
method_descriptor: Descriptor of the method for which to return the
response protocol message class.
Returns:
A class that represents the output protocol message of the specified
method. | [
"Returns",
"the",
"class",
"of",
"the",
"response",
"protocol",
"message",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/service_reflection.py#L189-L203 |
29,223 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/service_reflection.py | _ServiceBuilder._GenerateNonImplementedMethod | def _GenerateNonImplementedMethod(self, method):
"""Generates and returns a method that can be set for a service methods.
Args:
method: Descriptor of the service method for which a method is to be
generated.
Returns:
A method that can be added to the service class.
"""
return l... | python | def _GenerateNonImplementedMethod(self, method):
"""Generates and returns a method that can be set for a service methods.
Args:
method: Descriptor of the service method for which a method is to be
generated.
Returns:
A method that can be added to the service class.
"""
return l... | [
"def",
"_GenerateNonImplementedMethod",
"(",
"self",
",",
"method",
")",
":",
"return",
"lambda",
"inst",
",",
"rpc_controller",
",",
"request",
",",
"callback",
":",
"(",
"self",
".",
"_NonImplementedMethod",
"(",
"method",
".",
"name",
",",
"rpc_controller",
... | Generates and returns a method that can be set for a service methods.
Args:
method: Descriptor of the service method for which a method is to be
generated.
Returns:
A method that can be added to the service class. | [
"Generates",
"and",
"returns",
"a",
"method",
"that",
"can",
"be",
"set",
"for",
"a",
"service",
"methods",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/service_reflection.py#L205-L216 |
29,224 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/service_reflection.py | _ServiceStubBuilder.BuildServiceStub | def BuildServiceStub(self, cls):
"""Constructs the stub class.
Args:
cls: The class that will be constructed.
"""
def _ServiceStubInit(stub, rpc_channel):
stub.rpc_channel = rpc_channel
self.cls = cls
cls.__init__ = _ServiceStubInit
for method in self.descriptor.methods:
... | python | def BuildServiceStub(self, cls):
"""Constructs the stub class.
Args:
cls: The class that will be constructed.
"""
def _ServiceStubInit(stub, rpc_channel):
stub.rpc_channel = rpc_channel
self.cls = cls
cls.__init__ = _ServiceStubInit
for method in self.descriptor.methods:
... | [
"def",
"BuildServiceStub",
"(",
"self",
",",
"cls",
")",
":",
"def",
"_ServiceStubInit",
"(",
"stub",
",",
"rpc_channel",
")",
":",
"stub",
".",
"rpc_channel",
"=",
"rpc_channel",
"self",
".",
"cls",
"=",
"cls",
"cls",
".",
"__init__",
"=",
"_ServiceStubIn... | Constructs the stub class.
Args:
cls: The class that will be constructed. | [
"Constructs",
"the",
"stub",
"class",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/service_reflection.py#L251-L263 |
29,225 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/service_reflection.py | _ServiceStubBuilder._StubMethod | def _StubMethod(self, stub, method_descriptor,
rpc_controller, request, callback):
"""The body of all service methods in the generated stub class.
Args:
stub: Stub instance.
method_descriptor: Descriptor of the invoked method.
rpc_controller: Rpc controller to execute the me... | python | def _StubMethod(self, stub, method_descriptor,
rpc_controller, request, callback):
"""The body of all service methods in the generated stub class.
Args:
stub: Stub instance.
method_descriptor: Descriptor of the invoked method.
rpc_controller: Rpc controller to execute the me... | [
"def",
"_StubMethod",
"(",
"self",
",",
"stub",
",",
"method_descriptor",
",",
"rpc_controller",
",",
"request",
",",
"callback",
")",
":",
"return",
"stub",
".",
"rpc_channel",
".",
"CallMethod",
"(",
"method_descriptor",
",",
"rpc_controller",
",",
"request",
... | The body of all service methods in the generated stub class.
Args:
stub: Stub instance.
method_descriptor: Descriptor of the invoked method.
rpc_controller: Rpc controller to execute the method.
request: Request protocol message.
callback: A callback to execute when the method finishe... | [
"The",
"body",
"of",
"all",
"service",
"methods",
"in",
"the",
"generated",
"stub",
"class",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/service_reflection.py#L269-L284 |
29,226 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py | _BuildMessageFromTypeName | def _BuildMessageFromTypeName(type_name, descriptor_pool):
"""Returns a protobuf message instance.
Args:
type_name: Fully-qualified protobuf message type name string.
descriptor_pool: DescriptorPool instance.
Returns:
A Message instance of type matching type_name, or None if the a Descriptor
wa... | python | def _BuildMessageFromTypeName(type_name, descriptor_pool):
"""Returns a protobuf message instance.
Args:
type_name: Fully-qualified protobuf message type name string.
descriptor_pool: DescriptorPool instance.
Returns:
A Message instance of type matching type_name, or None if the a Descriptor
wa... | [
"def",
"_BuildMessageFromTypeName",
"(",
"type_name",
",",
"descriptor_pool",
")",
":",
"# pylint: disable=g-import-not-at-top",
"from",
"google",
".",
"protobuf",
"import",
"symbol_database",
"database",
"=",
"symbol_database",
".",
"Default",
"(",
")",
"try",
":",
"... | Returns a protobuf message instance.
Args:
type_name: Fully-qualified protobuf message type name string.
descriptor_pool: DescriptorPool instance.
Returns:
A Message instance of type matching type_name, or None if the a Descriptor
wasn't found matching type_name. | [
"Returns",
"a",
"protobuf",
"message",
"instance",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L219-L238 |
29,227 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py | _SkipFieldMessage | def _SkipFieldMessage(tokenizer):
"""Skips over a field message.
Args:
tokenizer: A tokenizer to parse the field name and values.
"""
if tokenizer.TryConsume('<'):
delimiter = '>'
else:
tokenizer.Consume('{')
delimiter = '}'
while not tokenizer.LookingAt('>') and not tokenizer.LookingAt('... | python | def _SkipFieldMessage(tokenizer):
"""Skips over a field message.
Args:
tokenizer: A tokenizer to parse the field name and values.
"""
if tokenizer.TryConsume('<'):
delimiter = '>'
else:
tokenizer.Consume('{')
delimiter = '}'
while not tokenizer.LookingAt('>') and not tokenizer.LookingAt('... | [
"def",
"_SkipFieldMessage",
"(",
"tokenizer",
")",
":",
"if",
"tokenizer",
".",
"TryConsume",
"(",
"'<'",
")",
":",
"delimiter",
"=",
"'>'",
"else",
":",
"tokenizer",
".",
"Consume",
"(",
"'{'",
")",
"delimiter",
"=",
"'}'",
"while",
"not",
"tokenizer",
... | Skips over a field message.
Args:
tokenizer: A tokenizer to parse the field name and values. | [
"Skips",
"over",
"a",
"field",
"message",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L890-L906 |
29,228 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py | _SkipFieldValue | def _SkipFieldValue(tokenizer):
"""Skips over a field value.
Args:
tokenizer: A tokenizer to parse the field name and values.
Raises:
ParseError: In case an invalid field value is found.
"""
# String/bytes tokens can come in multiple adjacent string literals.
# If we can consume one, consume as ma... | python | def _SkipFieldValue(tokenizer):
"""Skips over a field value.
Args:
tokenizer: A tokenizer to parse the field name and values.
Raises:
ParseError: In case an invalid field value is found.
"""
# String/bytes tokens can come in multiple adjacent string literals.
# If we can consume one, consume as ma... | [
"def",
"_SkipFieldValue",
"(",
"tokenizer",
")",
":",
"# String/bytes tokens can come in multiple adjacent string literals.",
"# If we can consume one, consume as many as we can.",
"if",
"tokenizer",
".",
"TryConsumeByteString",
"(",
")",
":",
"while",
"tokenizer",
".",
"TryConsu... | Skips over a field value.
Args:
tokenizer: A tokenizer to parse the field name and values.
Raises:
ParseError: In case an invalid field value is found. | [
"Skips",
"over",
"a",
"field",
"value",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L909-L928 |
29,229 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py | _ConsumeInteger | def _ConsumeInteger(tokenizer, is_signed=False, is_long=False):
"""Consumes an integer number from tokenizer.
Args:
tokenizer: A tokenizer used to parse the number.
is_signed: True if a signed integer must be parsed.
is_long: True if a long integer must be parsed.
Returns:
The integer parsed.
... | python | def _ConsumeInteger(tokenizer, is_signed=False, is_long=False):
"""Consumes an integer number from tokenizer.
Args:
tokenizer: A tokenizer used to parse the number.
is_signed: True if a signed integer must be parsed.
is_long: True if a long integer must be parsed.
Returns:
The integer parsed.
... | [
"def",
"_ConsumeInteger",
"(",
"tokenizer",
",",
"is_signed",
"=",
"False",
",",
"is_long",
"=",
"False",
")",
":",
"try",
":",
"result",
"=",
"ParseInteger",
"(",
"tokenizer",
".",
"token",
",",
"is_signed",
"=",
"is_signed",
",",
"is_long",
"=",
"is_long... | Consumes an integer number from tokenizer.
Args:
tokenizer: A tokenizer used to parse the number.
is_signed: True if a signed integer must be parsed.
is_long: True if a long integer must be parsed.
Returns:
The integer parsed.
Raises:
ParseError: If an integer with given characteristics cou... | [
"Consumes",
"an",
"integer",
"number",
"from",
"tokenizer",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L1359-L1378 |
29,230 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py | ParseInteger | def ParseInteger(text, is_signed=False, is_long=False):
"""Parses an integer.
Args:
text: The text to parse.
is_signed: True if a signed integer must be parsed.
is_long: True if a long integer must be parsed.
Returns:
The integer value.
Raises:
ValueError: Thrown Iff the text is not a val... | python | def ParseInteger(text, is_signed=False, is_long=False):
"""Parses an integer.
Args:
text: The text to parse.
is_signed: True if a signed integer must be parsed.
is_long: True if a long integer must be parsed.
Returns:
The integer value.
Raises:
ValueError: Thrown Iff the text is not a val... | [
"def",
"ParseInteger",
"(",
"text",
",",
"is_signed",
"=",
"False",
",",
"is_long",
"=",
"False",
")",
":",
"# Do the actual parsing. Exception handling is propagated to caller.",
"result",
"=",
"_ParseAbstractInteger",
"(",
"text",
",",
"is_long",
"=",
"is_long",
")"... | Parses an integer.
Args:
text: The text to parse.
is_signed: True if a signed integer must be parsed.
is_long: True if a long integer must be parsed.
Returns:
The integer value.
Raises:
ValueError: Thrown Iff the text is not a valid integer. | [
"Parses",
"an",
"integer",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L1381-L1401 |
29,231 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py | ParseFloat | def ParseFloat(text):
"""Parse a floating point number.
Args:
text: Text to parse.
Returns:
The number parsed.
Raises:
ValueError: If a floating point number couldn't be parsed.
"""
try:
# Assume Python compatible syntax.
return float(text)
except ValueError:
# Check alternative... | python | def ParseFloat(text):
"""Parse a floating point number.
Args:
text: Text to parse.
Returns:
The number parsed.
Raises:
ValueError: If a floating point number couldn't be parsed.
"""
try:
# Assume Python compatible syntax.
return float(text)
except ValueError:
# Check alternative... | [
"def",
"ParseFloat",
"(",
"text",
")",
":",
"try",
":",
"# Assume Python compatible syntax.",
"return",
"float",
"(",
"text",
")",
"except",
"ValueError",
":",
"# Check alternative spellings.",
"if",
"_FLOAT_INFINITY",
".",
"match",
"(",
"text",
")",
":",
"if",
... | Parse a floating point number.
Args:
text: Text to parse.
Returns:
The number parsed.
Raises:
ValueError: If a floating point number couldn't be parsed. | [
"Parse",
"a",
"floating",
"point",
"number",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L1430-L1459 |
29,232 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py | ParseEnum | def ParseEnum(field, value):
"""Parse an enum value.
The value can be specified by a number (the enum value), or by
a string literal (the enum name).
Args:
field: Enum field descriptor.
value: String value.
Returns:
Enum value number.
Raises:
ValueError: If the enum value could not be pa... | python | def ParseEnum(field, value):
"""Parse an enum value.
The value can be specified by a number (the enum value), or by
a string literal (the enum name).
Args:
field: Enum field descriptor.
value: String value.
Returns:
Enum value number.
Raises:
ValueError: If the enum value could not be pa... | [
"def",
"ParseEnum",
"(",
"field",
",",
"value",
")",
":",
"enum_descriptor",
"=",
"field",
".",
"enum_type",
"try",
":",
"number",
"=",
"int",
"(",
"value",
",",
"0",
")",
"except",
"ValueError",
":",
"# Identifier.",
"enum_value",
"=",
"enum_descriptor",
... | Parse an enum value.
The value can be specified by a number (the enum value), or by
a string literal (the enum name).
Args:
field: Enum field descriptor.
value: String value.
Returns:
Enum value number.
Raises:
ValueError: If the enum value could not be parsed. | [
"Parse",
"an",
"enum",
"value",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L1482-L1513 |
29,233 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py | _Printer._TryPrintAsAnyMessage | def _TryPrintAsAnyMessage(self, message):
"""Serializes if message is a google.protobuf.Any field."""
packed_message = _BuildMessageFromTypeName(message.TypeName(),
self.descriptor_pool)
if packed_message:
packed_message.MergeFromString(message.value)
... | python | def _TryPrintAsAnyMessage(self, message):
"""Serializes if message is a google.protobuf.Any field."""
packed_message = _BuildMessageFromTypeName(message.TypeName(),
self.descriptor_pool)
if packed_message:
packed_message.MergeFromString(message.value)
... | [
"def",
"_TryPrintAsAnyMessage",
"(",
"self",
",",
"message",
")",
":",
"packed_message",
"=",
"_BuildMessageFromTypeName",
"(",
"message",
".",
"TypeName",
"(",
")",
",",
"self",
".",
"descriptor_pool",
")",
"if",
"packed_message",
":",
"packed_message",
".",
"M... | Serializes if message is a google.protobuf.Any field. | [
"Serializes",
"if",
"message",
"is",
"a",
"google",
".",
"protobuf",
".",
"Any",
"field",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L287-L298 |
29,234 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py | _Parser.MergeLines | def MergeLines(self, lines, message):
"""Merges a text representation of a protocol message into a message."""
self._allow_multiple_scalars = True
self._ParseOrMerge(lines, message)
return message | python | def MergeLines(self, lines, message):
"""Merges a text representation of a protocol message into a message."""
self._allow_multiple_scalars = True
self._ParseOrMerge(lines, message)
return message | [
"def",
"MergeLines",
"(",
"self",
",",
"lines",
",",
"message",
")",
":",
"self",
".",
"_allow_multiple_scalars",
"=",
"True",
"self",
".",
"_ParseOrMerge",
"(",
"lines",
",",
"message",
")",
"return",
"message"
] | Merges a text representation of a protocol message into a message. | [
"Merges",
"a",
"text",
"representation",
"of",
"a",
"protocol",
"message",
"into",
"a",
"message",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L565-L569 |
29,235 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py | _Parser._ParseOrMerge | def _ParseOrMerge(self, lines, message):
"""Converts a text representation of a protocol message into a message.
Args:
lines: Lines of a message's text representation.
message: A protocol buffer message to merge into.
Raises:
ParseError: On text parsing problems.
"""
tokenizer = ... | python | def _ParseOrMerge(self, lines, message):
"""Converts a text representation of a protocol message into a message.
Args:
lines: Lines of a message's text representation.
message: A protocol buffer message to merge into.
Raises:
ParseError: On text parsing problems.
"""
tokenizer = ... | [
"def",
"_ParseOrMerge",
"(",
"self",
",",
"lines",
",",
"message",
")",
":",
"tokenizer",
"=",
"Tokenizer",
"(",
"lines",
")",
"while",
"not",
"tokenizer",
".",
"AtEnd",
"(",
")",
":",
"self",
".",
"_MergeField",
"(",
"tokenizer",
",",
"message",
")"
] | Converts a text representation of a protocol message into a message.
Args:
lines: Lines of a message's text representation.
message: A protocol buffer message to merge into.
Raises:
ParseError: On text parsing problems. | [
"Converts",
"a",
"text",
"representation",
"of",
"a",
"protocol",
"message",
"into",
"a",
"message",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L571-L583 |
29,236 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py | _Parser._ConsumeAnyTypeUrl | def _ConsumeAnyTypeUrl(self, tokenizer):
"""Consumes a google.protobuf.Any type URL and returns the type name."""
# Consume "type.googleapis.com/".
tokenizer.ConsumeIdentifier()
tokenizer.Consume('.')
tokenizer.ConsumeIdentifier()
tokenizer.Consume('.')
tokenizer.ConsumeIdentifier()
toke... | python | def _ConsumeAnyTypeUrl(self, tokenizer):
"""Consumes a google.protobuf.Any type URL and returns the type name."""
# Consume "type.googleapis.com/".
tokenizer.ConsumeIdentifier()
tokenizer.Consume('.')
tokenizer.ConsumeIdentifier()
tokenizer.Consume('.')
tokenizer.ConsumeIdentifier()
toke... | [
"def",
"_ConsumeAnyTypeUrl",
"(",
"self",
",",
"tokenizer",
")",
":",
"# Consume \"type.googleapis.com/\".",
"tokenizer",
".",
"ConsumeIdentifier",
"(",
")",
"tokenizer",
".",
"Consume",
"(",
"'.'",
")",
"tokenizer",
".",
"ConsumeIdentifier",
"(",
")",
"tokenizer",
... | Consumes a google.protobuf.Any type URL and returns the type name. | [
"Consumes",
"a",
"google",
".",
"protobuf",
".",
"Any",
"type",
"URL",
"and",
"returns",
"the",
"type",
"name",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L695-L708 |
29,237 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py | Tokenizer.TryConsume | def TryConsume(self, token):
"""Tries to consume a given piece of text.
Args:
token: Text to consume.
Returns:
True iff the text was consumed.
"""
if self.token == token:
self.NextToken()
return True
return False | python | def TryConsume(self, token):
"""Tries to consume a given piece of text.
Args:
token: Text to consume.
Returns:
True iff the text was consumed.
"""
if self.token == token:
self.NextToken()
return True
return False | [
"def",
"TryConsume",
"(",
"self",
",",
"token",
")",
":",
"if",
"self",
".",
"token",
"==",
"token",
":",
"self",
".",
"NextToken",
"(",
")",
"return",
"True",
"return",
"False"
] | Tries to consume a given piece of text.
Args:
token: Text to consume.
Returns:
True iff the text was consumed. | [
"Tries",
"to",
"consume",
"a",
"given",
"piece",
"of",
"text",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L1002-L1014 |
29,238 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py | Tokenizer.ConsumeInteger | def ConsumeInteger(self, is_long=False):
"""Consumes an integer number.
Args:
is_long: True if the value should be returned as a long integer.
Returns:
The integer parsed.
Raises:
ParseError: If an integer couldn't be consumed.
"""
try:
result = _ParseAbstractInteger(se... | python | def ConsumeInteger(self, is_long=False):
"""Consumes an integer number.
Args:
is_long: True if the value should be returned as a long integer.
Returns:
The integer parsed.
Raises:
ParseError: If an integer couldn't be consumed.
"""
try:
result = _ParseAbstractInteger(se... | [
"def",
"ConsumeInteger",
"(",
"self",
",",
"is_long",
"=",
"False",
")",
":",
"try",
":",
"result",
"=",
"_ParseAbstractInteger",
"(",
"self",
".",
"token",
",",
"is_long",
"=",
"is_long",
")",
"except",
"ValueError",
"as",
"e",
":",
"raise",
"self",
"."... | Consumes an integer number.
Args:
is_long: True if the value should be returned as a long integer.
Returns:
The integer parsed.
Raises:
ParseError: If an integer couldn't be consumed. | [
"Consumes",
"an",
"integer",
"number",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L1103-L1119 |
29,239 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py | Tokenizer.ConsumeString | def ConsumeString(self):
"""Consumes a string value.
Returns:
The string parsed.
Raises:
ParseError: If a string value couldn't be consumed.
"""
the_bytes = self.ConsumeByteString()
try:
return six.text_type(the_bytes, 'utf-8')
except UnicodeDecodeError as e:
raise ... | python | def ConsumeString(self):
"""Consumes a string value.
Returns:
The string parsed.
Raises:
ParseError: If a string value couldn't be consumed.
"""
the_bytes = self.ConsumeByteString()
try:
return six.text_type(the_bytes, 'utf-8')
except UnicodeDecodeError as e:
raise ... | [
"def",
"ConsumeString",
"(",
"self",
")",
":",
"the_bytes",
"=",
"self",
".",
"ConsumeByteString",
"(",
")",
"try",
":",
"return",
"six",
".",
"text_type",
"(",
"the_bytes",
",",
"'utf-8'",
")",
"except",
"UnicodeDecodeError",
"as",
"e",
":",
"raise",
"sel... | Consumes a string value.
Returns:
The string parsed.
Raises:
ParseError: If a string value couldn't be consumed. | [
"Consumes",
"a",
"string",
"value",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L1167-L1180 |
29,240 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py | Tokenizer.ConsumeByteString | def ConsumeByteString(self):
"""Consumes a byte array value.
Returns:
The array parsed (as a string).
Raises:
ParseError: If a byte array value couldn't be consumed.
"""
the_list = [self._ConsumeSingleByteString()]
while self.token and self.token[0] in _QUOTES:
the_list.appen... | python | def ConsumeByteString(self):
"""Consumes a byte array value.
Returns:
The array parsed (as a string).
Raises:
ParseError: If a byte array value couldn't be consumed.
"""
the_list = [self._ConsumeSingleByteString()]
while self.token and self.token[0] in _QUOTES:
the_list.appen... | [
"def",
"ConsumeByteString",
"(",
"self",
")",
":",
"the_list",
"=",
"[",
"self",
".",
"_ConsumeSingleByteString",
"(",
")",
"]",
"while",
"self",
".",
"token",
"and",
"self",
".",
"token",
"[",
"0",
"]",
"in",
"_QUOTES",
":",
"the_list",
".",
"append",
... | Consumes a byte array value.
Returns:
The array parsed (as a string).
Raises:
ParseError: If a byte array value couldn't be consumed. | [
"Consumes",
"a",
"byte",
"array",
"value",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L1182-L1194 |
29,241 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py | Tokenizer.NextToken | def NextToken(self):
"""Reads the next meaningful token."""
self._previous_line = self._line
self._previous_column = self._column
self._column += len(self.token)
self._SkipWhitespace()
if not self._more_lines:
self.token = ''
return
match = self._TOKEN.match(self._current_line... | python | def NextToken(self):
"""Reads the next meaningful token."""
self._previous_line = self._line
self._previous_column = self._column
self._column += len(self.token)
self._SkipWhitespace()
if not self._more_lines:
self.token = ''
return
match = self._TOKEN.match(self._current_line... | [
"def",
"NextToken",
"(",
"self",
")",
":",
"self",
".",
"_previous_line",
"=",
"self",
".",
"_line",
"self",
".",
"_previous_column",
"=",
"self",
".",
"_column",
"self",
".",
"_column",
"+=",
"len",
"(",
"self",
".",
"token",
")",
"self",
".",
"_SkipW... | Reads the next meaningful token. | [
"Reads",
"the",
"next",
"meaningful",
"token",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L1249-L1268 |
29,242 | apple/turicreate | src/unity/python/turicreate/toolkits/distances/_util.py | compute_composite_distance | def compute_composite_distance(distance, x, y):
"""
Compute the value of a composite distance function on two dictionaries,
typically SFrame rows.
Parameters
----------
distance : list[list]
A composite distance function. Composite distance functions are a
weighted sum of standa... | python | def compute_composite_distance(distance, x, y):
"""
Compute the value of a composite distance function on two dictionaries,
typically SFrame rows.
Parameters
----------
distance : list[list]
A composite distance function. Composite distance functions are a
weighted sum of standa... | [
"def",
"compute_composite_distance",
"(",
"distance",
",",
"x",
",",
"y",
")",
":",
"## Validate inputs",
"_validate_composite_distance",
"(",
"distance",
")",
"distance",
"=",
"_convert_distance_names_to_functions",
"(",
"distance",
")",
"if",
"not",
"isinstance",
"(... | Compute the value of a composite distance function on two dictionaries,
typically SFrame rows.
Parameters
----------
distance : list[list]
A composite distance function. Composite distance functions are a
weighted sum of standard distance functions, each of which applies to
its ... | [
"Compute",
"the",
"value",
"of",
"a",
"composite",
"distance",
"function",
"on",
"two",
"dictionaries",
"typically",
"SFrame",
"rows",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/distances/_util.py#L24-L126 |
29,243 | apple/turicreate | src/unity/python/turicreate/toolkits/distances/_util.py | _validate_composite_distance | def _validate_composite_distance(distance):
"""
Check that composite distance function is in valid form. Don't modify the
composite distance in any way.
"""
if not isinstance(distance, list):
raise TypeError("Input 'distance' must be a composite distance.")
if len(distance) < 1:
... | python | def _validate_composite_distance(distance):
"""
Check that composite distance function is in valid form. Don't modify the
composite distance in any way.
"""
if not isinstance(distance, list):
raise TypeError("Input 'distance' must be a composite distance.")
if len(distance) < 1:
... | [
"def",
"_validate_composite_distance",
"(",
"distance",
")",
":",
"if",
"not",
"isinstance",
"(",
"distance",
",",
"list",
")",
":",
"raise",
"TypeError",
"(",
"\"Input 'distance' must be a composite distance.\"",
")",
"if",
"len",
"(",
"distance",
")",
"<",
"1",
... | Check that composite distance function is in valid form. Don't modify the
composite distance in any way. | [
"Check",
"that",
"composite",
"distance",
"function",
"is",
"in",
"valid",
"form",
".",
"Don",
"t",
"modify",
"the",
"composite",
"distance",
"in",
"any",
"way",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/distances/_util.py#L129-L187 |
29,244 | apple/turicreate | src/unity/python/turicreate/toolkits/distances/_util.py | _scrub_composite_distance_features | def _scrub_composite_distance_features(distance, feature_blacklist):
"""
Remove feature names from the feature lists in a composite distance
function.
"""
dist_out = []
for i, d in enumerate(distance):
ftrs, dist, weight = d
new_ftrs = [x for x in ftrs if x not in feature_blackl... | python | def _scrub_composite_distance_features(distance, feature_blacklist):
"""
Remove feature names from the feature lists in a composite distance
function.
"""
dist_out = []
for i, d in enumerate(distance):
ftrs, dist, weight = d
new_ftrs = [x for x in ftrs if x not in feature_blackl... | [
"def",
"_scrub_composite_distance_features",
"(",
"distance",
",",
"feature_blacklist",
")",
":",
"dist_out",
"=",
"[",
"]",
"for",
"i",
",",
"d",
"in",
"enumerate",
"(",
"distance",
")",
":",
"ftrs",
",",
"dist",
",",
"weight",
"=",
"d",
"new_ftrs",
"=",
... | Remove feature names from the feature lists in a composite distance
function. | [
"Remove",
"feature",
"names",
"from",
"the",
"feature",
"lists",
"in",
"a",
"composite",
"distance",
"function",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/distances/_util.py#L190-L203 |
29,245 | apple/turicreate | src/unity/python/turicreate/toolkits/distances/_util.py | _convert_distance_names_to_functions | def _convert_distance_names_to_functions(distance):
"""
Convert function names in a composite distance function into function
handles.
"""
dist_out = _copy.deepcopy(distance)
for i, d in enumerate(distance):
_, dist, _ = d
if isinstance(dist, str):
try:
... | python | def _convert_distance_names_to_functions(distance):
"""
Convert function names in a composite distance function into function
handles.
"""
dist_out = _copy.deepcopy(distance)
for i, d in enumerate(distance):
_, dist, _ = d
if isinstance(dist, str):
try:
... | [
"def",
"_convert_distance_names_to_functions",
"(",
"distance",
")",
":",
"dist_out",
"=",
"_copy",
".",
"deepcopy",
"(",
"distance",
")",
"for",
"i",
",",
"d",
"in",
"enumerate",
"(",
"distance",
")",
":",
"_",
",",
"dist",
",",
"_",
"=",
"d",
"if",
"... | Convert function names in a composite distance function into function
handles. | [
"Convert",
"function",
"names",
"in",
"a",
"composite",
"distance",
"function",
"into",
"function",
"handles",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/distances/_util.py#L206-L221 |
29,246 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/message_factory.py | GetMessages | def GetMessages(file_protos):
"""Builds a dictionary of all the messages available in a set of files.
Args:
file_protos: A sequence of file protos to build messages out of.
Returns:
A dictionary mapping proto names to the message classes. This will include
any dependent messages as well as any messa... | python | def GetMessages(file_protos):
"""Builds a dictionary of all the messages available in a set of files.
Args:
file_protos: A sequence of file protos to build messages out of.
Returns:
A dictionary mapping proto names to the message classes. This will include
any dependent messages as well as any messa... | [
"def",
"GetMessages",
"(",
"file_protos",
")",
":",
"for",
"file_proto",
"in",
"file_protos",
":",
"_FACTORY",
".",
"pool",
".",
"Add",
"(",
"file_proto",
")",
"return",
"_FACTORY",
".",
"GetMessages",
"(",
"[",
"file_proto",
".",
"name",
"for",
"file_proto"... | Builds a dictionary of all the messages available in a set of files.
Args:
file_protos: A sequence of file protos to build messages out of.
Returns:
A dictionary mapping proto names to the message classes. This will include
any dependent messages as well as any messages defined in the same file as
... | [
"Builds",
"a",
"dictionary",
"of",
"all",
"the",
"messages",
"available",
"in",
"a",
"set",
"of",
"files",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/message_factory.py#L129-L142 |
29,247 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/message_factory.py | MessageFactory.GetPrototype | def GetPrototype(self, descriptor):
"""Builds a proto2 message class based on the passed in descriptor.
Passing a descriptor with a fully qualified name matching a previous
invocation will cause the same class to be returned.
Args:
descriptor: The descriptor to build from.
Returns:
A ... | python | def GetPrototype(self, descriptor):
"""Builds a proto2 message class based on the passed in descriptor.
Passing a descriptor with a fully qualified name matching a previous
invocation will cause the same class to be returned.
Args:
descriptor: The descriptor to build from.
Returns:
A ... | [
"def",
"GetPrototype",
"(",
"self",
",",
"descriptor",
")",
":",
"if",
"descriptor",
".",
"full_name",
"not",
"in",
"self",
".",
"_classes",
":",
"descriptor_name",
"=",
"descriptor",
".",
"name",
"if",
"str",
"is",
"bytes",
":",
"# PY2",
"descriptor_name",
... | Builds a proto2 message class based on the passed in descriptor.
Passing a descriptor with a fully qualified name matching a previous
invocation will cause the same class to be returned.
Args:
descriptor: The descriptor to build from.
Returns:
A class describing the passed in descriptor. | [
"Builds",
"a",
"proto2",
"message",
"class",
"based",
"on",
"the",
"passed",
"in",
"descriptor",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/message_factory.py#L57-L87 |
29,248 | apple/turicreate | src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/message_factory.py | MessageFactory.GetMessages | def GetMessages(self, files):
"""Gets all the messages from a specified file.
This will find and resolve dependencies, failing if the descriptor
pool cannot satisfy them.
Args:
files: The file names to extract messages from.
Returns:
A dictionary mapping proto names to the message cla... | python | def GetMessages(self, files):
"""Gets all the messages from a specified file.
This will find and resolve dependencies, failing if the descriptor
pool cannot satisfy them.
Args:
files: The file names to extract messages from.
Returns:
A dictionary mapping proto names to the message cla... | [
"def",
"GetMessages",
"(",
"self",
",",
"files",
")",
":",
"result",
"=",
"{",
"}",
"for",
"file_name",
"in",
"files",
":",
"file_desc",
"=",
"self",
".",
"pool",
".",
"FindFileByName",
"(",
"file_name",
")",
"for",
"desc",
"in",
"file_desc",
".",
"mes... | Gets all the messages from a specified file.
This will find and resolve dependencies, failing if the descriptor
pool cannot satisfy them.
Args:
files: The file names to extract messages from.
Returns:
A dictionary mapping proto names to the message classes. This will include
any dep... | [
"Gets",
"all",
"the",
"messages",
"from",
"a",
"specified",
"file",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/message_factory.py#L89-L123 |
29,249 | apple/turicreate | src/unity/python/turicreate/meta/decompiler/control_flow_instructions.py | refactor_ifs | def refactor_ifs(stmnt, ifs):
'''
for if statements in list comprehension
'''
if isinstance(stmnt, _ast.BoolOp):
test, right = stmnt.values
if isinstance(stmnt.op, _ast.Or):
test = _ast.UnaryOp(op=_ast.Not(), operand=test, lineno=0, col_offset=0)
ifs.append(test)
... | python | def refactor_ifs(stmnt, ifs):
'''
for if statements in list comprehension
'''
if isinstance(stmnt, _ast.BoolOp):
test, right = stmnt.values
if isinstance(stmnt.op, _ast.Or):
test = _ast.UnaryOp(op=_ast.Not(), operand=test, lineno=0, col_offset=0)
ifs.append(test)
... | [
"def",
"refactor_ifs",
"(",
"stmnt",
",",
"ifs",
")",
":",
"if",
"isinstance",
"(",
"stmnt",
",",
"_ast",
".",
"BoolOp",
")",
":",
"test",
",",
"right",
"=",
"stmnt",
".",
"values",
"if",
"isinstance",
"(",
"stmnt",
".",
"op",
",",
"_ast",
".",
"Or... | for if statements in list comprehension | [
"for",
"if",
"statements",
"in",
"list",
"comprehension"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/meta/decompiler/control_flow_instructions.py#L58-L70 |
29,250 | apple/turicreate | src/unity/python/turicreate/toolkits/object_detector/object_detector.py | _get_mps_od_net | def _get_mps_od_net(input_image_shape, batch_size, output_size, anchors,
config, weights={}):
"""
Initializes an MpsGraphAPI for object detection.
"""
network = _MpsGraphAPI(network_id=_MpsGraphNetworkType.kODGraphNet)
c_in, h_in, w_in = input_image_shape
c_out = output_siz... | python | def _get_mps_od_net(input_image_shape, batch_size, output_size, anchors,
config, weights={}):
"""
Initializes an MpsGraphAPI for object detection.
"""
network = _MpsGraphAPI(network_id=_MpsGraphNetworkType.kODGraphNet)
c_in, h_in, w_in = input_image_shape
c_out = output_siz... | [
"def",
"_get_mps_od_net",
"(",
"input_image_shape",
",",
"batch_size",
",",
"output_size",
",",
"anchors",
",",
"config",
",",
"weights",
"=",
"{",
"}",
")",
":",
"network",
"=",
"_MpsGraphAPI",
"(",
"network_id",
"=",
"_MpsGraphNetworkType",
".",
"kODGraphNet",... | Initializes an MpsGraphAPI for object detection. | [
"Initializes",
"an",
"MpsGraphAPI",
"for",
"object",
"detection",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/object_detector/object_detector.py#L44-L62 |
29,251 | apple/turicreate | src/unity/python/turicreate/toolkits/object_detector/object_detector.py | ObjectDetector.predict | def predict(self, dataset, confidence_threshold=0.25, iou_threshold=None, verbose=True):
"""
Predict object instances in an sframe of images.
Parameters
----------
dataset : SFrame | SArray | turicreate.Image
The images on which to perform object detection.
... | python | def predict(self, dataset, confidence_threshold=0.25, iou_threshold=None, verbose=True):
"""
Predict object instances in an sframe of images.
Parameters
----------
dataset : SFrame | SArray | turicreate.Image
The images on which to perform object detection.
... | [
"def",
"predict",
"(",
"self",
",",
"dataset",
",",
"confidence_threshold",
"=",
"0.25",
",",
"iou_threshold",
"=",
"None",
",",
"verbose",
"=",
"True",
")",
":",
"_numeric_param_check_range",
"(",
"'confidence_threshold'",
",",
"confidence_threshold",
",",
"0.0",... | Predict object instances in an sframe of images.
Parameters
----------
dataset : SFrame | SArray | turicreate.Image
The images on which to perform object detection.
If dataset is an SFrame, it must have a column with the same name
as the feature column during... | [
"Predict",
"object",
"instances",
"in",
"an",
"sframe",
"of",
"images",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/object_detector/object_detector.py#L934-L1004 |
29,252 | apple/turicreate | src/unity/python/turicreate/toolkits/object_detector/object_detector.py | ObjectDetector.evaluate | def evaluate(self, dataset, metric='auto',
output_type='dict', iou_threshold=None,
confidence_threshold=None, verbose=True):
"""
Evaluate the model by making predictions and comparing these to ground
truth bounding box annotations.
Parameters
----------
... | python | def evaluate(self, dataset, metric='auto',
output_type='dict', iou_threshold=None,
confidence_threshold=None, verbose=True):
"""
Evaluate the model by making predictions and comparing these to ground
truth bounding box annotations.
Parameters
----------
... | [
"def",
"evaluate",
"(",
"self",
",",
"dataset",
",",
"metric",
"=",
"'auto'",
",",
"output_type",
"=",
"'dict'",
",",
"iou_threshold",
"=",
"None",
",",
"confidence_threshold",
"=",
"None",
",",
"verbose",
"=",
"True",
")",
":",
"if",
"iou_threshold",
"is"... | Evaluate the model by making predictions and comparing these to ground
truth bounding box annotations.
Parameters
----------
dataset : SFrame
Dataset of new observations. Must include columns with the same
names as the annotations and feature used for model train... | [
"Evaluate",
"the",
"model",
"by",
"making",
"predictions",
"and",
"comparing",
"these",
"to",
"ground",
"truth",
"bounding",
"box",
"annotations",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/object_detector/object_detector.py#L1006-L1134 |
29,253 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | _xmlTextReaderErrorFunc | def _xmlTextReaderErrorFunc(xxx_todo_changeme,msg,severity,locator):
"""Intermediate callback to wrap the locator"""
(f,arg) = xxx_todo_changeme
return f(arg,msg,severity,xmlTextReaderLocator(locator)) | python | def _xmlTextReaderErrorFunc(xxx_todo_changeme,msg,severity,locator):
"""Intermediate callback to wrap the locator"""
(f,arg) = xxx_todo_changeme
return f(arg,msg,severity,xmlTextReaderLocator(locator)) | [
"def",
"_xmlTextReaderErrorFunc",
"(",
"xxx_todo_changeme",
",",
"msg",
",",
"severity",
",",
"locator",
")",
":",
"(",
"f",
",",
"arg",
")",
"=",
"xxx_todo_changeme",
"return",
"f",
"(",
"arg",
",",
"msg",
",",
"severity",
",",
"xmlTextReaderLocator",
"(",
... | Intermediate callback to wrap the locator | [
"Intermediate",
"callback",
"to",
"wrap",
"the",
"locator"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L713-L716 |
29,254 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | htmlCreateMemoryParserCtxt | def htmlCreateMemoryParserCtxt(buffer, size):
"""Create a parser context for an HTML in-memory document. """
ret = libxml2mod.htmlCreateMemoryParserCtxt(buffer, size)
if ret is None:raise parserError('htmlCreateMemoryParserCtxt() failed')
return parserCtxt(_obj=ret) | python | def htmlCreateMemoryParserCtxt(buffer, size):
"""Create a parser context for an HTML in-memory document. """
ret = libxml2mod.htmlCreateMemoryParserCtxt(buffer, size)
if ret is None:raise parserError('htmlCreateMemoryParserCtxt() failed')
return parserCtxt(_obj=ret) | [
"def",
"htmlCreateMemoryParserCtxt",
"(",
"buffer",
",",
"size",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"htmlCreateMemoryParserCtxt",
"(",
"buffer",
",",
"size",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"parserError",
"(",
"'htmlCreateMemoryParserCtxt() fai... | Create a parser context for an HTML in-memory document. | [
"Create",
"a",
"parser",
"context",
"for",
"an",
"HTML",
"in",
"-",
"memory",
"document",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L791-L795 |
29,255 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | htmlParseDoc | def htmlParseDoc(cur, encoding):
"""parse an HTML in-memory document and build a tree. """
ret = libxml2mod.htmlParseDoc(cur, encoding)
if ret is None:raise parserError('htmlParseDoc() failed')
return xmlDoc(_obj=ret) | python | def htmlParseDoc(cur, encoding):
"""parse an HTML in-memory document and build a tree. """
ret = libxml2mod.htmlParseDoc(cur, encoding)
if ret is None:raise parserError('htmlParseDoc() failed')
return xmlDoc(_obj=ret) | [
"def",
"htmlParseDoc",
"(",
"cur",
",",
"encoding",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"htmlParseDoc",
"(",
"cur",
",",
"encoding",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"parserError",
"(",
"'htmlParseDoc() failed'",
")",
"return",
"xmlDoc",
... | parse an HTML in-memory document and build a tree. | [
"parse",
"an",
"HTML",
"in",
"-",
"memory",
"document",
"and",
"build",
"a",
"tree",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L814-L818 |
29,256 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | htmlReadFd | def htmlReadFd(fd, URL, encoding, options):
"""parse an XML from a file descriptor and build a tree. """
ret = libxml2mod.htmlReadFd(fd, URL, encoding, options)
if ret is None:raise treeError('htmlReadFd() failed')
return xmlDoc(_obj=ret) | python | def htmlReadFd(fd, URL, encoding, options):
"""parse an XML from a file descriptor and build a tree. """
ret = libxml2mod.htmlReadFd(fd, URL, encoding, options)
if ret is None:raise treeError('htmlReadFd() failed')
return xmlDoc(_obj=ret) | [
"def",
"htmlReadFd",
"(",
"fd",
",",
"URL",
",",
"encoding",
",",
"options",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"htmlReadFd",
"(",
"fd",
",",
"URL",
",",
"encoding",
",",
"options",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"("... | parse an XML from a file descriptor and build a tree. | [
"parse",
"an",
"XML",
"from",
"a",
"file",
"descriptor",
"and",
"build",
"a",
"tree",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L834-L838 |
29,257 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | htmlNewDoc | def htmlNewDoc(URI, ExternalID):
"""Creates a new HTML document """
ret = libxml2mod.htmlNewDoc(URI, ExternalID)
if ret is None:raise treeError('htmlNewDoc() failed')
return xmlDoc(_obj=ret) | python | def htmlNewDoc(URI, ExternalID):
"""Creates a new HTML document """
ret = libxml2mod.htmlNewDoc(URI, ExternalID)
if ret is None:raise treeError('htmlNewDoc() failed')
return xmlDoc(_obj=ret) | [
"def",
"htmlNewDoc",
"(",
"URI",
",",
"ExternalID",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"htmlNewDoc",
"(",
"URI",
",",
"ExternalID",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'htmlNewDoc() failed'",
")",
"return",
"xmlDoc",
"(",... | Creates a new HTML document | [
"Creates",
"a",
"new",
"HTML",
"document"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L861-L865 |
29,258 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | htmlNewDocNoDtD | def htmlNewDocNoDtD(URI, ExternalID):
"""Creates a new HTML document without a DTD node if @URI and
@ExternalID are None """
ret = libxml2mod.htmlNewDocNoDtD(URI, ExternalID)
if ret is None:raise treeError('htmlNewDocNoDtD() failed')
return xmlDoc(_obj=ret) | python | def htmlNewDocNoDtD(URI, ExternalID):
"""Creates a new HTML document without a DTD node if @URI and
@ExternalID are None """
ret = libxml2mod.htmlNewDocNoDtD(URI, ExternalID)
if ret is None:raise treeError('htmlNewDocNoDtD() failed')
return xmlDoc(_obj=ret) | [
"def",
"htmlNewDocNoDtD",
"(",
"URI",
",",
"ExternalID",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"htmlNewDocNoDtD",
"(",
"URI",
",",
"ExternalID",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'htmlNewDocNoDtD() failed'",
")",
"return",
"... | Creates a new HTML document without a DTD node if @URI and
@ExternalID are None | [
"Creates",
"a",
"new",
"HTML",
"document",
"without",
"a",
"DTD",
"node",
"if"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L867-L872 |
29,259 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | loadACatalog | def loadACatalog(filename):
"""Load the catalog and build the associated data structures.
This can be either an XML Catalog or an SGML Catalog It
will recurse in SGML CATALOG entries. On the other hand XML
Catalogs are not handled recursively. """
ret = libxml2mod.xmlLoadACatalog(filename)
... | python | def loadACatalog(filename):
"""Load the catalog and build the associated data structures.
This can be either an XML Catalog or an SGML Catalog It
will recurse in SGML CATALOG entries. On the other hand XML
Catalogs are not handled recursively. """
ret = libxml2mod.xmlLoadACatalog(filename)
... | [
"def",
"loadACatalog",
"(",
"filename",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlLoadACatalog",
"(",
"filename",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlLoadACatalog() failed'",
")",
"return",
"catalog",
"(",
"_obj",
"=",
"re... | Load the catalog and build the associated data structures.
This can be either an XML Catalog or an SGML Catalog It
will recurse in SGML CATALOG entries. On the other hand XML
Catalogs are not handled recursively. | [
"Load",
"the",
"catalog",
"and",
"build",
"the",
"associated",
"data",
"structures",
".",
"This",
"can",
"be",
"either",
"an",
"XML",
"Catalog",
"or",
"an",
"SGML",
"Catalog",
"It",
"will",
"recurse",
"in",
"SGML",
"CATALOG",
"entries",
".",
"On",
"the",
... | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L975-L982 |
29,260 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | loadSGMLSuperCatalog | def loadSGMLSuperCatalog(filename):
"""Load an SGML super catalog. It won't expand CATALOG or
DELEGATE references. This is only needed for manipulating
SGML Super Catalogs like adding and removing CATALOG or
DELEGATE entries. """
ret = libxml2mod.xmlLoadSGMLSuperCatalog(filename)
if ret i... | python | def loadSGMLSuperCatalog(filename):
"""Load an SGML super catalog. It won't expand CATALOG or
DELEGATE references. This is only needed for manipulating
SGML Super Catalogs like adding and removing CATALOG or
DELEGATE entries. """
ret = libxml2mod.xmlLoadSGMLSuperCatalog(filename)
if ret i... | [
"def",
"loadSGMLSuperCatalog",
"(",
"filename",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlLoadSGMLSuperCatalog",
"(",
"filename",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlLoadSGMLSuperCatalog() failed'",
")",
"return",
"catalog",
"("... | Load an SGML super catalog. It won't expand CATALOG or
DELEGATE references. This is only needed for manipulating
SGML Super Catalogs like adding and removing CATALOG or
DELEGATE entries. | [
"Load",
"an",
"SGML",
"super",
"catalog",
".",
"It",
"won",
"t",
"expand",
"CATALOG",
"or",
"DELEGATE",
"references",
".",
"This",
"is",
"only",
"needed",
"for",
"manipulating",
"SGML",
"Super",
"Catalogs",
"like",
"adding",
"and",
"removing",
"CATALOG",
"or... | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L999-L1006 |
29,261 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | newCatalog | def newCatalog(sgml):
"""create a new Catalog. """
ret = libxml2mod.xmlNewCatalog(sgml)
if ret is None:raise treeError('xmlNewCatalog() failed')
return catalog(_obj=ret) | python | def newCatalog(sgml):
"""create a new Catalog. """
ret = libxml2mod.xmlNewCatalog(sgml)
if ret is None:raise treeError('xmlNewCatalog() failed')
return catalog(_obj=ret) | [
"def",
"newCatalog",
"(",
"sgml",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewCatalog",
"(",
"sgml",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewCatalog() failed'",
")",
"return",
"catalog",
"(",
"_obj",
"=",
"ret",
")"
] | create a new Catalog. | [
"create",
"a",
"new",
"Catalog",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1008-L1012 |
29,262 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | debugDumpString | def debugDumpString(output, str):
"""Dumps informations about the string, shorten it if necessary """
if output is not None: output.flush()
libxml2mod.xmlDebugDumpString(output, str) | python | def debugDumpString(output, str):
"""Dumps informations about the string, shorten it if necessary """
if output is not None: output.flush()
libxml2mod.xmlDebugDumpString(output, str) | [
"def",
"debugDumpString",
"(",
"output",
",",
"str",
")",
":",
"if",
"output",
"is",
"not",
"None",
":",
"output",
".",
"flush",
"(",
")",
"libxml2mod",
".",
"xmlDebugDumpString",
"(",
"output",
",",
"str",
")"
] | Dumps informations about the string, shorten it if necessary | [
"Dumps",
"informations",
"about",
"the",
"string",
"shorten",
"it",
"if",
"necessary"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1080-L1083 |
29,263 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | predefinedEntity | def predefinedEntity(name):
"""Check whether this name is an predefined entity. """
ret = libxml2mod.xmlGetPredefinedEntity(name)
if ret is None:raise treeError('xmlGetPredefinedEntity() failed')
return xmlEntity(_obj=ret) | python | def predefinedEntity(name):
"""Check whether this name is an predefined entity. """
ret = libxml2mod.xmlGetPredefinedEntity(name)
if ret is None:raise treeError('xmlGetPredefinedEntity() failed')
return xmlEntity(_obj=ret) | [
"def",
"predefinedEntity",
"(",
"name",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlGetPredefinedEntity",
"(",
"name",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlGetPredefinedEntity() failed'",
")",
"return",
"xmlEntity",
"(",
"_obj",
... | Check whether this name is an predefined entity. | [
"Check",
"whether",
"this",
"name",
"is",
"an",
"predefined",
"entity",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1152-L1156 |
29,264 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | nanoFTPProxy | def nanoFTPProxy(host, port, user, passwd, type):
"""Setup the FTP proxy informations. This can also be done by
using ftp_proxy ftp_proxy_user and ftp_proxy_password
environment variables. """
libxml2mod.xmlNanoFTPProxy(host, port, user, passwd, type) | python | def nanoFTPProxy(host, port, user, passwd, type):
"""Setup the FTP proxy informations. This can also be done by
using ftp_proxy ftp_proxy_user and ftp_proxy_password
environment variables. """
libxml2mod.xmlNanoFTPProxy(host, port, user, passwd, type) | [
"def",
"nanoFTPProxy",
"(",
"host",
",",
"port",
",",
"user",
",",
"passwd",
",",
"type",
")",
":",
"libxml2mod",
".",
"xmlNanoFTPProxy",
"(",
"host",
",",
"port",
",",
"user",
",",
"passwd",
",",
"type",
")"
] | Setup the FTP proxy informations. This can also be done by
using ftp_proxy ftp_proxy_user and ftp_proxy_password
environment variables. | [
"Setup",
"the",
"FTP",
"proxy",
"informations",
".",
"This",
"can",
"also",
"be",
"done",
"by",
"using",
"ftp_proxy",
"ftp_proxy_user",
"and",
"ftp_proxy_password",
"environment",
"variables",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1232-L1236 |
29,265 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | createDocParserCtxt | def createDocParserCtxt(cur):
"""Creates a parser context for an XML in-memory document. """
ret = libxml2mod.xmlCreateDocParserCtxt(cur)
if ret is None:raise parserError('xmlCreateDocParserCtxt() failed')
return parserCtxt(_obj=ret) | python | def createDocParserCtxt(cur):
"""Creates a parser context for an XML in-memory document. """
ret = libxml2mod.xmlCreateDocParserCtxt(cur)
if ret is None:raise parserError('xmlCreateDocParserCtxt() failed')
return parserCtxt(_obj=ret) | [
"def",
"createDocParserCtxt",
"(",
"cur",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlCreateDocParserCtxt",
"(",
"cur",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"parserError",
"(",
"'xmlCreateDocParserCtxt() failed'",
")",
"return",
"parserCtxt",
"(",
"_ob... | Creates a parser context for an XML in-memory document. | [
"Creates",
"a",
"parser",
"context",
"for",
"an",
"XML",
"in",
"-",
"memory",
"document",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1269-L1273 |
29,266 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | parseDTD | def parseDTD(ExternalID, SystemID):
"""Load and parse an external subset. """
ret = libxml2mod.xmlParseDTD(ExternalID, SystemID)
if ret is None:raise parserError('xmlParseDTD() failed')
return xmlDtd(_obj=ret) | python | def parseDTD(ExternalID, SystemID):
"""Load and parse an external subset. """
ret = libxml2mod.xmlParseDTD(ExternalID, SystemID)
if ret is None:raise parserError('xmlParseDTD() failed')
return xmlDtd(_obj=ret) | [
"def",
"parseDTD",
"(",
"ExternalID",
",",
"SystemID",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlParseDTD",
"(",
"ExternalID",
",",
"SystemID",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"parserError",
"(",
"'xmlParseDTD() failed'",
")",
"return",
"xml... | Load and parse an external subset. | [
"Load",
"and",
"parse",
"an",
"external",
"subset",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1316-L1320 |
29,267 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | parseMemory | def parseMemory(buffer, size):
"""parse an XML in-memory block and build a tree. """
ret = libxml2mod.xmlParseMemory(buffer, size)
if ret is None:raise parserError('xmlParseMemory() failed')
return xmlDoc(_obj=ret) | python | def parseMemory(buffer, size):
"""parse an XML in-memory block and build a tree. """
ret = libxml2mod.xmlParseMemory(buffer, size)
if ret is None:raise parserError('xmlParseMemory() failed')
return xmlDoc(_obj=ret) | [
"def",
"parseMemory",
"(",
"buffer",
",",
"size",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlParseMemory",
"(",
"buffer",
",",
"size",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"parserError",
"(",
"'xmlParseMemory() failed'",
")",
"return",
"xmlDoc",
... | parse an XML in-memory block and build a tree. | [
"parse",
"an",
"XML",
"in",
"-",
"memory",
"block",
"and",
"build",
"a",
"tree",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1344-L1348 |
29,268 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | readFd | def readFd(fd, URL, encoding, options):
"""parse an XML from a file descriptor and build a tree. NOTE
that the file descriptor will not be closed when the reader
is closed or reset. """
ret = libxml2mod.xmlReadFd(fd, URL, encoding, options)
if ret is None:raise treeError('xmlReadFd() failed')
... | python | def readFd(fd, URL, encoding, options):
"""parse an XML from a file descriptor and build a tree. NOTE
that the file descriptor will not be closed when the reader
is closed or reset. """
ret = libxml2mod.xmlReadFd(fd, URL, encoding, options)
if ret is None:raise treeError('xmlReadFd() failed')
... | [
"def",
"readFd",
"(",
"fd",
",",
"URL",
",",
"encoding",
",",
"options",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlReadFd",
"(",
"fd",
",",
"URL",
",",
"encoding",
",",
"options",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"... | parse an XML from a file descriptor and build a tree. NOTE
that the file descriptor will not be closed when the reader
is closed or reset. | [
"parse",
"an",
"XML",
"from",
"a",
"file",
"descriptor",
"and",
"build",
"a",
"tree",
".",
"NOTE",
"that",
"the",
"file",
"descriptor",
"will",
"not",
"be",
"closed",
"when",
"the",
"reader",
"is",
"closed",
"or",
"reset",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1362-L1368 |
29,269 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | recoverDoc | def recoverDoc(cur):
"""parse an XML in-memory document and build a tree. In the
case the document is not Well Formed, a attempt to build a
tree is tried anyway """
ret = libxml2mod.xmlRecoverDoc(cur)
if ret is None:raise treeError('xmlRecoverDoc() failed')
return xmlDoc(_obj=ret) | python | def recoverDoc(cur):
"""parse an XML in-memory document and build a tree. In the
case the document is not Well Formed, a attempt to build a
tree is tried anyway """
ret = libxml2mod.xmlRecoverDoc(cur)
if ret is None:raise treeError('xmlRecoverDoc() failed')
return xmlDoc(_obj=ret) | [
"def",
"recoverDoc",
"(",
"cur",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlRecoverDoc",
"(",
"cur",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlRecoverDoc() failed'",
")",
"return",
"xmlDoc",
"(",
"_obj",
"=",
"ret",
")"
] | parse an XML in-memory document and build a tree. In the
case the document is not Well Formed, a attempt to build a
tree is tried anyway | [
"parse",
"an",
"XML",
"in",
"-",
"memory",
"document",
"and",
"build",
"a",
"tree",
".",
"In",
"the",
"case",
"the",
"document",
"is",
"not",
"Well",
"Formed",
"a",
"attempt",
"to",
"build",
"a",
"tree",
"is",
"tried",
"anyway"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1382-L1388 |
29,270 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | recoverMemory | def recoverMemory(buffer, size):
"""parse an XML in-memory block and build a tree. In the case
the document is not Well Formed, an attempt to build a tree
is tried anyway """
ret = libxml2mod.xmlRecoverMemory(buffer, size)
if ret is None:raise treeError('xmlRecoverMemory() failed')
return x... | python | def recoverMemory(buffer, size):
"""parse an XML in-memory block and build a tree. In the case
the document is not Well Formed, an attempt to build a tree
is tried anyway """
ret = libxml2mod.xmlRecoverMemory(buffer, size)
if ret is None:raise treeError('xmlRecoverMemory() failed')
return x... | [
"def",
"recoverMemory",
"(",
"buffer",
",",
"size",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlRecoverMemory",
"(",
"buffer",
",",
"size",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlRecoverMemory() failed'",
")",
"return",
"xmlDoc... | parse an XML in-memory block and build a tree. In the case
the document is not Well Formed, an attempt to build a tree
is tried anyway | [
"parse",
"an",
"XML",
"in",
"-",
"memory",
"block",
"and",
"build",
"a",
"tree",
".",
"In",
"the",
"case",
"the",
"document",
"is",
"not",
"Well",
"Formed",
"an",
"attempt",
"to",
"build",
"a",
"tree",
"is",
"tried",
"anyway"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1399-L1405 |
29,271 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | copyChar | def copyChar(len, out, val):
"""append the char value in the array """
ret = libxml2mod.xmlCopyChar(len, out, val)
return ret | python | def copyChar(len, out, val):
"""append the char value in the array """
ret = libxml2mod.xmlCopyChar(len, out, val)
return ret | [
"def",
"copyChar",
"(",
"len",
",",
"out",
",",
"val",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlCopyChar",
"(",
"len",
",",
"out",
",",
"val",
")",
"return",
"ret"
] | append the char value in the array | [
"append",
"the",
"char",
"value",
"in",
"the",
"array"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1455-L1458 |
29,272 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | createMemoryParserCtxt | def createMemoryParserCtxt(buffer, size):
"""Create a parser context for an XML in-memory document. """
ret = libxml2mod.xmlCreateMemoryParserCtxt(buffer, size)
if ret is None:raise parserError('xmlCreateMemoryParserCtxt() failed')
return parserCtxt(_obj=ret) | python | def createMemoryParserCtxt(buffer, size):
"""Create a parser context for an XML in-memory document. """
ret = libxml2mod.xmlCreateMemoryParserCtxt(buffer, size)
if ret is None:raise parserError('xmlCreateMemoryParserCtxt() failed')
return parserCtxt(_obj=ret) | [
"def",
"createMemoryParserCtxt",
"(",
"buffer",
",",
"size",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlCreateMemoryParserCtxt",
"(",
"buffer",
",",
"size",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"parserError",
"(",
"'xmlCreateMemoryParserCtxt() failed'",... | Create a parser context for an XML in-memory document. | [
"Create",
"a",
"parser",
"context",
"for",
"an",
"XML",
"in",
"-",
"memory",
"document",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1481-L1485 |
29,273 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | namePop | def namePop(ctxt):
"""Pops the top element name from the name stack """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.namePop(ctxt__o)
return ret | python | def namePop(ctxt):
"""Pops the top element name from the name stack """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.namePop(ctxt__o)
return ret | [
"def",
"namePop",
"(",
"ctxt",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"namePop",
"(",
"ctxt__o",
")",
"return",
"ret"
] | Pops the top element name from the name stack | [
"Pops",
"the",
"top",
"element",
"name",
"from",
"the",
"name",
"stack"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1517-L1522 |
29,274 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | namePush | def namePush(ctxt, value):
"""Pushes a new element name on top of the name stack """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.namePush(ctxt__o, value)
return ret | python | def namePush(ctxt, value):
"""Pushes a new element name on top of the name stack """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.namePush(ctxt__o, value)
return ret | [
"def",
"namePush",
"(",
"ctxt",
",",
"value",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"namePush",
"(",
"ctxt__o",
",",
"value",
")",
"return",
... | Pushes a new element name on top of the name stack | [
"Pushes",
"a",
"new",
"element",
"name",
"on",
"top",
"of",
"the",
"name",
"stack"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1524-L1529 |
29,275 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | nodePop | def nodePop(ctxt):
"""Pops the top element node from the node stack """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.nodePop(ctxt__o)
if ret is None:raise treeError('nodePop() failed')
return xmlNode(_obj=ret) | python | def nodePop(ctxt):
"""Pops the top element node from the node stack """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.nodePop(ctxt__o)
if ret is None:raise treeError('nodePop() failed')
return xmlNode(_obj=ret) | [
"def",
"nodePop",
"(",
"ctxt",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"nodePop",
"(",
"ctxt__o",
")",
"if",
"ret",
"is",
"None",
":",
"raise"... | Pops the top element node from the node stack | [
"Pops",
"the",
"top",
"element",
"node",
"from",
"the",
"node",
"stack"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1531-L1537 |
29,276 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | nodePush | def nodePush(ctxt, value):
"""Pushes a new element node on top of the node stack """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
if value is None: value__o = None
else: value__o = value._o
ret = libxml2mod.nodePush(ctxt__o, value__o)
return ret | python | def nodePush(ctxt, value):
"""Pushes a new element node on top of the node stack """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
if value is None: value__o = None
else: value__o = value._o
ret = libxml2mod.nodePush(ctxt__o, value__o)
return ret | [
"def",
"nodePush",
"(",
"ctxt",
",",
"value",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"if",
"value",
"is",
"None",
":",
"value__o",
"=",
"None",
"else",
":",
"value__o",
"="... | Pushes a new element node on top of the node stack | [
"Pushes",
"a",
"new",
"element",
"node",
"on",
"top",
"of",
"the",
"node",
"stack"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1539-L1546 |
29,277 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | createInputBuffer | def createInputBuffer(file, encoding):
"""Create a libxml2 input buffer from a Python file """
ret = libxml2mod.xmlCreateInputBuffer(file, encoding)
if ret is None:raise treeError('xmlCreateInputBuffer() failed')
return inputBuffer(_obj=ret) | python | def createInputBuffer(file, encoding):
"""Create a libxml2 input buffer from a Python file """
ret = libxml2mod.xmlCreateInputBuffer(file, encoding)
if ret is None:raise treeError('xmlCreateInputBuffer() failed')
return inputBuffer(_obj=ret) | [
"def",
"createInputBuffer",
"(",
"file",
",",
"encoding",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlCreateInputBuffer",
"(",
"file",
",",
"encoding",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlCreateInputBuffer() failed'",
")",
"re... | Create a libxml2 input buffer from a Python file | [
"Create",
"a",
"libxml2",
"input",
"buffer",
"from",
"a",
"Python",
"file"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1557-L1561 |
29,278 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | createOutputBuffer | def createOutputBuffer(file, encoding):
"""Create a libxml2 output buffer from a Python file """
ret = libxml2mod.xmlCreateOutputBuffer(file, encoding)
if ret is None:raise treeError('xmlCreateOutputBuffer() failed')
return outputBuffer(_obj=ret) | python | def createOutputBuffer(file, encoding):
"""Create a libxml2 output buffer from a Python file """
ret = libxml2mod.xmlCreateOutputBuffer(file, encoding)
if ret is None:raise treeError('xmlCreateOutputBuffer() failed')
return outputBuffer(_obj=ret) | [
"def",
"createOutputBuffer",
"(",
"file",
",",
"encoding",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlCreateOutputBuffer",
"(",
"file",
",",
"encoding",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlCreateOutputBuffer() failed'",
")",
... | Create a libxml2 output buffer from a Python file | [
"Create",
"a",
"libxml2",
"output",
"buffer",
"from",
"a",
"Python",
"file"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1563-L1567 |
29,279 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | createPushParser | def createPushParser(SAX, chunk, size, URI):
"""Create a progressive XML parser context to build either an
event flow if the SAX object is not None, or a DOM tree
otherwise. """
ret = libxml2mod.xmlCreatePushParser(SAX, chunk, size, URI)
if ret is None:raise parserError('xmlCreatePushParser() f... | python | def createPushParser(SAX, chunk, size, URI):
"""Create a progressive XML parser context to build either an
event flow if the SAX object is not None, or a DOM tree
otherwise. """
ret = libxml2mod.xmlCreatePushParser(SAX, chunk, size, URI)
if ret is None:raise parserError('xmlCreatePushParser() f... | [
"def",
"createPushParser",
"(",
"SAX",
",",
"chunk",
",",
"size",
",",
"URI",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlCreatePushParser",
"(",
"SAX",
",",
"chunk",
",",
"size",
",",
"URI",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"parserError"... | Create a progressive XML parser context to build either an
event flow if the SAX object is not None, or a DOM tree
otherwise. | [
"Create",
"a",
"progressive",
"XML",
"parser",
"context",
"to",
"build",
"either",
"an",
"event",
"flow",
"if",
"the",
"SAX",
"object",
"is",
"not",
"None",
"or",
"a",
"DOM",
"tree",
"otherwise",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1569-L1575 |
29,280 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | htmlCreatePushParser | def htmlCreatePushParser(SAX, chunk, size, URI):
"""Create a progressive HTML parser context to build either an
event flow if the SAX object is not None, or a DOM tree
otherwise. """
ret = libxml2mod.htmlCreatePushParser(SAX, chunk, size, URI)
if ret is None:raise parserError('htmlCreatePushPar... | python | def htmlCreatePushParser(SAX, chunk, size, URI):
"""Create a progressive HTML parser context to build either an
event flow if the SAX object is not None, or a DOM tree
otherwise. """
ret = libxml2mod.htmlCreatePushParser(SAX, chunk, size, URI)
if ret is None:raise parserError('htmlCreatePushPar... | [
"def",
"htmlCreatePushParser",
"(",
"SAX",
",",
"chunk",
",",
"size",
",",
"URI",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"htmlCreatePushParser",
"(",
"SAX",
",",
"chunk",
",",
"size",
",",
"URI",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"parserE... | Create a progressive HTML parser context to build either an
event flow if the SAX object is not None, or a DOM tree
otherwise. | [
"Create",
"a",
"progressive",
"HTML",
"parser",
"context",
"to",
"build",
"either",
"an",
"event",
"flow",
"if",
"the",
"SAX",
"object",
"is",
"not",
"None",
"or",
"a",
"DOM",
"tree",
"otherwise",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1588-L1594 |
29,281 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | newNode | def newNode(name):
"""Create a new Node """
ret = libxml2mod.xmlNewNode(name)
if ret is None:raise treeError('xmlNewNode() failed')
return xmlNode(_obj=ret) | python | def newNode(name):
"""Create a new Node """
ret = libxml2mod.xmlNewNode(name)
if ret is None:raise treeError('xmlNewNode() failed')
return xmlNode(_obj=ret) | [
"def",
"newNode",
"(",
"name",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewNode",
"(",
"name",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewNode() failed'",
")",
"return",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")"
] | Create a new Node | [
"Create",
"a",
"new",
"Node"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1606-L1610 |
29,282 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | relaxNGNewMemParserCtxt | def relaxNGNewMemParserCtxt(buffer, size):
"""Create an XML RelaxNGs parse context for that memory buffer
expected to contain an XML RelaxNGs file. """
ret = libxml2mod.xmlRelaxNGNewMemParserCtxt(buffer, size)
if ret is None:raise parserError('xmlRelaxNGNewMemParserCtxt() failed')
return relaxNgP... | python | def relaxNGNewMemParserCtxt(buffer, size):
"""Create an XML RelaxNGs parse context for that memory buffer
expected to contain an XML RelaxNGs file. """
ret = libxml2mod.xmlRelaxNGNewMemParserCtxt(buffer, size)
if ret is None:raise parserError('xmlRelaxNGNewMemParserCtxt() failed')
return relaxNgP... | [
"def",
"relaxNGNewMemParserCtxt",
"(",
"buffer",
",",
"size",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlRelaxNGNewMemParserCtxt",
"(",
"buffer",
",",
"size",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"parserError",
"(",
"'xmlRelaxNGNewMemParserCtxt() failed... | Create an XML RelaxNGs parse context for that memory buffer
expected to contain an XML RelaxNGs file. | [
"Create",
"an",
"XML",
"RelaxNGs",
"parse",
"context",
"for",
"that",
"memory",
"buffer",
"expected",
"to",
"contain",
"an",
"XML",
"RelaxNGs",
"file",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1641-L1646 |
29,283 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | buildQName | def buildQName(ncname, prefix, memory, len):
"""Builds the QName @prefix:@ncname in @memory if there is
enough space and prefix is not None nor empty, otherwise
allocate a new string. If prefix is None or empty it
returns ncname. """
ret = libxml2mod.xmlBuildQName(ncname, prefix, memory, len)... | python | def buildQName(ncname, prefix, memory, len):
"""Builds the QName @prefix:@ncname in @memory if there is
enough space and prefix is not None nor empty, otherwise
allocate a new string. If prefix is None or empty it
returns ncname. """
ret = libxml2mod.xmlBuildQName(ncname, prefix, memory, len)... | [
"def",
"buildQName",
"(",
"ncname",
",",
"prefix",
",",
"memory",
",",
"len",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlBuildQName",
"(",
"ncname",
",",
"prefix",
",",
"memory",
",",
"len",
")",
"return",
"ret"
] | Builds the QName @prefix:@ncname in @memory if there is
enough space and prefix is not None nor empty, otherwise
allocate a new string. If prefix is None or empty it
returns ncname. | [
"Builds",
"the",
"QName"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1659-L1665 |
29,284 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | newComment | def newComment(content):
"""Creation of a new node containing a comment. """
ret = libxml2mod.xmlNewComment(content)
if ret is None:raise treeError('xmlNewComment() failed')
return xmlNode(_obj=ret) | python | def newComment(content):
"""Creation of a new node containing a comment. """
ret = libxml2mod.xmlNewComment(content)
if ret is None:raise treeError('xmlNewComment() failed')
return xmlNode(_obj=ret) | [
"def",
"newComment",
"(",
"content",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewComment",
"(",
"content",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewComment() failed'",
")",
"return",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")... | Creation of a new node containing a comment. | [
"Creation",
"of",
"a",
"new",
"node",
"containing",
"a",
"comment",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1677-L1681 |
29,285 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | newDoc | def newDoc(version):
"""Creates a new XML document """
ret = libxml2mod.xmlNewDoc(version)
if ret is None:raise treeError('xmlNewDoc() failed')
return xmlDoc(_obj=ret) | python | def newDoc(version):
"""Creates a new XML document """
ret = libxml2mod.xmlNewDoc(version)
if ret is None:raise treeError('xmlNewDoc() failed')
return xmlDoc(_obj=ret) | [
"def",
"newDoc",
"(",
"version",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewDoc",
"(",
"version",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewDoc() failed'",
")",
"return",
"xmlDoc",
"(",
"_obj",
"=",
"ret",
")"
] | Creates a new XML document | [
"Creates",
"a",
"new",
"XML",
"document"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1683-L1687 |
29,286 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | newPI | def newPI(name, content):
"""Creation of a processing instruction element. Use
xmlDocNewPI preferably to get string interning """
ret = libxml2mod.xmlNewPI(name, content)
if ret is None:raise treeError('xmlNewPI() failed')
return xmlNode(_obj=ret) | python | def newPI(name, content):
"""Creation of a processing instruction element. Use
xmlDocNewPI preferably to get string interning """
ret = libxml2mod.xmlNewPI(name, content)
if ret is None:raise treeError('xmlNewPI() failed')
return xmlNode(_obj=ret) | [
"def",
"newPI",
"(",
"name",
",",
"content",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewPI",
"(",
"name",
",",
"content",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewPI() failed'",
")",
"return",
"xmlNode",
"(",
"_obj",
... | Creation of a processing instruction element. Use
xmlDocNewPI preferably to get string interning | [
"Creation",
"of",
"a",
"processing",
"instruction",
"element",
".",
"Use",
"xmlDocNewPI",
"preferably",
"to",
"get",
"string",
"interning"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1689-L1694 |
29,287 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | newText | def newText(content):
"""Creation of a new text node. """
ret = libxml2mod.xmlNewText(content)
if ret is None:raise treeError('xmlNewText() failed')
return xmlNode(_obj=ret) | python | def newText(content):
"""Creation of a new text node. """
ret = libxml2mod.xmlNewText(content)
if ret is None:raise treeError('xmlNewText() failed')
return xmlNode(_obj=ret) | [
"def",
"newText",
"(",
"content",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewText",
"(",
"content",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewText() failed'",
")",
"return",
"xmlNode",
"(",
"_obj",
"=",
"ret",
")"
] | Creation of a new text node. | [
"Creation",
"of",
"a",
"new",
"text",
"node",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1696-L1700 |
29,288 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | newTextLen | def newTextLen(content, len):
"""Creation of a new text node with an extra parameter for the
content's length """
ret = libxml2mod.xmlNewTextLen(content, len)
if ret is None:raise treeError('xmlNewTextLen() failed')
return xmlNode(_obj=ret) | python | def newTextLen(content, len):
"""Creation of a new text node with an extra parameter for the
content's length """
ret = libxml2mod.xmlNewTextLen(content, len)
if ret is None:raise treeError('xmlNewTextLen() failed')
return xmlNode(_obj=ret) | [
"def",
"newTextLen",
"(",
"content",
",",
"len",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewTextLen",
"(",
"content",
",",
"len",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewTextLen() failed'",
")",
"return",
"xmlNode",
"("... | Creation of a new text node with an extra parameter for the
content's length | [
"Creation",
"of",
"a",
"new",
"text",
"node",
"with",
"an",
"extra",
"parameter",
"for",
"the",
"content",
"s",
"length"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1702-L1707 |
29,289 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | newTextReaderFilename | def newTextReaderFilename(URI):
"""Create an xmlTextReader structure fed with the resource at
@URI """
ret = libxml2mod.xmlNewTextReaderFilename(URI)
if ret is None:raise treeError('xmlNewTextReaderFilename() failed')
return xmlTextReader(_obj=ret) | python | def newTextReaderFilename(URI):
"""Create an xmlTextReader structure fed with the resource at
@URI """
ret = libxml2mod.xmlNewTextReaderFilename(URI)
if ret is None:raise treeError('xmlNewTextReaderFilename() failed')
return xmlTextReader(_obj=ret) | [
"def",
"newTextReaderFilename",
"(",
"URI",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNewTextReaderFilename",
"(",
"URI",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlNewTextReaderFilename() failed'",
")",
"return",
"xmlTextReader",
"(",... | Create an xmlTextReader structure fed with the resource at
@URI | [
"Create",
"an",
"xmlTextReader",
"structure",
"fed",
"with",
"the",
"resource",
"at"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1941-L1946 |
29,290 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | readerForFd | def readerForFd(fd, URL, encoding, options):
"""Create an xmltextReader for an XML from a file descriptor.
The parsing flags @options are a combination of
xmlParserOption. NOTE that the file descriptor will not be
closed when the reader is closed or reset. """
ret = libxml2mod.xmlReaderForFd(... | python | def readerForFd(fd, URL, encoding, options):
"""Create an xmltextReader for an XML from a file descriptor.
The parsing flags @options are a combination of
xmlParserOption. NOTE that the file descriptor will not be
closed when the reader is closed or reset. """
ret = libxml2mod.xmlReaderForFd(... | [
"def",
"readerForFd",
"(",
"fd",
",",
"URL",
",",
"encoding",
",",
"options",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlReaderForFd",
"(",
"fd",
",",
"URL",
",",
"encoding",
",",
"options",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
... | Create an xmltextReader for an XML from a file descriptor.
The parsing flags @options are a combination of
xmlParserOption. NOTE that the file descriptor will not be
closed when the reader is closed or reset. | [
"Create",
"an",
"xmltextReader",
"for",
"an",
"XML",
"from",
"a",
"file",
"descriptor",
".",
"The",
"parsing",
"flags"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1955-L1962 |
29,291 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | regexpCompile | def regexpCompile(regexp):
"""Parses a regular expression conforming to XML Schemas Part
2 Datatype Appendix F and builds an automata suitable for
testing strings against that regular expression """
ret = libxml2mod.xmlRegexpCompile(regexp)
if ret is None:raise treeError('xmlRegexpCompile() fai... | python | def regexpCompile(regexp):
"""Parses a regular expression conforming to XML Schemas Part
2 Datatype Appendix F and builds an automata suitable for
testing strings against that regular expression """
ret = libxml2mod.xmlRegexpCompile(regexp)
if ret is None:raise treeError('xmlRegexpCompile() fai... | [
"def",
"regexpCompile",
"(",
"regexp",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlRegexpCompile",
"(",
"regexp",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"treeError",
"(",
"'xmlRegexpCompile() failed'",
")",
"return",
"xmlReg",
"(",
"_obj",
"=",
"ret"... | Parses a regular expression conforming to XML Schemas Part
2 Datatype Appendix F and builds an automata suitable for
testing strings against that regular expression | [
"Parses",
"a",
"regular",
"expression",
"conforming",
"to",
"XML",
"Schemas",
"Part",
"2",
"Datatype",
"Appendix",
"F",
"and",
"builds",
"an",
"automata",
"suitable",
"for",
"testing",
"strings",
"against",
"that",
"regular",
"expression"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1982-L1988 |
29,292 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | schemaNewMemParserCtxt | def schemaNewMemParserCtxt(buffer, size):
"""Create an XML Schemas parse context for that memory buffer
expected to contain an XML Schemas file. """
ret = libxml2mod.xmlSchemaNewMemParserCtxt(buffer, size)
if ret is None:raise parserError('xmlSchemaNewMemParserCtxt() failed')
return SchemaParserC... | python | def schemaNewMemParserCtxt(buffer, size):
"""Create an XML Schemas parse context for that memory buffer
expected to contain an XML Schemas file. """
ret = libxml2mod.xmlSchemaNewMemParserCtxt(buffer, size)
if ret is None:raise parserError('xmlSchemaNewMemParserCtxt() failed')
return SchemaParserC... | [
"def",
"schemaNewMemParserCtxt",
"(",
"buffer",
",",
"size",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlSchemaNewMemParserCtxt",
"(",
"buffer",
",",
"size",
")",
"if",
"ret",
"is",
"None",
":",
"raise",
"parserError",
"(",
"'xmlSchemaNewMemParserCtxt() failed'",... | Create an XML Schemas parse context for that memory buffer
expected to contain an XML Schemas file. | [
"Create",
"an",
"XML",
"Schemas",
"parse",
"context",
"for",
"that",
"memory",
"buffer",
"expected",
"to",
"contain",
"an",
"XML",
"Schemas",
"file",
"."
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1994-L1999 |
29,293 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | valuePop | def valuePop(ctxt):
"""Pops the top XPath object from the value stack """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.valuePop(ctxt__o)
return ret | python | def valuePop(ctxt):
"""Pops the top XPath object from the value stack """
if ctxt is None: ctxt__o = None
else: ctxt__o = ctxt._o
ret = libxml2mod.valuePop(ctxt__o)
return ret | [
"def",
"valuePop",
"(",
"ctxt",
")",
":",
"if",
"ctxt",
"is",
"None",
":",
"ctxt__o",
"=",
"None",
"else",
":",
"ctxt__o",
"=",
"ctxt",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"valuePop",
"(",
"ctxt__o",
")",
"return",
"ret"
] | Pops the top XPath object from the value stack | [
"Pops",
"the",
"top",
"XPath",
"object",
"from",
"the",
"value",
"stack"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3008-L3013 |
29,294 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlCore.removeNsDef | def removeNsDef(self, href):
"""
Remove a namespace definition from a node. If href is None,
remove all of the ns definitions on that node. The removed
namespaces are returned as a linked list.
Note: If any child nodes referred to the removed namespaces,
they will be l... | python | def removeNsDef(self, href):
"""
Remove a namespace definition from a node. If href is None,
remove all of the ns definitions on that node. The removed
namespaces are returned as a linked list.
Note: If any child nodes referred to the removed namespaces,
they will be l... | [
"def",
"removeNsDef",
"(",
"self",
",",
"href",
")",
":",
"ret",
"=",
"libxml2mod",
".",
"xmlNodeRemoveNsDef",
"(",
"self",
".",
"_o",
",",
"href",
")",
"if",
"ret",
"is",
"None",
":",
"return",
"None",
"__tmp",
"=",
"xmlNs",
"(",
"_obj",
"=",
"ret",... | Remove a namespace definition from a node. If href is None,
remove all of the ns definitions on that node. The removed
namespaces are returned as a linked list.
Note: If any child nodes referred to the removed namespaces,
they will be left with dangling links. You should call
... | [
"Remove",
"a",
"namespace",
"definition",
"from",
"a",
"node",
".",
"If",
"href",
"is",
"None",
"remove",
"all",
"of",
"the",
"ns",
"definitions",
"on",
"that",
"node",
".",
"The",
"removed",
"namespaces",
"are",
"returned",
"as",
"a",
"linked",
"list",
... | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L489-L507 |
29,295 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.debugDumpNode | def debugDumpNode(self, output, depth):
"""Dumps debug information for the element node, it is
recursive """
libxml2mod.xmlDebugDumpNode(output, self._o, depth) | python | def debugDumpNode(self, output, depth):
"""Dumps debug information for the element node, it is
recursive """
libxml2mod.xmlDebugDumpNode(output, self._o, depth) | [
"def",
"debugDumpNode",
"(",
"self",
",",
"output",
",",
"depth",
")",
":",
"libxml2mod",
".",
"xmlDebugDumpNode",
"(",
"output",
",",
"self",
".",
"_o",
",",
"depth",
")"
] | Dumps debug information for the element node, it is
recursive | [
"Dumps",
"debug",
"information",
"for",
"the",
"element",
"node",
"it",
"is",
"recursive"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3043-L3046 |
29,296 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.debugDumpNodeList | def debugDumpNodeList(self, output, depth):
"""Dumps debug information for the list of element node, it is
recursive """
libxml2mod.xmlDebugDumpNodeList(output, self._o, depth) | python | def debugDumpNodeList(self, output, depth):
"""Dumps debug information for the list of element node, it is
recursive """
libxml2mod.xmlDebugDumpNodeList(output, self._o, depth) | [
"def",
"debugDumpNodeList",
"(",
"self",
",",
"output",
",",
"depth",
")",
":",
"libxml2mod",
".",
"xmlDebugDumpNodeList",
"(",
"output",
",",
"self",
".",
"_o",
",",
"depth",
")"
] | Dumps debug information for the list of element node, it is
recursive | [
"Dumps",
"debug",
"information",
"for",
"the",
"list",
"of",
"element",
"node",
"it",
"is",
"recursive"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3048-L3051 |
29,297 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.debugDumpOneNode | def debugDumpOneNode(self, output, depth):
"""Dumps debug information for the element node, it is not
recursive """
libxml2mod.xmlDebugDumpOneNode(output, self._o, depth) | python | def debugDumpOneNode(self, output, depth):
"""Dumps debug information for the element node, it is not
recursive """
libxml2mod.xmlDebugDumpOneNode(output, self._o, depth) | [
"def",
"debugDumpOneNode",
"(",
"self",
",",
"output",
",",
"depth",
")",
":",
"libxml2mod",
".",
"xmlDebugDumpOneNode",
"(",
"output",
",",
"self",
".",
"_o",
",",
"depth",
")"
] | Dumps debug information for the element node, it is not
recursive | [
"Dumps",
"debug",
"information",
"for",
"the",
"element",
"node",
"it",
"is",
"not",
"recursive"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3053-L3056 |
29,298 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.addChild | def addChild(self, cur):
"""Add a new node to @parent, at the end of the child (or
property) list merging adjacent TEXT nodes (in which case
@cur is freed) If the new node is ATTRIBUTE, it is added
into properties instead of children. If there is an
attribute with equal ... | python | def addChild(self, cur):
"""Add a new node to @parent, at the end of the child (or
property) list merging adjacent TEXT nodes (in which case
@cur is freed) If the new node is ATTRIBUTE, it is added
into properties instead of children. If there is an
attribute with equal ... | [
"def",
"addChild",
"(",
"self",
",",
"cur",
")",
":",
"if",
"cur",
"is",
"None",
":",
"cur__o",
"=",
"None",
"else",
":",
"cur__o",
"=",
"cur",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlAddChild",
"(",
"self",
".",
"_o",
",",
"cur__o",
")",
"... | Add a new node to @parent, at the end of the child (or
property) list merging adjacent TEXT nodes (in which case
@cur is freed) If the new node is ATTRIBUTE, it is added
into properties instead of children. If there is an
attribute with equal name, it is first destroyed. | [
"Add",
"a",
"new",
"node",
"to"
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3075-L3086 |
29,299 | apple/turicreate | deps/src/libxml2-2.9.1/python/libxml2.py | xmlNode.addChildList | def addChildList(self, cur):
"""Add a list of node at the end of the child list of the
parent merging adjacent TEXT nodes (@cur may be freed) """
if cur is None: cur__o = None
else: cur__o = cur._o
ret = libxml2mod.xmlAddChildList(self._o, cur__o)
if ret is None:raise ... | python | def addChildList(self, cur):
"""Add a list of node at the end of the child list of the
parent merging adjacent TEXT nodes (@cur may be freed) """
if cur is None: cur__o = None
else: cur__o = cur._o
ret = libxml2mod.xmlAddChildList(self._o, cur__o)
if ret is None:raise ... | [
"def",
"addChildList",
"(",
"self",
",",
"cur",
")",
":",
"if",
"cur",
"is",
"None",
":",
"cur__o",
"=",
"None",
"else",
":",
"cur__o",
"=",
"cur",
".",
"_o",
"ret",
"=",
"libxml2mod",
".",
"xmlAddChildList",
"(",
"self",
".",
"_o",
",",
"cur__o",
... | Add a list of node at the end of the child list of the
parent merging adjacent TEXT nodes (@cur may be freed) | [
"Add",
"a",
"list",
"of",
"node",
"at",
"the",
"end",
"of",
"the",
"child",
"list",
"of",
"the",
"parent",
"merging",
"adjacent",
"TEXT",
"nodes",
"("
] | 74514c3f99e25b46f22c6e02977fe3da69221c2e | https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L3088-L3096 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.