partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
train
Parse
Parses a text representation of a protocol message into a message. Args: text: Message text representation. message: A protocol buffer message to merge into. allow_unknown_extension: if True, skip over missing extensions and keep parsing allow_field_number: if True, both field number and field ...
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
def Parse(text, message, allow_unknown_extension=False, allow_field_number=False, descriptor_pool=None): """Parses a text representation of a protocol message into a message. Args: text: Message text representation. message: A protocol buffer message to merge into. ...
def Parse(text, message, allow_unknown_extension=False, allow_field_number=False, descriptor_pool=None): """Parses a text representation of a protocol message into a message. Args: text: Message text representation. message: A protocol buffer message to merge into. ...
[ "Parses", "a", "text", "representation", "of", "a", "protocol", "message", "into", "a", "message", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L422-L449
[ "def", "Parse", "(", "text", ",", "message", ",", "allow_unknown_extension", "=", "False", ",", "allow_field_number", "=", "False", ",", "descriptor_pool", "=", "None", ")", ":", "if", "not", "isinstance", "(", "text", ",", "str", ")", ":", "text", "=", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
_SkipFieldContents
Skips over contents (value or message) of a field. Args: tokenizer: A tokenizer to parse the field name and values.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
def _SkipFieldContents(tokenizer): """Skips over contents (value or message) of a field. Args: tokenizer: A tokenizer to parse the field name and values. """ # Try to guess the type of this field. # If this field is not a message, there should be a ":" between the # field name and the field value and a...
def _SkipFieldContents(tokenizer): """Skips over contents (value or message) of a field. Args: tokenizer: A tokenizer to parse the field name and values. """ # Try to guess the type of this field. # If this field is not a message, there should be a ":" between the # field name and the field value and a...
[ "Skips", "over", "contents", "(", "value", "or", "message", ")", "of", "a", "field", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L848-L864
[ "def", "_SkipFieldContents", "(", "tokenizer", ")", ":", "# Try to guess the type of this field.", "# If this field is not a message, there should be a \":\" between the", "# field name and the field value and also the field value should not", "# start with \"{\" or \"<\" which indicates the begin...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
_SkipField
Skips over a complete field (name and value/message). Args: tokenizer: A tokenizer to parse the field name and values.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
def _SkipField(tokenizer): """Skips over a complete field (name and value/message). Args: tokenizer: A tokenizer to parse the field name and values. """ if tokenizer.TryConsume('['): # Consume extension name. tokenizer.ConsumeIdentifier() while tokenizer.TryConsume('.'): tokenizer.Consume...
def _SkipField(tokenizer): """Skips over a complete field (name and value/message). Args: tokenizer: A tokenizer to parse the field name and values. """ if tokenizer.TryConsume('['): # Consume extension name. tokenizer.ConsumeIdentifier() while tokenizer.TryConsume('.'): tokenizer.Consume...
[ "Skips", "over", "a", "complete", "field", "(", "name", "and", "value", "/", "message", ")", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L867-L887
[ "def", "_SkipField", "(", "tokenizer", ")", ":", "if", "tokenizer", ".", "TryConsume", "(", "'['", ")", ":", "# Consume extension name.", "tokenizer", ".", "ConsumeIdentifier", "(", ")", "while", "tokenizer", ".", "TryConsume", "(", "'.'", ")", ":", "tokenizer...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
_SkipFieldMessage
Skips over a field message. Args: tokenizer: A tokenizer to parse the field name and values.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
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): """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('...
[ "Skips", "over", "a", "field", "message", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L890-L906
[ "def", "_SkipFieldMessage", "(", "tokenizer", ")", ":", "if", "tokenizer", ".", "TryConsume", "(", "'<'", ")", ":", "delimiter", "=", "'>'", "else", ":", "tokenizer", ".", "Consume", "(", "'{'", ")", "delimiter", "=", "'}'", "while", "not", "tokenizer", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
_SkipFieldValue
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.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
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): """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...
[ "Skips", "over", "a", "field", "value", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L909-L928
[ "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...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
_ConsumeInteger
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...
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
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): """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. ...
[ "Consumes", "an", "integer", "number", "from", "tokenizer", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L1359-L1378
[ "def", "_ConsumeInteger", "(", "tokenizer", ",", "is_signed", "=", "False", ",", "is_long", "=", "False", ")", ":", "try", ":", "result", "=", "ParseInteger", "(", "tokenizer", ".", "token", ",", "is_signed", "=", "is_signed", ",", "is_long", "=", "is_long...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
ParseInteger
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.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
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): """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...
[ "Parses", "an", "integer", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L1381-L1401
[ "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", ")"...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
_ParseAbstractInteger
Parses an integer without checking size/signedness. Args: text: The text to parse. is_long: True if the value should be returned as a long integer. Returns: The integer value. Raises: ValueError: Thrown Iff the text is not a valid integer.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
def _ParseAbstractInteger(text, is_long=False): """Parses an integer without checking size/signedness. Args: text: The text to parse. is_long: True if the value should be returned as a long integer. Returns: The integer value. Raises: ValueError: Thrown Iff the text is not a valid integer. ...
def _ParseAbstractInteger(text, is_long=False): """Parses an integer without checking size/signedness. Args: text: The text to parse. is_long: True if the value should be returned as a long integer. Returns: The integer value. Raises: ValueError: Thrown Iff the text is not a valid integer. ...
[ "Parses", "an", "integer", "without", "checking", "size", "/", "signedness", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L1404-L1427
[ "def", "_ParseAbstractInteger", "(", "text", ",", "is_long", "=", "False", ")", ":", "# Do the actual parsing. Exception handling is propagated to caller.", "try", ":", "# We force 32-bit values to int and 64-bit values to long to make", "# alternate implementations where the distinction...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
ParseFloat
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.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
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): """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...
[ "Parse", "a", "floating", "point", "number", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L1430-L1459
[ "def", "ParseFloat", "(", "text", ")", ":", "try", ":", "# Assume Python compatible syntax.", "return", "float", "(", "text", ")", "except", "ValueError", ":", "# Check alternative spellings.", "if", "_FLOAT_INFINITY", ".", "match", "(", "text", ")", ":", "if", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
ParseEnum
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.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
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): """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...
[ "Parse", "an", "enum", "value", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L1482-L1513
[ "def", "ParseEnum", "(", "field", ",", "value", ")", ":", "enum_descriptor", "=", "field", ".", "enum_type", "try", ":", "number", "=", "int", "(", "value", ",", "0", ")", "except", "ValueError", ":", "# Identifier.", "enum_value", "=", "enum_descriptor", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
_Printer._TryPrintAsAnyMessage
Serializes if message is a google.protobuf.Any field.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
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): """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) ...
[ "Serializes", "if", "message", "is", "a", "google", ".", "protobuf", ".", "Any", "field", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L287-L298
[ "def", "_TryPrintAsAnyMessage", "(", "self", ",", "message", ")", ":", "packed_message", "=", "_BuildMessageFromTypeName", "(", "message", ".", "TypeName", "(", ")", ",", "self", ".", "descriptor_pool", ")", "if", "packed_message", ":", "packed_message", ".", "M...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
_Printer.PrintMessage
Convert protobuf message to text format. Args: message: The protocol buffers message.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
def PrintMessage(self, message): """Convert protobuf message to text format. Args: message: The protocol buffers message. """ if (message.DESCRIPTOR.full_name == _ANY_FULL_TYPE_NAME and self.descriptor_pool and self._TryPrintAsAnyMessage(message)): return fields = message.ListFi...
def PrintMessage(self, message): """Convert protobuf message to text format. Args: message: The protocol buffers message. """ if (message.DESCRIPTOR.full_name == _ANY_FULL_TYPE_NAME and self.descriptor_pool and self._TryPrintAsAnyMessage(message)): return fields = message.ListFi...
[ "Convert", "protobuf", "message", "to", "text", "format", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L300-L326
[ "def", "PrintMessage", "(", "self", ",", "message", ")", ":", "if", "(", "message", ".", "DESCRIPTOR", ".", "full_name", "==", "_ANY_FULL_TYPE_NAME", "and", "self", ".", "descriptor_pool", "and", "self", ".", "_TryPrintAsAnyMessage", "(", "message", ")", ")", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
_Printer.PrintField
Print a single field name/value pair.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
def PrintField(self, field, value): """Print a single field name/value pair.""" out = self.out out.write(' ' * self.indent) if self.use_field_number: out.write(str(field.number)) else: if field.is_extension: out.write('[') if (field.containing_type.GetOptions().message_se...
def PrintField(self, field, value): """Print a single field name/value pair.""" out = self.out out.write(' ' * self.indent) if self.use_field_number: out.write(str(field.number)) else: if field.is_extension: out.write('[') if (field.containing_type.GetOptions().message_se...
[ "Print", "a", "single", "field", "name", "/", "value", "pair", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L328-L359
[ "def", "PrintField", "(", "self", ",", "field", ",", "value", ")", ":", "out", "=", "self", ".", "out", "out", ".", "write", "(", "' '", "*", "self", ".", "indent", ")", "if", "self", ".", "use_field_number", ":", "out", ".", "write", "(", "str", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
_Parser.ParseFromString
Parses a text representation of a protocol message into a message.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
def ParseFromString(self, text, message): """Parses a text representation of a protocol message into a message.""" if not isinstance(text, str): text = text.decode('utf-8') return self.ParseLines(text.split('\n'), message)
def ParseFromString(self, text, message): """Parses a text representation of a protocol message into a message.""" if not isinstance(text, str): text = text.decode('utf-8') return self.ParseLines(text.split('\n'), message)
[ "Parses", "a", "text", "representation", "of", "a", "protocol", "message", "into", "a", "message", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L549-L553
[ "def", "ParseFromString", "(", "self", ",", "text", ",", "message", ")", ":", "if", "not", "isinstance", "(", "text", ",", "str", ")", ":", "text", "=", "text", ".", "decode", "(", "'utf-8'", ")", "return", "self", ".", "ParseLines", "(", "text", "."...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
_Parser.ParseLines
Parses a text representation of a protocol message into a message.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
def ParseLines(self, lines, message): """Parses a text representation of a protocol message into a message.""" self._allow_multiple_scalars = False self._ParseOrMerge(lines, message) return message
def ParseLines(self, lines, message): """Parses a text representation of a protocol message into a message.""" self._allow_multiple_scalars = False self._ParseOrMerge(lines, message) return message
[ "Parses", "a", "text", "representation", "of", "a", "protocol", "message", "into", "a", "message", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L555-L559
[ "def", "ParseLines", "(", "self", ",", "lines", ",", "message", ")", ":", "self", ".", "_allow_multiple_scalars", "=", "False", "self", ".", "_ParseOrMerge", "(", "lines", ",", "message", ")", "return", "message" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
_Parser.MergeLines
Merges a text representation of a protocol message into a message.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
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): """Merges a text representation of a protocol message into a message.""" self._allow_multiple_scalars = True self._ParseOrMerge(lines, message) return message
[ "Merges", "a", "text", "representation", "of", "a", "protocol", "message", "into", "a", "message", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L565-L569
[ "def", "MergeLines", "(", "self", ",", "lines", ",", "message", ")", ":", "self", ".", "_allow_multiple_scalars", "=", "True", "self", ".", "_ParseOrMerge", "(", "lines", ",", "message", ")", "return", "message" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
_Parser._ParseOrMerge
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.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
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): """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 = ...
[ "Converts", "a", "text", "representation", "of", "a", "protocol", "message", "into", "a", "message", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L571-L583
[ "def", "_ParseOrMerge", "(", "self", ",", "lines", ",", "message", ")", ":", "tokenizer", "=", "Tokenizer", "(", "lines", ")", "while", "not", "tokenizer", ".", "AtEnd", "(", ")", ":", "self", ".", "_MergeField", "(", "tokenizer", ",", "message", ")" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
_Parser._MergeField
Merges a single protocol message field into a message. Args: tokenizer: A tokenizer to parse the field name and values. message: A protocol message to record the data. Raises: ParseError: In case of text parsing problems.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
def _MergeField(self, tokenizer, message): """Merges a single protocol message field into a message. Args: tokenizer: A tokenizer to parse the field name and values. message: A protocol message to record the data. Raises: ParseError: In case of text parsing problems. """ message_...
def _MergeField(self, tokenizer, message): """Merges a single protocol message field into a message. Args: tokenizer: A tokenizer to parse the field name and values. message: A protocol message to record the data. Raises: ParseError: In case of text parsing problems. """ message_...
[ "Merges", "a", "single", "protocol", "message", "field", "into", "a", "message", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L585-L693
[ "def", "_MergeField", "(", "self", ",", "tokenizer", ",", "message", ")", ":", "message_descriptor", "=", "message", ".", "DESCRIPTOR", "if", "(", "hasattr", "(", "message_descriptor", ",", "'syntax'", ")", "and", "message_descriptor", ".", "syntax", "==", "'p...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
_Parser._ConsumeAnyTypeUrl
Consumes a google.protobuf.Any type URL and returns the type name.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
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): """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...
[ "Consumes", "a", "google", ".", "protobuf", ".", "Any", "type", "URL", "and", "returns", "the", "type", "name", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L695-L708
[ "def", "_ConsumeAnyTypeUrl", "(", "self", ",", "tokenizer", ")", ":", "# Consume \"type.googleapis.com/\".", "tokenizer", ".", "ConsumeIdentifier", "(", ")", "tokenizer", ".", "Consume", "(", "'.'", ")", "tokenizer", ".", "ConsumeIdentifier", "(", ")", "tokenizer", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
_Parser._MergeMessageField
Merges a single scalar field into a message. Args: tokenizer: A tokenizer to parse the field value. message: The message of which field is a member. field: The descriptor of the field to be merged. Raises: ParseError: In case of text parsing problems.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
def _MergeMessageField(self, tokenizer, message, field): """Merges a single scalar field into a message. Args: tokenizer: A tokenizer to parse the field value. message: The message of which field is a member. field: The descriptor of the field to be merged. Raises: ParseError: In c...
def _MergeMessageField(self, tokenizer, message, field): """Merges a single scalar field into a message. Args: tokenizer: A tokenizer to parse the field value. message: The message of which field is a member. field: The descriptor of the field to be merged. Raises: ParseError: In c...
[ "Merges", "a", "single", "scalar", "field", "into", "a", "message", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L710-L781
[ "def", "_MergeMessageField", "(", "self", ",", "tokenizer", ",", "message", ",", "field", ")", ":", "is_map_entry", "=", "_IsMapEntry", "(", "field", ")", "if", "tokenizer", ".", "TryConsume", "(", "'<'", ")", ":", "end_token", "=", "'>'", "else", ":", "...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
_Parser._MergeScalarField
Merges a single scalar field into a message. Args: tokenizer: A tokenizer to parse the field value. message: A protocol message to record the data. field: The descriptor of the field to be merged. Raises: ParseError: In case of text parsing problems. RuntimeError: On runtime erro...
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
def _MergeScalarField(self, tokenizer, message, field): """Merges a single scalar field into a message. Args: tokenizer: A tokenizer to parse the field value. message: A protocol message to record the data. field: The descriptor of the field to be merged. Raises: ParseError: In cas...
def _MergeScalarField(self, tokenizer, message, field): """Merges a single scalar field into a message. Args: tokenizer: A tokenizer to parse the field value. message: A protocol message to record the data. field: The descriptor of the field to be merged. Raises: ParseError: In cas...
[ "Merges", "a", "single", "scalar", "field", "into", "a", "message", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L783-L845
[ "def", "_MergeScalarField", "(", "self", ",", "tokenizer", ",", "message", ",", "field", ")", ":", "_", "=", "self", ".", "allow_unknown_extension", "value", "=", "None", "if", "field", ".", "type", "in", "(", "descriptor", ".", "FieldDescriptor", ".", "TY...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
Tokenizer.TryConsume
Tries to consume a given piece of text. Args: token: Text to consume. Returns: True iff the text was consumed.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
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): """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
[ "Tries", "to", "consume", "a", "given", "piece", "of", "text", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L1002-L1014
[ "def", "TryConsume", "(", "self", ",", "token", ")", ":", "if", "self", ".", "token", "==", "token", ":", "self", ".", "NextToken", "(", ")", "return", "True", "return", "False" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
Tokenizer.ConsumeCommentOrTrailingComment
Consumes a comment, returns a 2-tuple (trailing bool, comment str).
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
def ConsumeCommentOrTrailingComment(self): """Consumes a comment, returns a 2-tuple (trailing bool, comment str).""" # Tokenizer initializes _previous_line and _previous_column to 0. As the # tokenizer starts, it looks like there is a previous token on the line. just_started = self._line == 0 and self....
def ConsumeCommentOrTrailingComment(self): """Consumes a comment, returns a 2-tuple (trailing bool, comment str).""" # Tokenizer initializes _previous_line and _previous_column to 0. As the # tokenizer starts, it looks like there is a previous token on the line. just_started = self._line == 0 and self....
[ "Consumes", "a", "comment", "returns", "a", "2", "-", "tuple", "(", "trailing", "bool", "comment", "str", ")", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L1035-L1049
[ "def", "ConsumeCommentOrTrailingComment", "(", "self", ")", ":", "# Tokenizer initializes _previous_line and _previous_column to 0. As the", "# tokenizer starts, it looks like there is a previous token on the line.", "just_started", "=", "self", ".", "_line", "==", "0", "and", "self"...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
Tokenizer.ConsumeIdentifier
Consumes protocol message field identifier. Returns: Identifier string. Raises: ParseError: If an identifier couldn't be consumed.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
def ConsumeIdentifier(self): """Consumes protocol message field identifier. Returns: Identifier string. Raises: ParseError: If an identifier couldn't be consumed. """ result = self.token if not self._IDENTIFIER.match(result): raise self.ParseError('Expected identifier.') ...
def ConsumeIdentifier(self): """Consumes protocol message field identifier. Returns: Identifier string. Raises: ParseError: If an identifier couldn't be consumed. """ result = self.token if not self._IDENTIFIER.match(result): raise self.ParseError('Expected identifier.') ...
[ "Consumes", "protocol", "message", "field", "identifier", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L1058-L1071
[ "def", "ConsumeIdentifier", "(", "self", ")", ":", "result", "=", "self", ".", "token", "if", "not", "self", ".", "_IDENTIFIER", ".", "match", "(", "result", ")", ":", "raise", "self", ".", "ParseError", "(", "'Expected identifier.'", ")", "self", ".", "...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
Tokenizer.ConsumeIdentifierOrNumber
Consumes protocol message field identifier. Returns: Identifier string. Raises: ParseError: If an identifier couldn't be consumed.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
def ConsumeIdentifierOrNumber(self): """Consumes protocol message field identifier. Returns: Identifier string. Raises: ParseError: If an identifier couldn't be consumed. """ result = self.token if not self._IDENTIFIER_OR_NUMBER.match(result): raise self.ParseError('Expected ...
def ConsumeIdentifierOrNumber(self): """Consumes protocol message field identifier. Returns: Identifier string. Raises: ParseError: If an identifier couldn't be consumed. """ result = self.token if not self._IDENTIFIER_OR_NUMBER.match(result): raise self.ParseError('Expected ...
[ "Consumes", "protocol", "message", "field", "identifier", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L1080-L1093
[ "def", "ConsumeIdentifierOrNumber", "(", "self", ")", ":", "result", "=", "self", ".", "token", "if", "not", "self", ".", "_IDENTIFIER_OR_NUMBER", ".", "match", "(", "result", ")", ":", "raise", "self", ".", "ParseError", "(", "'Expected identifier or number.'",...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
Tokenizer.ConsumeInteger
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.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
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): """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...
[ "Consumes", "an", "integer", "number", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L1103-L1119
[ "def", "ConsumeInteger", "(", "self", ",", "is_long", "=", "False", ")", ":", "try", ":", "result", "=", "_ParseAbstractInteger", "(", "self", ".", "token", ",", "is_long", "=", "is_long", ")", "except", "ValueError", "as", "e", ":", "raise", "self", "."...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
Tokenizer.ConsumeString
Consumes a string value. Returns: The string parsed. Raises: ParseError: If a string value couldn't be consumed.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
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): """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 ...
[ "Consumes", "a", "string", "value", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L1167-L1180
[ "def", "ConsumeString", "(", "self", ")", ":", "the_bytes", "=", "self", ".", "ConsumeByteString", "(", ")", "try", ":", "return", "six", ".", "text_type", "(", "the_bytes", ",", "'utf-8'", ")", "except", "UnicodeDecodeError", "as", "e", ":", "raise", "sel...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
Tokenizer.ConsumeByteString
Consumes a byte array value. Returns: The array parsed (as a string). Raises: ParseError: If a byte array value couldn't be consumed.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
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): """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...
[ "Consumes", "a", "byte", "array", "value", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L1182-L1194
[ "def", "ConsumeByteString", "(", "self", ")", ":", "the_list", "=", "[", "self", ".", "_ConsumeSingleByteString", "(", ")", "]", "while", "self", ".", "token", "and", "self", ".", "token", "[", "0", "]", "in", "_QUOTES", ":", "the_list", ".", "append", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
Tokenizer.NextToken
Reads the next meaningful token.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py
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): """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...
[ "Reads", "the", "next", "meaningful", "token", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/text_format.py#L1249-L1268
[ "def", "NextToken", "(", "self", ")", ":", "self", ".", "_previous_line", "=", "self", ".", "_line", "self", ".", "_previous_column", "=", "self", ".", "_column", "self", ".", "_column", "+=", "len", "(", "self", ".", "token", ")", "self", ".", "_SkipW...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
create
Create a :class:`~turicreate.decision_tree_regression.DecisionTreeRegression` to predict a scalar target variable using one or more features. In addition to standard numeric and categorical types, features can also be extracted automatically from list- or dictionary-type SFrame columns. Parameters ...
src/unity/python/turicreate/toolkits/regression/decision_tree_regression.py
def create(dataset, target, features=None, validation_set='auto', max_depth=6, min_loss_reduction=0.0, min_child_weight=0.1, verbose=True, random_seed = None, metric = 'auto', **kwargs): """ Create a :class:`~turicreate.deci...
def create(dataset, target, features=None, validation_set='auto', max_depth=6, min_loss_reduction=0.0, min_child_weight=0.1, verbose=True, random_seed = None, metric = 'auto', **kwargs): """ Create a :class:`~turicreate.deci...
[ "Create", "a", ":", "class", ":", "~turicreate", ".", "decision_tree_regression", ".", "DecisionTreeRegression", "to", "predict", "a", "scalar", "target", "variable", "using", "one", "or", "more", "features", ".", "In", "addition", "to", "standard", "numeric", "...
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/regression/decision_tree_regression.py#L310-L426
[ "def", "create", "(", "dataset", ",", "target", ",", "features", "=", "None", ",", "validation_set", "=", "'auto'", ",", "max_depth", "=", "6", ",", "min_loss_reduction", "=", "0.0", ",", "min_child_weight", "=", "0.1", ",", "verbose", "=", "True", ",", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
DecisionTreeRegression.evaluate
Evaluate the model on the given dataset. Parameters ---------- dataset : SFrame Dataset in the same format used for training. The columns names and types of the dataset must be the same as that used in training. metric : str, optional Name of the eva...
src/unity/python/turicreate/toolkits/regression/decision_tree_regression.py
def evaluate(self, dataset, metric='auto', missing_value_action='auto'): """ Evaluate the model on the given dataset. Parameters ---------- dataset : SFrame Dataset in the same format used for training. The columns names and types of the dataset must be t...
def evaluate(self, dataset, metric='auto', missing_value_action='auto'): """ Evaluate the model on the given dataset. Parameters ---------- dataset : SFrame Dataset in the same format used for training. The columns names and types of the dataset must be t...
[ "Evaluate", "the", "model", "on", "the", "given", "dataset", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/regression/decision_tree_regression.py#L179-L228
[ "def", "evaluate", "(", "self", ",", "dataset", ",", "metric", "=", "'auto'", ",", "missing_value_action", "=", "'auto'", ")", ":", "_raise_error_evaluation_metric_is_valid", "(", "metric", ",", "[", "'auto'", ",", "'rmse'", ",", "'max_error'", "]", ")", "retu...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
DecisionTreeRegression.predict
Predict the target column of the given dataset. The target column is provided during :func:`~turicreate.decision_tree_regression.create`. If the target column is in the `dataset` it will be ignored. Parameters ---------- dataset : SFrame A dataset that has the...
src/unity/python/turicreate/toolkits/regression/decision_tree_regression.py
def predict(self, dataset, missing_value_action='auto'): """ Predict the target column of the given dataset. The target column is provided during :func:`~turicreate.decision_tree_regression.create`. If the target column is in the `dataset` it will be ignored. Parameters...
def predict(self, dataset, missing_value_action='auto'): """ Predict the target column of the given dataset. The target column is provided during :func:`~turicreate.decision_tree_regression.create`. If the target column is in the `dataset` it will be ignored. Parameters...
[ "Predict", "the", "target", "column", "of", "the", "given", "dataset", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/regression/decision_tree_regression.py#L258-L299
[ "def", "predict", "(", "self", ",", "dataset", ",", "missing_value_action", "=", "'auto'", ")", ":", "return", "super", "(", "DecisionTreeRegression", ",", "self", ")", ".", "predict", "(", "dataset", ",", "output_type", "=", "'margin'", ",", "missing_value_ac...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
compute_composite_distance
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 ...
src/unity/python/turicreate/toolkits/distances/_util.py
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): """ 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...
[ "Compute", "the", "value", "of", "a", "composite", "distance", "function", "on", "two", "dictionaries", "typically", "SFrame", "rows", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/distances/_util.py#L24-L126
[ "def", "compute_composite_distance", "(", "distance", ",", "x", ",", "y", ")", ":", "## Validate inputs", "_validate_composite_distance", "(", "distance", ")", "distance", "=", "_convert_distance_names_to_functions", "(", "distance", ")", "if", "not", "isinstance", "(...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
_validate_composite_distance
Check that composite distance function is in valid form. Don't modify the composite distance in any way.
src/unity/python/turicreate/toolkits/distances/_util.py
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): """ 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: ...
[ "Check", "that", "composite", "distance", "function", "is", "in", "valid", "form", ".", "Don", "t", "modify", "the", "composite", "distance", "in", "any", "way", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/distances/_util.py#L129-L187
[ "def", "_validate_composite_distance", "(", "distance", ")", ":", "if", "not", "isinstance", "(", "distance", ",", "list", ")", ":", "raise", "TypeError", "(", "\"Input 'distance' must be a composite distance.\"", ")", "if", "len", "(", "distance", ")", "<", "1", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
_scrub_composite_distance_features
Remove feature names from the feature lists in a composite distance function.
src/unity/python/turicreate/toolkits/distances/_util.py
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): """ 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...
[ "Remove", "feature", "names", "from", "the", "feature", "lists", "in", "a", "composite", "distance", "function", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/distances/_util.py#L190-L203
[ "def", "_scrub_composite_distance_features", "(", "distance", ",", "feature_blacklist", ")", ":", "dist_out", "=", "[", "]", "for", "i", ",", "d", "in", "enumerate", "(", "distance", ")", ":", "ftrs", ",", "dist", ",", "weight", "=", "d", "new_ftrs", "=", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
_convert_distance_names_to_functions
Convert function names in a composite distance function into function handles.
src/unity/python/turicreate/toolkits/distances/_util.py
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): """ 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: ...
[ "Convert", "function", "names", "in", "a", "composite", "distance", "function", "into", "function", "handles", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/distances/_util.py#L206-L221
[ "def", "_convert_distance_names_to_functions", "(", "distance", ")", ":", "dist_out", "=", "_copy", ".", "deepcopy", "(", "distance", ")", "for", "i", ",", "d", "in", "enumerate", "(", "distance", ")", ":", "_", ",", "dist", ",", "_", "=", "d", "if", "...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
build_address_distance
Construct a composite distance appropriate for matching address data. NOTE: this utility function does not guarantee that the output composite distance will work with a particular dataset and model. When the composite distance is applied in a particular context, the feature types and individual distance...
src/unity/python/turicreate/toolkits/distances/_util.py
def build_address_distance(number=None, street=None, city=None, state=None, zip_code=None): """ Construct a composite distance appropriate for matching address data. NOTE: this utility function does not guarantee that the output composite distance will work with a particular d...
def build_address_distance(number=None, street=None, city=None, state=None, zip_code=None): """ Construct a composite distance appropriate for matching address data. NOTE: this utility function does not guarantee that the output composite distance will work with a particular d...
[ "Construct", "a", "composite", "distance", "appropriate", "for", "matching", "address", "data", ".", "NOTE", ":", "this", "utility", "function", "does", "not", "guarantee", "that", "the", "output", "composite", "distance", "will", "work", "with", "a", "particula...
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/distances/_util.py#L232-L301
[ "def", "build_address_distance", "(", "number", "=", "None", ",", "street", "=", "None", ",", "city", "=", "None", ",", "state", "=", "None", ",", "zip_code", "=", "None", ")", ":", "## Validate inputs", "for", "param", "in", "[", "number", ",", "street"...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
GetMessages
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 ...
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/message_factory.py
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): """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...
[ "Builds", "a", "dictionary", "of", "all", "the", "messages", "available", "in", "a", "set", "of", "files", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/message_factory.py#L129-L142
[ "def", "GetMessages", "(", "file_protos", ")", ":", "for", "file_proto", "in", "file_protos", ":", "_FACTORY", ".", "pool", ".", "Add", "(", "file_proto", ")", "return", "_FACTORY", ".", "GetMessages", "(", "[", "file_proto", ".", "name", "for", "file_proto"...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
MessageFactory.GetPrototype
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.
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/message_factory.py
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): """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 ...
[ "Builds", "a", "proto2", "message", "class", "based", "on", "the", "passed", "in", "descriptor", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/message_factory.py#L57-L87
[ "def", "GetPrototype", "(", "self", ",", "descriptor", ")", ":", "if", "descriptor", ".", "full_name", "not", "in", "self", ".", "_classes", ":", "descriptor_name", "=", "descriptor", ".", "name", "if", "str", "is", "bytes", ":", "# PY2", "descriptor_name", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
MessageFactory.GetMessages
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...
src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/message_factory.py
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): """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...
[ "Gets", "all", "the", "messages", "from", "a", "specified", "file", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/external/coremltools_wrap/coremltools/deps/protobuf/python/google/protobuf/message_factory.py#L89-L123
[ "def", "GetMessages", "(", "self", ",", "files", ")", ":", "result", "=", "{", "}", "for", "file_name", "in", "files", ":", "file_desc", "=", "self", ".", "pool", ".", "FindFileByName", "(", "file_name", ")", "for", "desc", "in", "file_desc", ".", "mes...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
refactor_ifs
for if statements in list comprehension
src/unity/python/turicreate/meta/decompiler/control_flow_instructions.py
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): ''' 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) ...
[ "for", "if", "statements", "in", "list", "comprehension" ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/meta/decompiler/control_flow_instructions.py#L58-L70
[ "def", "refactor_ifs", "(", "stmnt", ",", "ifs", ")", ":", "if", "isinstance", "(", "stmnt", ",", "_ast", ".", "BoolOp", ")", ":", "test", ",", "right", "=", "stmnt", ".", "values", "if", "isinstance", "(", "stmnt", ".", "op", ",", "_ast", ".", "Or...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
CtrlFlowInstructions.MAP_ADD
NOP
src/unity/python/turicreate/meta/decompiler/control_flow_instructions.py
def MAP_ADD(self, instr): key = self.ast_stack.pop() value = self.ast_stack.pop() self.ast_stack.append((key, value)) 'NOP'
def MAP_ADD(self, instr): key = self.ast_stack.pop() value = self.ast_stack.pop() self.ast_stack.append((key, value)) 'NOP'
[ "NOP" ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/meta/decompiler/control_flow_instructions.py#L551-L556
[ "def", "MAP_ADD", "(", "self", ",", "instr", ")", ":", "key", "=", "self", ".", "ast_stack", ".", "pop", "(", ")", "value", "=", "self", ".", "ast_stack", ".", "pop", "(", ")", "self", ".", "ast_stack", ".", "append", "(", "(", "key", ",", "value...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
_get_mps_od_net
Initializes an MpsGraphAPI for object detection.
src/unity/python/turicreate/toolkits/object_detector/object_detector.py
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={}): """ 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...
[ "Initializes", "an", "MpsGraphAPI", "for", "object", "detection", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/object_detector/object_detector.py#L44-L62
[ "def", "_get_mps_od_net", "(", "input_image_shape", ",", "batch_size", ",", "output_size", ",", "anchors", ",", "config", ",", "weights", "=", "{", "}", ")", ":", "network", "=", "_MpsGraphAPI", "(", "network_id", "=", "_MpsGraphNetworkType", ".", "kODGraphNet",...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
create
Create a :class:`ObjectDetector` model. Parameters ---------- dataset : SFrame Input data. The columns named by the ``feature`` and ``annotations`` parameters will be extracted for training the detector. annotations : string Name of the column containing the object detection an...
src/unity/python/turicreate/toolkits/object_detector/object_detector.py
def create(dataset, annotations=None, feature=None, model='darknet-yolo', classes=None, batch_size=0, max_iterations=0, verbose=True, **kwargs): """ Create a :class:`ObjectDetector` model. Parameters ---------- dataset : SFrame Input data. The columns named by the ``fe...
def create(dataset, annotations=None, feature=None, model='darknet-yolo', classes=None, batch_size=0, max_iterations=0, verbose=True, **kwargs): """ Create a :class:`ObjectDetector` model. Parameters ---------- dataset : SFrame Input data. The columns named by the ``fe...
[ "Create", "a", ":", "class", ":", "ObjectDetector", "model", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/object_detector/object_detector.py#L98-L622
[ "def", "create", "(", "dataset", ",", "annotations", "=", "None", ",", "feature", "=", "None", ",", "model", "=", "'darknet-yolo'", ",", "classes", "=", "None", ",", "batch_size", "=", "0", ",", "max_iterations", "=", "0", ",", "verbose", "=", "True", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
ObjectDetector._predict_with_options
Predict with options for what kind of SFrame should be returned. If postprocess is False, a single numpy array with raw unprocessed results will be returned.
src/unity/python/turicreate/toolkits/object_detector/object_detector.py
def _predict_with_options(self, dataset, with_ground_truth, postprocess=True, confidence_threshold=0.001, iou_threshold=None, verbose=True): """ Predict with options for what kind of SFrame should be returned. ...
def _predict_with_options(self, dataset, with_ground_truth, postprocess=True, confidence_threshold=0.001, iou_threshold=None, verbose=True): """ Predict with options for what kind of SFrame should be returned. ...
[ "Predict", "with", "options", "for", "what", "kind", "of", "SFrame", "should", "be", "returned", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/object_detector/object_detector.py#L730-L914
[ "def", "_predict_with_options", "(", "self", ",", "dataset", ",", "with_ground_truth", ",", "postprocess", "=", "True", ",", "confidence_threshold", "=", "0.001", ",", "iou_threshold", "=", "None", ",", "verbose", "=", "True", ")", ":", "if", "iou_threshold", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
ObjectDetector._canonize_input
Takes input and returns tuple of the input in canonical form (SFrame) along with an unpack callback function that can be applied to prediction results to "undo" the canonization.
src/unity/python/turicreate/toolkits/object_detector/object_detector.py
def _canonize_input(self, dataset): """ Takes input and returns tuple of the input in canonical form (SFrame) along with an unpack callback function that can be applied to prediction results to "undo" the canonization. """ unpack = lambda x: x if isinstance(datase...
def _canonize_input(self, dataset): """ Takes input and returns tuple of the input in canonical form (SFrame) along with an unpack callback function that can be applied to prediction results to "undo" the canonization. """ unpack = lambda x: x if isinstance(datase...
[ "Takes", "input", "and", "returns", "tuple", "of", "the", "input", "in", "canonical", "form", "(", "SFrame", ")", "along", "with", "an", "unpack", "callback", "function", "that", "can", "be", "applied", "to", "prediction", "results", "to", "undo", "the", "...
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/object_detector/object_detector.py#L920-L932
[ "def", "_canonize_input", "(", "self", ",", "dataset", ")", ":", "unpack", "=", "lambda", "x", ":", "x", "if", "isinstance", "(", "dataset", ",", "_tc", ".", "SArray", ")", ":", "dataset", "=", "_tc", ".", "SFrame", "(", "{", "self", ".", "feature", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
ObjectDetector.predict
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...
src/unity/python/turicreate/toolkits/object_detector/object_detector.py
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): """ Predict object instances in an sframe of images. Parameters ---------- dataset : SFrame | SArray | turicreate.Image The images on which to perform object detection. ...
[ "Predict", "object", "instances", "in", "an", "sframe", "of", "images", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/object_detector/object_detector.py#L934-L1004
[ "def", "predict", "(", "self", ",", "dataset", ",", "confidence_threshold", "=", "0.25", ",", "iou_threshold", "=", "None", ",", "verbose", "=", "True", ")", ":", "_numeric_param_check_range", "(", "'confidence_threshold'", ",", "confidence_threshold", ",", "0.0",...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
ObjectDetector.evaluate
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...
src/unity/python/turicreate/toolkits/object_detector/object_detector.py
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): """ Evaluate the model by making predictions and comparing these to ground truth bounding box annotations. Parameters ---------- ...
[ "Evaluate", "the", "model", "by", "making", "predictions", "and", "comparing", "these", "to", "ground", "truth", "bounding", "box", "annotations", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/object_detector/object_detector.py#L1006-L1134
[ "def", "evaluate", "(", "self", ",", "dataset", ",", "metric", "=", "'auto'", ",", "output_type", "=", "'dict'", ",", "iou_threshold", "=", "None", ",", "confidence_threshold", "=", "None", ",", "verbose", "=", "True", ")", ":", "if", "iou_threshold", "is"...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
ObjectDetector.export_coreml
Save the model in Core ML format. The Core ML model takes an image of fixed size as input and produces two output arrays: `confidence` and `coordinates`. The first one, `confidence` is an `N`-by-`C` array, where `N` is the number of instances predicted and `C` is the number of classes. ...
src/unity/python/turicreate/toolkits/object_detector/object_detector.py
def export_coreml(self, filename, include_non_maximum_suppression = True, iou_threshold = None, confidence_threshold = None): """ Save the model in Core ML format. The Core ML model takes an image of fixed size as input and produces two output arrays: `confid...
def export_coreml(self, filename, include_non_maximum_suppression = True, iou_threshold = None, confidence_threshold = None): """ Save the model in Core ML format. The Core ML model takes an image of fixed size as input and produces two output arrays: `confid...
[ "Save", "the", "model", "in", "Core", "ML", "format", ".", "The", "Core", "ML", "model", "takes", "an", "image", "of", "fixed", "size", "as", "input", "and", "produces", "two", "output", "arrays", ":", "confidence", "and", "coordinates", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/src/unity/python/turicreate/toolkits/object_detector/object_detector.py#L1136-L1631
[ "def", "export_coreml", "(", "self", ",", "filename", ",", "include_non_maximum_suppression", "=", "True", ",", "iou_threshold", "=", "None", ",", "confidence_threshold", "=", "None", ")", ":", "import", "mxnet", "as", "_mx", "from", ".", ".", "_mxnet", ".", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
CMakeTransform.parse_title
Parse a document title as the first line starting in [A-Za-z0-9<] or fall back to the document basename if no such line exists. The cmake --help-*-list commands also depend on this convention. Return the title or False if the document file does not exist.
deps/src/cmake-3.13.4/Utilities/Sphinx/cmake.py
def parse_title(self, docname): """Parse a document title as the first line starting in [A-Za-z0-9<] or fall back to the document basename if no such line exists. The cmake --help-*-list commands also depend on this convention. Return the title or False if the document file does...
def parse_title(self, docname): """Parse a document title as the first line starting in [A-Za-z0-9<] or fall back to the document basename if no such line exists. The cmake --help-*-list commands also depend on this convention. Return the title or False if the document file does...
[ "Parse", "a", "document", "title", "as", "the", "first", "line", "starting", "in", "[", "A", "-", "Za", "-", "z0", "-", "9<", "]", "or", "fall", "back", "to", "the", "document", "basename", "if", "no", "such", "line", "exists", ".", "The", "cmake", ...
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/cmake-3.13.4/Utilities/Sphinx/cmake.py#L181-L204
[ "def", "parse_title", "(", "self", ",", "docname", ")", ":", "env", "=", "self", ".", "document", ".", "settings", ".", "env", "title", "=", "self", ".", "titles", ".", "get", "(", "docname", ")", "if", "title", "is", "None", ":", "fname", "=", "os...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
registerErrorHandler
Register a Python written function to for error reporting. The function is called back as f(ctx, error).
deps/src/libxml2-2.9.1/python/libxml2.py
def registerErrorHandler(f, ctx): """Register a Python written function to for error reporting. The function is called back as f(ctx, error). """ import sys if 'libxslt' not in sys.modules: # normal behaviour when libxslt is not imported ret = libxml2mod.xmlRegisterErrorHandler(f,ctx)...
def registerErrorHandler(f, ctx): """Register a Python written function to for error reporting. The function is called back as f(ctx, error). """ import sys if 'libxslt' not in sys.modules: # normal behaviour when libxslt is not imported ret = libxml2mod.xmlRegisterErrorHandler(f,ctx)...
[ "Register", "a", "Python", "written", "function", "to", "for", "error", "reporting", ".", "The", "function", "is", "called", "back", "as", "f", "(", "ctx", "error", ")", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L630-L642
[ "def", "registerErrorHandler", "(", "f", ",", "ctx", ")", ":", "import", "sys", "if", "'libxslt'", "not", "in", "sys", ".", "modules", ":", "# normal behaviour when libxslt is not imported", "ret", "=", "libxml2mod", ".", "xmlRegisterErrorHandler", "(", "f", ",", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
_xmlTextReaderErrorFunc
Intermediate callback to wrap the locator
deps/src/libxml2-2.9.1/python/libxml2.py
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): """Intermediate callback to wrap the locator""" (f,arg) = xxx_todo_changeme return f(arg,msg,severity,xmlTextReaderLocator(locator))
[ "Intermediate", "callback", "to", "wrap", "the", "locator" ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L713-L716
[ "def", "_xmlTextReaderErrorFunc", "(", "xxx_todo_changeme", ",", "msg", ",", "severity", ",", "locator", ")", ":", "(", "f", ",", "arg", ")", "=", "xxx_todo_changeme", "return", "f", "(", "arg", ",", "msg", ",", "severity", ",", "xmlTextReaderLocator", "(", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
htmlCreateMemoryParserCtxt
Create a parser context for an HTML in-memory document.
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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)
[ "Create", "a", "parser", "context", "for", "an", "HTML", "in", "-", "memory", "document", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L791-L795
[ "def", "htmlCreateMemoryParserCtxt", "(", "buffer", ",", "size", ")", ":", "ret", "=", "libxml2mod", ".", "htmlCreateMemoryParserCtxt", "(", "buffer", ",", "size", ")", "if", "ret", "is", "None", ":", "raise", "parserError", "(", "'htmlCreateMemoryParserCtxt() fai...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
htmlParseDoc
parse an HTML in-memory document and build a tree.
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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)
[ "parse", "an", "HTML", "in", "-", "memory", "document", "and", "build", "a", "tree", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L814-L818
[ "def", "htmlParseDoc", "(", "cur", ",", "encoding", ")", ":", "ret", "=", "libxml2mod", ".", "htmlParseDoc", "(", "cur", ",", "encoding", ")", "if", "ret", "is", "None", ":", "raise", "parserError", "(", "'htmlParseDoc() failed'", ")", "return", "xmlDoc", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
htmlParseFile
parse an HTML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.
deps/src/libxml2-2.9.1/python/libxml2.py
def htmlParseFile(filename, encoding): """parse an HTML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. """ ret = libxml2mod.htmlParseFile(filename, encoding) if ret is None:raise parserError('htmlParseFile() failed...
def htmlParseFile(filename, encoding): """parse an HTML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. """ ret = libxml2mod.htmlParseFile(filename, encoding) if ret is None:raise parserError('htmlParseFile() failed...
[ "parse", "an", "HTML", "file", "and", "build", "a", "tree", ".", "Automatic", "support", "for", "ZLIB", "/", "Compress", "compressed", "document", "is", "provided", "by", "default", "if", "found", "at", "compile", "-", "time", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L820-L826
[ "def", "htmlParseFile", "(", "filename", ",", "encoding", ")", ":", "ret", "=", "libxml2mod", ".", "htmlParseFile", "(", "filename", ",", "encoding", ")", "if", "ret", "is", "None", ":", "raise", "parserError", "(", "'htmlParseFile() failed'", ")", "return", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
htmlReadDoc
parse an XML in-memory document and build a tree.
deps/src/libxml2-2.9.1/python/libxml2.py
def htmlReadDoc(cur, URL, encoding, options): """parse an XML in-memory document and build a tree. """ ret = libxml2mod.htmlReadDoc(cur, URL, encoding, options) if ret is None:raise treeError('htmlReadDoc() failed') return xmlDoc(_obj=ret)
def htmlReadDoc(cur, URL, encoding, options): """parse an XML in-memory document and build a tree. """ ret = libxml2mod.htmlReadDoc(cur, URL, encoding, options) if ret is None:raise treeError('htmlReadDoc() failed') return xmlDoc(_obj=ret)
[ "parse", "an", "XML", "in", "-", "memory", "document", "and", "build", "a", "tree", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L828-L832
[ "def", "htmlReadDoc", "(", "cur", ",", "URL", ",", "encoding", ",", "options", ")", ":", "ret", "=", "libxml2mod", ".", "htmlReadDoc", "(", "cur", ",", "URL", ",", "encoding", ",", "options", ")", "if", "ret", "is", "None", ":", "raise", "treeError", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
htmlReadFd
parse an XML from a file descriptor and build a tree.
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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)
[ "parse", "an", "XML", "from", "a", "file", "descriptor", "and", "build", "a", "tree", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L834-L838
[ "def", "htmlReadFd", "(", "fd", ",", "URL", ",", "encoding", ",", "options", ")", ":", "ret", "=", "libxml2mod", ".", "htmlReadFd", "(", "fd", ",", "URL", ",", "encoding", ",", "options", ")", "if", "ret", "is", "None", ":", "raise", "treeError", "("...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
htmlReadFile
parse an XML file from the filesystem or the network.
deps/src/libxml2-2.9.1/python/libxml2.py
def htmlReadFile(filename, encoding, options): """parse an XML file from the filesystem or the network. """ ret = libxml2mod.htmlReadFile(filename, encoding, options) if ret is None:raise treeError('htmlReadFile() failed') return xmlDoc(_obj=ret)
def htmlReadFile(filename, encoding, options): """parse an XML file from the filesystem or the network. """ ret = libxml2mod.htmlReadFile(filename, encoding, options) if ret is None:raise treeError('htmlReadFile() failed') return xmlDoc(_obj=ret)
[ "parse", "an", "XML", "file", "from", "the", "filesystem", "or", "the", "network", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L840-L844
[ "def", "htmlReadFile", "(", "filename", ",", "encoding", ",", "options", ")", ":", "ret", "=", "libxml2mod", ".", "htmlReadFile", "(", "filename", ",", "encoding", ",", "options", ")", "if", "ret", "is", "None", ":", "raise", "treeError", "(", "'htmlReadFi...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
htmlReadMemory
parse an XML in-memory document and build a tree.
deps/src/libxml2-2.9.1/python/libxml2.py
def htmlReadMemory(buffer, size, URL, encoding, options): """parse an XML in-memory document and build a tree. """ ret = libxml2mod.htmlReadMemory(buffer, size, URL, encoding, options) if ret is None:raise treeError('htmlReadMemory() failed') return xmlDoc(_obj=ret)
def htmlReadMemory(buffer, size, URL, encoding, options): """parse an XML in-memory document and build a tree. """ ret = libxml2mod.htmlReadMemory(buffer, size, URL, encoding, options) if ret is None:raise treeError('htmlReadMemory() failed') return xmlDoc(_obj=ret)
[ "parse", "an", "XML", "in", "-", "memory", "document", "and", "build", "a", "tree", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L846-L850
[ "def", "htmlReadMemory", "(", "buffer", ",", "size", ",", "URL", ",", "encoding", ",", "options", ")", ":", "ret", "=", "libxml2mod", ".", "htmlReadMemory", "(", "buffer", ",", "size", ",", "URL", ",", "encoding", ",", "options", ")", "if", "ret", "is"...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
htmlNewDoc
Creates a new HTML document
deps/src/libxml2-2.9.1/python/libxml2.py
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): """Creates a new HTML document """ ret = libxml2mod.htmlNewDoc(URI, ExternalID) if ret is None:raise treeError('htmlNewDoc() failed') return xmlDoc(_obj=ret)
[ "Creates", "a", "new", "HTML", "document" ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L861-L865
[ "def", "htmlNewDoc", "(", "URI", ",", "ExternalID", ")", ":", "ret", "=", "libxml2mod", ".", "htmlNewDoc", "(", "URI", ",", "ExternalID", ")", "if", "ret", "is", "None", ":", "raise", "treeError", "(", "'htmlNewDoc() failed'", ")", "return", "xmlDoc", "(",...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
htmlNewDocNoDtD
Creates a new HTML document without a DTD node if @URI and @ExternalID are None
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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)
[ "Creates", "a", "new", "HTML", "document", "without", "a", "DTD", "node", "if" ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L867-L872
[ "def", "htmlNewDocNoDtD", "(", "URI", ",", "ExternalID", ")", ":", "ret", "=", "libxml2mod", ".", "htmlNewDocNoDtD", "(", "URI", ",", "ExternalID", ")", "if", "ret", "is", "None", ":", "raise", "treeError", "(", "'htmlNewDocNoDtD() failed'", ")", "return", "...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
catalogAdd
Add an entry in the catalog, it may overwrite existing but different entries. If called before any other catalog routine, allows to override the default shared catalog put in place by xmlInitializeCatalog();
deps/src/libxml2-2.9.1/python/libxml2.py
def catalogAdd(type, orig, replace): """Add an entry in the catalog, it may overwrite existing but different entries. If called before any other catalog routine, allows to override the default shared catalog put in place by xmlInitializeCatalog(); """ ret = libxml2mod.xmlCatalogAdd(type, orig...
def catalogAdd(type, orig, replace): """Add an entry in the catalog, it may overwrite existing but different entries. If called before any other catalog routine, allows to override the default shared catalog put in place by xmlInitializeCatalog(); """ ret = libxml2mod.xmlCatalogAdd(type, orig...
[ "Add", "an", "entry", "in", "the", "catalog", "it", "may", "overwrite", "existing", "but", "different", "entries", ".", "If", "called", "before", "any", "other", "catalog", "routine", "allows", "to", "override", "the", "default", "shared", "catalog", "put", ...
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L903-L909
[ "def", "catalogAdd", "(", "type", ",", "orig", ",", "replace", ")", ":", "ret", "=", "libxml2mod", ".", "xmlCatalogAdd", "(", "type", ",", "orig", ",", "replace", ")", "return", "ret" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
loadACatalog
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.
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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) ...
[ "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", ...
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L975-L982
[ "def", "loadACatalog", "(", "filename", ")", ":", "ret", "=", "libxml2mod", ".", "xmlLoadACatalog", "(", "filename", ")", "if", "ret", "is", "None", ":", "raise", "treeError", "(", "'xmlLoadACatalog() failed'", ")", "return", "catalog", "(", "_obj", "=", "re...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
loadSGMLSuperCatalog
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.
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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...
[ "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...
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L999-L1006
[ "def", "loadSGMLSuperCatalog", "(", "filename", ")", ":", "ret", "=", "libxml2mod", ".", "xmlLoadSGMLSuperCatalog", "(", "filename", ")", "if", "ret", "is", "None", ":", "raise", "treeError", "(", "'xmlLoadSGMLSuperCatalog() failed'", ")", "return", "catalog", "("...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
newCatalog
create a new Catalog.
deps/src/libxml2-2.9.1/python/libxml2.py
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): """create a new Catalog. """ ret = libxml2mod.xmlNewCatalog(sgml) if ret is None:raise treeError('xmlNewCatalog() failed') return catalog(_obj=ret)
[ "create", "a", "new", "Catalog", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1008-L1012
[ "def", "newCatalog", "(", "sgml", ")", ":", "ret", "=", "libxml2mod", ".", "xmlNewCatalog", "(", "sgml", ")", "if", "ret", "is", "None", ":", "raise", "treeError", "(", "'xmlNewCatalog() failed'", ")", "return", "catalog", "(", "_obj", "=", "ret", ")" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
parseCatalogFile
parse an XML file and build a tree. It's like xmlParseFile() except it bypass all catalog lookups.
deps/src/libxml2-2.9.1/python/libxml2.py
def parseCatalogFile(filename): """parse an XML file and build a tree. It's like xmlParseFile() except it bypass all catalog lookups. """ ret = libxml2mod.xmlParseCatalogFile(filename) if ret is None:raise parserError('xmlParseCatalogFile() failed') return xmlDoc(_obj=ret)
def parseCatalogFile(filename): """parse an XML file and build a tree. It's like xmlParseFile() except it bypass all catalog lookups. """ ret = libxml2mod.xmlParseCatalogFile(filename) if ret is None:raise parserError('xmlParseCatalogFile() failed') return xmlDoc(_obj=ret)
[ "parse", "an", "XML", "file", "and", "build", "a", "tree", ".", "It", "s", "like", "xmlParseFile", "()", "except", "it", "bypass", "all", "catalog", "lookups", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1014-L1019
[ "def", "parseCatalogFile", "(", "filename", ")", ":", "ret", "=", "libxml2mod", ".", "xmlParseCatalogFile", "(", "filename", ")", "if", "ret", "is", "None", ":", "raise", "parserError", "(", "'xmlParseCatalogFile() failed'", ")", "return", "xmlDoc", "(", "_obj",...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
debugDumpString
Dumps informations about the string, shorten it if necessary
deps/src/libxml2-2.9.1/python/libxml2.py
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): """Dumps informations about the string, shorten it if necessary """ if output is not None: output.flush() libxml2mod.xmlDebugDumpString(output, str)
[ "Dumps", "informations", "about", "the", "string", "shorten", "it", "if", "necessary" ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1080-L1083
[ "def", "debugDumpString", "(", "output", ",", "str", ")", ":", "if", "output", "is", "not", "None", ":", "output", ".", "flush", "(", ")", "libxml2mod", ".", "xmlDebugDumpString", "(", "output", ",", "str", ")" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
predefinedEntity
Check whether this name is an predefined entity.
deps/src/libxml2-2.9.1/python/libxml2.py
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): """Check whether this name is an predefined entity. """ ret = libxml2mod.xmlGetPredefinedEntity(name) if ret is None:raise treeError('xmlGetPredefinedEntity() failed') return xmlEntity(_obj=ret)
[ "Check", "whether", "this", "name", "is", "an", "predefined", "entity", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1152-L1156
[ "def", "predefinedEntity", "(", "name", ")", ":", "ret", "=", "libxml2mod", ".", "xmlGetPredefinedEntity", "(", "name", ")", "if", "ret", "is", "None", ":", "raise", "treeError", "(", "'xmlGetPredefinedEntity() failed'", ")", "return", "xmlEntity", "(", "_obj", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
nanoFTPProxy
Setup the FTP proxy informations. This can also be done by using ftp_proxy ftp_proxy_user and ftp_proxy_password environment variables.
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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)
[ "Setup", "the", "FTP", "proxy", "informations", ".", "This", "can", "also", "be", "done", "by", "using", "ftp_proxy", "ftp_proxy_user", "and", "ftp_proxy_password", "environment", "variables", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1232-L1236
[ "def", "nanoFTPProxy", "(", "host", ",", "port", ",", "user", ",", "passwd", ",", "type", ")", ":", "libxml2mod", ".", "xmlNanoFTPProxy", "(", "host", ",", "port", ",", "user", ",", "passwd", ",", "type", ")" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
createDocParserCtxt
Creates a parser context for an XML in-memory document.
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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)
[ "Creates", "a", "parser", "context", "for", "an", "XML", "in", "-", "memory", "document", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1269-L1273
[ "def", "createDocParserCtxt", "(", "cur", ")", ":", "ret", "=", "libxml2mod", ".", "xmlCreateDocParserCtxt", "(", "cur", ")", "if", "ret", "is", "None", ":", "raise", "parserError", "(", "'xmlCreateDocParserCtxt() failed'", ")", "return", "parserCtxt", "(", "_ob...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
parseDTD
Load and parse an external subset.
deps/src/libxml2-2.9.1/python/libxml2.py
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): """Load and parse an external subset. """ ret = libxml2mod.xmlParseDTD(ExternalID, SystemID) if ret is None:raise parserError('xmlParseDTD() failed') return xmlDtd(_obj=ret)
[ "Load", "and", "parse", "an", "external", "subset", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1316-L1320
[ "def", "parseDTD", "(", "ExternalID", ",", "SystemID", ")", ":", "ret", "=", "libxml2mod", ".", "xmlParseDTD", "(", "ExternalID", ",", "SystemID", ")", "if", "ret", "is", "None", ":", "raise", "parserError", "(", "'xmlParseDTD() failed'", ")", "return", "xml...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
parseDoc
parse an XML in-memory document and build a tree.
deps/src/libxml2-2.9.1/python/libxml2.py
def parseDoc(cur): """parse an XML in-memory document and build a tree. """ ret = libxml2mod.xmlParseDoc(cur) if ret is None:raise parserError('xmlParseDoc() failed') return xmlDoc(_obj=ret)
def parseDoc(cur): """parse an XML in-memory document and build a tree. """ ret = libxml2mod.xmlParseDoc(cur) if ret is None:raise parserError('xmlParseDoc() failed') return xmlDoc(_obj=ret)
[ "parse", "an", "XML", "in", "-", "memory", "document", "and", "build", "a", "tree", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1322-L1326
[ "def", "parseDoc", "(", "cur", ")", ":", "ret", "=", "libxml2mod", ".", "xmlParseDoc", "(", "cur", ")", "if", "ret", "is", "None", ":", "raise", "parserError", "(", "'xmlParseDoc() failed'", ")", "return", "xmlDoc", "(", "_obj", "=", "ret", ")" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
parseEntity
parse an XML external entity out of context and build a tree. [78] extParsedEnt ::= TextDecl? content This correspond to a "Well Balanced" chunk
deps/src/libxml2-2.9.1/python/libxml2.py
def parseEntity(filename): """parse an XML external entity out of context and build a tree. [78] extParsedEnt ::= TextDecl? content This correspond to a "Well Balanced" chunk """ ret = libxml2mod.xmlParseEntity(filename) if ret is None:raise parserError('xmlParseEntity() failed') return x...
def parseEntity(filename): """parse an XML external entity out of context and build a tree. [78] extParsedEnt ::= TextDecl? content This correspond to a "Well Balanced" chunk """ ret = libxml2mod.xmlParseEntity(filename) if ret is None:raise parserError('xmlParseEntity() failed') return x...
[ "parse", "an", "XML", "external", "entity", "out", "of", "context", "and", "build", "a", "tree", ".", "[", "78", "]", "extParsedEnt", "::", "=", "TextDecl?", "content", "This", "correspond", "to", "a", "Well", "Balanced", "chunk" ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1328-L1334
[ "def", "parseEntity", "(", "filename", ")", ":", "ret", "=", "libxml2mod", ".", "xmlParseEntity", "(", "filename", ")", "if", "ret", "is", "None", ":", "raise", "parserError", "(", "'xmlParseEntity() failed'", ")", "return", "xmlDoc", "(", "_obj", "=", "ret"...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
parseFile
parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.
deps/src/libxml2-2.9.1/python/libxml2.py
def parseFile(filename): """parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. """ ret = libxml2mod.xmlParseFile(filename) if ret is None:raise parserError('xmlParseFile() failed') return xmlDoc(_obj=r...
def parseFile(filename): """parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. """ ret = libxml2mod.xmlParseFile(filename) if ret is None:raise parserError('xmlParseFile() failed') return xmlDoc(_obj=r...
[ "parse", "an", "XML", "file", "and", "build", "a", "tree", ".", "Automatic", "support", "for", "ZLIB", "/", "Compress", "compressed", "document", "is", "provided", "by", "default", "if", "found", "at", "compile", "-", "time", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1336-L1342
[ "def", "parseFile", "(", "filename", ")", ":", "ret", "=", "libxml2mod", ".", "xmlParseFile", "(", "filename", ")", "if", "ret", "is", "None", ":", "raise", "parserError", "(", "'xmlParseFile() failed'", ")", "return", "xmlDoc", "(", "_obj", "=", "ret", ")...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
parseMemory
parse an XML in-memory block and build a tree.
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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)
[ "parse", "an", "XML", "in", "-", "memory", "block", "and", "build", "a", "tree", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1344-L1348
[ "def", "parseMemory", "(", "buffer", ",", "size", ")", ":", "ret", "=", "libxml2mod", ".", "xmlParseMemory", "(", "buffer", ",", "size", ")", "if", "ret", "is", "None", ":", "raise", "parserError", "(", "'xmlParseMemory() failed'", ")", "return", "xmlDoc", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
readDoc
parse an XML in-memory document and build a tree.
deps/src/libxml2-2.9.1/python/libxml2.py
def readDoc(cur, URL, encoding, options): """parse an XML in-memory document and build a tree. """ ret = libxml2mod.xmlReadDoc(cur, URL, encoding, options) if ret is None:raise treeError('xmlReadDoc() failed') return xmlDoc(_obj=ret)
def readDoc(cur, URL, encoding, options): """parse an XML in-memory document and build a tree. """ ret = libxml2mod.xmlReadDoc(cur, URL, encoding, options) if ret is None:raise treeError('xmlReadDoc() failed') return xmlDoc(_obj=ret)
[ "parse", "an", "XML", "in", "-", "memory", "document", "and", "build", "a", "tree", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1356-L1360
[ "def", "readDoc", "(", "cur", ",", "URL", ",", "encoding", ",", "options", ")", ":", "ret", "=", "libxml2mod", ".", "xmlReadDoc", "(", "cur", ",", "URL", ",", "encoding", ",", "options", ")", "if", "ret", "is", "None", ":", "raise", "treeError", "(",...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
readFd
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.
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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') ...
[ "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", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1362-L1368
[ "def", "readFd", "(", "fd", ",", "URL", ",", "encoding", ",", "options", ")", ":", "ret", "=", "libxml2mod", ".", "xmlReadFd", "(", "fd", ",", "URL", ",", "encoding", ",", "options", ")", "if", "ret", "is", "None", ":", "raise", "treeError", "(", "...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
readFile
parse an XML file from the filesystem or the network.
deps/src/libxml2-2.9.1/python/libxml2.py
def readFile(filename, encoding, options): """parse an XML file from the filesystem or the network. """ ret = libxml2mod.xmlReadFile(filename, encoding, options) if ret is None:raise treeError('xmlReadFile() failed') return xmlDoc(_obj=ret)
def readFile(filename, encoding, options): """parse an XML file from the filesystem or the network. """ ret = libxml2mod.xmlReadFile(filename, encoding, options) if ret is None:raise treeError('xmlReadFile() failed') return xmlDoc(_obj=ret)
[ "parse", "an", "XML", "file", "from", "the", "filesystem", "or", "the", "network", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1370-L1374
[ "def", "readFile", "(", "filename", ",", "encoding", ",", "options", ")", ":", "ret", "=", "libxml2mod", ".", "xmlReadFile", "(", "filename", ",", "encoding", ",", "options", ")", "if", "ret", "is", "None", ":", "raise", "treeError", "(", "'xmlReadFile() f...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
readMemory
parse an XML in-memory document and build a tree.
deps/src/libxml2-2.9.1/python/libxml2.py
def readMemory(buffer, size, URL, encoding, options): """parse an XML in-memory document and build a tree. """ ret = libxml2mod.xmlReadMemory(buffer, size, URL, encoding, options) if ret is None:raise treeError('xmlReadMemory() failed') return xmlDoc(_obj=ret)
def readMemory(buffer, size, URL, encoding, options): """parse an XML in-memory document and build a tree. """ ret = libxml2mod.xmlReadMemory(buffer, size, URL, encoding, options) if ret is None:raise treeError('xmlReadMemory() failed') return xmlDoc(_obj=ret)
[ "parse", "an", "XML", "in", "-", "memory", "document", "and", "build", "a", "tree", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1376-L1380
[ "def", "readMemory", "(", "buffer", ",", "size", ",", "URL", ",", "encoding", ",", "options", ")", ":", "ret", "=", "libxml2mod", ".", "xmlReadMemory", "(", "buffer", ",", "size", ",", "URL", ",", "encoding", ",", "options", ")", "if", "ret", "is", "...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
recoverDoc
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
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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)
[ "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" ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1382-L1388
[ "def", "recoverDoc", "(", "cur", ")", ":", "ret", "=", "libxml2mod", ".", "xmlRecoverDoc", "(", "cur", ")", "if", "ret", "is", "None", ":", "raise", "treeError", "(", "'xmlRecoverDoc() failed'", ")", "return", "xmlDoc", "(", "_obj", "=", "ret", ")" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
recoverFile
parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. In the case the document is not Well Formed, it attempts to build a tree anyway
deps/src/libxml2-2.9.1/python/libxml2.py
def recoverFile(filename): """parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. In the case the document is not Well Formed, it attempts to build a tree anyway """ ret = libxml2mod.xmlRecoverFile(filena...
def recoverFile(filename): """parse an XML file and build a tree. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. In the case the document is not Well Formed, it attempts to build a tree anyway """ ret = libxml2mod.xmlRecoverFile(filena...
[ "parse", "an", "XML", "file", "and", "build", "a", "tree", ".", "Automatic", "support", "for", "ZLIB", "/", "Compress", "compressed", "document", "is", "provided", "by", "default", "if", "found", "at", "compile", "-", "time", ".", "In", "the", "case", "t...
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1390-L1397
[ "def", "recoverFile", "(", "filename", ")", ":", "ret", "=", "libxml2mod", ".", "xmlRecoverFile", "(", "filename", ")", "if", "ret", "is", "None", ":", "raise", "treeError", "(", "'xmlRecoverFile() failed'", ")", "return", "xmlDoc", "(", "_obj", "=", "ret", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
recoverMemory
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
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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...
[ "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" ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1399-L1405
[ "def", "recoverMemory", "(", "buffer", ",", "size", ")", ":", "ret", "=", "libxml2mod", ".", "xmlRecoverMemory", "(", "buffer", ",", "size", ")", "if", "ret", "is", "None", ":", "raise", "treeError", "(", "'xmlRecoverMemory() failed'", ")", "return", "xmlDoc...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
copyChar
append the char value in the array
deps/src/libxml2-2.9.1/python/libxml2.py
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): """append the char value in the array """ ret = libxml2mod.xmlCopyChar(len, out, val) return ret
[ "append", "the", "char", "value", "in", "the", "array" ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1455-L1458
[ "def", "copyChar", "(", "len", ",", "out", ",", "val", ")", ":", "ret", "=", "libxml2mod", ".", "xmlCopyChar", "(", "len", ",", "out", ",", "val", ")", "return", "ret" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
createEntityParserCtxt
Create a parser context for an external entity Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.
deps/src/libxml2-2.9.1/python/libxml2.py
def createEntityParserCtxt(URL, ID, base): """Create a parser context for an external entity Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. """ ret = libxml2mod.xmlCreateEntityParserCtxt(URL, ID, base) if ret is None:raise parserError('x...
def createEntityParserCtxt(URL, ID, base): """Create a parser context for an external entity Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. """ ret = libxml2mod.xmlCreateEntityParserCtxt(URL, ID, base) if ret is None:raise parserError('x...
[ "Create", "a", "parser", "context", "for", "an", "external", "entity", "Automatic", "support", "for", "ZLIB", "/", "Compress", "compressed", "document", "is", "provided", "by", "default", "if", "found", "at", "compile", "-", "time", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1465-L1471
[ "def", "createEntityParserCtxt", "(", "URL", ",", "ID", ",", "base", ")", ":", "ret", "=", "libxml2mod", ".", "xmlCreateEntityParserCtxt", "(", "URL", ",", "ID", ",", "base", ")", "if", "ret", "is", "None", ":", "raise", "parserError", "(", "'xmlCreateEnti...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
createFileParserCtxt
Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.
deps/src/libxml2-2.9.1/python/libxml2.py
def createFileParserCtxt(filename): """Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. """ ret = libxml2mod.xmlCreateFileParserCtxt(filename) if ret is None:raise parserError('xmlCreateFileParse...
def createFileParserCtxt(filename): """Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. """ ret = libxml2mod.xmlCreateFileParserCtxt(filename) if ret is None:raise parserError('xmlCreateFileParse...
[ "Create", "a", "parser", "context", "for", "a", "file", "content", ".", "Automatic", "support", "for", "ZLIB", "/", "Compress", "compressed", "document", "is", "provided", "by", "default", "if", "found", "at", "compile", "-", "time", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1473-L1479
[ "def", "createFileParserCtxt", "(", "filename", ")", ":", "ret", "=", "libxml2mod", ".", "xmlCreateFileParserCtxt", "(", "filename", ")", "if", "ret", "is", "None", ":", "raise", "parserError", "(", "'xmlCreateFileParserCtxt() failed'", ")", "return", "parserCtxt", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
createMemoryParserCtxt
Create a parser context for an XML in-memory document.
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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)
[ "Create", "a", "parser", "context", "for", "an", "XML", "in", "-", "memory", "document", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1481-L1485
[ "def", "createMemoryParserCtxt", "(", "buffer", ",", "size", ")", ":", "ret", "=", "libxml2mod", ".", "xmlCreateMemoryParserCtxt", "(", "buffer", ",", "size", ")", "if", "ret", "is", "None", ":", "raise", "parserError", "(", "'xmlCreateMemoryParserCtxt() failed'",...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
createURLParserCtxt
Create a parser context for a file or URL content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time and for file accesses
deps/src/libxml2-2.9.1/python/libxml2.py
def createURLParserCtxt(filename, options): """Create a parser context for a file or URL content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time and for file accesses """ ret = libxml2mod.xmlCreateURLParserCtxt(filename, options) if...
def createURLParserCtxt(filename, options): """Create a parser context for a file or URL content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time and for file accesses """ ret = libxml2mod.xmlCreateURLParserCtxt(filename, options) if...
[ "Create", "a", "parser", "context", "for", "a", "file", "or", "URL", "content", ".", "Automatic", "support", "for", "ZLIB", "/", "Compress", "compressed", "document", "is", "provided", "by", "default", "if", "found", "at", "compile", "-", "time", "and", "f...
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1487-L1494
[ "def", "createURLParserCtxt", "(", "filename", ",", "options", ")", ":", "ret", "=", "libxml2mod", ".", "xmlCreateURLParserCtxt", "(", "filename", ",", "options", ")", "if", "ret", "is", "None", ":", "raise", "parserError", "(", "'xmlCreateURLParserCtxt() failed'"...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
htmlCreateFileParserCtxt
Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time.
deps/src/libxml2-2.9.1/python/libxml2.py
def htmlCreateFileParserCtxt(filename, encoding): """Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. """ ret = libxml2mod.htmlCreateFileParserCtxt(filename, encoding) if ret is None:raise parser...
def htmlCreateFileParserCtxt(filename, encoding): """Create a parser context for a file content. Automatic support for ZLIB/Compress compressed document is provided by default if found at compile-time. """ ret = libxml2mod.htmlCreateFileParserCtxt(filename, encoding) if ret is None:raise parser...
[ "Create", "a", "parser", "context", "for", "a", "file", "content", ".", "Automatic", "support", "for", "ZLIB", "/", "Compress", "compressed", "document", "is", "provided", "by", "default", "if", "found", "at", "compile", "-", "time", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1496-L1502
[ "def", "htmlCreateFileParserCtxt", "(", "filename", ",", "encoding", ")", ":", "ret", "=", "libxml2mod", ".", "htmlCreateFileParserCtxt", "(", "filename", ",", "encoding", ")", "if", "ret", "is", "None", ":", "raise", "parserError", "(", "'htmlCreateFileParserCtxt...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
namePop
Pops the top element name from the name stack
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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
[ "Pops", "the", "top", "element", "name", "from", "the", "name", "stack" ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1517-L1522
[ "def", "namePop", "(", "ctxt", ")", ":", "if", "ctxt", "is", "None", ":", "ctxt__o", "=", "None", "else", ":", "ctxt__o", "=", "ctxt", ".", "_o", "ret", "=", "libxml2mod", ".", "namePop", "(", "ctxt__o", ")", "return", "ret" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
namePush
Pushes a new element name on top of the name stack
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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
[ "Pushes", "a", "new", "element", "name", "on", "top", "of", "the", "name", "stack" ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1524-L1529
[ "def", "namePush", "(", "ctxt", ",", "value", ")", ":", "if", "ctxt", "is", "None", ":", "ctxt__o", "=", "None", "else", ":", "ctxt__o", "=", "ctxt", ".", "_o", "ret", "=", "libxml2mod", ".", "namePush", "(", "ctxt__o", ",", "value", ")", "return", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
nodePop
Pops the top element node from the node stack
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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)
[ "Pops", "the", "top", "element", "node", "from", "the", "node", "stack" ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1531-L1537
[ "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"...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
nodePush
Pushes a new element node on top of the node stack
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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
[ "Pushes", "a", "new", "element", "node", "on", "top", "of", "the", "node", "stack" ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1539-L1546
[ "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", "="...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
createInputBuffer
Create a libxml2 input buffer from a Python file
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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)
[ "Create", "a", "libxml2", "input", "buffer", "from", "a", "Python", "file" ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1557-L1561
[ "def", "createInputBuffer", "(", "file", ",", "encoding", ")", ":", "ret", "=", "libxml2mod", ".", "xmlCreateInputBuffer", "(", "file", ",", "encoding", ")", "if", "ret", "is", "None", ":", "raise", "treeError", "(", "'xmlCreateInputBuffer() failed'", ")", "re...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
createOutputBuffer
Create a libxml2 output buffer from a Python file
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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)
[ "Create", "a", "libxml2", "output", "buffer", "from", "a", "Python", "file" ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1563-L1567
[ "def", "createOutputBuffer", "(", "file", ",", "encoding", ")", ":", "ret", "=", "libxml2mod", ".", "xmlCreateOutputBuffer", "(", "file", ",", "encoding", ")", "if", "ret", "is", "None", ":", "raise", "treeError", "(", "'xmlCreateOutputBuffer() failed'", ")", ...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
createPushParser
Create a progressive XML parser context to build either an event flow if the SAX object is not None, or a DOM tree otherwise.
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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...
[ "Create", "a", "progressive", "XML", "parser", "context", "to", "build", "either", "an", "event", "flow", "if", "the", "SAX", "object", "is", "not", "None", "or", "a", "DOM", "tree", "otherwise", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1569-L1575
[ "def", "createPushParser", "(", "SAX", ",", "chunk", ",", "size", ",", "URI", ")", ":", "ret", "=", "libxml2mod", ".", "xmlCreatePushParser", "(", "SAX", ",", "chunk", ",", "size", ",", "URI", ")", "if", "ret", "is", "None", ":", "raise", "parserError"...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
htmlCreatePushParser
Create a progressive HTML parser context to build either an event flow if the SAX object is not None, or a DOM tree otherwise.
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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...
[ "Create", "a", "progressive", "HTML", "parser", "context", "to", "build", "either", "an", "event", "flow", "if", "the", "SAX", "object", "is", "not", "None", "or", "a", "DOM", "tree", "otherwise", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1588-L1594
[ "def", "htmlCreatePushParser", "(", "SAX", ",", "chunk", ",", "size", ",", "URI", ")", ":", "ret", "=", "libxml2mod", ".", "htmlCreatePushParser", "(", "SAX", ",", "chunk", ",", "size", ",", "URI", ")", "if", "ret", "is", "None", ":", "raise", "parserE...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
newNode
Create a new Node
deps/src/libxml2-2.9.1/python/libxml2.py
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): """Create a new Node """ ret = libxml2mod.xmlNewNode(name) if ret is None:raise treeError('xmlNewNode() failed') return xmlNode(_obj=ret)
[ "Create", "a", "new", "Node" ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1606-L1610
[ "def", "newNode", "(", "name", ")", ":", "ret", "=", "libxml2mod", ".", "xmlNewNode", "(", "name", ")", "if", "ret", "is", "None", ":", "raise", "treeError", "(", "'xmlNewNode() failed'", ")", "return", "xmlNode", "(", "_obj", "=", "ret", ")" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
relaxNGNewMemParserCtxt
Create an XML RelaxNGs parse context for that memory buffer expected to contain an XML RelaxNGs file.
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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...
[ "Create", "an", "XML", "RelaxNGs", "parse", "context", "for", "that", "memory", "buffer", "expected", "to", "contain", "an", "XML", "RelaxNGs", "file", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1641-L1646
[ "def", "relaxNGNewMemParserCtxt", "(", "buffer", ",", "size", ")", ":", "ret", "=", "libxml2mod", ".", "xmlRelaxNGNewMemParserCtxt", "(", "buffer", ",", "size", ")", "if", "ret", "is", "None", ":", "raise", "parserError", "(", "'xmlRelaxNGNewMemParserCtxt() failed...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
relaxNGNewParserCtxt
Create an XML RelaxNGs parse context for that file/resource expected to contain an XML RelaxNGs file.
deps/src/libxml2-2.9.1/python/libxml2.py
def relaxNGNewParserCtxt(URL): """Create an XML RelaxNGs parse context for that file/resource expected to contain an XML RelaxNGs file. """ ret = libxml2mod.xmlRelaxNGNewParserCtxt(URL) if ret is None:raise parserError('xmlRelaxNGNewParserCtxt() failed') return relaxNgParserCtxt(_obj=ret)
def relaxNGNewParserCtxt(URL): """Create an XML RelaxNGs parse context for that file/resource expected to contain an XML RelaxNGs file. """ ret = libxml2mod.xmlRelaxNGNewParserCtxt(URL) if ret is None:raise parserError('xmlRelaxNGNewParserCtxt() failed') return relaxNgParserCtxt(_obj=ret)
[ "Create", "an", "XML", "RelaxNGs", "parse", "context", "for", "that", "file", "/", "resource", "expected", "to", "contain", "an", "XML", "RelaxNGs", "file", "." ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1648-L1653
[ "def", "relaxNGNewParserCtxt", "(", "URL", ")", ":", "ret", "=", "libxml2mod", ".", "xmlRelaxNGNewParserCtxt", "(", "URL", ")", "if", "ret", "is", "None", ":", "raise", "parserError", "(", "'xmlRelaxNGNewParserCtxt() failed'", ")", "return", "relaxNgParserCtxt", "...
74514c3f99e25b46f22c6e02977fe3da69221c2e
train
buildQName
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.
deps/src/libxml2-2.9.1/python/libxml2.py
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): """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)...
[ "Builds", "the", "QName" ]
apple/turicreate
python
https://github.com/apple/turicreate/blob/74514c3f99e25b46f22c6e02977fe3da69221c2e/deps/src/libxml2-2.9.1/python/libxml2.py#L1659-L1665
[ "def", "buildQName", "(", "ncname", ",", "prefix", ",", "memory", ",", "len", ")", ":", "ret", "=", "libxml2mod", ".", "xmlBuildQName", "(", "ncname", ",", "prefix", ",", "memory", ",", "len", ")", "return", "ret" ]
74514c3f99e25b46f22c6e02977fe3da69221c2e