query
stringlengths
10
2k
document
stringlengths
20
51.2k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Sets the built_in_material of this SolidCompressibleMaterial.
def built_in_material(self, built_in_material): self._built_in_material = built_in_material
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def SetMaterial(self, *args):\n return _XCAFDoc.XCAFDoc_MaterialTool_SetMaterial(self, *args)", "def XCAFDoc_MaterialTool_Set(*args):\n return _XCAFDoc.XCAFDoc_MaterialTool_Set(*args)", "def set_builtin(self, builtin):\n self.options['builtin'] = builtin", "def Set(*args):\n return _XCA...
[ "0.57587504", "0.5411966", "0.5395203", "0.520338", "0.49464485", "0.49215788", "0.4873002", "0.48585403", "0.48187518", "0.47540066", "0.472476", "0.46963128", "0.4633211", "0.46264786", "0.46093786", "0.45784345", "0.45676267", "0.45364437", "0.4525989", "0.4507094", "0.449...
0.868811
0
Returns true if both objects are equal
def __eq__(self, other): if not isinstance(other, SolidCompressibleMaterial): return False return self.to_dict() == other.to_dict()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False", "def __eq__(self, other):\n if i...
[ "0.8088132", "0.8088132", "0.8054589", "0.7982687", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", "0.79670393", ...
0.0
-1
Returns true if both objects are not equal
def __ne__(self, other): if not isinstance(other, SolidCompressibleMaterial): return True return self.to_dict() != other.to_dict()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True", "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other) -> bool:\n return not self.__eq__(other)", "def __eq__(self, other):\n ...
[ "0.845611", "0.8391477", "0.8144138", "0.81410587", "0.8132492", "0.8093973", "0.80920255", "0.80920255", "0.80920255", "0.8085325", "0.8085325", "0.8076365", "0.8076365", "0.8065748", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", "0.8042487", ...
0.0
-1
Convert French month string to month number
def _french_month(month): mois = "janvfévrmarsavr-mai-juinjuilaoûtseptoct-nov-déc-" mois_loc = re.search(month.lower(), mois.lower()) if mois_loc: mois_no = (mois_loc.start() + 4) / 4 return "0{}".format(mois_no)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert_month(string): \n datetime_object = datetime.datetime.strptime(string, \"%B\")\n\n month_number = datetime_object.month\n\n return month_number", "def get_month(string): \n return int(string[15:17])", "def convert_month(match):\n day, month, year = tuple(match.group().split())\...
[ "0.77312475", "0.7318786", "0.6853059", "0.68296826", "0.6756675", "0.65487796", "0.649647", "0.6458225", "0.6411457", "0.63929135", "0.63658", "0.6313183", "0.626573", "0.6254738", "0.6229748", "0.62218606", "0.619408", "0.6188771", "0.615514", "0.6108722", "0.6102363", "0...
0.8581391
0
Map list of colorings to palette RGB colors
def map_colorings(palette, colorings): mapped_colorings = [] for coloring in colorings: mapped_colorings.append(map_coloring(palette, coloring)) return mapped_colorings
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def map_coloring(palette, coloring):\n mapped_coloring = []\n for color in coloring:\n mapped_coloring.append(palette[color%len(palette)])\n return mapped_coloring", "def assigning_colors():\n rgb_colors = {}\n for name, hex in matplotlib.colors.cnames.items():\n color = []\n ...
[ "0.7596271", "0.75921935", "0.7532873", "0.7364121", "0.71395063", "0.71362543", "0.70034564", "0.69784653", "0.695025", "0.6821048", "0.6819641", "0.6804819", "0.6797782", "0.6774424", "0.67717034", "0.67503273", "0.6745318", "0.6733766", "0.67218775", "0.67147607", "0.67137...
0.76621413
0
Map coloring to palette RGB colors
def map_coloring(palette, coloring): mapped_coloring = [] for color in coloring: mapped_coloring.append(palette[color%len(palette)]) return mapped_coloring
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cmap_to_pil_palette(cmap):\n # return (255.*np.array(\n # map(lambda x: cmap(x)[0:3], np.linspace(0., 1.,256)))\n # .ravel()).astype('int')\n return (255. * np.array(\n [cmap(x)[:3] for x in np.linspace(0,1,256)]).ravel().astype('int'))", "def assigning_colors():\n rgb_color...
[ "0.72013336", "0.7133012", "0.71307456", "0.6968792", "0.6954284", "0.6954284", "0.6954284", "0.6954284", "0.6933416", "0.6929779", "0.6850055", "0.6827679", "0.6823488", "0.6742514", "0.67194724", "0.6713468", "0.6703489", "0.66758156", "0.66448396", "0.663965", "0.6631956",...
0.72201467
0
Choose m elements from n elements
def choose(n, m): assert n >= m, "Cannot choose {0} elements from {1}".format(m, n) result = 1 for n_i, m_i in zip(range(n, m, -1), range(1, m+1)): result *= n_i result /= m_i return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pick_chosen_points(m, n):\r\n return [i * n // m + n // (2 * m) for i in range(m)]", "def slice(n, m):\n chunks = []\n for piece in islice(n, m):\n chunks.append(piece)\n return chunks", "def select(individuals, n):\r\n # return selBest(individuals, n)\r\n return individuals[:n]", ...
[ "0.7494856", "0.7139842", "0.70403945", "0.6865885", "0.68473375", "0.6767502", "0.67674476", "0.6696457", "0.6691403", "0.66241354", "0.651283", "0.643008", "0.63425565", "0.61162794", "0.6092371", "0.59768516", "0.5939783", "0.59225035", "0.59218305", "0.5900335", "0.589956...
0.7034338
3
Check that model weights are correctly reset after scaling batch size.
def test_model_reset_correctly(tmpdir): tutils.reset_seed() model = EvalModelTemplate() # logger file to get meta trainer = Trainer( default_root_dir=tmpdir, max_epochs=1, ) before_state_dict = deepcopy(model.state_dict()) trainer.tuner.scale_batch_size(model, max_trials=...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_if_layer_weights_are_updating(model, batch_idx):\n # Creating an alias for easier reference\n f = check_if_layer_weights_are_updating\n\n # get the initial values of some layers\n conv1_w_value = model.conv1._module_to_wrap.weight\n\n if batch_idx != 0:\n assert not np.allclose(conv...
[ "0.6612874", "0.60912544", "0.60814744", "0.60643995", "0.60411406", "0.60411406", "0.6029534", "0.6002305", "0.59729177", "0.5958375", "0.589969", "0.5893286", "0.5891956", "0.5890338", "0.587805", "0.5869061", "0.5862104", "0.5819306", "0.57661283", "0.5764744", "0.57642144...
0.7630574
0
Returns the attribute attribute from self.metadata
def get_metadata(self, attribute): return self.metadata.get(attribute, None)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getCustomAttribute(self):\n\t\treturn self.Attribute", "def GetAttribute(self, attr):\n return self._attrs[attr]", "def get_attribute(self, key):\n return self.attributes[key]", "def _get_attr(self, attr, root=None):\n with self._h5file('r') as h5file:\n if root is None:\n...
[ "0.7698988", "0.75706184", "0.7489808", "0.7486213", "0.74652475", "0.7447476", "0.73192173", "0.7289231", "0.7238039", "0.7235435", "0.72260016", "0.70961744", "0.7089558", "0.70409554", "0.7020166", "0.69633734", "0.69633734", "0.69633734", "0.6960901", "0.6950058", "0.6948...
0.7687847
1
called when potentially ignorable white spaces have been found
def ignorableWhitespace(self, data): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ignore_whitespaces(self):\n\n whitespaces = [' ', '\\t', '\\n', '\\r']\n while self.index < self.length and self.xtext[self.index] in whitespaces:\n self.index += 1", "def skipWhiteSpace(self):\n pass", "def skip_whitespace(self):\n while self....
[ "0.7722481", "0.7388306", "0.7317434", "0.72187626", "0.69264704", "0.68165123", "0.6749289", "0.65514636", "0.65417564", "0.6534789", "0.65259004", "0.6425805", "0.6417111", "0.6389931", "0.63572717", "0.62899035", "0.62627196", "0.61865145", "0.616928", "0.61682016", "0.614...
0.7569415
1
This function is DEPRECATED. Use xmlIsChar_ch or xmlIsCharQ instead
def isChar(ch): ret = libxml2mod.xmlIsChar(ch) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isBaseChar(ch):\n ret = libxml2mod.xmlIsBaseChar(ch)\n return ret", "def checkUTF8(utf):\n ret = libxml2mod.xmlCheckUTF8(utf)\n return ret", "def isPubidChar(ch):\n ret = libxml2mod.xmlIsPubidChar(ch)\n return ret", "def _filter_xml_chars(u):\n def filter_xml_char(c):\n if ord...
[ "0.6725618", "0.64901584", "0.6441081", "0.6356659", "0.6143915", "0.60902697", "0.6029015", "0.59723574", "0.5833566", "0.5728962", "0.56791", "0.566596", "0.56356716", "0.55601776", "0.55440605", "0.5528061", "0.5522496", "0.54902", "0.5487975", "0.54566807", "0.5436685", ...
0.78450227
0
Check whether the character is allowed by the production
def isLetter(c): ret = libxml2mod.xmlIsLetter(c) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_allowed_char(ch):\n\treturn ch.isalnum() or ch in \"#.>+*:$-_!@\"", "def checkChar(self, char):\n return char not in self.guessedChars", "def __valid_char(self, char: str) -> bool:\r\n if char.isdigit():\r\n raise ValueError('Characters can\\'t be numbers')\r\n\r\n return...
[ "0.7252002", "0.68900114", "0.68873036", "0.68641794", "0.6783739", "0.6729494", "0.6701006", "0.66576254", "0.6622803", "0.6611747", "0.65644807", "0.65293676", "0.6515883", "0.64711505", "0.64628905", "0.6453177", "0.6418206", "0.64152646", "0.6413183", "0.6373065", "0.6366...
0.0
-1
Create a progressive HTML parser context to build either an event flow if the SAX object is not None, or a DOM tree otherwise.
def htmlCreatePushParser(SAX, chunk, size, URI): ret = libxml2mod.htmlCreatePushParser(SAX, chunk, size, URI) if ret is None:raise parserError('htmlCreatePushParser() failed') return parserCtxt(_obj=ret)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def htmlNewParserCtxt():\n ret = libxml2mod.htmlNewParserCtxt()\n if ret is None:raise parserError('htmlNewParserCtxt() failed')\n return parserCtxt(_obj=ret)", "def htmlDefaultSAXHandlerInit():\n libxml2mod.htmlDefaultSAXHandlerInit()", "def xpathNewParserContext(self, str):\n ret = libxml2...
[ "0.5580728", "0.52244985", "0.5219326", "0.4971787", "0.49331936", "0.4897002", "0.4876947", "0.48768243", "0.4840878", "0.48387754", "0.48234627", "0.48183054", "0.48007166", "0.47663307", "0.47604406", "0.47394907", "0.47191575", "0.4683373", "0.46808636", "0.46579728", "0....
0.5510737
1
get the default compression mode used, ZLIB based.
def compressMode(): ret = libxml2mod.xmlGetCompressMode() return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def identify_compression_format(self, uri):\n logger.debug(\"UriParser.get_compression: %s\" % uri)\n compression_format = None\n if self._has_tar_extension(uri):\n compression_format = 'tar'\n if self._has_zip_extension(uri):\n compression_format = 'zip'\n ...
[ "0.67118573", "0.65765655", "0.64555365", "0.62255585", "0.617949", "0.5975738", "0.58742684", "0.5685615", "0.56682426", "0.56184006", "0.5603057", "0.55788654", "0.5561151", "0.5521909", "0.55162984", "0.5446851", "0.5438274", "0.542934", "0.54196274", "0.5408364", "0.54015...
0.7039618
0
Unescaping routine, but does not check that the string is an URI. The output is a direct unsigned char translation of %XX values (no encoding) Note that the length of the result can only be smaller or same size as the input string.
def URIUnescapeString(str, len, target): ret = libxml2mod.xmlURIUnescapeString(str, len, target) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unquote(s):\n res = s.split('%')\n # fastpath\n if len(res) == 1:\n return s\n s = res[0]\n for item in res[1:]:\n try:\n s += _hextochr[item[:2]] + item[2:]\n except KeyError:\n s += '%' + item\n except UnicodeDecodeError:\n s += unic...
[ "0.7086737", "0.67993665", "0.67149264", "0.6667785", "0.6647624", "0.6623473", "0.6579626", "0.65545785", "0.6473317", "0.64601105", "0.6435534", "0.6424301", "0.6409981", "0.6319381", "0.6313064", "0.63032216", "0.6286844", "0.6235557", "0.6227575", "0.62082344", "0.6169079...
0.7117446
0
Constructs an URI expressing the existing path
def pathToURI(path): ret = libxml2mod.xmlPathToURI(path) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def construct_url(self,*path):\n base = self.request.protocol+\"://\"+self.request.host+\"/\"\n return base+\"/\".join(path)", "def _make_url(self, path):\n if not self.base_location:\n raise ValueError(\"No base_location set. Cannot construct url.\")\n\n if path:\n ...
[ "0.7760281", "0.74670595", "0.73406106", "0.73133355", "0.7102454", "0.6990934", "0.6905022", "0.68408686", "0.6825221", "0.676529", "0.6685873", "0.6485737", "0.64586323", "0.6440919", "0.64137435", "0.6382459", "0.6380145", "0.6372646", "0.63670737", "0.63372594", "0.631922...
0.0
-1
Get the last global error registered. This is per thread if compiled with thread support.
def lastError(): ret = libxml2mod.xmlGetLastError() if ret is None:raise treeError('xmlGetLastError() failed') return Error(_obj=ret)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_last_error(self) -> Union[None, str, Exception]:\n return self._last_error", "def get_raise_on_error():\n global raise_on_error\n return raise_on_error", "def check_errors(self) -> None:\n # TODO check the manual for error codes & interpert them.\n return self.send(self.cmd.G...
[ "0.6466926", "0.64120245", "0.6274629", "0.62491804", "0.62048197", "0.61550677", "0.60835016", "0.6041156", "0.59797066", "0.59572244", "0.5884652", "0.58156806", "0.5775394", "0.5773872", "0.5770362", "0.5766424", "0.5694209", "0.55749077", "0.5537371", "0.55003476", "0.550...
0.60574347
7
Create an xmlTextReader structure fed with the resource at
def newTextReaderFilename(URI): ret = libxml2mod.xmlNewTextReaderFilename(URI) if ret is None:raise treeError('xmlNewTextReaderFilename() failed') return xmlTextReader(_obj=ret)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def newTextReader(self, URI):\n ret = libxml2mod.xmlNewTextReader(self._o, URI)\n if ret is None:raise treeError('xmlNewTextReader() failed')\n __tmp = xmlTextReader(_obj=ret)\n __tmp.input = self\n return __tmp", "def from_xml(cls, xml_data, system, id_generator):\r\n\r\n ...
[ "0.599172", "0.5848686", "0.5762597", "0.5688935", "0.5594342", "0.5510486", "0.5497622", "0.54910576", "0.5465926", "0.5398475", "0.53583485", "0.53567195", "0.5350529", "0.53442305", "0.5291393", "0.52586955", "0.52466536", "0.52362645", "0.5173407", "0.51640904", "0.515111...
0.5487368
8
Replaces 0xd, 0x9 and 0xa with a space.
def schemaWhiteSpaceReplace(value): ret = libxml2mod.xmlSchemaWhiteSpaceReplace(value) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def replace_non_break_space(str):\n non_break_space = u'\\xa0'\n str = str.replace(non_break_space, \" \")\n return str", "def space_hex_string(hex_string):\n new_string = hex_string[0] + hex_string[1]\n for i in range(2, len(hex_string) - 1, 2):\n new_string = new_string + ' ' + hex_string...
[ "0.67686284", "0.6336741", "0.61528826", "0.614171", "0.6113304", "0.6041112", "0.60222983", "0.5982461", "0.59503126", "0.5928348", "0.59213674", "0.59191465", "0.5866775", "0.5829342", "0.5802349", "0.57977957", "0.5797599", "0.5786544", "0.57697207", "0.56884027", "0.56818...
0.0
-1
compares the two UCS4 values
def UTF8Charcmp(utf1, utf2): ret = libxml2mod.xmlUTF8Charcmp(utf1, utf2) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def case_mismatch(c1, c2):\n return abs(ord(c1)-ord(c2)) == 32", "def cz_compare(a, b):\n ma = __unicode_to_ascii(unicode(a))\n mb = __unicode_to_ascii(unicode(b))\n return cmp(ma, mb)", "def char_compare(char1, char2):\r\n if char1 is char2:\r\n return \"0\" # Matches are '0'\r\n ret...
[ "0.6699792", "0.66762197", "0.64139557", "0.61354375", "0.60899913", "0.60749286", "0.6034908", "0.5917306", "0.58385956", "0.5746488", "0.573079", "0.57267785", "0.57199466", "0.5713211", "0.5704477", "0.56998503", "0.56981194", "0.5697687", "0.56384003", "0.56189615", "0.55...
0.6219653
3
a function to provide the equivalent of fetching a character from a string array
def UTF8Strpos(utf, pos): ret = libxml2mod.xmlUTF8Strpos(utf, pos) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _char_to_array_index(self, ch):\n return ord(ch) - ord('a')", "def getchar(words,pos):\n\n\tif pos<0 or pos>=len(words): return None\n\n\treturn words[pos]", "def character(m) -> str:\n return m[0]", "def lookup(c):\r\n if c not in chars:\r\n return ValueError\r\n p = chars.index(c)\r\...
[ "0.6806628", "0.6536529", "0.65011644", "0.64920455", "0.6266894", "0.61941254", "0.6132833", "0.60884976", "0.6077027", "0.60740536", "0.6070055", "0.60424185", "0.6034162", "0.5934114", "0.5908122", "0.58560026", "0.5853726", "0.58154845", "0.58107185", "0.58103335", "0.580...
0.0
-1
Check whether the character is part of AegeanNumbers UCS Block
def uCSIsAegeanNumbers(code): ret = libxml2mod.xmlUCSIsAegeanNumbers(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isValid(self) :\n try :\n pos = 0\n while self.firstblock[pos] == chr(0) :\n pos += 1\n except IndexError : \n return False\n else : \n firstblock = self.firstblock[pos:]\n if firstblock.startswith(\"\\033E\\03...
[ "0.66408443", "0.6549573", "0.64411193", "0.64199454", "0.6409486", "0.63818234", "0.636808", "0.6329359", "0.6297487", "0.6295482", "0.6278988", "0.6264876", "0.62280464", "0.6141169", "0.61290556", "0.6122901", "0.6119209", "0.6098052", "0.6069379", "0.6049674", "0.60486555...
0.0
-1
Check whether the character is part of Cs UCS Category
def uCSIsCatCs(code): ret = libxml2mod.xmlUCSIsCatCs(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _is_chinese_char(cp):\n # This defines a \"chinese character\" as anything in the CJK Unicode block:\n # https://en.wikipedia.org/wiki/CJK_Unified_Ideographs_(Unicode_block)\n #\n # Note that the CJK Unicode block is NOT all Japanese and Korean characters,\n # despite its name. The modern Kore...
[ "0.7120394", "0.70932084", "0.70512354", "0.7028114", "0.70140517", "0.67472684", "0.6453193", "0.6403625", "0.63685673", "0.636453", "0.63432723", "0.63299656", "0.6305439", "0.6305439", "0.61195374", "0.61061364", "0.6066101", "0.6041552", "0.60340095", "0.6026278", "0.5997...
0.54495776
75
Check whether the character is part of Mn UCS Category
def uCSIsCatMn(code): ret = libxml2mod.xmlUCSIsCatMn(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _is_chinese_char(self, cp):\n if cp >= 19968 and cp <= 40959 or cp >= 13312 and cp <= 19903 or cp >= 131072 and cp <= 173791 or cp >= 173824 and cp <= 177983 or cp >= 177984 and cp <= 178207 or cp >= 178208 and cp <= 183983 or cp >= 63744 and cp <= 64255 or cp >= 194560 and cp <= 195103:\n re...
[ "0.6885657", "0.6828464", "0.67706877", "0.6758313", "0.67339784", "0.6654428", "0.6425656", "0.596364", "0.594716", "0.594167", "0.593869", "0.5927419", "0.5897338", "0.58950764", "0.58478963", "0.5840693", "0.58279794", "0.58279794", "0.5775948", "0.56935036", "0.5689013", ...
0.60384196
7
Check whether the character is part of S UCS Category
def uCSIsCatS(code): ret = libxml2mod.xmlUCSIsCatS(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _is_chinese_char(self, cp):\n # This defines a \"chinese character\" as anything in the CJK Unicode block:\n # https://en.wikipedia.org/wiki/CJK_Unified_Ideographs_(Unicode_block)\n #\n # Note that the CJK Unicode block is NOT all Japanese and Korean characters,\n # despite...
[ "0.6688409", "0.668411", "0.6662303", "0.6622611", "0.6611198", "0.65336794", "0.6495247", "0.61984015", "0.6139208", "0.60758066", "0.60719836", "0.6022493", "0.60101", "0.6004175", "0.5984135", "0.5977859", "0.59500027", "0.5949812", "0.59312725", "0.5931115", "0.5918904", ...
0.0
-1
Check whether the character is part of Z UCS Category
def uCSIsCatZ(code): ret = libxml2mod.xmlUCSIsCatZ(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _is_chinese_char(cp):\n # This defines a \"chinese character\" as anything in the CJK Unicode block:\n # https://en.wikipedia.org/wiki/CJK_Unified_Ideographs_(Unicode_block)\n #\n # Note that the CJK Unicode block is NOT all Japanese and Korean characters,\n # despite its name. The modern Kore...
[ "0.6881153", "0.68295944", "0.68155175", "0.6811644", "0.67710483", "0.6659007", "0.66327614", "0.6449877", "0.64406884", "0.64335674", "0.6426675", "0.6404547", "0.6355245", "0.63239163", "0.6315347", "0.6315347", "0.6314501", "0.62698114", "0.6189976", "0.61371017", "0.6087...
0.0
-1
Check whether the character is part of Zs UCS Category
def uCSIsCatZs(code): ret = libxml2mod.xmlUCSIsCatZs(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _is_chinese_char(cp):\n # This defines a \"chinese character\" as anything in the CJK Unicode block:\n # https://en.wikipedia.org/wiki/CJK_Unified_Ideographs_(Unicode_block)\n #\n # Note that the CJK Unicode block is NOT all Japanese and Korean characters,\n # despite its name. The modern Kore...
[ "0.68625087", "0.68170416", "0.6805463", "0.67996037", "0.6750738", "0.65890515", "0.6457409", "0.64517945", "0.6392122", "0.63342154", "0.63160294", "0.6299228", "0.62393886", "0.6238268", "0.622698", "0.6226922", "0.6220175", "0.6195797", "0.61642206", "0.61642206", "0.6106...
0.0
-1
Check whether the character is part of CombiningDiacriticalMarksforSymbols UCS Block
def uCSIsCombiningDiacriticalMarksforSymbols(code): ret = libxml2mod.xmlUCSIsCombiningDiacriticalMarksforSymbols(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_connective(char):\n return char in [u\"¬\", u\"∧\", u\"∨\", u\"→\", u\"↔\"]", "def checkChar(self, char):\n return char not in self.guessedChars", "def isUnicodeEmoji(c : str) -> bool:\n return c in UNICODE_EMOJI", "def __contains_nonascii_characters(string):\n for c in string:\n ...
[ "0.67542905", "0.6488043", "0.63056177", "0.62720853", "0.62386703", "0.6195144", "0.61637557", "0.61625886", "0.6158391", "0.61349285", "0.6021518", "0.6016175", "0.59976923", "0.599169", "0.59724486", "0.5970104", "0.5963076", "0.595758", "0.5944574", "0.5943077", "0.591232...
0.6083154
10
Check whether the character is part of CypriotSyllabary UCS Block
def uCSIsCypriotSyllabary(code): ret = libxml2mod.xmlUCSIsCypriotSyllabary(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _is_chinese_char(cp):\n # This defines a \"chinese character\" as anything in the CJK Unicode block:\n # https://en.wikipedia.org/wiki/CJK_Unified_Ideographs_(Unicode_block)\n #\n # Note that the CJK Unicode block is NOT all Japanese and Korean characters,\n # despite its name. The modern Kore...
[ "0.6655662", "0.66316545", "0.6620379", "0.66038454", "0.65704805", "0.6455905", "0.62977135", "0.6269772", "0.6206612", "0.6198674", "0.6126134", "0.6115812", "0.6066588", "0.60533285", "0.60401267", "0.60245794", "0.6011982", "0.6011982", "0.60011905", "0.5993336", "0.58592...
0.549506
47
Check whether the character is part of Georgian UCS Block
def uCSIsGeorgian(code): ret = libxml2mod.xmlUCSIsGeorgian(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_asian(char):\r\n\r\n # 0x3000 is ideographic space (i.e. double-byte space)\r\n # Anything over is an Asian character\r\n return ord(char) > IDEOGRAPHIC_SPACE", "def _is_chinese_char(cp):\n # This defines a \"chinese character\" as anything in the CJK Unicode block:\n # https://en.wikiped...
[ "0.6318864", "0.62632054", "0.62560225", "0.624882", "0.6225683", "0.6209045", "0.6140211", "0.6089018", "0.60356957", "0.60324204", "0.5976017", "0.5959633", "0.59406215", "0.59061116", "0.5892374", "0.5848069", "0.5841565", "0.58109623", "0.5767756", "0.57643455", "0.575783...
0.0
-1
Check whether the character is part of Gothic UCS Block
def uCSIsGothic(code): ret = libxml2mod.xmlUCSIsGothic(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_for_chr(sam):\n if 'chr' in sam.references[0]:\n return True\n return False", "def isValid(self) :\n try :\n pos = 0\n while self.firstblock[pos] == chr(0) :\n pos += 1\n except IndexError : \n return False\n else ...
[ "0.6268962", "0.622562", "0.6179216", "0.61525154", "0.613479", "0.6119628", "0.61114025", "0.6106372", "0.6098136", "0.60956156", "0.6070342", "0.6043201", "0.60412467", "0.6018926", "0.6004982", "0.6001978", "0.5981072", "0.59694266", "0.5964252", "0.59307843", "0.59239584"...
0.0
-1
Check whether the character is part of GreekExtended UCS Block
def uCSIsGreekExtended(code): ret = libxml2mod.xmlUCSIsGreekExtended(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isUnicodeEmoji(c : str) -> bool:\n return c in UNICODE_EMOJI", "def valid_ring_character(self, character):\n if character in self._charset:\n return character\n else:\n raise RotorRingCharacterError(character)", "def character(x):\n if (x==\"a\"or x==\"A\"or x==\"e...
[ "0.6428094", "0.63963044", "0.6163088", "0.6132576", "0.6123872", "0.60250735", "0.6024986", "0.600266", "0.60020566", "0.5981608", "0.59512156", "0.59377265", "0.5933231", "0.59172153", "0.58909094", "0.5890591", "0.58843416", "0.5869262", "0.586846", "0.5847215", "0.5835054...
0.55646527
53
Check whether the character is part of Gujarati UCS Block
def uCSIsGujarati(code): ret = libxml2mod.xmlUCSIsGujarati(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isValid(self) :\n try :\n pos = 0\n while self.firstblock[pos] == chr(0) :\n pos += 1\n except IndexError : \n return False\n else : \n firstblock = self.firstblock[pos:]\n if firstblock.startswith(\"\\033E\\03...
[ "0.6415847", "0.63373804", "0.63350093", "0.633389", "0.63214743", "0.63096917", "0.63008136", "0.62038624", "0.6181789", "0.6178694", "0.61478335", "0.61178005", "0.6114686", "0.6105846", "0.6087921", "0.6073775", "0.60697854", "0.606755", "0.6017226", "0.5958984", "0.595292...
0.0
-1
Check whether the character is part of HangulSyllables UCS Block
def uCSIsHangulSyllables(code): ret = libxml2mod.xmlUCSIsHangulSyllables(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isHangulSyllable(ch):\n #Java's Regex had an easy way to do this. No Python equivalent.\n #Had to invent this\n\n if len(ch) != 1: #if it isn't 1 character long\n return None #it's not true nor false\n\n #convert to an ordinal number\n chOrd = ord(ch)\n\n if (chOrd < HAN_SYL_START) or ...
[ "0.7816527", "0.6597602", "0.6568438", "0.65628743", "0.6554801", "0.6307898", "0.6307542", "0.62720597", "0.6127377", "0.61202717", "0.60577327", "0.6050799", "0.6045673", "0.59976923", "0.5957908", "0.5893488", "0.5887572", "0.58652097", "0.5852793", "0.58434165", "0.582746...
0.5807802
24
Check whether the character is part of Latin1Supplement UCS Block
def uCSIsLatin1Supplement(code): ret = libxml2mod.xmlUCSIsLatin1Supplement(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_ascii_compliance(plaintext: bytes) -> bool:\n return all(c < 128 for c in plaintext)", "def __contains_nonascii_characters(string):\n for c in string:\n if not ord(c) < 128:\n return True\n return False", "def _has_non_ascii_characters(data_string):\r\n t...
[ "0.6751452", "0.6472651", "0.63020015", "0.6204774", "0.61254275", "0.6116666", "0.61134475", "0.60482055", "0.60103244", "0.599851", "0.59935474", "0.5991672", "0.596792", "0.59348947", "0.58945864", "0.5884718", "0.5878046", "0.58676445", "0.58676445", "0.5835576", "0.58329...
0.60462785
8
Check whether the character is part of LatinExtendedAdditional UCS Block
def uCSIsLatinExtendedAdditional(code): ret = libxml2mod.xmlUCSIsLatinExtendedAdditional(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __contains_nonascii_characters(string):\n for c in string:\n if not ord(c) < 128:\n return True\n return False", "def _has_non_ascii_characters(data_string):\r\n try:\r\n data_string.encode('ascii')\r\n except UnicodeEncodeError:\r\n return True\r\n...
[ "0.63535583", "0.6329838", "0.619025", "0.6104876", "0.6019007", "0.5973198", "0.5955598", "0.59406", "0.5875274", "0.58665967", "0.5859558", "0.5797452", "0.57949615", "0.57662433", "0.57598805", "0.5731037", "0.5722178", "0.56806666", "0.56663406", "0.5655721", "0.56418383"...
0.5995005
5
Check whether the character is part of LatinExtendedB UCS Block
def uCSIsLatinExtendedB(code): ret = libxml2mod.xmlUCSIsLatinExtendedB(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def utf8_lead_byte(b):\n\treturn (ord(b) & 0xC0) != 0x80", "def __contains_nonascii_characters(string):\n for c in string:\n if not ord(c) < 128:\n return True\n return False", "def check_ascii_compliance(plaintext: bytes) -> bool:\n return all(c < 128 for c in plaint...
[ "0.6506576", "0.6489305", "0.64591473", "0.6300405", "0.62968326", "0.62709177", "0.62440604", "0.6227176", "0.6220396", "0.619808", "0.6125777", "0.61124414", "0.60864663", "0.6070859", "0.60658324", "0.603156", "0.601", "0.59883535", "0.5985938", "0.5979215", "0.59785974", ...
0.5950127
22
Check whether the character is part of LetterlikeSymbols UCS Block
def uCSIsLetterlikeSymbols(code): ret = libxml2mod.xmlUCSIsLetterlikeSymbols(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def must_contain_letter(cell):\n # Check if it's nan first\n if check_empty(cell):\n return True\n return not bool(re.search(\"[a-zA-Z]\", str(cell)))", "def is_symbol(p):\n return len(p) == 1 and p.isalpha()", "def is_letter(c):\n return 'A' <= c <= 'Z' or 'a' <= c <= 'z'", "def has_l...
[ "0.6804174", "0.676072", "0.6721271", "0.66995573", "0.6637394", "0.6599473", "0.65932524", "0.6572517", "0.6556395", "0.65337056", "0.6477971", "0.64665747", "0.6396451", "0.6394857", "0.636974", "0.63539344", "0.6351893", "0.6350727", "0.6346091", "0.6333155", "0.6332454", ...
0.0
-1
Check whether the character is part of LowSurrogates UCS Block
def uCSIsLowSurrogates(code): ret = libxml2mod.xmlUCSIsLowSurrogates(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isHangulSyllable(ch):\n #Java's Regex had an easy way to do this. No Python equivalent.\n #Had to invent this\n\n if len(ch) != 1: #if it isn't 1 character long\n return None #it's not true nor false\n\n #convert to an ordinal number\n chOrd = ord(ch)\n\n if (chOrd < HAN_SYL_START) or ...
[ "0.6274512", "0.61621267", "0.6149349", "0.61440223", "0.6143803", "0.61258423", "0.6106003", "0.60564345", "0.6033513", "0.6026354", "0.59541553", "0.5943754", "0.59345233", "0.5912861", "0.59128195", "0.5899648", "0.5816307", "0.57792777", "0.5765093", "0.57100254", "0.5690...
0.5310575
70
Check whether the character is part of MathematicalAlphanumericSymbols UCS Block
def uCSIsMathematicalAlphanumericSymbols(code): ret = libxml2mod.xmlUCSIsMathematicalAlphanumericSymbols(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_symbol(p):\n return len(p) == 1 and p.isalpha()", "def validate_symbol(text):\n\n match_list = __RE_SYMBOL.findall(_preprocess(text))\n if match_list:\n raise InvalidCharError(\"invalid symbols found: {}\".format(match_list))", "def is_ascii(token):\n\n printable = set(string.printabl...
[ "0.6829568", "0.6755213", "0.66529053", "0.664704", "0.6624206", "0.66020626", "0.6598744", "0.65249825", "0.64695936", "0.6431509", "0.6402722", "0.64006525", "0.6399854", "0.639897", "0.6396008", "0.63927525", "0.63805676", "0.63613945", "0.6359596", "0.6359596", "0.6352812...
0.62156177
28
Check whether the character is part of Mongolian UCS Block
def uCSIsMongolian(code): ret = libxml2mod.xmlUCSIsMongolian(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isUnicodeEmoji(c : str) -> bool:\n return c in UNICODE_EMOJI", "def valid_ring_character(self, character):\n if character in self._charset:\n return character\n else:\n raise RotorRingCharacterError(character)", "def isHangulSyllable(ch):\n #Java's Regex had an eas...
[ "0.6658338", "0.6640261", "0.6482865", "0.6476198", "0.64656323", "0.6460286", "0.6450511", "0.6427563", "0.64133054", "0.64124", "0.639122", "0.6385589", "0.637947", "0.6376651", "0.63377166", "0.6313076", "0.63036484", "0.628719", "0.62768877", "0.62768877", "0.62740993", ...
0.0
-1
Check whether the character is part of NumberForms UCS Block
def uCSIsNumberForms(code): ret = libxml2mod.xmlUCSIsNumberForms(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isValid(self) :\n try :\n pos = 0\n while self.firstblock[pos] == chr(0) :\n pos += 1\n except IndexError : \n return False\n else : \n firstblock = self.firstblock[pos:]\n if firstblock.startswith(\"\\033E\\03...
[ "0.6659621", "0.6055021", "0.60490143", "0.60004824", "0.59888935", "0.5983998", "0.5976473", "0.5861715", "0.58549243", "0.5783365", "0.57830095", "0.57612693", "0.5751774", "0.5735471", "0.5733864", "0.5733477", "0.5733477", "0.5717954", "0.5692369", "0.5692303", "0.5675607...
0.0
-1
Check whether the character is part of Specials UCS Block
def uCSIsSpecials(code): ret = libxml2mod.xmlUCSIsSpecials(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __contains_nonascii_characters(string):\n for c in string:\n if not ord(c) < 128:\n return True\n return False", "def isUnicodeEmoji(c : str) -> bool:\n return c in UNICODE_EMOJI", "def checkChar(self, char):\n return char not in self.guessedChars", "def ...
[ "0.63346905", "0.6240177", "0.6221176", "0.6146193", "0.6121107", "0.6119375", "0.6116377", "0.610082", "0.60883087", "0.608431", "0.60792303", "0.60789275", "0.6073359", "0.6067243", "0.60450834", "0.60331506", "0.6025784", "0.6011119", "0.5924793", "0.5922072", "0.5920303",...
0.0
-1
Check whether the character is part of TaiXuanJingSymbols UCS Block
def uCSIsTaiXuanJingSymbols(code): ret = libxml2mod.xmlUCSIsTaiXuanJingSymbols(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _is_chinese_char(cp):\n # This defines a \"chinese character\" as anything in the CJK Unicode block:\n # https://en.wikipedia.org/wiki/CJK_Unified_Ideographs_(Unicode_block)\n #\n # Note that the CJK Unicode block is NOT all Japanese and Korean characters,\n # despite its name. The modern Kore...
[ "0.6870638", "0.6835684", "0.6800423", "0.6777926", "0.6771159", "0.6665157", "0.6552845", "0.6440913", "0.6409706", "0.63962597", "0.63265944", "0.6230233", "0.6177892", "0.61777425", "0.61251307", "0.61197335", "0.60917306", "0.6084213", "0.6080666", "0.6056604", "0.605403"...
0.56423664
61
Check whether the character is part of Telugu UCS Block
def uCSIsTelugu(code): ret = libxml2mod.xmlUCSIsTelugu(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _is_chinese_char(cp):\n # This defines a \"chinese character\" as anything in the CJK Unicode block:\n # https://en.wikipedia.org/wiki/CJK_Unified_Ideographs_(Unicode_block)\n #\n # Note that the CJK Unicode block is NOT all Japanese and Korean characters,\n # despite its name. The modern Kore...
[ "0.6860739", "0.6851751", "0.6844562", "0.6831338", "0.68274045", "0.67171144", "0.6413674", "0.6367036", "0.63042223", "0.62851715", "0.62727433", "0.62706983", "0.6263993", "0.6240653", "0.6232585", "0.6185245", "0.61715865", "0.61442715", "0.61014634", "0.60301965", "0.602...
0.0
-1
Check whether the character is part of Thai UCS Block
def uCSIsThai(code): ret = libxml2mod.xmlUCSIsThai(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _is_chinese_char(cp):\n # This defines a \"chinese character\" as anything in the CJK Unicode block:\n # https://en.wikipedia.org/wiki/CJK_Unified_Ideographs_(Unicode_block)\n #\n # Note that the CJK Unicode block is NOT all Japanese and Korean characters,\n # despite its name. The modern Kore...
[ "0.6890721", "0.6851697", "0.68464243", "0.6826954", "0.67566496", "0.6618903", "0.65381867", "0.6530539", "0.6498274", "0.6312951", "0.628551", "0.6268834", "0.62281865", "0.61762065", "0.6120312", "0.6047685", "0.6038989", "0.6034304", "0.59619224", "0.5934907", "0.5916094"...
0.0
-1
Check whether the character is part of YiRadicals UCS Block
def uCSIsYiRadicals(code): ret = libxml2mod.xmlUCSIsYiRadicals(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isValid(self) :\n try :\n pos = 0\n while self.firstblock[pos] == chr(0) :\n pos += 1\n except IndexError : \n return False\n else : \n firstblock = self.firstblock[pos:]\n if firstblock.startswith(\"\\033E\\03...
[ "0.65001184", "0.61863464", "0.6089085", "0.60689175", "0.589443", "0.5870569", "0.58657444", "0.58600974", "0.58261186", "0.5810115", "0.58087724", "0.57927966", "0.57730794", "0.57691866", "0.5729916", "0.572436", "0.57218814", "0.57078123", "0.56941926", "0.56741375", "0.5...
0.0
-1
Check whether the character is part of YiSyllables UCS Block
def uCSIsYiSyllables(code): ret = libxml2mod.xmlUCSIsYiSyllables(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isHangulSyllable(ch):\n #Java's Regex had an easy way to do this. No Python equivalent.\n #Had to invent this\n\n if len(ch) != 1: #if it isn't 1 character long\n return None #it's not true nor false\n\n #convert to an ordinal number\n chOrd = ord(ch)\n\n if (chOrd < HAN_SYL_START) or ...
[ "0.67516756", "0.6208438", "0.618466", "0.6166076", "0.613725", "0.6136685", "0.59724396", "0.5936056", "0.5850519", "0.58077836", "0.57101405", "0.56960744", "0.56602806", "0.5647691", "0.56304836", "0.5619279", "0.5611568", "0.56048197", "0.55960405", "0.55956066", "0.55802...
0.57533777
10
Check whether the character is part of YijingHexagramSymbols UCS Block
def uCSIsYijingHexagramSymbols(code): ret = libxml2mod.xmlUCSIsYijingHexagramSymbols(code) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isUnicodeEmoji(c : str) -> bool:\n return c in UNICODE_EMOJI", "def isValid(self) :\n try :\n pos = 0\n while self.firstblock[pos] == chr(0) :\n pos += 1\n except IndexError : \n return False\n else : \n firstblock =...
[ "0.6578791", "0.64820987", "0.6453358", "0.643272", "0.64260525", "0.6421604", "0.636663", "0.6365147", "0.636239", "0.6331426", "0.630943", "0.6247839", "0.61893773", "0.6186104", "0.6147783", "0.61374485", "0.60967004", "0.60831857", "0.607673", "0.6063233", "0.60559845", ...
0.596454
24
Finds the first child node of that element which is a Element node Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back reference from entities content to entities references.
def firstElementChild(self): ret = libxml2mod.xmlFirstElementChild(self._o) if ret is None:return None __tmp = xmlNode(_obj=ret) return __tmp
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_first_element_child(self):\n\n pass", "def get_first_node_child(self):\n\n pass", "def first_child(tree, name, recurse = False):\n name = name.lower()\n if not tree.hasChildNodes():\n return None\n for child in tree.childNodes:\n if child.nodeType != child.ELEMENT_N...
[ "0.7092839", "0.6675003", "0.6595589", "0.6419877", "0.615913", "0.6093673", "0.6082459", "0.60191154", "0.5988092", "0.5964394", "0.59306955", "0.59306955", "0.59306955", "0.59306955", "0.59306955", "0.5921491", "0.5916791", "0.59113455", "0.5853532", "0.58277804", "0.570506...
0.75834
0
Read the value of a node, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted.
def getContent(self): ret = libxml2mod.xmlNodeGetContent(self._o) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def val(node: md.Document) -> str:\n try:\n node.normalize()\n return node.firstChild.wholeText.strip() # Handles CDATASection too\n except AttributeError:\n return \"\"", "def getvalueofnode(node):\r\n return node.text if node is not None else None", "def getvalueofnode(node):\r...
[ "0.70789075", "0.70407754", "0.69837594", "0.6891649", "0.6891649", "0.688199", "0.6628465", "0.6520078", "0.64785606", "0.6472029", "0.6356359", "0.6163238", "0.6138085", "0.6108428", "0.60740906", "0.6008055", "0.6000422", "0.59952414", "0.5912809", "0.5897301", "0.5868449"...
0.0
-1
Creation of a new Namespace. This function will refuse to create a namespace with a similar prefix than an existing one present on this node. Note that for a default namespace, should be None. We use href==None in the case of an element creation where the namespace was not defined.
def newNs(self, href, prefix): ret = libxml2mod.xmlNewNs(self._o, href, prefix) if ret is None:raise treeError('xmlNewNs() failed') __tmp = xmlNs(_obj=ret) return __tmp
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def newGlobalNs(self, href, prefix):\n ret = libxml2mod.xmlNewGlobalNs(self._o, href, prefix)\n if ret is None:raise treeError('xmlNewGlobalNs() failed')\n __tmp = xmlNs(_obj=ret)\n return __tmp", "def createNamespace(self):\r\n raise NotImplementedError('Endpoint can not be us...
[ "0.68840706", "0.6408603", "0.6292905", "0.62912923", "0.59343344", "0.5796834", "0.574832", "0.57481617", "0.5618297", "0.5617807", "0.56170005", "0.5609323", "0.55720663", "0.5559587", "0.55577034", "0.547088", "0.5414772", "0.5413569", "0.53996885", "0.53973347", "0.536714...
0.75347716
0
Set (or reset) the name of a node.
def setName(self, name): libxml2mod.xmlNodeSetName(self._o, name)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_name(self, name):\r\n self.stream.set_node_name(self.node, name)", "def node_name(self, value: str):\n self._properties[\"nodeName\"] = value", "def set_name(self, newname=\"\"):\n self.name = newname", "def setName(self,value):\n assert value == None or type(value) == str...
[ "0.8469247", "0.82021064", "0.7645156", "0.7411011", "0.7373661", "0.7373661", "0.7358336", "0.72840995", "0.7279071", "0.7240787", "0.7240787", "0.7240787", "0.7240787", "0.7240787", "0.7234777", "0.72242934", "0.7221681", "0.7220605", "0.718619", "0.7182344", "0.7182344", ...
0.7942927
2
Create a new xmlXPathObjectPtr of type NodeSet and initialize it with the single Node
def xpathNewNodeSet(self): ret = libxml2mod.xmlXPathNewNodeSet(self._o) if ret is None:raise xpathError('xmlXPathNewNodeSet() failed') return xpathObjectRet(ret)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self):\n\n self.nodes = set()", "def __init__(self, set_ptr=None):\n\n if set_ptr is None:\n self.set = ipset.ipset_new()\n else:\n self.set = set_ptr", "def make_set(node):\n node.parent = node\n node.rank = 0", "def xpointerNewLocationSetNodes(s...
[ "0.61179084", "0.5967734", "0.5944864", "0.58640605", "0.58334535", "0.57554126", "0.57178366", "0.56645423", "0.5663016", "0.5648847", "0.560601", "0.5573773", "0.5562206", "0.5550534", "0.55234694", "0.5463693", "0.5419366", "0.5390111", "0.5381358", "0.53748506", "0.535731...
0.7615347
0
Traversal function for the "descendant" direction the descendant axis contains the descendants of the context node in document order; a descendant is a child or a child of a child and so on.
def xpathNextDescendant(self, ctxt): if ctxt is None: ctxt__o = None else: ctxt__o = ctxt._o ret = libxml2mod.xmlXPathNextDescendant(ctxt__o, self._o) if ret is None:raise xpathError('xmlXPathNextDescendant() failed') __tmp = xmlNode(_obj=ret) return __tmp
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_descendant_of(self, node):\n return False", "def Descendant(self, *args):\n return _BRepAlgo.BRepAlgo_AsDes_Descendant(self, *args)", "def is_descendant(self, tree, ancestor, descendant):\n if ancestor == descendant:\n return True\n if descendant:\n retu...
[ "0.62418586", "0.6158562", "0.60502523", "0.600423", "0.58839774", "0.5854555", "0.58086693", "0.57791096", "0.57668775", "0.5732382", "0.5722833", "0.56278074", "0.5622524", "0.5606942", "0.55858153", "0.55819464", "0.55639637", "0.5555646", "0.55441815", "0.551621", "0.5511...
0.65130424
0
Creation of a new Fragment node.
def newDocFragment(self): ret = libxml2mod.xmlNewDocFragment(self._o) if ret is None:raise treeError('xmlNewDocFragment() failed') __tmp = xmlNode(_obj=ret) return __tmp
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def createFragment(self, module: ghidra.program.model.listing.ProgramModule, fragmentName: unicode, start: ghidra.program.model.address.Address, length: long) -> ghidra.program.model.listing.ProgramFragment:\n ...", "def newfragment(self):\n newfragment = fragment()\n self.addfragment(newfra...
[ "0.75943834", "0.7522764", "0.7519081", "0.738074", "0.7344464", "0.6433047", "0.6398718", "0.57991993", "0.57515997", "0.56497353", "0.55263096", "0.55009705", "0.5438686", "0.5434041", "0.541678", "0.53840953", "0.5336673", "0.5307505", "0.5305317", "0.53049797", "0.529167"...
0.6259627
7
Dump an XML document to a file. Will use compression if compiled in and enabled. If is "" the stdout file is used.
def saveFile(self, filename): ret = libxml2mod.xmlSaveFile(filename, self._o) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pretty_print_xml(xml_file):\n assert xml_file is not None\n parser = etree.XMLParser(resolve_entities=False, strip_cdata=False, remove_blank_text=True)\n tree = etree.parse(xml_file, parser)\n tree.write(xml_file, pretty_print=True, encoding='utf-8')", "def writeFile(self, filename):\n s = ET....
[ "0.67543775", "0.6734696", "0.66024315", "0.65410817", "0.6504647", "0.6418736", "0.6414425", "0.6402215", "0.6318662", "0.62653476", "0.62402594", "0.62257445", "0.61975116", "0.61889076", "0.6018429", "0.60046333", "0.6000926", "0.59872544", "0.5945279", "0.5889024", "0.586...
0.0
-1
Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.
def stringGetNodeList(self, value): ret = libxml2mod.xmlStringGetNodeList(self._o, value) if ret is None:raise treeError('xmlStringGetNodeList() failed') __tmp = xmlNode(_obj=ret) return __tmp
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_expanded_values(self, value: Union[str, List[str]]) -> List[str]:\n if isinstance(value, str):\n value = [value]\n _out = []\n for v in value:\n try:\n v = self.biolink_model_toolkit.get_descendants(v, reflexive=True, formatted=True)\n ...
[ "0.55384916", "0.5524442", "0.55080354", "0.5466301", "0.5425505", "0.53831816", "0.53748024", "0.5324236", "0.5317434", "0.53156865", "0.5285466", "0.5257722", "0.52491236", "0.52484447", "0.52354056", "0.5231106", "0.5219272", "0.5193949", "0.51790655", "0.51685584", "0.515...
0.5503709
3
Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.
def stringLenGetNodeList(self, value, len): ret = libxml2mod.xmlStringLenGetNodeList(self._o, value, len) if ret is None:raise treeError('xmlStringLenGetNodeList() failed') __tmp = xmlNode(_obj=ret) return __tmp
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_expanded_values(self, value: Union[str, List[str]]) -> List[str]:\n if isinstance(value, str):\n value = [value]\n _out = []\n for v in value:\n try:\n v = self.biolink_model_toolkit.get_descendants(v, reflexive=True, formatted=True)\n ...
[ "0.55368286", "0.5525423", "0.5506422", "0.5503712", "0.5465669", "0.5426662", "0.5380313", "0.53765684", "0.5324345", "0.53160894", "0.5314449", "0.5284918", "0.52610373", "0.5248054", "0.52479637", "0.5233414", "0.523035", "0.5219269", "0.51937866", "0.5179171", "0.5168176"...
0.0
-1
Setup an xmltextReader to parse a preparsed XML document. This reuses the existing xmlTextReader.
def NewWalker(self, reader): if reader is None: reader__o = None else: reader__o = reader._o ret = libxml2mod.xmlReaderNewWalker(reader__o, self._o) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Setup(self, reader, URL, encoding, options):\n if reader is None: reader__o = None\n else: reader__o = reader._o\n ret = libxml2mod.xmlTextReaderSetup(reader__o, self._o, URL, encoding, options)\n return ret", "def readerWalker(self):\n ret = libxml2mod.xmlReaderWalker(self...
[ "0.6678506", "0.6309224", "0.6135679", "0.58738106", "0.5689437", "0.568153", "0.5621", "0.55730283", "0.55638665", "0.5485195", "0.5445137", "0.54172146", "0.5404788", "0.5395796", "0.5320016", "0.5296876", "0.52628356", "0.5184031", "0.5175442", "0.5143241", "0.5125082", ...
0.53594816
14
Create an xmltextReader for a preparsed document.
def readerWalker(self): ret = libxml2mod.xmlReaderWalker(self._o) if ret is None:raise treeError('xmlReaderWalker() failed') __tmp = xmlTextReader(_obj=ret) return __tmp
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def newTextReader(self, URI):\n ret = libxml2mod.xmlNewTextReader(self._o, URI)\n if ret is None:raise treeError('xmlNewTextReader() failed')\n __tmp = xmlTextReader(_obj=ret)\n __tmp.input = self\n return __tmp", "def readerForDoc(cur, URL, encoding, options):\n ret = libxm...
[ "0.6715174", "0.6186738", "0.59500754", "0.58724743", "0.5842006", "0.5842006", "0.5842006", "0.5821771", "0.5751628", "0.5751628", "0.5751628", "0.5730878", "0.5730878", "0.5730878", "0.5730878", "0.5730878", "0.5730878", "0.5730878", "0.57150286", "0.56195873", "0.55802447"...
0.6276999
1
Use RelaxNG schema context to validate the document as it is processed. Activation is only possible before the first Read(). If is None, then RelaxNG schema validation is deactivated.
def RelaxNGValidateCtxt(self, reader, options): if reader is None: reader__o = None else: reader__o = reader._o ret = libxml2mod.xmlTextReaderRelaxNGValidateCtxt(reader__o, self._o, options) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __validate_and_compile(self):\n self.__validate_file(self.__schema_path, \"RNG\")\n\n with open(self.__schema_path) as relax_file_handler:\n\n # Parse schema file\n relax_parsed = etree.parse(relax_file_handler)\n\n # Compile schema file\n self.__compil...
[ "0.6574761", "0.63376504", "0.6302527", "0.63017464", "0.62832236", "0.6158795", "0.614134", "0.5947016", "0.5909192", "0.5819778", "0.5794172", "0.5736365", "0.5608846", "0.5593983", "0.5570945", "0.5515278", "0.55016327", "0.54607266", "0.543467", "0.5408998", "0.539711", ...
0.6492264
1
Obtain the base URI for the given locator.
def BaseURI(self): ret = libxml2mod.xmlTextReaderLocatorBaseURI(self._o) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def base_uri(self) -> 'URI':\n return URI(self.base_url)", "def _get_base_href(tree):\n base_hrefs = tree.xpath('//base/@href')\n if base_hrefs:\n return base_hrefs[0]", "def BaseUri(context, arg=None):\n #FIXME: Arg must be a node set\n if not arg:\n arg = [context.node]\n ...
[ "0.7473824", "0.69681245", "0.688707", "0.6730729", "0.6730003", "0.66972476", "0.66958964", "0.6643906", "0.6633247", "0.6608386", "0.657198", "0.65166444", "0.64839375", "0.64793915", "0.6388643", "0.63834256", "0.6355502", "0.63504857", "0.6320808", "0.62981516", "0.629415...
0.64516795
14
Provides the number of attributes of the current node
def AttributeCount(self): ret = libxml2mod.xmlTextReaderAttributeCount(self._o) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_num_attributes(self) -> int:\n return self._num_attributes", "def getNumAttributes(self):\r\n return self.numAttributes", "def getAttributesLength(self):\n return _libsbml.XMLToken_getAttributesLength(self)", "def getNumAttributes(self):\n\n return len(self._attributes)", ...
[ "0.8165931", "0.8146601", "0.7758259", "0.77480614", "0.7674911", "0.7596263", "0.7589291", "0.7287927", "0.7210451", "0.6957965", "0.69524485", "0.6913117", "0.6879684", "0.6815503", "0.6784407", "0.66879034", "0.6667056", "0.6642448", "0.6642448", "0.66421497", "0.6626294",...
0.7264316
8
Provides the value of the attribute with the specified index relative to the containing element.
def GetAttributeNo(self, no): ret = libxml2mod.xmlTextReaderGetAttributeNo(self._o, no) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def attr(self, index):\n return self.row[0, index]", "def get_attr(self, value):\n return self.index[value]", "def get(self, index):\n return self._node.attributes.get_public(index)", "def get_attr_value(self, attr_key, el_idx=0):\n return self.get_element_by_attr_key(attr_key, el...
[ "0.7973939", "0.78768593", "0.77169317", "0.7191979", "0.69905233", "0.67998517", "0.67998517", "0.6762899", "0.6762899", "0.66932595", "0.6683685", "0.66433764", "0.6632507", "0.65694195", "0.65352", "0.65352", "0.651367", "0.6508671", "0.645374", "0.6427007", "0.64249367", ...
0.0
-1
Whether the node has attributes.
def HasAttributes(self): ret = libxml2mod.xmlTextReaderHasAttributes(self._o) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def has_attributes(self):\n return bool(self.attrs)", "def has_attributes(self):\n\n pass", "def hasAttr(self, *args):\n return _libsbml.XMLToken_hasAttr(self, *args)", "def hasRequiredAttributes(self):\n return _libsbml.Port_hasRequiredAttributes(self)", "def hasAttribute(self,...
[ "0.83239025", "0.79196817", "0.7688488", "0.7592858", "0.7555036", "0.7507363", "0.7484842", "0.7457762", "0.7456241", "0.7368404", "0.7356775", "0.7356266", "0.73343277", "0.73131114", "0.7311659", "0.73077255", "0.7304092", "0.73038083", "0.7288707", "0.7273403", "0.7271777...
0.762227
3
Whether the node can have a text value.
def HasValue(self): ret = libxml2mod.xmlTextReaderHasValue(self._o) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_text(self):\n return self.value_type in (str, unicode)", "def isText(self):\n ret = libxml2mod.xmlNodeIsText(self._o)\n return ret", "def is_text( self ):\n return self.get_main_type() == 'text'", "def isText(self):\n return _libsbml.XMLToken_isText(self)", "def te...
[ "0.8067282", "0.7692974", "0.76693165", "0.74505806", "0.7388207", "0.73716974", "0.7264626", "0.6939472", "0.6678142", "0.65031266", "0.6480164", "0.63573647", "0.6338539", "0.6326346", "0.6254525", "0.62253195", "0.6142649", "0.6134447", "0.6100366", "0.6020692", "0.5988547...
0.63704664
11
The local name of the node.
def LocalName(self): ret = libxml2mod.xmlTextReaderConstLocalName(self._o) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def node_name(self):\n return self._node_name", "def get_node_name(self):\n return util.join_names_underscore(self.name, str(self.as_pointer()))", "def name_local(self):\n return self.name", "def get_local_name(self):\n return self.local_name", "def get_node_name(self, node):\n ...
[ "0.83967096", "0.83538955", "0.8189074", "0.81453395", "0.8053078", "0.785049", "0.7731316", "0.7669126", "0.76590663", "0.76590663", "0.76590663", "0.76590663", "0.76575", "0.7550364", "0.7526844", "0.7526844", "0.74913985", "0.74797255", "0.7365345", "0.7282848", "0.7211275...
0.71297276
23
Setup an xmltextReader to parse a preparsed XML document. This reuses the existing xmlTextReader.
def NewWalker(self, doc): if doc is None: doc__o = None else: doc__o = doc._o ret = libxml2mod.xmlReaderNewWalker(self._o, doc__o) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Setup(self, reader, URL, encoding, options):\n if reader is None: reader__o = None\n else: reader__o = reader._o\n ret = libxml2mod.xmlTextReaderSetup(reader__o, self._o, URL, encoding, options)\n return ret", "def readerWalker(self):\n ret = libxml2mod.xmlReaderWalker(self...
[ "0.6678506", "0.6309224", "0.6135679", "0.58738106", "0.5689437", "0.568153", "0.5621", "0.55730283", "0.55638665", "0.5485195", "0.5445137", "0.54172146", "0.5404788", "0.5395796", "0.53594816", "0.5320016", "0.5296876", "0.5184031", "0.5175442", "0.5143241", "0.5125082", ...
0.52628356
17
This tells the XML Reader to preserve the current node. The caller must also use xmlTextReaderCurrentDoc() to keep an handle on the resulting document once parsing has finished
def Preserve(self): ret = libxml2mod.xmlTextReaderPreserve(self._o) if ret is None:raise treeError('xmlTextReaderPreserve() failed') __tmp = xmlNode(_obj=ret) return __tmp
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def CurrentNode(self):\n ret = libxml2mod.xmlTextReaderCurrentNode(self._o)\n if ret is None:raise treeError('xmlTextReaderCurrentNode() failed')\n __tmp = xmlNode(_obj=ret)\n return __tmp", "def _readMoreXML(self,xmlNode):\n self._localReadMoreXML(xmlNode)", "def CurrentDoc(self...
[ "0.6185541", "0.5796757", "0.5724552", "0.56313354", "0.55605096", "0.5523793", "0.54767066", "0.5460335", "0.54363084", "0.5377306", "0.5350271", "0.53452843", "0.53303885", "0.52216536", "0.5217955", "0.52096635", "0.52059966", "0.5168074", "0.5125313", "0.50881505", "0.506...
0.79174346
0
Gets the read state of the reader.
def ReadState(self): ret = libxml2mod.xmlTextReaderReadState(self._o) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read(self):\n self._read(True)\n return self._readings", "def reader(self):\n return self._r", "def read(self):\n return self.read_value", "def read_count(self):\n return self._read_count", "def read(self):\n yield self.we.eq(1)\n value = (yield self.sta...
[ "0.68192196", "0.6818999", "0.676076", "0.65528125", "0.65164566", "0.63261074", "0.6305331", "0.6200104", "0.6172844", "0.616465", "0.6120261", "0.607991", "0.60774946", "0.60774946", "0.60774946", "0.60774946", "0.60774946", "0.6075114", "0.60727316", "0.606379", "0.606379"...
0.6878498
0
Use RelaxNG schema context to validate the document as it is processed. Activation is only possible before the first Read(). If is None, then RelaxNG schema validation is deactivated.
def RelaxNGValidateCtxt(self, ctxt, options): if ctxt is None: ctxt__o = None else: ctxt__o = ctxt._o ret = libxml2mod.xmlTextReaderRelaxNGValidateCtxt(self._o, ctxt__o, options) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __validate_and_compile(self):\n self.__validate_file(self.__schema_path, \"RNG\")\n\n with open(self.__schema_path) as relax_file_handler:\n\n # Parse schema file\n relax_parsed = etree.parse(relax_file_handler)\n\n # Compile schema file\n self.__compil...
[ "0.65751565", "0.6492051", "0.63366103", "0.63034385", "0.62838393", "0.6158408", "0.6141259", "0.59461147", "0.5908322", "0.5819402", "0.5794456", "0.57376087", "0.5609765", "0.55950445", "0.557167", "0.55144495", "0.55021095", "0.5461673", "0.5434451", "0.54102814", "0.5396...
0.6301564
4
Get the fragment part from an URI
def fragment(self): ret = libxml2mod.xmlURIGetFragment(self._o) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _urlparse_splitfragment(url):\r\n\r\n fpart = url.split(\"#\", 1)\r\n if len(fpart) == 2:\r\n fragment = fpart[1]\r\n else:\r\n fragment = \"\"\r\n\r\n return fpart[0], fragment", "def get_fragment(self):\n return self.fragment", "def _absurl(fragment):\r\n root = settings.MEDIA_URL\r\n...
[ "0.76206195", "0.64301586", "0.6231943", "0.62209624", "0.6149573", "0.6149573", "0.6006007", "0.58030957", "0.57189006", "0.5681673", "0.5634952", "0.56340593", "0.56243575", "0.5589098", "0.55552614", "0.55399334", "0.55142874", "0.5401985", "0.5371582", "0.5371391", "0.534...
0.7035488
1
Get the raw query part from an URI (i.e. the unescaped form).
def queryRaw(self): ret = libxml2mod.xmlURIGetQueryRaw(self._o) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def unquote(uri):\r\n uri = uri.encode('ascii')\r\n unquoted = urllib_unquote(uri)\r\n return unquoted.decode('utf-8')", "def get_query(self):\r\n\r\n split = self.path_s.split(\"?\", 1)\r\n if len(split) == 1: return \"\"\r\n else: return split[1]", "def getParsedQuer...
[ "0.65132475", "0.63932306", "0.6358423", "0.6228292", "0.59702307", "0.5963525", "0.592729", "0.578123", "0.57751065", "0.5770467", "0.576925", "0.5684611", "0.56510466", "0.55364186", "0.5531121", "0.54801196", "0.54443794", "0.5430089", "0.5393686", "0.53562164", "0.5313901...
0.69485015
0
Get the scheme part from an URI
def scheme(self): ret = libxml2mod.xmlURIGetScheme(self._o) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def extract_scheme(url):\n return urlsplit(url, \"http\").scheme", "def GetSchemeFromUrl(url):\n return __ParseUrl(url)[0]", "def _urlparse_splitscheme(url):\r\n # The scheme is valid only if it contains these characters.\r\n scheme_chars = \\\r\n \"abcdefghijklmnopqrstuvwxyz0123456789+-.\"\r\n\r\n s...
[ "0.8242303", "0.8218862", "0.72309506", "0.7141906", "0.67746186", "0.668706", "0.6635462", "0.6599847", "0.6558034", "0.6557602", "0.6522099", "0.6467841", "0.6408412", "0.636154", "0.63174677", "0.62988037", "0.62939143", "0.62795985", "0.6257035", "0.62325263", "0.62194073...
0.7388046
2
Parse an URI reference string based on RFC 3986 and fills in the appropriate fields of the structure URIreference = URI / relativeref
def parseURIReference(self, str): ret = libxml2mod.xmlParseURIReference(self._o, str) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def parse_uri(string):\n # Note that this function is currently pretty silly looking, but it will\n # grow as the package expands to provide more functionality.\n\n # The scheme and location are separated by the FIRST colon\n try:\n scheme, location = string.split(':', 1)\n except ValueError:...
[ "0.6705625", "0.64814", "0.6445073", "0.6400029", "0.6355857", "0.6254597", "0.6248235", "0.6095493", "0.6044861", "0.59552515", "0.59499735", "0.5939472", "0.59078145", "0.58503413", "0.58306634", "0.5817362", "0.57882315", "0.5741685", "0.5726676", "0.5707717", "0.56686205"...
0.75260377
0
Save the URI as an escaped string
def saveUri(self): ret = libxml2mod.xmlSaveUri(self._o) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def urlQuote(string):\r\n return quote(string.encode(\"utf-8\"))", "def encode_sm_uri(uri): # TODO is a shit\n\n encoded = uri\n for pat, replace in replaces.items():\n encoded = encoded.replace(pat, replace)\n return encoded", "def quote_uri(uri):\n import urlparse\n import urlli...
[ "0.63651454", "0.63299185", "0.63224655", "0.62547195", "0.6247071", "0.6225495", "0.6225305", "0.61992526", "0.6196737", "0.6164729", "0.6151104", "0.6126265", "0.609872", "0.60887545", "0.60557216", "0.60220456", "0.6004564", "0.59546256", "0.59054124", "0.5870987", "0.5844...
0.5880957
19
Search in the namespace declaration array of the context for the given namespace name associated to the given prefix
def xpathNsLookup(self, prefix): ret = libxml2mod.xmlXPathNsLookup(self._o, prefix) return ret
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def prefixForNamespace (self, namespace):\n pfxs = self.__inScopePrefixes.get(namespace)\n if pfxs:\n return next(iter(pfxs))\n return None", "def LookupNamespace(self, prefix):\n ret = libxml2mod.xmlTextReaderLookupNamespace(self._o, prefix)\n return ret", "def ge...
[ "0.68028617", "0.66046846", "0.65448135", "0.6492623", "0.6474199", "0.646664", "0.6368129", "0.6215092", "0.6195845", "0.6088999", "0.6075654", "0.6043819", "0.6024036", "0.60078406", "0.5959179", "0.5949412", "0.59352547", "0.5933056", "0.59142834", "0.59072155", "0.5894120...
0.67920697
1
Registers all default XPath functions in this context
def xpathRegisterAllFunctions(self): libxml2mod.xmlXPathRegisterAllFunctions(self._o)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xpathRegisteredFuncsCleanup(self):\n libxml2mod.xmlXPathRegisteredFuncsCleanup(self._o)", "def xpathTranslateFunction(self, nargs):\n libxml2mod.xmlXPathTranslateFunction(self._o, nargs)", "def registerDefaultInputCallbacks():\n libxml2mod.xmlRegisterDefaultInputCallbacks()", "def __init...
[ "0.6483255", "0.63628125", "0.63570243", "0.6289997", "0.6078314", "0.60745823", "0.60423625", "0.5879413", "0.5802026", "0.5744044", "0.5727727", "0.5696978", "0.5673808", "0.56569076", "0.5644433", "0.56136346", "0.5592473", "0.5575194", "0.55486524", "0.5536253", "0.550555...
0.8232112
0
Traversal function for the "descendant" direction the descendant axis contains the descendants of the context node in document order; a descendant is a child or a child of a child and so on.
def xpathNextDescendant(self, cur): if cur is None: cur__o = None else: cur__o = cur._o ret = libxml2mod.xmlXPathNextDescendant(self._o, cur__o) if ret is None:raise xpathError('xmlXPathNextDescendant() failed') __tmp = xmlNode(_obj=ret) return __tmp
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xpathNextDescendant(self, ctxt):\n if ctxt is None: ctxt__o = None\n else: ctxt__o = ctxt._o\n ret = libxml2mod.xmlXPathNextDescendant(ctxt__o, self._o)\n if ret is None:raise xpathError('xmlXPathNextDescendant() failed')\n __tmp = xmlNode(_obj=ret)\n return __tmp", ...
[ "0.65134144", "0.62416375", "0.61566764", "0.60502476", "0.60035783", "0.5883835", "0.58529603", "0.5808182", "0.5778056", "0.57680064", "0.5721821", "0.56282127", "0.56205016", "0.56068796", "0.5585778", "0.5582599", "0.55649924", "0.55547965", "0.5543806", "0.55174935", "0....
0.5732781
10
utcnow() should always return a timezone naive datetime
def test_freeze_with_timezone_aware_datetime_in_utc(): utc_now = datetime.datetime.utcnow() assert utc_now.tzinfo is None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def datetime_utcnow() -> datetime:\n return datetime.now(tz=pytz.timezone('UTC'))", "def now_datetime():\n return datetime.utcnow().replace(tzinfo=timezone)", "def now_utc() -> datetime:\n return datetime.now(timezone.utc)", "def _now():\n return datetime.datetime.utcnow().replace(tzinfo=pytz.utc...
[ "0.87445724", "0.8384677", "0.83001596", "0.82903826", "0.82823855", "0.8258008", "0.82146007", "0.81436074", "0.80177647", "0.7975264", "0.77837163", "0.777409", "0.77561104", "0.77379006", "0.76930153", "0.76128054", "0.75415707", "0.75314873", "0.7527916", "0.7519877", "0....
0.77370924
14
Store the editor's current text in the current tab. Strangely appears to be called twice on current editor's textChanged and backspace key...
def save_text_in_tab(self): if self.tabs.count() == 0: self.new_tab() # self.tabs['uuid'] = self.editor.uuid if self.tabs.get('saved'): # keep original text in case revert is required self.tabs['original_text'] = self.tabs['text'] self.tabs['s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_editor_contents(self, index):\n data = self.tabs.tabData(index)\n\n if not data:\n return # this will be a new empty tab, ignore.\n\n text = data['text']\n\n if text is None or not text.strip():\n path = data.get('path')\n if path is None:\n ...
[ "0.7271244", "0.68063784", "0.6525491", "0.6514625", "0.6450829", "0.6424653", "0.6403789", "0.63543683", "0.61981255", "0.61182433", "0.61182433", "0.6069198", "0.60433704", "0.6022986", "0.60139585", "0.601367", "0.59182906", "0.58943516", "0.5877356", "0.5873905", "0.58125...
0.80716074
0
... another way to design this class is to let name attribute be assigned when registered, but we need to allow FLAGS names such as 'jobdir' to be legal. In this perspective, this design is better.
def __init__(self, default_value, description, register=None, name=None, is_key=False, **kwargs): self._default_value = default_value self._description = description self._register = register self._name = name self._is_key = is_key self._kwargs = kwargs self._value = default_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, name):\n self._name = name\n self._registry = {}", "def __init__(self, name, parent=None):\n self._name = name\n self._parent = parent\n\n # Map: flag name -> flag definition\n self._defs = {}\n\n # After parsing, tuple of unparsed arguments:\n s...
[ "0.62441325", "0.6114193", "0.6042312", "0.59837526", "0.597775", "0.587255", "0.5865956", "0.5852568", "0.581961", "0.581961", "0.5814994", "0.5801965", "0.5794763", "0.57895905", "0.5774067", "0.57660866", "0.5760786", "0.57374156", "0.5713522", "0.5698044", "0.5689585", ...
0.0
-1
Reshaping happens during the call to forward.
def reshape(self, bottom, top): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def forward(self, input):\n batch_size = input.size(0)\n shape = (batch_size, *self.shape)\n out = input.reshape(shape)\n return out", "def _reshape(self):\n self._frame._setup(width=self._width,height=self._height,\n startx=self._x,starty=self._y)", ...
[ "0.7052694", "0.66112494", "0.6553348", "0.6553348", "0.6445214", "0.6263273", "0.6219224", "0.62077326", "0.6204762", "0.612587", "0.612587", "0.6098139", "0.6093421", "0.6090613", "0.60858375", "0.60803044", "0.6076111", "0.60631406", "0.60622656", "0.60548824", "0.60481465...
0.0
-1
Highlights a list of annotations in a given document. Annotations must not overlap.
def highlight_annotations( document_text: str, annotations: Iterable[Dict], highlight_color: str = "On_Green" ) -> None: last_position = 0 for annotation in sorted(annotations, key=lambda ann: ann["begin"]): sys.stdout.write(document_text[last_position : annotation["begin"]]) sys.stdout.writ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def highlight_annotation(\n document_text: str,\n annotation: Dict,\n context_size: int = 300,\n highlight_color: str = \"On_Green\",\n) -> None:\n\n sys.stdout.write(\n _render_highlighted(\n document_text, annotation[\"begin\"], annotation[\"end\"], context_size, highlight_color\...
[ "0.7080051", "0.60490745", "0.59433645", "0.58831733", "0.58799285", "0.58492786", "0.57725203", "0.57654566", "0.57036406", "0.5669521", "0.5652381", "0.5652167", "0.5624313", "0.5593907", "0.5587485", "0.5564704", "0.5563558", "0.5555434", "0.5553595", "0.55472547", "0.5547...
0.80828357
0
Converts a date (as a string) to a datetime object.
def datestring_to_datetime(datestring): return datetime(*[int(s) for s in datestring.split('-')])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def convert_str2date(date):\n import datetime\n date = str(date)\n year = int(date[0:4])\n month = int(date[4:6])\n day = int(date[6:8])\n return datetime.datetime(year,month,day)", "def to_datetime(date_string):\n return dt.strptime(date_string, '%Y-%m-%d')", "def str_to_date(date_as_str)...
[ "0.80922514", "0.790415", "0.78785604", "0.77028054", "0.7698652", "0.7649403", "0.76074004", "0.7581258", "0.7482939", "0.7430819", "0.7366046", "0.73239124", "0.7284672", "0.72745645", "0.72657996", "0.72620285", "0.7256204", "0.7252677", "0.72424376", "0.72264755", "0.7225...
0.7204752
21
Renders the game world as a grid of rectangles. Yellow rectangles > blips Blue rectangle > water Green rectangles > forest
def draw_world(self, world): # Clear screen self.window.fill(self.background_color) # Draw board for y in range(0, self.height): for x in range(0, self.width): c = BLACK blip_count = 0 if world.map[y][x].blips: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_world(self):\n for row in range(self.cell_row):\n for col in range(self.cell_col):\n x1 = col * self.cell_size\n y1 = row * self.cell_size\n x2 = x1 + self.cell_size\n y2 = y1 + self.cell_size\n\n if (self.world...
[ "0.7346073", "0.7248224", "0.71032715", "0.70222116", "0.6971212", "0.6943968", "0.69210404", "0.69105214", "0.68864065", "0.68738705", "0.6869376", "0.67319995", "0.6669917", "0.66646194", "0.66581994", "0.66568285", "0.6651013", "0.66274613", "0.6592659", "0.65897304", "0.6...
0.7463191
0
Produces and displays in a Jupyter notebook a single plot with the running reward, the loss function and the last chosen actions. This function can also save the plot to .pdf in the PLOT_DIR_NAME folder
def plot_sac_logs(log_dir, is_tri, actions_per_log=6000, running_reward_file=None, running_loss_file=None, actions_file=None, actions_to_plot=400,plot_to_file_line = None, suppress_show=False, save_plot = False, extra_str="", actions_ylim=None): #i create the file location strings if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def visualize_reward_over_steps(self):\n save_dir = os.path.join(self.env.logdir, \"rewards\")\n os.makedirs(save_dir, exist_ok=True)\n if self.env.episode_steps > 0:\n results_plotter.EPISODES_WINDOW=50\n results_plotter.plot_curves([(np.arange(self.env.episode_steps),np...
[ "0.6782284", "0.67792064", "0.66833574", "0.6679927", "0.66696393", "0.66619444", "0.6626264", "0.6623414", "0.65421945", "0.6491245", "0.64768285", "0.6402456", "0.64001065", "0.63970363", "0.63754916", "0.6343628", "0.6320106", "0.6314399", "0.6297286", "0.62664104", "0.625...
0.59590304
61
Returns the services that have undelivered messages
def waiting_clients(self): return self.storage.iterkeys()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_unstopped_processes(self):\r\n return [ x for x in self.processes.values() if x.get_state() not in\r\n STOPPED_STATES ]", "def lost_messages(self, namespace, timeout_s=60):\n lost = []\n\n with self.lock:\n for agent in self.dead_agents(namespace, timeout_s...
[ "0.61688673", "0.6009357", "0.5988664", "0.5877161", "0.5824229", "0.5704935", "0.5678364", "0.5670037", "0.5651657", "0.5635998", "0.56153345", "0.56144786", "0.5593253", "0.5561594", "0.55564815", "0.5547541", "0.5484969", "0.54783714", "0.5434256", "0.5425893", "0.5408618"...
0.0
-1
Returns a list of services subscribed to the channel
def get_clients(self, channel): if channel not in self.clients.keys(): return [] return self.clients[channel]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_all_servicech(self, conf):\n\t\tpass", "def get_services(self):\r\n return get_service_list()", "def get_subscribers():\n # TODO: make calls to each device asynchronous so we don't block\n # trying to read from an unresponsive device on start up.\n PortList = serial.tools.list_ports.com...
[ "0.6905363", "0.67928594", "0.6696701", "0.6649453", "0.6616173", "0.6582425", "0.64968055", "0.6494159", "0.64863396", "0.64528817", "0.6441343", "0.6378388", "0.63407737", "0.63243127", "0.63199013", "0.6310301", "0.6300896", "0.62992406", "0.6277665", "0.626891", "0.626095...
0.6991777
0
Returns the number of unsent messages for service in a given channel
def messages_in_channel(self, client, channel): result = None if client not in self.storage: return result if channel not in self.storage[client]: return result result = len(self.storage[client][channel]) return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def _count(\n self, ctx: Context, user: discord.Member, channel: discord.TextChannel = None\n ):\n\n if not channel:\n channel = ctx.channel\n\n count = 0\n async with ctx.typing():\n async for message in channel.history(limit=None):\n if me...
[ "0.657975", "0.59816855", "0.58021677", "0.5771974", "0.57275295", "0.5691235", "0.5691174", "0.56775624", "0.5657044", "0.5656259", "0.5635233", "0.5601015", "0.556196", "0.5548311", "0.55401486", "0.55262053", "0.55195576", "0.5518822", "0.5511645", "0.5510795", "0.55021274...
0.6867112
0
Gets the activity query inspector record corresponding to the given ``Activity`` record ``Type``.
def get_activity_query_inspector_record(self, activity_record_type): return # osid.learning.records.ActivityQueryInspectorRecord
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_activity_record(self, activity_record_type=None):\n if not self.has_record_type():\n raise IllegalState()\n else: # This should never get called:\n raise Unimplemented()", "def get_agency_query_inspector_record(self, agency_record_type):\n return # osid.authen...
[ "0.67879206", "0.64453965", "0.6404483", "0.64042526", "0.6296901", "0.62636566", "0.58736485", "0.5838845", "0.5720649", "0.5668118", "0.54776895", "0.54259235", "0.5411182", "0.5331479", "0.52392346", "0.520575", "0.5184123", "0.5157491", "0.51459914", "0.5143486", "0.51172...
0.81860197
0
Gets the minimum completion terms.
def get_minimum_completion_terms(self): return # osid.search.terms.DecimalTerm
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_completion_terms(self):\n return # osid.search.terms.DecimalRangeTerm", "def get_minimum():\n return [\n convert_variables([0.78547, 0.78547, 0.78547]),\n ]", "def getMinKey(self):\n\n if self.freq:\n min_freq = min(self.freq.keys())\n retur...
[ "0.63126713", "0.61316425", "0.5962791", "0.59045184", "0.5888861", "0.58421934", "0.578313", "0.57707787", "0.5694143", "0.56812745", "0.56062764", "0.55989003", "0.55989003", "0.55989003", "0.55989003", "0.55989003", "0.55989003", "0.55989003", "0.55989003", "0.55989003", "...
0.8391211
0
Gets the proficiency query inspector record corresponding to the given ``Proficiency`` record ``Type``.
def get_proficiency_query_inspector_record(self, proficiency_record_type): return # osid.learning.records.ProficiencyQueryInspectorRecord
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_agency_query_inspector_record(self, agency_record_type):\n return # osid.authentication.records.AgencyQueryInspectorRecord", "def get_objective_query_inspector_record(self, objective_record_type):\n return # osid.learning.records.ObjectiveQueryInspectorRecord", "def get_activity_query_i...
[ "0.63591987", "0.62713504", "0.6026866", "0.58138317", "0.5691092", "0.5357006", "0.527741", "0.52291757", "0.5086739", "0.48908895", "0.4890077", "0.4824123", "0.48151183", "0.47936258", "0.47927105", "0.47503322", "0.47462612", "0.47068703", "0.4681817", "0.467146", "0.4662...
0.8406018
0
Gets the objective bank query inspector record corresponding to the given ``ObjectiveBank`` record ``Type``.
def get_objective_bank_query_inspector_record(self, objective_bank_record_type): return # osid.learning.records.ObjectiveBankQueryInspectorRecord
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_objective_bank_record(self, objective_bank_record_type=None):\n if not self.has_record_type():\n raise IllegalState()\n else: # This should never get called.\n raise Unimplemented()", "def get_objective_query_inspector_record(self, objective_record_type):\n ret...
[ "0.7199655", "0.69777894", "0.67696565", "0.5914984", "0.5845147", "0.58391196", "0.57155895", "0.56362814", "0.55428874", "0.5401722", "0.53363025", "0.5284087", "0.5259767", "0.5170561", "0.5122044", "0.51102024", "0.5049079", "0.4987995", "0.4967631", "0.4967631", "0.49676...
0.8413634
0
Get the fully qualified class name, most useful when complaining about duplicate plugins names.
def qualified_name(cls): return '{}.{}'.format(cls.__module__, cls.__name__)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fullname(cls):\n module = cls.__module__\n if module is None or module == str.__class__.__module__:\n return cls.__class__.__name__\n return module + '.' + cls.__class__.__name__", "def f_get_class_name(self):\n return self.__class__.__name__", "def get_full_class_name(instance):\n ...
[ "0.79360193", "0.78168327", "0.7763607", "0.7654578", "0.7619782", "0.76041156", "0.7600725", "0.7532845", "0.7532845", "0.74793655", "0.74146235", "0.73687404", "0.7310958", "0.7237848", "0.7211929", "0.71931446", "0.71931446", "0.7184884", "0.715749", "0.71413517", "0.70624...
0.8088907
0
Get a list of this plugin's handlers for hook.
def get_hooks(self, hook: str) -> List[Callable]: return [getattr(self, name) for name in self.__plugin_data.hooks.get(hook, ())]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_registered_handlers(self):\n return list(self._registry.values())", "def get_handlers(self):\n\n # Get handlers \n logger.debug(\"%s: Returned %d handlers.\" % \\\n (self.__class__.__name__, len(self._handlers)))\n return self._handlers[:]", "def get_hand...
[ "0.77432156", "0.7456003", "0.73861814", "0.71060324", "0.7051369", "0.70463943", "0.70434904", "0.6915323", "0.69048995", "0.68458396", "0.68361706", "0.6792545", "0.67363906", "0.6728525", "0.66819966", "0.66679096", "0.6660004", "0.65822107", "0.65810406", "0.6430461", "0....
0.75495875
1
Relative path to the cmake build subdirectory.
def build_relpath(self): return join_path("..", self.build_dirname)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_project_path():\n file_path = os.path.abspath(__file__)\n root_dir = os.path.join(os.path.dirname(file_path), \"..\")\n return os.path.abspath(root_dir)", "def build_path(cls, relpath):\r\n if os.path.basename(relpath).startswith('BUILD'):\r\n return relpath\r\n else:\r\n return ...
[ "0.7112076", "0.7053106", "0.6903622", "0.68874216", "0.68780637", "0.6837933", "0.68231887", "0.68205684", "0.6790611", "0.67787915", "0.6761821", "0.6761821", "0.6761821", "0.6761821", "0.6710841", "0.6709403", "0.6703601", "0.66841537", "0.66659045", "0.66612375", "0.66225...
0.7620638
0
toString private method, extracts metric expression from health rule condition metric expression
def __str_metric_expression(self,metricExpression): if metricExpression['type'] == "LEAF_METRIC_EXPRESSION": return metricExpression['metricDefinition']['logicalMetricName'].lower() else: #metricExpression['type'] == "BOOLEAN_METRIC_EXPRESSION" return __str_metric_expression(metr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __str_healthrule_critical_conditions(self,healthrule):\n def str_custom_condition_expression(condition,expression):\n # In custom conditions the expression is given, only need to replace shortNames by metric name\n if 'metricExpression' in condition:\n return express...
[ "0.691603", "0.68240106", "0.66684645", "0.6566739", "0.63927627", "0.5783587", "0.56656826", "0.5571627", "0.55572325", "0.5518419", "0.5497137", "0.54811907", "0.5424083", "0.5418357", "0.5399262", "0.53923273", "0.53899384", "0.53899384", "0.53529954", "0.5334207", "0.5309...
0.7310391
0
Function returns boolean value as to whether this franchise is the public or a tenant.
def is_public(self): return self.schema_name == "public" or self.schema_name == "test"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tenant_exists(self, keystone, tenant):\n return tenant in [t.name for t in keystone.tenants.list()]", "def test_permissions(self):\n taxonomy = self.get_taxonomy()\n return True if self.request.user == taxonomy.author else taxonomy.public", "def test_auth_public(self):\n self.do...
[ "0.6567402", "0.647456", "0.6304006", "0.62529886", "0.62166", "0.62166", "0.62166", "0.62166", "0.6149672", "0.6149672", "0.61125606", "0.6090532", "0.6083297", "0.60828847", "0.60821176", "0.60732126", "0.60732126", "0.60578513", "0.6044697", "0.60166425", "0.60162115", "...
0.6381577
2