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 |
|---|---|---|---|---|---|---|
New() > itkHConcaveImageFilterIUC2IUC2 Create a new object of the class itkHConcaveImageFilterIUC2IUC2 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 objects the first non named parameter in t... | def New(*args, **kargs):
obj = itkHConcaveImageFilterIUC2IUC2.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkSquareImageFilterIUC2IUC2.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkSimpleContourExtractorImageFilterIUC2IUC2.__New_orig__()\n import itkTemplate\n ... | [
"0.78052354",
"0.77374804",
"0.77119035",
"0.7686489",
"0.7640479",
"0.7609638",
"0.75928354",
"0.7481686",
"0.7394854",
"0.7394854",
"0.73728186",
"0.73629504",
"0.73477775",
"0.7305364",
"0.72755665",
"0.7238187",
"0.723809",
"0.7232535",
"0.7226818",
"0.7190232",
"0.717970... | 0.81803495 | 0 |
itkHConcaveImageFilterIUC2IUC2_cast(itkLightObject obj) > itkHConcaveImageFilterIUC2IUC2 | def itkHConcaveImageFilterIUC2IUC2_cast(*args):
return _itkHConcaveImageFilterPython.itkHConcaveImageFilterIUC2IUC2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkProjectedLandweberDeconvolutionImageFilterIUC2IUC2_cast(obj: 'itkLightObject') -> \"itkProjectedLandweberDeconvolutionImageFilterIUC2IUC2 *\":\n return _itkProjectedLandweberDeconvolutionImageFilterPython.itkProjectedLandweberDeconvolutionImageFilterIUC2IUC2_cast(obj)",
"def itkResampleImageFilterIUC2I... | [
"0.87663007",
"0.86804825",
"0.8648535",
"0.86102456",
"0.85925514",
"0.85221004",
"0.8472973",
"0.84301937",
"0.8422864",
"0.8396308",
"0.83359337",
"0.8321814",
"0.8279721",
"0.82636124",
"0.82536626",
"0.82363576",
"0.8128859",
"0.8100059",
"0.8086951",
"0.80848604",
"0.80... | 0.8320447 | 12 |
cast(itkLightObject obj) > itkHConcaveImageFilterIUC3IUC3 | def cast(*args):
return _itkHConcaveImageFilterPython.itkHConcaveImageFilterIUC3IUC3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkProjectedLandweberDeconvolutionImageFilterIUC3IUC3 *\":\n return _itkProjectedLandweberDeconvolutionImageFilterPython.itkProjectedLandweberDeconvolutionImageFilterIUC3IUC3_cast(obj)",
"def itkProjectedLandweberDeconvolutionImageFilterIUC3IUC3_cast(obj: 'itkLightObje... | [
"0.83067614",
"0.80682176",
"0.8059684",
"0.79830146",
"0.79370683",
"0.7909254",
"0.7905111",
"0.78654325",
"0.78581965",
"0.78536534",
"0.7842051",
"0.7830715",
"0.7823084",
"0.7805751",
"0.779623",
"0.779507",
"0.77948976",
"0.7784557",
"0.76837116",
"0.7668501",
"0.765203... | 0.7199429 | 86 |
New() > itkHConcaveImageFilterIUC3IUC3 Create a new object of the class itkHConcaveImageFilterIUC3IUC3 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 objects the first non named parameter in t... | def New(*args, **kargs):
obj = itkHConcaveImageFilterIUC3IUC3.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkHConcaveImageFilterIUL3IUL3.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkSquareImageFilterIUC3IUC3.__New_orig__()\n import itkTemplate\n itkTempla... | [
"0.7878337",
"0.7843616",
"0.7787705",
"0.7751751",
"0.77147716",
"0.77102786",
"0.77020127",
"0.7591421",
"0.7568278",
"0.75497776",
"0.75044006",
"0.75018334",
"0.749583",
"0.74731714",
"0.741275",
"0.74105906",
"0.7404718",
"0.7404718",
"0.73852134",
"0.7376231",
"0.735409... | 0.822477 | 0 |
itkHConcaveImageFilterIUC3IUC3_cast(itkLightObject obj) > itkHConcaveImageFilterIUC3IUC3 | def itkHConcaveImageFilterIUC3IUC3_cast(*args):
return _itkHConcaveImageFilterPython.itkHConcaveImageFilterIUC3IUC3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkProjectedLandweberDeconvolutionImageFilterIUC3IUC3_cast(obj: 'itkLightObject') -> \"itkProjectedLandweberDeconvolutionImageFilterIUC3IUC3 *\":\n return _itkProjectedLandweberDeconvolutionImageFilterPython.itkProjectedLandweberDeconvolutionImageFilterIUC3IUC3_cast(obj)",
"def cast(obj: 'itkLightObject')... | [
"0.8765076",
"0.8683379",
"0.8554405",
"0.8524794",
"0.85158813",
"0.8458485",
"0.8395812",
"0.83016926",
"0.8285095",
"0.824712",
"0.8223648",
"0.82054657",
"0.81859714",
"0.81613785",
"0.81574243",
"0.8122496",
"0.8117352",
"0.80908245",
"0.80794406",
"0.8076988",
"0.801764... | 0.82675874 | 9 |
GetHeight(self) > unsigned long | def GetHeight(self):
return _itkHConcaveImageFilterPython.itkHConcaveImageFilterIUL2IUL2_GetHeight(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getHeight(self):\n return self.height",
"def height(self):\n return 0",
"def get_height(self):\n return self.__size.y",
"def getHeight(self):\n return self._h",
"def getHeight(self):\n return self.__height",
"def getHeight(self):\n return self.height",
"def h... | [
"0.7334036",
"0.72488827",
"0.7217866",
"0.7208395",
"0.7177998",
"0.7149323",
"0.7071138",
"0.70626557",
"0.70598716",
"0.70598716",
"0.70598716",
"0.7051291",
"0.7039421",
"0.70299613",
"0.7026649",
"0.7020297",
"0.7020297",
"0.7016814",
"0.70035386",
"0.6964359",
"0.696435... | 0.67346275 | 41 |
cast(itkLightObject obj) > itkHConcaveImageFilterIUL2IUL2 | def cast(*args):
return _itkHConcaveImageFilterPython.itkHConcaveImageFilterIUL2IUL2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkProjectedLandweberDeconvolutionImageFilterIUC2IUC2 *\":\n return _itkProjectedLandweberDeconvolutionImageFilterPython.itkProjectedLandweberDeconvolutionImageFilterIUC2IUC2_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkProjectedLandweberDeconvolutionImageFilte... | [
"0.8168125",
"0.807287",
"0.805248",
"0.78992873",
"0.7887813",
"0.78725845",
"0.78166413",
"0.781233",
"0.7794538",
"0.77908784",
"0.777799",
"0.77638996",
"0.7748364",
"0.77142674",
"0.77120626",
"0.7707579",
"0.77040607",
"0.7702714",
"0.77022916",
"0.7681935",
"0.76654387... | 0.0 | -1 |
New() > itkHConcaveImageFilterIUL2IUL2 Create a new object of the class itkHConcaveImageFilterIUL2IUL2 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 objects the first non named parameter in t... | def New(*args, **kargs):
obj = itkHConcaveImageFilterIUL2IUL2.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkHConcaveImageFilterIUC2IUC2.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkHConcaveImageFilterIF2IF2.__New_orig__()\n import itkTemplate\n itkTempla... | [
"0.78076005",
"0.75209445",
"0.7458289",
"0.74578947",
"0.7377777",
"0.7369599",
"0.7367675",
"0.7338298",
"0.7302973",
"0.730028",
"0.7293537",
"0.7286644",
"0.72851425",
"0.7285004",
"0.7277725",
"0.72600865",
"0.7238618",
"0.72324777",
"0.72306466",
"0.7216394",
"0.7185823... | 0.8088837 | 0 |
itkHConcaveImageFilterIUL2IUL2_cast(itkLightObject obj) > itkHConcaveImageFilterIUL2IUL2 | def itkHConcaveImageFilterIUL2IUL2_cast(*args):
return _itkHConcaveImageFilterPython.itkHConcaveImageFilterIUL2IUL2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkProjectedLandweberDeconvolutionImageFilterIUC2IUC2 *\":\n return _itkProjectedLandweberDeconvolutionImageFilterPython.itkProjectedLandweberDeconvolutionImageFilterIUC2IUC2_cast(obj)",
"def itkProjectedLandweberDeconvolutionImageFilterIUC2IUC2_cast(obj: 'itkLightObje... | [
"0.85843146",
"0.85184866",
"0.8368257",
"0.8315464",
"0.8299975",
"0.8283304",
"0.8274457",
"0.8268985",
"0.82645535",
"0.82303435",
"0.821976",
"0.8207216",
"0.8196379",
"0.8150696",
"0.8139422",
"0.81327176",
"0.81194127",
"0.8095585",
"0.8090683",
"0.8083649",
"0.80664796... | 0.80008274 | 26 |
GetHeight(self) > unsigned long | def GetHeight(self):
return _itkHConcaveImageFilterPython.itkHConcaveImageFilterIUL3IUL3_GetHeight(self) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def getHeight(self):\n return self.height",
"def height(self):\n return 0",
"def get_height(self):\n return self.__size.y",
"def getHeight(self):\n return self._h",
"def getHeight(self):\n return self.__height",
"def getHeight(self):\n return self.height",
"def h... | [
"0.7334036",
"0.72488827",
"0.7217866",
"0.7208395",
"0.7177998",
"0.7149323",
"0.7071138",
"0.70626557",
"0.70598716",
"0.70598716",
"0.70598716",
"0.7051291",
"0.7039421",
"0.70299613",
"0.7026649",
"0.7020297",
"0.7020297",
"0.7016814",
"0.70035386",
"0.6964359",
"0.696435... | 0.0 | -1 |
cast(itkLightObject obj) > itkHConcaveImageFilterIUL3IUL3 | def cast(*args):
return _itkHConcaveImageFilterPython.itkHConcaveImageFilterIUL3IUL3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkProjectedLandweberDeconvolutionImageFilterIUC3IUC3 *\":\n return _itkProjectedLandweberDeconvolutionImageFilterPython.itkProjectedLandweberDeconvolutionImageFilterIUC3IUC3_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkProjectedLandweberDeconvolutionImageFilte... | [
"0.8201968",
"0.8089795",
"0.79783714",
"0.7942617",
"0.7939585",
"0.7939411",
"0.78641295",
"0.7813663",
"0.7794232",
"0.7756367",
"0.77497166",
"0.77401096",
"0.7727932",
"0.77136534",
"0.77093846",
"0.7704433",
"0.77009416",
"0.7696734",
"0.7694038",
"0.7690512",
"0.768312... | 0.0 | -1 |
New() > itkHConcaveImageFilterIUL3IUL3 Create a new object of the class itkHConcaveImageFilterIUL3IUL3 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 objects the first non named parameter in t... | def New(*args, **kargs):
obj = itkHConcaveImageFilterIUL3IUL3.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkHConcaveImageFilterIUC3IUC3.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkHConcaveImageFilterIF3IF3.__New_orig__()\n import itkTemplate\n itkTempla... | [
"0.786059",
"0.77802974",
"0.7702192",
"0.7660654",
"0.7618449",
"0.7586831",
"0.75735956",
"0.7568769",
"0.75615615",
"0.75130314",
"0.7508179",
"0.75080353",
"0.749024",
"0.7416457",
"0.7414436",
"0.7414436",
"0.7409484",
"0.739326",
"0.7385257",
"0.7381871",
"0.73688185",
... | 0.8141371 | 0 |
itkHConcaveImageFilterIUL3IUL3_cast(itkLightObject obj) > itkHConcaveImageFilterIUL3IUL3 | def itkHConcaveImageFilterIUL3IUL3_cast(*args):
return _itkHConcaveImageFilterPython.itkHConcaveImageFilterIUL3IUL3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkProjectedLandweberDeconvolutionImageFilterIUC3IUC3 *\":\n return _itkProjectedLandweberDeconvolutionImageFilterPython.itkProjectedLandweberDeconvolutionImageFilterIUC3IUC3_cast(obj)",
"def itkProjectedLandweberDeconvolutionImageFilterIUC3IUC3_cast(obj: 'itkLightObje... | [
"0.8691828",
"0.86036414",
"0.84394294",
"0.8341983",
"0.833722",
"0.831897",
"0.8255929",
"0.82476515",
"0.8246367",
"0.82243836",
"0.8195695",
"0.8192544",
"0.81890404",
"0.818806",
"0.8164521",
"0.81625503",
"0.8156313",
"0.8152424",
"0.81460917",
"0.81169033",
"0.81107783... | 0.8016401 | 35 |
cast(itkLightObject obj) > itkHConcaveImageFilterIUS2IUS2 | def cast(*args):
return _itkHConcaveImageFilterPython.itkHConcaveImageFilterIUS2IUS2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkProjectedLandweberDeconvolutionImageFilterIUS2IUS2 *\":\n return _itkProjectedLandweberDeconvolutionImageFilterPython.itkProjectedLandweberDeconvolutionImageFilterIUS2IUS2_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkDirectedHausdorffDistanceImageFilterIUC2I... | [
"0.81812584",
"0.80009544",
"0.7967445",
"0.7957493",
"0.7927667",
"0.7902012",
"0.7861473",
"0.7858396",
"0.78067076",
"0.7797513",
"0.7789766",
"0.77858627",
"0.776336",
"0.77413845",
"0.77383995",
"0.7726328",
"0.77202183",
"0.76950884",
"0.7689268",
"0.7686943",
"0.767912... | 0.0 | -1 |
New() > itkHConcaveImageFilterIUS2IUS2 Create a new object of the class itkHConcaveImageFilterIUS2IUS2 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 objects the first non named parameter in t... | def New(*args, **kargs):
obj = itkHConcaveImageFilterIUS2IUS2.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkSquareImageFilterIUS2IUS2.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkConstrainedValueAdditionImageFilterIUS2IUS2IUS2.__New_orig__()\n import itkTemplat... | [
"0.77420664",
"0.76654613",
"0.76005816",
"0.74843705",
"0.7463773",
"0.7408661",
"0.737828",
"0.7340994",
"0.7330855",
"0.7309622",
"0.7295767",
"0.72281075",
"0.7225173",
"0.72080743",
"0.7189104",
"0.7159061",
"0.7135812",
"0.7110165",
"0.70969594",
"0.7075268",
"0.7070007... | 0.8121284 | 0 |
itkHConcaveImageFilterIUS2IUS2_cast(itkLightObject obj) > itkHConcaveImageFilterIUS2IUS2 | def itkHConcaveImageFilterIUS2IUS2_cast(*args):
return _itkHConcaveImageFilterPython.itkHConcaveImageFilterIUS2IUS2_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkProjectedLandweberDeconvolutionImageFilterIUS2IUS2 *\":\n return _itkProjectedLandweberDeconvolutionImageFilterPython.itkProjectedLandweberDeconvolutionImageFilterIUS2IUS2_cast(obj)",
"def itkProjectedLandweberDeconvolutionImageFilterIUS2IUS2_cast(obj: 'itkLightObje... | [
"0.85860825",
"0.8570418",
"0.84010416",
"0.8388303",
"0.83756816",
"0.83739614",
"0.8325182",
"0.83219826",
"0.82939154",
"0.8272259",
"0.8261472",
"0.8241915",
"0.8175154",
"0.81660855",
"0.813579",
"0.8119644",
"0.81163263",
"0.81121075",
"0.81120545",
"0.80998677",
"0.805... | 0.8079581 | 20 |
cast(itkLightObject obj) > itkHConcaveImageFilterIUS3IUS3 | def cast(*args):
return _itkHConcaveImageFilterPython.itkHConcaveImageFilterIUS3IUS3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cast(obj: 'itkLightObject') -> \"itkProjectedLandweberDeconvolutionImageFilterIUS3IUS3 *\":\n return _itkProjectedLandweberDeconvolutionImageFilterPython.itkProjectedLandweberDeconvolutionImageFilterIUS3IUS3_cast(obj)",
"def cast(obj: 'itkLightObject') -> \"itkProjectedLandweberDeconvolutionImageFilte... | [
"0.80967826",
"0.79754084",
"0.7928074",
"0.7891078",
"0.78780955",
"0.7856105",
"0.78358805",
"0.7755856",
"0.7747043",
"0.77325594",
"0.7719603",
"0.768822",
"0.7672234",
"0.76597685",
"0.7641416",
"0.7638198",
"0.7627496",
"0.76255",
"0.7625268",
"0.76163274",
"0.7616303",... | 0.0 | -1 |
New() > itkHConcaveImageFilterIUS3IUS3 Create a new object of the class itkHConcaveImageFilterIUS3IUS3 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 objects the first non named parameter in t... | def New(*args, **kargs):
obj = itkHConcaveImageFilterIUS3IUS3.__New_orig__()
import itkTemplate
itkTemplate.New(obj, *args, **kargs)
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def New(*args, **kargs):\n obj = itkConstrainedValueAdditionImageFilterIUS3IUS3IUS3.__New_orig__()\n import itkTemplate\n itkTemplate.New(obj, *args, **kargs)\n return obj",
"def New(*args, **kargs):\n obj = itkSquareImageFilterIUS3IUS3.__New_orig__()\n import itkTemplat... | [
"0.77940214",
"0.7730638",
"0.7559968",
"0.7557476",
"0.74373335",
"0.74272996",
"0.74115366",
"0.73889023",
"0.7380708",
"0.73646086",
"0.73117256",
"0.72722125",
"0.7218075",
"0.7157573",
"0.7152484",
"0.7143062",
"0.71343625",
"0.71326613",
"0.7129257",
"0.70907694",
"0.70... | 0.8189209 | 0 |
itkHConcaveImageFilterIUS3IUS3_cast(itkLightObject obj) > itkHConcaveImageFilterIUS3IUS3 | def itkHConcaveImageFilterIUS3IUS3_cast(*args):
return _itkHConcaveImageFilterPython.itkHConcaveImageFilterIUS3IUS3_cast(*args) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def itkProjectedLandweberDeconvolutionImageFilterIUS3IUS3_cast(obj: 'itkLightObject') -> \"itkProjectedLandweberDeconvolutionImageFilterIUS3IUS3 *\":\n return _itkProjectedLandweberDeconvolutionImageFilterPython.itkProjectedLandweberDeconvolutionImageFilterIUS3IUS3_cast(obj)",
"def cast(obj: 'itkLightObject')... | [
"0.84765434",
"0.84656006",
"0.8264819",
"0.82559985",
"0.8239446",
"0.81919193",
"0.81722283",
"0.81639147",
"0.8157816",
"0.8149643",
"0.8144343",
"0.81335664",
"0.80907875",
"0.80793303",
"0.8063376",
"0.80375004",
"0.8027605",
"0.8026559",
"0.80203336",
"0.80020785",
"0.7... | 0.80716753 | 14 |
Return the splunk client, cached into __context__ for performance | def _get_splunk(profile):
config = __salt__["config.option"](profile)
key = "splunk.{}:{}:{}:{}".format(
config.get("host"),
config.get("port"),
config.get("username"),
config.get("password"),
)
if key not in __context__:
__context__[key] = splunklib.client.conn... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def client(self):\n if self._client is None:\n self._client = self._init_client()\n return self._client",
"def _get_client(self):\n if self.client is not None:\n return self.client\n\n self.client = docker.from_env(**self.param)\n return self.client",
"d... | [
"0.635071",
"0.63191646",
"0.6276347",
"0.62230396",
"0.62230396",
"0.62192845",
"0.6150491",
"0.6150491",
"0.6062231",
"0.6047413",
"0.6040144",
"0.60185546",
"0.6015097",
"0.5993009",
"0.59565645",
"0.5954891",
"0.5937709",
"0.59338886",
"0.5933001",
"0.59259963",
"0.589239... | 0.6806852 | 0 |
Sets the label of the sentence, according to "sentence_label_type" specified in config, which can be "specified", "majority", or "binary". The "default_label" is also needed to infer the binary labels. | def set_label(self, sentence_label_type, default_label, label=None):
if sentence_label_type == "specified":
assert label is not None or self.label_sent is not None, "Sentence label missing!"
if label is not None:
self.label_sent = label
elif label is None and sent... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_label(self, label):\n self.__label = label",
"def label(self, label):\n if label is None:\n raise ValueError(\"Invalid value for `label`, must not be `None`\")\n\n self._label = label",
"def label(self, label: str):\n\n self._label = label",
"def SetLabel(self, ... | [
"0.61476225",
"0.59766716",
"0.5971272",
"0.5964009",
"0.59514046",
"0.59464806",
"0.5871096",
"0.5871096",
"0.5871096",
"0.5871096",
"0.5871096",
"0.5871096",
"0.5871096",
"0.5871096",
"0.5825438",
"0.5823033",
"0.5823033",
"0.57724994",
"0.57298344",
"0.568506",
"0.56768364... | 0.8582524 | 0 |
Checks if value is of type float. | def is_float(value):
try:
float(value)
return True
except ValueError:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def isfloat(value):\n try:\n float(value)\n return True\n except ValueError:\n return False",
"def isfloat(value): \n try:\n float(value)\n return True\n\n except ValueError:\n return False",
"def isfloat(value):\n try:\n float... | [
"0.8780016",
"0.8663863",
"0.8605933",
"0.8562821",
"0.8553952",
"0.8553952",
"0.8553952",
"0.8553952",
"0.8512334",
"0.82137823",
"0.80323195",
"0.800765",
"0.7995239",
"0.77537626",
"0.7673223",
"0.7527734",
"0.7523595",
"0.75151366",
"0.7402967",
"0.73676014",
"0.7278411",... | 0.87226206 | 1 |
Creates batches of sentence ids. A positive max_batch_size determines the maximum number of sentences in each batch. A negative max_batch_size dynamically creates the batches such that each batch contains abs(max_batch_size) words. Returns a list of lists with sentences ids. | def create_batches_of_sentence_ids(sentences, batch_equal_size, max_batch_size):
batches_of_sentence_ids = []
if batch_equal_size:
sentence_ids_by_length = OrderedDict()
for i in range(len(sentences)):
length = len(sentences[i].tokens)
if length no... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_batches(int_text, batch_size, seq_length):\n # TODO: Implement Function\n \n words_per_batch = batch_size * seq_length\n \n n_batches = len(int_text) // words_per_batch\n \n arr = np.array(int_text[:words_per_batch * n_batches])\n arr = arr.reshape([batch_size,-1])\n \n batche... | [
"0.63024503",
"0.62611544",
"0.6199617",
"0.6185454",
"0.6140356",
"0.6122704",
"0.6122704",
"0.6109552",
"0.6073204",
"0.6023273",
"0.5993949",
"0.59798557",
"0.59652495",
"0.596043",
"0.59600216",
"0.5933875",
"0.58881474",
"0.58501756",
"0.58026797",
"0.5787962",
"0.576916... | 0.83137375 | 0 |
Given the packed bytes for multiple options, returns a list of packed bytes for the individual options. | def segment_all(raw_bytes):
util.assert_type_bytes(raw_bytes)
util.assert_block32_length(raw_bytes)
segments = []
while ( 0 < len(raw_bytes) ):
( segment, raw_bytes_remaining ) = segment_rolling(raw_bytes)
segments.append( segment )
raw_bytes = raw_bytes_remaining
return segm... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pack_all(opts_lst): #todo needs test\n #todo verify all fields\n util.assert_type_list(opts_lst)\n cum_result = ''\n for opt in opts_lst:\n cum_result += opt.pack()\n cum_result += EndOfOptions.PACKED_BYTES\n return cum_result",
"def unpack_all(dispatch_table, options_bytes):\n r... | [
"0.71251094",
"0.69928086",
"0.68453324",
"0.6667661",
"0.6344123",
"0.61316866",
"0.6116363",
"0.58971417",
"0.5896492",
"0.58461696",
"0.57810056",
"0.57647526",
"0.57508653",
"0.57453156",
"0.57315713",
"0.567577",
"0.5653724",
"0.5569846",
"0.55575305",
"0.55575305",
"0.5... | 0.0 | -1 |
Test that if the datastore has a bad resource file, the build will log an error instead of quietly failing. | def test_build_portal_from_repo_bad_resource_file(self, good_portal_cfg, good_portal_builder, mocked_resources):
mocked_resources.start_patching()
mock_repo = mocked_resources.get_mock('bdkd.datastore.Repository').return_value
mock_repo.name = 'test_bucket'
mock_repo.list.return_value = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_bad_file(self):\r\n self.F.ProductVersionFactory.create(product__name=\"Foo\", version=\"1.0\")\r\n\r\n output = self.call_command(\"Foo\", \"1.0\", \"does/not/exist.json\")\r\n\r\n self.assertEqual(\r\n output,\r\n (\r\n \"\",\r\n (... | [
"0.69443464",
"0.6835495",
"0.6568257",
"0.64814675",
"0.6479451",
"0.6454641",
"0.64092624",
"0.63897586",
"0.63117516",
"0.6310181",
"0.63084894",
"0.6295233",
"0.6291841",
"0.62826943",
"0.6214397",
"0.62086284",
"0.61612153",
"0.61592966",
"0.61559385",
"0.61557865",
"0.6... | 0.6341644 | 8 |
Function to check if a text has or not any sentence with a starting verb. | def starting_verb(self, text):
sentence_list = nltk.sent_tokenize(text)
for sentence in sentence_list:
pos_tags = nltk.pos_tag(tokenize(sentence))
first_word, first_tag = pos_tags[0]
if first_tag in ['VB', 'VBP'] or first_word == 'RT':
return True
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def starting_verb(self, text):\n sentence_list = nltk.sent_tokenize(text)\n for sentence in sentence_list:\n tokenized = tokenize(sentence)\n if tokenized:\n pos_tags = nltk.pos_tag(tokenized)\n first_word, first_tag = pos_tags[0]\n i... | [
"0.7775947",
"0.6944281",
"0.65622896",
"0.6525686",
"0.6458961",
"0.64335805",
"0.6338409",
"0.6262257",
"0.6244012",
"0.61862487",
"0.61645013",
"0.6110872",
"0.6110872",
"0.6092834",
"0.60859764",
"0.6058512",
"0.6037219",
"0.60287124",
"0.6017216",
"0.601461",
"0.59576344... | 0.7855847 | 0 |
A function that states wether or not a given text has a starting verb. | def transform(self, X):
X_tagged = pd.Series(X).apply(self.starting_verb)
return pd.DataFrame(X_tagged) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def starting_verb(self, text):\n sentence_list = nltk.sent_tokenize(text)\n for sentence in sentence_list:\n pos_tags = nltk.pos_tag(tokenize(sentence))\n first_word, first_tag = pos_tags[0]\n if first_tag in ['VB', 'VBP'] or first_word == 'RT':\n retur... | [
"0.8097862",
"0.7976733",
"0.71778166",
"0.6586449",
"0.64627564",
"0.6268251",
"0.62614524",
"0.6209197",
"0.6186321",
"0.6175786",
"0.61714095",
"0.61007524",
"0.60701334",
"0.60322714",
"0.600646",
"0.5962942",
"0.59376055",
"0.58810914",
"0.5875572",
"0.5862406",
"0.58565... | 0.0 | -1 |
Log Errors caused by Updates. | def error(update, context):
logger.warning('Update "%s" caused error "%s"', update, context.error) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def error(update, context):\n\tlogger.warning('Update \"%s\" caused error \"%s\"', update, context.error)",
"def error(update, context):\n\tlogger.warning('Update \"%s\" caused error \"%s\"', update, context.error)",
"def error(self, update, context):\n self.logger.warning('Update \"%s\" caused error \"... | [
"0.7895998",
"0.7895998",
"0.78257465",
"0.77876204",
"0.77857095",
"0.77857095",
"0.7736321",
"0.7720785",
"0.77103233",
"0.7705559",
"0.7657797",
"0.76552874",
"0.76517016",
"0.76468384",
"0.76378685",
"0.76123977",
"0.7566961",
"0.75665903",
"0.7553289",
"0.7541538",
"0.75... | 0.77470577 | 27 |
Get current backend of environment. | def bk(self):
return get_backend(self.state) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_backend():\r\n return sys.modules[__name__]",
"def get_backend():\n\n return sys.modules[__name__]",
"def get_backend():\n return sys.modules[__name__]",
"def get_backend():\n return sys.modules[__name__]",
"def get_backend():\n return sys.modules[__name__]",
"def get_backend():\n ... | [
"0.81431735",
"0.812083",
"0.8073896",
"0.8073896",
"0.8073896",
"0.8073896",
"0.80234194",
"0.79955655",
"0.79627824",
"0.77897227",
"0.7775872",
"0.7775872",
"0.7635655",
"0.75793767",
"0.75679696",
"0.75679696",
"0.75679696",
"0.75679696",
"0.75328743",
"0.74700594",
"0.73... | 0.7319189 | 21 |
Concatenate arrays along an axis. | def cat(self, arrays, axis=-1):
if self.bk is np:
return np.append(*arrays, axis)
else:
return self.bk.cat(arrays, axis) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def concatenate(*arrays, axis=-1):\n\n # numpy.concatenate doesn't do broadcasting, so we need to do it explicitly\n return np.concatenate(\n broadcast(*arrays, ignore_axis=axis),\n axis=axis\n )",
"def concatenate(self, *others, axis=0):\n ...",
"def concatenate(tensors, axis=-1,... | [
"0.78359693",
"0.7502051",
"0.7337612",
"0.7255094",
"0.7215844",
"0.71141285",
"0.70925117",
"0.70134634",
"0.7007876",
"0.69408214",
"0.6908838",
"0.68859786",
"0.65770745",
"0.65603423",
"0.6551114",
"0.6540642",
"0.65399486",
"0.65185195",
"0.65031236",
"0.64811766",
"0.6... | 0.76620823 | 1 |
Return random number between min_val and max_val. | def rand(self, min_val, max_val):
if self.bk is np:
return np.random.randn() * (max_val - min_val) + min_val
else:
return self.bk.rand(min_val, max_val) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_rand_number(min_value, max_value):\r\n range = max_value - min_value\r\n choice = random.uniform(0,1)\r\n return min_value + range*choice",
"def _rand_value(max_value):\n return randint(1, max_value)",
"def between(min, max):\n return random.random() * (max - min) + min",
"def int_rand... | [
"0.8378204",
"0.8097824",
"0.789475",
"0.7715104",
"0.7624514",
"0.7504972",
"0.74483544",
"0.7399387",
"0.73502725",
"0.7324516",
"0.73117125",
"0.72818273",
"0.7258069",
"0.72408056",
"0.71651524",
"0.7165074",
"0.71561104",
"0.71149296",
"0.7105832",
"0.7084295",
"0.704270... | 0.8142031 | 1 |
Run one timestep of the environment's dynamics. When end of episode is reached, you are responsible for calling `reset()` to reset this environment's state. Accepts an action and returns a tuple (observation, reward, done, info). | def step(self, action):
raise NotImplementedError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _step(self, action):\n\n if self._game.is_episode_finished():\n self.reset()\n\n agent_action = self._game.actions()[int(action)]\n assert agent_action in self._game.actions(), \"Action not in action space!\"\n\n reward = self._game.make_action(agent_action)\n\n ob... | [
"0.783968",
"0.7679755",
"0.75147015",
"0.7502063",
"0.7404284",
"0.73915374",
"0.73895854",
"0.7270514",
"0.72677094",
"0.72361505",
"0.72286487",
"0.7206154",
"0.7202309",
"0.71974194",
"0.7192843",
"0.71438706",
"0.71421164",
"0.71258485",
"0.71095324",
"0.7109437",
"0.710... | 0.0 | -1 |
Constructor. Launch the web driver browser, initialize the league field by parsing the representative JSON file, and connect to the database manager. | def __init__(self, league_json, initialize_db):
self.browser = webdriver.Chrome("./chromedriver/chromedriver")
self.league = self.parse_json(league_json)
self.db_manager = DatabaseManager(initialize_db) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, league_id):\n self.league_id = league_id.lower()\n self.match_page_resp = requests.get(f\"https://siege.gg/competitions/{self.league_id}\")\n self.soup_object = BeautifulSoup(self.match_page_resp.text, \"lxml\")",
"def __init__(self, player_name):\n self.player_name... | [
"0.5793493",
"0.57292104",
"0.57092744",
"0.5582598",
"0.5571338",
"0.55268586",
"0.5522674",
"0.5515242",
"0.54958904",
"0.54905707",
"0.5476959",
"0.54415405",
"0.54340535",
"0.5414576",
"0.5413983",
"0.54068285",
"0.5395613",
"0.5372412",
"0.53233707",
"0.5314236",
"0.5288... | 0.8451785 | 0 |
Determine whether a provided HTML tag is a row for a date. | def is_date(self, tag):
return "center" in tag["class"] and "nob-border" in tag["class"] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def is_soccer_match_or_date(self, tag):\n\n if tag.name != \"tr\":\n return False\n if \"center\" in tag[\"class\"] and \"nob-border\" in tag[\"class\"]:\n return True\n if \"deactivate\" in tag[\"class\"] and tag.has_attr(\"xeid\"):\n return True\n retu... | [
"0.68336475",
"0.6273311",
"0.6162306",
"0.6012568",
"0.59517694",
"0.58085346",
"0.57737136",
"0.57436275",
"0.56882715",
"0.5586734",
"0.5574124",
"0.55733067",
"0.55145264",
"0.54955703",
"0.5475205",
"0.5469093",
"0.5455279",
"0.54161865",
"0.5414932",
"0.5384788",
"0.536... | 0.70063156 | 0 |
Determine whether a given date string is currently supported by this software's parsing capabilities. | def is_date_string_supported(self, date_string):
if date_string is None:
return False
elif "Today" in date_string:
return False
elif "Yesterday" in date_string:
return False
elif "Qualification" in date_string:
return False
elif "P... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def has_date(string):\n \n # Checks whether string has date indicators\n requirement = ['-', '/', ':']\n has_req = [char for char in requirement if char in string]\n if (len(has_req) == 0):\n return False\n \n try: \n parse(string)\n return True\n\n except ValueError:\n... | [
"0.8034871",
"0.75643986",
"0.72487986",
"0.72487986",
"0.72487986",
"0.7246197",
"0.7221938",
"0.7218654",
"0.71751404",
"0.7110727",
"0.6917997",
"0.6882061",
"0.6855961",
"0.6811028",
"0.67800665",
"0.6768999",
"0.6768999",
"0.6729153",
"0.6701897",
"0.65416276",
"0.652613... | 0.8067995 | 0 |
Extract the betting odds for a match from an HTML tag for a soccer match row. | def get_odds(self, tag):
odds_cells = tag.find_all(class_="odds-nowrp")
odds = []
for cell in odds_cells:
odds.append(cell.text)
return odds | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def parser_end_watch(html, matches_ended):\n\n soup = BeautifulSoup(html,'html.parser')\n table = soup.find('article', id='bets')\n match_time = []\n teams_couple = []\n teams_percents = []\n organization = []\n con = None\n con = sqlite3.connect('dota2lounge.db')\n cur = con.cursor()\n ... | [
"0.63279957",
"0.5948853",
"0.5813055",
"0.5719673",
"0.56909037",
"0.5607534",
"0.55446887",
"0.55225474",
"0.5508645",
"0.54845995",
"0.5468877",
"0.54273015",
"0.5422902",
"0.53927886",
"0.5382185",
"0.5369869",
"0.5363178",
"0.53627765",
"0.5309455",
"0.5285091",
"0.52832... | 0.5525834 | 7 |
Log Errors caused by Updates. | def error(update, context):
print('Update ' + update + ' caused error ') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def error(update, context):\n\tlogger.warning('Update \"%s\" caused error \"%s\"', update, context.error)",
"def error(update, context):\n\tlogger.warning('Update \"%s\" caused error \"%s\"', update, context.error)",
"def error(self, update, context):\n self.logger.warning('Update \"%s\" caused error \"... | [
"0.7895998",
"0.7895998",
"0.78257465",
"0.77876204",
"0.77857095",
"0.77857095",
"0.77470577",
"0.77470577",
"0.77470577",
"0.77470577",
"0.77470577",
"0.77470577",
"0.77470577",
"0.77470577",
"0.77470577",
"0.77470577",
"0.77470577",
"0.77470577",
"0.77470577",
"0.77470577",
... | 0.7705559 | 40 |
Return derivative of the function with respect to `s`. Note that we must take the chain rule into account in this function, but not in `fdiff`. Note that `diff` is the general function for evaluating derivatives; `Derivative` results in unevaluated derivatives. | def _eval_derivative(self, s):
# print(self.fdiff(1))
# print(self.args[0].diff(s))
return self.fdiff(1) * self.args[0].diff(s) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _eval_derivative(self, s):\n return self.fdiff(1) * self.args[0].diff(s)",
"def _eval_derivative(self, s):\n return self.fdiff(1) * self.args[0].diff(s)",
"def derivative(self):\n\t\tderivative = (self.error - self.old_error) / self.Ts\n\t\treturn derivative",
"def _s_derivative(self, z):\n... | [
"0.7891272",
"0.7891272",
"0.65353006",
"0.6287015",
"0.62632185",
"0.6222285",
"0.6186754",
"0.6179445",
"0.6140274",
"0.6096631",
"0.6070012",
"0.6040012",
"0.60262245",
"0.6009367",
"0.5996859",
"0.59314346",
"0.59139836",
"0.5891955",
"0.5834549",
"0.58309555",
"0.580447"... | 0.76924247 | 2 |
Returns the first derivative of the function. To be precise, this is the first derivative with respect to the function's argument, whatever that argument may be. And in particular, we don't need to account for the chain rule. Note that `diff` is the general function for evaluating derivatives; `Derivative` results in u... | def fdiff(self, argindex=1):
from sympy.core.function import ArgumentIndexError
# print("VectorFunction.fdiff")
if (argindex != 1):
raise ArgumentIndexError(self, argindex)
# print("Returning from VectorFunction.fdiff")
V = Vector('d'+self.name+'d'+str(self.args[0]),
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def derivative(self):\n\t\tderivative = (self.error - self.old_error) / self.Ts\n\t\treturn derivative",
"def derivative(cls, x: np.float) -> np.float:\n return cls.eval(x) * (1 - cls.eval(x))",
"def derivative(self, x):\n grad = x.clone()\n grad[grad>0] = 1\n grad[grad<=0] = 0\n ... | [
"0.67406356",
"0.63705546",
"0.6362169",
"0.6329403",
"0.6301444",
"0.6264255",
"0.6230784",
"0.62280464",
"0.6224816",
"0.6224816",
"0.62222636",
"0.6202384",
"0.6181336",
"0.61414945",
"0.6121172",
"0.61031055",
"0.6088374",
"0.60743546",
"0.60260266",
"0.602562",
"0.599115... | 0.53434384 | 53 |
Return the scalar or tensor product | def __mul__(self, B):
# print('TensorProductFunction.__mul__<{0},{1}>({2},{3})'.format(type(self), type(B), self,B))
if(hasattr(B, '_is_tensor') and B._is_tensor):
# Fall back to Tensor.__rmul__ by doing this:
return NotImplemented
if(isinstance(B, TensorProductFunction))... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_mul_scalar_tensor(self):\n scalar = pnp.array(5)\n prod_op = qml.RX(1.23, 0) * scalar\n assert isinstance(prod_op, SProd)\n assert prod_op.scalar is scalar",
"def test_mul_scalar_torch_tensor(self):\n import torch\n\n scalar = torch.tensor(5)\n prod_op = ... | [
"0.7640387",
"0.7620068",
"0.7412091",
"0.73132163",
"0.72815454",
"0.70811033",
"0.6802286",
"0.6773215",
"0.6750478",
"0.6601677",
"0.6581807",
"0.6560747",
"0.65588015",
"0.6509423",
"0.64843214",
"0.6479295",
"0.6437936",
"0.6413562",
"0.64064085",
"0.6367275",
"0.6343148... | 0.7192343 | 5 |
Return the scalar or tensor product | def __rmul__(self, B):
# print('TensorProductFunction.__rmul__<{0},{1}>({2},{3})'.format(type(self), type(B), self, B))
if(hasattr(B, '_is_tensor') and B._is_tensor):
# Fall back to Tensor.__rmul__ by doing this:
return NotImplemented
if(isinstance(B, TensorProductFunctio... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_mul_scalar_tensor(self):\n scalar = pnp.array(5)\n prod_op = qml.RX(1.23, 0) * scalar\n assert isinstance(prod_op, SProd)\n assert prod_op.scalar is scalar",
"def test_mul_scalar_torch_tensor(self):\n import torch\n\n scalar = torch.tensor(5)\n prod_op = ... | [
"0.7640387",
"0.7620068",
"0.7412091",
"0.73132163",
"0.72815454",
"0.7192343",
"0.70811033",
"0.6802286",
"0.6773215",
"0.6750478",
"0.6581807",
"0.6560747",
"0.65588015",
"0.6509423",
"0.64843214",
"0.6479295",
"0.6437936",
"0.6413562",
"0.64064085",
"0.6367275",
"0.6343148... | 0.6601677 | 10 |
Return derivative of the function with respect to `s`. Note that we must take the chain rule into account in this function, but not in `fdiff`. Note that `diff` is the general function for evaluating derivatives; `Derivative` results in unevaluated derivatives. | def _eval_derivative(self, s):
return self.fdiff(1) * self.args[0].diff(s) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _eval_derivative(self, s):\n # print(self.fdiff(1))\n # print(self.args[0].diff(s))\n return self.fdiff(1) * self.args[0].diff(s)",
"def derivative(self):\n\t\tderivative = (self.error - self.old_error) / self.Ts\n\t\treturn derivative",
"def _s_derivative(self, z):\n return 1 -... | [
"0.7691968",
"0.6535361",
"0.62863183",
"0.62632996",
"0.62198013",
"0.61855954",
"0.6177288",
"0.61390305",
"0.6095396",
"0.606837",
"0.60394615",
"0.60250396",
"0.6008448",
"0.59966993",
"0.59302974",
"0.5911258",
"0.58917767",
"0.58325267",
"0.5830183",
"0.58037513",
"0.57... | 0.7890773 | 0 |
Returns the first derivative of the function. To be precise, this is the first derivative with respect to the function's argument, whatever that argument may be. And in particular, we don't need to account for the chain rule. Note that `diff` is the general function for evaluating derivatives; `Derivative` results in u... | def fdiff(self, argindex=1):
from sympy.core.function import ArgumentIndexError
if (argindex != 1):
raise ArgumentIndexError(self, argindex)
TP = TensorProduct(list(self.vectors),
coefficient = diff(self.coefficient, self.args[0]),
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def derivative(self):\n\t\tderivative = (self.error - self.old_error) / self.Ts\n\t\treturn derivative",
"def derivative(cls, x: np.float) -> np.float:\n return cls.eval(x) * (1 - cls.eval(x))",
"def derivative(self, x):\n grad = x.clone()\n grad[grad>0] = 1\n grad[grad<=0] = 0\n ... | [
"0.67408353",
"0.6370284",
"0.63627476",
"0.6330038",
"0.630449",
"0.626277",
"0.6232031",
"0.62280923",
"0.62239265",
"0.62239265",
"0.62219846",
"0.62021655",
"0.61800086",
"0.6140385",
"0.6120882",
"0.61026233",
"0.60882574",
"0.60737014",
"0.60256314",
"0.60254896",
"0.59... | 0.0 | -1 |
Return derivative of the function with respect to `s`. Note that we must take the chain rule into account in this function, but not in `fdiff`. Note that `diff` is the general function for evaluating derivatives; `Derivative` results in unevaluated derivatives. | def _eval_derivative(self, s):
return self.fdiff(1) * self.args[0].diff(s) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _eval_derivative(self, s):\n # print(self.fdiff(1))\n # print(self.args[0].diff(s))\n return self.fdiff(1) * self.args[0].diff(s)",
"def derivative(self):\n\t\tderivative = (self.error - self.old_error) / self.Ts\n\t\treturn derivative",
"def _s_derivative(self, z):\n return 1 -... | [
"0.7691968",
"0.6535361",
"0.62863183",
"0.62632996",
"0.62198013",
"0.61855954",
"0.6177288",
"0.61390305",
"0.6095396",
"0.606837",
"0.60394615",
"0.60250396",
"0.6008448",
"0.59966993",
"0.59302974",
"0.5911258",
"0.58917767",
"0.58325267",
"0.5830183",
"0.58037513",
"0.57... | 0.7890773 | 1 |
Returns the first derivative of the function. To be precise, this is the first derivative with respect to the function's argument, whatever that argument may be. And in particular, we don't need to account for the chain rule. Note that `diff` is the general function for evaluating derivatives; `Derivative` results in u... | def fdiff(self, argindex=1):
from sympy.core.function import ArgumentIndexError
if (argindex != 1):
raise ArgumentIndexError(self, argindex)
T = sum(diff(t_p, self.args[0]) for t_p in self)
try:
return T.compress()
except AttributeError:
return... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def derivative(self):\n\t\tderivative = (self.error - self.old_error) / self.Ts\n\t\treturn derivative",
"def derivative(cls, x: np.float) -> np.float:\n return cls.eval(x) * (1 - cls.eval(x))",
"def derivative(self, x):\n grad = x.clone()\n grad[grad>0] = 1\n grad[grad<=0] = 0\n ... | [
"0.67408353",
"0.6370284",
"0.63627476",
"0.6330038",
"0.630449",
"0.626277",
"0.6232031",
"0.62280923",
"0.62239265",
"0.62239265",
"0.62219846",
"0.62021655",
"0.61800086",
"0.6140385",
"0.6120882",
"0.61026233",
"0.60882574",
"0.60737014",
"0.60256314",
"0.60254896",
"0.59... | 0.5105055 | 75 |
Returns a copy of this Pauli that references the same code but is backed by a copy of the bsf. | def copy(self):
return self.code.new_pauli(bsf=np.copy(self.to_bsf())) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __copy__(self):\n return self.copy()",
"def copy(self):\n brain = copy.deepcopy(self)\n return brain",
"def __copy__(self): \n return Vistrail.do_copy(self)",
"def copy(self):\n return self",
"def copy(self):\n\t\treturn copy.copy(self)",
"def copy(self):\n r... | [
"0.6715066",
"0.66183925",
"0.65510577",
"0.65130466",
"0.65093714",
"0.636686",
"0.636662",
"0.6357274",
"0.6357274",
"0.6357274",
"0.6357274",
"0.63513684",
"0.63513684",
"0.63513684",
"0.6316308",
"0.6315535",
"0.63136774",
"0.6278033",
"0.62314206",
"0.62192845",
"0.62131... | 0.74185735 | 0 |
Apply a logical X1 operator, i.e. column of X on horizontaledge sites of plaquettes on primal. | def logical_x1(self):
# flip x_operators[primal_lattice, all_rows, middle column]
self._xs[self.code.PRIMAL_INDEX, :, self._xs.shape[2] // 2] ^= 1
return self | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def logical_z1(self):\n # flip z_operators[primal_lattice, middle_row, all_columns]\n self._zs[self.code.PRIMAL_INDEX, self._zs.shape[1] // 2, :] ^= 1\n return self",
"def vectorize_PrimeRelu(x):\n\n return np.where(x < 0, 0, 1)",
"def logical_x2(self):\n # flip x_operators[dual_... | [
"0.6488217",
"0.58376485",
"0.58053553",
"0.57790315",
"0.557509",
"0.555031",
"0.5397269",
"0.53426695",
"0.5307363",
"0.5288734",
"0.5286558",
"0.5250103",
"0.52088165",
"0.5202318",
"0.5196557",
"0.5193889",
"0.51917195",
"0.5188538",
"0.51877433",
"0.5178778",
"0.5176119"... | 0.7506042 | 0 |
Apply a logical Z2 operator, i.e. column of Z on horizontaledge sites of plaquettes on dual. | def logical_z2(self):
# flip z_operators[dual_lattice, all_rows, middle_column]
self._zs[self.code.DUAL_INDEX, :, self._zs.shape[2] // 2] ^= 1
return self | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def logical_z1(self):\n # flip z_operators[primal_lattice, middle_row, all_columns]\n self._zs[self.code.PRIMAL_INDEX, self._zs.shape[1] // 2, :] ^= 1\n return self",
"def logical_x2(self):\n # flip x_operators[dual_lattice, middle_row, all_columns]\n self._xs[self.code.DUAL_IN... | [
"0.6285929",
"0.62580115",
"0.5761136",
"0.56629056",
"0.5528287",
"0.55227184",
"0.5402694",
"0.53572387",
"0.53544945",
"0.5290394",
"0.52832544",
"0.52705294",
"0.5262287",
"0.5213082",
"0.5209887",
"0.5187573",
"0.5180991",
"0.51789796",
"0.5166151",
"0.5163155",
"0.51418... | 0.7642732 | 0 |
takes a time string and converts to seconds since 1970/01/01 | def splitTime(t):
yEnd = t.find("-")
year = t[:yEnd]
mEnd = t.find("-",yEnd+1)
month = t[yEnd+1:mEnd]
dEnd = t.find("T")
day = t[mEnd+1:dEnd]
hEnd=t.find(":")
hour = t[dEnd+1:hEnd]
minEnd = t.find(":",hEnd+1)
minute = t[hEnd+1:minEnd]
sec = t[minEnd+1:t.find("Z")]
newT = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def convert_time_to_secs(input_time):\n hours = input_time[:2]\n minutes = input_time[2:4]\n second = input_time[4:]\n\n hours = int(hours) * 60 * 60\n minutes = int(minutes) * 60\n second = float(second)\n\n return hours+minutes+second",
"def get_sec(time_str):\n h, m, s = time_str.split... | [
"0.74617714",
"0.72393817",
"0.72074527",
"0.71976393",
"0.7140871",
"0.71256113",
"0.7077017",
"0.7074253",
"0.6970586",
"0.6956718",
"0.6952712",
"0.6916406",
"0.6887063",
"0.6848548",
"0.6847462",
"0.6759941",
"0.6751995",
"0.673117",
"0.668633",
"0.6649699",
"0.6641412",
... | 0.0 | -1 |
Get a tf.data.Dataset given input .wav files and their labels. The returned dataset emits 2tuples of `(spectrogram, label)`, wherein `spectrogram` is a tensor of dtype tf.float32 and shape [43, 232, 1]. It is znormalized (i.e., have a mean of ~0.0 and variance of ~1.0). `label` is a tensor of dtype tf.int32 and shape [... | def get_dataset(input_wav_paths, labels):
ds = tf.data.Dataset.from_tensor_slices(input_wav_paths)
# Read audio waveform from the .wav files.
ds = ds.map(read_wav)
ds = tf.data.Dataset.zip((ds, tf.data.Dataset.from_tensor_slices(labels)))
# Keep only the waveforms longer than `EXPECTED_WAVEFORM_LEN`.
ds = d... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def paths_and_labels_to_dataset(audio_paths, labels):\n path_ds = tf.data.Dataset.from_tensor_slices(audio_paths)\n audio_ds = path_ds.map(lambda x: path_to_audio(x))\n label_ds = tf.data.Dataset.from_tensor_slices(labels)\n return tf.data.Dataset.zip((audio_ds, label_ds))",
"def paths_and_labels_to_... | [
"0.69593656",
"0.65538055",
"0.64000684",
"0.62965715",
"0.6207736",
"0.61458904",
"0.6032426",
"0.5957605",
"0.59529877",
"0.58088565",
"0.5759152",
"0.5745223",
"0.5720206",
"0.57183266",
"0.5710754",
"0.57106525",
"0.57099795",
"0.56530094",
"0.5641132",
"0.56060857",
"0.5... | 0.7853855 | 0 |
Construct a new Physician object. | def __init__(self, name, physician_id):
self.name = name
self.physician_id = physician_id
self.hospitals = [] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def create_individual(self):\n individual = Individual_Interface(12)\n individual.init_value()\n return individual",
"def __init__(self, physObj=\"mu\", selLevel=\"all\", mcType=None):\n \n prefix = \"h_data\"\n if mcType is not None:\n prefix = \"h_%s\"%mcTyp... | [
"0.5545757",
"0.5403403",
"0.5356393",
"0.5354578",
"0.53176856",
"0.5256262",
"0.5243471",
"0.52336323",
"0.5226006",
"0.5212741",
"0.5177355",
"0.5144766",
"0.51421666",
"0.5142161",
"0.5114188",
"0.51084393",
"0.5103238",
"0.50561893",
"0.504439",
"0.50409305",
"0.5023081"... | 0.60656244 | 0 |
Creates a BIDS data dictionary from dataframe columns | def get_acq_dictionary(df):
acq_dict = {}
acq_dict["subject"] = {"Description": "Participant ID"}
acq_dict["session"] = {"Description": "Session ID"}
docs = " https://cubids.readthedocs.io/en/latest/about.html#definitions"
desc = "Acquisition Group. See Read the Docs for more information"
acq_di... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def find_data(df):\n d = {}\n cols = [report_id, duplicate_id, serious_id, serious_id_type, patient_id]\n d = dict([ (label, df[label]) for f_id in cols for label in df.columns if label in f_id])\n return pd.DataFrame(d)",
"def df_to_dict(df, key_column, val_column):\n xkey = df[key_column].tolist... | [
"0.63600856",
"0.6286783",
"0.62815565",
"0.6060221",
"0.60417396",
"0.60141367",
"0.5929286",
"0.592246",
"0.57395583",
"0.56944567",
"0.5686454",
"0.5678237",
"0.56732243",
"0.5661994",
"0.5640681",
"0.5606438",
"0.5587175",
"0.55837345",
"0.5561147",
"0.5560966",
"0.554961... | 0.0 | -1 |
Compress a list of byte values to a fixed target length. >>> bytes = [96, 173, 141, 13, 135, 27, 96, 149, 128, 130, 151] >>> HumanHasher.compress(bytes, 4) [205, 128, 156, 96] Attempting to compress a smaller number of bytes to a larger number is | def compress(bytes, target):
length = len(bytes)
if target > length:
raise ValueError("Fewer input bytes than requested output")
# Split `bytes` into `target` segments.
seg_size = length // target
segments = [bytes[i * seg_size : (i + 1) * seg_size] for i in range(t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def compress(uncompressed):\n\n # Build the dictionary.\n dict_size = 256\n dictionary = {chr(i): chr(i) for i in range(dict_size)}\n i = 1\n w = \"\"\n result = []\n for c in uncompressed:\n wc = w + c\n if wc in dictionary:\n w = wc\n else:\n result... | [
"0.58928216",
"0.57967395",
"0.57734996",
"0.5712681",
"0.5587898",
"0.5562061",
"0.54927266",
"0.5428389",
"0.540965",
"0.5349942",
"0.53299564",
"0.5298389",
"0.5286644",
"0.5281835",
"0.5257595",
"0.51982",
"0.51956844",
"0.51569754",
"0.5130624",
"0.51099217",
"0.51031727... | 0.6975593 | 0 |
Request that the object close. Note this method does not wait until the close is complete. It merely starts the closing process if it isn't already underway. | def request_close(self):
with self._closer_lock:
if self._closing:
return
self._closing = True
self._wake_closer.notify() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def close(self):\n self.__enqueue('close')",
"def close(self):\n self._lock_and_call(self._close)",
"def close(self) -> None:\n self._close = True",
"def close(self) -> None:\n self.__exit__()",
"def close(self) -> bool:\n return self._make_request()",
"def _close(self):\n\... | [
"0.73596805",
"0.7291964",
"0.70372015",
"0.70155925",
"0.6999649",
"0.6973526",
"0.6944669",
"0.69426864",
"0.6936008",
"0.69272053",
"0.6868305",
"0.6867963",
"0.68337137",
"0.6756033",
"0.6753741",
"0.673621",
"0.6721166",
"0.6721166",
"0.6714376",
"0.6709659",
"0.6709659"... | 0.7789618 | 0 |
Returns whether the queue is empty. | def empty(self):
return not self.stack1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IsEmpty(self):\r\n return len(self._queue) == 0",
"def is_empty(self):\n return len(self._queue) == 0",
"def is_empty(self):\n if self.queue:\n return False\n return True",
"def is_empty(self):\n\n return not self._queue",
"def empty(self):\n return len(... | [
"0.92485046",
"0.92243034",
"0.9106652",
"0.9098441",
"0.906846",
"0.9053733",
"0.9053733",
"0.90268433",
"0.8984337",
"0.8917236",
"0.8912403",
"0.8896071",
"0.8877591",
"0.88436323",
"0.8737546",
"0.8679591",
"0.85208976",
"0.8470112",
"0.8325841",
"0.83114576",
"0.83114576... | 0.0 | -1 |
Vectorized kernel computation. Computes differences in a matrix, and then applies a vectorized function. Shape of K is len(arr1), len(arr2) | def kernel_matrix(arr1, arr2, beta_inv, gaussian_weight, exponential_weight):
# Create outer product, calculation for kernels
arg1 = np.outer(arr1, np.ones_like(arr2))
arg2 = np.outer(np.ones_like(arr1), arr2)
# Use a kernel consisting of three parts: gaussian, exponential, linear
K = kernel_funct... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kernel(self, X1, X2):\n summ = np.sum(X1 ** 2, 1).reshape(-1, 1) + np.sum(X2 ** 2, 1)\n dt = summ + (-2 * np.dot(X1, X2.T))\n res = self.sigma_f ** 2 * np.exp(-0.5 / self.l ** 2 * dt)\n return res",
"def OU_kernel_np(length,x):\n x1 = np.reshape(x,[-1,1]) #colvec\n x2 = np.r... | [
"0.6471905",
"0.6436031",
"0.63635826",
"0.63635826",
"0.63571715",
"0.63355494",
"0.63355494",
"0.631802",
"0.631802",
"0.63123643",
"0.63123643",
"0.6283585",
"0.6283585",
"0.62638086",
"0.6236036",
"0.61920077",
"0.6190993",
"0.6146668",
"0.6141324",
"0.61358017",
"0.60961... | 0.71871865 | 0 |
V1PodSpec a model defined in OpenAPI | def __init__(self, active_deadline_seconds=None, affinity=None, automount_service_account_token=None, containers=None, dns_config=None, dns_policy=None, enable_service_links=None, ephemeral_containers=None, host_aliases=None, host_ipc=None, host_network=None, host_pid=None, host_users=None, hostname=None, image_pull_se... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def as_podspec(self):\n print('\\n')\n print('Building Podspec for %s' % self.name)\n print('-----------------------------------------------------------')\n\n podspec = \"Pod::Spec.new do |s|\\n\\n\"\n podspec += \" s.name = '%s'\\n\" % self.name\n podspec += \" s.ve... | [
"0.61146593",
"0.6064371",
"0.5894845",
"0.58593005",
"0.5651093",
"0.5621844",
"0.55029434",
"0.5454461",
"0.54381955",
"0.5304422",
"0.51950157",
"0.51848495",
"0.517578",
"0.51623183",
"0.5148227",
"0.51427406",
"0.5132702",
"0.5129513",
"0.5122567",
"0.5111308",
"0.507060... | 0.0 | -1 |
Sets the affinity of this V1PodSpec. | def affinity(self, affinity):
self._affinity = affinity | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_affinity(self, val: List[int]):\n psutil.Process(self._process.pid).cpu_affinity(val)",
"def qemu_set_affinity(self, *host_cpus):\n for _ in range(3):\n try:\n qemu_cpus = self.get_qemu_pids()\n\n if len(qemu_cpus) != len(host_cpus):\n ... | [
"0.6329203",
"0.5994763",
"0.59868944",
"0.57657397",
"0.5442871",
"0.5439734",
"0.52707183",
"0.52545774",
"0.4989021",
"0.4895348",
"0.48177102",
"0.47900274",
"0.47404295",
"0.46447903",
"0.4555111",
"0.44536832",
"0.44491595",
"0.4448619",
"0.44458982",
"0.4413409",
"0.43... | 0.690972 | 0 |
Sets the automount_service_account_token of this V1PodSpec. | def automount_service_account_token(self, automount_service_account_token):
self._automount_service_account_token = automount_service_account_token | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_token(token):\n os.environ[\"DS_AUTH_TOKEN\"] = token",
"def service_account(self, service_account):\n\n self._service_account = service_account",
"def set_access_token(self, token):\n\n self.access_token = token",
"def service_mac(self, service_mac):\n self._service_mac = ser... | [
"0.51297706",
"0.5107185",
"0.4883046",
"0.48648113",
"0.48292205",
"0.46484807",
"0.46407363",
"0.45773152",
"0.45667708",
"0.45440313",
"0.4502961",
"0.4499016",
"0.44377097",
"0.44137686",
"0.44137686",
"0.44092584",
"0.44056803",
"0.43674845",
"0.43248507",
"0.43216285",
... | 0.7793255 | 0 |
Sets the containers of this V1PodSpec. | def containers(self, containers):
if self.local_vars_configuration.client_side_validation and containers is None: # noqa: E501
raise ValueError("Invalid value for `containers`, must not be `None`") # noqa: E501
self._containers = containers | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ephemeral_containers(self, ephemeral_containers):\n\n self._ephemeral_containers = ephemeral_containers",
"def __init__(__self__, *,\n containers: Optional[Sequence['outputs.ContainerResponse']] = None,\n revision_suffix: Optional[str] = None,\n scale: O... | [
"0.5422385",
"0.52626616",
"0.49789655",
"0.48538333",
"0.48538333",
"0.47674164",
"0.47574192",
"0.47119588",
"0.47109106",
"0.47074994",
"0.47039735",
"0.46896595",
"0.46864745",
"0.4683136",
"0.4682261",
"0.46569028",
"0.46222833",
"0.461975",
"0.461975",
"0.45641345",
"0.... | 0.62926364 | 0 |
Sets the ephemeral_containers of this V1PodSpec. | def ephemeral_containers(self, ephemeral_containers):
self._ephemeral_containers = ephemeral_containers | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def setEphemeralIntelligence(self, intelligence):\n if self._enduringIntelligence:\n raise ValueError(\"Tried setting an ephemeral intelligence %r when \"\n \"an enduring intelligence %r already existed\"\n % (intelligence, self._enduringInt... | [
"0.543665",
"0.51932365",
"0.48716173",
"0.47334722",
"0.47334722",
"0.46631625",
"0.45012018",
"0.44825092",
"0.42836484",
"0.4228105",
"0.41811147",
"0.41586292",
"0.40997228",
"0.40872735",
"0.39888552",
"0.3941979",
"0.39210078",
"0.39013267",
"0.39013267",
"0.3887631",
"... | 0.7901836 | 0 |
Sets the host_network of this V1PodSpec. | def host_network(self, host_network):
self._host_network = host_network | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_host(self, host):\n\n self.host = host",
"def set_host_ip(self, host, host_ip):\n host.setIP(str(host_ip.ip), prefixLen=self.NETPREFIX)",
"def set_host(self, host):\n self.host = host",
"def host(self, host):\n\n self._host = host",
"def host(self, host):\n\n self... | [
"0.600713",
"0.5994359",
"0.58894217",
"0.58628124",
"0.58628124",
"0.58628124",
"0.58628124",
"0.58022976",
"0.5586353",
"0.5586353",
"0.5451908",
"0.53756326",
"0.53434414",
"0.5334579",
"0.5285957",
"0.5131938",
"0.5113234",
"0.50174934",
"0.50174934",
"0.50174934",
"0.501... | 0.75811356 | 0 |
Sets the hostname of this V1PodSpec. | def hostname(self, hostname):
self._hostname = hostname | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hostname(self, hostname):\n \n self._hostname = hostname",
"def hostname(self, hostname):\n if hostname is None:\n raise ValueError(\"Invalid value for `hostname`, must not be `None`\") # noqa: E501\n\n self._hostname = hostname",
"def set_host(self, hostname):\n ... | [
"0.7299733",
"0.7125873",
"0.6923254",
"0.6769518",
"0.6526964",
"0.6461937",
"0.6184917",
"0.61175925",
"0.61175925",
"0.61175925",
"0.60415804",
"0.59712994",
"0.59377944",
"0.5876018",
"0.5864261",
"0.58252525",
"0.580202",
"0.57946473",
"0.57849866",
"0.57716423",
"0.5771... | 0.7231429 | 4 |
Sets the node_name of this V1PodSpec. | def node_name(self, node_name):
self._node_name = node_name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_node_name(self, new_name: str, node_id: Optional[int] = None, node_name: Optional[str] = None):\n raise NotImplementedError",
"def iscsi_node_set_name(self, node_name):\n return self.request( \"iscsi-node-set-name\", {\n 'node_name': [ node_name, 'node-name', [ basestring, 'None'... | [
"0.6655533",
"0.66534984",
"0.66182256",
"0.65801674",
"0.63787204",
"0.6369484",
"0.6342169",
"0.6257371",
"0.6252382",
"0.6024146",
"0.60138935",
"0.60080475",
"0.599695",
"0.5991485",
"0.59249365",
"0.58661604",
"0.56309545",
"0.55715156",
"0.54699665",
"0.54304737",
"0.54... | 0.6948285 | 0 |
Sets the os of this V1PodSpec. | def os(self, os):
self._os = os | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_os(self, os: str):\n self._os = os\n return self",
"def setOS(self, os):\n self.os = os",
"def set_os(self, name=None):\n if name not in self.os_class_map.keys():\n raise Exception(\"OS not supported!\")\n else:\n LOGGER.debug(\"Using %s wrapper.\", ... | [
"0.66041833",
"0.64456177",
"0.55895185",
"0.53184247",
"0.53184247",
"0.53184247",
"0.52955675",
"0.52955675",
"0.49667537",
"0.49404225",
"0.4763829",
"0.47606134",
"0.47499758",
"0.47463927",
"0.47432268",
"0.47400916",
"0.47120228",
"0.46928334",
"0.45745704",
"0.45711336",... | 0.60342395 | 3 |
Sets the preemption_policy of this V1PodSpec. | def preemption_policy(self, preemption_policy):
self._preemption_policy = preemption_policy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_soft_preemption(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=yc_soft_preemption_openconfig_mpls_igp__mpls_signaling_protocols_rsvp_te_global_soft_preemption, is_container='container', yang_name=\"soft-preemption\", parent=self, path_... | [
"0.6141379",
"0.61318463",
"0.611393",
"0.6091667",
"0.5957974",
"0.5957974",
"0.5957974",
"0.5957974",
"0.59551984",
"0.59551984",
"0.59551984",
"0.59551984",
"0.5699465",
"0.5607649",
"0.5607649",
"0.5607649",
"0.5607649",
"0.5607478",
"0.5607478",
"0.5607478",
"0.5607478",... | 0.8052384 | 0 |
Sets the priority of this V1PodSpec. | def priority(self, priority):
self._priority = priority | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_priority(self, priority):\n self.options['priority'] = priority",
"def _set_priority(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=RestrictedClassType(base_type=int, restriction_dict={'range': ['0... | [
"0.6231418",
"0.60785514",
"0.6061245",
"0.6061245",
"0.6061245",
"0.6061245",
"0.60568184",
"0.60568184",
"0.60568184",
"0.60568184",
"0.60210913",
"0.58957005",
"0.5826091",
"0.5822558",
"0.58168995",
"0.58168995",
"0.58168995",
"0.58168995",
"0.58148396",
"0.58148396",
"0.... | 0.58895713 | 14 |
Sets the priority_class_name of this V1PodSpec. | def priority_class_name(self, priority_class_name):
self._priority_class_name = priority_class_name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def test_replace_scheduling_v1_priority_class(self):\n pass",
"def test_patch_scheduling_v1_priority_class(self):\n pass",
"def _set_priority(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=RestrictedClassType(base_type=Restric... | [
"0.5778165",
"0.5730269",
"0.56143713",
"0.5613442",
"0.5569764",
"0.5569764",
"0.5569764",
"0.5569764",
"0.55612797",
"0.55612797",
"0.55612797",
"0.55612797",
"0.55555445",
"0.55555445",
"0.55253136",
"0.54715335",
"0.54588294",
"0.54485774",
"0.53718066",
"0.5354953",
"0.5... | 0.7507955 | 0 |
Sets the runtime_class_name of this V1PodSpec. | def runtime_class_name(self, runtime_class_name):
self._runtime_class_name = runtime_class_name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pod_name(self, pod_name: str):\n\n self._pod_name = pod_name",
"def class_name(self, class_name):\n\n self._class_name = class_name",
"def class_name(self, class_name):\n\n self._class_name = class_name",
"def set_class_name(self) -> 'PygalleBaseClass':\n return self.set_inter... | [
"0.5442811",
"0.5415947",
"0.5415947",
"0.52595264",
"0.5019572",
"0.498401",
"0.49725014",
"0.47757116",
"0.46274897",
"0.4548868",
"0.4481873",
"0.4454146",
"0.4445058",
"0.44384426",
"0.44384426",
"0.439326",
"0.439326",
"0.439326",
"0.439326",
"0.439326",
"0.439326",
"0... | 0.73819965 | 0 |
Sets the service_account of this V1PodSpec. | def service_account(self, service_account):
self._service_account = service_account | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def service_account_name(self, service_account_name):\n\n self._service_account_name = service_account_name",
"def set_service(self, service):\n self.service = service",
"def set_service_account(self, service_name, account):\n\n for service in self.services:\n if service_name ==... | [
"0.6472595",
"0.6131086",
"0.60449916",
"0.5769516",
"0.5733994",
"0.5733994",
"0.56921595",
"0.5647684",
"0.55752456",
"0.5484754",
"0.5484754",
"0.53213507",
"0.52579993",
"0.5239696",
"0.5199985",
"0.5176618",
"0.5144648",
"0.502998",
"0.49591175",
"0.49300453",
"0.4901591... | 0.7228337 | 0 |
Sets the service_account_name of this V1PodSpec. | def service_account_name(self, service_account_name):
self._service_account_name = service_account_name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SetServiceName(self, name):\n self.service_name = name",
"def service_account(self, service_account):\n\n self._service_account = service_account",
"def service_name(self, service_name):\n if self.local_vars_configuration.client_side_validation and service_name is None: # noqa: E501\n ... | [
"0.6420803",
"0.6284052",
"0.6138722",
"0.58108944",
"0.58108944",
"0.58108944",
"0.58108944",
"0.58075535",
"0.5719374",
"0.5704355",
"0.5668983",
"0.5512023",
"0.54142976",
"0.50282085",
"0.5010738",
"0.50096136",
"0.49834526",
"0.4972612",
"0.49433625",
"0.49256584",
"0.49... | 0.7658986 | 0 |
Sets the subdomain of this V1PodSpec. | def subdomain(self, subdomain):
self._subdomain = subdomain | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_subdomain(self,arg):\n self.mod[\"subdomain\"]= arg.subdomain",
"def with_subdomains(self, subdomains: Union[Iterable[str], str]):\n subdomains = split_on_dots(subdomains)\n val = self._val._replace(subdomains=subdomains)\n return Host(val)",
"def subdomain(self) -> Optional... | [
"0.66317177",
"0.6253551",
"0.56893355",
"0.5431548",
"0.5323798",
"0.5323798",
"0.5270669",
"0.52652574",
"0.52335155",
"0.5152062",
"0.51405",
"0.51227814",
"0.5029445",
"0.49971354",
"0.49718976",
"0.49484894",
"0.49188748",
"0.48844406",
"0.48109663",
"0.47366834",
"0.469... | 0.7274517 | 0 |
Sets the termination_grace_period_seconds of this V1PodSpec. | def termination_grace_period_seconds(self, termination_grace_period_seconds):
self._termination_grace_period_seconds = termination_grace_period_seconds | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def termination_grace_period_seconds(self) -> Optional[float]:\n return pulumi.get(self, \"termination_grace_period_seconds\")",
"def set_stop_grace_period(grace):\r\n reg = evreg.Registry(root=evcommon.EVREG_CONFIG)\r\n reg.ensure_key(AUTOCMD_KEY)\r\n reg.create_integer_value(AUTOCMD_KEY, \"grac... | [
"0.6082124",
"0.5238265",
"0.5002628",
"0.48943686",
"0.48922646",
"0.48842353",
"0.48792168",
"0.48319787",
"0.48201993",
"0.45891926",
"0.43268082",
"0.4094903",
"0.40529212",
"0.40431583",
"0.40385175",
"0.40111053",
"0.39782345",
"0.39600855",
"0.39552864",
"0.39016202",
... | 0.7587284 | 0 |
Sets the tolerations of this V1PodSpec. | def tolerations(self, tolerations):
self._tolerations = tolerations | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_section_tolerance(self, value):\n for element in self.elements:\n for section in element.sections:\n section.tolerance = value",
"def set_tolerance(self, tol):\n self.tolerance = float(tol)",
"def set_tolerance(self, tolerance):\n assert is_number(toleranc... | [
"0.53076094",
"0.52629364",
"0.521993",
"0.5074667",
"0.5045844",
"0.5044491",
"0.50392914",
"0.495495",
"0.49060237",
"0.4819256",
"0.47485602",
"0.47444612",
"0.4705114",
"0.4596896",
"0.45710602",
"0.45375985",
"0.45375985",
"0.45375985",
"0.45375985",
"0.45357242",
"0.453... | 0.75642884 | 0 |
Sets the topology_spread_constraints of this V1PodSpec. | def topology_spread_constraints(self, topology_spread_constraints):
self._topology_spread_constraints = topology_spread_constraints | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_number_of_partitions(self, number_of_partitions):\n if self._frozen:\n if self._number_of_partitions != number_of_partitions:\n raise ValueError(\n f\"Can't set number_of_partitions to {number_of_partitions} since \"\n f\"it has been frozen to use {self._number_of_parti... | [
"0.48466533",
"0.47826916",
"0.46059194",
"0.45104656",
"0.44927216",
"0.4411604",
"0.4371422",
"0.43605754",
"0.4334232",
"0.43325362",
"0.43220764",
"0.42754942",
"0.42543152",
"0.42534038",
"0.42153195",
"0.41979563",
"0.4169543",
"0.41279125",
"0.41022912",
"0.40826878",
... | 0.7950679 | 0 |
Sets the volumes of this V1PodSpec. | def volumes(self, volumes):
self._volumes = volumes | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __init__(self, volumes=None): # noqa: E501\n self.openapi_types = {\n 'volumes': List[OneOfobjectobject]\n }\n\n self.attribute_map = {\n 'volumes': 'volumes'\n }\n\n self._volumes = volumes",
"def setup_volumes(self):\n for name in self.volume... | [
"0.6317112",
"0.6275711",
"0.57997406",
"0.5704851",
"0.56740516",
"0.5659811",
"0.5585874",
"0.5537085",
"0.5523231",
"0.5454577",
"0.54305416",
"0.5404862",
"0.5404862",
"0.5390785",
"0.53625274",
"0.5357854",
"0.5301322",
"0.5260468",
"0.5205181",
"0.51370776",
"0.51295763... | 0.72239715 | 0 |
Returns the string representation of the model | def to_str(self):
return pprint.pformat(self.to_dict()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _repr_model_(self):\n return str(self)",
"def __str__(self):\n\n return str(self.model)",
"def get_model_string(self):\n raise NotImplementedError()",
"def __str__(self):\n return self.model",
"def serialize_model(self):\n return dill.dumps(self.model)",
"def __str_... | [
"0.8602374",
"0.85093755",
"0.8237104",
"0.8050309",
"0.80128866",
"0.79348034",
"0.78766525",
"0.77898884",
"0.7786461",
"0.7745792",
"0.7627315",
"0.76055235",
"0.757999",
"0.7514394",
"0.75038797",
"0.75035286",
"0.74850684",
"0.7440529",
"0.74325883",
"0.74239755",
"0.740... | 0.0 | -1 |
Returns true if both objects are not equal | def __ne__(self, other):
if not isinstance(other, V1PodSpec):
return True
return self.to_dict() != other.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__(self, other: object) -> bool:\n return not self == other",
"def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)",
"def __ne__(self, other):\n return self.__dict__ != other.__dict__",
"def __eq__(self, other):\n return not self.__ne__(other)",
... | [
"0.8410264",
"0.83913255",
"0.81718874",
"0.8140831",
"0.809181",
"0.80886894",
"0.8067484",
"0.80422795",
"0.80422795",
"0.80422795",
"0.80422795",
"0.80422795",
"0.80422795",
"0.80422795",
"0.80422795",
"0.80422795",
"0.80422795",
"0.80422795",
"0.80422795",
"0.80422795",
"... | 0.0 | -1 |
Returns the absolute path of pythoncrn's data directory. Creates the folder if it does not exist. | def datadir(filename=""):
datadir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "data")
if not os.path.isdir(datadir):
os.makedirs(datadir)
if filename:
return os.path.join(datadir, filename)
return datadir | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_data_dir() -> pathlib.Path:\n data_dir = get_config_dir() / \"data\"\n data_dir.mkdir(exist_ok=True)\n\n return data_dir",
"def data_dir_path() -> Path:\n path = project_root_path().joinpath(os.getenv(\"DATA_DIR\"))\n path.mkdir(exist_ok=True)\n return path",
"def get_data_directory(s... | [
"0.7850432",
"0.76358074",
"0.75180167",
"0.73456526",
"0.7314878",
"0.7267603",
"0.72329617",
"0.72085303",
"0.71628135",
"0.71625763",
"0.7155981",
"0.71417546",
"0.71067166",
"0.7070992",
"0.7054513",
"0.70375365",
"0.70309114",
"0.70093524",
"0.69472194",
"0.69115335",
"0... | 0.6754105 | 26 |
Sets the id of this LogCollection. | def id(self, id):
if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501
raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501
self._id = id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def id(self, id):\n \n self._id = id",
"def id(self, id):\n \n self._id = id",
"def id(self, id):\n \n self._id = id",
"def id(self, id):\n \n self._id = id",
"def id(self, id):\n \n self._id = id",
"def setId(self, id):\n self.... | [
"0.7162174",
"0.7162174",
"0.7162174",
"0.7162174",
"0.7162174",
"0.7100881",
"0.7097459",
"0.7097459",
"0.7097459",
"0.7097459",
"0.7097459",
"0.7097459",
"0.7097459",
"0.7097459",
"0.7097459",
"0.7097459",
"0.7097459",
"0.7097459",
"0.70901686",
"0.70901686",
"0.70901686",
... | 0.0 | -1 |
Sets the local_id of this LogCollection. | def local_id(self, local_id):
if self.local_vars_configuration.client_side_validation and local_id is None: # noqa: E501
raise ValueError("Invalid value for `local_id`, must not be `None`") # noqa: E501
self._local_id = local_id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _set_local_id(self, v, load=False):\n if hasattr(v, \"_utype\"):\n v = v._utype(v)\n try:\n t = YANGDynClass(v,base=unicode, is_leaf=True, yang_name=\"local-id\", parent=self, path_helper=self._path_helper, extmethods=self._extmethods, register_paths=True, namespace='http://openconfig.net/yang/... | [
"0.7397331",
"0.7397331",
"0.7397331",
"0.7397331",
"0.7388195",
"0.7388195",
"0.7388195",
"0.7388195",
"0.7345019",
"0.7345019",
"0.7345019",
"0.7345019",
"0.6983317",
"0.6915765",
"0.61199105",
"0.61199105",
"0.61199105",
"0.61199105",
"0.6102695",
"0.5834894",
"0.5729656",... | 0.7693875 | 0 |
Sets the log_ended_at of this LogCollection. | def log_ended_at(self, log_ended_at):
if self.local_vars_configuration.client_side_validation and log_ended_at is None: # noqa: E501
raise ValueError("Invalid value for `log_ended_at`, must not be `None`") # noqa: E501
self._log_ended_at = log_ended_at | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ended_at(self, value):\n self.logger.warn(\n \"Setting values on ended_at will NOT update the remote Canvas instance.\"\n )\n self._ended_at = value",
"def end(self) -> None:\n self.ended_at = int(datetime.utcnow().timestamp())",
"def ended_at(self):\n return s... | [
"0.60560554",
"0.60057265",
"0.56533265",
"0.5494106",
"0.5494106",
"0.5494106",
"0.54687595",
"0.54418415",
"0.54418415",
"0.5422982",
"0.538334",
"0.5376208",
"0.5314128",
"0.528306",
"0.5246087",
"0.5246087",
"0.5246087",
"0.5246087",
"0.5246087",
"0.5246087",
"0.5246087",... | 0.7950209 | 0 |
Sets the log_started_at of this LogCollection. | def log_started_at(self, log_started_at):
if self.local_vars_configuration.client_side_validation and log_started_at is None: # noqa: E501
raise ValueError("Invalid value for `log_started_at`, must not be `None`") # noqa: E501
self._log_started_at = log_started_at | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def started_at(self, started_at):\n\n self._started_at = started_at",
"def started_at(self, started_at):\n if self.local_vars_configuration.client_side_validation and started_at is None: # noqa: E501\n raise ValueError(\"Invalid value for `started_at`, must not be `None`\") # noqa: E50... | [
"0.71837705",
"0.65021014",
"0.65021014",
"0.6291799",
"0.6291799",
"0.6082444",
"0.6082444",
"0.59885705",
"0.59885705",
"0.59885705",
"0.59885705",
"0.5924906",
"0.5799128",
"0.5701138",
"0.55837435",
"0.55837435",
"0.55837435",
"0.5559258",
"0.5559258",
"0.5559258",
"0.555... | 0.78807235 | 0 |
Sets the owner of this LogCollection. | def owner(self, owner):
if self.local_vars_configuration.client_side_validation and owner is None: # noqa: E501
raise ValueError("Invalid value for `owner`, must not be `None`") # noqa: E501
self._owner = owner | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def owner(self, owner):\n \n self._owner = owner",
"def owner(self, owner):\n self._owner = owner",
"def owner(self, owner):\n\n self._owner = owner",
"def owner(self, owner):\n\n self._owner = owner",
"def owner(self, owner):\n\n self._owner = owner",
"def owner... | [
"0.7429299",
"0.7410007",
"0.7379898",
"0.7379898",
"0.7379898",
"0.7379898",
"0.7379898",
"0.7379898",
"0.7379898",
"0.7379898",
"0.7379898",
"0.7229472",
"0.6804402",
"0.6739336",
"0.6574949",
"0.6459791",
"0.64470613",
"0.6202305",
"0.6201392",
"0.61754155",
"0.6120074",
... | 0.6672738 | 15 |
Sets the services of this LogCollection. | def services(self, services):
if self.local_vars_configuration.client_side_validation and services is None: # noqa: E501
raise ValueError("Invalid value for `services`, must not be `None`") # noqa: E501
self._services = services | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def services(self, services):\n\n self._services = services",
"def log_services(self, log_services):\n self._log_services = log_services",
"def _set_services(self):\n pass",
"def log_services(self):\n return self._log_services",
"def service_groups(self, service_groups):\n\n ... | [
"0.75947833",
"0.7593311",
"0.71504605",
"0.6173807",
"0.58819985",
"0.57747257",
"0.57747257",
"0.57747257",
"0.5726334",
"0.57219887",
"0.56960416",
"0.5669614",
"0.56334114",
"0.5392947",
"0.5331948",
"0.5317459",
"0.5305019",
"0.52975273",
"0.52944046",
"0.5278959",
"0.52... | 0.66576236 | 3 |
Sets the size of this LogCollection. | def size(self, size):
if self.local_vars_configuration.client_side_validation and size is None: # noqa: E501
raise ValueError("Invalid value for `size`, must not be `None`") # noqa: E501
self._size = size | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def size(self, size):\n\n self._size = size",
"def size(self, size):\n\n self._size = size",
"def size(self, size):\n\n self._size = size",
"def size(self, size):\n\n self._size = size",
"def size(self, size):\n\n self._size = size",
"def size(self, size):\n\n se... | [
"0.70211244",
"0.70211244",
"0.70211244",
"0.70211244",
"0.70211244",
"0.70211244",
"0.70211244",
"0.70211244",
"0.6993744",
"0.69876695",
"0.6920163",
"0.6340093",
"0.6302589",
"0.62828374",
"0.62828374",
"0.62828374",
"0.62179846",
"0.61903524",
"0.6187432",
"0.6177669",
"0... | 0.5759566 | 49 |
Sets the started_at of this LogCollection. | def started_at(self, started_at):
if self.local_vars_configuration.client_side_validation and started_at is None: # noqa: E501
raise ValueError("Invalid value for `started_at`, must not be `None`") # noqa: E501
self._started_at = started_at | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def started_at(self, started_at):\n\n self._started_at = started_at",
"def log_started_at(self, log_started_at):\n if self.local_vars_configuration.client_side_validation and log_started_at is None: # noqa: E501\n raise ValueError(\"Invalid value for `log_started_at`, must not be `None`... | [
"0.80162203",
"0.68146807",
"0.66658205",
"0.66658205",
"0.65971166",
"0.65971166",
"0.63638085",
"0.63638085",
"0.63638085",
"0.63205755",
"0.63205755",
"0.63205755",
"0.63205755",
"0.6282939",
"0.6282939",
"0.6282939",
"0.6282939",
"0.6282939",
"0.6282939",
"0.6282939",
"0.... | 0.716208 | 1 |
Sets the witness of this LogCollection. | def witness(self, witness):
self._witness = witness | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def set_weights(self, w):\r\n raise NotImplementedError('This function must be implemented within child class!')",
"def set_weight(self, weigth: dict):\n\n self._weigth = weigth",
"def wed(self, wed):\n\n self._wed = wed",
"def set(self, v=None, w=None):\n\n if v is None:\n ... | [
"0.58231395",
"0.554789",
"0.5383516",
"0.53359085",
"0.52084404",
"0.5042038",
"0.50158894",
"0.49534345",
"0.49402258",
"0.49381512",
"0.4928014",
"0.49024886",
"0.48828784",
"0.48607436",
"0.48315147",
"0.48277307",
"0.48206514",
"0.48086217",
"0.48086217",
"0.48086217",
"... | 0.7873995 | 0 |
Returns the string representation of the model | def to_str(self):
return pprint.pformat(self.to_dict()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _repr_model_(self):\n return str(self)",
"def __str__(self):\n\n return str(self.model)",
"def get_model_string(self):\n raise NotImplementedError()",
"def __str__(self):\n return self.model",
"def serialize_model(self):\n return dill.dumps(self.model)",
"def __str_... | [
"0.8602374",
"0.85093755",
"0.8237104",
"0.8050309",
"0.80128866",
"0.79348034",
"0.78766525",
"0.77898884",
"0.7786461",
"0.7745792",
"0.7627315",
"0.76055235",
"0.757999",
"0.7514394",
"0.75038797",
"0.75035286",
"0.74850684",
"0.7440529",
"0.74325883",
"0.74239755",
"0.740... | 0.0 | -1 |
Returns true if both objects are not equal | def __ne__(self, other):
if not isinstance(other, LogCollection):
return True
return self.to_dict() != other.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def __ne__(self, other: object) -> bool:\n return not self == other",
"def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)",
"def __ne__(self, other):\n return self.__dict__ != other.__dict__",
"def __eq__(self, other):\n return not self.__ne__(other)",
... | [
"0.8410411",
"0.8391477",
"0.8172175",
"0.81410587",
"0.80920255",
"0.8088807",
"0.80676955",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
... | 0.0 | -1 |
Output as string to JSON stream. | def as_json(self):
return self.isoformat() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def output_json(payload):\n sys.stdout.write(ujson.dumps(payload))",
"def to_json():\n print(\"JSON\")",
"def output():\n #\n global output_data_dict\n global output_file_path\n\n #\n json_contents = json.dumps(output_data_dict,\n sort_keys=True,\n ... | [
"0.7494457",
"0.70351154",
"0.69387704",
"0.68760854",
"0.68162394",
"0.6806493",
"0.6694181",
"0.6589271",
"0.6496551",
"0.6443998",
"0.6443806",
"0.641066",
"0.6371834",
"0.63661706",
"0.63588727",
"0.63588727",
"0.6312516",
"0.6280781",
"0.62705415",
"0.6251025",
"0.625023... | 0.0 | -1 |
Multiparagraph version of wrap(). | def wraps(self, text, title=None):
if not isinstance(text, str):
text = str(text)
text = text.splitlines() or ['']
original_initial_indent = self.initial_indent
if title is not None:
diff = len(self.initial_indent) - len(title)
if diff > 0:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wrap(self, text):\n para_edge = re.compile(r\"(\\n\\s*\\n)\", re.MULTILINE)\n paragraphs = para_edge.split(text)\n wrapped_lines = []\n for para in paragraphs:\n if para.isspace():\n if not self.replace_whitespace:\n # Do not take the lea... | [
"0.74286455",
"0.6872927",
"0.6710098",
"0.66406125",
"0.6577568",
"0.65386724",
"0.64681417",
"0.6454504",
"0.64514315",
"0.6451242",
"0.6354929",
"0.63329417",
"0.6290629",
"0.6274071",
"0.6266968",
"0.6194504",
"0.6182593",
"0.61390865",
"0.6127732",
"0.61257815",
"0.60650... | 0.7053334 | 1 |
Represent month as an easily graspable letter (af, ot). | def month_letter(i):
# return ('abc' 'def' 'opq' 'rst')[i-1]
# return ('abc' 'ijk' 'pqr' 'xyz')[i-1]
return ('abc' 'def' 'uvw' 'xyz')[i-1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def deMonth(m):\n if m == 1:\n return \"Enero\"\n elif m == 2:\n return \"Febreo\"\n elif m == 3:\n return \"Marzo\"\n elif m == 4:\n return \"Abril\"\n elif m == 5:\n return \"Mayo\"\n elif m == 6:\n return \"Junio\"\n elif m == 7:\n return \"J... | [
"0.7543467",
"0.74511045",
"0.74100345",
"0.7395092",
"0.727855",
"0.69852924",
"0.6963171",
"0.695572",
"0.68936163",
"0.6843529",
"0.68129694",
"0.6757392",
"0.67439556",
"0.6731506",
"0.6731251",
"0.6701671",
"0.6621811",
"0.6594894",
"0.6504258",
"0.64848655",
"0.6472795"... | 0.7366667 | 4 |
Format time represented as seconds since the epoch. | def time_fmt(t=None, local=False, fmt='iso8601'):
formats = dict(
iso8601='%Y-%m-%dT%H:%M %z',
isofull='%Y-%m-%dT%H:%M:%S%z',
isodate='%Y-%m-%d',
rfc2822='%a, %d %b %Y %H:%M %z',
locale='%c',
)
fmt = formats.get(fmt, fmt)
if t is None:
# t = time.time(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def format_unix_epoch(self, etime):\n (tm_year, tm_mon, tm_mday, tm_hour, tm_min,\n tm_sec, tm_wday, tm_yday, tm_isdst) = time.gmtime(etime)\n formatted_time = \"%04d-%02d-%02d %02d:%02d:%02d\"\n formatted_time = formatted_time % (tm_year, tm_mon, tm_mday,\n ... | [
"0.6825037",
"0.6678995",
"0.65098673",
"0.6468719",
"0.6423958",
"0.6391382",
"0.63741124",
"0.63133407",
"0.6313005",
"0.6269345",
"0.6255586",
"0.62459564",
"0.6245529",
"0.6243296",
"0.62270886",
"0.62237436",
"0.62185454",
"0.6198017",
"0.6189441",
"0.6187638",
"0.618129... | 0.0 | -1 |
Format an iterable of objects as strings. | def fmt_strings(iterable, sep=', '):
return sep.join(str(x) for x in iterable) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def list_printout(list_of_objects: List) -> str:\n return '\\n'.join([str(i) for i in list_of_objects])",
"def stringify_enumerated(objs, bullet='*', prefix='', title=None):\n if not objs:\n return ''\n\n lines = []\n if title:\n lines.append('{prefix}{title}'.format(prefix=prefix, title=title))\n f... | [
"0.6926752",
"0.6734561",
"0.66398",
"0.653966",
"0.64122003",
"0.63332826",
"0.6241325",
"0.6212963",
"0.6184917",
"0.6180579",
"0.6155942",
"0.61548805",
"0.61466455",
"0.610661",
"0.6097344",
"0.60788345",
"0.6068598",
"0.6068598",
"0.6068054",
"0.60676336",
"0.60635185",
... | 0.6592801 | 3 |
Represent relative index as a character. | def index_mark(i, n):
empty, first, last, error = '-', '•', '◘', '!'
marks = '▁▂▃▄▅▆▇█'
if len(n) == 0:
return empty
if i == 0:
return first
if i == len(n) - 1:
return last
if i < 0 or i > len(n):
return error
return marks[int(i / len(n) * len(marks))] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def index_to_letter(coord):\n return (chr(coord[0] + 65), coord[1] + 1)",
"def __getitem__(self, index):\n\n return self.char_at(index)",
"def _char_at_index(self, i: int) -> str:\n if i < 0:\n i += len(self)\n if i not in self.index_range:\n raise IndexError(\n ... | [
"0.70732445",
"0.68562686",
"0.6811116",
"0.6728625",
"0.66137",
"0.6521278",
"0.6504832",
"0.6435667",
"0.6409782",
"0.63988",
"0.6368749",
"0.61809725",
"0.6122926",
"0.6080172",
"0.60673445",
"0.6059566",
"0.60588306",
"0.6022182",
"0.60115796",
"0.5946808",
"0.59178185",
... | 0.5571188 | 57 |
return a json encodable object that represents this Exception. | def json_equivalent(self):
obj = {'code': self.code, 'message': self.message}
if self.data != None:
obj['data'] = self.data
return obj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ToJson(self):\n return json.dumps({\n 'error': {\n 'errors': self.Errors(),\n 'code': 400,\n 'message': self.Message(),\n },\n })",
"def to_dict(self):\n exception_dict = dict(message=self.message)\n return exception_dict",
"def __serialize... | [
"0.7332822",
"0.71721005",
"0.7130321",
"0.7053832",
"0.6996932",
"0.6996932",
"0.6832505",
"0.6769324",
"0.6518096",
"0.6508743",
"0.6508743",
"0.6508743",
"0.6508743",
"0.6508743",
"0.6498004",
"0.64767194",
"0.6459189",
"0.64240044",
"0.6417054",
"0.64045936",
"0.63977677"... | 0.0 | -1 |
Computes the distance to another location using the Haversine Formula | def distance_to(self, other):
diffLatitude = math.radians(other.latitude - self.latitude)
diffLongitude = math.radians(other.longitude - self.longitude)
a = math.sin(diffLatitude/2) * math.sin(diffLatitude/2) + \
math.cos(math.radians(self.latitude)) * \
math.cos(math.ra... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HaversineDistance(location1, location2):\n lat1 = location1.lat\n lon1 = location1.lon\n\n lat2 = location2.lat\n lon2 = location2.lon\n\n earth = 6378137 #Earth's equatorial radius in metres.\n\n #Calculate distance based on Haversine Formula\n dlat = math.radians(lat2 - lat1)\n dlon =... | [
"0.794183",
"0.7931577",
"0.77676135",
"0.7764078",
"0.7659005",
"0.76309854",
"0.76188934",
"0.7563071",
"0.74680656",
"0.7465338",
"0.7422295",
"0.73839647",
"0.73831713",
"0.73524314",
"0.73351413",
"0.73096997",
"0.72706026",
"0.725122",
"0.7240765",
"0.7240765",
"0.72154... | 0.693902 | 83 |
Produces a string representation of the station. | def __repr__(self):
s = "<DivvyStation {}: {}>"
s = s.format(self.station_id, self.name)
return s | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def station(self) -> str:\n return self._station",
"def name(self):\n return f\"{self.station_name} {OBSERVATIONS[self.observation][0]}\"",
"def __repr__(self):\n s = \"<DivvyTrip {}: Station {} to Station {}>\"\n s= s.format(self.trip_id, self.from_station.station_id, self.to_stati... | [
"0.74979895",
"0.69051343",
"0.6788764",
"0.676698",
"0.668815",
"0.6683905",
"0.6677178",
"0.661515",
"0.6600077",
"0.65389025",
"0.65388656",
"0.65156865",
"0.6512963",
"0.64875793",
"0.6425612",
"0.6410849",
"0.6397908",
"0.6393477",
"0.6377604",
"0.6362394",
"0.63487047",... | 0.8102303 | 0 |
Returns the distance from the origin station to the destination station | def get_distance(self):
return self.from_station.distance_to(self.to_station) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def get_distance(origin, destination):\n return hypot(destination[0] - origin[0],\n destination[1] - origin[1])",
"def distance(origin, destination):\n lat1, lon1 = origin\n lat2, lon2 = destination\n radius = 3959 # change radius value to 6371 for distance in kilometer.\... | [
"0.7737153",
"0.76061296",
"0.7436011",
"0.7248091",
"0.7177998",
"0.7113735",
"0.7074569",
"0.70535356",
"0.7031674",
"0.69301045",
"0.69184154",
"0.6893675",
"0.6890034",
"0.6890034",
"0.68882513",
"0.68773824",
"0.68773174",
"0.6875277",
"0.6838252",
"0.6830263",
"0.681671... | 0.8575021 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.