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 |
|---|---|---|---|---|---|---|
SetFullyConnected(itkClosingByReconstructionImageFilterIUC2IUC2SE2 self, bool const _arg) | def SetFullyConnected(self, _arg: 'bool const') -> "void":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUC2IUC2SE2_SetFullyConnected(self, _arg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SetFullyConnected(self, _arg: 'bool const') -> \"void\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIF2IF2SE2_SetFullyConnected(self, _arg)",
"def SetFullyConnected(self, _arg: 'bool const') -> \"void\":\n return _itkClosingByReconstructionImageFi... | [
"0.8797851",
"0.87400544",
"0.8730596",
"0.85442406",
"0.8165817",
"0.81187755",
"0.8011888",
"0.79115516",
"0.7832717",
"0.7719726",
"0.77193695",
"0.75149846",
"0.75057495",
"0.7492888",
"0.742458",
"0.72718126",
"0.7254996",
"0.71933264",
"0.7130947",
"0.70785725",
"0.6929... | 0.92461807 | 0 |
SetPreserveIntensities(itkClosingByReconstructionImageFilterIUC2IUC2SE2 self, bool const _arg) | def SetPreserveIntensities(self, _arg: 'bool const') -> "void":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUC2IUC2SE2_SetPreserveIntensities(self, _arg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SetPreserveIntensities(self, _arg: 'bool const') -> \"void\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUS2IUS2SE2_SetPreserveIntensities(self, _arg)",
"def SetPreserveIntensities(self, _arg: 'bool const') -> \"void\":\n return _itkClosingByReco... | [
"0.8816828",
"0.8796034",
"0.87650114",
"0.81776476",
"0.8054992",
"0.8000686",
"0.7792297",
"0.77885723",
"0.74806625",
"0.74226296",
"0.741835",
"0.68668735",
"0.67043287",
"0.66856486",
"0.66637677",
"0.65558213",
"0.6514001",
"0.65106183",
"0.6290762",
"0.6196624",
"0.612... | 0.9183993 | 0 |
GetPreserveIntensities(itkClosingByReconstructionImageFilterIUC2IUC2SE2 self) > bool const & | def GetPreserveIntensities(self) -> "bool const &":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUC2IUC2SE2_GetPreserveIntensities(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GetPreserveIntensities(self) -> \"bool const &\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIF2IF2SE2_GetPreserveIntensities(self)",
"def GetPreserveIntensities(self) -> \"bool const &\":\n return _itkClosingByReconstructionImageFilterPython.itkC... | [
"0.9024587",
"0.89794654",
"0.89730376",
"0.8652065",
"0.8528935",
"0.85222495",
"0.83372134",
"0.82014215",
"0.796862",
"0.790728",
"0.78817433",
"0.74828744",
"0.7377496",
"0.73504984",
"0.7190754",
"0.6644625",
"0.65399355",
"0.6521931",
"0.617182",
"0.588971",
"0.5731532"... | 0.93139046 | 0 |
cast(itkLightObject obj) > itkClosingByReconstructionImageFilterIUC2IUC2SE2 | def cast(obj: 'itkLightObject') -> "itkClosingByReconstructionImageFilterIUC2IUC2SE2 *":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUC2IUC2SE2_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkClosingByReconstructionImageFilterIUC2IUC2SE2_cast(obj: 'itkLightObject') -> \"itkClosingByReconstructionImageFilterIUC2IUC2SE2 *\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUC2IUC2SE2_cast(obj)",
"def itkClosingByReconstructionImageFilterIF2IF2SE2_cas... | [
"0.8980222",
"0.8672015",
"0.85675895",
"0.856062",
"0.84928024",
"0.8381003",
"0.83224773",
"0.8199405",
"0.81314796",
"0.80478466",
"0.795319",
"0.7882494",
"0.78637314",
"0.78577435",
"0.7834105",
"0.7673367",
"0.7667686",
"0.76591593",
"0.7632698",
"0.7620415",
"0.7603944... | 0.87273127 | 1 |
New() > itkClosingByReconstructionImageFilterIUC2IUC2SE2 Create a new object of the class itkClosingByReconstructionImageFilterIUC2IUC2SE2 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new object... | def New(*args, **kargs):
obj = itkClosingByReconstructionImageFilterIUC2IUC2SE2.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkClosingByReconstructionImageFilterIF2IF2SE2.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkClosingByReconstructionImageFilterISS2ISS2SE2.__New_orig__()\n i... | [
"0.76941574",
"0.76769805",
"0.76398474",
"0.75206524",
"0.72681886",
"0.724457",
"0.7233159",
"0.72251",
"0.7216336",
"0.71991885",
"0.7198686",
"0.71765965",
"0.716807",
"0.7156498",
"0.7155143",
"0.71441",
"0.71380574",
"0.7124666",
"0.71246195",
"0.7124565",
"0.7122105",
... | 0.8052729 | 0 |
itkClosingByReconstructionImageFilterIUC2IUC2SE2_cast(itkLightObject obj) > itkClosingByReconstructionImageFilterIUC2IUC2SE2 | def itkClosingByReconstructionImageFilterIUC2IUC2SE2_cast(obj: 'itkLightObject') -> "itkClosingByReconstructionImageFilterIUC2IUC2SE2 *":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUC2IUC2SE2_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkClosingByReconstructionImageFilterIF2IF2SE2_cast(obj: 'itkLightObject') -> \"itkClosingByReconstructionImageFilterIF2IF2SE2 *\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIF2IF2SE2_cast(obj)",
"def itkClosingByReconstructionImageFilterISS2ISS2SE2_cast(ob... | [
"0.9094487",
"0.892813",
"0.88923836",
"0.8808969",
"0.86756104",
"0.849839",
"0.84565437",
"0.8413163",
"0.8300593",
"0.8144473",
"0.8085332",
"0.80624056",
"0.79270774",
"0.78160214",
"0.7811117",
"0.7381053",
"0.7363875",
"0.73554814",
"0.72934204",
"0.72761345",
"0.726952... | 0.9434102 | 0 |
Clone(itkClosingByReconstructionImageFilterIUC3IUC3SE3 self) > itkClosingByReconstructionImageFilterIUC3IUC3SE3_Pointer | def Clone(self) -> "itkClosingByReconstructionImageFilterIUC3IUC3SE3_Pointer":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUC3IUC3SE3_Clone(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Clone(self) -> \"itkClosingByReconstructionImageFilterIF3IF3SE3_Pointer\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIF3IF3SE3_Clone(self)",
"def Clone(self) -> \"itkClosingByReconstructionImageFilterISS3ISS3SE3_Pointer\":\n return _itkClosingByR... | [
"0.8870095",
"0.8852904",
"0.86978513",
"0.82489634",
"0.7940481",
"0.7861347",
"0.78182197",
"0.7719044",
"0.7642605",
"0.7639799",
"0.7575767",
"0.7507209",
"0.7497229",
"0.74765986",
"0.7464829",
"0.74192995",
"0.7403438",
"0.7402809",
"0.7399535",
"0.7379717",
"0.73676556... | 0.9087483 | 0 |
SetKernel(itkClosingByReconstructionImageFilterIUC3IUC3SE3 self, itkFlatStructuringElement3 _arg) | def SetKernel(self, _arg: 'itkFlatStructuringElement3') -> "void":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUC3IUC3SE3_SetKernel(self, _arg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SetKernel(self, _arg: 'itkFlatStructuringElement3') -> \"void\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterISS3ISS3SE3_SetKernel(self, _arg)",
"def SetKernel(self, _arg: 'itkFlatStructuringElement3') -> \"void\":\n return _itkClosingByReconstruct... | [
"0.87967896",
"0.8768365",
"0.8676756",
"0.80837196",
"0.7657948",
"0.75440073",
"0.74304426",
"0.7106602",
"0.68617153",
"0.68583995",
"0.67624915",
"0.6503266",
"0.60740113",
"0.60377955",
"0.5928931",
"0.5890028",
"0.5850205",
"0.57892156",
"0.57512635",
"0.5732098",
"0.57... | 0.90187323 | 0 |
SetFullyConnected(itkClosingByReconstructionImageFilterIUC3IUC3SE3 self, bool const _arg) | def SetFullyConnected(self, _arg: 'bool const') -> "void":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUC3IUC3SE3_SetFullyConnected(self, _arg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SetFullyConnected(self, _arg: 'bool const') -> \"void\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterISS3ISS3SE3_SetFullyConnected(self, _arg)",
"def SetFullyConnected(self, _arg: 'bool const') -> \"void\":\n return _itkClosingByReconstructionImage... | [
"0.8940274",
"0.8907193",
"0.8878431",
"0.85763353",
"0.8461777",
"0.8330449",
"0.82187444",
"0.81940156",
"0.79421276",
"0.7782718",
"0.77632457",
"0.7712408",
"0.7641748",
"0.7638555",
"0.755289",
"0.73011106",
"0.72259843",
"0.7209995",
"0.70541453",
"0.696733",
"0.6949492... | 0.9132044 | 0 |
SetPreserveIntensities(itkClosingByReconstructionImageFilterIUC3IUC3SE3 self, bool const _arg) | def SetPreserveIntensities(self, _arg: 'bool const') -> "void":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUC3IUC3SE3_SetPreserveIntensities(self, _arg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SetPreserveIntensities(self, _arg: 'bool const') -> \"void\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUS3IUS3SE3_SetPreserveIntensities(self, _arg)",
"def SetPreserveIntensities(self, _arg: 'bool const') -> \"void\":\n return _itkClosingByReco... | [
"0.89666015",
"0.8939188",
"0.8915819",
"0.8669218",
"0.83719575",
"0.818505",
"0.8164125",
"0.76863796",
"0.7526853",
"0.751382",
"0.7507289",
"0.7298677",
"0.6963878",
"0.6863821",
"0.684122",
"0.6343539",
"0.62201446",
"0.6176192",
"0.5994617",
"0.5910288",
"0.5835555",
... | 0.9107639 | 0 |
GetPreserveIntensities(itkClosingByReconstructionImageFilterIUC3IUC3SE3 self) > bool const & | def GetPreserveIntensities(self) -> "bool const &":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUC3IUC3SE3_GetPreserveIntensities(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GetPreserveIntensities(self) -> \"bool const &\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterISS3ISS3SE3_GetPreserveIntensities(self)",
"def GetPreserveIntensities(self) -> \"bool const &\":\n return _itkClosingByReconstructionImageFilterPython.it... | [
"0.91535944",
"0.91393644",
"0.90981555",
"0.8916886",
"0.8631113",
"0.8564229",
"0.8544625",
"0.8061919",
"0.7982208",
"0.7930507",
"0.7927121",
"0.77030545",
"0.74598235",
"0.7415036",
"0.7394481",
"0.6501116",
"0.6339946",
"0.6316789",
"0.6048363",
"0.5906522",
"0.58116794... | 0.92567843 | 0 |
cast(itkLightObject obj) > itkClosingByReconstructionImageFilterIUC3IUC3SE3 | def cast(obj: 'itkLightObject') -> "itkClosingByReconstructionImageFilterIUC3IUC3SE3 *":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUC3IUC3SE3_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkClosingByReconstructionImageFilterIUC3IUC3SE3_cast(obj: 'itkLightObject') -> \"itkClosingByReconstructionImageFilterIUC3IUC3SE3 *\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUC3IUC3SE3_cast(obj)",
"def itkClosingByReconstructionImageFilterIF3IF3SE3_cas... | [
"0.8993148",
"0.8803826",
"0.87863636",
"0.8663664",
"0.8645667",
"0.85809267",
"0.8541769",
"0.8469729",
"0.8388358",
"0.8232309",
"0.8220924",
"0.8216498",
"0.82140523",
"0.81581855",
"0.8128057",
"0.75685537",
"0.75281155",
"0.7524066",
"0.75129616",
"0.74927026",
"0.74899... | 0.8723636 | 3 |
New() > itkClosingByReconstructionImageFilterIUC3IUC3SE3 Create a new object of the class itkClosingByReconstructionImageFilterIUC3IUC3SE3 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new object... | def New(*args, **kargs):
obj = itkClosingByReconstructionImageFilterIUC3IUC3SE3.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkClosingByReconstructionImageFilterIF3IF3SE3.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkClosingByReconstructionImageFilterISS3ISS3SE3.__New_orig__()\n i... | [
"0.7901545",
"0.78035825",
"0.7753514",
"0.73671824",
"0.73583114",
"0.7345497",
"0.73065835",
"0.7288644",
"0.72746885",
"0.7258372",
"0.7249874",
"0.72422403",
"0.7218361",
"0.72172165",
"0.7216565",
"0.7203041",
"0.7197322",
"0.7193438",
"0.7192178",
"0.7183932",
"0.717745... | 0.8043357 | 0 |
itkClosingByReconstructionImageFilterIUC3IUC3SE3_cast(itkLightObject obj) > itkClosingByReconstructionImageFilterIUC3IUC3SE3 | def itkClosingByReconstructionImageFilterIUC3IUC3SE3_cast(obj: 'itkLightObject') -> "itkClosingByReconstructionImageFilterIUC3IUC3SE3 *":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUC3IUC3SE3_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkClosingByReconstructionImageFilterIF3IF3SE3_cast(obj: 'itkLightObject') -> \"itkClosingByReconstructionImageFilterIF3IF3SE3 *\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIF3IF3SE3_cast(obj)",
"def itkClosingByReconstructionImageFilterISS3ISS3SE3_cast(ob... | [
"0.92251986",
"0.91105694",
"0.902514",
"0.8686058",
"0.86790997",
"0.8542711",
"0.8507781",
"0.8432451",
"0.8179849",
"0.8127734",
"0.808936",
"0.8034706",
"0.7851973",
"0.7834374",
"0.78329265",
"0.7335175",
"0.7288044",
"0.7283043",
"0.72808725",
"0.7266606",
"0.72111905",... | 0.94122666 | 0 |
Clone(itkClosingByReconstructionImageFilterIUS2IUS2SE2 self) > itkClosingByReconstructionImageFilterIUS2IUS2SE2_Pointer | def Clone(self) -> "itkClosingByReconstructionImageFilterIUS2IUS2SE2_Pointer":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUS2IUS2SE2_Clone(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Clone(self) -> \"itkClosingByReconstructionImageFilterIUC2IUC2SE2_Pointer\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUC2IUC2SE2_Clone(self)",
"def Clone(self) -> \"itkClosingByReconstructionImageFilterIF2IF2SE2_Pointer\":\n return _itkClosingB... | [
"0.85015124",
"0.84877455",
"0.8421094",
"0.8391097",
"0.79423773",
"0.7843026",
"0.77931875",
"0.7774556",
"0.77409136",
"0.77389",
"0.7699804",
"0.7666084",
"0.7658649",
"0.7563679",
"0.75306475",
"0.75256",
"0.7523187",
"0.7375108",
"0.73621374",
"0.7350906",
"0.73398274",... | 0.9153919 | 0 |
SetFullyConnected(itkClosingByReconstructionImageFilterIUS2IUS2SE2 self, bool const _arg) | def SetFullyConnected(self, _arg: 'bool const') -> "void":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUS2IUS2SE2_SetFullyConnected(self, _arg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SetFullyConnected(self, _arg: 'bool const') -> \"void\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIF2IF2SE2_SetFullyConnected(self, _arg)",
"def SetFullyConnected(self, _arg: 'bool const') -> \"void\":\n return _itkClosingByReconstructionImageFi... | [
"0.86272013",
"0.855463",
"0.85445607",
"0.82872486",
"0.8215462",
"0.8008392",
"0.7973231",
"0.7906793",
"0.79065967",
"0.77987903",
"0.7726246",
"0.75605214",
"0.75489783",
"0.74917716",
"0.741857",
"0.73723006",
"0.7251151",
"0.7231512",
"0.7115057",
"0.70686233",
"0.70606... | 0.9149572 | 0 |
SetPreserveIntensities(itkClosingByReconstructionImageFilterIUS2IUS2SE2 self, bool const _arg) | def SetPreserveIntensities(self, _arg: 'bool const') -> "void":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUS2IUS2SE2_SetPreserveIntensities(self, _arg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SetPreserveIntensities(self, _arg: 'bool const') -> \"void\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIF2IF2SE2_SetPreserveIntensities(self, _arg)",
"def SetPreserveIntensities(self, _arg: 'bool const') -> \"void\":\n return _itkClosingByRecons... | [
"0.8780772",
"0.87706864",
"0.8750592",
"0.84332615",
"0.8119866",
"0.8041043",
"0.78704566",
"0.77361315",
"0.7387475",
"0.7358677",
"0.73467845",
"0.7033211",
"0.67388386",
"0.66814405",
"0.65339565",
"0.6368427",
"0.6288632",
"0.61187065",
"0.60125244",
"0.58179533",
"0.56... | 0.9192003 | 0 |
GetPreserveIntensities(itkClosingByReconstructionImageFilterIUS2IUS2SE2 self) > bool const & | def GetPreserveIntensities(self) -> "bool const &":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUS2IUS2SE2_GetPreserveIntensities(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GetPreserveIntensities(self) -> \"bool const &\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIF2IF2SE2_GetPreserveIntensities(self)",
"def GetPreserveIntensities(self) -> \"bool const &\":\n return _itkClosingByReconstructionImageFilterPython.itkC... | [
"0.89520186",
"0.8950909",
"0.89209706",
"0.8713262",
"0.84571296",
"0.8400122",
"0.8240409",
"0.8178559",
"0.7939745",
"0.789017",
"0.7843256",
"0.75349635",
"0.7335985",
"0.72460735",
"0.71129596",
"0.6395361",
"0.63435966",
"0.6277531",
"0.5898122",
"0.56449664",
"0.558923... | 0.92547655 | 0 |
cast(itkLightObject obj) > itkClosingByReconstructionImageFilterIUS2IUS2SE2 | def cast(obj: 'itkLightObject') -> "itkClosingByReconstructionImageFilterIUS2IUS2SE2 *":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUS2IUS2SE2_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkClosingByReconstructionImageFilterIUS2IUS2SE2_cast(obj: 'itkLightObject') -> \"itkClosingByReconstructionImageFilterIUS2IUS2SE2 *\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUS2IUS2SE2_cast(obj)",
"def itkClosingByReconstructionImageFilterIF2IF2SE2_cas... | [
"0.90009856",
"0.86672235",
"0.8609859",
"0.8599575",
"0.85493976",
"0.84069884",
"0.8391315",
"0.83661693",
"0.82655585",
"0.8137448",
"0.8013584",
"0.7959478",
"0.78977084",
"0.78772926",
"0.78583014",
"0.7464113",
"0.7369629",
"0.73474246",
"0.73442006",
"0.7341893",
"0.73... | 0.8742411 | 1 |
New() > itkClosingByReconstructionImageFilterIUS2IUS2SE2 Create a new object of the class itkClosingByReconstructionImageFilterIUS2IUS2SE2 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new object... | def New(*args, **kargs):
obj = itkClosingByReconstructionImageFilterIUS2IUS2SE2.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkClosingByReconstructionImageFilterIF2IF2SE2.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkClosingByReconstructionImageFilterISS2ISS2SE2.__New_orig__()\n i... | [
"0.7739434",
"0.773748",
"0.7674915",
"0.7394538",
"0.7271518",
"0.725568",
"0.7117268",
"0.7096452",
"0.7058575",
"0.70510274",
"0.70429605",
"0.701467",
"0.69993955",
"0.69908696",
"0.69858193",
"0.6982005",
"0.698027",
"0.6971387",
"0.69706655",
"0.6962964",
"0.69600946",
... | 0.80050063 | 0 |
itkClosingByReconstructionImageFilterIUS2IUS2SE2_cast(itkLightObject obj) > itkClosingByReconstructionImageFilterIUS2IUS2SE2 | def itkClosingByReconstructionImageFilterIUS2IUS2SE2_cast(obj: 'itkLightObject') -> "itkClosingByReconstructionImageFilterIUS2IUS2SE2 *":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUS2IUS2SE2_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkClosingByReconstructionImageFilterIF2IF2SE2_cast(obj: 'itkLightObject') -> \"itkClosingByReconstructionImageFilterIF2IF2SE2 *\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIF2IF2SE2_cast(obj)",
"def itkClosingByReconstructionImageFilterIUC2IUC2SE2_cast(ob... | [
"0.9005013",
"0.8971759",
"0.88796717",
"0.8775801",
"0.8584742",
"0.85481197",
"0.8410268",
"0.83874696",
"0.8264278",
"0.8136872",
"0.81331176",
"0.79599327",
"0.78856677",
"0.77576107",
"0.77172554",
"0.7083911",
"0.7057294",
"0.70163554",
"0.7000654",
"0.699567",
"0.69923... | 0.9335144 | 0 |
Clone(itkClosingByReconstructionImageFilterIUS3IUS3SE3 self) > itkClosingByReconstructionImageFilterIUS3IUS3SE3_Pointer | def Clone(self) -> "itkClosingByReconstructionImageFilterIUS3IUS3SE3_Pointer":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUS3IUS3SE3_Clone(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Clone(self) -> \"itkClosingByReconstructionImageFilterIUC3IUC3SE3_Pointer\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUC3IUC3SE3_Clone(self)",
"def Clone(self) -> \"itkClosingByReconstructionImageFilterISS3ISS3SE3_Pointer\":\n return _itkClosin... | [
"0.8484318",
"0.84702325",
"0.842707",
"0.840378",
"0.7751902",
"0.76950467",
"0.76757926",
"0.76589197",
"0.7598815",
"0.7550278",
"0.74730957",
"0.7391906",
"0.73515147",
"0.73485017",
"0.73307157",
"0.7250309",
"0.7232967",
"0.72257906",
"0.72111714",
"0.7161519",
"0.71503... | 0.9029011 | 0 |
SetFullyConnected(itkClosingByReconstructionImageFilterIUS3IUS3SE3 self, bool const _arg) | def SetFullyConnected(self, _arg: 'bool const') -> "void":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUS3IUS3SE3_SetFullyConnected(self, _arg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SetFullyConnected(self, _arg: 'bool const') -> \"void\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterISS3ISS3SE3_SetFullyConnected(self, _arg)",
"def SetFullyConnected(self, _arg: 'bool const') -> \"void\":\n return _itkClosingByReconstructionImage... | [
"0.87793493",
"0.8670281",
"0.8652685",
"0.83085936",
"0.818941",
"0.817972",
"0.80729187",
"0.8032319",
"0.78198785",
"0.7774943",
"0.7705494",
"0.7651955",
"0.75825",
"0.7532281",
"0.74605453",
"0.7291711",
"0.7272569",
"0.7262682",
"0.7221417",
"0.70685947",
"0.6985759",
... | 0.9075917 | 0 |
SetPreserveIntensities(itkClosingByReconstructionImageFilterIUS3IUS3SE3 self, bool const _arg) | def SetPreserveIntensities(self, _arg: 'bool const') -> "void":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUS3IUS3SE3_SetPreserveIntensities(self, _arg) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SetPreserveIntensities(self, _arg: 'bool const') -> \"void\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterISS3ISS3SE3_SetPreserveIntensities(self, _arg)",
"def SetPreserveIntensities(self, _arg: 'bool const') -> \"void\":\n return _itkClosingByReco... | [
"0.8820491",
"0.8789229",
"0.8732143",
"0.8716661",
"0.8355718",
"0.82196546",
"0.8185138",
"0.7591703",
"0.7334283",
"0.73190963",
"0.72886044",
"0.7238671",
"0.6941433",
"0.6812144",
"0.67764693",
"0.59817064",
"0.59329647",
"0.5781655",
"0.5677562",
"0.56147516",
"0.558688... | 0.90965956 | 0 |
GetPreserveIntensities(itkClosingByReconstructionImageFilterIUS3IUS3SE3 self) > bool const & | def GetPreserveIntensities(self) -> "bool const &":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUS3IUS3SE3_GetPreserveIntensities(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GetPreserveIntensities(self) -> \"bool const &\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterISS3ISS3SE3_GetPreserveIntensities(self)",
"def GetPreserveIntensities(self) -> \"bool const &\":\n return _itkClosingByReconstructionImageFilterPython.it... | [
"0.89789957",
"0.8955424",
"0.88808346",
"0.8870446",
"0.86316764",
"0.84845334",
"0.8450105",
"0.8021811",
"0.7842461",
"0.7791627",
"0.77381504",
"0.7734085",
"0.7455635",
"0.73785913",
"0.73750436",
"0.6197675",
"0.60644907",
"0.5986067",
"0.58347577",
"0.5728896",
"0.5721... | 0.9218565 | 0 |
cast(itkLightObject obj) > itkClosingByReconstructionImageFilterIUS3IUS3SE3 | def cast(obj: 'itkLightObject') -> "itkClosingByReconstructionImageFilterIUS3IUS3SE3 *":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUS3IUS3SE3_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkClosingByReconstructionImageFilterIUS3IUS3SE3_cast(obj: 'itkLightObject') -> \"itkClosingByReconstructionImageFilterIUS3IUS3SE3 *\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUS3IUS3SE3_cast(obj)",
"def itkClosingByReconstructionImageFilterISS3ISS3SE3_c... | [
"0.89894646",
"0.8782577",
"0.86943287",
"0.86847585",
"0.865355",
"0.8541311",
"0.8516984",
"0.8464531",
"0.842538",
"0.8321882",
"0.8313658",
"0.82735",
"0.82335275",
"0.82029545",
"0.8106112",
"0.7208512",
"0.7143948",
"0.7110729",
"0.71071243",
"0.7093283",
"0.70893073",
... | 0.87163794 | 2 |
New() > itkClosingByReconstructionImageFilterIUS3IUS3SE3 Create a new object of the class itkClosingByReconstructionImageFilterIUS3IUS3SE3 and set the input and the parameters if some named or nonnamed arguments are passed to that method. New() tries to assign all the non named parameters to the input of the new object... | def New(*args, **kargs):
obj = itkClosingByReconstructionImageFilterIUS3IUS3SE3.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkClosingByReconstructionImageFilterIF3IF3SE3.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkClosingByReconstructionImageFilterIUC3IUC3SE3.__New_orig__()\n i... | [
"0.7800396",
"0.77463865",
"0.77456737",
"0.73035336",
"0.72925544",
"0.72432643",
"0.72315735",
"0.7191846",
"0.7169465",
"0.71634096",
"0.7152158",
"0.7131833",
"0.7127582",
"0.71201",
"0.7117096",
"0.71168154",
"0.70939165",
"0.7092374",
"0.7081723",
"0.7074484",
"0.706879... | 0.81307817 | 0 |
itkClosingByReconstructionImageFilterIUS3IUS3SE3_cast(itkLightObject obj) > itkClosingByReconstructionImageFilterIUS3IUS3SE3 | def itkClosingByReconstructionImageFilterIUS3IUS3SE3_cast(obj: 'itkLightObject') -> "itkClosingByReconstructionImageFilterIUS3IUS3SE3 *":
return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUS3IUS3SE3_cast(obj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkClosingByReconstructionImageFilterIUC3IUC3SE3_cast(obj: 'itkLightObject') -> \"itkClosingByReconstructionImageFilterIUC3IUC3SE3 *\":\n return _itkClosingByReconstructionImageFilterPython.itkClosingByReconstructionImageFilterIUC3IUC3SE3_cast(obj)",
"def itkClosingByReconstructionImageFilterIF3IF3SE3_cas... | [
"0.90610385",
"0.90469825",
"0.89925444",
"0.863602",
"0.850568",
"0.8504291",
"0.8383299",
"0.8359962",
"0.8161705",
"0.8080607",
"0.80224025",
"0.79543",
"0.7725504",
"0.7709635",
"0.76784",
"0.70103747",
"0.7008954",
"0.7000842",
"0.69716895",
"0.6968204",
"0.69012684",
... | 0.93086535 | 0 |
When a user invites another user, current_state_events and invited_members should increase by exactly 1. | def test_invited(self) -> None:
self._perform_background_initial_update()
u1 = self.register_user("u1", "pass")
u1token = self.login("u1", "pass")
r1 = self.helper.create_room_as(u1, tok=u1token)
u2 = self.register_user("u2", "pass")
r1stats_ante = self._get_current_s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_invites_added(self):\n rsp = self.client.post('/join/join-here', data={'name': 'bob'})\n rsp_json = json.loads(rsp.data)\n\n invites = model.Invitation.query.filter_by(\n joining_user_id=rsp_json['new_user_id']).count()\n self.assertNotEqual(int(invites), 0)",
... | [
"0.62669677",
"0.6151333",
"0.6146201",
"0.6146201",
"0.5982737",
"0.5917056",
"0.58961165",
"0.5864554",
"0.58228034",
"0.5767328",
"0.56286234",
"0.5563426",
"0.55605423",
"0.5538223",
"0.5535634",
"0.5492615",
"0.5424227",
"0.53574204",
"0.5346219",
"0.53082675",
"0.527454... | 0.72165114 | 0 |
Return a list of dictionaries of vasp files. | def read_vasp_from_dir(path):
file_names = os.listdir(path)
# Convert all the VASP files into a list of dictionaries.
mts = []
for file_name in file_names:
file_path = os.path.join(path, file_name)
mt = read_vasp(file_path)
mts.append(mt)
return mts | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def read_vfiles(vfiles: List[Path]) -> Dict:\n models = {}\n for vfile in vfiles:\n assert vfile.is_file(), f\"{vfile} not found.\"\n model_name = vfile.parent.stem\n\n steps = {}\n for line in vfile.read_text(encoding=\"utf-8\").splitlines():\n entries = line.strip().s... | [
"0.617539",
"0.6120495",
"0.6105825",
"0.59928626",
"0.5938262",
"0.5936922",
"0.592364",
"0.58899593",
"0.58887285",
"0.5762474",
"0.57582617",
"0.57545364",
"0.57389504",
"0.57311535",
"0.57222027",
"0.5719902",
"0.57150817",
"0.5710185",
"0.56854993",
"0.56806296",
"0.5678... | 0.7573444 | 0 |
Create the loggedin 'index' page of our site. | def call(self, **kwargs):
# Format template
template = self._cw.vreg.template_env.get_template("startup.logged.jinja2")
html = template.render(
header_url=self._cw.data_url("creative/img/neurospin.jpg"),
moderator=False)
self.w(html) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def index():\n return render_template('index.html', username=session['username'])",
"def index():\n return render_template(\n 'index.html',\n nav=nav,\n title='Home Page',\n year=datetime.now().year\n )",
"def index():\n return render_template(\"index.html\", page_title=... | [
"0.8107877",
"0.7997907",
"0.7972935",
"0.79712015",
"0.7954257",
"0.7919938",
"0.7913251",
"0.7909175",
"0.7909175",
"0.7909175",
"0.79077786",
"0.790577",
"0.7902769",
"0.7892977",
"0.7884803",
"0.78772426",
"0.78772426",
"0.7877002",
"0.78501546",
"0.78501546",
"0.7825098"... | 0.0 | -1 |
Create the loggedin 'index' page of our site. | def call(self, **kwargs):
# Format template
template = self._cw.vreg.template_env.get_template("startup.logged.jinja2")
html = template.render(
header_url=self._cw.data_url("creative/img/neurospin.jpg"),
moderator=True)
self.w(html) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def index():\n return render_template('index.html', username=session['username'])",
"def index():\n return render_template(\n 'index.html',\n nav=nav,\n title='Home Page',\n year=datetime.now().year\n )",
"def index():\n return render_template(\"index.html\", page_title=... | [
"0.8106916",
"0.79984367",
"0.79739255",
"0.7972579",
"0.7955363",
"0.7920813",
"0.79142636",
"0.79101837",
"0.79101837",
"0.79101837",
"0.79087895",
"0.7906821",
"0.79035205",
"0.7894254",
"0.788577",
"0.7878649",
"0.78784114",
"0.78784114",
"0.7851118",
"0.7851118",
"0.7826... | 0.0 | -1 |
Create the anonymous 'index' page of our site. | def call(self, **kwargs):
# Get additional resources links
css = []
for path in ("creative/vendor/bootstrap/css/bootstrap.min.css",
"creative/vendor/font-awesome/css/font-awesome.min.css",
"creative/vendor/magnific-popup/magnific-popup.css",
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def index():\n return render_template(\"index.html\",\n title='Index')",
"def index():\n return render_template(\"index.html\", page_title=\"Home\")",
"def index():\r\n return render_template('index.html')",
"def index():\n return render_template('index.html'... | [
"0.81245923",
"0.81030095",
"0.80965626",
"0.8091156",
"0.8087692",
"0.8080872",
"0.80766207",
"0.8071298",
"0.80698764",
"0.80635685",
"0.80635685",
"0.80635685",
"0.805753",
"0.805753",
"0.8056894",
"0.80553776",
"0.8050975",
"0.8050975",
"0.8045612",
"0.8042853",
"0.802848... | 0.0 | -1 |
Determine if the input password is the same as the saved password. | def check_hashed_password(self, input_password):
return check_password_hash(self.password, input_password) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def check_password(self, password):\n return self.password == password",
"def do_passwords_match(self, password1, password2):\n return password1 == password2",
"def match(self,pwdmarked,password):\n pwd1 = self.cleanPassword(pwdmarked)\n pwd2 = self.cleanPassword(password)\n if not... | [
"0.7580237",
"0.74023604",
"0.7325568",
"0.72600126",
"0.7251598",
"0.7196048",
"0.7121065",
"0.71060854",
"0.70784754",
"0.70767325",
"0.7013002",
"0.69605476",
"0.69590265",
"0.6935857",
"0.69186306",
"0.69078624",
"0.6902102",
"0.68816036",
"0.68792725",
"0.6875489",
"0.68... | 0.0 | -1 |
Seteaza idul filmului cu idf | def setID(self, idf):
self.id = idf | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_id(self, value):\n pass",
"def set_id(self, refobj, identifier):\n cmds.setAttr(\"%s.identifier\" %refobj, identifier)",
"def set_id(self, id):\n self.id = id\n print(\"self id = \" + str(self.id))",
"def _set_id(self):\n raise NotImplementedError()",
"def set_id... | [
"0.6454677",
"0.6315507",
"0.61273503",
"0.6112127",
"0.6100905",
"0.60755306",
"0.6036128",
"0.6015184",
"0.59992284",
"0.59992284",
"0.59027857",
"0.59021324",
"0.59021324",
"0.59021324",
"0.59021324",
"0.59021324",
"0.59021324",
"0.59021324",
"0.59021324",
"0.59021324",
"0... | 0.76365787 | 0 |
Recursively returns an array of all the children of the comment. | def get_children(self):
children = []
for i in self.children_ids:
child = Comment(self.articleID, self.children_ids[i])
children.append(child)
children.extend(child.get_children())
return children | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def children(self):\n return Comment.objects.filter(parent=self)",
"def get_post_comments_recur(comment, comments, parent_comment_id, parent_post_id):\n if 'data' in comment:\n comment_data = comment['data']\n\n new_comment = None\n\n # a new comment exists at this layer, add it to... | [
"0.75854313",
"0.6678317",
"0.6461377",
"0.64051634",
"0.6313842",
"0.6257591",
"0.62333965",
"0.6224846",
"0.62101185",
"0.6195434",
"0.6167015",
"0.6159942",
"0.6151541",
"0.6142611",
"0.6128883",
"0.6128883",
"0.6128883",
"0.6127858",
"0.61252487",
"0.60670644",
"0.6054243... | 0.81902605 | 0 |
Writes a json to a file. | def write_json_file(json_data, filename):
try:
str_data = json.dumps(json_data)
with open(filename, "w") as f:
f.write(str_data)
return True
except MemoryError:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def write_json(dict_to_write, path, file_name):\n with open(path + \"/\" + file_name + \".json\", \"w\") as fp:\n json.dump(dict_to_write, fp)\n return None",
"def write(self, _filepath=None):\n _json_txt = json.dumps(self.json_dict, indent=2)\n self._write_json_text(_json_txt, _filepa... | [
"0.819274",
"0.81747776",
"0.8073897",
"0.80606484",
"0.8038543",
"0.79701835",
"0.79701835",
"0.7964928",
"0.7915473",
"0.7866166",
"0.7852432",
"0.783709",
"0.7828423",
"0.7807096",
"0.7796749",
"0.7784504",
"0.77769893",
"0.777142",
"0.7759483",
"0.77580965",
"0.7738858",
... | 0.745164 | 44 |
Returns all comments for the given article as array of jsons. | def get_comment_jsons(article_id, cookie):
url = "https://seekingalpha.com/account/ajax_get_comments?id=%s&type=Article&commentType=" % article_id
r = safe_request(url, cookie)
comments = []
if r.status_code != 404:
res = json.loads(r.text)
for comment in res['comments'].values():
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fetch_comments_by_article(api: NytApi, article_url: str, article_id: Optional[str] = None, pagination_size: int = 100) -> List[Dict]:\n\n comments = fetch_top_level_comments(api, article_url, pagination_size=pagination_size)\n fetch_replies(api, article_url, comments, pagination_size=pagination_size)\n\n... | [
"0.7669916",
"0.7027676",
"0.66095394",
"0.64120436",
"0.63289636",
"0.6322181",
"0.6295914",
"0.6266438",
"0.6222453",
"0.6061615",
"0.6031693",
"0.59384656",
"0.58510315",
"0.58484095",
"0.58295006",
"0.58199674",
"0.5789178",
"0.57719564",
"0.5771573",
"0.5750583",
"0.5725... | 0.82818395 | 0 |
Runs Lint, complexity, and tests commands | def commands_all():
lint()
complexity()
coverage() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def commands_lint():\n lint()",
"def _run_ci_test():\n _run_install(False)\n _run_coverage_html(False)\n _run_typecheck_xml(False)\n _run_lint(True)",
"def lint():\n load_env_vars('dev')\n from tools.static_code_analysis import Lint\n pylint = Lint()\n score = pylint.run_test()\n... | [
"0.7883877",
"0.69822717",
"0.69436914",
"0.6748843",
"0.6665134",
"0.66598284",
"0.66582566",
"0.6600934",
"0.6496596",
"0.64399034",
"0.6431389",
"0.6420695",
"0.6323446",
"0.62546813",
"0.62370545",
"0.6221371",
"0.6214749",
"0.62135",
"0.62023723",
"0.6201474",
"0.6170931... | 0.7931563 | 0 |
Finds and returns first item in iterable for which func(item) is True. | def finditem(func, seq):
return next((item for item in seq if func(item))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def find(function, iterable):\n for x in iterable:\n if function(x) == True:\n return x",
"def find_item(self, func):\n return next((_(x) for x in self._ if func(x)), None)",
"def first(iterable: Iterable[T1], predicate: Callable[[T1], bool]) -> Union[T1, None]:\n for x in iterab... | [
"0.7988461",
"0.77495664",
"0.7717934",
"0.76899344",
"0.7434396",
"0.73144096",
"0.71711123",
"0.7161674",
"0.7155707",
"0.71323633",
"0.70963126",
"0.70186496",
"0.6895164",
"0.6847543",
"0.672738",
"0.65167874",
"0.65167874",
"0.63901216",
"0.6385112",
"0.6377561",
"0.6319... | 0.7852561 | 1 |
Tokenizes the records into word lists. Filters out any stopwords in the list. | def tokenize_records(records):
contents = map(lambda record: record[constants.TEXT], records)
tokenized_records = [word_tokenize(record.lower()) for record in contents]
lemmatized_records = lemmatize_words(tokenized_records)
lemmatized_words = list()
for lemmatized_record in lemmatized_records:... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def filter_stopwords(tagged_records):\r\n print('Filtering stopwords')\r\n stop_words = list(stopwords.words('english'))\r\n stop_words.extend(string.punctuation)\r\n stop_words.extend(constants.CONTRACTIONS)\r\n stop_words.extend(constants.MYSQL_STOPWORDS)\r\n dictionary_words = set(nltk_words.w... | [
"0.72452193",
"0.7077772",
"0.69445366",
"0.68378806",
"0.6815603",
"0.6803412",
"0.6764989",
"0.6636974",
"0.660592",
"0.6603564",
"0.6567341",
"0.65446705",
"0.65397155",
"0.6497451",
"0.6485991",
"0.64620924",
"0.64603925",
"0.64366466",
"0.64336",
"0.64204353",
"0.6405418... | 0.6987618 | 2 |
Lemmatizes the words in the tokenized sentences. Lemmatization works best when the words are tagged with their corresponding part of speech, so the words are first tagged using nltk's `pos_tag` function. | def lemmatize_words(records):
print('Length of tagged_records: {:d}'.format(len(records)))
print('Total number of words: {:d}'.format(sum([len(record) for record in records])))
tagged_records = map(lambda record: pos_tag(record), records)
tagged_records = filter_stopwords(tagged_records)
lemmat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lemmatize_fun(self):\n tokens = str(self.doc).split()\n cleaned_tokens = None\n if self.lemmatize_method == 'wordnet':\n cleaned_tokens = [self.lemmatizer.lemmatize(token) for token in tokens]\n else:\n cleaned_tokens = [self.lemmatizer.stem(token) for token in... | [
"0.81326604",
"0.7824734",
"0.772454",
"0.76582474",
"0.7637215",
"0.761381",
"0.7557553",
"0.7555805",
"0.7549566",
"0.7537693",
"0.7510465",
"0.75047827",
"0.7411468",
"0.7392713",
"0.73595655",
"0.7343064",
"0.73306406",
"0.7284076",
"0.72693896",
"0.7268753",
"0.7250746",... | 0.7232239 | 23 |
Given two dicts, merge them into a new dict as a shallow copy. | def merge_two_dicts(x, y):
z = x.copy()
z.update(y)
return z | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mergedict(x, y):\n z = x.copy()\n z.update(y)\n return z",
"def merge_dicts(dict_a, dict_b):\n dict_c = dict_a.copy()\n dict_c.update(dict_b)\n return dict_c",
"def merge_two_dicts(x, y):\n\tz = x.copy()\n\tz.update(y)\n\treturn z",
"def merge_two_dicts(x, y):\r\... | [
"0.8501846",
"0.84466875",
"0.84402865",
"0.84311867",
"0.8428829",
"0.83499664",
"0.83499664",
"0.83499664",
"0.82086074",
"0.81884646",
"0.81880224",
"0.81880224",
"0.8082591",
"0.799002",
"0.7988879",
"0.77437025",
"0.77145404",
"0.7666824",
"0.76343286",
"0.7631216",
"0.7... | 0.8383174 | 12 |
Test if column elements "in" an iterable (e.g., a list of strings) | def column_values_in_list(col, test_list):
test = np.array([c_i in test_list for c_i in col])
return test | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __contains__(self, item):\r\n if isinstance(item, six.string_types):\r\n return item in self.iternames()\r\n else:\r\n # let's assume we were given a column\r\n return item in self.iterall()",
"def is_in(elt, seq):\n\treturn any(x is elt for x in seq)",
"def i... | [
"0.7237073",
"0.65824205",
"0.6559596",
"0.6466056",
"0.64289176",
"0.62798744",
"0.6222516",
"0.6173602",
"0.61678326",
"0.61554897",
"0.6114213",
"0.6100592",
"0.6040192",
"0.60400015",
"0.6017045",
"0.5986568",
"0.59841007",
"0.59723645",
"0.5966105",
"0.5962353",
"0.59414... | 0.66550386 | 1 |
Get a set of regexes matching the leftmost symbol in the complete expansion of this symbol. | def getLeftRegexes(self):
return self.get_xmost_expansion_regexes(0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getRightRegexes(self):\n return self.get_xmost_expansion_regexes(-1)",
"def get_xmost_expansion_regexes(self,direction,alreadySeen=()):\n xmost_regexes = Set()\n if self.get_terminal_equivalent_regexes() != None:\n return self.get_terminal_equivalent_regexes()\n for pro... | [
"0.73142225",
"0.7121889",
"0.5902702",
"0.56433284",
"0.5445919",
"0.5441216",
"0.5427524",
"0.524531",
"0.5221194",
"0.52193326",
"0.5180444",
"0.5169028",
"0.51615506",
"0.5124692",
"0.51234084",
"0.5096742",
"0.50911814",
"0.5068668",
"0.50525224",
"0.50039166",
"0.499190... | 0.8371362 | 0 |
Returns the vocabulary ID of the word argument If the word is not in the vocabulary, it is added | def getVocabID(word):
return str(vocabulary[word]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def word_to_id(self, word):\r\n if word in self._vocab:\r\n return self._vocab[word]\r\n else:\r\n return self._unk_id",
"def word_to_id(vocab, unk_id, word):\n if word in vocab:\n return vocab[word]\n else:\n return unk_id",
"def _add_new_word(self, word):\n if w... | [
"0.7652051",
"0.75911736",
"0.7182673",
"0.7134602",
"0.7083004",
"0.70689493",
"0.70547587",
"0.70503885",
"0.6916971",
"0.6653913",
"0.6618128",
"0.65741044",
"0.6569239",
"0.65363044",
"0.6474226",
"0.6474226",
"0.6433574",
"0.6410126",
"0.6351854",
"0.6268062",
"0.6255719... | 0.8102371 | 0 |
A property that retrieves node block count | def block_count(self):
data = {"action" : "block_count"}
return rpc_request(self.uri, data) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getblockcount(self):\n return self.proxy.getblockcount()",
"def node_count(self):\n return self._node_count",
"def node_count(self) -> int:\n return pulumi.get(self, \"node_count\")",
"def count(self):\n return self.__tree.node_count",
"def rpc_getblockcount(self) -> int:\n ... | [
"0.7823993",
"0.7821537",
"0.75998",
"0.738853",
"0.7387408",
"0.73441863",
"0.73441863",
"0.7307512",
"0.71963006",
"0.7127365",
"0.7127365",
"0.7120365",
"0.7112858",
"0.710234",
"0.70178014",
"0.69800454",
"0.695307",
"0.69326675",
"0.69316536",
"0.6919706",
"0.6886294",
... | 0.6929525 | 19 |
Resample the value of lambda. | def _sample_lam(self, cur_y, cur_z):
old_loglik = self._loglik(cur_y, cur_z)
old_lam = self.lam
# modify the feature ownership matrix
self.lam = np.random.beta(1,1)
new_loglik = self._loglik(cur_y, cur_z)
move_prob = 1 / (1 + np.exp(old_loglik - new_loglik));
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def resample(self):\n pass",
"def resample_transform(self, resample_kwargs, arg, *args, **kwargs):\n return ResampleDefault.register(pandas.core.resample.Resampler.transform)(\n self, resample_kwargs, arg, *args, **kwargs\n )",
"def resample_data(self, data, freq, resampler='mea... | [
"0.6800797",
"0.594981",
"0.58791405",
"0.57929665",
"0.57797676",
"0.5745639",
"0.57158685",
"0.5711152",
"0.5679727",
"0.5620864",
"0.5531663",
"0.551469",
"0.5511069",
"0.5433901",
"0.5403918",
"0.5312598",
"0.527585",
"0.5272625",
"0.5234022",
"0.5219971",
"0.51962537",
... | 0.0 | -1 |
Removes all duplicates and None values from a list. | def remove_duplicates_and_nones(items):
new_list = [item for item in items if item is not None]
return list(set(new_list)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def removeDuplicates(list):\n\treturn set((item for item in list))",
"def removeDuplicates(list):\n\treturn Set((item for item in list))",
"def remove_identical(list):\n seen = set()\n seen_add = seen.add\n return [x for x in list if not (x in seen or seen_add(x))]",
"def remove_duplicates(somelist)... | [
"0.7455466",
"0.7372526",
"0.73472977",
"0.7192396",
"0.70618576",
"0.6948841",
"0.68821234",
"0.67630893",
"0.67591316",
"0.6743797",
"0.6683802",
"0.66673774",
"0.6657598",
"0.6640538",
"0.6638222",
"0.65908176",
"0.65785956",
"0.65566224",
"0.6555285",
"0.6516476",
"0.6502... | 0.7970348 | 0 |
Returns true if both objects are equal | def __eq__(self, other):
if not isinstance(other, UserStoredValueCard):
return False
return self.__dict__ == other.__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):
return not self == other | {
"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.0 | -1 |
Get the range in the current DistanceUnit (PIDSource interface). | def pidGet(self) -> float:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getRange(self):\n return self.range",
"def targetRange(self):\n return self._getAttribute(Attribute.targetRange)",
"def range (self):\n return self._range",
"def range (self):\n return self._range",
"def range(self):\n \n return self._range",
"def range(self):\n ... | [
"0.7241147",
"0.6898586",
"0.6886239",
"0.6886239",
"0.67510337",
"0.6646824",
"0.66334254",
"0.66187465",
"0.6527907",
"0.64699876",
"0.643279",
"0.6339574",
"0.63262683",
"0.6249431",
"0.62176657",
"0.6204094",
"0.61992127",
"0.61923754",
"0.6191738",
"0.61867356",
"0.61834... | 0.0 | -1 |
Set the current DistanceUnit that should be used for the PIDSource interface. | def setDistanceUnits(self, units: Unit) -> None:
self.units = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_unit(self,unit):\n self.unit = unit",
"def measurement_unit(self, measurement_unit):\n\n self._measurement_unit = measurement_unit",
"def set_units(self, units):\n self.units = units",
"def set_distance(self):\n distance = self.gui.doubleSpinBox_distance.value()\n u... | [
"0.6926105",
"0.65910643",
"0.65705705",
"0.63681585",
"0.63088405",
"0.63088405",
"0.63088405",
"0.62139606",
"0.62139606",
"0.62139606",
"0.6166226",
"0.61576456",
"0.6138217",
"0.60676545",
"0.5938943",
"0.5925391",
"0.5922442",
"0.5916443",
"0.58996546",
"0.589325",
"0.58... | 0.7460237 | 0 |
Get the current DistanceUnit that is used for the PIDSource interface. | def getDistanceUnits(self) -> Unit:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_unit(self):\n return self.unit",
"def unit_of_measurement(self):\n return self._unit",
"def unit_of_measurement(self):\n return self._unit",
"def unit_of_measurement(self):\n return self._unit",
"def unit_of_measurement(self):\n return self._unit",
"def unit_of_... | [
"0.75686616",
"0.7427329",
"0.7427329",
"0.7427329",
"0.7427329",
"0.7427329",
"0.7427329",
"0.7427329",
"0.7377086",
"0.7365013",
"0.7365013",
"0.7363579",
"0.73491627",
"0.7274137",
"0.72288597",
"0.7213751",
"0.72092575",
"0.72092575",
"0.72092575",
"0.72092575",
"0.720925... | 0.72225964 | 15 |
Sample a batch of experiences and return priority weights, indices. | def sample(self, num_items: int, beta: float) -> SampleBatchType:
assert beta >= 0.0
idxes = self._sample_proportional(num_items)
weights = []
batch_indexes = []
p_min = self._it_min.min() / self._it_sum.sum()
max_weight = (p_min * len(self._storage))**(-beta)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sample(self, batch_size):\n max_IS_weight = 0\n assert len(self) >= batch_size, \"Can't sample \" + str(batch_size) +\\\n \" unique elements if there aren't that many elements.\"\n ids = set()\n IS_weights = dict()\n while len(ids) < batch_size and len(self.unplaye... | [
"0.6929431",
"0.6877802",
"0.66701597",
"0.6591493",
"0.64984345",
"0.6469019",
"0.63505995",
"0.63235873",
"0.6310861",
"0.63076293",
"0.62666065",
"0.62666065",
"0.62622905",
"0.6256672",
"0.625465",
"0.6249708",
"0.6248949",
"0.6164689",
"0.6141241",
"0.6109112",
"0.600024... | 0.5157856 | 82 |
Update priorities of sampled transitions. sets priority of transition at index idxes[i] in buffer to priorities[i]. | def update_priorities(self, idxes, priorities):
assert len(idxes) == len(priorities)
for idx, priority in zip(idxes, priorities):
assert priority > 0
assert 0 <= idx < len(self._storage)
delta = priority**self._alpha - self._it_sum[idx]
self._prio_change_s... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def update_priorities(self, idxes, priorities):\n assert len(idxes) == len(priorities)\n for ndx, priority in zip(idxes, priorities):\n assert priority > 0\n assert 0 <= ndx < len(self.memory)\n self.iter_sum[ndx] = priority ** self.alpha\n self.iter_min[nd... | [
"0.7280941",
"0.71658033",
"0.71581376",
"0.71581376",
"0.7075748",
"0.70220536",
"0.6980962",
"0.6799073",
"0.6607631",
"0.6557839",
"0.6351649",
"0.62263006",
"0.6114598",
"0.58433586",
"0.5759857",
"0.56959903",
"0.535149",
"0.5245115",
"0.52051663",
"0.51436406",
"0.51369... | 0.7185747 | 1 |
Convenience method for executing the callable `func` as a transaction while watching all keys specified in `watches`. The 'func' callable should expect a single argument which is a Pipeline object. Copied directly from redispy. | def transaction(self, func, *watches, **kwargs):
shard_hint = kwargs.pop('shard_hint', None)
value_from_callable = kwargs.pop('value_from_callable', False)
watch_delay = kwargs.pop('watch_delay', None)
with self.pipeline(True, shard_hint) as pipe:
while 1:
try... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def execWrap(func):\n @wraps(func)\n def addAndExec(self, *args, **kwargs):\n execute = False\n if 'execute' in kwargs:\n execute = kwargs.pop('execute')\n if 'minimal_reset' in kwargs:\n minimal_reset = kwargs.pop('minimal_reset')\n ... | [
"0.53148216",
"0.5277638",
"0.5261236",
"0.5231447",
"0.52079254",
"0.51959705",
"0.5179855",
"0.51653",
"0.51292115",
"0.5121816",
"0.5111379",
"0.50960034",
"0.5044633",
"0.5024267",
"0.49387085",
"0.4937853",
"0.49340802",
"0.48331815",
"0.48177177",
"0.481186",
"0.4805152... | 0.8057213 | 0 |
Get one or more configuration parameters. | def config_get(self, pattern='*'):
result = {}
for name, value in self.redis_config.items():
if fnmatch.fnmatch(name, pattern):
try:
result[name] = int(value)
except ValueError:
result[name] = value
return result | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def config(self) -> pulumi.Input['ConfigArgs']:\n return pulumi.get(self, \"config\")",
"def parameters(self) -> dict:\n return self._config.get('parameters', dict())",
"def fusion_api_get_configuration(self, uri=None, param='', api=None, headers=None):\n return self.configuration.get(... | [
"0.70478404",
"0.69425005",
"0.691093",
"0.6718028",
"0.66825086",
"0.66734236",
"0.66723853",
"0.6663095",
"0.6643404",
"0.66340315",
"0.66195464",
"0.6617083",
"0.6614173",
"0.6556784",
"0.6538835",
"0.65078986",
"0.65043414",
"0.6480525",
"0.64641625",
"0.64641625",
"0.646... | 0.0 | -1 |
Get model given name. Raise Error if given name does not exist. | def get_model(model_name: str, *args, **kwargs):
try:
if '.' in model_name:
module_name, class_name = model_name.rsplit('.', 1)
else:
module_name = model_name
class_name = model_name.capitalize().replace("_","")
model_module = import_module('.' + module_n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_model_by_name(cls, name):\n model_name = inflection.camelize(name) # class name of the model to use\n model = cls.models[model_name]\n return model",
"def get_model(name):\n\n try:\n from .model_defs import get_model_from_def\n model = get_model_from_def(name)\n ... | [
"0.8452525",
"0.7956718",
"0.7859035",
"0.76608413",
"0.7627817",
"0.73143506",
"0.718564",
"0.71415746",
"0.7118877",
"0.70896304",
"0.70759475",
"0.7051745",
"0.70451325",
"0.697059",
"0.69513494",
"0.6926367",
"0.67914087",
"0.6746827",
"0.67216027",
"0.67086405",
"0.66807... | 0.6948132 | 15 |
Detroy input stream to prevent memory issues. | def destroy_input_stream(self):
# Destroy the stream
del self.inp
# Garbage collect
gc.collect() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def clear_stream(s):\n s.truncate(0)\n s.seek(0)\n return s",
"def finalize(self):\r\n self.stream.finalize()",
"def reset_output(self):\r\n self.output.seek(0)\r\n self.output.truncate(0)",
"def close_file_deserializer(self):\n if self._input_file:\n self._inp... | [
"0.66395247",
"0.64044696",
"0.63813037",
"0.63527256",
"0.6342004",
"0.6325318",
"0.6256812",
"0.62027556",
"0.61736",
"0.61630183",
"0.6154856",
"0.61299396",
"0.6100422",
"0.608274",
"0.6031595",
"0.60282236",
"0.59990877",
"0.5993038",
"0.5992711",
"0.5988521",
"0.5987833... | 0.84508026 | 0 |
Min of the input. | def min(*x, na_rm: bool = False) -> Any:
fun = numpy.nanmin if na_rm else numpy.min
x = Collection(*x) # flatten
return fun(x) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def min(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"min\")",
"def min(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"min\")",
"def min(self) -> Optional[pulumi.Input[int]]:\n return pulumi.get(self, \"min\")",
"def min(self) -> Optional[pulumi.Input[int]]:\n r... | [
"0.8590079",
"0.8590079",
"0.8307363",
"0.8307363",
"0.8154198",
"0.8110683",
"0.8110683",
"0.8000243",
"0.79795563",
"0.79654795",
"0.7900352",
"0.789427",
"0.78585047",
"0.78585047",
"0.7856183",
"0.7856183",
"0.7856183",
"0.7856183",
"0.7856183",
"0.7856183",
"0.7856183",
... | 0.0 | -1 |
Max of the input. | def max(*x, na_rm: bool = False) -> Any:
fun = numpy.nanmax if na_rm else numpy.max
x = Collection(*x) # flatten
return fun(x) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def max(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"max\")",
"def max(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"max\")",
"def max(self) -> Optional[pulumi.Input[int]]:\n return pulumi.get(self, \"max\")",
"def max(self) -> Optional[pulumi.Input[int]]:\n r... | [
"0.850224",
"0.850224",
"0.8206265",
"0.8206265",
"0.8124024",
"0.8091693",
"0.80589396",
"0.7998871",
"0.7998871",
"0.7975412",
"0.79285854",
"0.7922329",
"0.79220265",
"0.78354466",
"0.78289443",
"0.77224207",
"0.77022433",
"0.76999193",
"0.76990634",
"0.76990634",
"0.76990... | 0.0 | -1 |
Get the min value rowwisely | def pmin(
*x: NumericType,
na_rm: bool = False
) -> Iterable[float]:
maxlen = max(map(length_of, x))
x = (recycle_value(elem, maxlen) for elem in x)
return Array([min(elem, na_rm=na_rm) for elem in zip(*x)]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_min(self):\n min_value= self.df[self.col_name].min()\n return min_value",
"def min(self):\n return self._reduce_for_stat_function(F.min, only_numeric=False)",
"def min(self):\n return numpy.ma.min(self.data)",
"def min(self, column):\n return self.aggregate('min', *[column]... | [
"0.782707",
"0.7357249",
"0.7310394",
"0.7267327",
"0.7247376",
"0.7238652",
"0.72385776",
"0.7219749",
"0.71746194",
"0.7093921",
"0.7066196",
"0.7049186",
"0.7040393",
"0.7018711",
"0.70144945",
"0.7006523",
"0.6999813",
"0.69992757",
"0.6997472",
"0.6953532",
"0.69523144",... | 0.0 | -1 |
Returns the cross product of points of p0,p1 and p2. The value returned is +ve, ve or 0 | def cross_product(p0,p1,p2):
return (((p1[0]-p0[0])*(p2[1]-p0[1]))-((p2[0]-p0[0])*(p1[1]-p0[1]))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def crossProduct(self, p1, p2):\n return (p1.x * p2.y - p1.y * p2.x)",
"def cross(v1: Vec2, v2: Vec2) -> float:\n return v1.x * v2.x + v1.y * v2.y",
"def cross_product(v1, v2):\n return cg3d_vector.CG3dVector(\n v1[1] * v2[2] - v2[1] * v1[2],\n v1[2] * v2[0] - v2[2] * v1[0],\n ... | [
"0.8138234",
"0.769888",
"0.7548699",
"0.7309561",
"0.7254616",
"0.72241324",
"0.6959252",
"0.6931294",
"0.6925192",
"0.6903619",
"0.6861726",
"0.68126595",
"0.67831093",
"0.67740345",
"0.6760308",
"0.67376053",
"0.6660316",
"0.663867",
"0.6633338",
"0.6600308",
"0.6576896",
... | 0.79832125 | 1 |
Returns random points for input choice 1 from menu screen | def create_random_points(n):
return [(random.randint(0,n),random.randint(0,n)) for i in range(n)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getRandom(self) -> int:\n # print(self.ind)\n return choice(self.items)",
"def take_step(self):\n choices_of_steps = [(0,1), (1,0), (0,-1), (-1,0)]\n return random.choices(choices_of_steps)[0]",
"def choose_next(self, round):\n return random.choice(self.possible_coords)",... | [
"0.63397044",
"0.6195852",
"0.6182718",
"0.61597955",
"0.6142081",
"0.6111215",
"0.61075026",
"0.6082492",
"0.6067223",
"0.6067223",
"0.6067223",
"0.6061769",
"0.60590965",
"0.60560966",
"0.60460615",
"0.60373634",
"0.6031153",
"0.6018625",
"0.59991306",
"0.5979736",
"0.59294... | 0.0 | -1 |
Generate a name for avatar image file Simply use datetime string as filename, jpg as suffix | def _file_name(size):
timestamp = str(int(time.time()))
return '%s_%dx%d.%s' % (timestamp, size, size, 'jpg') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def generate_image_filename():\n now = datetime.now().strftime('%a-%w-%b-%H:%M:%S')\n return 'CCTV_{0}.jpg'.format(now)",
"def filename_generate(image_class, size=12, chars=string.ascii_uppercase + string.ascii_lowercase + string.digits):\n\tnew_filename = time.strftime(\"%d-%m-%Y_\")\n\tnew_filename = new... | [
"0.8105204",
"0.76129276",
"0.75367516",
"0.7397509",
"0.7351478",
"0.7337333",
"0.7329554",
"0.7312543",
"0.7285985",
"0.7266571",
"0.72650814",
"0.72599554",
"0.7217472",
"0.7170067",
"0.7154607",
"0.7134956",
"0.71233445",
"0.7043054",
"0.7041606",
"0.6987955",
"0.6941625"... | 0.75608873 | 2 |
Bag of Words based on word ngrams | def vectorized_n_gram(n, x_train, x_test, y_train, y_test, type):
## Şimdilik char_wb için tfidf bow implement edilmedi.
############################################################
babaTest = pd.read_excel("TOP Konular mail içerikleri_test.xlsx")
babaTest = babaTest.astype(str)
x_baba_test = baba... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ngrams(word, size):\n expanded = \"^\" + word + \"$\"\n for start in range(len(expanded) - size + 1):\n yield expanded[start:start + size]",
"def ngrams(words, n=1):\n return [tuple(words[j:j + n]) for j in range(len(words) - n + 1)]",
"def bagOfWords(self,phrase):\n return self._sup... | [
"0.72996205",
"0.71746254",
"0.715155",
"0.707093",
"0.6997707",
"0.6972695",
"0.69326085",
"0.6924543",
"0.6896901",
"0.68749136",
"0.68721634",
"0.6871388",
"0.6871388",
"0.68451416",
"0.6769288",
"0.67209035",
"0.6719323",
"0.6717231",
"0.66925454",
"0.6677957",
"0.6634902... | 0.0 | -1 |
Adds a directed edge between the Vertex and . The method serves primarily as a wrapper for the add_parent and add_child methods of the Vertex class, using them for the actual creation of the edge. It does, however, perform the transform lookup, pulling the integer transform key, used for cleaner transform selection sta... | def add_edge(self, pVertex, tName, tParameters):
try:
tKey = self.transformKeyMap[str(tName.lower())]
except KeyError:
raise EdgeError(0)
tData = [tKey]
tData.extend(tParameters)
tDataTuple = tuple(tData)
self._parents[pVertex] = tDataTuple | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_edge(self, v1, v2):\n # TODO\n\n # add directed edges\n self.vertices[v1].add(v2)\n # self.vertices[v2].add(v1)",
"def add_edge(self, key_a, key_b, distance=1, bidirectional=True):\n # Check that both keys exist\n if (not key_a in self.vertices) or (not key_b in ... | [
"0.7088616",
"0.7086955",
"0.70612395",
"0.7032066",
"0.7028317",
"0.68844146",
"0.6869369",
"0.6865316",
"0.6814384",
"0.67782015",
"0.67664427",
"0.6727315",
"0.6684763",
"0.66716796",
"0.6634592",
"0.65796626",
"0.6547359",
"0.6531245",
"0.6526196",
"0.65208995",
"0.651987... | 0.63053215 | 52 |
Returns the number of _vertices in the DiGraph. | def __len__(self):
return len(self._vertices) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_num_vertices(self):\n\n return self._graph_state.get_num_vertices()",
"def num_vertices(self):\r\n return len(self.__graph_dict.keys())",
"def return_num_vertices(self):\n return self.__size",
"def num_vertices(self):\n return len(self.vertices)",
"def num_vertices(self)... | [
"0.9009618",
"0.8918056",
"0.8719184",
"0.8709135",
"0.8709135",
"0.86308485",
"0.86300266",
"0.86109376",
"0.8605915",
"0.8483538",
"0.83879566",
"0.83095336",
"0.82329476",
"0.80985403",
"0.80841863",
"0.79886913",
"0.7685377",
"0.75848806",
"0.7424543",
"0.7330732",
"0.732... | 0.7690579 | 16 |
Returns an iterator over the _vertices of the DiGraph. | def __iter__(self):
return iter(self._vertices.values()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vertices(self):\n return list(self._graph)",
"def vertex_generator(self):\n for V in self.Vrepresentation():\n if V.is_vertex():\n yield V",
"def vertices(self):\n return list(self.__graph.values())",
"def iterator(self):\n return _osgAnimation.Vertex... | [
"0.75842625",
"0.75599456",
"0.7426703",
"0.7411275",
"0.7379493",
"0.7375601",
"0.7295431",
"0.7289917",
"0.7244097",
"0.7220428",
"0.7218915",
"0.72055215",
"0.72055215",
"0.72055215",
"0.7205151",
"0.71666706",
"0.7162006",
"0.71552646",
"0.71092325",
"0.7070591",
"0.70705... | 0.752282 | 2 |
Adds a vertex to the DiGraph. The method takes an instance of the Vertex class, and adds it to the DiGraph. | def __add__(self, vertex):
if isinstance(vertex, Vertex):
vName = vertex.name
self._vertices[vName] = vertex | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_vertex(self, vertex):\n if isinstance(vertex, Vertex):\n self.vertices.append(vertex)\n return\n raise TypeError('Is not vertex instance!')",
"def add_vertex(self, vertex):\n raise NotImplementedError",
"def add_vertex(self, vertex_name: n):\n new_verte... | [
"0.839988",
"0.8266076",
"0.7863224",
"0.78617746",
"0.77846",
"0.7671091",
"0.76142114",
"0.761227",
"0.7551998",
"0.7430998",
"0.73857087",
"0.7321715",
"0.7315341",
"0.72906744",
"0.72805184",
"0.72122943",
"0.7192428",
"0.7165094",
"0.71279556",
"0.7126801",
"0.71002793",... | 0.7940988 | 2 |
Adds a vertex to the graph, indexed by . | def __setitem__(self, key, vertex):
self._vertices[key] = vertex | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def add_vertex(self, vertex):\n raise NotImplementedError",
"def add_vertex(self, vertex_id):\n pass # TODO",
"def add_vertex(self, key):\n self.vertCount += 1\n addedVertex = vertex.Vertex(key)\n self.vertList[key] = addedVertex\n return addedVertex",
"def add_vert... | [
"0.821257",
"0.81203675",
"0.80312705",
"0.8026992",
"0.80106145",
"0.79945177",
"0.79870915",
"0.7981329",
"0.793841",
"0.7836011",
"0.7836011",
"0.7829348",
"0.7808756",
"0.78083533",
"0.78062665",
"0.7786199",
"0.7772358",
"0.77373165",
"0.7682284",
"0.76774466",
"0.767596... | 0.6810984 | 64 |
Test sending of first notification to Reps to fill reports. | def test_send_notification(self):
management.call_command('send_first_report_notification', [], {})
eq_(len(mail.outbox), 4) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_send_notification_with_reports_filled(self, fake_requests_obj):\n # act like it's March 2012\n fake_date = datetime.datetime(year=2012, month=3, day=1)\n (fake_requests_obj.expects_call().returns(fake_date))\n\n management.call_command('send_second_report_notification', [], {})... | [
"0.7282793",
"0.6998844",
"0.69657487",
"0.69280744",
"0.6790066",
"0.6788113",
"0.676636",
"0.66872704",
"0.6670142",
"0.66388834",
"0.66236424",
"0.6470535",
"0.6445497",
"0.64040613",
"0.638898",
"0.63687027",
"0.63580495",
"0.63580495",
"0.6254688",
"0.61826825",
"0.61626... | 0.7791854 | 0 |
Test sending of second notification, with reports filled. | def test_send_notification_with_reports_filled(self, fake_requests_obj):
# act like it's March 2012
fake_date = datetime.datetime(year=2012, month=3, day=1)
(fake_requests_obj.expects_call().returns(fake_date))
management.call_command('send_second_report_notification', [], {})
e... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_send_notification(self):\n management.call_command('send_first_report_notification', [], {})\n eq_(len(mail.outbox), 4)",
"def send_notification(self):\n s1 = System()\n b1 = Books(\"1984\", \"George Orwell\", \"Harvill Secker\", \"1949\", \"0123456789123\")\n m1 = Mem... | [
"0.7743362",
"0.71214473",
"0.6979808",
"0.6886839",
"0.6880504",
"0.6845977",
"0.6814366",
"0.68137115",
"0.6703214",
"0.6592325",
"0.6591481",
"0.65565777",
"0.64688444",
"0.6442306",
"0.6411243",
"0.63932765",
"0.6378398",
"0.63436633",
"0.6312011",
"0.62923646",
"0.627122... | 0.7341328 | 1 |
Test sending of second notification, with missing reports. | def test_send_notification_without_reports_filled(self, fake_requests_obj):
# act like it's March 2012
fake_date = datetime.datetime(year=2012, month=3, day=1)
(fake_requests_obj.expects_call().returns(fake_date))
# delete existing reports
Report.objects.all().delete()
m... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_send_notification(self):\n management.call_command('send_first_report_notification', [], {})\n eq_(len(mail.outbox), 4)",
"def test_send_notification_with_reports_filled(self, fake_requests_obj):\n # act like it's March 2012\n fake_date = datetime.datetime(year=2012, month=3,... | [
"0.74574023",
"0.7022133",
"0.69846004",
"0.6812609",
"0.6741332",
"0.67369825",
"0.6715395",
"0.66337854",
"0.6526184",
"0.65143293",
"0.64968574",
"0.64968574",
"0.64627314",
"0.6435859",
"0.6428442",
"0.6369802",
"0.6347237",
"0.6345641",
"0.633139",
"0.6304101",
"0.623091... | 0.6821415 | 3 |
Test sending of second notification, with reports filled. | def test_send_notification_with_reports_filled(self, fake_requests_obj):
# act like it's March 2012
fake_date = datetime.datetime(year=2012, month=3, day=1)
(fake_requests_obj.expects_call().returns(fake_date))
management.call_command('send_third_report_notification', [], {})
eq... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_send_notification(self):\n management.call_command('send_first_report_notification', [], {})\n eq_(len(mail.outbox), 4)",
"def test_send_notification_with_reports_filled(self, fake_requests_obj):\n # act like it's March 2012\n fake_date = datetime.datetime(year=2012, month=3,... | [
"0.7743362",
"0.7341328",
"0.71214473",
"0.6979808",
"0.6886839",
"0.6880504",
"0.6845977",
"0.6814366",
"0.68137115",
"0.6592325",
"0.6591481",
"0.65565777",
"0.64688444",
"0.6442306",
"0.6411243",
"0.63932765",
"0.6378398",
"0.63436633",
"0.6312011",
"0.62923646",
"0.627122... | 0.6703214 | 9 |
Test sending of second notification, with missing reports. | def test_send_notification_without_reports_filled(self, fake_requests_obj):
# act like it's March 2012
fake_date = datetime.datetime(year=2012, month=3, day=1)
(fake_requests_obj.expects_call().returns(fake_date))
# delete existing reports
Report.objects.all().delete()
m... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_send_notification(self):\n management.call_command('send_first_report_notification', [], {})\n eq_(len(mail.outbox), 4)",
"def test_send_notification_with_reports_filled(self, fake_requests_obj):\n # act like it's March 2012\n fake_date = datetime.datetime(year=2012, month=3,... | [
"0.7454722",
"0.7021634",
"0.6981",
"0.6819659",
"0.6810665",
"0.6738046",
"0.6733875",
"0.67120576",
"0.66324306",
"0.65238506",
"0.6511647",
"0.6493713",
"0.6493713",
"0.64602953",
"0.6433383",
"0.6426678",
"0.6370207",
"0.634247",
"0.63279533",
"0.6301272",
"0.62276834",
... | 0.6344522 | 17 |
Test sending of second notification, with reports missing. | def test_send_notification_without_reports_filled(self, fake_requests_obj):
# act like it's March 2012
fake_date = datetime.datetime(year=2012, month=3, day=1)
(fake_requests_obj.expects_call().returns(fake_date))
# delete existing reports
Report.objects.all().delete()
m... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_send_notification(self):\n management.call_command('send_first_report_notification', [], {})\n eq_(len(mail.outbox), 4)",
"def send_notification(self):\n s1 = System()\n b1 = Books(\"1984\", \"George Orwell\", \"Harvill Secker\", \"1949\", \"0123456789123\")\n m1 = Mem... | [
"0.7497654",
"0.7054764",
"0.7006521",
"0.68384385",
"0.6808059",
"0.67835057",
"0.6757792",
"0.671584",
"0.6630743",
"0.65955675",
"0.65955675",
"0.65299946",
"0.64793164",
"0.64531213",
"0.64478344",
"0.64283466",
"0.64222866",
"0.6371872",
"0.6371208",
"0.63673604",
"0.625... | 0.6181302 | 29 |
Get the precision of a classifier compared to the correct values. | def precision(classifier_output, true_labels):
# TODO: finish this.
conf_matrix = confusion_matrix(classifier_output, true_labels)
return conf_matrix[0][0]/(conf_matrix[0][0] + conf_matrix[1][0]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def precision(self):\n self.overall_precision = precision_score(\n self.y_true, self.y_pred, average = self.average_type).round(self.digits_count_fp)\n self.classes_precision = precision_score(\n self.y_true, self.y_pred, average = None).round(self.digits_count_fp)",
"def getP... | [
"0.78460306",
"0.77924854",
"0.7721495",
"0.7632088",
"0.7632088",
"0.7632088",
"0.7632088",
"0.7632088",
"0.7632088",
"0.76283264",
"0.7591066",
"0.7591066",
"0.7591066",
"0.7591066",
"0.7591066",
"0.7591066",
"0.7591066",
"0.7591066",
"0.7591066",
"0.7591066",
"0.7591066",
... | 0.7981426 | 0 |
Get the recall of a classifier compared to the correct values. | def recall(classifier_output, true_labels):
# TODO: finish this.
conf_matrix = confusion_matrix(classifier_output, true_labels)
return conf_matrix[0][0]/(conf_matrix[0][0] + conf_matrix[0][1]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def recall(prediction, ground_truth):\n return precision_recall_f1(prediction, ground_truth)[1]",
"def show_recall(self):\r\n return round((recall_score(self.actual, self.predicted)*100),2)",
"def recall(self):\n self.overall_recall = recall_score(\n self.y_true, self.y_pred, averag... | [
"0.7775078",
"0.7426704",
"0.7384419",
"0.7344325",
"0.72767925",
"0.71532047",
"0.7139609",
"0.71211946",
"0.7093482",
"0.7059651",
"0.70577824",
"0.7024072",
"0.69816667",
"0.69718194",
"0.69718194",
"0.69718194",
"0.69718194",
"0.69718194",
"0.69718194",
"0.6970174",
"0.69... | 0.742576 | 2 |
Split dataset into folds. Randomly split data into k equal subsets. Fold is a tuple (training_set, test_set). Set is a tuple (examples, classes). | def generate_k_folds(dataset, k):
# TODO: finish this.
folds = []
dataset = np.concatenate((dataset[0], np.array(dataset[1]).reshape(-1,1)), axis=1)
dataset_shape = dataset.shape
shape_test_set = int(round(dataset_shape[0]/k,0))
split_dataset = np.array_split(dataset,k,axis=0)
for i in rang... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k_random_subsets(x, y, k):\n if k > len(y):\n raise Exception(\n \"Cannot split a dataset into more folds than it has rows.\")\n if k < 2:\n raise Exception(\"Cannot split a dataset into fewer than 2 fold.\")\n # Randomly shuffle dataset\n y = [[i] for i in y]\n z = np.a... | [
"0.7701635",
"0.7620068",
"0.7475226",
"0.73234177",
"0.7238",
"0.7129637",
"0.7060088",
"0.7036836",
"0.70088094",
"0.6983006",
"0.69669735",
"0.69508415",
"0.68966025",
"0.6885709",
"0.68854755",
"0.68635947",
"0.6855857",
"0.68378973",
"0.6836148",
"0.6834271",
"0.6826395"... | 0.8221672 | 0 |
Display occurrences of positive numbers using vectorization. Flattens down data into a 1d array, then creates a dictionary of how often a positive number appears in the data and displays that value. ie, [(1203,3)] = integer 1203 appeared 3 times in data. | def vectorized_flatten(self, data):
# TODO: finish this.
flatten_data = data.flatten()
flatten_data = flatten_data[flatten_data>0]
return Counter(flatten_data).items() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def non_vectorized_flatten(self, data):\n\n unique_dict = {}\n flattened = np.hstack(data)\n for item in range(len(flattened)):\n if flattened[item] > 0:\n if flattened[item] in unique_dict:\n unique_dict[flattened[item]] += 1\n else:... | [
"0.6782551",
"0.6689813",
"0.61083686",
"0.6055879",
"0.5903044",
"0.5880041",
"0.58349",
"0.5827255",
"0.57979757",
"0.5724317",
"0.5710349",
"0.5710349",
"0.56483686",
"0.5615936",
"0.55985075",
"0.5567101",
"0.5541149",
"0.5514354",
"0.54950386",
"0.5493703",
"0.5488995",
... | 0.6023321 | 4 |
Returns True if the given tag occurs in the last position of the embeddedTags list, return False otherwise. Arguments tag a string indicating the tag name | def hasEmbedded(self, tag):
if self.embeddedTags and self.embeddedTags[-1] == tag:
return True
else:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _is_desired_tag(self, tag):\n if self._tags is None:\n return True\n\n if self._ignore_namespace:\n for desired_tag in self._tags:\n if tag.localname == desired_tag.localname:\n return True\n else:\n for desired_tag in self... | [
"0.6600191",
"0.65413404",
"0.65413404",
"0.6334318",
"0.6244077",
"0.6231498",
"0.6000919",
"0.59919655",
"0.5925771",
"0.59052545",
"0.58483815",
"0.5821384",
"0.5722859",
"0.5653377",
"0.5650666",
"0.5644951",
"0.5617543",
"0.5584996",
"0.55833226",
"0.5508402",
"0.5498268... | 0.81114715 | 0 |
Return the list of tokens in a sentence. | def getTokens(self):
# NOTE: seems to be used by the evitaNominalTrainer only
tokenList = []
for chunkOrToken in self.dtrs:
if chunkOrToken.isToken():
tokenList += [chunkOrToken]
elif chunkOrToken.isChunk():
tokenList += chunkOrToken.dtrs
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getTokens(self):\n list = []\n for i in range(self.startIdx, self.endIdx + 1):\n token = self.sentence[i]\n list.append(token)\n return list",
"def tokenize(sentence):\n tokens = nltk.word_tokenize(sentence)\n return tokens",
"def tokenize(text):\n senten... | [
"0.8015458",
"0.7959841",
"0.78305787",
"0.78246456",
"0.7706437",
"0.7706437",
"0.77050465",
"0.7590108",
"0.75883114",
"0.7587497",
"0.755639",
"0.7544355",
"0.7523082",
"0.7481715",
"0.7411524",
"0.74058545",
"0.7329246",
"0.7293342",
"0.7265179",
"0.7261791",
"0.72307074"... | 0.7068959 | 25 |
Get the front element. | def peek(self) -> int:
return self.stack[len(self.stack)-1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getFront(self):\n\t\tfront = self.queue[self.front]\n\t\treturn front\n\t\tpass",
"def getFront(self):\n if not self.isEmpty():\n return self._data[0]\n else:\n return -1",
"def front(self):\n return self.queue[0] if not self.empty() else None",
"def peek_front(... | [
"0.82009244",
"0.79261875",
"0.7852642",
"0.7791182",
"0.77886623",
"0.75723046",
"0.752337",
"0.7510604",
"0.7478953",
"0.7379256",
"0.7379256",
"0.734284",
"0.7323573",
"0.7320296",
"0.7291721",
"0.72772557",
"0.7269801",
"0.72657627",
"0.7253295",
"0.72355044",
"0.72213495... | 0.0 | -1 |
Returns whether the queue is empty. | def empty(self) -> bool:
if len(self.stack)==0:
return True
else:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_empty(self):\n return len(self.the_queue) == 0",
"def is_empty(self):\n return len(self.__queue) > 0",
"def is_empty(self):\n return len(self.queue) == 0",
"def is_empty(self):\n return len(self.queue) == 0",
"def is_empty(self):\n return self.queue == []",
"def ... | [
"0.9270249",
"0.92506766",
"0.923635",
"0.923635",
"0.9155843",
"0.9098441",
"0.9095006",
"0.90922606",
"0.90731245",
"0.9053733",
"0.89205354",
"0.89137155",
"0.8877591",
"0.88436323",
"0.88436323",
"0.8835949",
"0.88038146",
"0.8758203",
"0.87577534",
"0.87310195",
"0.86462... | 0.0 | -1 |
Discard parameters that are used in training and score. Use if you're sure you're done training a model. | def delete_temporary_training_data(self, keep_doctags_vectors=True, keep_inference=True):
if not keep_inference:
if hasattr(self.trainables, 'syn1'):
del self.trainables.syn1
if hasattr(self.trainables, 'syn1neg'):
del self.trainables.syn1neg
i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def reset_parameters(self):\n self.lin.reset_parameters()\n self.att.reset_parameters()\n self.gnn_score.reset_parameters()\n if self.gnn_intra_cluster is not None:\n self.gnn_intra_cluster.reset_parameters()\n self.select.reset_parameters()",
"def resetParams(self):... | [
"0.6921844",
"0.6576267",
"0.6498799",
"0.6427999",
"0.63854957",
"0.6369328",
"0.6368204",
"0.63590693",
"0.63208294",
"0.63148415",
"0.6308618",
"0.627001",
"0.62669617",
"0.6259324",
"0.62577575",
"0.6251735",
"0.6239785",
"0.6236918",
"0.61836535",
"0.61132604",
"0.611326... | 0.0 | -1 |
Return indexes and backingarrays used in training examples. | def indexed_doctags(self, doctag_tokens, docvecs):
return [
Doc2VecKeyedVectors._int_index(index, docvecs.doctags, docvecs.max_rawint)
for index in doctag_tokens if self._tag_seen(index, docvecs)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_training_index():\n return list(range(0, 305))",
"def originalData(self): \n self.__exampleIndices = array(list(range(0, self.__numExamples)))",
"def get_train_examples(self):\n raise NotImplementedError()",
"def get_train_index():\n data_size = (NUM_CLASS - 1) * NUM_DATA_PER_CLAS... | [
"0.6476949",
"0.641478",
"0.639746",
"0.6292268",
"0.62859666",
"0.62565124",
"0.60871613",
"0.6069566",
"0.6056354",
"0.6056317",
"0.60271925",
"0.6011748",
"0.6011748",
"0.5928293",
"0.59276766",
"0.59024876",
"0.58761674",
"0.58637226",
"0.5842513",
"0.5841699",
"0.5841699... | 0.0 | -1 |
Test discrete RGB colormap | def test_colormap_discrete():
with TestingCanvas(size=size, bgcolor='w') as c:
idata = np.linspace(255, 0, size[0]*size[1]).astype(np.ubyte)
data = idata.reshape((size[0], size[1]))
image = Image(cmap=Colormap(colors=['r', 'g', 'b'],
interpolation='zero'),
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_create_colormap() -> None:\n colors_arr_rgb = color_utils.create_colormap(\n color_list=[RED_HEX, GREEN_HEX], n_colors=10\n )\n assert np.logical_and(0 <= colors_arr_rgb, colors_arr_rgb <= 1).all()\n\n assert colors_arr_rgb.shape == (10, 3)",
"def test_colormap_discrete_nu():\n wit... | [
"0.73026437",
"0.7008918",
"0.6819962",
"0.6733769",
"0.6619444",
"0.633556",
"0.6261674",
"0.6238701",
"0.6235097",
"0.6226245",
"0.6161842",
"0.6145873",
"0.6128191",
"0.6102514",
"0.6097905",
"0.60928637",
"0.6082302",
"0.60775137",
"0.605983",
"0.6054012",
"0.6042657",
... | 0.7960902 | 0 |
Creates linelist marker in kinect_frame. | def create_line_list(self,depth_arr):
'''
depth_arr- depth image as numpy array
'''
try:
body=[['shoulder_line',[self.rpts[11],self.rpts[12]]],['waist_line',[self.rpts[23],self.rpts[24]]],['left_shoulder_waist',[self.rpts[11],self.rpts[23]]],['right_shoulder_waist',[self.rp... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def linelist(self):\n line_list = Marker()\n line_list.header = self._header\n line_list.type = Marker.LINE_LIST\n line_list.action = Marker.ADD\n line_list.scale.x = 0.005\n line_list.color = self.YELLOW\n line_list.pose = deepcopy(self.POSE)\n\n line_list.p... | [
"0.7204715",
"0.6253658",
"0.618761",
"0.5972563",
"0.59579426",
"0.5891577",
"0.5788625",
"0.57596844",
"0.5753134",
"0.5735517",
"0.57352555",
"0.5704545",
"0.5704545",
"0.5703307",
"0.56611234",
"0.56589293",
"0.5639964",
"0.56304866",
"0.5599117",
"0.5581409",
"0.5579776"... | 0.75666314 | 0 |
xyz from u,v image coords | def depth_to_xyz(self,u,v,depth_val):
'''
u - x image coordinate
v - y image coodrinate
depth_val - depth value at that (u,v) from depth_image
'''
fx=self.cam_intrin[0]
fy=self.cam_intrin[4]
cx=self.cam_intrin[2]
cy=self.cam_intrin[5]
z =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uv_at_xy(self, x, y, x0, y0, s0):\n dx, dy = self.distance(x0, y0, x, y)\n #print 'dx, dy:', dx, dy\n rr2 = (dx**2 + dy**2)**-1\n u = - s0 * dy * r_twopi * rr2\n v = s0 * dx * r_twopi * rr2\n #print 'u, v', u, v\n return u, v",
"def _uv_to_xy(self, uv: np.ndar... | [
"0.7228563",
"0.7134046",
"0.7081523",
"0.7022611",
"0.6837065",
"0.6717034",
"0.6695962",
"0.65979034",
"0.65862006",
"0.6532136",
"0.64494437",
"0.6444157",
"0.6409712",
"0.6406701",
"0.6345715",
"0.6327058",
"0.627148",
"0.6268713",
"0.6249921",
"0.62084967",
"0.61691314",... | 0.7625158 | 0 |
Return a copy of this schema. Returns A copy of this MeanMatchSchema | def copy(self):
return deepcopy(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def copy(self):\n return Struct(self)",
"def same_schema(self):\n return self._same_schema",
"def _get_schema(self):\n self._pick()\n return Schema()",
"def copy(self) -> 'Atoms':\n return deepcopy(self)",
"def rebuild(self, dframe, overwrite=False):\n current_sche... | [
"0.5975258",
"0.59512025",
"0.55522174",
"0.55417234",
"0.5447004",
"0.5404858",
"0.5302039",
"0.52567154",
"0.52372223",
"0.5236839",
"0.52274936",
"0.52274936",
"0.52274936",
"0.52271706",
"0.5199568",
"0.5195796",
"0.51491827",
"0.51052296",
"0.5087778",
"0.5073137",
"0.50... | 0.5164689 | 30 |
Get type of the plugin. | def get_plugin_type(self):
return constants.L2GW | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def plugin_type(self) -> Optional[pulumi.Input[Union[str, 'KubernetesPluginType']]]:\n return pulumi.get(self, \"plugin_type\")",
"def plugin_type(self) -> Optional[pulumi.Input[Union[str, 'KubernetesPluginType']]]:\n return pulumi.get(self, \"plugin_type\")",
"def plugin_type(self) -> Optional[p... | [
"0.7676264",
"0.7676264",
"0.7676264",
"0.7193337",
"0.71806914",
"0.7142171",
"0.7142171",
"0.7086175",
"0.70777196",
"0.7038016",
"0.70365953",
"0.7002297",
"0.6989027",
"0.6989027",
"0.69803524",
"0.69803524",
"0.69803524",
"0.69803524",
"0.69803524",
"0.69803524",
"0.6980... | 0.7423868 | 3 |
Get description of the plugin. | def get_plugin_description(self):
return constants.L2_GATEWAY_SERVICE_PLUGIN | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def plugin_description(self):\n return self.__plugin_description",
"def description(cls):\n return \"{} v{}\".format(cls.PLUGIN_NAME, cls.PLUGIN_VERSION)",
"def get_description(self) -> str:\n pass",
"def getDescription(self):\n return self.description",
"def get_description(sel... | [
"0.8823374",
"0.83683544",
"0.79995924",
"0.79836243",
"0.79754126",
"0.7959318",
"0.7959318",
"0.7959318",
"0.7959318",
"0.7959318",
"0.7959318",
"0.7959318",
"0.7959318",
"0.7959318",
"0.7959318",
"0.7959318",
"0.7959318",
"0.79272044",
"0.7915578",
"0.7915578",
"0.7915578"... | 0.0 | -1 |
Returns a reference to the pane window. Use the returned wx.Window as the parent of widgets to make them part of the collapsible area. | def GetPane(self):
return self._pPane | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SetPaneWindow(self, pane):\r\n\r\n self._is_toolbar = pane.IsToolbar()\r\n self._pane_window = pane.window\r\n\r\n if isinstance(pane.window, auibar.AuiToolBar):\r\n pane.window.SetAuiManager(self._mgr)\r\n \r\n self._pane_window.Reparent(self)\r\n \r\n ... | [
"0.6367124",
"0.6332669",
"0.6111083",
"0.60744494",
"0.60504407",
"0.60504407",
"0.60309404",
"0.5981609",
"0.5927408",
"0.59218377",
"0.5906428",
"0.589041",
"0.5859927",
"0.5852706",
"0.58475757",
"0.58373463",
"0.58342177",
"0.58342177",
"0.5833195",
"0.57948285",
"0.5740... | 0.5874572 | 12 |
Returns the PyCollapsiblePane border (platform dependent). | def GetBorder(self):
if wx.Platform == "__WXMAC__":
return 6
elif wx.Platform == "__WXGTK__":
return 3
elif wx.Platform == "__WXMSW__":
return self._pButton.ConvertDialogSizeToPixels(wx.Size(2, 0)).x
else:
return 5 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_border(self):\n return self._border",
"def border(self):\r\n\t\treturn self._border",
"def border(self):\n return self._border",
"def border(self):\n return self._border",
"def getBorder(self):\n return self.__border",
"def getBorderFlags():\n\treturn border_flag",
"... | [
"0.67760646",
"0.675842",
"0.6635361",
"0.6635361",
"0.6567342",
"0.61944246",
"0.618489",
"0.6169048",
"0.6145347",
"0.6078972",
"0.60762686",
"0.6059123",
"0.60386443",
"0.6025595",
"0.5915742",
"0.5900017",
"0.5900017",
"0.5831974",
"0.5808096",
"0.57296586",
"0.56538314",... | 0.61776257 | 7 |
Stateless identity transformation that leaves input gradients untouched. | def identity() -> GradientTransformation:
def init_fn(_):
return EmptyState()
def update_fn(updates, state, params=None):
del params
return updates, state
return GradientTransformation(init_fn, update_fn) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def identity(inputs: torch.Tensor):\n return inputs",
"def identity(state: State) -> State:\n return state",
"def idn(x):\n\n def grad(dy):\n return dy\n\n return tf.ones_like(x), grad",
"def identity(features):\n features = tf.convert_to_tensor(features)\n return tf.identity(features)",... | [
"0.654061",
"0.63789064",
"0.61930794",
"0.6179915",
"0.6158657",
"0.5901717",
"0.5885808",
"0.57707673",
"0.5758652",
"0.57229537",
"0.5707053",
"0.57059085",
"0.56792724",
"0.56792676",
"0.56582284",
"0.56580484",
"0.56562716",
"0.56497425",
"0.56497425",
"0.56497425",
"0.5... | 0.80531585 | 0 |
Returns a 64 x 64 patch with the given patch_id. Catch container images to reduce loading from disk. | def GetPatchImage(patch_id, container_dir):
# Define constants. Each container image is of size 1024x1024. It packs at
# most 16 rows and 16 columns of 64x64 patches, arranged from left to right,
# top to bottom.
PATCHES_PER_IMAGE = 16 * 16
PATCHES_PER_ROW = 16
PATCH_SIZE = 64
# Calculate t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sparse_patchify(file_name, patch_size, patch_num):\n img = imageio.imread(file_name)\n w, h, c = img.shape\n patches = np.zeros((patch_num, patch_size, patch_size, c), dtype=np.uint8)\n assert w == h\n patch_n_single = int(np.floor(np.sqrt(patch_num)))\n step = w//patch_n_single\n offset =... | [
"0.6201207",
"0.60380596",
"0.5927875",
"0.566358",
"0.5646754",
"0.5632543",
"0.56178045",
"0.5605348",
"0.556101",
"0.5560943",
"0.5532757",
"0.5485201",
"0.54657656",
"0.54645336",
"0.5449628",
"0.544221",
"0.53976697",
"0.53922313",
"0.53832805",
"0.5320497",
"0.5315148",... | 0.807523 | 0 |
Serializes a response using a specified serializer. If ``response_data`` is an instance of | def serialize_response(response_data, content_type=None):
content_type = content_type or get_best_mimetype()
if not content_type:
abort(406)
rv = current_app.blueprints[request.blueprint]\
.response_mimetypes[content_type](response_data)
response = make_response(rv)
if isinstance... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_response(self, request, data, response_class=HttpResponse, **response_kwargs):\n desired_format = self.determine_format(request)\n serialized = self.serialize(request, data, desired_format)\n return response_class(content=serialized, content_type=build_content_type(desired_format), ... | [
"0.6623695",
"0.64812064",
"0.6258819",
"0.6216426",
"0.6129398",
"0.5985117",
"0.5982559",
"0.58265007",
"0.5823068",
"0.58032537",
"0.5705232",
"0.5591172",
"0.5517693",
"0.5409627",
"0.53862536",
"0.5383542",
"0.53263575",
"0.52856606",
"0.5273497",
"0.526373",
"0.5259677"... | 0.66624653 | 0 |
Format a 1D Numpy array into NRRD vector string Function converts a 1D Numpy array into a string using NRRD vector format. | def format_vector(x):
return '(' + ','.join([format_number(y) for y in x]) + ')' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __to_xml_vector__(array, format_=\"%f\"):\n output = ''\n for i in array:\n output = (\"%s<value>\" + format_ + \"</value>\") % (output, i)\n return output",
"def vector_to_str(vector):\n output_str = \"[\"\n for i in vector:\n output_str += str(i) + \... | [
"0.65962124",
"0.6406507",
"0.63462204",
"0.61922514",
"0.61029047",
"0.6052695",
"0.59530616",
"0.5933476",
"0.5933185",
"0.5923297",
"0.5884527",
"0.5785703",
"0.5735033",
"0.5705236",
"0.568707",
"0.56810564",
"0.5595331",
"0.5542254",
"0.55008036",
"0.5495679",
"0.5464964... | 0.6743971 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.