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 |
|---|---|---|---|---|---|---|
__lt__(self, r) > bool | def __lt__(self, *args):
return _ida_hexrays.ccase_t___lt__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __lt__(self, other: t.Any) -> bool:\n return self._op_bool('__lt__', other)",
"def __lt__(self, other):\n return self <= other and self != other",
"def __lt__(self, other):\n return self <= other and self != other",
"def __lt__(self, other):\n return True",
"def __lt__(self,... | [
"0.7905341",
"0.78158313",
"0.78158313",
"0.77416617",
"0.77416617",
"0.7702155",
"0.7694993",
"0.76391506",
"0.7591238",
"0.7563725",
"0.75326097",
"0.7518938",
"0.7510669",
"0.7503784",
"0.74992245",
"0.7483631",
"0.747919",
"0.7445643",
"0.7430462",
"0.74154854",
"0.741180... | 0.0 | -1 |
__le__(self, r) > bool | def __le__(self, *args):
return _ida_hexrays.ccase_t___le__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __le__(self, other: t.Any) -> bool:\n return self._op_bool('__le__', other)",
"def __le__(self, rs):\n Number.comparisons += 1\n result = self.data <= rs.data\n return result",
"def __le__(self, other):\n return True",
"def __le__(self, other):\n return self.... | [
"0.77986604",
"0.7577342",
"0.7467504",
"0.73853964",
"0.7308148",
"0.73060477",
"0.720586",
"0.720586",
"0.71718043",
"0.715179",
"0.7143629",
"0.711954",
"0.70886385",
"0.7087308",
"0.70672",
"0.70517457",
"0.7045276",
"0.701166",
"0.70088524",
"0.6999618",
"0.6956948",
"... | 0.0 | -1 |
__ge__(self, r) > bool | def __ge__(self, *args):
return _ida_hexrays.ccase_t___ge__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ge__(self, other: t.Any) -> bool:\n return self._op_bool('__ge__', other)",
"def __ge__(self, other):\n return other <= self",
"def __ge__(self, other):\n return int(self.rank) >= int(other.rank)",
"def __ge__(self, other):\n return not (self < other)",
"def __ge__(self, o... | [
"0.7167667",
"0.70841575",
"0.7023326",
"0.69555193",
"0.69555193",
"0.6932944",
"0.69310296",
"0.69214845",
"0.69070655",
"0.6906734",
"0.68468964",
"0.68468964",
"0.68435806",
"0.68345803",
"0.6802651",
"0.6797466",
"0.6782855",
"0.67784584",
"0.6756027",
"0.6756027",
"0.67... | 0.0 | -1 |
__eq__(self, r) > bool | def __eq__(self, *args):
return _ida_hexrays.ccases_t___eq__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other: t.Any) -> bool:\n return self._op_bool('__eq__', other)",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n ... | [
"0.77788925",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
... | 0.0 | -1 |
__ne__(self, r) > bool | def __ne__(self, *args):
return _ida_hexrays.ccases_t___ne__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__(self, other):\n return bool(self != other)",
"def __ne__(self, other: t.Any) -> bool:\n return self._op_bool('__ne__', other)",
"def __ne__(self, other):\n return not self == other",
"def __ne__(self, rhs):\n return not self.__eq__(rhs)",
"def __ne__(self, other):\n ... | [
"0.7844342",
"0.7825789",
"0.7769457",
"0.7741587",
"0.76898223",
"0.7675918",
"0.7654445",
"0.7654445",
"0.76499623",
"0.76493454",
"0.7642538",
"0.763014",
"0.763014",
"0.7622661",
"0.7620891",
"0.7619195",
"0.7617959",
"0.76097995",
"0.76030886",
"0.76030886",
"0.76030886"... | 0.0 | -1 |
__lt__(self, r) > bool | def __lt__(self, *args):
return _ida_hexrays.ccases_t___lt__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __lt__(self, other: t.Any) -> bool:\n return self._op_bool('__lt__', other)",
"def __lt__(self, other):\n return self <= other and self != other",
"def __lt__(self, other):\n return self <= other and self != other",
"def __lt__(self, other):\n return True",
"def __lt__(self,... | [
"0.7905341",
"0.78158313",
"0.78158313",
"0.77416617",
"0.77416617",
"0.7702155",
"0.7694993",
"0.76391506",
"0.7591238",
"0.7563725",
"0.75326097",
"0.7518938",
"0.7510669",
"0.7503784",
"0.74992245",
"0.7483631",
"0.747919",
"0.7445643",
"0.7430462",
"0.74154854",
"0.741180... | 0.0 | -1 |
__le__(self, r) > bool | def __le__(self, *args):
return _ida_hexrays.ccases_t___le__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __le__(self, other: t.Any) -> bool:\n return self._op_bool('__le__', other)",
"def __le__(self, rs):\n Number.comparisons += 1\n result = self.data <= rs.data\n return result",
"def __le__(self, other):\n return True",
"def __le__(self, other):\n return self.... | [
"0.77986604",
"0.7577342",
"0.7467504",
"0.73853964",
"0.7308148",
"0.73060477",
"0.720586",
"0.720586",
"0.71718043",
"0.715179",
"0.7143629",
"0.711954",
"0.70886385",
"0.7087308",
"0.70672",
"0.70517457",
"0.7045276",
"0.701166",
"0.70088524",
"0.6999618",
"0.6956948",
"... | 0.0 | -1 |
__ge__(self, r) > bool | def __ge__(self, *args):
return _ida_hexrays.ccases_t___ge__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ge__(self, other: t.Any) -> bool:\n return self._op_bool('__ge__', other)",
"def __ge__(self, other):\n return other <= self",
"def __ge__(self, other):\n return int(self.rank) >= int(other.rank)",
"def __ge__(self, other):\n return not (self < other)",
"def __ge__(self, o... | [
"0.7167667",
"0.70841575",
"0.7023326",
"0.69555193",
"0.69555193",
"0.6932944",
"0.69310296",
"0.69214845",
"0.69070655",
"0.6906734",
"0.68468964",
"0.68468964",
"0.68435806",
"0.68345803",
"0.6802651",
"0.6797466",
"0.6782855",
"0.67784584",
"0.6756027",
"0.6756027",
"0.67... | 0.0 | -1 |
__eq__(self, r) > bool | def __eq__(self, *args):
return _ida_hexrays.cswitch_t___eq__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other: t.Any) -> bool:\n return self._op_bool('__eq__', other)",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n ... | [
"0.7779506",
"0.74503726",
"0.74503726",
"0.74503726",
"0.74503726",
"0.74503726",
"0.74503726",
"0.74503726",
"0.74503726",
"0.74503726",
"0.74503726",
"0.74503726",
"0.74503726",
"0.74503726",
"0.74503726",
"0.74503726",
"0.74503726",
"0.74503726",
"0.74503726",
"0.74503726",... | 0.0 | -1 |
__ne__(self, r) > bool | def __ne__(self, *args):
return _ida_hexrays.cswitch_t___ne__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__(self, other):\n return bool(self != other)",
"def __ne__(self, other: t.Any) -> bool:\n return self._op_bool('__ne__', other)",
"def __ne__(self, other):\n return not self == other",
"def __ne__(self, rhs):\n return not self.__eq__(rhs)",
"def __ne__(self, other):\n ... | [
"0.7844342",
"0.7825789",
"0.7769457",
"0.7741587",
"0.76898223",
"0.7675918",
"0.7654445",
"0.7654445",
"0.76499623",
"0.76493454",
"0.7642538",
"0.763014",
"0.763014",
"0.7622661",
"0.7620891",
"0.7619195",
"0.7617959",
"0.76097995",
"0.76030886",
"0.76030886",
"0.76030886"... | 0.0 | -1 |
__lt__(self, r) > bool | def __lt__(self, *args):
return _ida_hexrays.cswitch_t___lt__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __lt__(self, other: t.Any) -> bool:\n return self._op_bool('__lt__', other)",
"def __lt__(self, other):\n return self <= other and self != other",
"def __lt__(self, other):\n return self <= other and self != other",
"def __lt__(self, other):\n return True",
"def __lt__(self,... | [
"0.7905341",
"0.78158313",
"0.78158313",
"0.77416617",
"0.77416617",
"0.7702155",
"0.7694993",
"0.76391506",
"0.7591238",
"0.7563725",
"0.75326097",
"0.7518938",
"0.7510669",
"0.7503784",
"0.74992245",
"0.7483631",
"0.747919",
"0.7445643",
"0.7430462",
"0.74154854",
"0.741180... | 0.0 | -1 |
__le__(self, r) > bool | def __le__(self, *args):
return _ida_hexrays.cswitch_t___le__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __le__(self, other: t.Any) -> bool:\n return self._op_bool('__le__', other)",
"def __le__(self, rs):\n Number.comparisons += 1\n result = self.data <= rs.data\n return result",
"def __le__(self, other):\n return True",
"def __le__(self, other):\n return self.... | [
"0.7798137",
"0.7577633",
"0.7467963",
"0.7385524",
"0.7308491",
"0.7305665",
"0.72064835",
"0.72064835",
"0.71716803",
"0.7152118",
"0.7144026",
"0.71190995",
"0.70895505",
"0.70872766",
"0.70674807",
"0.7051491",
"0.7045304",
"0.7011811",
"0.7008791",
"0.700012",
"0.6957237... | 0.0 | -1 |
__ge__(self, r) > bool | def __ge__(self, *args):
return _ida_hexrays.cswitch_t___ge__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ge__(self, other: t.Any) -> bool:\n return self._op_bool('__ge__', other)",
"def __ge__(self, other):\n return other <= self",
"def __ge__(self, other):\n return int(self.rank) >= int(other.rank)",
"def __ge__(self, other):\n return not (self < other)",
"def __ge__(self, o... | [
"0.7167667",
"0.70841575",
"0.7023326",
"0.69555193",
"0.69555193",
"0.6932944",
"0.69310296",
"0.69214845",
"0.69070655",
"0.6906734",
"0.68468964",
"0.68468964",
"0.68435806",
"0.68345803",
"0.6802651",
"0.6797466",
"0.6782855",
"0.67784584",
"0.6756027",
"0.6756027",
"0.67... | 0.0 | -1 |
__eq__(self, r) > bool | def __eq__(self, *args):
return _ida_hexrays.ctext_position_t___eq__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__(self, other: t.Any) -> bool:\n return self._op_bool('__eq__', other)",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n ... | [
"0.77788925",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
"0.7449351",
... | 0.0 | -1 |
__ne__(self, r) > bool | def __ne__(self, *args):
return _ida_hexrays.ctext_position_t___ne__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__(self, other):\n return bool(self != other)",
"def __ne__(self, other: t.Any) -> bool:\n return self._op_bool('__ne__', other)",
"def __ne__(self, other):\n return not self == other",
"def __ne__(self, rhs):\n return not self.__eq__(rhs)",
"def __ne__(self, other):\n ... | [
"0.7844479",
"0.7825962",
"0.7769556",
"0.77416927",
"0.76899755",
"0.76760143",
"0.7654571",
"0.7654571",
"0.76501215",
"0.76495004",
"0.76426584",
"0.76302665",
"0.76302665",
"0.7622787",
"0.7621023",
"0.7619318",
"0.76180923",
"0.7609926",
"0.7603214",
"0.7603214",
"0.7603... | 0.0 | -1 |
__lt__(self, r) > bool | def __lt__(self, *args):
return _ida_hexrays.ctext_position_t___lt__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __lt__(self, other: t.Any) -> bool:\n return self._op_bool('__lt__', other)",
"def __lt__(self, other):\n return self <= other and self != other",
"def __lt__(self, other):\n return self <= other and self != other",
"def __lt__(self, other):\n return True",
"def __lt__(self,... | [
"0.7905341",
"0.78158313",
"0.78158313",
"0.77416617",
"0.77416617",
"0.7702155",
"0.7694993",
"0.76391506",
"0.7591238",
"0.7563725",
"0.75326097",
"0.7518938",
"0.7510669",
"0.7503784",
"0.74992245",
"0.7483631",
"0.747919",
"0.7445643",
"0.7430462",
"0.74154854",
"0.741180... | 0.0 | -1 |
__le__(self, r) > bool | def __le__(self, *args):
return _ida_hexrays.ctext_position_t___le__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __le__(self, other: t.Any) -> bool:\n return self._op_bool('__le__', other)",
"def __le__(self, rs):\n Number.comparisons += 1\n result = self.data <= rs.data\n return result",
"def __le__(self, other):\n return True",
"def __le__(self, other):\n return self.... | [
"0.77986604",
"0.7577342",
"0.7467504",
"0.73853964",
"0.7308148",
"0.73060477",
"0.720586",
"0.720586",
"0.71718043",
"0.715179",
"0.7143629",
"0.711954",
"0.70886385",
"0.7087308",
"0.70672",
"0.70517457",
"0.7045276",
"0.701166",
"0.70088524",
"0.6999618",
"0.6956948",
"... | 0.0 | -1 |
__ge__(self, r) > bool | def __ge__(self, *args):
return _ida_hexrays.ctext_position_t___ge__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ge__(self, other: t.Any) -> bool:\n return self._op_bool('__ge__', other)",
"def __ge__(self, other):\n return other <= self",
"def __ge__(self, other):\n return int(self.rank) >= int(other.rank)",
"def __ge__(self, other):\n return not (self < other)",
"def __ge__(self, o... | [
"0.71677643",
"0.7084583",
"0.7023936",
"0.69559306",
"0.69559306",
"0.6933425",
"0.69315404",
"0.69221616",
"0.690757",
"0.69066805",
"0.684724",
"0.684724",
"0.6843821",
"0.6833953",
"0.6803233",
"0.6796801",
"0.6783216",
"0.67788696",
"0.67565554",
"0.67565554",
"0.6742595... | 0.0 | -1 |
__init__(self, _lnnum=1, _x=0, _y=0) > ctext_position_t | def __init__(self, *args):
this = _ida_hexrays.new_ctext_position_t(*args)
try: self.this.append(this)
except: self.this = this | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, text, font, pos, color=(255, 255, 255)):\r\n self.pos = pos\r\n self.label = font.render(text, 1, color)",
"def __init__(self, text, pos=(0, 0), anchor='ll',\n size=16,\n sizeUnits=POINT_UNITS,\n color=(1, 0, 1, 1),\n dpi=None,\n ... | [
"0.7255587",
"0.68978816",
"0.6864152",
"0.68434924",
"0.68255",
"0.6734233",
"0.6709276",
"0.6634243",
"0.65613306",
"0.6540824",
"0.65100336",
"0.6503012",
"0.63144004",
"0.63059163",
"0.62928456",
"0.62691706",
"0.62518114",
"0.6251225",
"0.62153643",
"0.6215251",
"0.62038... | 0.7375284 | 0 |
__init__(self, _ea=BADADDR, _lnnum=1, _x=0, _y=0) > history_item_t __init__(self, _ea, p) > history_item_t | def __init__(self, *args):
this = _ida_hexrays.new_history_item_t(*args)
try: self.this.append(this)
except: self.this = this | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, *args):\n this = _ida_hexrays.new_qvector_history_t(*args)\n try: self.this.append(this)\n except: self.this = this",
"def __init__(self, history=None):\n\n self.__history = history if history else []",
"def __init__(self):\n\t\tself.state = None\n\t\tself.info = ... | [
"0.6599135",
"0.65666574",
"0.64709496",
"0.63318276",
"0.6328906",
"0.61777544",
"0.61699814",
"0.6158266",
"0.6110451",
"0.6110451",
"0.6110451",
"0.6110451",
"0.6110451",
"0.6110451",
"0.6110451",
"0.6110451",
"0.6110451",
"0.6110451",
"0.6110451",
"0.6110451",
"0.6110451"... | 0.7512953 | 0 |
__eq__(self, p) > bool | def __eq__(self, *args):
return _ida_hexrays.user_numforms_iterator_t___eq__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__ (self, p):\n\n return self.is_equal (p)",
"def __eq__(self, other: t.Any) -> bool:\n return self._op_bool('__eq__', other)",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def ... | [
"0.7863027",
"0.77384114",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
... | 0.0 | -1 |
__ne__(self, p) > bool | def __ne__(self, *args):
return _ida_hexrays.user_numforms_iterator_t___ne__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__ (self, p):\n\n return not (self == p)",
"def __ne__(self, other: t.Any) -> bool:\n return self._op_bool('__ne__', other)",
"def __ne__(self, other):\n return not self == other",
"def __ne__(self, other):\n return bool(self != other)",
"def __ne__(self, other):\n return... | [
"0.8141928",
"0.78985167",
"0.78824073",
"0.7868116",
"0.7790519",
"0.77788985",
"0.7716537",
"0.7716537",
"0.7706591",
"0.77016544",
"0.76837146",
"0.7679084",
"0.7674308",
"0.7674308",
"0.7672989",
"0.7664032",
"0.7657252",
"0.7651088",
"0.7651088",
"0.7651088",
"0.76491",
... | 0.0 | -1 |
user_numforms_new() > user_numforms_t Create a new user_numforms_t instance. | def user_numforms_new(*args):
return _ida_hexrays.user_numforms_new(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def user_numforms_free(*args):\n return _ida_hexrays.user_numforms_free(*args)",
"def user_numforms_insert(*args):\n return _ida_hexrays.user_numforms_insert(*args)",
"def user_numforms_begin(*args):\n return _ida_hexrays.user_numforms_begin(*args)",
"def save_user_numforms(*args):\n return _ida_hexrays.... | [
"0.6098366",
"0.60719097",
"0.58730876",
"0.5636588",
"0.5429101",
"0.54159254",
"0.5299289",
"0.51693016",
"0.51615673",
"0.5160018",
"0.51528066",
"0.5117614",
"0.50957614",
"0.5093277",
"0.495983",
"0.49414724",
"0.49358198",
"0.491261",
"0.4903456",
"0.4892778",
"0.483455... | 0.79127616 | 0 |
__eq__(self, p) > bool | def __eq__(self, *args):
return _ida_hexrays.lvar_mapping_iterator_t___eq__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__ (self, p):\n\n return self.is_equal (p)",
"def __eq__(self, other: t.Any) -> bool:\n return self._op_bool('__eq__', other)",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def ... | [
"0.7863027",
"0.77384114",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
... | 0.0 | -1 |
__ne__(self, p) > bool | def __ne__(self, *args):
return _ida_hexrays.lvar_mapping_iterator_t___ne__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__ (self, p):\n\n return not (self == p)",
"def __ne__(self, other: t.Any) -> bool:\n return self._op_bool('__ne__', other)",
"def __ne__(self, other):\n return not self == other",
"def __ne__(self, other):\n return bool(self != other)",
"def __ne__(self, other):\n return... | [
"0.8142405",
"0.7899022",
"0.78836006",
"0.7868903",
"0.7791738",
"0.77794397",
"0.7717796",
"0.7717796",
"0.77078485",
"0.7702171",
"0.76849914",
"0.7680375",
"0.767555",
"0.767555",
"0.76743376",
"0.76653206",
"0.7658477",
"0.7652359",
"0.7652359",
"0.7652359",
"0.7650021",... | 0.0 | -1 |
lvar_mapping_end(map) > lvar_mapping_iterator_t Get iterator pointing to the end of lvar_mapping_t. | def lvar_mapping_end(*args):
return _ida_hexrays.lvar_mapping_end(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lvar_mapping_next(*args):\n return _ida_hexrays.lvar_mapping_next(*args)",
"def __iter__(self):\n\t\tfor nt in SeqVector.rev_mapping:\n\t\t\tyield nt",
"def dd_end_value_map_nb(record, ts):\n return ts[record['end_idx'], record['col']]",
"def _chain_map_iter(self):\n d = {}\n for mapping in rev... | [
"0.6025343",
"0.53944457",
"0.537682",
"0.514549",
"0.50348234",
"0.50068396",
"0.49802345",
"0.4901744",
"0.4872375",
"0.48562",
"0.48412657",
"0.4826122",
"0.47656602",
"0.47462615",
"0.47285524",
"0.4723876",
"0.47221154",
"0.47012916",
"0.4697325",
"0.4697325",
"0.4695077... | 0.6863445 | 0 |
lvar_mapping_new() > lvar_mapping_t Create a new lvar_mapping_t instance. | def lvar_mapping_new(*args):
return _ida_hexrays.lvar_mapping_new(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def map_lvar(self, *args):\n return _ida_hexrays.vdui_t_map_lvar(self, *args)",
"def new():\n return ResearchMap()",
"def __init__(self, default_value, map_ptr=None):\n\n if map_ptr is None:\n self.map = ipset.ipmap_new(default_value)\n else:\n self.map = map_ptr",... | [
"0.58431196",
"0.5741774",
"0.5660313",
"0.5650138",
"0.5572544",
"0.54659706",
"0.54440874",
"0.54397255",
"0.54090315",
"0.53901225",
"0.53690016",
"0.5365605",
"0.53519535",
"0.5323369",
"0.53185856",
"0.5290653",
"0.5272816",
"0.52679574",
"0.5265331",
"0.5257685",
"0.525... | 0.81657606 | 0 |
__eq__(self, p) > bool | def __eq__(self, *args):
return _ida_hexrays.udcall_map_iterator_t___eq__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__ (self, p):\n\n return self.is_equal (p)",
"def __eq__(self, other: t.Any) -> bool:\n return self._op_bool('__eq__', other)",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def ... | [
"0.7863027",
"0.77384114",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
... | 0.0 | -1 |
__ne__(self, p) > bool | def __ne__(self, *args):
return _ida_hexrays.udcall_map_iterator_t___ne__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__ (self, p):\n\n return not (self == p)",
"def __ne__(self, other: t.Any) -> bool:\n return self._op_bool('__ne__', other)",
"def __ne__(self, other):\n return not self == other",
"def __ne__(self, other):\n return bool(self != other)",
"def __ne__(self, other):\n return... | [
"0.8141928",
"0.78985167",
"0.78824073",
"0.7868116",
"0.7790519",
"0.77788985",
"0.7716537",
"0.7716537",
"0.7706591",
"0.77016544",
"0.76837146",
"0.7679084",
"0.7674308",
"0.7674308",
"0.7672989",
"0.7664032",
"0.7657252",
"0.7651088",
"0.7651088",
"0.7651088",
"0.76491",
... | 0.0 | -1 |
__eq__(self, p) > bool | def __eq__(self, *args):
return _ida_hexrays.user_cmts_iterator_t___eq__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__ (self, p):\n\n return self.is_equal (p)",
"def __eq__(self, other: t.Any) -> bool:\n return self._op_bool('__eq__', other)",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def ... | [
"0.7863027",
"0.77384114",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
... | 0.0 | -1 |
__ne__(self, p) > bool | def __ne__(self, *args):
return _ida_hexrays.user_cmts_iterator_t___ne__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__ (self, p):\n\n return not (self == p)",
"def __ne__(self, other: t.Any) -> bool:\n return self._op_bool('__ne__', other)",
"def __ne__(self, other):\n return not self == other",
"def __ne__(self, other):\n return bool(self != other)",
"def __ne__(self, other):\n return... | [
"0.8142405",
"0.7899022",
"0.78836006",
"0.7868903",
"0.7791738",
"0.77794397",
"0.7717796",
"0.7717796",
"0.77078485",
"0.7702171",
"0.76849914",
"0.7680375",
"0.767555",
"0.767555",
"0.76743376",
"0.76653206",
"0.7658477",
"0.7652359",
"0.7652359",
"0.7652359",
"0.7650021",... | 0.0 | -1 |
__eq__(self, p) > bool | def __eq__(self, *args):
return _ida_hexrays.user_iflags_iterator_t___eq__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__ (self, p):\n\n return self.is_equal (p)",
"def __eq__(self, other: t.Any) -> bool:\n return self._op_bool('__eq__', other)",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def ... | [
"0.7863027",
"0.77384114",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
... | 0.0 | -1 |
__ne__(self, p) > bool | def __ne__(self, *args):
return _ida_hexrays.user_iflags_iterator_t___ne__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__ (self, p):\n\n return not (self == p)",
"def __ne__(self, other: t.Any) -> bool:\n return self._op_bool('__ne__', other)",
"def __ne__(self, other):\n return not self == other",
"def __ne__(self, other):\n return bool(self != other)",
"def __ne__(self, other):\n return... | [
"0.8141928",
"0.78985167",
"0.78824073",
"0.7868116",
"0.7790519",
"0.77788985",
"0.7716537",
"0.7716537",
"0.7706591",
"0.77016544",
"0.76837146",
"0.7679084",
"0.7674308",
"0.7674308",
"0.7672989",
"0.7664032",
"0.7657252",
"0.7651088",
"0.7651088",
"0.7651088",
"0.76491",
... | 0.0 | -1 |
user_iflags_new() > user_iflags_t Create a new user_iflags_t instance. | def user_iflags_new(*args):
return _ida_hexrays.user_iflags_new(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def user_iflags_insert(*args):\n return _ida_hexrays.user_iflags_insert(*args)",
"def at(self, *args):\n return _ida_hexrays.user_iflags_t_at(self, *args)",
"def new(\n cls,\n exp: int = 0,\n include_iat: bool = False,\n leeway: int = 0,\n ):\n return cls(exp, incl... | [
"0.6192602",
"0.59686244",
"0.5927591",
"0.57910085",
"0.57686317",
"0.57230294",
"0.5718222",
"0.5711084",
"0.5708419",
"0.56931096",
"0.56923854",
"0.5688823",
"0.56874454",
"0.5685491",
"0.56783366",
"0.56634396",
"0.5655805",
"0.5651481",
"0.56492305",
"0.5644233",
"0.563... | 0.79064083 | 0 |
__eq__(self, p) > bool | def __eq__(self, *args):
return _ida_hexrays.user_unions_iterator_t___eq__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__ (self, p):\n\n return self.is_equal (p)",
"def __eq__(self, other: t.Any) -> bool:\n return self._op_bool('__eq__', other)",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def ... | [
"0.7863027",
"0.77384114",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
... | 0.0 | -1 |
__ne__(self, p) > bool | def __ne__(self, *args):
return _ida_hexrays.user_unions_iterator_t___ne__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__ (self, p):\n\n return not (self == p)",
"def __ne__(self, other: t.Any) -> bool:\n return self._op_bool('__ne__', other)",
"def __ne__(self, other):\n return not self == other",
"def __ne__(self, other):\n return bool(self != other)",
"def __ne__(self, other):\n return... | [
"0.8142405",
"0.7899022",
"0.78836006",
"0.7868903",
"0.7791738",
"0.77794397",
"0.7717796",
"0.7717796",
"0.77078485",
"0.7702171",
"0.76849914",
"0.7680375",
"0.767555",
"0.767555",
"0.76743376",
"0.76653206",
"0.7658477",
"0.7652359",
"0.7652359",
"0.7652359",
"0.7650021",... | 0.0 | -1 |
__eq__(self, p) > bool | def __eq__(self, *args):
return _ida_hexrays.user_labels_iterator_t___eq__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__ (self, p):\n\n return self.is_equal (p)",
"def __eq__(self, other: t.Any) -> bool:\n return self._op_bool('__eq__', other)",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def ... | [
"0.7863027",
"0.77384114",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
... | 0.0 | -1 |
__ne__(self, p) > bool | def __ne__(self, *args):
return _ida_hexrays.user_labels_iterator_t___ne__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__ (self, p):\n\n return not (self == p)",
"def __ne__(self, other: t.Any) -> bool:\n return self._op_bool('__ne__', other)",
"def __ne__(self, other):\n return not self == other",
"def __ne__(self, other):\n return bool(self != other)",
"def __ne__(self, other):\n return... | [
"0.8142405",
"0.7899022",
"0.78836006",
"0.7868903",
"0.7791738",
"0.77794397",
"0.7717796",
"0.7717796",
"0.77078485",
"0.7702171",
"0.76849914",
"0.7680375",
"0.767555",
"0.767555",
"0.76743376",
"0.76653206",
"0.7658477",
"0.7652359",
"0.7652359",
"0.7652359",
"0.7650021",... | 0.0 | -1 |
user_labels_begin(map) > user_labels_iterator_t Get iterator pointing to the beginning of user_labels_t. | def user_labels_begin(*args):
return _ida_hexrays.user_labels_begin(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def user_labels_next(*args):\n return _ida_hexrays.user_labels_next(*args)",
"def iter_keypoints_labels(self):\n return iter(self.schema)",
"def user_labels(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:\n return pulumi.get(self, \"user_labels\")",
"def get_iterator(self) ->... | [
"0.60157233",
"0.5932349",
"0.56595165",
"0.56318957",
"0.5626946",
"0.5452652",
"0.5368978",
"0.5227811",
"0.52009624",
"0.51804733",
"0.51672137",
"0.5138212",
"0.50949967",
"0.5013706",
"0.499824",
"0.49971193",
"0.4990956",
"0.49721715",
"0.49461454",
"0.49366945",
"0.492... | 0.59398794 | 1 |
user_labels_new() > user_labels_t Create a new user_labels_t instance. | def user_labels_new(*args):
return _ida_hexrays.user_labels_new(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkLabelStatisticsImageFilterIUC3IUC3.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkLabelStatisticsImageFilterIUC2IUC2.__New_orig__()\n import itkTemplate\n ... | [
"0.6193531",
"0.61931556",
"0.61218536",
"0.6110759",
"0.607392",
"0.60636437",
"0.60495627",
"0.6039493",
"0.60348177",
"0.60309166",
"0.5999345",
"0.598637",
"0.5924392",
"0.591336",
"0.59054875",
"0.5902214",
"0.5900015",
"0.58728915",
"0.5824617",
"0.5813525",
"0.5793767"... | 0.7732365 | 0 |
__eq__(self, p) > bool | def __eq__(self, *args):
return _ida_hexrays.eamap_iterator_t___eq__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__ (self, p):\n\n return self.is_equal (p)",
"def __eq__(self, other: t.Any) -> bool:\n return self._op_bool('__eq__', other)",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def ... | [
"0.7863027",
"0.77384114",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
... | 0.0 | -1 |
__ne__(self, p) > bool | def __ne__(self, *args):
return _ida_hexrays.eamap_iterator_t___ne__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__ (self, p):\n\n return not (self == p)",
"def __ne__(self, other: t.Any) -> bool:\n return self._op_bool('__ne__', other)",
"def __ne__(self, other):\n return not self == other",
"def __ne__(self, other):\n return bool(self != other)",
"def __ne__(self, other):\n return... | [
"0.8142405",
"0.7899022",
"0.78836006",
"0.7868903",
"0.7791738",
"0.77794397",
"0.7717796",
"0.7717796",
"0.77078485",
"0.7702171",
"0.76849914",
"0.7680375",
"0.767555",
"0.767555",
"0.76743376",
"0.76653206",
"0.7658477",
"0.7652359",
"0.7652359",
"0.7652359",
"0.7650021",... | 0.0 | -1 |
eamap_begin(map) > eamap_iterator_t Get iterator pointing to the beginning of eamap_t. | def eamap_begin(*args):
return _ida_hexrays.eamap_begin(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def map_iterator(self):\n # Starts in top left corner of map.\n self.x = 0\n self.y = 0\n\n # For each cell in the map yields the object.\n while True:\n if self.y >= 1:\n self.top = self.array_map[self.y-1, self.x]\n else:\n se... | [
"0.6154988",
"0.6047692",
"0.58878464",
"0.56938195",
"0.569217",
"0.5641127",
"0.5637486",
"0.5615983",
"0.5583757",
"0.55315214",
"0.5476557",
"0.5440464",
"0.54213065",
"0.53906184",
"0.5331062",
"0.5319072",
"0.53129476",
"0.5307145",
"0.53020465",
"0.5272341",
"0.5261744... | 0.6128847 | 1 |
eamap_end(map) > eamap_iterator_t Get iterator pointing to the end of eamap_t. | def eamap_end(*args):
return _ida_hexrays.eamap_end(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def end_iter(self):\n raise NotImplementedError",
"def map_iterator(self):\n # Starts in top left corner of map.\n self.x = 0\n self.y = 0\n\n # For each cell in the map yields the object.\n while True:\n if self.y >= 1:\n self.top = self.array_... | [
"0.5907479",
"0.5762837",
"0.56739706",
"0.5629403",
"0.549326",
"0.54352653",
"0.54065484",
"0.53939396",
"0.5352076",
"0.5288489",
"0.5282474",
"0.5263086",
"0.5177013",
"0.51468813",
"0.51340795",
"0.5127651",
"0.5107686",
"0.5100233",
"0.50980324",
"0.50740796",
"0.506579... | 0.6229783 | 0 |
__eq__(self, p) > bool | def __eq__(self, *args):
return _ida_hexrays.boundaries_iterator_t___eq__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __eq__ (self, p):\n\n return self.is_equal (p)",
"def __eq__(self, other: t.Any) -> bool:\n return self._op_bool('__eq__', other)",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def __eq__(self,*args):\r\n pass",
"def ... | [
"0.7863027",
"0.77384114",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
"0.7568101",
... | 0.0 | -1 |
__ne__(self, p) > bool | def __ne__(self, *args):
return _ida_hexrays.boundaries_iterator_t___ne__(self, *args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__ (self, p):\n\n return not (self == p)",
"def __ne__(self, other: t.Any) -> bool:\n return self._op_bool('__ne__', other)",
"def __ne__(self, other):\n return not self == other",
"def __ne__(self, other):\n return bool(self != other)",
"def __ne__(self, other):\n return... | [
"0.8142405",
"0.7899022",
"0.78836006",
"0.7868903",
"0.7791738",
"0.77794397",
"0.7717796",
"0.7717796",
"0.77078485",
"0.7702171",
"0.76849914",
"0.7680375",
"0.767555",
"0.767555",
"0.76743376",
"0.76653206",
"0.7658477",
"0.7652359",
"0.7652359",
"0.7652359",
"0.7650021",... | 0.0 | -1 |
boundaries_new() > boundaries_t Create a new boundaries_t instance. | def boundaries_new(*args):
return _ida_hexrays.boundaries_new(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_bounds(self):\n # Bounds should be created for\n x0, y0 = (0, 0)\n x1 = self.game_area_size[0]\n y1 = self.game_area_size[1]\n space = self.space\n\n borders = [\n phy.Segment(space.static_body, phy.Vec2d(x0, y0), phy.Vec2d(x1, y0), 0),\n p... | [
"0.6411798",
"0.60740376",
"0.59593606",
"0.58497936",
"0.5794572",
"0.5749247",
"0.5741454",
"0.57374614",
"0.5718702",
"0.57123095",
"0.5666445",
"0.5568558",
"0.5550684",
"0.54673976",
"0.5439651",
"0.54322195",
"0.5427456",
"0.5407609",
"0.5375637",
"0.535946",
"0.535232"... | 0.7541804 | 0 |
return a dictionary with the operands of a cexpr_t. | def cexpr_operands(self):
if self.op >= cot_comma and self.op <= cot_asgumod or \
self.op >= cot_lor and self.op <= cot_fdiv or \
self.op == cot_idx:
return {'x': self.x, 'y': self.y}
elif self.op == cot_tern:
return {'x': self.x, 'y': self.y, 'z': self.z}
elif self.op in ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def operator_dict(self, index, vars, **kw):\n out = defaultdict(int)\n ops = self.operator_form(index)\n op0 = self.args[0].operator_dict(index, vars, **kw)\n for var in op0:\n out[var] = ops * op0[var]\n return out",
"def operator_dict(self, index, vars, **kw):\n ... | [
"0.6165709",
"0.59159356",
"0.5810939",
"0.5738142",
"0.5623414",
"0.561574",
"0.55434257",
"0.5542576",
"0.55378324",
"0.54807687",
"0.54774106",
"0.5442495",
"0.5385512",
"0.5282035",
"0.52624923",
"0.52164584",
"0.5192746",
"0.5181952",
"0.5174806",
"0.51718485",
"0.514057... | 0.8214502 | 0 |
Place the simple GUI objects in the frame. | def place_main_gui(self):
cont = self.container
self.title = ttk.Label(cont, text='Detaliile contului')
self.title.config(font=tkg.title_font())
self.title.grid(row=0, column=0, sticky='w', pady=(30, 0))
self.label1 = ttk.Label(cont, text='Nume cont')
self.label1.config(font=tkg.regular_font()... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def initGUI(self):\n\n\t\t# Set main frame's location \n\t\tself.grid(row=0, column=0, sticky=\"nsew\")\n\n\t\t# Set path entry frame and its location\n\t\tself.entryFrame = Frame(self, relief = RAISED, borderwidth = 1)\n\t\tself.entryFrame.pack(fill = BOTH, expand = False)\n\t\t# Make label\n\t\tif self.message:\... | [
"0.7388001",
"0.7273676",
"0.7248197",
"0.71242434",
"0.70948267",
"0.7011984",
"0.6965228",
"0.69642955",
"0.69556314",
"0.69524395",
"0.69481933",
"0.6931533",
"0.69155073",
"0.6915445",
"0.68064654",
"0.67944086",
"0.67663765",
"0.6765359",
"0.67495877",
"0.67480594",
"0.6... | 0.64498186 | 58 |
Place the buttonrelated GUI in the frame. | def place_button_gui(self):
cont = self.container
# This container is used for centering.
but_cont = ttk.Frame(cont)
but_cont.grid(row=10, column=0, sticky='ew')
tku.prepare_centering(but_cont)
# This container actually holds the buttons.
but_cont2 = ttk.Frame(but_cont)
but_cont2.grid(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def place_button_gui(self):\n cont = self.container\n\n style = ttk.Style()\n style.configure('IDS.TButton', font=tkg.button_regular_font_tuple())\n\n self.choose_button = ttk.Button(cont, text='Alege fișierul')\n self.choose_button.config(style='IDS.TButton', command=self.choose_click)\n self.ch... | [
"0.7705946",
"0.7602936",
"0.7198896",
"0.7163624",
"0.7132068",
"0.7062062",
"0.6995572",
"0.696357",
"0.69413227",
"0.6934878",
"0.6920921",
"0.6884443",
"0.68796974",
"0.68721724",
"0.6866608",
"0.68623316",
"0.68578357",
"0.6836645",
"0.68279535",
"0.68257105",
"0.680893"... | 0.75186807 | 2 |
Return the beam.dat config file as a string. | def __str__(self) -> str:
theta, phi, _ = BeamConfig.cartesian2spherical(self.beam_dir)
# if energy cutoffs are defined, add them to the template
cutoff_line = "! no energy cutoffs"
if self.energy_low_cutoff is not None and self.energy_high_cutoff is not None:
cutoff_line = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def config_file_and_path():\n return str(rmfriend_dir() / 'config.cfg')",
"def get_config_contents() -> str:\n config_file = os.environ.get(\"PYP_CONFIG_PATH\")\n if config_file is None:\n return \"\"\n try:\n with open(config_file, \"r\") as f:\n return f.read()\n except ... | [
"0.67948276",
"0.67885244",
"0.6748939",
"0.6638524",
"0.6604488",
"0.65731186",
"0.6563476",
"0.64954084",
"0.62873656",
"0.6264118",
"0.6253758",
"0.6251915",
"0.62232965",
"0.62098426",
"0.6208868",
"0.62015295",
"0.6196287",
"0.616876",
"0.61334145",
"0.6099035",
"0.60950... | 0.0 | -1 |
Sets the learning rate to the initial LR decayed by 2 every 30 epochs | def adjust_learning_rate(optimizer, epoch, args):
lr = args.lr * (0.5 ** (epoch // 30))
for param_group in optimizer.param_groups:
param_group['lr'] = lr | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def adjust_learning_rate(init_lr, optimizer, epoch, n=100):\n init_lr = init_lr * (0.1 ** (epoch // n))\n print('learning rate : ', init_lr)\n for param_group in optimizer.param_groups:\n param_group['lr'] = init_lr",
"def adjust_learning_rate(start_lr, optimizer, epoch, total_epoch_num):\n #l... | [
"0.78915745",
"0.7808282",
"0.77982455",
"0.7688673",
"0.76783967",
"0.7676551",
"0.7668845",
"0.76678216",
"0.76477706",
"0.7647653",
"0.76368725",
"0.76366127",
"0.76347375",
"0.76231974",
"0.76082903",
"0.7602893",
"0.7602893",
"0.7602893",
"0.760192",
"0.7589814",
"0.7573... | 0.7588899 | 20 |
Convert a raw sample (pair of sentences as tokenized strings) into a proper training sample with IDs, LM labels, input_mask, CLS and SEP tokens etc. | def convert_example_to_features(example, max_seq_length, tokenizer):
tokens_a = example.tokens_a
tokens_b = example.tokens_b
# Modifies `tokens_a` and `tokens_b` in place so that the total
# length is less than the specified length.
# Account for [CLS], [SEP], [SEP] with "- 3"
_truncate_seq_pair... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def prepare_sample(self, sample_raw):\n\n text, mention, candidate = sample_raw\n self._logger.debug(f'Preprocessing sample (\"{mention}\" vs. \"{candidate}\")')\n\n sample = {}\n sample['text'] = text\n sample['text_tokenized'] = None # set by add_tokens()\n sample['text_... | [
"0.6766681",
"0.6642995",
"0.6457108",
"0.6116397",
"0.60629165",
"0.6062202",
"0.6062202",
"0.6050867",
"0.60118836",
"0.59970045",
"0.5972326",
"0.59713095",
"0.5933754",
"0.5933499",
"0.5929758",
"0.5913872",
"0.5886734",
"0.58794075",
"0.5876328",
"0.5858523",
"0.5853716"... | 0.6221072 | 3 |
Reinitializes the filter and clears old values and statistics | def clear(self):
self.n = 0
self.bv = BitVector.BitVector(size = self.m) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def reset_filter(self):\n arlen = len(self.variant_list)\n self.filter = np.zeros((arlen, arlen)) == 0",
"def reset_filters():\n logger.info(\"reset filters\")\n global filter_item\n filter_item = -1\n filter_topics_table.view.filters = [IndexFilter()]\n filter_custom_table.view.filt... | [
"0.76781356",
"0.7045722",
"0.68792367",
"0.67559785",
"0.6720422",
"0.66697234",
"0.666551",
"0.6664053",
"0.6582975",
"0.6575105",
"0.6558212",
"0.642559",
"0.6420767",
"0.6416399",
"0.6362432",
"0.63003474",
"0.62760353",
"0.62760353",
"0.6260936",
"0.62440974",
"0.6238764... | 0.0 | -1 |
Create and save a User with the given email and password. | def create_user(self, email, password, username, **extra_fields):
if not email:
raise ValueError(_('Email is required.'))
if not username:
raise ValueError(_('Username is required.'))
email = self.normalize_email(email)
username = username
user = self.mode... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _create_user(self, email, password, **extra_fields):\n if not email:\n raise ValueError('The given email must be set')\n email = self.normalize_email(email)\n user = self.model(email=email, **extra_fields)\n user.set_password(password)\n user.save(using=self._db)\n return user",
"def... | [
"0.85445017",
"0.8511888",
"0.850827",
"0.85025996",
"0.8502548",
"0.84896004",
"0.84896004",
"0.84888655",
"0.84888655",
"0.84888655",
"0.8486028",
"0.84772795",
"0.84767693",
"0.8475504",
"0.8475504",
"0.8475504",
"0.8475504",
"0.8475504",
"0.8475504",
"0.8475504",
"0.84755... | 0.8247157 | 59 |
Convert human readable duration format to minutes returns given string if nothing is found | def _convert_runtime(runtime):
regex = re.compile(
r"[-]?((?P<hours>\d+?)\s?hr)?\s?[-]?((?P<minutes>\d+?)\s?min)?"
)
parts = regex.match(runtime)
if not parts:
return runtime
parts = parts.groupdict()
time_params = {}
for (name, param) in p... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def minutes(duration):\n if not duration:\n return 0\n try:\n h, m, s = duration_parts(duration)\n return m\n except (ValueError, TypeError):\n return 0",
"def translate_duration_to_minutes(text, context=None):\n\n # define regex formats\n formats = ('^(\\d+)$', # matc... | [
"0.80426985",
"0.72610253",
"0.72295773",
"0.71966124",
"0.70907116",
"0.7056765",
"0.69551873",
"0.6906315",
"0.6817507",
"0.6779899",
"0.6765108",
"0.6655992",
"0.6610819",
"0.65762824",
"0.6572869",
"0.65518504",
"0.65081286",
"0.6498799",
"0.64903206",
"0.6488008",
"0.642... | 0.0 | -1 |
Makes a 2 element tuple from a string of integers in the tuple format | def get_tuple(self, string):
a = re.search('\((\d+\.\d+), (\d+\.\d+)\)', string)
if not a:
return None
else:
return (float(a.group(1)), float(a.group(2))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def str2tuple(str):\n pack = (int(str[1]), int(str[4]))\n return pack",
"def comma_list(s):\n\n return tuple(int(v) for v in s.split(\",\"))",
"def parseTupleList(self,string):\r\n string = string.replace(\"[\",\"\")\r\n string = string.replace(\"),\",\"*\")\r\n string = string.re... | [
"0.8038767",
"0.7333768",
"0.7117972",
"0.71143335",
"0.7107381",
"0.70407057",
"0.6879158",
"0.68416876",
"0.6826394",
"0.6816129",
"0.68132675",
"0.6810127",
"0.6795689",
"0.67897487",
"0.67790186",
"0.6741549",
"0.67083514",
"0.6692055",
"0.6669456",
"0.6659888",
"0.665685... | 0.6836447 | 8 |
Returns the rotation matrix of shape (3, 3) for an element. | def rotation_matrix(dx, dy, dz, roll=0):
l = (dx**2 + dy**2 + dz**2)**0.5
rx, ry, rz = dx / l, dy / l, dz / l
c, s = cos(-roll), sin(-roll)
if rx == 0 and rz == 0:
r = [[0, ry, 0], [-ry*c, 0, s], [ry*s, 0, c]]
else:
rxz = (rx**2 + rz**2)**0.5
r = [[rx, ry, rz],
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rotation_matrix(self):\n return self.affine_matrix[0:3][:, 0:3]",
"def rotation_mat(self) -> np.ndarray:\n rot = np.zeros((3, 3))\n\n txx = 2 * self.x * self.x\n tyy = 2 * self.y * self.y\n tzz = 2 * self.z * self.z\n twx = 2 * self.w * self.x\n twy = 2 * self... | [
"0.761014",
"0.73111653",
"0.7033288",
"0.7031671",
"0.68953496",
"0.688428",
"0.6874174",
"0.6873511",
"0.68469286",
"0.68436354",
"0.6793641",
"0.6787431",
"0.6752357",
"0.66979384",
"0.6688295",
"0.66804624",
"0.66382724",
"0.6629533",
"0.65988886",
"0.65662974",
"0.653390... | 0.0 | -1 |
Sets the x rotational fixities to free. Returns the element. | def mx_free(self):
self.imx_free = self.jmx_free = True
return self | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m_fixed(self):\n self.mx_free = self.my_free = self.mz_free = False\n return self",
"def f_fixed(self):\n self.fx_free = self.fy_free = self.fz_free = False\n return self",
"def i_free(self):\n self.imx_free = self.imy_free = self.imz_free = True\n return self",
... | [
"0.6551277",
"0.6356318",
"0.5825696",
"0.5753371",
"0.5536226",
"0.54877716",
"0.5370037",
"0.53256583",
"0.52885973",
"0.5249679",
"0.5229712",
"0.5174399",
"0.51569295",
"0.5128122",
"0.5114999",
"0.5083393",
"0.5083393",
"0.5043655",
"0.50374156",
"0.5030575",
"0.5014876"... | 0.5518487 | 5 |
Sets the y rotational fixities to free. Returns the element. | def my_free(self):
self.imy_free = self.jmy_free = True
return self | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rotate_y(self, angle: float):\n self.vertices = list(\n Matrix44.y_rotate(angle).transform_vertices(self.vertices)\n )\n return self",
"def rot_y_rad(self):\n return self._rot_y_rad",
"def f_fixed(self):\n self.fx_free = self.fy_free = self.fz_free = False\n ... | [
"0.5998094",
"0.59734464",
"0.5815733",
"0.57325864",
"0.56406343",
"0.5631679",
"0.56291234",
"0.56155765",
"0.560611",
"0.55634654",
"0.5563215",
"0.5549921",
"0.5547875",
"0.55466545",
"0.5527699",
"0.55110437",
"0.5505158",
"0.54950714",
"0.5490628",
"0.5477178",
"0.54659... | 0.54723483 | 20 |
Sets the z rotational fixities to free. Returns the element. | def mz_free(self):
self.imz_free = self.jmz_free = True
return self | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m_fixed(self):\n self.mx_free = self.my_free = self.mz_free = False\n return self",
"def f_fixed(self):\n self.fx_free = self.fy_free = self.fz_free = False\n return self",
"def reset(self):\n self.z[:] = 0",
"def flip_z(self):\n if self.z is None:\n r... | [
"0.62102133",
"0.6071663",
"0.58760405",
"0.57589835",
"0.56192344",
"0.5616704",
"0.5610354",
"0.558243",
"0.5485975",
"0.5414579",
"0.54139686",
"0.53922206",
"0.5381429",
"0.5370447",
"0.531194",
"0.531194",
"0.531194",
"0.52691984",
"0.5262487",
"0.5233349",
"0.5230674",
... | 0.6670429 | 0 |
If the unstressed length of the element is None, returns the initial distance between the nodes. If the unstressed length is a string, converts the string to a float and adds it to the initial distance between the nodes. Otherwise, returns the assigned unstressed length. | def get_unstr_length(self):
if self.unstr_length is None:
return self.length()
elif isinstance(self.unstr_length, str):
return self.length() + float(self.unstr_length)
return self.unstr_length | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def length(self, length: float | None, from_unit: str) -> float:\n if not isinstance(length, Number):\n raise TypeError(f\"{length!s} is not a numeric value.\")\n\n # type ignore: https://github.com/python/mypy/issues/7207\n return DistanceConverter.convert( # type: ignore[unreacha... | [
"0.6128455",
"0.58317924",
"0.57412094",
"0.57313323",
"0.56878966",
"0.56564057",
"0.5634167",
"0.5621677",
"0.5507544",
"0.54931486",
"0.54907554",
"0.544899",
"0.54243815",
"0.54227513",
"0.54110765",
"0.53688884",
"0.5353015",
"0.5334677",
"0.53054637",
"0.5298382",
"0.52... | 0.64600694 | 0 |
Returns the rotation matrix for the element. | def rotation_matrix(self, di=(0, 0, 0), dj=(0, 0, 0)):
xi, xj = self.get_nodes()
di, dj = np.asarray(di), np.asarray(dj)
dx, dy, dz = (xj - xi) + (dj - di)
return rotation_matrix(dx, dy, dz, self.roll) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def matrix(self):\n return self._rotation",
"def rotation_matrix(self):\n return self.affine_matrix[0:3][:, 0:3]",
"def rotation_matrix(self):\n self._normalise()\n product_matrix = np.dot(self._q_matrix(), self._q_bar_matrix().conj().transpose())\n return product_matrix[1:][... | [
"0.8179812",
"0.80210423",
"0.76315093",
"0.76279557",
"0.7407786",
"0.737595",
"0.734082",
"0.73290944",
"0.7294187",
"0.7242952",
"0.7242952",
"0.7242952",
"0.7242952",
"0.7242952",
"0.7242952",
"0.7242952",
"0.7242952",
"0.7242952",
"0.7242952",
"0.7242952",
"0.72087735",
... | 0.67099416 | 29 |
Returns the local stiffness for the element. | def local_stiffness(self, di=(0, 0, 0), dj=(0, 0, 0)):
group = self.group
sect = group.section
mat = group.material
return local_stiffness(
l=self.length(di, dj),
lu=self.get_unstr_length(),
a=sect.area,
ix=sect.inertia_x,
iy=s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_stiffness_matrix(self) -> NDArray:\n\n number_of_dofs = self.get_number_of_dofs()\n stiffness = np.zeros(\n (number_of_dofs, number_of_dofs), dtype=np.float64\n )\n\n for element in self.elements:\n dofs = element.get_node_dofs()\n element_global... | [
"0.6838944",
"0.6622516",
"0.61856157",
"0.59757286",
"0.5932162",
"0.5768979",
"0.553604",
"0.5408365",
"0.537238",
"0.5366357",
"0.53243333",
"0.52670497",
"0.5243291",
"0.52031624",
"0.5195651",
"0.51877826",
"0.51704496",
"0.5143563",
"0.5141295",
"0.5111147",
"0.5111147"... | 0.7071965 | 0 |
Returns a set of prime numbers | def prime_facts(primes, number):
facts = set()
sqr = number ** 0.5
for prime in primes:
if prime > sqr:
if number > 1:
facts.add(number)
break
while number % prime == 0:
facts.add(prime)
number /= prime
sqr = number... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_set_prime_numbers(number):\n prime_numbers = set()\n\n for i in range(2, number + 1):\n for j in prime_numbers:\n if i % j == 0:\n break\n else:\n prime_numbers.add(i)\n\n return prime_numbers",
"def allprimes():\n\n key = [] ... | [
"0.84881103",
"0.79361206",
"0.7824133",
"0.75345266",
"0.7401594",
"0.7326675",
"0.73191357",
"0.728027",
"0.7234031",
"0.72295433",
"0.7196974",
"0.71759236",
"0.71407676",
"0.71386",
"0.7115375",
"0.70830536",
"0.70818293",
"0.7075916",
"0.70608944",
"0.7057517",
"0.704023... | 0.7134187 | 14 |
Remove the character in the position before the cursor. | def backspace(self) -> None:
if self.index:
self.buffer.delete(self.index - 1)
self.index -= 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def delete_forward():\r\n point().delete_right_char()",
"def _(event):\n pos = line.document.find_start_of_previous_word(count=event.arg)\n if pos:\n deleted = line.delete_before_cursor(count=-pos)\n line.set_clipboard(ClipboardData(deleted))",
"def backspace(self):\n # ... | [
"0.71328014",
"0.7041028",
"0.68378866",
"0.6829483",
"0.6812172",
"0.68035907",
"0.65763193",
"0.64668834",
"0.6398066",
"0.6368608",
"0.6314864",
"0.62660575",
"0.6184384",
"0.61448556",
"0.6131795",
"0.61198735",
"0.60952973",
"0.6095145",
"0.6069236",
"0.6059314",
"0.6044... | 0.5969912 | 22 |
Move the cursor to the last line. | def move_to_last_line(self) -> None:
try:
end: int = len(self.buffer) - 1
last_line_start: int = self.buffer.reverse_index('\n', end=end) + 1
except ValueError:
return
last_line_length: int = len(self.buffer) - last_line_start
current_column: int = se... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def move_to_line_end(self) -> None:\n self.index = self.buffer.get_line_end(self.index)",
"def wrap_cursor_back(event):\n b = event.cli.current_buffer\n b.cursor_up(count=1)\n relative_end_index = b.document.get_end_of_line_position()\n b.cursor_right(count=relative_end_index)"... | [
"0.7918512",
"0.7326771",
"0.6876924",
"0.67210364",
"0.66234016",
"0.6583509",
"0.658213",
"0.6581754",
"0.6561129",
"0.6513853",
"0.6510354",
"0.6491283",
"0.64080024",
"0.6361265",
"0.63592076",
"0.6331155",
"0.6311168",
"0.6269242",
"0.6220367",
"0.62164176",
"0.6188842",... | 0.8410692 | 0 |
(tuple, list) > bool Checking is there a ship | def has_ship(coord, field):
row, column = int(coord[1]) - 1, ord(coord[0]) - 65
if field[row][column] == '*':
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def has_ship(data, coords):\n if type(data) != dict:\n print('Wrong type of first argument (data)')\n return None\n if type(coords) != tuple:\n print('Wrong type of second argument (coords)')\n return None\n x = ord(coords[0].upper()) - 64\n y = coords[1]\n if x < 1 or x ... | [
"0.7125581",
"0.70729244",
"0.68718714",
"0.6792041",
"0.6770831",
"0.67486507",
"0.6664164",
"0.6633691",
"0.65524715",
"0.6508609",
"0.64950764",
"0.64788",
"0.6472714",
"0.6471865",
"0.64116776",
"0.6366392",
"0.6362961",
"0.62587917",
"0.6257463",
"0.6249006",
"0.6202408"... | 0.6494634 | 11 |
Returns the class name | def myName(self) -> str:
return self.__class__.__name__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f_get_class_name(self):\n return self.__class__.__name__",
"def className(self):\n namevalue = self.__class__.__name__\n return str(namevalue)",
"def class_name(self) -> str:\n return pulumi.get(self, \"class_name\")",
"def class_name(cls):\n return cls.__name__",
"def cl... | [
"0.8908022",
"0.89064616",
"0.89009404",
"0.88914376",
"0.88914376",
"0.8832942",
"0.8811026",
"0.8711192",
"0.86973906",
"0.86786807",
"0.82181305",
"0.8157093",
"0.81386423",
"0.81182396",
"0.8022264",
"0.80005825",
"0.7988737",
"0.79858696",
"0.79546434",
"0.7945947",
"0.7... | 0.75312984 | 49 |
Tests retrieving an invalid column errors. | def test_frame_invalid_column(self):
with self.assertRaises(ValueError):
self.frame.take(100, columns=['not_in']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_extract_invalid_column(self):\n self.dicom.extract_keywords([\"invalid\"])\n\n # ensure column was added\n columns = self.dicom.metadata.column_names\n if u'invalid' not in columns:\n raise Exception(\"Invalid column not added\")\n\n # compare expected and act... | [
"0.7853014",
"0.77639055",
"0.7759377",
"0.7670591",
"0.7663709",
"0.7318448",
"0.72089297",
"0.7162334",
"0.71521616",
"0.70476097",
"0.70356756",
"0.7002442",
"0.690602",
"0.68965524",
"0.68737054",
"0.6867034",
"0.6826401",
"0.67993337",
"0.6783741",
"0.6772725",
"0.671952... | 0.7244427 | 6 |
Returns the default groups container | def _getGroupDefaults(self):
defaults = self.getDefaultGroupContainer(
_name = "defaults",
diff_command = self.general.diff_command,
cia_rpc_server = self.general.cia_rpc_server,
)
try:
self._passConfig(defaults, "defaults")
except ConfigSe... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_default_options():\n return GROUPS_.values()",
"def _initGroups(self):\n defaults = self._getGroupDefaults()\n ddict = self._getDefaultGroupDict(defaults)\n\n for group in self._config.sections():\n ddict[\"_name\"] = group\n container = self.getGroupContaine... | [
"0.7189659",
"0.66600746",
"0.6527061",
"0.64659685",
"0.6437175",
"0.6363304",
"0.6304511",
"0.6122276",
"0.60720134",
"0.60634166",
"0.60197294",
"0.5996569",
"0.5983435",
"0.598059",
"0.59666896",
"0.5944317",
"0.59402376",
"0.5940033",
"0.59332246",
"0.59162146",
"0.59110... | 0.7293261 | 0 |
Exponentiates and normalizes a tensor. | def exponentiate_and_normalize(values, dim=0):
return torch.exp(lognormexp(values, dim=dim)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def unnormalize(tensor, mean, std):\n for t, m, s in zip(tensor, mean, std):\n t.mul_(s).add_(m)\n return tensor",
"def normalise(x, dim=1):\n norm = torch.sqrt( torch.pow(x,2.).sum(dim) )\n if dim>0:\n x /= norm.unsqueeze(dim)\n return x",
"def normalise_tensor(ten... | [
"0.65816605",
"0.6448918",
"0.63760835",
"0.6356819",
"0.624168",
"0.624168",
"0.61707735",
"0.61337996",
"0.60935414",
"0.6068182",
"0.6057448",
"0.6029096",
"0.5997857",
"0.59728724",
"0.5955574",
"0.5949191",
"0.5949037",
"0.5944887",
"0.5899965",
"0.58917177",
"0.58640045... | 0.66478693 | 1 |
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`. | def plot_confusion_matrix(cm, classes,
normalize=False,
title='Confusion matrix',
cmap=plt.cm.Blues):
if normalize:
cm = cm.astype('float') / cm.sum(axis=1)[:, np.newaxis]
print("Normalized confusion matrix")
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def plot_confusion_matrix(cm, classes=[0,1], normalize=False, title='Confusion matrix', print_matrix=False):\n\n if normalize:\n cm = cm.astype('float') / cm.sum(axis=1)[:, np.newaxis]\n print(\"Normalized confusion matrix\")\n else:\n print('Confusion matrix, without normalization')\n\n... | [
"0.8194862",
"0.80949175",
"0.8029915",
"0.8019153",
"0.79941195",
"0.7991258",
"0.7980955",
"0.7976606",
"0.79610753",
"0.79590565",
"0.79378676",
"0.7934962",
"0.7934504",
"0.79313844",
"0.7926313",
"0.7924577",
"0.79241234",
"0.7923211",
"0.7923023",
"0.7921931",
"0.791787... | 0.78289187 | 70 |
Shows account transactions history. | def history(self, request, *args, **kwargs):
account = self.get_object()
try:
history = HistoricoConta.objects.filter(conta=account).order_by('-created')
except ObjectDoesNotExist as obj:
return Response({"detail": "Could not find history for thus account",
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def history():\n\n # get all transactions for current user\n transactions = db.execute(\"SELECT * FROM transactions WHERE user_id = :user_id\", user_id=session[\"user_id\"])\n\n # render history.html with all user transactions\n return render_template(\"history.html\", transactions=transactions, usd=us... | [
"0.78265136",
"0.77427006",
"0.7627421",
"0.75191367",
"0.74609053",
"0.74463713",
"0.7414416",
"0.73232985",
"0.720535",
"0.7189966",
"0.7148739",
"0.7113993",
"0.7103768",
"0.7102597",
"0.7057921",
"0.7045669",
"0.7036156",
"0.69950336",
"0.69253045",
"0.69225603",
"0.69013... | 0.67956495 | 23 |
Test of generating IPv4 CIDR suffix string from IPv4 Dot notations | def test_IPv4s_to_CIDRs(self):
test_list = [
'1.2.3.1', '1.2.3.2', '1.2.3.3',
'1.2.3.4', '1.2.3.5', '1.2.3.6',
'5.6.7.8', '8.7.6.5', '1.2.2.250',
'41.2.2.251', '1.2.2.252', '1.2.2.253',
'1.2.2.254', '1.2.2.255'
]
match_list = [
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_ip4_cidr_syntax_internal_v6(self):\n \n test_ip = ip_address.IPAddress(\"192.168.0.1/24\")\n \n assert test_ip.addr == [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff, 192, 168, 0, 1]\n assert test_ip.subnet == [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, ... | [
"0.6997574",
"0.6473475",
"0.63159484",
"0.62373334",
"0.62357426",
"0.61913097",
"0.6134429",
"0.6095651",
"0.6064948",
"0.6057518",
"0.5980177",
"0.59680164",
"0.59585756",
"0.59087926",
"0.5813147",
"0.58082163",
"0.5804862",
"0.58046764",
"0.57737094",
"0.57103",
"0.57013... | 0.591674 | 13 |
decrease learning rate when call | def decrease_lr(self, sess):
orig_lr = sess.run(self.lr_node)
sess.run(self.add_global)
next_lr = sess.run(self.lr_node)
self.log('Decrease lr from {} to {}'.format(orig_lr, next_lr)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def increase_learning(self, factor):\n pass",
"def step_and_update_lr(self):\r\n self._update_learning_rate()\r\n self._optimizer.step()",
"def _update_learning_rate(self):\r\n\r\n self.n_steps += 1\r\n lr = self.factor * self._get_lr_scale()\r\n for param_group in sel... | [
"0.7438414",
"0.7066427",
"0.7006517",
"0.69841224",
"0.69780976",
"0.6893139",
"0.6889934",
"0.68664587",
"0.68652457",
"0.68616235",
"0.68569654",
"0.68569654",
"0.6835628",
"0.6813074",
"0.68084186",
"0.6789056",
"0.6786123",
"0.67642576",
"0.67621195",
"0.6744117",
"0.673... | 0.6522316 | 64 |
Get the filename (without path) of all files in cls. | def get_instances_of_class(cls, folder):
data = list()
for _, _, filenames in os.walk(folder):
for filename in filenames:
if filename.endswith(".jpg"):
last = filename.split("/")[-1]
if re.match(cls, last):
data.append(last)
return data | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_filename(cls):\n return osp.join(cls.dir_location, *cls.file_path)",
"def get_file_name(self):\n return ReaderBaseBase.get_file_names(self, idx=0)",
"def get_filename(self):\n \n for f in os.listdir(self.get_directory()):\n if os.path.isfile(os.path.jo... | [
"0.71415305",
"0.699926",
"0.66358805",
"0.6572283",
"0.6528451",
"0.6515109",
"0.6478865",
"0.64672595",
"0.64387786",
"0.64203626",
"0.63292855",
"0.63283086",
"0.6314319",
"0.6293458",
"0.6292429",
"0.62912506",
"0.6288473",
"0.6281177",
"0.6262998",
"0.62512505",
"0.62296... | 0.0 | -1 |
Convert the given string to bytes and validate it is within the Base32 character set. | def str_to_bytes(value: str, expected_length: int) -> bytes:
length = len(value)
if length != expected_length:
raise ValueError('Expects {} characters for decoding; got {}'.format(expected_length, length))
try:
encoded = value.encode('ascii')
except UnicodeEncodeError as ex:
rai... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def base32_encode(string: str) -> bytes:\n\n # encoded the input (we need a bytes like object)\n # then, b32encoded the bytes-like object\n return base64.b32encode(string.encode(\"utf-8\"))",
"def _check_utf8_encoding(self, bstring):\n if not gf.is_bytes(bstring):\n self._failed(u\"The... | [
"0.69909513",
"0.6530403",
"0.6425635",
"0.6285587",
"0.62773234",
"0.6236974",
"0.61675686",
"0.6150866",
"0.6139966",
"0.6101785",
"0.60597426",
"0.604753",
"0.60410595",
"0.6023178",
"0.59666675",
"0.594632",
"0.5936189",
"0.59237707",
"0.5897009",
"0.58849484",
"0.5871148... | 0.576342 | 30 |
Verify that name is unique in ALIAS_MODEL. We have to duplicate code here and in models.GroupBase.clean due to bug | def clean_name(self):
name = self.cleaned_data['name']
query = GroupAlias.objects.filter(name=name)
if self.instance.pk:
query = query.exclude(alias=self.instance)
if query.exists():
raise ValidationError(_('Group with this Name already exists.'))
return n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def clean_name(self):\n name = self.cleaned_data['name']\n if self.instance and self.instance.name and name == self.instance.name:\n return name\n if Organization.objects.filter(slug=slugify(name)).exists():\n raise forms.ValidationError(\n _('Organization ... | [
"0.6788983",
"0.66977847",
"0.64275503",
"0.61029077",
"0.60386103",
"0.60315067",
"0.60305274",
"0.6014072",
"0.6006064",
"0.59737235",
"0.5952106",
"0.59211385",
"0.5917797",
"0.5911136",
"0.5891335",
"0.58649635",
"0.58649635",
"0.5846855",
"0.5829497",
"0.5801767",
"0.577... | 0.74083257 | 0 |
Takes a pandas DataFrame column of date string and returns column as a column of datetime objects. | def parse_dates(df, args=("%Y-%m-%dT%H:%M:%S.%f",)):
try:
datetime_col = df['reported_date'].apply(dt.datetime.strptime, args=args)
except ValueError:
datetime_col = pd.to_datetime(df.reported_date)
return df.assign(reported_date=pd.Series(datetime_col).values) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_to_datetime(df, column):\n datetime_format = '%Y-%m-%d'\n return pd.to_datetime(df[column], format=datetime_format)",
"def _convert_column_to_date(dframe, column):\n try:\n return dframe[column].apply(parse_date)\n except AttributeError:\n # it is already a datetime\n ... | [
"0.80456847",
"0.7973425",
"0.7653156",
"0.73257065",
"0.70188665",
"0.6856294",
"0.6824244",
"0.67579603",
"0.6669779",
"0.6650168",
"0.6582432",
"0.6422281",
"0.63480043",
"0.6315428",
"0.62963086",
"0.6244326",
"0.6177953",
"0.6151138",
"0.6108892",
"0.6090204",
"0.6006599... | 0.6262621 | 15 |
Getter method for cos_traffic_class, mapped from YANG variable /qos/map/cos_traffic_class (list) | def _get_cos_traffic_class(self):
return self.__cos_traffic_class | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_traffic_class_cos(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=YANGListType(\"traffic_class_cos_map_name\",traffic_class_cos.traffic_class_cos, yang_name=\"traffic-class-cos\", rest_name=\"traffic-class-cos\", parent=self, is_contain... | [
"0.84001356",
"0.83403856",
"0.6883752",
"0.6264245",
"0.5439372",
"0.538152",
"0.5142058",
"0.49177608",
"0.4753036",
"0.4669661",
"0.46088502",
"0.45230797",
"0.44528574",
"0.4410801",
"0.44031456",
"0.4388518",
"0.43245843",
"0.43192562",
"0.4278581",
"0.4259686",
"0.42483... | 0.7104544 | 2 |
Getter method for cos_dscp, mapped from YANG variable /qos/map/cos_dscp (list) | def _get_cos_dscp(self):
return self.__cos_dscp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_cos_dscp(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=YANGListType(\"name\",cos_dscp.cos_dscp, yang_name=\"cos-dscp\", rest_name=\"cos-dscp\", parent=self, is_container='list', user_ordered=False, path_helper=self._path_helper, yang_... | [
"0.80730194",
"0.7922891",
"0.63269544",
"0.55310696",
"0.5164337",
"0.5068641",
"0.49914968",
"0.49740273",
"0.49676564",
"0.49387988",
"0.4897464",
"0.48645008",
"0.48380482",
"0.48124322",
"0.47635964",
"0.47523472",
"0.4744741",
"0.47223848",
"0.470508",
"0.4697623",
"0.4... | 0.6254392 | 3 |
Getter method for traffic_class_cos, mapped from YANG variable /qos/map/traffic_class_cos (list) | def _get_traffic_class_cos(self):
return self.__traffic_class_cos | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_traffic_class_cos(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=YANGListType(\"traffic_class_cos_map_name\",traffic_class_cos.traffic_class_cos, yang_name=\"traffic-class-cos\", rest_name=\"traffic-class-cos\", parent=self, is_contain... | [
"0.8176648",
"0.7297005",
"0.6419357",
"0.5832275",
"0.5123955",
"0.48674273",
"0.48305336",
"0.47804177",
"0.47595614",
"0.4734599",
"0.4728725",
"0.46335804",
"0.46149433",
"0.4596942",
"0.4590977",
"0.45649323",
"0.45415083",
"0.45379555",
"0.45299503",
"0.4519256",
"0.450... | 0.68422574 | 2 |
Setter method for traffic_class_cos, mapped from YANG variable /qos/map/traffic_class_cos (list) | def _set_traffic_class_cos(self, v, load=False):
if hasattr(v, "_utype"):
v = v._utype(v)
try:
t = YANGDynClass(v,base=YANGListType("traffic_class_cos_map_name",traffic_class_cos.traffic_class_cos, yang_name="traffic-class-cos", rest_name="traffic-class-cos", parent=self, is_container='list', user_o... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_cos_traffic_class(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=YANGListType(\"name\",cos_traffic_class.cos_traffic_class, yang_name=\"cos-traffic-class\", rest_name=\"cos-traffic-class\", parent=self, is_container='list', user_ordere... | [
"0.7844899",
"0.64949095",
"0.6298987",
"0.61524993",
"0.5189695",
"0.51853776",
"0.5041101",
"0.502592",
"0.47969308",
"0.4658107",
"0.4637204",
"0.4624068",
"0.45490953",
"0.45324934",
"0.4524558",
"0.4507564",
"0.4498197",
"0.44827798",
"0.44790885",
"0.44681892",
"0.44623... | 0.8587608 | 0 |
Compute softmax values for each sets of scores in x. | def softmax(x):
# https://stackoverflow.com/questions/34968722/softmax-function-python
return np.exp(x) / np.sum(np.exp(x), axis=0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def softmax(self, scores):\n\n\n # for each sample, for each class ,caclulate\n # np.exp(scores) : still (n_samples, n_classes)\n\n # axis = 1\n # a00, a01, a02 as a sinlge one to perfrom np_sum\n # which is the same sample \n # sum_exp : still (n_samples, 1)\n\n # ... | [
"0.7796294",
"0.7760558",
"0.7759004",
"0.77567077",
"0.76577055",
"0.76577055",
"0.76577055",
"0.76577055",
"0.7585655",
"0.743143",
"0.7407772",
"0.73941606",
"0.7358175",
"0.73174125",
"0.72689486",
"0.72623265",
"0.72614294",
"0.7256868",
"0.723019",
"0.7214918",
"0.72017... | 0.7100688 | 38 |
Returns the current renderer. | def GetCurrentRenderer(self):
renderer=str(pm.mel.currentRenderer())
if renderer == "_3delight":
renderer="3delight"
return renderer | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _get_renderer(self) :\n \n return self._renderer",
"def get_renderer ( self, object ):\n return self.renderer",
"def GetCurrentRenderer(self):\n renderer = str(pm.mel.currentRenderer())\n if renderer == \"_3delight\":\n renderer = \"3delight\"\n\n return... | [
"0.8795734",
"0.83975834",
"0.83190143",
"0.7751973",
"0.74687475",
"0.7454062",
"0.6911511",
"0.68880373",
"0.681084",
"0.66897607",
"0.6682753",
"0.649957",
"0.6281214",
"0.6233523",
"0.6233523",
"0.61285716",
"0.61110336",
"0.6071637",
"0.60646504",
"0.59865713",
"0.597201... | 0.8160026 | 3 |
Tails the system.profile collection | def _tail_profile(self, db, interval):
latest_doc = None
while latest_doc is None:
time.sleep(interval)
latest_doc = db['system.profile'].find_one()
current_time = latest_doc['ts']
while True:
time.sleep(interval)
cursor = db['s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def profiles(self):\n if not self._profiles:\n self.GetAllProfiles()\n return self._profiles",
"def tearDown(self):\n User.users_list = []",
"def tearDown(self):\n User.user_list = []",
"def profiles():\n \n if 'username' in session:\n profiles = mongo.db.profiles.find()... | [
"0.5900028",
"0.58418614",
"0.5823701",
"0.57160014",
"0.56740886",
"0.56677645",
"0.5612017",
"0.5610965",
"0.55955184",
"0.5590306",
"0.55743486",
"0.5545094",
"0.5539283",
"0.55352956",
"0.5532781",
"0.5514415",
"0.55135715",
"0.5505516",
"0.55027896",
"0.54857683",
"0.548... | 0.51899534 | 49 |
Checks whether the requested_namespaces contain the provided namespace | def _namespace_requested(self, namespace):
if namespace is None:
return False
namespace_tuple = self._tuplefy_namespace(namespace)
if namespace_tuple[0] in IGNORE_DBS:
return False
elif namespace_tuple[1] in IGNORE_COLLECTIONS:
return False
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hasNS(self, *args):\n return _libsbml.XMLNamespaces_hasNS(self, *args)",
"async def namespace_exists(self, namespace: str) -> bool:\n return await self.AD.state.namespace_exists(namespace)",
"def is_in_namespace(variable_names, namespace, func_logic=all):\n assert hasattr(variable_names, \... | [
"0.6973943",
"0.6907602",
"0.6893701",
"0.68887436",
"0.688151",
"0.67229086",
"0.65710944",
"0.6389965",
"0.6202739",
"0.6188685",
"0.6154393",
"0.6144051",
"0.60950094",
"0.60739094",
"0.59882784",
"0.587425",
"0.58647907",
"0.5832128",
"0.5832128",
"0.5815978",
"0.5788212"... | 0.77890044 | 0 |
Evaluates a model's top k accuracy | def accuracy(outputs, targets):
batch_size = targets.size(0)
_, pred = torch.max(outputs.data, 1)
correct = (pred == targets).sum().item()
res = 100 * correct / batch_size
return res | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def accuracy(output, target, topk=(1,)):\n maxk = max(topk)\n batch_size = target.size(0)\n\n _, pred = output.topk(maxk, 1, True, True)\n pred = pred.t()\n correct = pred.eq(target.view(1, -1).expand_as(pred))\n\n res = []\n for k in topk:\n correct_k = correct[:k].view(-1).float().sum... | [
"0.7874563",
"0.78709704",
"0.7860551",
"0.7860551",
"0.7860288",
"0.7858749",
"0.7850225",
"0.7847268",
"0.78463686",
"0.78463686",
"0.78463686",
"0.78463686",
"0.78463686",
"0.78463686",
"0.78463686",
"0.78463686",
"0.78463686",
"0.78463686",
"0.78463686",
"0.78463686",
"0.... | 0.0 | -1 |
Construct a DTensor from a local tensor, device mesh, and placement and other tensor properties (i.e. shape, requires_grad, strides, etc). | def __new__(
cls,
local_tensor: torch.Tensor,
device_mesh: DeviceMesh,
placements: Sequence[Placement],
*,
shape: torch.Size,
dtype: torch.dtype,
requires_grad: bool,
stride: Tuple[int, ...],
) -> "DTensor":
if requires_grad != local_te... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def make_input_shard_1d(\n input: Union[torch.Tensor, DTensor],\n device_mesh: Optional[DeviceMesh] = None,\n dim: int = 0,\n) -> DTensor:\n shard_spec = [Shard(dim)]\n if isinstance(input, DTensor):\n return input.redistribute(device_mesh, shard_spec)\n elif isinstance(input, torch.Tensor... | [
"0.5873471",
"0.5794189",
"0.57109874",
"0.57030684",
"0.5697719",
"0.56235313",
"0.5580084",
"0.55769354",
"0.55735785",
"0.5445112",
"0.5430436",
"0.54245865",
"0.5414221",
"0.5397339",
"0.53492707",
"0.53412247",
"0.5328446",
"0.5306545",
"0.5306157",
"0.52982897",
"0.5285... | 0.80215675 | 0 |
Get the local tensor of this DTensor on its current rank. For sharding it returns a local shard of the logical tensor view, for replication it returns the replica on its current rank. | def to_local(self) -> torch.Tensor:
return _ToTorchTensor.apply(self) # pyre-ignore[16]: autograd func | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getTensor(self):\n\t\treturn self.cur_tensor",
"def localpart(self):\n return self._localpart",
"def _get_shard(self, tensor: torch.Tensor) -> Tuple[torch.Tensor, int]:\n tensor = self._flatten_and_pad_to_world_size(\n tensor, self.world_size * self._shard_size_multiple)\n local_size = ... | [
"0.6487516",
"0.62641585",
"0.6115008",
"0.5541878",
"0.5504158",
"0.5451081",
"0.54407203",
"0.543696",
"0.5342667",
"0.5330699",
"0.532608",
"0.5312398",
"0.5297797",
"0.52917236",
"0.52797717",
"0.52758545",
"0.52715",
"0.5265012",
"0.5258167",
"0.525302",
"0.52466035",
... | 0.58142734 | 3 |
Distribute a torch.Tensor to the `device_mesh` according to the `placements` specified. The rank of `device_mesh` and `placements` must be the same. | def distribute_tensor(
tensor: torch.Tensor,
device_mesh: Optional[DeviceMesh] = None,
placements: Optional[Sequence[Placement]] = None,
) -> DTensor:
torch._C._log_api_usage_once("torch.dtensor.distribute_tensor")
# get default device mesh if there's nothing specified
device_mesh = device_mes... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def redistribute(\n self,\n device_mesh: Optional[DeviceMesh] = None,\n placements: Optional[Sequence[Placement]] = None,\n ) -> \"DTensor\":\n # NOTE: This redistribute API currently only supports out\n # of place redistribution, i.e. it always create a new\n # DTensor... | [
"0.69158834",
"0.51043856",
"0.5020848",
"0.4993981",
"0.49159932",
"0.49136242",
"0.48907363",
"0.48239028",
"0.48222744",
"0.4815018",
"0.4801842",
"0.47992364",
"0.47840753",
"0.47605342",
"0.4739556",
"0.47346252",
"0.47294885",
"0.4724111",
"0.4660523",
"0.46455353",
"0.... | 0.7573612 | 0 |
Returns environment type (int) for this kind of environment. This helps identify this env class. | def type(self):
return EB.EnvType.ROBOSUITE_TYPE | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_env_type ( base_name ) :\n return base_name.split( '-', 1 )[ 0 ]",
"def get_env_class(environment_type):\n if environment_type == \"vanilla\":\n return city.CityGridEnv\n elif environment_type == \"distraction\":\n return city.DistractionGridEnv\n elif environment_type == \"map\":\n return ... | [
"0.7368591",
"0.7319003",
"0.68488353",
"0.67415655",
"0.6516644",
"0.6475694",
"0.6464598",
"0.6453087",
"0.642496",
"0.6373533",
"0.63451385",
"0.63451385",
"0.63451385",
"0.63451385",
"0.63451385",
"0.63451385",
"0.63451385",
"0.63451385",
"0.63451385",
"0.63451385",
"0.63... | 0.63054156 | 58 |
In the constructor we instantiate two nn.Linear modules and assign them as member variables. | def __init__(self):
super(PackageNet, self).__init__()
# remove last layers of vgg19 model, save first fc layer and maxpool layer
self.vgg = models.vgg19(pretrained=True)
del self.vgg.classifier[2:]
# get size of some layers
start_num = self.vgg.classifier[0].ou... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, *args):\n super(LinearND, self).__init__()\n self.fc = nn.Linear(*args)",
"def __init__(self, linear_args, activation_functions, softmax=False):\n super(NN, self).__init__()\n assert len(activation_functions) == len(linear_args) - 1\n k = len(linear_args)\n ... | [
"0.7740162",
"0.75491714",
"0.7506903",
"0.7433666",
"0.7365604",
"0.7335538",
"0.73146075",
"0.72864336",
"0.727268",
"0.7272499",
"0.7272499",
"0.7267363",
"0.72424537",
"0.72203547",
"0.7202331",
"0.71665525",
"0.7110896",
"0.7076813",
"0.7065149",
"0.70622575",
"0.7053144... | 0.0 | -1 |
loads the user using the corresponding id | def load_user(id):
return User.query.get(int(id)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def load_user(id):\n\treturn User.query.get(int(id))",
"def load_user():\n\n return User.query.get(int(id))",
"def load_user(id):\n return User.get_by_id(int(id))",
"def load_user(id):\n return User.query.get(int(id))",
"def load_user(id):\n return User.query.get(int(id))",
"def load_user(id)... | [
"0.83434224",
"0.83103096",
"0.83059704",
"0.82882375",
"0.82882375",
"0.82882375",
"0.82882375",
"0.8208172",
"0.80423516",
"0.8008115",
"0.79275995",
"0.79275995",
"0.79275995",
"0.79275995",
"0.79275995",
"0.79275995",
"0.7915527",
"0.7915527",
"0.7915527",
"0.7907181",
"0... | 0.826307 | 7 |
Generate a random string of fixed length | def randomstring(stringLength=10):
letters = string.ascii_lowercase
return ''.join(random.choice(letters) for i in range(stringLength)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _generate_random_string(length: int):\n\tall_chars = string.ascii_letters + string.digits\n\treturn ''.join(random.choices(all_chars, k=length))",
"def generate_random_string(length=6):\n n = int(length / 2 + 1)\n x = binascii.hexlify(os.urandom(n))\n s = x[:length]\n return s.decode(\"utf-8\")",... | [
"0.8678726",
"0.85725635",
"0.8546959",
"0.852769",
"0.85201234",
"0.84315515",
"0.84307504",
"0.84138894",
"0.84099346",
"0.8388408",
"0.8344307",
"0.8342706",
"0.83389807",
"0.8332531",
"0.83217525",
"0.829651",
"0.829245",
"0.8281027",
"0.8280717",
"0.8279932",
"0.8263646"... | 0.78692967 | 67 |
Read a Windows environment variable by os.environ and return its value. | def windows_get_env_value(var_name: str) -> str:
if var_name in os.environ.keys():
return os.environ[var_name] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GetEnvVariable(name):\n return os.environ.get(name)",
"def env(var):\n return os.environ[var]",
"def get_env(environ_name):\n temp = os.getenv(environ_name)\n if temp is None:\n if ('ProgramFiles' in environ_name) or ('ProgramW6432' in environ_name):\n temp = os.getenv('Progra... | [
"0.7304884",
"0.7119016",
"0.7018214",
"0.69726694",
"0.6879445",
"0.68523836",
"0.68243176",
"0.6692811",
"0.66786915",
"0.6637612",
"0.65752184",
"0.65574133",
"0.65320003",
"0.65190965",
"0.6494253",
"0.6417962",
"0.6411537",
"0.6399597",
"0.6387591",
"0.63570404",
"0.6328... | 0.8375394 | 0 |
Helper function for converting epoch timestamps (as stored in JWTs) into python datetime objects (which are easier to use with sqlalchemy). | def _epoch_utc_to_datetime(epoch_utc):
return datetime.fromtimestamp(epoch_utc) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def epoch2datetime(t):\n return datetime.fromtimestamp(t/1000.0)",
"def epoch2datetime(epoch):\n return datetime.fromtimestamp(epoch)",
"def timestamp_to_datetime(value):\n if not isinstance(value, (int, long, float)):\n raise ValueError(\n 'Expecting a number, got %s instead' % type(value).__... | [
"0.75885344",
"0.74400795",
"0.69207895",
"0.6909716",
"0.6906496",
"0.6808217",
"0.6730866",
"0.670858",
"0.67006314",
"0.67006314",
"0.6649804",
"0.6645153",
"0.65928066",
"0.6566517",
"0.6560786",
"0.65514255",
"0.6535461",
"0.64956325",
"0.64656",
"0.6453113",
"0.6432873"... | 0.6393673 | 23 |
Find the toplevel directory surrounding a package or subpackage. | def _discover_enclosing_packages(directory, names):
was_absolute = directory.startswith(os.sep)
directory = os.path.abspath(directory)
while is_package(directory):
directory, package_name = os.path.split(directory)
if not package_name:
print('Error - there should not be an __init... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_package_dir():\n return Path(__file__).parent",
"def pypkgpath(self):\n pkgpath = None\n for parent in self.parts(reverse=True):\n if parent.isdir():\n if not parent.join(\"__init__.py\").exists():\n break\n if not isimportable(... | [
"0.7163934",
"0.6936987",
"0.69195455",
"0.69190776",
"0.6854509",
"0.6849333",
"0.6820989",
"0.6756799",
"0.6724249",
"0.6675116",
"0.66632247",
"0.6621878",
"0.6616616",
"0.657793",
"0.65681094",
"0.65014064",
"0.6496433",
"0.6463584",
"0.64489496",
"0.6441215",
"0.64404076... | 0.57395804 | 97 |
SDC15932 Create bucket with no data to Google cloud storage and then check if Google Storage Origin sends nomoredata event with no records sent. | def test_google_storage_no_more_data(sdc_builder, sdc_executor, gcp):
pipeline_builder = sdc_builder.get_pipeline_builder()
bucket_name = get_random_string(ascii_lowercase, 10)
storage_client = gcp.storage_client
google_cloud_storage = pipeline_builder.add_stage('Google Cloud Storage', type='origin')... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bucket_exists(gs_client, test_bucket):\n bucket = gs_client.conn.bucket(test_bucket)\n if not bucket.exists():\n gs_client.conn.create_bucket(test_bucket, predefined_acl=\"project-private\")\n yield gs_client",
"def create_bucket() -> None:\n try:\n client.make_bucket(DATASETS_BUCKE... | [
"0.6406458",
"0.6293171",
"0.6291298",
"0.6229291",
"0.6108981",
"0.6073236",
"0.60635686",
"0.60632795",
"0.6040663",
"0.603217",
"0.60238194",
"0.5930068",
"0.5884581",
"0.58303237",
"0.58128667",
"0.5786409",
"0.5748677",
"0.57483506",
"0.57337105",
"0.5726206",
"0.5723157... | 0.71123844 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.