query stringlengths 10 3.6k | document stringlengths 19 61.4k | metadata dict | negatives listlengths 0 101 | negative_scores listlengths 0 101 | document_score stringlengths 3 10 | document_rank stringclasses 102
values |
|---|---|---|---|---|---|---|
Sets the updated_at of this CertificateIssuerConfigResponse. Updated UTC time RFC3339. | def zB0d(YKHO, zB0d):
YKHO._updated_at = zB0d | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zB0d(YKHO, zB0d: 'datetime'):\n YKHO._attrs['updatedAt'] = zB0d",
"def zB0d(YKHO, zB0d: 'datetime'):\n YKHO._attrs['updatedAt'] = zB0d",
"def zB0d(YKHO, zB0d: 'datetime'):\n YKHO._attrs['updatedAt'] = zB0d",
"def zB0d(YKHO, zB0d):\n if YKHO.local_vars_configuration.client_side_validation and ... | [
"0.694067",
"0.694067",
"0.694067",
"0.6891271",
"0.5975634",
"0.5975634",
"0.5975634",
"0.5853229",
"0.58427864",
"0.5759983",
"0.5759983",
"0.5759983",
"0.5637823",
"0.5634766",
"0.555831",
"0.555831",
"0.5553483",
"0.55533445",
"0.5480445",
"0.5391885",
"0.5391885",
"0.5... | 0.671559 | 10 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, lA8w):
return False
return YKHO.__dict__ == Elif.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)",
"def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)",
... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748"
] | 0.0 | -1 |
Parse json contents of string or file object or file path and return python nested dict/lists | def PSj2(O_1m):
try:
with open(O_1m, 'r') if isinstance(O_1m, (str, bytes)) else O_1m as eHNT:
YEnM = qQXR.load(eHNT)
except IOError:
YEnM = qQXR.loads(O_1m)
return YEnM | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Nw5e(nUeQ: str) -> uLKX[cuzp, x1iM]:\n with open(nUeQ, 'r') as eHNT:\n return qQXR.load(eHNT)",
"def hfK9(hGN5):\n return qQXR.loads(hGN5)",
"def Nw5e(RsFk):\n with open(RsFk, 'r') as eHNT:\n yvT9 = qQXR.load(eHNT)\n return yvT9",
"def mqSH(YKHO, emfX):\n with open(emfX, 'r')... | [
"0.69833916",
"0.6981901",
"0.6813848",
"0.68020767",
"0.66726",
"0.6618895",
"0.66178703",
"0.6576203",
"0.6557808",
"0.65109396",
"0.6482295",
"0.64803284",
"0.64774996",
"0.645726",
"0.6433491",
"0.64215857",
"0.64088345",
"0.63850725",
"0.63476187",
"0.63388616",
"0.63352... | 0.5977701 | 81 |
Create and configure a new app instance for each test. | def SCWY():
yhTH(P4t4)
yield P4t4 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fkN9():\n xqoZ = {'DEBUG': True, 'TESTING': True}\n wMcu = LUif(settings_override=xqoZ)\n OaeV = wMcu.app_context()\n OaeV.push()\n yield wMcu\n OaeV.pop()",
"def LUif(YKHO):\n P4t4.config.from_object('config.TestingConfig')\n return P4t4",
"def LUif(YKHO):\n P4t4 = LUif()\n P... | [
"0.7984731",
"0.7973278",
"0.7952626",
"0.7774617",
"0.7610121",
"0.75586873",
"0.7514867",
"0.748489",
"0.7457632",
"0.7457632",
"0.7457632",
"0.7423435",
"0.74221593",
"0.7392862",
"0.7378533",
"0.73515075",
"0.7331986",
"0.7303747",
"0.7297693",
"0.7282327",
"0.7275915",
... | 0.0 | -1 |
This method loads single quoted JSON data. Regular JSON expects double quotes. | def C5pa(Ux0P):
try:
with open(Ux0P, 'r') as eHNT:
nPrm = jZ4I.literal_eval(eHNT.read())
except:
print('ERROR in load_tweets_backup.')
return nPrm | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uikv(YKHO, nP0Q: str):\n YKHO.data = qQXR.loads(nP0Q)",
"def lc9H(YKHO):\n YKHO.load_json_str(YKHO.get_json_str())",
"def _1kr(KCHu, **B2fa):\n return qQXR.loads(d1uB(KCHu), **B2fa)",
"def lc9H(zEKB):\n return qQXR.loads(zEKB)",
"def uYrM(YKHO, qBwD):\n try:\n nPrm = qQXR.loads(qB... | [
"0.6823782",
"0.66725",
"0.66355604",
"0.6598095",
"0.65581",
"0.64663523",
"0.63912237",
"0.6387891",
"0.6383104",
"0.6369684",
"0.63369566",
"0.6322721",
"0.6294473",
"0.626813",
"0.6236858",
"0.6158787",
"0.6148142",
"0.610176",
"0.60993975",
"0.6071879",
"0.60679597",
"... | 0.0 | -1 |
Repeat a string or unicode. Note that this assumes that 'mul' > 0. | def CDFa(KCHu, AdrB):
Aofo = None
aM8h = 1
assert AdrB > 0
qoqK = AdrB >> 1
while True:
if AdrB & aM8h:
if Aofo is None:
Aofo = KCHu
else:
Aofo = KCHu + Aofo
if aM8h > qoqK:
break
KCHu += KCHu
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wPFE(KCHu):\n return KCHu",
"def MSda(vIwR, UHFx):\n return vIwR * int(UHFx)",
"def wPFE(GIN8, ISIR):\n return GIN8 * ISIR",
"def wPFE(KCHu, aNfM):\n Aofo = KCHu * 3\n if aNfM:\n Aofo = Aofo + '!!!'\n return Aofo",
"def zh5e(Ol8d, exwG):\n return Ol8d * exwG",
"def wPFE(bs... | [
"0.7310655",
"0.6922782",
"0.69223285",
"0.68544596",
"0.6760396",
"0.65352315",
"0.6488594",
"0.63779044",
"0.62650377",
"0.62292916",
"0.61778146",
"0.60747796",
"0.597115",
"0.5962785",
"0.5887884",
"0.5881692",
"0.586663",
"0.58591336",
"0.5817762",
"0.574391",
"0.5726259... | 0.80343235 | 0 |
Creates the initial hidden and cell states for the decoder's LSTM based on the encoded images. | def mDs7(YKHO, Ep8u):
MKlR = ht2j.zeros(Ep8u, YKHO.decoder_dim).to(begE)
Z9rn = ht2j.zeros(Ep8u, YKHO.decoder_dim).to(begE)
return (MKlR, Z9rn) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def frwP(YKHO, _p7a):\n tjUW = _p7a.size(0)\n YKHO.attention_hidden = iQnE(_p7a.data.new(tjUW, QjBU.decoder_lstm_dim).zero_())\n YKHO.attention_cell = iQnE(_p7a.data.new(tjUW, QjBU.decoder_lstm_dim).zero_())\n YKHO.decoder_hidden = iQnE(_p7a.data.new(tjUW, QjBU.decoder_lstm_dim).zero_())\n YKHO.deco... | [
"0.6975042",
"0.6901735",
"0.67877775",
"0.6781514",
"0.6678807",
"0.6639256",
"0.663141",
"0.6551407",
"0.64969134",
"0.64087147",
"0.63737124",
"0.6342426",
"0.632464",
"0.6303485",
"0.6302927",
"0.6292375",
"0.6287289",
"0.6264216",
"0.6244336",
"0.6208146",
"0.61865085",
... | 0.65343064 | 10 |
Determines whether this UasTelemetry is equivalent to another. This differs from the Django __eq__() method which simply compares primary keys. This method compares the field values. | def LHwl(YKHO, Elif):
return YKHO.uas_position.duplicate(Elif.uas_position) and YKHO.uas_heading == Elif.uas_heading | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n try:\n return YKHO.raw_field == Elif.raw_field\n except AttributeError:\n return False",
"def xa14(YKHO, Elif: 'StorageRecord') -> bool:\n return YKHO.type == Elif.type and YKHO.id == Elif.id and (YKHO.value == Elif.value) and (YKHO.tags == Elif.tags)",
"def xa14(... | [
"0.7515961",
"0.7406073",
"0.73793536",
"0.73394936",
"0.7316688",
"0.7292974",
"0.726842",
"0.72569215",
"0.7249255",
"0.7196512",
"0.7195537",
"0.71878946",
"0.71592134",
"0.7154364",
"0.7146037",
"0.713802",
"0.7133125",
"0.71040404",
"0.70799816",
"0.70745766",
"0.7072809... | 0.0 | -1 |
Sets the name of this TripRequestResponseJourneyLegPathDescription. | def mWFP(YKHO, mWFP):
YKHO._name = mWFP | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QHg7(YKHO, mWFP, BWXx):\n geh0 = YKHO.extendPath(mWFP, BWXx, True, True)\n return geh0",
"def F2er(YKHO, xYqm):\n assert isinstance(xYqm, str)\n for XUbj in YKHO.iter_alt_loc():\n XUbj.res_name = xYqm",
"def WZrJ(YKHO, mWFP: str) -> None:\n _e0h.wlr_seat_set_name(YKHO._ptr, mWFP.encod... | [
"0.5583948",
"0.544036",
"0.5121346",
"0.49790826",
"0.49696904",
"0.49466002",
"0.49463606",
"0.49327672",
"0.48889735",
"0.48875338",
"0.48683396",
"0.48683396",
"0.4863583",
"0.4863583",
"0.4863583",
"0.4863583",
"0.4856975",
"0.4856975",
"0.4856975",
"0.4856975",
"0.48569... | 0.0 | -1 |
Sets the cum_distance of this TripRequestResponseJourneyLegPathDescription. | def uNfj(YKHO, uNfj):
YKHO._cum_distance = uNfj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def deBg(YKHO, deBg):\n YKHO._cum_duration = deBg",
"def UYiL(YKHO, UYiL):\n YKHO._distance_down = UYiL",
"def ZbCI(YKHO, SCAk):\n return YKHO._dist_cls.from_cumulative(YKHO._edges, SCAk)",
"def zk8W(YKHO, Ayfi):\n YKHO.__aboveDistance = Ayfi\n YKHO.__loadDotFile()",
"def xyVF(iYpL):\n nX... | [
"0.5975861",
"0.47773686",
"0.45074475",
"0.43782586",
"0.42682508",
"0.42238513",
"0.41836348",
"0.41769943",
"0.41422468",
"0.41351217",
"0.40921238",
"0.4085998",
"0.40513286",
"0.4046183",
"0.4044072",
"0.4000373",
"0.39987105",
"0.39613968",
"0.39522165",
"0.3892229",
"0... | 0.746701 | 0 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, WxMO):
return False
return YKHO.__dict__ == Elif.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)",
"def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)",
... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748"
] | 0.0 | -1 |
retourne la distance quadratique entre vec1 et vec2 | def Dq5G(lSjb, v8Fa):
return Ayfi.euclidean(lSjb, v8Fa) ** 2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Q1Zj(YKHO, lSjb, v8Fa):\n return PZyS(sum([(float(hQHm) - float(jlSq)) ** 2 for hQHm, jlSq in zip(lSjb, v8Fa)]))",
"def pImw(hQHm: vect2d, jlSq: vect2d) -> float:\n Csk6 = ((jlSq.x - hQHm.x) ** 2 + (jlSq.y - hQHm.y) ** 2) ** 0.5\n return Csk6",
"def Vsqn(jzdc, Fg_i):\n return DJzP(yDvf(jzdc, Fg... | [
"0.78222024",
"0.7592095",
"0.7233088",
"0.7194678",
"0.7156333",
"0.7123794",
"0.71145225",
"0.70520526",
"0.7016162",
"0.7010722",
"0.70031416",
"0.69947135",
"0.69702244",
"0.69496596",
"0.693915",
"0.69019765",
"0.6890305",
"0.68726665",
"0.6866751",
"0.6865381",
"0.68477... | 0.66780293 | 54 |
Computes the precision for the specified values of k | def ivK8(hlel, pan_, hz5a=(5, 10)):
Gq8e = max(hz5a)
Ep8u = pan_.size(0)
bGrB, nvEb = hlel.topk(Gq8e, 1, True, True)
nvEb = nvEb.t()
gXXc = nvEb.eq(pan_.view(1, -1).expand_as(nvEb))
Ylbp = []
for G1Hx in hz5a:
R2Dg = gXXc[:G1Hx].view(-1).float().sum(0, keepdim=True)
Ylbp.appe... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rhd_(_ger, nvEb, G1Hx):\n G1Hx = min(len(nvEb), G1Hx)\n OCOs = min(len(_ger), G1Hx)\n return sum([int(nvEb[YRbF] in _ger) for YRbF in range(G1Hx)]) / OCOs",
"def sEak(Mkmy, G1Hx):\n assert G1Hx >= 1\n Mkmy = oyIN.asarray(Mkmy)[:G1Hx] != 0\n if Mkmy.size != G1Hx:\n raise ValueError('R... | [
"0.76427615",
"0.74189496",
"0.7418079",
"0.72710466",
"0.72456723",
"0.72446615",
"0.7237539",
"0.72213703",
"0.7210107",
"0.7058935",
"0.6852219",
"0.6786084",
"0.67836976",
"0.6768417",
"0.67273885",
"0.67181736",
"0.67181736",
"0.67181736",
"0.67181736",
"0.67181736",
"0.... | 0.0 | -1 |
Create a normalized and zero padded version of vector. | def qjYB(iArr):
DWo7 = iArr / oyIN.linalg.norm(iArr)
uSbu = WiSb(len(iArr))
evpx = oyIN.zeros(2 ** uSbu, dtype=complex)
for YRbF in range(len(iArr)):
evpx[YRbF] = DWo7[YRbF]
return evpx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k5KY(iArr):\n wQQg = AArG(iArr)\n if wQQg != 0:\n return oyIN.divide(iArr, AArG(iArr))\n else:\n return [0, 0]",
"def NkkI(he6J):\n return he6J / u54L(he6J)",
"def dVIs(Ty9i):\n LDcD = oyIN.linalg.norm(Ty9i)\n if oyIN.isclose(LDcD, 0):\n raise ValueError('Cannot make ... | [
"0.70246047",
"0.70194066",
"0.6918075",
"0.68365806",
"0.6820238",
"0.67836416",
"0.67591155",
"0.67064404",
"0.67064404",
"0.67064404",
"0.67030865",
"0.6667601",
"0.6667601",
"0.6667601",
"0.6667601",
"0.6667601",
"0.6667601",
"0.6667601",
"0.6667601",
"0.6667601",
"0.6667... | 0.67405796 | 7 |
Find all code blocks in a markdown file. From a list of strings describing the lines in a markdown file, find a list of the start and end line numbers for each of the code blocks. | def aIyc(Nqlg):
uf7B = [vC9B.strip() for vC9B in Nqlg]
Xyii = [YRbF for YRbF, vC9B in enumerate(uf7B, 1) if vC9B.startswith('```')]
wURL = len(Xyii)
assert wURL % 2 == 0
return [Fg_i for Fg_i in zip(Xyii[::2], Xyii[1::2])] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bwUq(Nqlg):\n ibeS = False\n XkN1 = []\n for zFiD in Nqlg:\n if zFiD.strip() == '```python':\n ibeS = True\n if XkN1:\n yield (XkN1, 'md')\n XkN1 = []\n elif ibeS and zFiD.strip() == '```':\n ibeS = False\n if XkN1... | [
"0.67364955",
"0.6414372",
"0.62196326",
"0.62039214",
"0.6171617",
"0.61284465",
"0.60596067",
"0.6012683",
"0.60080594",
"0.6006515",
"0.5998357",
"0.5946354",
"0.58616126",
"0.58356",
"0.5821288",
"0.5818811",
"0.58099604",
"0.5807164",
"0.58057564",
"0.5801836",
"0.579095... | 0.74991506 | 0 |
Calculate Q exp(LLam) Q.T | def ZlDi(Eq45, aPd6, T8ck):
DJYW = oyIN.multiply(oyIN.exp(aPd6 * Eq45)[:, None], T8ck.T)
DJYW = oyIN.dot(T8ck, DJYW)
return DJYW | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H7g6(YKHO, GPIy, IplT):\n try:\n TK2h = 0.622 * Ze7L(GPIy) / Ro0t * kLQb(IplT * 1000000.0 * srem / A3Vt / GPIy)\n except OverflowError:\n TK2h = 0.0\n return TK2h",
"def kLQb(vexM):\n YA9R = caa_(vexM[:, :3])\n Ylbp = oyIN.zeros_like(vexM)\n Ylbp[:, 3:] = oyIN.exp(vexM[:, 3:])... | [
"0.6869311",
"0.6478639",
"0.62067354",
"0.6158706",
"0.6130907",
"0.6035837",
"0.60316235",
"0.6030535",
"0.60081697",
"0.599614",
"0.599392",
"0.5978956",
"0.59752256",
"0.59148777",
"0.5896771",
"0.58937496",
"0.5879383",
"0.58761597",
"0.5861196",
"0.58523756",
"0.5839685... | 0.6641371 | 1 |
Get raw encoding of color grid | def Ctz2(YKHO) -> bytearray:
IcBZ = bytearray()
for YRbF in range(YKHO.grid_size[0]):
if YKHO.grid[YRbF] is not None:
for r845 in range(YKHO.grid_size[1]):
if YKHO.grid[YRbF][r845] is not None:
qfpW = YKHO.grid[YRbF][r845]
qfpW = qfpW.g... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fw1b(YKHO):\n return YKHO.data16.transpose()",
"def QnV5(YKHO):\n Exmq = YKHO.z[:, :, dxBm]\n return Exmq * YKHO.c",
"def cdJi(YKHO):\n return YKHO.map_channels(lambda UksD: int(round(255 * UksD)))",
"def iMGt(YKHO):\n return YKHO.pixels.get_cmap()",
"def qZrp(YKHO):\n Mkmy, Oa1e, Fg_... | [
"0.65539974",
"0.6196728",
"0.60972804",
"0.6052077",
"0.6024733",
"0.6020551",
"0.5966794",
"0.5950901",
"0.5919673",
"0.5863035",
"0.5824772",
"0.58033454",
"0.57521725",
"0.57195854",
"0.57186157",
"0.5716955",
"0.5664958",
"0.5663728",
"0.56570363",
"0.56567574",
"0.56528... | 0.7415464 | 0 |
Get the JSON representation of the color grid | def W7qR(YKHO) -> dict:
lOx1 = YKHO.get_rle()
tZ2K = 'RLE'
if len(lOx1) > YKHO.grid_size[0] * YKHO.grid_size[1] * 4:
tZ2K = 'RAW'
lOx1 = YKHO.get_raw()
print('RAW ran')
else:
print('RLE ran')
YGFP = {'encoding': tZ2K, 'nodes': [WR89.b64encode(bytes(lOx1)).decode()], '... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KsC5(YKHO):\n return {'tile_width': YKHO.tile_width, 'tile_height': YKHO.tile_height, 'num_x': YKHO.num_tiles_x, 'num_y': YKHO.num_tiles_y, 'ids': YKHO._id_to_pos, 'png': {'color': QJ6T(YKHO.color_qimage), 'height': QJ6T(YKHO.color_qimage)}}",
"def hati(YKHO):\n return YKHO.cmap",
"def Jw9H(YKHO) -> ... | [
"0.6672208",
"0.634182",
"0.62290907",
"0.6117115",
"0.6117115",
"0.60697925",
"0.59832174",
"0.58805984",
"0.58739686",
"0.58671224",
"0.5864128",
"0.58607143",
"0.5810956",
"0.5784442",
"0.57600033",
"0.57500637",
"0.57446563",
"0.57386565",
"0.5713047",
"0.5662122",
"0.565... | 0.5533593 | 31 |
module that check if an object is exactly the same given class | def plAK(YEnM, J9Xy):
if type(YEnM) == J9Xy:
return True
else:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def plAK(YEnM, J9Xy):\n return type(YEnM) == J9Xy",
"def plAK(YEnM, J9Xy):\n return type(YEnM) == J9Xy",
"def plAK(YEnM, J9Xy):\n return type(YEnM) == J9Xy",
"def plAK(YEnM, J9Xy):\n return type(YEnM) == J9Xy",
"def plAK(YEnM, J9Xy):\n return type(YEnM) is J9Xy",
"def plAK(YEnM, J9Xy):\n ... | [
"0.84199136",
"0.84199136",
"0.8392058",
"0.8323487",
"0.8314209",
"0.83020157",
"0.83020157",
"0.82819116",
"0.8260241",
"0.8211731",
"0.81893593",
"0.6865129",
"0.68460315",
"0.6769862",
"0.6725414",
"0.66981024",
"0.6687329",
"0.66861904",
"0.6660726",
"0.6656239",
"0.6604... | 0.82728845 | 8 |
Returns a list of all words that can be formed by removing one letter. | def afYC(GIN8, OJS7):
Ylbp = []
for YRbF in range(len(GIN8)):
aUGN = GIN8[:YRbF] + GIN8[YRbF + 1:]
if aUGN in OJS7:
Ylbp.append(aUGN)
return Ylbp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def a_mA(vC9B):\n return {yzQ0 for yzQ0 in MJy5 if dwcn(yzQ0, vC9B)}",
"def l4Z4(zFiD):\n try:\n gZgb = 'abcdefghijklmnopqrstuvwqyz '\n rU5H = list(zFiD.lower())\n for GIN8 in rU5H:\n if GIN8 not in gZgb:\n rU5H.remove(GIN8)\n lvse = ''.join(rU5H)\n ... | [
"0.7705909",
"0.72633255",
"0.72510403",
"0.7213267",
"0.69401634",
"0.6932698",
"0.6928758",
"0.6915684",
"0.69088906",
"0.67821014",
"0.67729175",
"0.67685664",
"0.6759613",
"0.67568547",
"0.6728959",
"0.6727601",
"0.67037684",
"0.6666379",
"0.66501397",
"0.66295815",
"0.66... | 0.0 | -1 |
Line1 is a list of data points Line2 is a list of data points x_labels are labels that correspond to the data points in line1 and line2 | def RY1W(gIsw, leAC, cnXz, nCCX, Ijzj, v5IJ, gz_g):
jpNR = G7iF.Line(include_x_axis=True)
jpNR.title = leAC
jpNR.x_labels = gz_g
jpNR.add(nCCX, cnXz)
jpNR.add(v5IJ, Ijzj)
jpNR.render_to_file(gIsw)
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PuX7(WKvO, si3g, skBL, VoLU, JCSI, nbI8, leAC, Ux0P):\n import matplotlib.ticker as zqKO\n QrM1.close()\n QrM1.rc('text', usetex=True)\n uuEx.set_style('ticks')\n uuEx.despine(top=True)\n LZpg, hh7H = QrM1.subplots()\n fTVC = hh7H.twinx()\n ZM53 = hh7H.scatter(WKvO, si3g, alpha=0.3, col... | [
"0.61340135",
"0.61177164",
"0.60888654",
"0.6064538",
"0.6063148",
"0.5998084",
"0.5995294",
"0.59688437",
"0.5964659",
"0.59353346",
"0.5920735",
"0.5920249",
"0.5858832",
"0.5814418",
"0.57995886",
"0.5790561",
"0.5790561",
"0.5772129",
"0.57554275",
"0.5693162",
"0.568774... | 0.65004426 | 0 |
Remove duplicates from an iterable. Preserves order. | def a4ZY(OxJJ, H5ew=lambda WKvO: WKvO):
sjXb = set()
Ylbp = []
for WKvO in OxJJ:
G1Hx = H5ew(WKvO)
if G1Hx in sjXb:
continue
Ylbp.append(WKvO)
sjXb.add(G1Hx)
return Ylbp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def x4G5(OxJJ):\n\n class NoElement:\n pass\n Q9cb = BG2Q\n for LihS in sorted(OxJJ):\n if Q9cb is BG2Q:\n Q9cb = LihS\n yield LihS\n continue\n if Q9cb != LihS:\n Q9cb = LihS\n yield LihS",
"def pt7L(OxJJ):\n PwWw = []\n ... | [
"0.8117462",
"0.8056292",
"0.77816135",
"0.7745527",
"0.7648538",
"0.7337834",
"0.7307825",
"0.7203185",
"0.71760714",
"0.71727204",
"0.71042377",
"0.70982724",
"0.7009782",
"0.6971396",
"0.6926903",
"0.6924849",
"0.68843484",
"0.6818887",
"0.68180394",
"0.6799225",
"0.677793... | 0.7368153 | 5 |
Checks if relative_file should be ignored by DirDiff(). | def xNmw(YKHO, qJG5):
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xNmw(YKHO, qJG5):\n return adKP(qJG5)",
"def L1hO(beru, o1He):\n with open(o1He) as Ijy8:\n for zFiD in Ijy8:\n vC9B = zFiD.strip()\n if vC9B == beru:\n return True\n return False",
"def vk7s(YKHO):\n O3Xh = set(YKHO._get_module_files())\n XUqa = s... | [
"0.670953",
"0.6588702",
"0.65310127",
"0.63558495",
"0.6191111",
"0.61526126",
"0.60274726",
"0.60079014",
"0.5973519",
"0.593282",
"0.5882248",
"0.5876046",
"0.5819646",
"0.5777593",
"0.5766464",
"0.57632685",
"0.57522416",
"0.5733617",
"0.5680575",
"0.56652373",
"0.5638383... | 0.778776 | 0 |
Checks if relative_file should be ignored by DirDiff(). | def xNmw(YKHO, qJG5):
return adKP(qJG5) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xNmw(YKHO, qJG5):\n return False",
"def L1hO(beru, o1He):\n with open(o1He) as Ijy8:\n for zFiD in Ijy8:\n vC9B = zFiD.strip()\n if vC9B == beru:\n return True\n return False",
"def vk7s(YKHO):\n O3Xh = set(YKHO._get_module_files())\n XUqa = set(YK... | [
"0.77861655",
"0.65884745",
"0.65313303",
"0.6356108",
"0.61923015",
"0.6152365",
"0.60268635",
"0.6008553",
"0.5972737",
"0.5931915",
"0.58833545",
"0.58771074",
"0.58196115",
"0.5778174",
"0.5766879",
"0.576381",
"0.5751953",
"0.57336855",
"0.5680093",
"0.5665812",
"0.56391... | 0.6708453 | 1 |
Writes Zserio varuint32 type to the bit stream. | def Lsrz(WJI9: BitStreamWriter, BWXx: int) -> None:
WJI9.writeVarUInt32(BWXx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Rj9C(YKHO):\n pass",
"def E7HX(YKHO, BWXx):\n HNC5 = BlNT.pack('!I', BWXx)\n YKHO.data.extend(HNC5)",
"def quWQ(PcZo, BWXx):\n UOVU = BWXx & 127\n BWXx >>= 7\n while BWXx:\n PcZo.write(BlNT.pack('<B', 128 | UOVU))\n UOVU = BWXx & 127\n BWXx >>= 7\n PcZo.write(BlNT.... | [
"0.71795434",
"0.6929138",
"0.65883416",
"0.6567401",
"0.64859104",
"0.62897635",
"0.60490274",
"0.6017212",
"0.6002599",
"0.6000675",
"0.591613",
"0.589193",
"0.5774199",
"0.5753027",
"0.57453746",
"0.5737186",
"0.5691683",
"0.56696606",
"0.5526324",
"0.5512977",
"0.54323274... | 0.6626458 | 2 |
Construct the Collator object. | def FIMM(YKHO, N5OF, GoZD, jehQ, dMng=None, xzCw=True):
U5Jc = KVWQ(N5OF)
YKHO.scheme = U5Jc.scheme
YKHO.hostname = U5Jc.hostname
YKHO.org, YKHO.repo = U5Jc.path.strip('/').split('/')
YKHO.creds = GoZD
YKHO.branch = jehQ
YKHO.repo_path = dMng
YKHO.git_repo = None
YKHO.validate = xzCw | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, eLty=None):\n YKHO.entries = dict()\n YKHO.super_entries = dict()\n YKHO.sort = eLty\n with open(Hy7s.path.join(YnkN, 'database', 'cjk-decomp.txt')) as eHNT:\n for rdlD in eHNT:\n bTKY, bGrB, AdfU = ZbWC.match('(.+):(.+)\\\\((.*)\\\\)', rdlD).groups()\n Q90n ... | [
"0.5330372",
"0.5230429",
"0.5222493",
"0.51747125",
"0.50707406",
"0.5004906",
"0.49929914",
"0.4988634",
"0.49576563",
"0.4917596",
"0.4917596",
"0.48948464",
"0.48530063",
"0.4813804",
"0.47854206",
"0.4759283",
"0.47545695",
"0.47424915",
"0.47264642",
"0.47170636",
"0.47... | 0.0 | -1 |
Provide the local OS path to the Git repo. | def rAod(YKHO):
if YKHO.repo_path:
return YKHO.repo_path
TBXe = PKXz(gbPf.gettempdir())
return str(TBXe.joinpath('harvest', YKHO.org, YKHO.repo)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WGYS() -> BKva:\n Bicb = BKva.dirname(BKva.realpath(xAKo))\n zTfP = BKva.dirname(BKva.dirname(Bicb))\n return zTfP",
"def XSj5(YKHO):\n return '/repos/{}/{}'.format(YKHO.owner, YKHO.label)",
"def gmYT():\n Aofo = Yn3K.run('cmd /c mvn help:evaluate -Dexpression=settings.localRepository', stdo... | [
"0.7499934",
"0.714734",
"0.7007326",
"0.6929778",
"0.6883732",
"0.67024565",
"0.66419846",
"0.6603354",
"0.65852267",
"0.65443957",
"0.65101755",
"0.6466407",
"0.6447189",
"0.63673073",
"0.6367237",
"0.6323739",
"0.6304783",
"0.62921035",
"0.62831604",
"0.623652",
"0.623424"... | 0.7789014 | 0 |
Test the dtypes for the generated columns. | def DAyG(YKHO):
m9gM = Hy7s.path.join('tests', 'data', 'geolife', 'geolife_staypoints.csv')
H4yH = xTkX.read_staypoints_csv(m9gM, tz='utc', index_col='id', crs='epsg:4326')
H4yH, GOzt = H4yH.as_staypoints.generate_locations(method='dbscan', epsilon=10, num_samples=1, distance_metric='haversine', agg_level='... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E7cm(YKHO):\n tyNF = 'test_table_cols'\n Px8n = {'col1': float, 'col2': qcWV.datetime, 'col3': str, 'col4': str}\n p1au = {'col1': 'integer', 'col2': 'date' if Tcc4 == 'oracle' else 'timestamp', 'col3': 'varchar2 (3)' if Tcc4 == 'oracle' else 'varchar (3)', 'col4': 'char (1)'}\n Dg5n = ','.join([Z9... | [
"0.73763406",
"0.7242593",
"0.702694",
"0.6961495",
"0.68932813",
"0.68749714",
"0.67689896",
"0.6765226",
"0.67454576",
"0.67063856",
"0.6634231",
"0.65503603",
"0.6529327",
"0.6510893",
"0.6508303",
"0.64882666",
"0.645702",
"0.64301383",
"0.6423842",
"0.641008",
"0.6407383... | 0.0 | -1 |
Look through the buckets cache file for a match. If the field is found, it is retrieved from S3 only if its cached version is missing, or if the MD5 does not match. | def bjyF(pmON, iz6W='base', **B2fa):
if 'env' in B2fa:
B2fa.pop('env')
wb_y = {'bucket': None, 'path': None}
yIVm = E14P()
if not yIVm or iz6W not in yIVm:
return wb_y
pP_I = kWbd(yIVm[iz6W])
if not QNFT():
pmON = Hy7s.path.join(iz6W, pmON)
for WE7e in pP_I:
f... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZfJw(yIVm, iz6W, l7rj, pmON, a2Ke):\n H5ew, kCBl, oU1u, CUGw, uduC, Rci7, HOJn, nu0B = gqJs()\n if Hy7s.path.isfile(a2Ke):\n OBAU = db2J(yIVm, l7rj, iz6W, pmON)\n if OBAU:\n liSP = OBAU['ETag']\n if liSP.find('-') == -1:\n pQm7 = liSP\n C6... | [
"0.64502406",
"0.6369566",
"0.6146239",
"0.60513973",
"0.58733475",
"0.5827854",
"0.57595646",
"0.5751846",
"0.5699449",
"0.5630594",
"0.56228304",
"0.5603064",
"0.5591488",
"0.55496836",
"0.55435586",
"0.5535343",
"0.5535343",
"0.5532699",
"0.55178446",
"0.55082726",
"0.5496... | 0.51030934 | 61 |
Return the direct parent address deduced from the current address. If the address is "a/b/c", the parent's address will be "a/b". A page with an address like "a" will have the root (empty string) as a parent address. The root itself will have no parent (None). | def xLDp(YKHO):
UTX6 = YKHO.address
if UTX6.startswith('/'):
UTX6 = UTX6[1:]
if UTX6.endswith('/'):
UTX6 = UTX6[:-1]
if '/' in UTX6:
return UTX6.rsplit('/', 1)[0]
elif UTX6:
return ''
else:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xLDp(UTX6):\n if len(UTX6) >= 1:\n return UTX6[0:-1]\n else:\n return ''",
"def _AKB(YKHO):\n UTX6 = YKHO.parent_address\n try:\n _AKB = I0sS.objects.get(address=UTX6)\n except I0sS.DoesNotExist:\n _AKB = None\n return _AKB",
"def KwgP(Q6kx):\n if Q6kx == qp... | [
"0.76109797",
"0.70212144",
"0.6506567",
"0.648497",
"0.64494073",
"0.62795436",
"0.62178636",
"0.6215338",
"0.6213075",
"0.6192549",
"0.6184291",
"0.61787736",
"0.61710316",
"0.61499715",
"0.6145134",
"0.61018944",
"0.60936004",
"0.6089709",
"0.60835576",
"0.605543",
"0.6025... | 0.81701136 | 0 |
Return all the parent pages, ordered by hierarchy. If this is not the root page (with an empty address), then the first list element will be the root. Next will be all pages in the hierarchy of this page. For instance, if the | def ACnF(YKHO):
KYrJ = YKHO.parent_addresses
vexM = FYrf.Q()
for UTX6 in KYrJ:
vexM |= FYrf.Q(address=UTX6)
if KYrJ:
Gqqd = I0sS.objects.filter(vexM)
Gqqd = sorted(list(Gqqd), key=lambda B2Dn: KYrJ.index(B2Dn.address))
else:
Gqqd = []
return Gqqd | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vyll(YKHO, Gqqd):\n Gqqd = list(Gqqd)\n WOhH = {}\n for XP5J in Gqqd:\n WOhH[XP5J.id] = XP5J\n for XP5J in Gqqd:\n if XP5J.parent_id is None:\n XP5J.parent = None\n else:\n XP5J.parent = WOhH[XP5J.parent_id]\n XP5J._ancestors_retrieved = True\n r... | [
"0.71108454",
"0.63267136",
"0.62213033",
"0.62030804",
"0.6191464",
"0.6114534",
"0.60946476",
"0.60883665",
"0.6085012",
"0.60794914",
"0.6070403",
"0.60663694",
"0.6047924",
"0.603508",
"0.59988827",
"0.59390867",
"0.5915551",
"0.5891579",
"0.5883355",
"0.5872775",
"0.5867... | 0.77723676 | 0 |
Return the last part of the address after the last /. | def nW5E(YKHO):
UTX6 = YKHO.address
if UTX6.startswith('/'):
UTX6 = UTX6[1:]
if UTX6.endswith('/'):
UTX6 = UTX6[:-1]
if not UTX6:
return 'root'
elif '/' in UTX6:
return UTX6.rsplit('/', 1)[1]
else:
return UTX6 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZvZh(pmON: str) -> str:\n TbQY = pmON.replace('\\\\', '/')\n return ZbWC.search('(?:[^/](?!/))+$', TbQY).group(0)",
"def wvJo(n8Ek):\n return n8Ek.split(':')[-1]",
"def hXVs(YKHO, vIwR):\n Nxw6 = 1\n yKcO = len(vIwR)\n while True:\n g9xt = yKcO - Nxw6\n if vIwR[g9xt] == '/':... | [
"0.7471042",
"0.71310365",
"0.69578654",
"0.6956308",
"0.65693825",
"0.65447676",
"0.6467592",
"0.6440627",
"0.64331454",
"0.6432801",
"0.6387493",
"0.6327111",
"0.6315765",
"0.6306885",
"0.6305199",
"0.6268419",
"0.6226335",
"0.6180331",
"0.6176576",
"0.6173586",
"0.61707777... | 0.75153506 | 0 |
Return True if the user can access the page. | def uEDt(YKHO, CBIr, ldgd='read'):
if ldgd == 'read':
Uvf2 = YKHO.can_read
elif ldgd == 'write':
Uvf2 = YKHO.can_write
else:
raise ValueError('Invalid access: {}'.format(ldgd))
Uvf2 = getattr(gCuF, f'WIKI_CAN_{ldgd.upper()}', Uvf2)
Uvf2 = Uvf2.lower()
if CBIr is None or n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KKMP(YKHO, CBIr):\n return True",
"def Pn7U(YKHO):\n return YKHO.user_has_access(DW23.get_current_user())",
"def eTnD(YKHO, CBIr):\n return True",
"def rVDy(Emd4, QePW):\n if Emd4.permission_required:\n return QePW.user.has_perm(Emd4.permission_uri)\n else:\n return True",
... | [
"0.80747867",
"0.78138167",
"0.76863205",
"0.7671137",
"0.758718",
"0.749587",
"0.7475387",
"0.7432369",
"0.73819697",
"0.7354547",
"0.73447746",
"0.7330135",
"0.7330135",
"0.7330135",
"0.7261933",
"0.7242863",
"0.7217003",
"0.72159606",
"0.72138315",
"0.7206499",
"0.7177401"... | 0.7141685 | 24 |
Fixture for creating FastAPI app. | async def fastapi_app(Nchc: AsyncSession, yETZ: Config, IOYf: Context, vc_U: FileStagingQueue, AwOu: JwtDecoder) -> WvgU:
SCWY = WTdB()
SCWY.dependency_overrides[Dbxd] = lambda: Nchc
SCWY.dependency_overrides[tgzD] = lambda: yETZ
SCWY.dependency_overrides[G_wZ] = lambda: IOYf
SCWY.dependency_overrid... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def P4t4():\n P4t4 = LUif(schema=aO5t())\n with P4t4.test_request_context():\n yield P4t4",
"def LUif():\n P4t4 = WvgU()\n tLl6(app=P4t4, router_configs=XSSK, db_configs=ngCM)\n return P4t4",
"def P4t4(V0Mo: EnvVarsDict) -> WvgU:\n return GmIz()",
"def LUif():\n P4t4 = WvgU()\n ... | [
"0.77965",
"0.77702016",
"0.7722283",
"0.75347424",
"0.75249815",
"0.7317291",
"0.72343785",
"0.72199124",
"0.715276",
"0.71218604",
"0.7108509",
"0.7108509",
"0.7108509",
"0.7035622",
"0.7022176",
"0.7019368",
"0.69945043",
"0.698767",
"0.6982074",
"0.6945574",
"0.6921123",
... | 0.64997727 | 88 |
Set the maximum number of days during which a password is valid. See man passwd. | def Je0I(mWFP, Y8rJ):
Pynq = U34r(mWFP)
if Y8rJ == Pynq['max']:
return True
HCmI = 'passwd -x {} {}'.format(Y8rJ, mWFP)
PHIk['cmd.run'](HCmI, python_shell=False)
cbQ4 = U34r(mWFP)
if cbQ4['max'] != Pynq['max']:
return cbQ4['max'] == Y8rJ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C0MM(YKHO):\n eCP8 = 'cn=skip,ou=nerdherd,dc=bonsai,dc=test'\n GSyo = BEkn('ldap://%s' % YKHO.ipaddr)\n GSyo.set_password_policy(True)\n GSyo.set_credentials('SIMPLE', (eCP8, 'p@ssword'))\n w2B8, CKog = GSyo.connect()\n bTKY = w2B8.search(eCP8, 0)[0]\n bTKY['userPassword'] = 'newvalidpassw... | [
"0.6250974",
"0.61837417",
"0.5833606",
"0.57658756",
"0.57623106",
"0.57040536",
"0.5682619",
"0.55853856",
"0.5552156",
"0.5519017",
"0.5453559",
"0.5427901",
"0.5395076",
"0.5386614",
"0.5377064",
"0.5363855",
"0.5344328",
"0.53150344",
"0.5291052",
"0.52541804",
"0.525338... | 0.78651005 | 0 |
Set the password for a named user. The password must be a properly defined | def G3s8(mWFP, jTXt):
RejS = '/etc/shadow'
U5bT = {}
if not Hy7s.path.isfile(RejS):
return U5bT
Nqlg = []
with NTfD.utils.files.fopen(RejS, 'r') as KnEh:
for zFiD in KnEh:
b_VF = zFiD.strip().split(':')
if b_VF[0] != mWFP:
Nqlg.append(zFiD)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zZft(YKHO, zN5h):\n pass",
"def G3s8(YKHO, jTXt):\n YKHO.password = jTXt",
"def G3s8(YKHO, jTXt):\n YKHO.PASSWORD = jTXt",
"def G3s8(YKHO, jTXt):\n YKHO.authentication.password = jTXt",
"def KQz5(YKHO, mWFP, jTXt):\n YKHO._client.changeUserPassword(mWFP, jTXt)",
"def G3s8(YKHO, jTXt):\... | [
"0.80373293",
"0.78608465",
"0.77628756",
"0.77247113",
"0.77052885",
"0.77021646",
"0.7577442",
"0.7530736",
"0.7526811",
"0.7521498",
"0.75001174",
"0.74924165",
"0.7484496",
"0.7466715",
"0.7457635",
"0.74422216",
"0.7441741",
"0.73979795",
"0.7383191",
"0.73550516",
"0.73... | 0.7464782 | 14 |
This function builds a simple example and shows the process by starting from an dummy table | def PU1l():
H09G = [[1900, 170, 10], [0, 120, 10], [0, 120, 100], [2010, 120, 10], [1650, 200, 10]]
L4iZ = [2]
sLfV = [[1900, 170], [0, 120]]
UiRR = xDcj.decorate_table(sLfV, L4iZ, H09G)
ZGm4 = ['I SHOULD NOT BE VISIBLE', 'birth', 'height']
J_Es = GO1l.make_tree(UiRR)
print(J_Es)
print(x... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Hgff():\n print('\\nExample making a new table from scratch:\\n')\n aS9G = tyNF('A table with random data')\n aS9G.addcolumn('x')\n aS9G.addcolumn('x^2')\n aS9G.addcolumn('1/x')\n for YRbF in range(0, 10):\n rdlD = dict()\n rdlD['x'] = YRbF\n rdlD['x^2'] = YRbF * YRbF\n ... | [
"0.7035208",
"0.6883163",
"0.67469096",
"0.6519562",
"0.633887",
"0.6331327",
"0.63076437",
"0.62640625",
"0.6241894",
"0.6109136",
"0.6099785",
"0.6099011",
"0.6081215",
"0.60376215",
"0.5983178",
"0.5970715",
"0.5949976",
"0.593491",
"0.59066916",
"0.587207",
"0.58708096",
... | 0.0 | -1 |
Find the next time / day to run the cron given the current time | def tIkX(YKHO, MT6m, PprL, TN98, V1Lm, aXK5, Qq7B):
HMRb = 0
LMol = 23
PNEC = u'*'
R88I = u'*'
fHQ6 = u'today'
mXxS = u'tomorrow'
if PprL == PNEC and MT6m == R88I:
fgou = V1Lm
uZ8R = TN98
rcpw = fHQ6
elif MT6m == R88I:
if Qq7B < HMRb:
if TN98 !... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b6Gq(YKHO):\n _AZx = YKHO._crontab\n return qcWV.now() + fCoM(seconds=epAf.ceil(_AZx.next(default_utc=False)))",
"def next(YKHO):\n _AZx = YKHO._crontab\n return epAf.ceil(_AZx.next(default_utc=False))",
"def UAth(YKHO, vHj7, LVRp=None, WNMJ=None):\n lCnG = []\n pa4u = YKHO.validate_datet... | [
"0.7082748",
"0.6955729",
"0.6909674",
"0.6668627",
"0.66338456",
"0.6590951",
"0.65107644",
"0.6369025",
"0.6337233",
"0.6337233",
"0.6031546",
"0.6031546",
"0.60300016",
"0.60300016",
"0.60182625",
"0.6003544",
"0.59623736",
"0.5959805",
"0.5906022",
"0.5903393",
"0.5870757... | 0.81791216 | 0 |
Create a formatted date string | def pbww(YKHO, ROt1, yVtz):
wpq_ = 9
I_5H = u'0'
tyqE = u':'
ROt1 = QMSQ(ROt1)
yVtz = QMSQ(yVtz) if yVtz > wpq_ else I_5H + QMSQ(yVtz)
_c1T = tyqE.join([ROt1, yVtz])
return _c1T | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _c1T() -> str:\n return qcWV.strftime(qcWV.today(), uQMc)",
"def JvEs(_c1T):\n CjKC = _c1T.day\n x0eS = _c1T.month\n lO87 = _c1T.year\n quSE = str(x0eS) + '/'\n quSE += str(CjKC) + '/'\n quSE += str(lO87)\n return quSE",
"def eDGe(_c1T):\n return _c1T.strftime(str(x0eS(_c1T.month... | [
"0.7840573",
"0.7779449",
"0.7725975",
"0.74672097",
"0.7401226",
"0.7360538",
"0.72889614",
"0.72726303",
"0.72125286",
"0.7210942",
"0.7129319",
"0.7089475",
"0.7070776",
"0.7070776",
"0.70581776",
"0.699876",
"0.6949775",
"0.69451755",
"0.6930531",
"0.69303715",
"0.6918962... | 0.0 | -1 |
Empirical CDF (x, y) generator | def Zt0j(nPrm):
WKvO = oyIN.sort(nPrm)
YzER = oyIN.linspace(0, 1, len(WKvO))
return (YzER, WKvO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YzER(WKvO, AU8u):\n raise NotImplementedError('The cdf method has not yet been implemented.')",
"def YzER(YKHO, WKvO):\n ZMlM = GIhX.vectord_cxx(len(WKvO))\n for YRbF in range(len(WKvO)):\n ZMlM[YRbF] = WKvO[YRbF]\n FK4A = YKHO._distribution.cdf(ZMlM)\n return FK4A",
"def YzER(YKHO, W... | [
"0.6323324",
"0.63156885",
"0.63156885",
"0.6303814",
"0.6268706",
"0.62100124",
"0.6159366",
"0.60543627",
"0.6024784",
"0.59377104",
"0.59365284",
"0.59210986",
"0.5870835",
"0.58200634",
"0.5793498",
"0.57904786",
"0.5770672",
"0.57494646",
"0.57364416",
"0.5731092",
"0.57... | 0.62353605 | 5 |
If the vector contains numbers whose numbers are [0, 1] then this is transformation that properly handles the difference in how the variance of the kind of a feature is computed. x_norm = (x mu) / sqrt(mu (1 mu)) | def eouo(WKvO: np.ndarray or pd.Series, LvGA=False) -> oyIN.ndarray or rLdf.Series:
assert (0 <= WKvO[~oyIN.isnan(WKvO)]).all() and (WKvO[~oyIN.isnan(WKvO)] <= 1).all(), 'Values must be [0, 1]'
yGTL = oyIN.nanmean(WKvO)
if LvGA:
WKvO[oyIN.isnan(WKvO)] = yGTL
return (WKvO - yGTL) / oyIN.sqrt(yGTL... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VDTB(WKvO):\n FOSW = epAf.sqrt(QLUs(WKvO, WKvO))\n return [float(YRbF) / FOSW for YRbF in WKvO]",
"def HcPy(EcVT):\n LtN5 = EcVT - oyIN.min(EcVT)\n YtTp = LtN5 * 2 / oyIN.max(LtN5) - 1\n return YtTp",
"def NkkI(iArr):\n return iArr / oyIN.linalg.norm(iArr)",
"def NkkI(WKvO):\n WzsH =... | [
"0.74264014",
"0.7404532",
"0.7006374",
"0.69798654",
"0.6978168",
"0.6945071",
"0.6945071",
"0.69413334",
"0.6929225",
"0.6915152",
"0.68706095",
"0.68543404",
"0.683409",
"0.680389",
"0.6802249",
"0.6800682",
"0.6783044",
"0.675486",
"0.67526144",
"0.67006624",
"0.66236293"... | 0.0 | -1 |
Takes in an array of characters in infix notation and returns an array of the same expression in postfix notation. | def btDz(YKHO, Jwtf):
hEAh = []
E5BI = []
for hcXw in Jwtf:
if e5f3(hcXw):
hEAh.append(hcXw)
elif hcXw in sFjc.specialNumbers:
hEAh.append(hcXw)
elif hcXw in sFjc.functions:
E5BI.append(hcXw)
elif hcXw == ',':
while E5BI[-1] != ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XtMr(EP60):\n xpjC = lJj5()\n Ylbp = []\n tmh_ = EP60.split()\n eRdl = {'(': 4, '^': 3, '~': 3, '*': 2, '/': 2, '+': 1, '-': 1}\n for eOtH in tmh_:\n if eOtH[0] in '0123456789':\n Ylbp.append(eOtH)\n if not xpjC.is_empty() and xpjC.peek() == '^':\n Ylb... | [
"0.7558118",
"0.7078522",
"0.7011911",
"0.69275826",
"0.6924146",
"0.6870807",
"0.6854964",
"0.68373585",
"0.6797975",
"0.6752513",
"0.67022526",
"0.6645195",
"0.66399765",
"0.66213095",
"0.6603758",
"0.65511185",
"0.6515123",
"0.6442614",
"0.6399889",
"0.63701683",
"0.634722... | 0.6659009 | 11 |
Return the connector with label 'label'. If label is already a connector, it just returns the connector | def C5LY(YKHO, UXqs):
if isinstance(UXqs, VdrK):
return UXqs
elif UXqs in YKHO.inputs:
return YKHO.inputs[UXqs]
elif UXqs in YKHO.outputs:
return YKHO.outputs[UXqs]
elif UXqs in YKHO.switches:
return YKHO.switches[UXqs].input
else:
try:
UXqs = tupl... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Jhm9(YKHO, UXqs):\n try:\n return next((MRRk for MRRk in YKHO.legends if MRRk.label == UXqs))\n except StopIteration:\n return None",
"def next(YKHO, BWXx):\n if YKHO.is_threshold_true(BWXx):\n try:\n SQvy = YKHO.connector_set.filter(connector_type=True)\n ... | [
"0.5988546",
"0.59118974",
"0.5866014",
"0.57709306",
"0.5751925",
"0.5744539",
"0.57358396",
"0.5731276",
"0.5672983",
"0.56525475",
"0.56485885",
"0.55657595",
"0.54899764",
"0.54848546",
"0.5479509",
"0.54742557",
"0.5387092",
"0.5362233",
"0.53138536",
"0.5277592",
"0.527... | 0.8234057 | 0 |
Create a route and add it to the routes dictionary | def cBjF(YKHO, siZ_):
PsCT = O3sD(siZ_)
if PsCT.input.label not in YKHO.routes:
YKHO.routes[PsCT.input.label] = {PsCT.output.label: [PsCT]}
elif PsCT.output.label not in YKHO.routes[PsCT.input.label]:
YKHO.routes[PsCT.input.label][PsCT.output.label] = [PsCT]
else:
YKHO.routes[PsC... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C9N_(YKHO):\n pass",
"def jbgU(YKHO, PsCT: Route, vQLm: str, na_E: typing.Iterable[str]=('GET',)):\n PsCT.routing_url = vQLm\n PsCT.methods = na_E\n YKHO.routes.append(PsCT)\n PsCT.bp = YKHO\n return PsCT",
"def jbgU(YKHO, ZfUD):\n YKHO._routes[ZfUD.route] = ZfUD\n YKHO.httpd.route(... | [
"0.75110686",
"0.7458591",
"0.73835146",
"0.72081",
"0.7159818",
"0.70936894",
"0.7021684",
"0.6901304",
"0.68598646",
"0.67858976",
"0.6774338",
"0.6691051",
"0.6658312",
"0.6626322",
"0.65774846",
"0.6576588",
"0.65486085",
"0.6531361",
"0.65131605",
"0.6496556",
"0.6456906... | 0.6716273 | 11 |
Create a string for the Genre. This is required to display genre in Admin | def R9YW(YKHO):
return ', '.join((Pr14.name for Pr14 in YKHO.genre.all()[:3])) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R9YW(YKHO):\n return ', '.join([Pr14.name for Pr14 in YKHO.genre.all()[:3]])",
"def R9YW(YKHO):\n return ', '.join([Pr14.name for Pr14 in YKHO.genre.all()[:3]])",
"def R9YW(YKHO):\n return ', '.join((Pr14.name for Pr14 in YKHO.genre.all()[:3]))",
"def dYgT(YKHO) -> h8nf[str]:\n return YKHO.... | [
"0.73033166",
"0.6990355",
"0.69701594",
"0.6930422",
"0.6915598",
"0.6827643",
"0.6806863",
"0.67590684",
"0.6660133",
"0.6609264",
"0.66054493",
"0.64957887",
"0.63967633",
"0.6385569",
"0.6239431",
"0.6219362",
"0.60696435",
"0.6056624",
"0.60528976",
"0.6049401",
"0.60484... | 0.7101371 | 1 |
tokenize text and return Tensor of token IDs | def Baki(YKHO, l5Ny: str) -> ht2j.Tensor:
return ht2j.tensor(YKHO.tokenizer.encode(l5Ny, max_length=YKHO.max_len, truncation=True)).unsqueeze(0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZzRC(Emd4, l5Ny):\n s2mk = dPrV.TOKENIZER.tokenize(l5Ny)\n juz4 = dPrV.TOKENIZER.convert_tokens_to_ids(s2mk)\n Pha6 = juz4 + [0] * (Emd4.MAX_LEN - len(juz4))\n return (s2mk, Pha6)",
"def NfQC(l5Ny):\n return l5Ny",
"def wr3U(l5Ny):\n yAmx = W66f(l5Ny)\n return yAmx.tokens()",
"def jW... | [
"0.7625905",
"0.7528897",
"0.7187174",
"0.717211",
"0.71701217",
"0.7136371",
"0.7055938",
"0.6973813",
"0.6962903",
"0.6872934",
"0.68579376",
"0.6722189",
"0.67131203",
"0.6693592",
"0.66824037",
"0.66818154",
"0.6681238",
"0.6674619",
"0.6646261",
"0.66326636",
"0.66262335... | 0.710097 | 6 |
calcul_xy_array function calculates xy point to crop image according to varios parameters this function empisizses minimal crops | def O8GQ(HMBG, uRrL, Y8lG, u41L):
qw7D = []
QVvX = HMBG % Y8lG
BI5l = uRrL % u41L
ohTc = HMBG // Y8lG
pY3b = uRrL // u41L
IMIK = 0
uFeA = 0
for YRbF in range(pY3b):
for r845 in range(ohTc):
qw7D.append((IMIK, uFeA))
IMIK += Y8lG
if QVvX:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WazX(HMBG, uRrL, Y8lG, u41L, EG9a=0, AuKi=0):\n qw7D = []\n QVvX = EG9a\n BI5l = AuKi\n IMIK = 0\n uFeA = 0\n while uFeA + u41L <= uRrL:\n while IMIK + Y8lG <= HMBG:\n qw7D.append((IMIK, uFeA))\n if IMIK + Y8lG == HMBG:\n break\n IMIK += ... | [
"0.62918663",
"0.59897083",
"0.589296",
"0.5858555",
"0.58506364",
"0.5756055",
"0.57436585",
"0.5733566",
"0.572034",
"0.57197464",
"0.571418",
"0.5698101",
"0.56696355",
"0.56631607",
"0.565198",
"0.5638193",
"0.5615365",
"0.5605501",
"0.5601639",
"0.5598386",
"0.5587683",
... | 0.6741146 | 0 |
Returns ``True`` if the set has no elements in common with ``other``. Sets(also OrderedSets) are disjoint if and only if their intersection is the empty set. | def FO1Y(YKHO, Elif):
for U6D_ in Elif:
if U6D_ in YKHO:
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FO1Y(YKHO, Elif):\n return YKHO.intersect(Elif) == o4sw.EmptySet",
"def FO1Y(YKHO, Elif):\n if not isinstance(Elif, fNoJ):\n raise TypeError('Can only be disjoint with another SetPy')\n return vxJu.SetIntersect(YKHO, Elif).cardinality() == 0",
"def d3QJ(YKHO, Elif: Union[Rangelike, Iterable... | [
"0.8482522",
"0.8251271",
"0.7338489",
"0.7121076",
"0.6896841",
"0.6781653",
"0.66817737",
"0.6627249",
"0.6555604",
"0.6488465",
"0.64796954",
"0.64539194",
"0.643535",
"0.6405576",
"0.63989204",
"0.63969433",
"0.63552",
"0.6311285",
"0.62773293",
"0.6222137",
"0.62200254",... | 0.7427231 | 2 |
Create an empty mock database with all the necessary tables. | def zSc_() -> iu5r[iHv3.Connection]:
with iHv3.connect(':memory:') as w2B8:
IGTS(w2B8)
yield w2B8 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m5mT():\n OfVt()\n p9bx.create_tables([xp_p])\n p9bx.close()",
"def FCbF(YKHO):\n NCls.create_all()",
"def FCbF(YKHO):\n NCls.drop_all()\n NCls.create_all()",
"def pgRa():\n from sqlalchemy import create_engine\n eHpk = create_engine('sqlite://')\n from .models import Base, Tod... | [
"0.80761915",
"0.80277145",
"0.77839726",
"0.77212346",
"0.7690953",
"0.76794016",
"0.76792336",
"0.7669546",
"0.7639703",
"0.7616845",
"0.75365347",
"0.75365347",
"0.75365347",
"0.75257266",
"0.7519232",
"0.7519232",
"0.7519232",
"0.7519232",
"0.7519232",
"0.7519232",
"0.751... | 0.0 | -1 |
Get all peak informations including centroid, width, intersection with baseline, area (intensity) | def sbcV(QzFq, TpFT, P7us):
yHxN = []
_SEp = []
GnQi = []
ILBk = []
for YRbF, XP5J in enumerate(TpFT):
k3nF = P7us[YRbF]
TVTK, uMII = xiCJ(QzFq, XP5J, k3nF)
wzhh = G0Yq(QzFq, XP5J, uMII)
ILBk.append(QzFq[XP5J] * TVTK / (2.35 * 0.3989))
yHxN.append(wzhh)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GbAy(YKHO):\n YKHO.incandBaseline = oyIN.mean(YKHO.wideBandIncandData[0:10])\n nhPf = oyIN.amax(YKHO.wideBandIncandData)\n HfON = nhPf - YKHO.incandBaseline\n c4aL = oyIN.argmax(YKHO.wideBandIncandData)\n YKHO.incandMax = HfON\n YKHO.incandMaxPos = c4aL",
"def ga1y(YKHO):\n YKHO.narrowIn... | [
"0.64989",
"0.6485825",
"0.6444918",
"0.6409422",
"0.64071286",
"0.63856786",
"0.6343341",
"0.6315446",
"0.6241474",
"0.62322104",
"0.60951096",
"0.6060293",
"0.6054478",
"0.6047564",
"0.60356694",
"0.6005472",
"0.59538835",
"0.59099555",
"0.59079224",
"0.5863672",
"0.5851379... | 0.7475382 | 0 |
Initialize a set of quaternions (to be summed over the last dimension) randomly. This method produces a uniform distribution of rotations. | def _AO0(ROpF, yDqo=None):
assert ROpF[1] == 4
IMaG, bGrB, aG56 = ROpF
IrOQ, KoVS, kh1c = ZylS.random.uniform((3, IMaG), maxval=1.0)
Mkmy = ZylS.sqrt(1 - IrOQ) * ZylS.sin(2 * epAf.pi * KoVS)
WKvO = ZylS.sqrt(1 - IrOQ) * ZylS.cos(2 * epAf.pi * KoVS)
LVAh = ZylS.sqrt(IrOQ) * ZylS.sin(2 * epAf.pi *... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def t4rP(YKHO, vGI5):\n Xr0K = De8R.quaternion.normalized_random_uniform((vGI5,))\n qF36 = De8R.rotation_matrix_3d.from_quaternion(Xr0K)\n qF36 = ZylS.cast(qF36, ZylS.float32)\n return qF36",
"def NC0j():\n from pyso3.quaternion import quat2rot\n import numpy as oyIN\n vexM = oyIN.random.ran... | [
"0.7286116",
"0.724883",
"0.7177093",
"0.70647335",
"0.70409805",
"0.70113873",
"0.67600745",
"0.6688123",
"0.6657766",
"0.64939237",
"0.6301644",
"0.6276243",
"0.62408674",
"0.6230662",
"0.618708",
"0.6140072",
"0.60930246",
"0.6067635",
"0.5968336",
"0.5933476",
"0.5933476"... | 0.6612282 | 9 |
Returns the tree item at the given index and role. | def nPrm(YKHO, d6pt, LmAn):
if not d6pt.isValid():
return None
fvDH = d6pt.column()
bqZw = d6pt.internalPointer()
YEnM = bqZw.obj
if LmAn == uaAZ.DisplayRole:
try:
hkS8 = YKHO._attr_cols[fvDH].data_fn(bqZw)
return hkS8.replace('\r\n', y8gT(8629)).replace('\n',... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kTCt(YKHO, d6pt: int) -> sb5H:\n return YKHO.index_to_item[d6pt]",
"def oJ20(YKHO, d6pt):\n return YKHO.itemId_item[YKHO.gList.GetItemData(d6pt)]",
"def OP2O(YKHO, d6pt: int) -> Kt_s:\n s7uf = YKHO.__get_node_at_index(d6pt)\n return s7uf.item",
"def yLtf(d6pt, LmAn, iVRZ=None):\n if iVRZ a... | [
"0.674443",
"0.6507644",
"0.6443466",
"0.64145774",
"0.64087194",
"0.6348386",
"0.62932366",
"0.60373384",
"0.60297745",
"0.60282725",
"0.5992685",
"0.5923381",
"0.59075636",
"0.58989227",
"0.5844554",
"0.5818023",
"0.5815859",
"0.5814787",
"0.57980925",
"0.57829016",
"0.5766... | 0.57335407 | 22 |
Get item handler for the given index. | def mexE(YKHO, f095):
return YKHO.treeItem(f095) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kTCt(YKHO, d6pt: int) -> sb5H:\n return YKHO.index_to_item[d6pt]",
"def kTCt(YKHO, d6pt):\n if d6pt == 0:\n raise IndexError('<{0}> Index start as 1'.format(type(YKHO).__name__))\n d6pt = YKHO.get_index(d6pt)\n Ylbp = YKHO.get_item_type()()\n YKHO.get_Item(d6pt, Ylbp)\n return Ylbp",... | [
"0.64511156",
"0.644189",
"0.60153353",
"0.59869826",
"0.5972518",
"0.5878667",
"0.58729964",
"0.5871374",
"0.582551",
"0.57866263",
"0.5753614",
"0.5745258",
"0.5720659",
"0.57183975",
"0.57140183",
"0.5709074",
"0.5685909",
"0.5685909",
"0.5611351",
"0.55572706",
"0.5551654... | 0.53637743 | 32 |
Check that the file name checker helper function properly checks / adds file extensions. | def JfA_():
assert IznC('data', 'json') == 'data.json'
assert IznC('data.json', 'json') == 'data.json'
assert IznC('pic', 'png') == 'pic.png'
assert IznC('pic.png', 'png') == 'pic.png'
assert IznC('report.pdf', 'pdf') == 'report.pdf'
assert IznC('report.png', 'pdf') == 'report.png' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dEPQ(YKHO, gIsw, sT2Z):\n q5sG = hY67()\n bQLY = q5sG.get_extension_types()\n for Fst3 in bQLY:\n if gIsw.endswith(Fst3):\n if sT2Z == 'input':\n YKHO._input_file = q5sG.get_file_type(Fst3)\n else:\n YKHO._output_file = q5sG.get_file_type(Fst3... | [
"0.7883958",
"0.75611335",
"0.7380167",
"0.73467886",
"0.73041046",
"0.72771317",
"0.7264603",
"0.72286856",
"0.7187826",
"0.7182048",
"0.7182048",
"0.7178175",
"0.71725744",
"0.7169548",
"0.716252",
"0.71486044",
"0.7147043",
"0.7147043",
"0.7147043",
"0.7147043",
"0.7147043... | 0.0 | -1 |
Test loading JSON file, with str file specifier. Loads files from test_save_fm_str. | def TTOd():
gIsw = 'test_fooof_all'
nPrm = lc9H(gIsw, KQwf)
assert nPrm | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fl1R():\n cftY = '{\"foo\": \"bar\"}'\n in4Z = {'foo': 'bar'}\n assert RKKs.loader(cftY, from_file=False) == in4Z",
"def W8Aq():\n cftY = 'tests/test_json.json'\n in4Z = {'foo': 'bar'}\n assert RKKs.loader(cftY) == in4Z",
"def lESt():\n gIsw = 'test_fooof_all'\n with open(Hy7s.path.... | [
"0.73777825",
"0.7376165",
"0.7230088",
"0.70725197",
"0.68765694",
"0.67263544",
"0.670362",
"0.66817373",
"0.6622015",
"0.64939463",
"0.6477334",
"0.6474819",
"0.6438596",
"0.6438438",
"0.64371306",
"0.64021796",
"0.6400643",
"0.63922054",
"0.6382423",
"0.63679767",
"0.6360... | 0.76864314 | 0 |
Test loading JSON file, with file object file specifier. Loads files from test_save_fm_str. | def lESt():
gIsw = 'test_fooof_all'
with open(Hy7s.path.join(KQwf, gIsw + '.json'), 'r') as rjPX:
nPrm = lc9H(rjPX, '')
assert nPrm | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W8Aq():\n cftY = 'tests/test_json.json'\n in4Z = {'foo': 'bar'}\n assert RKKs.loader(cftY) == in4Z",
"def nb96():\n gIsw = 'test_fooof_all'\n GDhf = lc9H(gIsw, KQwf)\n for YqMg in c1_B['settings']:\n assert YqMg in GDhf.keys()\n for Aofo in c1_B['results']:\n assert Aofo in... | [
"0.75258416",
"0.7465203",
"0.7410815",
"0.7406534",
"0.7405664",
"0.7307532",
"0.7127531",
"0.70336926",
"0.6979452",
"0.68026793",
"0.66483885",
"0.6642713",
"0.6637348",
"0.66363496",
"0.66358185",
"0.66351014",
"0.6620436",
"0.6594246",
"0.6544583",
"0.6537851",
"0.651892... | 0.7832351 | 0 |
Restore the original log configuration. | def tBIc(YKHO):
YKHO.logger.handlers = YKHO.orig_handlers
YKHO.logger.level = YKHO.level
YKHO.rt_logger.handlers = YKHO.orig_root_handlers
YKHO.rt_logger.level = YKHO.root_level | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def a48X(YKHO):\n YKHO._clear_previous_windows_assigment()\n YKHO._restart_i3_config()",
"def MuHt(YKHO):\n if YKHO._previous_action_logging_setting is not None:\n YKHO.action_logging_enabled = YKHO._previous_action_logging_setting\n YKHO._previous_action_logging_setting = None\n return... | [
"0.7123501",
"0.6727215",
"0.6610408",
"0.65163714",
"0.6412238",
"0.62831604",
"0.6218266",
"0.6191524",
"0.6045214",
"0.59747887",
"0.59591055",
"0.58994496",
"0.58450556",
"0.5834434",
"0.5805508",
"0.58017045",
"0.57987106",
"0.5776211",
"0.573384",
"0.57305247",
"0.57214... | 0.58486915 | 12 |
Render a ggplot as an image | def MoXk(Oa1e: ggplot, **B2fa) -> uGYG.Image.Image:
Oa1e.draw()
return bUt3(**B2fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def g8Ef(YKHO):\n QrM1.savefig(KfRp + '/presentation/images/' + YKHO.folder + '/' + YKHO.generated_image_name + '.png', bbox_inches='tight')",
"def gTDI(Lr31, JI1i):\n LaVg = ZnQG.StringIO()\n JI1i.savefig(LaVg, format='png', dpi=geWR)\n Lr31.value = LaVg.getvalue()\n LaVg.close()",
"def lsxx(JI... | [
"0.6554129",
"0.65464324",
"0.64893293",
"0.6452757",
"0.6416033",
"0.6383917",
"0.6378029",
"0.6378029",
"0.6378029",
"0.6375705",
"0.63691914",
"0.63691914",
"0.6321307",
"0.6269392",
"0.6269392",
"0.62294483",
"0.62288004",
"0.62105227",
"0.62105227",
"0.62105227",
"0.6197... | 0.79084647 | 0 |
Repeat mpl_cmap_concat(cmaps) to have n colors | def ihwo(exwG: int, *GYfx: Union[str, mpl.colors.ListedColormap]) -> x5MY.colors.ListedColormap:
iMGt = gZLE(*GYfx)
Jw9H = (iMGt.colors * (1 + exwG // len(iMGt.colors)))[:exwG]
return x5MY.colors.ListedColormap(Jw9H) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IDo1(exwG, em8M='tab20'):\n wkkz = QrM1.get_cmap(em8M)\n vi7w = len(wkkz.colors)\n return [wkkz(YRbF % vi7w) for YRbF in range(exwG)]",
"def owgR(exwG):\n ku7w = QrM1.get_cmap('jet')\n tceN = Jw9H.Normalize(vmin=0, vmax=exwG - 1)\n y1f3 = CbNT.ScalarMappable(norm=tceN, cmap=ku7w)\n wg_B ... | [
"0.74020565",
"0.73613",
"0.68641955",
"0.6692054",
"0.661377",
"0.6541813",
"0.6484327",
"0.64687973",
"0.64588034",
"0.6437179",
"0.64368224",
"0.6434781",
"0.6389428",
"0.63242435",
"0.62578416",
"0.62549824",
"0.62529665",
"0.6158926",
"0.61354136",
"0.61077076",
"0.61062... | 0.86303645 | 0 |
Render the current figure as a (PIL) image Take dummy arg to support expression usage `plt_to_img(...)` as well as statement usage `...; plt_to_img()` | def bUt3(Vo9x: any=None, **B2fa) -> uGYG.Image.Image:
return uGYG.Image.open(RWKw(**B2fa)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nqHi(Vo9x: any=None, **B2fa) -> x6b6.display.Image:\n return x6b6.display.Image(filename=RWKw(**B2fa))",
"def OBZq(JI1i, FMLJ='jpg'):\n if not callable(getattr(JI1i, 'savefig', None)):\n return None\n hlel = kJm3()\n JI1i.savefig(hlel, format=FMLJ)\n kGys = hlel.getvalue()\n hlel.clo... | [
"0.8149433",
"0.71991897",
"0.68451166",
"0.673614",
"0.6686397",
"0.66476566",
"0.66191614",
"0.6591109",
"0.65812457",
"0.6573919",
"0.6573919",
"0.6573919",
"0.6569402",
"0.6569254",
"0.6569254",
"0.64321697",
"0.6406493",
"0.63874584",
"0.6369979",
"0.6341378",
"0.6337907... | 0.81259215 | 1 |
Like plt_to_img but make an IPython Image instead of a PIL Image | def nqHi(Vo9x: any=None, **B2fa) -> x6b6.display.Image:
return x6b6.display.Image(filename=RWKw(**B2fa)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bUt3(Vo9x: any=None, **B2fa) -> uGYG.Image.Image:\n return uGYG.Image.open(RWKw(**B2fa))",
"def lsxx(JI1i):\n LaVg = xDSY.BytesIO()\n QrM1.savefig(LaVg, format='png')\n QrM1.close(JI1i)\n LaVg.seek(0)\n LNo8 = uGYG.Image.open(LaVg)\n LNo8 = Ymkf.ToTensor()(LNo8)\n return LNo8",
"def... | [
"0.8060336",
"0.75551385",
"0.74884987",
"0.73595905",
"0.73515654",
"0.73515654",
"0.73515654",
"0.7310224",
"0.7310224",
"0.7308095",
"0.72436786",
"0.7110329",
"0.71054316",
"0.69950163",
"0.6891017",
"0.68174624",
"0.6725987",
"0.6634947",
"0.6464275",
"0.63643175",
"0.63... | 0.8214967 | 0 |
plt.imshow with sane defaults | def KwM3(EcVT: np.ndarray, **B2fa):
B2fa.setdefault('origin', 'lower')
QrM1.imshow(EcVT, **B2fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _Sny(WKvO):\n QrM1.imshow(WKvO, interpolation='nearest', aspect='auto')",
"def r2sP(YKHO):\n MPlV([0, 0, 1, 1], xticks=[], yticks=[])\n r2sP(YKHO.rgb_image())",
"def VAvy(YKHO, jzdc):\n LZpg = QrM1.figure()\n LZpg.set_size_inches((2, 2))\n aNZO = QrM1.Axes(LZpg, [0.0, 0.0, 1.0, 1.0])\n ... | [
"0.76821333",
"0.7383634",
"0.7355236",
"0.73525053",
"0.7248383",
"0.7156302",
"0.70230836",
"0.6989671",
"0.6956777",
"0.68749624",
"0.6862426",
"0.67880374",
"0.67704684",
"0.6764542",
"0.6749863",
"0.6740264",
"0.67389166",
"0.67389166",
"0.67389166",
"0.6729384",
"0.6696... | 0.70693696 | 6 |
Create and save a user with the given username, email, and password. | def xWi2(YKHO, D3lj, NtEF, jTXt, EE3v=2, **wdCM):
if not D3lj:
raise ValueError('The given email must be set')
D3lj = YKHO.normalize_email(D3lj)
NtEF = YKHO.model.normalize_username(NtEF)
CBIr = YKHO.model(email=D3lj, username=NtEF, gender=EE3v, **wdCM)
CBIr.set_password(jTXt)
CBIr.save(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xWi2(YKHO, D3lj, jTXt, NtEF, **wdCM):\n if not D3lj:\n raise ValueError('The given email must be set')\n if not NtEF:\n raise ValueError('The given username must be set')\n D3lj = YKHO.normalize_email(D3lj)\n CBIr = YKHO.model(email=D3lj, username=str.strip(NtEF), **wdCM)\n CBIr.se... | [
"0.8596651",
"0.8440805",
"0.8426653",
"0.842342",
"0.84064573",
"0.83936125",
"0.83879197",
"0.83420223",
"0.8334317",
"0.83325297",
"0.8322284",
"0.82890344",
"0.8282186",
"0.82750225",
"0.8269599",
"0.8267712",
"0.81639",
"0.81596565",
"0.8158627",
"0.8142537",
"0.8136805"... | 0.78382444 | 100 |
Return recipe detail url | def iLuo(rXcN):
return gxEw('recipe:recipe-detail', args=[rXcN]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pazJ(rXcN):\n return gxEw('recipeapp:recipe-detail', args=[rXcN])",
"def iLuo(rXcN):\n return gxEw('recipe:recipe-detail', args=[rXcN])",
"def iLuo(rXcN):\n return gxEw('recipe:recipe-detail', args=[rXcN])",
"def iLuo(rXcN):\n return gxEw('recipe:recipe-detail', args=[rXcN])",
"def iLuo(rXc... | [
"0.85382056",
"0.85175544",
"0.8516057",
"0.8516057",
"0.8516057",
"0.8485883",
"0.7961948",
"0.7941685",
"0.7200663",
"0.6732586",
"0.6619213",
"0.66146713",
"0.6565162",
"0.6563302",
"0.6547823",
"0.6515735",
"0.6505814",
"0.6500015",
"0.6446416",
"0.6442284",
"0.64314175",... | 0.8467275 | 6 |
Test retrieving a list of recipes | def GKeA(YKHO):
VHaa(user=YKHO.user)
VHaa(user=YKHO.user)
Ylbp = YKHO.client.get(nyJA)
AHLC = LC16.objects.all().order_by('-id')
ZMzz = azWq(AHLC, many=True)
YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_200_OK)
YKHO.assertEqual(Ylbp.data, ZMzz.data) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def h8CT(YKHO):\n pass",
"def GKeA(YKHO):\n VHaa(name='Avocado toast')\n VHaa(name='Baklava')\n Ylbp = YKHO.client.get(tQ6t)\n AHLC = LC16.objects.all()\n ZMzz = azWq(AHLC, many=True)\n YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_200_OK)\n YKHO.assertEqual(len(Ylbp.data), 2)\n YKHO.as... | [
"0.81033486",
"0.79853475",
"0.79804796",
"0.79704607",
"0.7895004",
"0.78374314",
"0.76769125",
"0.767323",
"0.74180543",
"0.73952913",
"0.73141986",
"0.72933966",
"0.7182399",
"0.71717864",
"0.7072997",
"0.70101357",
"0.6926858",
"0.6895275",
"0.689",
"0.6882748",
"0.687709... | 0.78925663 | 5 |
Test retrieving recipes for authenticated user | def hBHr(YKHO):
uDCI = egNl().objects.create_user(email='test2@gmail.com', password='123465')
VHaa(user=uDCI)
VHaa(user=YKHO.user)
Ylbp = YKHO.client.get(nyJA)
AHLC = LC16.objects.filter(user=YKHO.user)
ZMzz = azWq(AHLC, many=True)
YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_200_OK)
YKH... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DdhA(YKHO):\n uDCI = egNl().objects.create_user('test@gmail.com', 'password3456')\n VHaa(YKHO.user)\n VHaa(uDCI)\n Ylbp = YKHO.client.get(nyJA)\n AHLC = LC16.objects.filter(user=YKHO.user)\n ZMzz = azWq(AHLC, many=True)\n YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_200_OK)\n YKHO.asser... | [
"0.8132782",
"0.8016161",
"0.799972",
"0.79516006",
"0.7939386",
"0.79077315",
"0.7842916",
"0.77679795",
"0.76749337",
"0.7433105",
"0.7431812",
"0.7412918",
"0.7326992",
"0.7156867",
"0.7122375",
"0.71120375",
"0.7111092",
"0.71065676",
"0.7100709",
"0.685798",
"0.68199605"... | 0.8023137 | 1 |
Test creating recipe with ingredients | def WlbR(YKHO):
KZtG = wm3X(user=YKHO.user, name='bla')
ciPx = wm3X(user=YKHO.user, name='blaa')
pB3N = {'title': 'red curry', 'ingredients': [KZtG.id, ciPx.id], 'time_minutes': 30, 'price': 30.0}
Ylbp = YKHO.client.post(nyJA, pB3N)
YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_201_CREATED)
YSCM ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f1hb(YKHO):\n KZtG = jRmL(user=YKHO.user, name='Prawns')\n ciPx = jRmL(user=YKHO.user, name='Garlic')\n pB3N = {'title': 'Avocado lime cheesecake', 'time_minutes': 20, 'price': 500.0, 'currency': 'NGN', 'ingredients': [KZtG.id, ciPx.id]}\n YKHO.evaluate_recipe(KZtG, ciPx, pB3N, 'ingredient')",
"d... | [
"0.8825509",
"0.84078807",
"0.8278052",
"0.821998",
"0.818701",
"0.8048869",
"0.78536355",
"0.78462386",
"0.7843251",
"0.78242916",
"0.7535233",
"0.75127876",
"0.75123227",
"0.74753714",
"0.7442225",
"0.7428843",
"0.73928785",
"0.73488337",
"0.73260677",
"0.7291473",
"0.72718... | 0.82071775 | 4 |
Test updating a recipe with put | def gGPk(YKHO):
YSCM = VHaa(user=YKHO.user)
YSCM.tags.add(eo18(user=YKHO.user))
pB3N = {'title': 'Spaghetti', 'time_minutes': 25, 'price': 5.0}
bD7m = iLuo(YSCM.id)
YKHO.client.put(bD7m, pB3N)
YSCM.refresh_from_db()
YKHO.assertEqual(YSCM.title, pB3N['title'])
YKHO.assertEqual(YSCM.time_m... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gGPk(YKHO):\n YSCM = VHaa(user=YKHO.user)\n YSCM.tag.add(eo18(user=YKHO.user))\n pB3N = {'title': 'chicken noodles', 'time_minutes': 50, 'price': 12.67}\n bD7m = iLuo(YSCM.id)\n YKHO.client.put(bD7m, pB3N)\n YSCM.refresh_from_db()\n YKHO.assertEqual(YSCM.title, pB3N['title'])\n YKHO.ass... | [
"0.78566587",
"0.7752075",
"0.7712868",
"0.77045786",
"0.7525884",
"0.748222",
"0.74381965",
"0.7429547",
"0.73584735",
"0.73346174",
"0.7303786",
"0.73017454",
"0.71913356",
"0.7174521",
"0.7124352",
"0.7124352",
"0.7124352",
"0.7121711",
"0.7092275",
"0.7064242",
"0.7031531... | 0.77277243 | 2 |
Test uploading an image to recipe | def cdch(YKHO):
bD7m = xx5i(YKHO.recipe.id)
with gbPf.NamedTemporaryFile(suffix='.jpg') as QbTr:
VXjJ = hnIv.new('RGB', (10, 10))
VXjJ.save(QbTr, format='JPEG')
QbTr.seek(0)
Ylbp = YKHO.client.post(bD7m, {'image': QbTr}, format='multipart')
YKHO.recipe.refresh_from_db()
Y... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def h4HE(YKHO):\n bD7m = xx5i(YKHO.recipe.id)\n with gbPf.NamedTemporaryFile(suffix='.jpg') as QbTr:\n VXjJ = hnIv.new('RGB', (10, 10))\n VXjJ.save(QbTr, format='JPEG')\n QbTr.seek(0)\n Ylbp = YKHO.client.post(bD7m, {'image': QbTr}, format='multipart')\n YKHO.recipe.refresh_fro... | [
"0.86700606",
"0.8635865",
"0.8499466",
"0.8485353",
"0.78114253",
"0.7783709",
"0.77733296",
"0.76543945",
"0.7583468",
"0.75644386",
"0.74843514",
"0.7406042",
"0.733126",
"0.73294336",
"0.7199716",
"0.71662664",
"0.7152698",
"0.70980304",
"0.70972466",
"0.6977602",
"0.6969... | 0.8491053 | 3 |
Test uploading an invalid image | def gopI(YKHO):
bD7m = xx5i(YKHO.recipe.id)
Ylbp = YKHO.client.post(bD7m, {'image': 'notimage'}, format='multipart')
YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_400_BAD_REQUEST) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ICKa(YKHO):\n bD7m = xx5i(YKHO.reteta.id)\n Ylbp = YKHO.client.post(bD7m, {'image': 'notimage'}, format='multipart')\n YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_400_BAD_REQUEST)",
"def ZM12(YKHO):\n bD7m = LDEV(YKHO.recipe.id)\n Ylbp = YKHO.client.post(bD7m, {'image': 'not_image'}, format='... | [
"0.86194044",
"0.8567676",
"0.8433633",
"0.8430187",
"0.8360368",
"0.83143234",
"0.82901424",
"0.82888144",
"0.82306975",
"0.81376487",
"0.7897103",
"0.75692457",
"0.7536378",
"0.74416286",
"0.73935485",
"0.7353074",
"0.72465086",
"0.7230261",
"0.72119063",
"0.72095186",
"0.7... | 0.83053386 | 6 |
Test returning recipes with specific ingredients | def N4bw(YKHO):
GTTc = VHaa(user=YKHO.user, title='bla')
eowF = VHaa(user=YKHO.user, title='blaaaa')
gGwe = VHaa(user=YKHO.user, title='blaaaaaaaa')
KZtG = wm3X(user=YKHO.user, name='bom')
ciPx = wm3X(user=YKHO.user, name='be5')
GTTc.ingredients.add(KZtG)
eowF.ingredients.add(ciPx)
Ylbp ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XL_F(YKHO):\n pass",
"def PqZM(YKHO):\n pass",
"def f1hb(YKHO):\n KZtG = jRmL(user=YKHO.user, name='Prawns')\n ciPx = jRmL(user=YKHO.user, name='Garlic')\n pB3N = {'title': 'Avocado lime cheesecake', 'time_minutes': 20, 'price': 500.0, 'currency': 'NGN', 'ingredients': [KZtG.id, ciPx.id]}\n ... | [
"0.8336177",
"0.78261787",
"0.77616054",
"0.774864",
"0.76189923",
"0.7600667",
"0.75203025",
"0.744761",
"0.7295739",
"0.7280468",
"0.72636646",
"0.7255317",
"0.71768695",
"0.71739113",
"0.7104669",
"0.708287",
"0.70755357",
"0.7046724",
"0.70242774",
"0.69891816",
"0.694636... | 0.73577106 | 8 |
Computes the precision for the specified values of k | def vjyh(hlel, pan_, hz5a=(1,)):
Gq8e = max(hz5a)
Ep8u = pan_.size(0)
bGrB, nvEb = hlel.topk(Gq8e, 1, True, True)
nvEb = nvEb.t()
gXXc = nvEb.eq(pan_.view(1, -1).expand_as(nvEb))
Ylbp = []
for G1Hx in hz5a:
R2Dg = gXXc[:G1Hx].view(-1).float().sum(0, keepdim=True)
Ylbp.append(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rhd_(_ger, nvEb, G1Hx):\n G1Hx = min(len(nvEb), G1Hx)\n OCOs = min(len(_ger), G1Hx)\n return sum([int(nvEb[YRbF] in _ger) for YRbF in range(G1Hx)]) / OCOs",
"def sEak(Mkmy, G1Hx):\n assert G1Hx >= 1\n Mkmy = oyIN.asarray(Mkmy)[:G1Hx] != 0\n if Mkmy.size != G1Hx:\n raise ValueError('R... | [
"0.76427615",
"0.74189496",
"0.7418079",
"0.72710466",
"0.72456723",
"0.72446615",
"0.7237539",
"0.72213703",
"0.7210107",
"0.7058935",
"0.6852219",
"0.6786084",
"0.67836976",
"0.6768417",
"0.67273885",
"0.67181736",
"0.67181736",
"0.67181736",
"0.67181736",
"0.67181736",
"0.... | 0.0 | -1 |
Return a string representation of this stack | def wHJl(YKHO):
return 'Stack({})'.format(YKHO.length()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wHJl(YKHO):\n return str(YKHO.stack)",
"def wHJl(YKHO):\n return str(YKHO._stack_items)",
"def zAg0(YKHO):\n cFuJ = 'Stack: <- '\n if YKHO.size <= 3:\n for wEf2 in YKHO.data:\n cFuJ = cFuJ + str(wEf2) + ' '\n else:\n for YRbF in range(3):\n cFuJ = cFuJ + s... | [
"0.88021517",
"0.8512891",
"0.8345638",
"0.83416456",
"0.83416456",
"0.83317596",
"0.82302666",
"0.8212493",
"0.81768715",
"0.80605805",
"0.7728859",
"0.7728859",
"0.7728859",
"0.7728859",
"0.75519186",
"0.7246458",
"0.7197881",
"0.7185586",
"0.71225804",
"0.7104178",
"0.7060... | 0.79534423 | 10 |
Return the number of items in this stack | def u54L(YKHO):
return YKHO.linked_list.length() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zNig(YKHO):\n if YKHO.is_empty():\n return 0\n else:\n return YKHO.num_items",
"def zNig(YKHO):\n return YKHO.N",
"def zNig(YKHO):\n return len(YKHO._stack_items)",
"def ogsx(YKHO):\n return len(YKHO.items)",
"def ogsx(YKHO):\n return len(YKHO.items)",
"def ogsx(YKHO):... | [
"0.8939227",
"0.8611404",
"0.85516477",
"0.82096124",
"0.82096124",
"0.81896573",
"0.80963135",
"0.8073885",
"0.8064417",
"0.80576104",
"0.7967561",
"0.7967561",
"0.78993255",
"0.78804374",
"0.7823916",
"0.77923346",
"0.7788647",
"0.7575975",
"0.75706893",
"0.7564803",
"0.755... | 0.0 | -1 |
Return the top item on this stack without removing it, or None if this stack is empty | def T7C_(YKHO):
if YKHO.is_empty():
return None
return YKHO.linked_list.head.data | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tlxW(YKHO):\n try:\n if YKHO.size() > 0:\n return YKHO.items[len(YKHO.items) - 1]\n else:\n raise IndexError('Cannot get top item, stack is empty.')\n except IndexError as err:\n print(XObx)\n raise",
"def tlxW(YKHO):\n if YKHO.is_empty:\n ret... | [
"0.8428943",
"0.83861",
"0.83731574",
"0.83613783",
"0.8317286",
"0.8236488",
"0.81668663",
"0.8126783",
"0.8065668",
"0.8062606",
"0.8062606",
"0.80485976",
"0.8035517",
"0.80332375",
"0.8030455",
"0.80003124",
"0.7992426",
"0.79613566",
"0.7948055",
"0.7858303",
"0.7849597"... | 0.0 | -1 |
Return the top item and remove it from this stack, or raise ValueError if this stack is empty | def BEuN(YKHO):
if YKHO.is_empty():
raise ValueError
ZfUD = YKHO.linked_list.head
YKHO.linked_list.head = ZfUD.next
ZfUD.next = None
YKHO.linked_list.node_count -= 1
return ZfUD.data | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BEuN(YKHO):\n try:\n if YKHO.size() > 0:\n tlxW = YKHO.top()\n YKHO.items.pop()\n return tlxW\n else:\n raise IndexError('Cannot pop item, stack is empty.')\n except IndexError as err:\n print(XObx)\n raise",
"def BEuN(YKHO):\n ... | [
"0.8317962",
"0.8118133",
"0.79350066",
"0.7909736",
"0.7878401",
"0.7877539",
"0.7830187",
"0.7814436",
"0.77917266",
"0.7735623",
"0.77264434",
"0.76868576",
"0.76760757",
"0.76719135",
"0.76673764",
"0.76625746",
"0.7597333",
"0.7593962",
"0.7572603",
"0.75130045",
"0.7468... | 0.0 | -1 |
Evaluate the state of the network. | def robq(VKhi, YPaw, eVVj, RFg8, OPAs, mWFP):
ee9X = Hy7s.path.join(VKhi['flags'].out_dir, 'predictions', mWFP)
dxS6 = 0
if RFg8.batch_idx.empty():
RFg8.reset()
for YRbF in range(RFg8.num_batch):
g4y1 = RFg8.get_minibatch()
c1sR = g4y1[0].size()[0]
wfsl = 1
vilq =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b7La(YKHO, QTBn):\n veV6",
"def b7La(YKHO):\n for pKvt in YKHO.inStates:\n if pKvt.getState() == 1:\n return 1\n return 0",
"def b7La(YKHO):\n for pKvt in YKHO.inStates:\n if pKvt.getState() == 0:\n return 0\n return 1",
"def b7La(YKHO):\n if YKHO.inS... | [
"0.74112093",
"0.70588297",
"0.6899987",
"0.68873715",
"0.6779742",
"0.6657663",
"0.6569626",
"0.6552569",
"0.6487224",
"0.64455",
"0.6415692",
"0.6404486",
"0.6403002",
"0.63851297",
"0.6338195",
"0.6336563",
"0.6336563",
"0.629135",
"0.62471503",
"0.62129676",
"0.6190847",
... | 0.0 | -1 |
1hot encodes a tensor | def fKLU(LVAh, jTqs):
return oyIN.eye(jTqs, dtype='uint8')[LVAh] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zGX0(WKvO):\n hlel = oyIN.zeros((len(WKvO), 10))\n for YRbF, r845 in enumerate(WKvO):\n hlel[YRbF, r845] = 1\n return hlel",
"def zGX0(YKHO, ezWE, OR2u):\n KLLm = oyIN.zeros((oyIN.multiply(*ezWE.shape), OR2u), dtype=oyIN.float32)\n KLLm[oyIN.arange(KLLm.shape[0]), ezWE.flatten()] = 1.0\... | [
"0.82578593",
"0.8061468",
"0.80140257",
"0.7917851",
"0.7914897",
"0.7883416",
"0.78429884",
"0.78089696",
"0.7765784",
"0.77376443",
"0.77376443",
"0.7733915",
"0.7728651",
"0.77133274",
"0.7686273",
"0.76797515",
"0.75851345",
"0.7560708",
"0.75560004",
"0.75353223",
"0.75... | 0.0 | -1 |
combine unsigned ints read from a bit stream into one unsigned number, reading data as bigendian | def ZAIo(nPrm):
jth9 = nPrm[:]
jth9.reverse()
return sum((WKvO << exwG * 8 for exwG, WKvO in enumerate(jth9))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FyfW(wOb_, zNig):\n BWXx = 0\n for YRbF in Ni9Y(0, zNig):\n YB8B = ord(wOb_.read(1))\n BWXx = BWXx << 8 | YB8B\n return BWXx",
"def vxWj(nPrm: bytes) -> AzJI[int, int]:\n DkWr = 0\n Aofo = 0\n exwG = 0\n for Fg_i in nPrm:\n exwG += 1\n Aofo |= (Fg_i & 127) << ... | [
"0.6928272",
"0.6872669",
"0.6872669",
"0.66999763",
"0.6667149",
"0.6208907",
"0.62032974",
"0.61897427",
"0.61488444",
"0.60985625",
"0.60595274",
"0.6054974",
"0.60500926",
"0.6031135",
"0.5993187",
"0.59668046",
"0.5945269",
"0.5929245",
"0.590426",
"0.5901376",
"0.589111... | 0.68466026 | 3 |
Given a node index, return the list of indices of nodes from which hashes must be drawn. If first or last is specified, eliminate any node indices outside of that range. | def c7pe(YKHO, d6pt, cntZ=None, XVAW=None):
return sorted([d6pt + z1Rg for z1Rg in YKHO.soffsets[d6pt % YKHO.p] if (cntZ is None or d6pt + z1Rg >= cntZ) and (XVAW is None or d6pt + z1Rg <= XVAW)]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def r3r7(YKHO):\n moMn = wk71(YKHO.nodes.keys(), key=lambda ZfUD, Z9rn=UHFx(): ZfUD - next(Z9rn))\n ycBG = [list(Oa1e) for G1Hx, Oa1e in moMn]\n return '+'.join(('{}-{}'.format(WKvO[0], WKvO[-1]) for WKvO in ycBG))",
"def bdGm(wc14, LXTO, vOko=3, a6eO=[]):\n X17R = oyIN.max([0, LXTO + vOko - len(wc14... | [
"0.56695485",
"0.56025463",
"0.5569894",
"0.5530438",
"0.55079234",
"0.54982793",
"0.547392",
"0.5442931",
"0.54056287",
"0.54014844",
"0.53910404",
"0.5367651",
"0.53653526",
"0.53443533",
"0.5342611",
"0.53324443",
"0.5325862",
"0.5303529",
"0.5294532",
"0.5265312",
"0.5238... | 0.5767544 | 0 |
Given a node index, return the list of indices of nodes into which its hash must be placed. If first or last is specified, eliminate any node indices outside of that range. | def U2Ur(YKHO, d6pt, cntZ=None, XVAW=None):
return [d6pt + z1Rg for z1Rg in YKHO.doffsets[d6pt % YKHO.p] if (cntZ is None or d6pt + z1Rg >= cntZ) and (XVAW is None or d6pt + z1Rg <= XVAW)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H1KS(d6pt):\n _0VL = set()\n d6pt += 1\n _0VL.add(d6pt - 1)\n _AKB = d6pt & d6pt - 1\n d6pt -= 1\n while d6pt != _AKB:\n _0VL.add(d6pt - 1)\n d6pt &= d6pt - 1\n return _0VL",
"def c7pe(YKHO, d6pt, cntZ=None, XVAW=None):\n return sorted([d6pt + z1Rg for z1Rg in YKHO.soffs... | [
"0.57507855",
"0.5680255",
"0.55556613",
"0.55077046",
"0.54741836",
"0.5451544",
"0.54514635",
"0.543012",
"0.5406862",
"0.5403836",
"0.53645164",
"0.5354016",
"0.5353449",
"0.5322745",
"0.53200257",
"0.53136533",
"0.52859485",
"0.5284067",
"0.5275993",
"0.5258216",
"0.52121... | 0.5433693 | 7 |
Sample an implicit function over a structured point set. Uses ``vtk.vtkSampleFunction`` This method evaluates an implicit function and normals at each point in a ``vtk.vtkStructuredPoints``. The user can specify the sample dimensions and location in space to perform the sampling. To create closed surfaces (in conjuncti... | def coa0(m2Zb: _vtk.vtkImplicitFunction, X7zS: Sequence[float]=(-1.0, 1.0, -1.0, 1.0, -1.0, 1.0), tpio: Sequence[int]=(50, 50, 50), jprG: bool=False, nSMW: np.dtype=oyIN.double, yi7u: bool=False, nGpl: float=HwRy.float_info.max, YAIY: str='scalars', DZVR: str='normals', u0U7: bool=False):
Dncu = qU2L.vtkSampleFunct... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mvm2(YKHO, AU8u, cDK5=1):\n raise NotImplementedError('The sample method is not yet implemented.')",
"def mvm2(eHNT, *Fauy):\n if len(Fauy) == 1:\n return TSmV(eHNT, Fauy[0])\n elif len(Fauy) == 2:\n return m9Ac(eHNT, Fauy[0], Fauy[1])\n else:\n raise ValueError('Only 2d and ... | [
"0.566838",
"0.56506944",
"0.5361372",
"0.5212485",
"0.51781523",
"0.51290935",
"0.50389427",
"0.4963418",
"0.49593338",
"0.49545744",
"0.49289173",
"0.49129",
"0.49051726",
"0.48667166",
"0.48581916",
"0.48334667",
"0.48254326",
"0.48128986",
"0.47999626",
"0.4788792",
"0.47... | 0.6284732 | 0 |
Converts an infix expression to an equivalent postfix expression | def XtMr(n_L_):
"""Input argument: a string containing an infix expression where tokens are
space separated. Tokens are either operators + - * / ** << >> or numbers (integers or floats)
Returns a String containing a postfix expression """
if n_L_ is None:
raise ValueError
Noim = n_L_.spli... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XtMr(VN2L):\n eRdl = {'*': 2, '/': 2, '+': 1, '-': 1}\n IPme = S9Ut()\n hEAh = []\n Q4kH = VN2L.split()\n RUgX = {'*', '/', '+', '-'}\n for WKvO in Q4kH:\n if str.isdigit(WKvO):\n hEAh.append(WKvO)\n elif IPme.empty() or IPme.peek() == '(':\n IPme.push(WKvO... | [
"0.84862375",
"0.84411806",
"0.83714604",
"0.8317929",
"0.82398987",
"0.81870633",
"0.8186237",
"0.80231375",
"0.79577357",
"0.7864633",
"0.7835132",
"0.78280944",
"0.7824718",
"0.7773667",
"0.7717247",
"0.7704904",
"0.7704374",
"0.75154626",
"0.74926025",
"0.7488175",
"0.736... | 0.8037474 | 7 |
Converts a prefix expression to an equivalent postfix expression | def zxXc(n_L_):
"""Input argument: a string containing a prefix expression where tokens are
space separated. Tokens are either operators + - * / ** << >> or numbers (integers or floats)
Returns a String containing a postfix expression(tokens are space separated)"""
if n_L_ is None:
raise Value... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zxXc(n_L_: str) -> ImMB:\n \"\"\"Input argument: a string containing a prefix expression where tokens are \n space separated. Tokens are either operators + - * / ** << >> or numbers (integers or floats)\n Returns a String containing a postfix expression(tokens are space separated)\"\"\"\n E5BI = S... | [
"0.7910258",
"0.76971376",
"0.7632609",
"0.7532239",
"0.7315681",
"0.72970444",
"0.7143097",
"0.70798165",
"0.696402",
"0.6858957",
"0.68345267",
"0.6814766",
"0.6807553",
"0.67959464",
"0.67956793",
"0.6742072",
"0.67193323",
"0.6619255",
"0.65679264",
"0.65528035",
"0.64230... | 0.7671706 | 2 |
Return the configuration from `config` and `state`. If the extension's configuration has a value other than "auto" (which is translated into the class `Recollection`), return this value, otherwise the saved value from the state variable. | def wLv7(YKHO, QTBn, Z7L0, MTKo):
GPtr = YKHO.config.get(f'{Z7L0}.{MTKo}', QLjN)
if GPtr is QLjN:
KCHu = QTBn.get(Z7L0, {}).get(MTKo, None)
else:
KCHu = GPtr
bo34.debug('_get_config(%s, %s, %s) = %s', QTBn, Z7L0, MTKo, KCHu)
return KCHu | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tgzD() -> PSrQ:\n return k7py('config', PnaH)",
"def tgzD() -> h8nf[PSrQ]:\n return kNfJ.get()",
"def tgzD(GPtr):\n global _config\n return viqz",
"def tgzD():\n return viqz",
"def wLv7(YKHO):\n return YKHO.__config",
"def wLv7(YKHO):\n return YKHO.__config",
"def wLv7(YKHO):\n... | [
"0.7013418",
"0.6891643",
"0.6853772",
"0.6777893",
"0.6720835",
"0.6720835",
"0.6720835",
"0.6720835",
"0.6720835",
"0.6720835",
"0.6720835",
"0.6720835",
"0.6720835",
"0.6720835",
"0.6720835",
"0.6720835",
"0.6720835",
"0.6720835",
"0.6720835",
"0.6720835",
"0.6720835",
"... | 0.71906984 | 0 |
Write the state to a json file. | def SMf8(YKHO, QTBn, nUeQ):
try:
with open(nUeQ, 'w') as eHNT:
qQXR.dump(QTBn, eHNT)
except IOError as e:
bo34.error("Cannot open state file '%s' for writing: %s", nUeQ, tTpl)
except Exception as e:
bo34.error("Problem saving state to file '%s': %s", nUeQ, tTpl)
b... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iaXM(YKHO):\n with open('learning_player/states.json') as wM3v:\n wspz = qQXR.load(wM3v)\n wspz.append(YKHO.__dict__)\n with open('learning_player/states.json', 'w') as wM3v:\n qQXR.dump(wspz, wM3v)",
"def vxVA(YKHO):\n with open('stateFile.json', 'w') as OTQg:\n qQXR.dump(YK... | [
"0.8270986",
"0.7794114",
"0.77099705",
"0.7600188",
"0.7585349",
"0.75544494",
"0.7553102",
"0.74732256",
"0.74434435",
"0.741947",
"0.7328562",
"0.7327419",
"0.72887045",
"0.72612464",
"0.7229592",
"0.71862876",
"0.71855694",
"0.7161913",
"0.7161913",
"0.7161913",
"0.712077... | 0.86429155 | 0 |
Returns True or False indicating whether or not the specified target is busy. `target_id` is a target ID (or None for the first target) | def vpAl(YKHO, MCsb=0):
try:
pan_ = YKHO.target(target_id=MCsb)
except:
raise v7Zi()
return pan_['state'] == 'running' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PpvR(YKHO, MCsb=0):\n try:\n pan_ = YKHO.target(target_id=MCsb)\n except:\n return False\n return pan_['state'] != 'invalid'",
"def qo_B(YKHO, MCsb=0):\n try:\n pan_ = YKHO.target(target_id=MCsb)\n except Exception as e:\n RKD7.error('Exception checking if target ex... | [
"0.7083309",
"0.66177404",
"0.6520715",
"0.6164742",
"0.60301095",
"0.59567654",
"0.58135223",
"0.5720924",
"0.57065755",
"0.55763435",
"0.5504121",
"0.54620534",
"0.5459577",
"0.5459136",
"0.5457219",
"0.54071206",
"0.5406778",
"0.5355014",
"0.5302238",
"0.52814466",
"0.5275... | 0.86267734 | 0 |
CHECKING IF USER DETAILS ALREADY EXIST | def LXEA(YKHO):
YKHO.user.registration('Githeri', 'githeri.man@yahoo.com', 'iwantgitheri', 'iwantgitheri')
tO9_ = YKHO.user.registration('Githeri', 'githeri.man@yahoo.com', 'iwantgitheri', 'iwantgitheri')
YKHO.assertEqual(tO9_, 'Your Account Already Active. Proceed to login') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hgIh(YKHO):\n CBIr = mv1M.objects.create(username=YKHO.username)\n n5sN = djUr(None, YKHO.details, user=CBIr)\n YKHO.assertDictEqual(n5sN, {'is_new': False})",
"def b59n(Emd4):\n return mv1M.objects.count() > 0",
"def V7zm(YKHO, S57Z):\n try:\n YKHO.data[S57Z]\n except KeyError:\n ... | [
"0.7120176",
"0.70901453",
"0.7059865",
"0.68934196",
"0.68896997",
"0.6880093",
"0.6863692",
"0.68182296",
"0.6751712",
"0.67213714",
"0.6720498",
"0.67177105",
"0.6694013",
"0.66854155",
"0.6685036",
"0.6682257",
"0.66495514",
"0.6624711",
"0.66221464",
"0.65893036",
"0.658... | 0.6039411 | 87 |
Generate a random string of fixed length | def sGEl(YKHO):
return Hy7s.urandom(YKHO.messageSize) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YzjY(u54L: int):\n FLLz = vIwR.ascii_letters + vIwR.digits\n return ''.join(tuKI.choices(FLLz, k=u54L))",
"def e7Tf(u54L=6):\n exwG = int(u54L / 2 + 1)\n WKvO = MRxC.hexlify(Hy7s.urandom(exwG))\n KCHu = WKvO[:u54L]\n return KCHu.decode('utf-8')",
"def e7Tf(u54L):\n return ''.join((tuKI... | [
"0.8678726",
"0.85725635",
"0.8546959",
"0.852769",
"0.85201234",
"0.84315515",
"0.84307504",
"0.84138894",
"0.84099346",
"0.8388408",
"0.8344307",
"0.8342706",
"0.83389807",
"0.8332531",
"0.83217525",
"0.829651",
"0.829245",
"0.8281027",
"0.8280717",
"0.8279932",
"0.8263646"... | 0.0 | -1 |
Get a COE cluster by name or ID. | def XB8H(YKHO, Gjbv, KUnM=None):
return siXk._get_entity(YKHO, 'coe_cluster', Gjbv, KUnM) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iBC6(YKHO, c0yN, ekCf=''):\n print(f'>>>>>>{YKHO.project_id}')\n if ekCf == '':\n ekCf = YKHO.project_id\n return YKHO.get('{}/groups/{}/clusters/{}'.format(gsRm.A1.value, ekCf, c0yN))",
"def oT52(mWFP: str) -> PwH5:\n GikI = _JSP().environment\n return GikI.clusters[mWFP]",
"def GyOE... | [
"0.7207319",
"0.71878326",
"0.7160077",
"0.70927954",
"0.7061884",
"0.6977045",
"0.6878093",
"0.6857844",
"0.68132865",
"0.6691251",
"0.66535586",
"0.6591472",
"0.6578208",
"0.6529788",
"0.64571756",
"0.6396079",
"0.6396057",
"0.6388732",
"0.6335889",
"0.6332657",
"0.6322989"... | 0.77385813 | 0 |
Get details about the CA certificate for a cluster by name or ID. | def aQC2(YKHO, JvOq):
return YKHO.container_infrastructure_management.get_cluster_certificate(JvOq) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xeiv(JvOq: Optional[str]=None, VKhi: Optional[pulumi.InvokeOptions]=None) -> Dqmj:\n rYZf = dict()\n rYZf['clusterId'] = JvOq\n VKhi = qe4Y.InvokeOptions.merge(i5mz.get_invoke_opts_defaults(), VKhi)\n p5j3 = qe4Y.runtime.invoke('digitalocean:index/getDatabaseCa:getDatabaseCa', rYZf, opts=VKhi, typ=... | [
"0.66048604",
"0.6386321",
"0.63464445",
"0.6285547",
"0.6187846",
"0.6114005",
"0.6114005",
"0.5819813",
"0.5746102",
"0.5740798",
"0.57380414",
"0.5684526",
"0.5592041",
"0.55871445",
"0.5570815",
"0.5529668",
"0.5506295",
"0.55015206",
"0.54997844",
"0.54760474",
"0.547521... | 0.724365 | 0 |
Get a cluster template by name or ID. | def BHSN(YKHO, Gjbv, KUnM=None, aeup=False):
return siXk._get_entity(YKHO, 'cluster_template', Gjbv, filters=KUnM, detail=aeup) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ase2(YKHO, id: str) -> ZjMU.KubernetesClusterTemplate:\n raise UAju.UnsupportedOperationError(\"Operation not supported for provider '{}'\".format(YKHO.provider_name))",
"def rhtg(QpfX, id):\n dp9S = QpfX.getAdministrationService()\n qIUQ = dp9S.getCurrentEnterprise()\n return qIUQ.findTemplate(O... | [
"0.7409614",
"0.71715623",
"0.7106603",
"0.7072171",
"0.70463616",
"0.69070536",
"0.6860884",
"0.66583115",
"0.6598726",
"0.65511876",
"0.6513724",
"0.6478427",
"0.64676917",
"0.64584345",
"0.6451628",
"0.64360094",
"0.63890415",
"0.6380846",
"0.6341766",
"0.63381404",
"0.624... | 0.7906712 | 0 |
Iterates over a JSON to tranfsorm each element into a column. | def ITcw(lBGx):
rdlD = {}
for sjXb, BWXx in d1am(lBGx):
rdlD['.'.join(sjXb)] = BWXx if BWXx is not None else ''
return rdlD | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Q4mw(jQ3Z):\n AlVb = ['genres', 'production_companies', 'production_countries', 'cast', 'crew', 'spoken_languages', 'Keywords']\n arG8 = ['name', 'name', 'iso_3166_1', 'name', 'name', 'name', 'name']\n for AAHb, SQJw in zip(AlVb, arG8):\n jQ3Z[AAHb] = jQ3Z[AAHb].apply(nCqW)\n jQ3Z[AAHb] ... | [
"0.61111945",
"0.5891938",
"0.577148",
"0.5539794",
"0.5530381",
"0.5472374",
"0.5375547",
"0.5357542",
"0.52405936",
"0.5234833",
"0.5218989",
"0.5130315",
"0.5128122",
"0.5116927",
"0.51161134",
"0.51108575",
"0.5097938",
"0.50966936",
"0.5023819",
"0.5005069",
"0.4988093",... | 0.5146833 | 11 |
Gets the RNN Cell | def bwbz(YKHO, wjbX, c3v3=1, xKmh=None):
JnVq = []
for YRbF in range(c3v3):
VmPb = Vq3K.rnn.LSTMCell(num_units=wjbX, state_is_tuple=True)
if xKmh is not None:
VmPb = Vq3K.rnn.DropoutWrapper(VmPb, input_keep_prob=xKmh, output_keep_prob=xKmh)
JnVq.append(VmPb)
JnVq = Vq3K.rnn.M... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lcv5(YKHO) -> x1iM[RsfQ.rnn.BaseRNNCell]:\n return YKHO.forward_rnn.get_rnn_cells() + YKHO.reverse_rnn.get_rnn_cells()",
"def lcv5(YKHO):\n return [YKHO.rnn]",
"def VmPb(YKHO):\n return YKHO._cell",
"def mXXp(YKHO) -> _rUw:\n return (u79k[YKHO.rnn_cell_str](YKHO.rnn_size), u79k[YKHO.rnn_cell_... | [
"0.7071522",
"0.7056599",
"0.66891766",
"0.6675554",
"0.65457195",
"0.64880717",
"0.62699527",
"0.62504494",
"0.62408656",
"0.62313527",
"0.6226283",
"0.6213678",
"0.6135361",
"0.61141884",
"0.6108216",
"0.60593724",
"0.60573167",
"0.60551786",
"0.6010514",
"0.600054",
"0.598... | 0.0 | -1 |
Save the current Moderator state to a checkpoint file. | def IRyE(YKHO, mWFP):
E3oo = qcWV.datetime.now(YKHO.time_zone).strftime('%Y-%m-%d_%H:%M:%S')
A7WJ = Hy7s.path.join(Hy7s.path.dirname(YKHO.path), 'backups')
V1C0 = Hy7s.path.join(A7WJ, '%s_%s.pickle' % (E3oo, mWFP))
t2lc.dump(YKHO, open(V1C0, 'wb')) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QLHb(YKHO):\n G91o = ITS7.strftime('%Y%m%d%H%M%S', ITS7.gmtime())\n JzyF = Hy7s.path.join(YKHO.saving_dir, 'checkpoint.' + G91o + '.pth.tar')\n fwLZ = Hy7s.path.join(YKHO.saving_dir, 'memory.' + G91o + '.pth.tar')\n QTBn = YKHO.getSavingState()\n _p7a = {'memory': YKHO.memory}\n ht2j.save(QTB... | [
"0.7800833",
"0.77669865",
"0.7756615",
"0.7656153",
"0.76019496",
"0.7557086",
"0.75027186",
"0.7448348",
"0.744359",
"0.7431431",
"0.7386233",
"0.7312102",
"0.7297267",
"0.7296062",
"0.72138",
"0.7208526",
"0.71802557",
"0.71801674",
"0.7167179",
"0.7150605",
"0.71342236",
... | 0.6787339 | 49 |
Return the subject to use for phaserelated announcements. | def ZH0W(YKHO):
return '%s: %s' % (YKHO.name, YKHO.phase) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mUtM(YKHO):\n return YKHO._subject",
"def U4ZT(YKHO):\n if 'subject' in YKHO._prop_dict:\n return YKHO._prop_dict['subject']\n else:\n return None",
"def U4ZT(YKHO):\n return YKHO._subject",
"def U4ZT(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'subject')",
"def U4ZT... | [
"0.7917484",
"0.7905421",
"0.784974",
"0.78295887",
"0.78191876",
"0.7738317",
"0.7706493",
"0.76699775",
"0.7619518",
"0.7619518",
"0.74976015",
"0.74263394",
"0.73006403",
"0.72648025",
"0.70124346",
"0.70124346",
"0.6999631",
"0.6942836",
"0.68542796",
"0.6685712",
"0.6386... | 0.6965679 | 17 |
Changes the draft message on the Telegram servers. The changes are reflected in this object. Changing only individual attributes like for example the ``reply_to_msg_id`` should be done by providing the current | def nB6B(YKHO, l5Ny, EJTo=None, gK1g=None, MMe4=None):
Aofo = YKHO._client(O7UM(peer=YKHO._peer, message=l5Ny, no_webpage=EJTo, reply_to_msg_id=gK1g, entities=MMe4))
if Aofo:
YKHO.text = l5Ny
YKHO.no_webpage = EJTo
YKHO.reply_to_msg_id = gK1g
YKHO.entities = MMe4
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def set_message(YKHO, l5Ny=None, rIVH=0, IKVq=(), ZHGL=None):\n if l5Ny is None:\n l5Ny = YKHO._text\n if rIVH == 0:\n rIVH = YKHO.reply_to_msg_id\n if ZHGL is None:\n ZHGL = YKHO.link_preview\n Novh, MMe4 = await YKHO._client._parse_message_text(l5Ny, IKVq)\n Aofo = await... | [
"0.65542597",
"0.632359",
"0.60106605",
"0.5982928",
"0.58589375",
"0.5721104",
"0.5651137",
"0.56021875",
"0.5580924",
"0.55722326",
"0.5456161",
"0.5437725",
"0.5418407",
"0.5398267",
"0.5398267",
"0.5398267",
"0.5398267",
"0.5398267",
"0.5398267",
"0.5398267",
"0.5398267",... | 0.6506645 | 1 |
Return the minimum pairwise score in this entity. | def ilgt(YKHO, LEXu):
return float(LEXu['pw_bb'][0]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AjsF(YKHO):\n return min(YKHO._extract_set('score') or [0])",
"def min(YKHO):\n return min(YKHO)",
"def XcNI(YKHO):\n return YKHO.min",
"def XcNI(YKHO):\n return YKHO.min",
"def FaMX(YKHO):\n return YKHO.X",
"def min(YKHO):\n SeDd = YKHO.data[0]\n for YRbF in range(len(YKHO.data)... | [
"0.7597172",
"0.7159401",
"0.7099284",
"0.7099284",
"0.70661646",
"0.70521104",
"0.7031809",
"0.69758976",
"0.69574755",
"0.6907929",
"0.68334943",
"0.6823418",
"0.68157876",
"0.68157876",
"0.681005",
"0.67746747",
"0.67746747",
"0.67439175",
"0.6730132",
"0.67173404",
"0.665... | 0.0 | -1 |