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 |
|---|---|---|---|---|---|---|
Returns if the word is in the trie. | def TgwQ(YKHO, GIN8):
a1PO = YKHO.trie
for yzQ0 in GIN8:
if yzQ0 not in a1PO:
return False
a1PO = a1PO[yzQ0]
if '#' in a1PO:
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DUe0(YKHO, ZOCz, GIN8):\n TXkI = ZOCz\n for sZqf in GIN8:\n if sZqf in TXkI:\n TXkI = TXkI[sZqf]\n else:\n return False\n else:\n if '_end_' in TXkI:\n return TXkI['_end_']\n else:\n return False\n return False",
"def Gtm1(ZO... | [
"0.838632",
"0.8150416",
"0.8123471",
"0.7856802",
"0.7830664",
"0.77935004",
"0.7792806",
"0.77642965",
"0.7753436",
"0.7747724",
"0.76816714",
"0.7677101",
"0.7664614",
"0.76506114",
"0.76338875",
"0.7628353",
"0.76114196",
"0.7577657",
"0.75695884",
"0.756079",
"0.75591743... | 0.7711298 | 10 |
Function that transforms a solr field that contains a list of json strings to a list of json structures | def WKYA(CqJY):
def dHKV(nMY2):
try:
return qQXR.loads(nMY2)
except:
return None
S06t = []
for LihS in CqJY:
TLbt = dHKV(LihS)
if TLbt:
S06t.append(TLbt)
return S06t | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xVJB(Jyyj: str) -> YrBT[[cuzp], None]:\n\n def eHNT(nPrm: Dict):\n \"\"\"\n Serialize specific field of type list\n \"\"\"\n if Jyyj in nPrm and isinstance(nPrm[Jyyj], x1iM):\n nPrm[Jyyj] = ','.join(nPrm[Jyyj])\n return eHNT",
"def mnw8(Lwd_):\n wLKY = []\n ... | [
"0.64381987",
"0.62557435",
"0.61635345",
"0.61536425",
"0.5976463",
"0.5962609",
"0.5956025",
"0.59310883",
"0.59202725",
"0.58949643",
"0.5885939",
"0.5884409",
"0.5749895",
"0.5713255",
"0.5683876",
"0.5677532",
"0.56477576",
"0.5637332",
"0.5634476",
"0.5600226",
"0.55734... | 0.73205143 | 0 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, q9bV):
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.8455985",
"0.83913255",
"0.81440157",
"0.8140831",
"0.8132328",
"0.80937284",
"0.809181",
"0.809181",
"0.809181",
"0.808509",
"0.808509",
"0.8076134",
"0.8076134",
"0.8065528"
] | 0.0 | -1 |
Returns the AuGPT model predictor, which contains LM model and tokenizer. | def Dqn7(C3ST='jkulhanek/augpt-mw-21', **B2fa):
b0j5 = wxaK.AutoTokenizer.from_pretrained(C3ST)
C3ST = wxaK.AutoModelForCausalLM.from_pretrained(C3ST)
return P2hP(C3ST, b0j5) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def USyT():\n eHKs = Hy7s.path.dirname(Hy7s.path.realpath(xAKo))\n b0j5 = DUpL.from_pretrained(f'{eHKs}\\\\gpt2_model')\n C3ST = VYUv.from_pretrained(f'{eHKs}\\\\gpt2_model')\n return (b0j5, C3ST)",
"def DI14(C3ST='microsoft/DialoGPT-large'):\n print('Loading model...')\n b0j5 = IeEP.from_pretr... | [
"0.6759349",
"0.66765326",
"0.6455197",
"0.6225375",
"0.6194286",
"0.61759895",
"0.61232734",
"0.60461",
"0.59817815",
"0.5899068",
"0.5851181",
"0.57929033",
"0.5775301",
"0.57614267",
"0.57359207",
"0.5695058",
"0.5683716",
"0.56729454",
"0.56647766",
"0.5659558",
"0.564545... | 0.5982482 | 8 |
Simple function to load and preprocess the image. 1. Open the image. 2. Scale/crop it and convert it to a float tensor. 3. Convert it to a variable (all inputs to PyTorch models must be variables). 4. Add another dimension to the start of the Tensor (b/c VGG expects a batch). 5. Move the variable onto the GPU. | def DZ0a(Ux0P):
LNo8 = hnIv.open(Ux0P).convert('RGB')
aEZk = DWkG(LNo8).float()
JNdT = iQnE(aEZk).unsqueeze(0)
return JNdT.cuda() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hM8o(pmON, kvoN=512):\n eHNT = ZylS.io.read_file(pmON)\n VXjJ = ZylS.io.decode_image(eHNT)\n VXjJ = jbie(VXjJ, kvoN)\n VXjJ = ZylS.expand_dims(VXjJ, axis=0)\n VXjJ = tW2m(VXjJ)\n return VXjJ",
"def biH0(VXjJ):\n JBMS = oyIN.array([0.485, 0.456, 0.406])\n M1Jx = oyIN.array([0.229, 0.22... | [
"0.71873945",
"0.6961293",
"0.68740577",
"0.686752",
"0.6799345",
"0.66957086",
"0.6672154",
"0.6668275",
"0.6667348",
"0.6638327",
"0.6625549",
"0.66025895",
"0.6602191",
"0.65846986",
"0.654136",
"0.65309215",
"0.6510743",
"0.64756626",
"0.6421926",
"0.64092916",
"0.6402373... | 0.6826367 | 4 |
Randomly permute the weights in `model`, or the given `weights`. This is a fast approximation of reinitializing the weights of a model. Assumes weights are distributed independently of the dimensions of the weight tensors (i.e., the weights have the same distribution along each dimension). | def cHdr(C3ST, _mSQ=None):
if _mSQ is None:
_mSQ = C3ST.get_weights()
_mSQ = [oyIN.random.permutation(yzQ0.flat).reshape(yzQ0.shape) for yzQ0 in _mSQ]
C3ST.set_weights(_mSQ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cHdr(C3ST, l5me, _mSQ=None):\n if _mSQ is None:\n _mSQ = C3ST.get_weights()\n RZGf = [oyIN.random.permutation(yzQ0.flat).reshape(yzQ0.shape) for yzQ0 in _mSQ]\n if l5me >= 0:\n _mU6 = max(0, len(_mSQ) - l5me - 1)\n else:\n _mU6 = 0\n for YRbF in range(_mU6, len(_mSQ)):\n ... | [
"0.7632",
"0.6834256",
"0.6813003",
"0.6808451",
"0.6617744",
"0.6469677",
"0.64652056",
"0.6114547",
"0.6081098",
"0.6012558",
"0.5973017",
"0.5966088",
"0.5950465",
"0.5940939",
"0.5937892",
"0.5934777",
"0.5895517",
"0.5892362",
"0.58884794",
"0.5882523",
"0.5882523",
"0... | 0.8796842 | 1 |
Takes two Color objects and produce a sequence of colors that transition between them. `steps` specifies the number of intermediate steps in the sequence. | def vKDf(lZJ3, ouYU, paSp=20):
assert isinstance(lZJ3, HRmL), 'start_color must be a Color instance'
assert isinstance(ouYU, HRmL), 'end_color must be a Color instance'
zhMh, j93S, hQHm = lZJ3.hsv
WL4f, Nqp_, jlSq = ouYU.hsv
sFq7 = r4pS(zhMh, WL4f, paSp, wrap=True)
N1Ui = r4pS(j93S, Nqp_, paSp)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dVoA(F4JO, paSp=20, jsTm=False):\n if jsTm and F4JO[0] != F4JO[-1]:\n F4JO.append(F4JO[0])\n UlCL = [vKDf(jzdc, Fg_i, paSp) for jzdc, Fg_i in Zu14(F4JO)]\n eNCK = Hs6x.chain.from_iterable(UlCL)\n if jsTm:\n eNCK = Hs6x.cycle(eNCK)\n return eNCK",
"def qfpW(YPaw: int=10) -> AzJI[i... | [
"0.7236037",
"0.63220114",
"0.61116666",
"0.5987539",
"0.58997273",
"0.58377784",
"0.5765982",
"0.57563007",
"0.5755249",
"0.56606525",
"0.55821335",
"0.5575697",
"0.5468268",
"0.5446529",
"0.54129183",
"0.53538656",
"0.53100526",
"0.5303546",
"0.5292875",
"0.5291313",
"0.528... | 0.7997106 | 0 |
Takes a list of Colors and returns a sequence of Colors that transitions between them. `steps` indicates the number of intermediate steps between each color in the list. `continuous` will create an infinite sequence | def dVoA(F4JO, paSp=20, jsTm=False):
if jsTm and F4JO[0] != F4JO[-1]:
F4JO.append(F4JO[0])
UlCL = [vKDf(jzdc, Fg_i, paSp) for jzdc, Fg_i in Zu14(F4JO)]
eNCK = Hs6x.chain.from_iterable(UlCL)
if jsTm:
eNCK = Hs6x.cycle(eNCK)
return eNCK | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vKDf(lZJ3, ouYU, paSp=20):\n assert isinstance(lZJ3, HRmL), 'start_color must be a Color instance'\n assert isinstance(ouYU, HRmL), 'end_color must be a Color instance'\n zhMh, j93S, hQHm = lZJ3.hsv\n WL4f, Nqp_, jlSq = ouYU.hsv\n sFq7 = r4pS(zhMh, WL4f, paSp, wrap=True)\n N1Ui = r4pS(j93S, N... | [
"0.69105905",
"0.66802484",
"0.6625711",
"0.61339855",
"0.60287076",
"0.59593254",
"0.5950309",
"0.587943",
"0.58610004",
"0.5857731",
"0.58514804",
"0.58130306",
"0.5734",
"0.5723457",
"0.5698806",
"0.56783444",
"0.56493074",
"0.5592827",
"0.5572917",
"0.5555633",
"0.5522774... | 0.813339 | 0 |
Yield successive nsized chunks from l. | def eHxA(vC9B, exwG):
for YRbF in Ni9Y(0, len(vC9B), exwG):
yield vC9B[YRbF:YRbF + exwG] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xJ0H(YKHO, vC9B, exwG):\n for YRbF in range(0, len(vC9B) + 1, exwG):\n yield vC9B[YRbF:YRbF + exwG]",
"def eHxA(YKHO, vC9B, exwG):\n for YRbF in range(0, len(vC9B), exwG):\n yield vC9B[YRbF:YRbF + exwG]",
"def I7IE(vC9B, exwG):\n for YRbF in range(0, len(vC9B), exwG):\n yield ... | [
"0.8038813",
"0.79248375",
"0.7923423",
"0.7885103",
"0.78773195",
"0.7815877",
"0.77655786",
"0.77556044",
"0.77441615",
"0.7731815",
"0.77288336",
"0.772473",
"0.77028215",
"0.76889825",
"0.76889825",
"0.7664208",
"0.76570904",
"0.7655856",
"0.7655856",
"0.76458347",
"0.764... | 0.0 | -1 |
Tests whether ``AudioSettings.__eq__`` works as intended. | def MgSq():
xMux = 4
E0U9 = 40
_rWM = 12000
nURT = {'channels': xMux, 'frame_length': E0U9, 'sampling_rate': _rWM}
tqTM = hJ5d(**nURT)
Qg87.assert_eq(tqTM, tqTM)
Qg87.assert_ne(tqTM, object())
for vXX7, sjci in (('channels', 2), ('frame_length', 20), ('sampling_rate', 24000)):
qk... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WQFc():\n xMux = 4\n E0U9 = 40\n _rWM = 12000\n tqTM = hJ5d(channels=xMux, frame_length=E0U9, sampling_rate=_rWM)\n jth9 = tqTM.copy()\n iaTU(jth9)\n Qg87.assert_is_not(jth9, tqTM)\n Qg87.assert_eq(jth9, tqTM)",
"def xa14(YKHO, Elif):\n if not isinstance(Elif, nnDH):\n retur... | [
"0.69883984",
"0.69186705",
"0.68358237",
"0.6775484",
"0.6757193",
"0.6753262",
"0.6559032",
"0.6486143",
"0.648388",
"0.6416147",
"0.6381457",
"0.6356474",
"0.6346424",
"0.63412267",
"0.6313327",
"0.6304567",
"0.62422585",
"0.61889046",
"0.6173711",
"0.6172635",
"0.6171837"... | 0.7823222 | 0 |
Test if a symbol is equal with another symbol (otherwise False) | def xa14(YKHO, Elif):
if isinstance(Elif, wZLS):
return YKHO.arg == Elif.arg
else:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JvdK(YKHO, o61b):\n if o61b.type == YKHO.scanner.EQUALS:\n return True\n else:\n return False",
"def zJpu(YKHO, o61b: str) -> bool:\n return o61b in YKHO.other_symbols",
"def sBgx(YKHO, Elif, o61b=None):\n KCHu = YKHO.as_dummy()\n z1Rg = p2BC(Elif)\n z1Rg = z1Rg.as_dummy()\n... | [
"0.8255894",
"0.7394709",
"0.73108655",
"0.7149815",
"0.6845762",
"0.68003994",
"0.67906874",
"0.67824274",
"0.673265",
"0.6682025",
"0.66212356",
"0.6618462",
"0.661329",
"0.652981",
"0.64809054",
"0.6476306",
"0.64654344",
"0.6373625",
"0.63703084",
"0.6363597",
"0.6335484"... | 0.7573643 | 1 |
Test if symbol is not equal with another symbol (otherwise True) | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zJpu(YKHO, o61b: str) -> bool:\n return o61b in YKHO.other_symbols",
"def JvdK(YKHO, o61b):\n if o61b.type == YKHO.scanner.EQUALS:\n return True\n else:\n return False",
"def sBgx(YKHO, Elif, o61b=None):\n KCHu = YKHO.as_dummy()\n z1Rg = p2BC(Elif)\n z1Rg = z1Rg.as_dummy()\n... | [
"0.7536067",
"0.74781394",
"0.70828843",
"0.70083976",
"0.6819585",
"0.67788744",
"0.6518435",
"0.649739",
"0.63539404",
"0.63259697",
"0.63184035",
"0.62947404",
"0.62770534",
"0.62395",
"0.61919975",
"0.61903054",
"0.6189376",
"0.6159566",
"0.6155645",
"0.6129216",
"0.61277... | 0.0 | -1 |
Returns no more than top_k categories with score >= score_threshold. | def LI2u(mh5P, H42b, PWAq):
cCrA = yBka.output_tensor(mh5P, 0)
LeZt = [qZuN(YRbF, cCrA[YRbF]) for YRbF in oyIN.argpartition(cCrA, -H42b)[-H42b:] if cCrA[YRbF] >= PWAq]
return sorted(LeZt, key=seET.itemgetter(1), reverse=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z7qO(cCrA, Crrw, ZT17, _1xS=None):\n if _1xS is not None:\n or8S = Crrw == _1xS\n cCrA = cCrA[or8S]\n Crrw = Crrw[or8S]\n wnzo = cCrA.argsort()[:, ::-1]\n Gq8e = oyIN.max(ZT17)\n HRJ_ = wnzo[:, :Gq8e] == Crrw.reshape(-1, 1)\n return [HRJ_[:, :G1Hx].max(1).mean() for G1Hx in ... | [
"0.65683776",
"0.62328136",
"0.62297434",
"0.6200539",
"0.61923623",
"0.6137561",
"0.6137102",
"0.6121096",
"0.6080416",
"0.6029115",
"0.60269505",
"0.59393525",
"0.5919273",
"0.5909488",
"0.59044075",
"0.58476776",
"0.5842601",
"0.5837474",
"0.5832261",
"0.5831181",
"0.58108... | 0.72349757 | 0 |
Writes object to text file using JSON representation | def PF_N(UxL2, Ux0P):
import json
with open(Ux0P, mode='w', encoding='utf-8') as eHNT:
json.dump(UxL2, eHNT) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PF_N(UxL2, Ux0P):\n with open(Ux0P, 'w', encoding='utf-8') as nUeQ:\n return nUeQ.write(qQXR.dumps(UxL2))",
"def Lsrz(YKHO, Mu0k=None):\n HeoJ = qQXR.dumps(YKHO.json_dict, indent=2)\n YKHO._write_json_text(HeoJ, Mu0k)",
"def PF_N(UxL2, Ux0P):\n with open(Ux0P, mode='w', encoding='utf-8')... | [
"0.77355415",
"0.77298707",
"0.7697931",
"0.76955706",
"0.76808023",
"0.7680572",
"0.7657448",
"0.76373696",
"0.7618536",
"0.7616851",
"0.7555623",
"0.7555033",
"0.7539078",
"0.7530242",
"0.7521185",
"0.74853724",
"0.74656296",
"0.7445809",
"0.74308014",
"0.74090004",
"0.7400... | 0.76301706 | 8 |
Returns utility given current consumption c, and past consumption x. U(c,x) = ctilde^(1sigma) / (1sigma) where ctilde = c alphax | def P6bq(YKHO, Z9rn, WKvO):
Cwt5 = YKHO.alpha
WTkW = YKHO.sigma
hn3Y = Z9rn - Cwt5 * WKvO
P6bq = hn3Y ** (1 - WTkW) / (1 - WTkW)
return P6bq | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gjjV(WKvO):\n lGIZ = 1.808 * jaOV(WKvO) / oyIN.sqrt(1 + 3.4 * jaOV(WKvO) ** 2.0)\n RfWT = 1 + 2.21 * jaOV(WKvO) ** 2.0 + 0.347 * jaOV(WKvO) ** 4.0\n M78D = 1 + 1.353 * jaOV(WKvO) ** 2.0 + 0.217 * jaOV(WKvO) ** 4.0\n return lGIZ * (RfWT / M78D) * oyIN.exp(-WKvO)",
"def LKej(WKvO):\n yGTL, WTkW ... | [
"0.62759084",
"0.60861164",
"0.60861164",
"0.5968324",
"0.5968324",
"0.5792559",
"0.57181257",
"0.570191",
"0.5651614",
"0.56483763",
"0.5615429",
"0.5615429",
"0.5609766",
"0.5599409",
"0.559646",
"0.55552673",
"0.5550543",
"0.5448583",
"0.5444509",
"0.5439628",
"0.5437307",... | 0.7864753 | 0 |
Returns True if the given integer is prime, else returns False. | def T1qg(exwG):
for G1Hx in range(2, exwG // 2 + 1):
if exwG % G1Hx == 0:
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FBNJ(FGW3: int) -> bool:\n for YRbF in range(2, int(FGW3 ** 0.5) + 1):\n if FGW3 % YRbF == 0:\n return False\n return True",
"def T1qg(FGW3: int) -> bool:\n if FGW3 % 2 == 0 and FGW3 > 2:\n return False\n return all((FGW3 % YRbF for YRbF in range(3, int(epAf.sqrt(FGW3)) +... | [
"0.8038658",
"0.7988686",
"0.7968325",
"0.79229796",
"0.7856215",
"0.78533775",
"0.7842192",
"0.78359586",
"0.78282017",
"0.7826395",
"0.77984846",
"0.77974266",
"0.7797293",
"0.7772327",
"0.77642083",
"0.7753641",
"0.7743813",
"0.7736353",
"0.7735602",
"0.77333945",
"0.77252... | 0.72686976 | 94 |
Assert that the img src text includes `expected_icon` | def lBtA(yK6V, CNTj):
for bGrB in range(3):
try:
c7pe = H_W0(YKHO.browser, css=u'{} img'.format(Xjwp)).nth(yK6V).attrs('src')
if c7pe and CNTj in c7pe[0]:
break
else:
ITS7.sleep(0.25)
except _1LP as exc:
print(BQDi)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def u9Xy(YKHO):\n YKHO.assertIn(YKHO.chart.display.Url(500, 100, use_html_entities=True), YKHO.chart.display.Img(500, 100))",
"def oxM5(YKHO):\n YKHO.assertHtmlEqual(n3O2.sanitize_html(YKHO.img_dirty), YKHO.img_clean)",
"def Kdy8(YKHO):\n gbpR = YKHO.get_sample_badge()\n YKHO.assertIsInstance(gbpR.... | [
"0.6821386",
"0.6735483",
"0.6669602",
"0.6514723",
"0.6316432",
"0.6265062",
"0.6238048",
"0.6236478",
"0.6217731",
"0.61706877",
"0.6131812",
"0.61194175",
"0.6119129",
"0.6078543",
"0.6052527",
"0.59576833",
"0.5911472",
"0.5882063",
"0.58800626",
"0.5804811",
"0.5782033",... | 0.7566119 | 0 |
The weyl vector is a vector containing all 1s in the fundamental basis | def XRjm(fdMZ):
return oyIN.ones(fdMZ, dtype=BfDw.itype) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PKKQ(WKvO):\n return oyIN.real(0.5 * oyIN.exp(-WKvO ** 2) * oyIN.sqrt(oyIN.pi) * KCHu.erf(WKvO * 1j) / 1j)",
"def XcU5(YKHO):\n if not YKHO.isVaild():\n pass\n return YKHO.Wq() + 1.0 / YKHO.muy",
"def NNXy(YKHO, WKvO):\n return -0.01 * WKvO[0] + abs(WKvO[0]) ** (-2) * sum(WKvO[1:] ** 2)"... | [
"0.64581364",
"0.63982207",
"0.6192118",
"0.6179599",
"0.6151449",
"0.61006796",
"0.6050294",
"0.60136664",
"0.5999213",
"0.59231216",
"0.5903822",
"0.58445483",
"0.58268",
"0.58082765",
"0.5796093",
"0.5757551",
"0.57383114",
"0.5737845",
"0.5731534",
"0.57209164",
"0.567531... | 0.65236884 | 0 |
Construct basic block with BatchNorm placed after each Conv2d | def em1m(X4OD, S7he, exwG):
fhcK = [U78l.Conv2d(X4OD, S7he, 3, padding=1), U78l.BatchNorm2d(S7he), U78l.ReLU()]
for bGrB in range(exwG - 1):
fhcK.append(U78l.Conv2d(S7he, S7he, 3, padding=1))
fhcK.append(U78l.BatchNorm2d(S7he))
fhcK.append(U78l.ReLU())
fhcK.append(U78l.MaxPool2d(2))
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def t84O(YKHO, KUnM, pKvt):\n RRgV = GVKG()(pKvt)\n aw2B = MroH('relu')(RRgV)\n dFGd = yHwh(KUnM, (3, 3), padding='same', kernel_initializer=YKHO.initializer)(aw2B)\n bo8Q = GVKG()(dFGd)\n AIsx = MroH('relu')(bo8Q)\n sUaA = yHwh(KUnM, (3, 3), padding='same', kernel_initializer=YKHO.initializer)(A... | [
"0.7005193",
"0.6852977",
"0.6797528",
"0.6791658",
"0.67664474",
"0.6745288",
"0.6727106",
"0.67019325",
"0.67019325",
"0.6691173",
"0.6645372",
"0.6645372",
"0.6635812",
"0.6617005",
"0.6614844",
"0.6597502",
"0.6574351",
"0.6558273",
"0.6556485",
"0.6553913",
"0.6526681",
... | 0.63054866 | 40 |
Convert a coordinate pair as a dict, list, or string into a pair of floats, if valid | def CCsl(YEnM: Union[Dict, List, str]) -> h8nf[PXwx]:
if isinstance(YEnM, str):
return dLC1(*str(YEnM).split(','))
elif isinstance(YEnM, list):
return dLC1(*YEnM)
elif isinstance(YEnM, dict):
return dLC1(YEnM.get('latitude'), YEnM.get('longitude')) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dLC1(*hkxX: Any) -> h8nf[PXwx]:\n if len(hkxX) != 2:\n return None\n try:\n return (float(hkxX[0]), float(hkxX[1]))\n except (TypeError, ValueError):\n return None",
"def FZVq(YKHO, BHsk):\n if isinstance(BHsk, str):\n return tuple((float(G1Hx) for G1Hx in BHsk[1:-1].s... | [
"0.7503516",
"0.67971486",
"0.6710701",
"0.6608672",
"0.6429625",
"0.61481714",
"0.613582",
"0.6086079",
"0.6017212",
"0.5982789",
"0.57920194",
"0.5773352",
"0.5766427",
"0.5763868",
"0.575031",
"0.570269",
"0.565685",
"0.5655717",
"0.56172913",
"0.5616334",
"0.56117404",
... | 0.66962355 | 3 |
Convert an observation timestamp + timezone info to a datetime. This is needed because observed_on and created_at can be in in inconsistent (usersubmitted?) formats. | def Qqvl(E3oo: str, _hcX: str=None, gwzY: str=None, KcAi: bool=False) -> h8nf[qcWV]:
JRYC = ZO9n(E3oo, ignoretz=KcAi)
return B_7U(JRYC, _hcX, gwzY) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C93N(Aofo: ResponseObject) -> _Fxo:\n if 'created_at_details' not in Aofo and 'observed_on_string' not in Aofo:\n return Aofo\n rNYq = Aofo.copy()\n _hcX = rNYq.get('time_zone_offset', '')\n gwzY = rNYq.get('observed_time_zone')\n laTD = rNYq.get('created_at')\n if not isinstance(laTD,... | [
"0.68560004",
"0.6233129",
"0.6176059",
"0.61143947",
"0.6087907",
"0.6024568",
"0.6013965",
"0.6009073",
"0.59894705",
"0.58643377",
"0.5853586",
"0.58377314",
"0.5832934",
"0.58203834",
"0.58172596",
"0.58063626",
"0.57885844",
"0.57866323",
"0.5781766",
"0.57426697",
"0.57... | 0.6653968 | 1 |
Use timezone offset info to replace a datetime's tzinfo | def B_7U(eGVy: Optional[datetime], _hcX: str=None, gwzY: str=None) -> h8nf[qcWV]:
if not eGVy or not _hcX:
return eGVy
try:
vgXP = VLQ8(_hcX, gwzY)
return eGVy.replace(tzinfo=vgXP)
except (AttributeError, TypeError, ValueError) as e:
bo34.debug(f'Could not parse offset: {_hcX... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gZSo(JRYC: datetime, pner: tzinfo=wyKz) -> qcWV:\n if JRYC.tzinfo is not None:\n raise ValueError(f'{JRYC} is already tz-aware')\n return JRYC.replace(tzinfo=pner)",
"def JDm6(YKHO):\n Gmcj = YKHO.project.activity('Specify wheel diameter')\n isAP, f5W5 = (qcWV.strptime(Gmcj._json_data.get(... | [
"0.6932659",
"0.67412794",
"0.6699442",
"0.6698249",
"0.6631956",
"0.65610105",
"0.6535911",
"0.6492415",
"0.6481952",
"0.64773726",
"0.6441146",
"0.64119875",
"0.6383289",
"0.6325261",
"0.6281786",
"0.6262707",
"0.62264025",
"0.62166303",
"0.6184565",
"0.617991",
"0.6141541"... | 0.72351897 | 0 |
Convert a timezone offset string to a tzoffset object, accounting for some common variations in format | def VLQ8(_hcX: str, gwzY: str=None) -> PduB:
def t01U(l5Ny, tX49):
for y0cW in tX49:
if l5Ny.startswith(y0cW):
l5Ny = l5Ny[len(y0cW):]
return l5Ny
_hcX = t01U(_hcX, ['GMT', 'UTC']).strip()
pSDG = -1 if _hcX.startswith('-') else 1
_hcX = _hcX.lstrip('+-')
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def B_7U(eGVy: Optional[datetime], _hcX: str=None, gwzY: str=None) -> h8nf[qcWV]:\n if not eGVy or not _hcX:\n return eGVy\n try:\n vgXP = VLQ8(_hcX, gwzY)\n return eGVy.replace(tzinfo=vgXP)\n except (AttributeError, TypeError, ValueError) as e:\n bo34.debug(f'Could not parse o... | [
"0.7096494",
"0.64399076",
"0.6399419",
"0.63010496",
"0.6267487",
"0.62492144",
"0.607621",
"0.5992267",
"0.5965966",
"0.5930122",
"0.59247607",
"0.5790114",
"0.5731661",
"0.56819516",
"0.5625389",
"0.5552589",
"0.5538753",
"0.54366523",
"0.54063475",
"0.53523284",
"0.532987... | 0.8222087 | 0 |
This function is to create chrome profile | def JKwB(YKHO):
G9jH.info('# Setting up chrome profile.')
VBaM = '../drivers/chromedriver'
return VBaM | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XM26(YKHO):\n if YKHO.profile:\n return\n from soc.modules.gsoc.models.profile import GSoCProfile\n CBIr = YKHO.createUser()\n C9U5 = {'link_id': CBIr.link_id, 'student_info': None, 'user': CBIr, 'parent': CBIr, 'scope': YKHO.program, 'status': 'active'}\n YKHO.profile = M3S1.seed(GSoCPro... | [
"0.65296704",
"0.64933026",
"0.6103833",
"0.60583395",
"0.60577434",
"0.6051794",
"0.602843",
"0.5999928",
"0.5888977",
"0.58744717",
"0.58545357",
"0.58379817",
"0.57727796",
"0.5760307",
"0.5746025",
"0.5692177",
"0.56866723",
"0.56866723",
"0.5685516",
"0.5657416",
"0.5644... | 0.7043359 | 0 |
This function is to create chrome profile | def JKwB(YKHO):
G9jH.info('# Setting up chrome profile.')
VBaM = '../drivers/chromedriver'
return VBaM | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XM26(YKHO):\n if YKHO.profile:\n return\n from soc.modules.gsoc.models.profile import GSoCProfile\n CBIr = YKHO.createUser()\n C9U5 = {'link_id': CBIr.link_id, 'student_info': None, 'user': CBIr, 'parent': CBIr, 'scope': YKHO.program, 'status': 'active'}\n YKHO.profile = M3S1.seed(GSoCPro... | [
"0.65296704",
"0.64933026",
"0.6103833",
"0.60583395",
"0.60577434",
"0.6051794",
"0.602843",
"0.5999928",
"0.5888977",
"0.58744717",
"0.58545357",
"0.58379817",
"0.57727796",
"0.5760307",
"0.5746025",
"0.5692177",
"0.56866723",
"0.56866723",
"0.5685516",
"0.5657416",
"0.5644... | 0.7043359 | 1 |
r""" Method that removes the current `self._variance_function()` from the `Variance` button of the widget and sets ``self._variance_function = None``. | def oekO(YKHO):
YKHO.plot_button.on_click(YKHO._variance_function, remove=True)
YKHO._variance_function = None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UaDV(YKHO, Xp_3):\n YKHO._variance_function = Xp_3\n if YKHO._variance_function is not None:\n YKHO.plot_button.on_click(YKHO._variance_function)",
"def PvOa(YKHO, Xp_3):\n YKHO.remove_variance_function()\n YKHO.add_variance_function(Xp_3)",
"def WJLi(YKHO, m2Zb):\n YKHO._sig_value_ch... | [
"0.65239966",
"0.61969256",
"0.5810978",
"0.56719714",
"0.55658185",
"0.5529933",
"0.54551554",
"0.5417973",
"0.54013133",
"0.53199416",
"0.5249609",
"0.5244662",
"0.5212431",
"0.5205357",
"0.51922506",
"0.5174987",
"0.5168812",
"0.5165536",
"0.5147685",
"0.5137228",
"0.51286... | 0.90081996 | 0 |
The identity block is the block that has no conv layer at shortcut. Arguments | def aP6R(FRUf, Ot1W, KUnM, EtM5, XkN1):
DZWo, MXwb, wMAF = KUnM
if nMvt.image_data_format() == 'channels_last':
z5f9 = 3
else:
z5f9 = 1
RmTP = 'res' + str(EtM5) + XkN1 + '_branch'
lPXw = 'bn' + str(EtM5) + XkN1 + '_branch'
WKvO = yHwh(DZWo, (1, 1), name=RmTP + '2a')(FRUf)
WKv... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aP6R(YKHO, FRUf, KUnM, YDYE, EtM5, XkN1, AkBB=True):\n RmTP = 'res' + str(EtM5) + XkN1 + '_branch'\n uFbb = 'batch_norm' + str(EtM5) + XkN1 + '_branch'\n T9jN = FRUf\n WKvO = None\n if AkBB:\n WKvO = GVKG(axis=3, name=uFbb + '_1')(FRUf)\n WKvO = MroH(YDYE)(WKvO)\n else:\n ... | [
"0.71272004",
"0.7022438",
"0.6910338",
"0.68836653",
"0.68505627",
"0.6847176",
"0.68221945",
"0.6821999",
"0.680346",
"0.6799615",
"0.67849326",
"0.67714536",
"0.67158884",
"0.67146987",
"0.67137283",
"0.6664201",
"0.6624224",
"0.66078824",
"0.65984523",
"0.65485924",
"0.65... | 0.662218 | 18 |
conv_block is the block that has a conv layer at shortcut Arguments | def mQG_(FRUf, Ot1W, KUnM, EtM5, XkN1, FEri=(2, 2)):
DZWo, MXwb, wMAF = KUnM
if nMvt.image_data_format() == 'channels_last':
z5f9 = 3
else:
z5f9 = 1
RmTP = 'res' + str(EtM5) + XkN1 + '_branch'
lPXw = 'bn' + str(EtM5) + XkN1 + '_branch'
WKvO = yHwh(DZWo, (1, 1), strides=FEri, name... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mQG_(YKHO, DVMO, UU6M, b27A):\n return YKHO.add_layer(mQG_, DVMO, UU6M, b27A)",
"def mQG_(input, KUnM, JT9N=JT9N):\n mQG_ = ZylS.layers.conv2d(inputs=input, filters=KUnM, kernel_size=3, padding='SAME', activation=ZylS.nn.relu)\n return mQG_",
"def mQG_(FRUf, Ot1W, KUnM, EtM5, yetk, FEri=(2, 2), wH... | [
"0.75353014",
"0.74855703",
"0.73647773",
"0.72222644",
"0.7209214",
"0.720638",
"0.7202829",
"0.7185739",
"0.71778566",
"0.7174462",
"0.71601367",
"0.71582484",
"0.7157478",
"0.71517885",
"0.7130951",
"0.71057576",
"0.70994836",
"0.707301",
"0.70585597",
"0.7031059",
"0.7030... | 0.6917366 | 28 |
Return a numeric current date in the format 00000000 | def H2lb(YKHO):
Ot4E, XMyW = YKHO.setup_datetime()
qn2E = XMyW.astimezone(Ot4E)
return qn2E.strftime('%d-%m-%Y') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DibD():\n return qcWV.today().strftime('%c')",
"def slWZ():\n return qcWV.now().strftime('%c')",
"def m6Z7(FMLJ='%Y-%m-%d'):\n return qcWV.datetime.now().strftime(FMLJ)",
"def wzkt():\n wzkt = qcWV.datetime.now()\n return '%04d-%02d-%02d %02d:%02d:%02d.%03d' % (wzkt.year, wzkt.month, wzkt.... | [
"0.73005515",
"0.7299388",
"0.7048469",
"0.7020861",
"0.69550645",
"0.68801075",
"0.68768424",
"0.6857194",
"0.68463063",
"0.6827874",
"0.6799633",
"0.67995447",
"0.67883986",
"0.6739792",
"0.67257446",
"0.6699756",
"0.6689578",
"0.66776115",
"0.66617775",
"0.65979445",
"0.65... | 0.6613628 | 19 |
Create a new empty Priority Queue. | def FIMM(YKHO):
YKHO.data = Hoio() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hWEK():\n return g5js(0, None, None)",
"def Rdbh():\n from src.priorityq import PriorityQueue\n Rdbh = PriorityQueue()\n return Rdbh",
"def WPv_():\n from src.priorityq import PriorityQueue\n Rdbh = PriorityQueue()\n Rdbh.insert(15, 5)\n Rdbh.insert(12, 3)\n Rdbh.insert(11, 1)\n ... | [
"0.7893713",
"0.74452215",
"0.71636957",
"0.7081834",
"0.7081834",
"0.6581613",
"0.6313973",
"0.63086706",
"0.6265996",
"0.6179255",
"0.61486804",
"0.6126521",
"0.60874456",
"0.6058897",
"0.60504574",
"0.6046229",
"0.60360074",
"0.6026002",
"0.5990476",
"0.5980345",
"0.597111... | 0.0 | -1 |
Return the number of items in the priority queue. | def szAg(YKHO):
return len(YKHO.data) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zNig(YKHO):\n return len(YKHO._queue_items)",
"def yAGA(YKHO):\n with YKHO.mutex:\n return len(YKHO.queues)",
"def OGwl(YKHO):\n return YKHO.num_items",
"def zNig(YKHO):\n if YKHO.is_empty():\n return 0\n else:\n return YKHO.num_items",
"def zNig(YKHO):\n return l... | [
"0.73094535",
"0.7214424",
"0.71406925",
"0.7130484",
"0.7051237",
"0.7051237",
"0.7051237",
"0.7051237",
"0.7050724",
"0.7050724",
"0.70315284",
"0.70315284",
"0.70139974",
"0.6985575",
"0.6979711",
"0.69724464",
"0.6955107",
"0.6938039",
"0.6901929",
"0.681586",
"0.6785586"... | 0.0 | -1 |
Return True if the priority queue is empty. | def FBfn(YKHO):
return len(YKHO) == 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FBfn(YKHO):\n return len(YKHO.priority_queue) == 0",
"def FBfn(YKHO):\n return len(YKHO.the_queue) == 0",
"def FBfn(YKHO):\n return len(YKHO.queue) == 0",
"def FBfn(YKHO):\n return len(YKHO.queue) == 0",
"def FBfn(YKHO):\n return YKHO.queue == []",
"def FBfn(YKHO):\n return len(YKHO... | [
"0.9179846",
"0.8469489",
"0.8437107",
"0.8437107",
"0.8436066",
"0.838734",
"0.836409",
"0.8344005",
"0.83305556",
"0.83305556",
"0.83042455",
"0.83034027",
"0.82889843",
"0.82803255",
"0.8267934",
"0.8259419",
"0.82293385",
"0.8219118",
"0.82072806",
"0.8198649",
"0.8182699... | 0.0 | -1 |
Initialize a new FakeMrpUseCases. | def FIMM(YKHO, QTBn):
YKHO.state = QTBn | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tTS8(YKHO):\n YKHO.client = TMAJ.Client(client_class=NYXC.GetClientClass('edge', 'v1alpha1'))\n YKHO.client.Mock()\n YKHO.addCleanup(YKHO.client.Unmock)\n YKHO.messages = NYXC.GetMessagesModule('edge', 'v1alpha1')\n YKHO.edgeml_client = TMAJ.Client(client_class=NYXC.GetClientClass('edgeml', 'v1b... | [
"0.6148012",
"0.5930672",
"0.5930672",
"0.5930672",
"0.5930672",
"0.5930672",
"0.5930672",
"0.59255993",
"0.59248906",
"0.59047884",
"0.58638024",
"0.5851829",
"0.5819832",
"0.5815625",
"0.580785",
"0.57858104",
"0.57412267",
"0.5739049",
"0.5718347",
"0.57065594",
"0.5706341... | 0.0 | -1 |
Call to change what is currently plaing to video. | def YmUj(YKHO, HFSw, leAC, RGHr, dQgj, oyg0=Q995, kvcN=Mfgp, **B2fa):
V_D6 = {'playback_state': eyBA.Paused if HFSw else eyBA.Playing, 'playback_rate': 0.0 if HFSw else 1.0, 'title': leAC, 'total_time': RGHr, 'position': dQgj, 'media_type': EXW0.ContentItemMetadata.Video, 'app_name': kvcN}
V_D6.update(B2fa)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rTFf(YKHO, Om7q):\n YKHO.video_model.change_video(YKHO.video_model.dyad, Om7q)",
"def x8AS(YKHO):\n print('continue_video needs implementation')",
"def naBh(YKHO, DYeJ, Ji45=''):\n print('flag_video needs implementation')",
"def naBh(YKHO, DYeJ, Ji45=''):\n print('flag_video needs implementat... | [
"0.69190264",
"0.6581425",
"0.6342712",
"0.6342712",
"0.62394065",
"0.6227238",
"0.61888486",
"0.61837465",
"0.6166778",
"0.60117656",
"0.60117656",
"0.60117656",
"0.60117656",
"0.6002481",
"0.5963081",
"0.5878059",
"0.58746964",
"0.58744854",
"0.5861145",
"0.5853884",
"0.579... | 0.0 | -1 |
The mean area of triangles in this mesh in units of square degrees. | def f0tD(YKHO):
mM0K = XTiz.pi
pbNT = 4.0 * mM0K / 8.0
KA7m = 4.0 ** YKHO.depth
f0tD = pbNT / KA7m * (180.0 / mM0K) ** 2
return f0tD | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f0tD(YKHO) -> eQHC.NDArray[oyIN.float_]:\n return oyIN.sum(YKHO.faces.area)",
"def drdQ(YKHO):\n vZBV = 0.0\n for gmTb in YKHO._quadrilaterals:\n yzQ0 = DWao(gmTb)\n vC9B = zqpF(gmTb)\n vZBV = vZBV + yzQ0 * vC9B\n return vZBV",
"def f0tD(YKHO):\n f0tD = 0\n XVAW = YKH... | [
"0.73847824",
"0.73259306",
"0.728234",
"0.71564615",
"0.7085065",
"0.7033109",
"0.7002802",
"0.6959337",
"0.6951171",
"0.6944021",
"0.68948615",
"0.68678784",
"0.6847471",
"0.6836743",
"0.6806274",
"0.67932117",
"0.67932117",
"0.67849517",
"0.6724166",
"0.6705641",
"0.668622... | 0.642878 | 49 |
This implementation allows zero to be passed but raises ZeroDivisionError in that case. | def BX9Y(LFlW: float, _tIi: float) -> float:
return LFlW / _tIi | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rAjW(jzdc, Fg_i):\n if Fg_i == 0:\n raise ZeroDivisionError",
"def cwPI(YKHO):\n with YKHO.assertRaises(ZeroDivisionError):\n hzm0.evaluator({}, {}, '1/0')\n with YKHO.assertRaises(ZeroDivisionError):\n hzm0.evaluator({}, {}, '1/0.0')\n with YKHO.assertRaises(ZeroDivisionErro... | [
"0.7887476",
"0.7527139",
"0.7438635",
"0.72114927",
"0.7205745",
"0.7133619",
"0.7097582",
"0.70855695",
"0.70568377",
"0.70456535",
"0.700692",
"0.6972924",
"0.69266456",
"0.69024444",
"0.6765968",
"0.67189133",
"0.6645566",
"0.6594587",
"0.65887666",
"0.6582077",
"0.654198... | 0.54627854 | 81 |
Load tasks from a taskspecifying JSON or JSONs in a directory. | def fntk(YKHO):
xCjU = {}
for FYKK in U9eF(UQQC):
ytgA = gzes(UQQC, FYKK)
YKHO._print('Loading task-specifying JSON {} ...'.format(ytgA))
with open(ytgA) as eHNT:
TwWp = _1kr(joQr(eHNT.read()))
UbKu = TwWp['library_path']
for a1PO in TwWp['tasks']:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tyeH(YKHO, VqRE=nUeQ):\n try:\n with open(VqRE, 'r', encoding='utf-8') as u5vm:\n TwWp = qQXR.load(u5vm)\n YKHO.tasks = [o2Vr(D5gV['name'], D5gV['priority'], D5gV['steps']) for D5gV in TwWp]\n YKHO.sort()\n except FileNotFoundError:\n pass",
"def YawA(YKHO):\n\n ... | [
"0.68408006",
"0.63870823",
"0.6356363",
"0.6332528",
"0.60689414",
"0.58422726",
"0.5808274",
"0.5692114",
"0.5670256",
"0.5593962",
"0.558594",
"0.5580456",
"0.55498004",
"0.5504866",
"0.5483451",
"0.5481086",
"0.54423654",
"0.54310805",
"0.54062784",
"0.5404365",
"0.538746... | 0.67067677 | 1 |
`features` might be a list of unweighted tokens (a weight of 1 will be assumed), a list of (token, weight) tuples or a token > weight dict. | def YcqH(YKHO, bySB):
Ty9i = [0] * YKHO.f
oGem = [1 << YRbF for YRbF in range(YKHO.f)]
if isinstance(bySB, dict):
bySB = bySB.items()
for eHNT in bySB:
if isinstance(eHNT, exCv):
MKlR = YKHO.hashfunc(eHNT.encode('utf-8'))
yzQ0 = 1
else:
assert ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qRnK(s2mk, LyKa):\n for eOtH in s2mk:\n a1PO = 'token=' + eOtH\n if a1PO not in LyKa.keys():\n LyKa.setdefault(a1PO, 1)\n else:\n LyKa[a1PO] += 1",
"def qRnK(s2mk, LyKa):\n UHFx = mBkc(s2mk)\n for YRbF in UHFx:\n LyKa['token=' + YRbF] = UHFx[YRbF]",
... | [
"0.653834",
"0.65147144",
"0.6347001",
"0.63107216",
"0.62798417",
"0.62619084",
"0.62292826",
"0.6163123",
"0.6140972",
"0.6140972",
"0.613032",
"0.6123229",
"0.6109968",
"0.60991424",
"0.6096989",
"0.60907584",
"0.60907584",
"0.6061177",
"0.60596347",
"0.60457945",
"0.60128... | 0.6398463 | 3 |
(list of float) > tuple of (int, int) Return a tuple of the indices of the two smallest values in list L. >>> find_two_smallest([809, 834, 477, 478, 307, 122, 96, 102, 324, 476]) (6, 7) | def cOcx(aPd6):
Y8Kb = sorted(aPd6)
CL9V = Y8Kb[0]
_PK4 = Y8Kb[1]
q0f4 = aPd6.index(CL9V)
xj02 = aPd6.index(_PK4)
return (q0f4, xj02) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Rds4(BDwY, g3ko, HE3w):\n oZf4, YBiN = (BDwY.index(g3ko), BDwY.index(HE3w))\n if oZf4 == YBiN:\n YBiN = oZf4 + 1 + BDwY[oZf4 + 1:].index(HE3w)\n if oZf4 > YBiN:\n oZf4, YBiN = (YBiN, oZf4)\n return (oZf4 + 1, YBiN + 1)",
"def B5um(zs2f):\n if len(zs2f) == 0:\n return -1\n ... | [
"0.67056245",
"0.65675145",
"0.6397578",
"0.63922834",
"0.63263494",
"0.6259424",
"0.62585086",
"0.62002885",
"0.61569583",
"0.61501086",
"0.61196315",
"0.59945226",
"0.59836084",
"0.5957499",
"0.59472424",
"0.5902891",
"0.5812591",
"0.58041644",
"0.5776725",
"0.57506186",
"0... | 0.8850774 | 0 |
fills the wake terms coming from the current matrix | def w2Ki(Emd4):
""" EXECUTE THIS FUNCTION IN THE FARM CLASS! """
ywwl = AGDB.N
vuvg = AGDB.F
a1PO = AGDB.t
Emd4.wn = oyIN.zeros((ywwl, ywwl), dtype=float)
Emd4.wt = oyIN.zeros((ywwl, ywwl), dtype=float)
l3FH = oyIN.arange(ywwl / 2, ywwl).astype(int)
DgkF = oyIN.arange(ywwl / 2 - 1, -1, -... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vjM7(YKHO):\n print('Creating Needleman-Wunsch matrix..')\n for YRbF in range(YKHO.matrix.shape[0]):\n for r845 in range(YKHO.matrix.shape[1]):\n if YRbF < len(YKHO.seq_2) and r845 < len(YKHO.seq_1):\n YKHO.matrix[0, YRbF + 2] = YKHO.seq_2[YRbF]\n YKHO.matr... | [
"0.6078445",
"0.60130125",
"0.5850521",
"0.57371765",
"0.5678728",
"0.56739324",
"0.5655728",
"0.5435346",
"0.54327196",
"0.54164356",
"0.54162914",
"0.54110456",
"0.54108334",
"0.5394879",
"0.5389328",
"0.5374737",
"0.53418946",
"0.5325146",
"0.5320879",
"0.5317205",
"0.5302... | 0.6246366 | 0 |
fills the obstruction matrix with respect to the nth turbine | def A1Hd(YKHO, YRbF, NrP3):
ywwl = AGDB.N
YKHO.newQn = oyIN.copy(AGDB.zeros)
YKHO.newQt = oyIN.copy(AGDB.zeros)
if YKHO.y0 < NrP3.y0:
yk4i = oyIN.abs(YKHO.yi[YRbF][0] - NrP3.yi[YRbF][0:ywwl // 2])
KCHu = int(oyIN.argwhere(yk4i <= oyIN.min(yk4i))[0])
YKHO.do = 'push outside'
i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ld6X(YKHO):\n \"\"\" EXECUTE THIS FUNCTION IN THE FARM CLASS! \"\"\"\n global f\n HYtt = AGDB.NT\n ywwl = AGDB.N\n a1PO = AGDB.t\n lwT1 = AGDB.DT\n for YRbF in range(int(HYtt)):\n eHNT(YKHO.cx[YRbF], YKHO.cy[YRbF], YKHO.xi[YRbF], YKHO.yi[YRbF], a1PO, ywwl, lwT1)",
"def ugoU(YKHO):... | [
"0.6138413",
"0.6082374",
"0.5841546",
"0.57156605",
"0.55955756",
"0.5570315",
"0.5497117",
"0.5492482",
"0.54665226",
"0.54070723",
"0.54055995",
"0.5396347",
"0.5395195",
"0.5387633",
"0.53707844",
"0.5352652",
"0.53410155",
"0.53362507",
"0.53169227",
"0.5298013",
"0.5288... | 0.5406014 | 10 |
sets the perturbation velocities to zero | def dbQk(YKHO):
YKHO.wx = oyIN.copy(AGDB.wzero)
YKHO.wy = oyIN.copy(AGDB.wzero) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZgQW(YKHO, xRqF):\n for DM04 in xRqF:\n DM04.features['velocity'] = [0] * len(DM04.vector)\n return",
"def ZgQW(YKHO, CHNM):\n for DM04 in CHNM:\n DM04.features['velocity'] = [0] * len(DM04.vector)\n return",
"def xJVR(YKHO):\n if YKHO.controls['make_velocity_0']:\n YKHO... | [
"0.72390974",
"0.7053335",
"0.69010353",
"0.6389877",
"0.63195837",
"0.6316725",
"0.6226239",
"0.6170486",
"0.6131928",
"0.6125411",
"0.6108713",
"0.6108713",
"0.6098815",
"0.60960525",
"0.60684913",
"0.6058429",
"0.6043934",
"0.60411817",
"0.60294527",
"0.6018093",
"0.596407... | 0.75529575 | 0 |
returns True if there are no more pending players, false if there are still pending players | def Zo9o(YKHO):
if len(YKHO.pending_players) > 0:
return False
else:
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uild(YKHO):\n return len(YKHO.game_winners) == len(YKHO.players)",
"def qhm5():\n return True",
"def zBd2(YKHO):\n for oyg0 in YKHO.players:\n if oyg0.current_bet is 0:\n return True\n return False",
"def Kss3(YKHO, JJLd):\n try:\n YKHO.pending_players.index(JJLd)\... | [
"0.79226124",
"0.7528287",
"0.7299239",
"0.70892864",
"0.7065231",
"0.70407575",
"0.70222133",
"0.70038414",
"0.6993644",
"0.6951377",
"0.6916277",
"0.6779037",
"0.6677003",
"0.6672137",
"0.6670715",
"0.66118485",
"0.6553944",
"0.6538169",
"0.65222067",
"0.65031344",
"0.64800... | 0.7710575 | 1 |
Ratio of this PSF and the diffraction limited PSFs' radii enclosing a certain amount of energy. | def mtw_(YKHO, VYvU=NiIw):
erfe = YKHO.ee_radius(VYvU)
HFaB = vtRT(YKHO.fno, YKHO.wavelength, VYvU)
return erfe / HFaB | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vZNx(YKHO):\n return YKHO._fe_ratio",
"def KY2z(YKHO):\n Rivs = yoqz.global_bw_mean\n if Rivs == 0.0:\n return 0\n else:\n return YKHO.bw / Rivs",
"def RXeq(YKHO):\n try:\n return YKHO.price / YKHO.dividend_yield\n except ZeroDivisionError:\n return 0.0",
"de... | [
"0.65774155",
"0.6473576",
"0.64557004",
"0.64454716",
"0.63306534",
"0.6306402",
"0.6293178",
"0.62451106",
"0.61915976",
"0.61538655",
"0.6117228",
"0.6108435",
"0.6091187",
"0.60426724",
"0.6006304",
"0.59967476",
"0.598941",
"0.5940946",
"0.5928526",
"0.5913203",
"0.59126... | 0.61734825 | 9 |
Make a 1D plot of the encircled energy at the given azimuth. | def mMg7(YKHO, wNPH=None, Xkrd=50, skyf=GPtr.lw, ybfX=GPtr.zorder, LZpg=None, aNZO=None):
if wNPH is None:
if len(YKHO._ee) != 0:
CAzz, Jd40 = lENT(YKHO._ee.keys(), YKHO._ee.values())
else:
raise ValueError('if no values for encircled energy have been computed, axlim must be ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TPS_(YKHO):\n rgvq = YKHO.energy_kev.get()\n S8Xq = YKHO.hkl_magnetic.get()\n S8Xq = S8Xq.replace(',', ' ')\n S8Xq = S8Xq.replace('(', '').replace(')', '')\n S8Xq = S8Xq.replace('[', '').replace(']', '')\n S8Xq = oyIN.fromstring(S8Xq, sep=' ')\n bozC = YKHO.azim_zero.get()\n bozC = bozC... | [
"0.6574199",
"0.61281586",
"0.60573447",
"0.6008553",
"0.59254605",
"0.59177214",
"0.5830896",
"0.5812086",
"0.5796739",
"0.57891905",
"0.5787351",
"0.57739407",
"0.57350534",
"0.5701258",
"0.56805086",
"0.5662301",
"0.5661167",
"0.56603605",
"0.5645351",
"0.5643716",
"0.5593... | 0.59021246 | 6 |
Attach a lot of summaries to a Tensor (for TensorBoard visualization). | def g4Yp(SRYB):
with ZylS.name_scope('{}-summaries'.format(SRYB.op.name)):
JBMS = ZylS.reduce_mean(SRYB)
ZylS.summary.scalar('mean', JBMS)
with ZylS.name_scope('stddev'):
z2bo = ZylS.sqrt(ZylS.reduce_mean(ZylS.square(SRYB - JBMS)))
ZylS.summary.scalar('stddev', z2bo)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n1pK(YKHO):\n for G1Hx, Ty9i in YKHO.metrics.items():\n ZylS.summary.scalar(G1Hx, Ty9i)\n YKHO.summary_op = ZylS.summary.merge_all()",
"def RlbR(YKHO):\n ZylS.summary.scalar('loss', YKHO.loss)\n XIcQ = ZylS.summary.merge_all()\n YKHO.summary_op = XIcQ\n ZylS.logging.info('summary op ... | [
"0.7071791",
"0.6970259",
"0.6970259",
"0.6800256",
"0.67872906",
"0.67407334",
"0.66669947",
"0.66576326",
"0.66193783",
"0.66085786",
"0.6595776",
"0.65836215",
"0.6581151",
"0.655297",
"0.6500364",
"0.6459978",
"0.64145213",
"0.6294558",
"0.62718755",
"0.62713677",
"0.6265... | 0.5505678 | 100 |
Returns a TensorArray, not a Tensor. TensorArray length is batch_size, while each Tensor within is a 1D vector of word IDs. | def Iqrb():
YRbF = 0
while len(uAvY) - YRbF >= Ep8u:
yield oyIN.stack([oyIN.pad(oyIN.stack([KTQ3[id] for id in yAmx[:aILy]]), [[0, aILy - min(len(yAmx), aILy)], [0, 0]], 'constant', constant_values=0) for yAmx in uAvY[YRbF:YRbF + Ep8u]])
YRbF += Ep8u | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f53l(I0MX, V22M):\n A07C = [I0MX.get(GIN8, dfoa) for GIN8 in V22M]\n return oyIN.array(A07C, 'i')",
"def ZSDD(V22M, CtWL, Phg5):\n vhpA = ht2j.zeros(len(V22M), len(CtWL), Phg5)\n for YRbF, GIN8 in enumerate(V22M):\n for BDwY, sZqf in enumerate(GIN8):\n vhpA[YRbF][CtWL(sZqf)][BDw... | [
"0.68513095",
"0.62608224",
"0.59487754",
"0.5948221",
"0.5835409",
"0.57898265",
"0.5743345",
"0.5720366",
"0.57015175",
"0.5695752",
"0.56939924",
"0.5681909",
"0.5681909",
"0.5680889",
"0.5674603",
"0.5648013",
"0.56272066",
"0.5587618",
"0.55671316",
"0.556187",
"0.551689... | 0.5244638 | 71 |
Takes dictionary of loaded image data and displays all images in one matplotlib plot. | def cEbM(o0SI, qfpW=False):
Yw_3 = []
for KCHu in o0SI.values():
for bwO2 in KCHu:
Yw_3.append(bwO2.img)
cPsg(Yw_3, color=qfpW) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def U0xK(laKQ, AaD6=True):\n LZpg, FgGO = QrM1.subplots(len(laKQ), sharex=True, sharey=True)\n for H5ew, LZpg in zip(laKQ, range(len(laKQ))):\n LNo8 = laKQ[H5ew]\n FgGO[LZpg].imshow(LNo8)\n if AaD6:\n QrM1.plot()\n return (LZpg, FgGO)",
"def d8hr(YKHO):\n for Z366 in YKHO.log_... | [
"0.78563046",
"0.77053887",
"0.74602854",
"0.74602854",
"0.74602854",
"0.74176127",
"0.73499763",
"0.7334161",
"0.70354164",
"0.7001036",
"0.69662625",
"0.68571436",
"0.68375725",
"0.68124366",
"0.68047565",
"0.6780026",
"0.67398757",
"0.6722883",
"0.6693989",
"0.6684089",
"0... | 0.62299126 | 71 |
Method to get the minimum deviation, the default is the current setup wavelength, but this can be overridden by a supplied wavelength | def DN3G(YKHO, __d3=None):
if __d3 == None:
__d3 = YKHO.wavelength
return FIcI.minDeviation(YKHO, __d3) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DN3G(YKHO, __d3):\n jzdc = zvF_().getValue(__d3)\n f0Tu = YKHO.n.getValue(__d3) / jzdc\n RyuO = f0Tu * epAf.sin(YKHO.angle / 2)\n KCHu = epAf.asin(RyuO)\n return 2 * KCHu - YKHO.angle",
"def RRUb(YKHO):\n Q3Ge = YKHO.transmit / YKHO.transmit.max() > 1.0 / 100\n return min(YKHO.wavelength... | [
"0.7395225",
"0.71812606",
"0.67913145",
"0.67891824",
"0.67775846",
"0.674719",
"0.6685401",
"0.662464",
"0.6539374",
"0.65363103",
"0.64254814",
"0.631843",
"0.6318132",
"0.6296786",
"0.6273676",
"0.6237414",
"0.62230796",
"0.62070304",
"0.62044275",
"0.6196352",
"0.6166997... | 0.8246697 | 0 |
Method to get the resolution at the current setup wavelength | def B1Wx(YKHO):
return FIcI.resolution(YKHO, YKHO.beam, YKHO.wavelength) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pMN5(YKHO):\n return YKHO._lowLevelGetDeviceResolution()",
"def pMN5(YKHO):\n return YKHO.resolution",
"def x8Yc(YKHO):\n return YKHO._get_attribute('resolution')",
"def CMuK(YKHO):\n return (YKHO.display_info['width'], YKHO.display_info['height'])",
"def __d3(YKHO):\n return YKHO.get(YK... | [
"0.73640436",
"0.7268019",
"0.6952599",
"0.68621016",
"0.6781881",
"0.6736658",
"0.6736658",
"0.6722695",
"0.66878957",
"0.6683737",
"0.6667448",
"0.6614354",
"0.6609055",
"0.6595715",
"0.6508319",
"0.6438419",
"0.64015025",
"0.63649213",
"0.6356966",
"0.63066095",
"0.6288695... | 0.7579037 | 0 |
Get genotype label for a type of genotype | def DeTJ(SZdN):
if SZdN == 'Hom':
return 0
elif SZdN == 'Het':
return 1
elif SZdN == 'Hom_alt':
return 2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DeTJ(Emd4):\n return Emd4._type_name(Emd4.label)",
"def DeTJ(Emd4):\n return Emd4._type_name(Emd4.label)",
"def u_my(YKHO) -> str:\n return qe4Y.get(YKHO, 'label_type')",
"def LjmT(YKHO, EhYO):\n QLRN = YKHO._load_entity_type_labels()\n return QLRN[EhYO]['label']",
"def wikt(AiZN):\n ... | [
"0.7198095",
"0.71580875",
"0.67725486",
"0.66459423",
"0.6571658",
"0.65436083",
"0.6461242",
"0.64528567",
"0.6442584",
"0.6393234",
"0.6355042",
"0.62909526",
"0.6278044",
"0.6259255",
"0.6242408",
"0.6228025",
"0.6154473",
"0.61460197",
"0.6140923",
"0.6140923",
"0.614092... | 0.8823179 | 0 |
Set a new password for the user. | def G3s8(uJjO):
CBIr = GHus(uJjO)
L03z = KLLH(QePW.form)
if not L03z.validate():
return gGEI(CBIr.id, L03z)
uGpu = L03z.password.data
eOji = Oa1e.user.id
bKfW.update_password_hash(CBIr.id, uGpu, eOji)
WJpE(OCoQ("New password has been set for user '%(screen_name)s'.", screen_name=CBIr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zZft(YKHO, zN5h):\n pass",
"def wP2P(YKHO, uGpu):\n YKHO.password = uGpu",
"def G3s8(YKHO, uGpu):\n super(b485, YKHO).set_password(uGpu)\n YKHO.new_password = uGpu",
"def G3s8(YKHO, jTXt):\n YKHO.password = jTXt",
"def cDCx(YKHO, CBIr, jTXt):\n CBIr.password = wVXF.make_password(jTXt)... | [
"0.8565532",
"0.8404981",
"0.82586676",
"0.8237227",
"0.81925327",
"0.8189781",
"0.8105819",
"0.80879784",
"0.8080228",
"0.80642295",
"0.80375326",
"0.79895425",
"0.7980262",
"0.7977188",
"0.7972625",
"0.7963422",
"0.7962349",
"0.7962349",
"0.79539025",
"0.7936703",
"0.789718... | 0.7642998 | 39 |
Change the user's email address. | def _KH4(uJjO):
CBIr = GHus(uJjO)
L03z = nOad(QePW.form)
if not L03z.validate():
return uEpM(CBIr.id, L03z)
DEev = CBIr.email_address
_4x5 = L03z.email_address.data.strip()
eOji = Oa1e.user.id
lo9Y = L03z.reason.data.strip()
tvqc = LqtA.change_email_address(CBIr.id, _4x5, eOji, r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def change_email(YKHO, UrTq, jTXt):\n nPrm = {'password': jTXt, 'emailAddress': UrTq}\n tTpl = await YKHO.request.request(url='https://accountsettings.roblox.com/v1/email', method='post', data=nPrm)\n return tTpl",
"def RloI(YKHO, UrTq):\n YKHO.email = UrTq\n print(f'Email for {YKHO.name} ha... | [
"0.7567327",
"0.73077196",
"0.7292577",
"0.7215567",
"0.7179653",
"0.70941615",
"0.70514107",
"0.6920388",
"0.68937427",
"0.68937427",
"0.68937427",
"0.68461114",
"0.679762",
"0.678773",
"0.67793643",
"0.67793643",
"0.67793643",
"0.67793643",
"0.67793643",
"0.67793643",
"0.67... | 0.70491517 | 7 |
Helper method to calculate the smoothed emission (lexical) probability. | def Kaej(Emd4, yzQ0, a1PO):
return float(Emd4._emission_counts[yzQ0, a1PO] / Emd4._uni_transition_counts[a1PO]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Q7Be(YKHO, ZfUD):\n UHFx = YKHO.counter.get(ZfUD, 0)\n if YKHO.smoothing_dict:\n FJ3W = YKHO.smoothing_dict.get(UHFx, UHFx)\n assert FJ3W > 0\n return FJ3W / YKHO.smooth_total\n else:\n return UHFx / YKHO.total",
"def UQhQ(YKHO):\n UqPz = {}\n ZOFV = []\n for H5e... | [
"0.69826394",
"0.69343203",
"0.67109776",
"0.6677426",
"0.6634947",
"0.648872",
"0.63277274",
"0.6241997",
"0.62381727",
"0.6137459",
"0.6100853",
"0.6099691",
"0.6067648",
"0.602738",
"0.59924173",
"0.59537834",
"0.59190124",
"0.5916962",
"0.5872556",
"0.5869368",
"0.5865928... | 0.6572657 | 5 |
Return the image numpy array which is always RGB. | def nPrm(YKHO):
return YKHO._img | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def S3yE(LNo8, PJWX=False):\n H2v2, TVTK = LNo8.size\n ezWE = oyIN.array(LNo8.getdata())\n ezWE = ezWE.reshape(3, H2v2, TVTK)\n Mkmy = ezWE[0]\n Oa1e = ezWE[1]\n Fg_i = ezWE[2]\n return (Mkmy, Oa1e, Fg_i)",
"def Ft1z(LNo8: carla.Image) -> oyIN.ndarray:\n LNo8.convert(CRxp.ColorConverter.R... | [
"0.7723352",
"0.7082912",
"0.7063542",
"0.69263405",
"0.6916196",
"0.69159216",
"0.6865393",
"0.68154013",
"0.6807487",
"0.6778375",
"0.6771367",
"0.67322814",
"0.67279065",
"0.6723825",
"0.67167753",
"0.6710021",
"0.67071855",
"0.6703361",
"0.668166",
"0.66615057",
"0.664963... | 0.0 | -1 |
First putting the rendering identifier on top of the figure and then convert it to an instance of ``Image``. Also release the resources of ``fig``. | def gPdv(mWFP, LZpg, weqM, H2v2=None, TVTK=None):
LZpg.suptitle(mWFP)
VXjJ = hnIv.from_pyplot_fig(LZpg, dpi=weqM)
if H2v2 is not None and TVTK is not None:
VXjJ.resize(height=H2v2, width=TVTK)
QrM1.close(LZpg)
return VXjJ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zy6L(LZpg):\n LZpg.tight_layout(pad=1)\n LZpg.canvas.draw()\n JIe5 = oyIN.frombuffer(LZpg.canvas.tostring_rgb(), dtype=oyIN.uint8)\n JIe5 = JIe5.reshape(LZpg.canvas.get_width_height()[::-1] + (3,))\n return JIe5",
"def iqPs(LZpg):\n import io\n LaVg = io.BytesIO()\n LZpg.savefig(LaVg)... | [
"0.6406425",
"0.63930726",
"0.6342493",
"0.6223757",
"0.6134851",
"0.6123006",
"0.6123006",
"0.60654634",
"0.60558707",
"0.60143423",
"0.5929191",
"0.591365",
"0.5908701",
"0.5874482",
"0.58605427",
"0.5852775",
"0.58325493",
"0.5807356",
"0.5807356",
"0.58028334",
"0.5795095... | 0.65721494 | 0 |
Get absolute path to resource, works for dev and for PyInstaller | def JFat(t_yv):
try:
XSj5 = HwRy._MEIPASS
except Exception:
XSj5 = Hy7s.path.abspath('.')
return Hy7s.path.join(XSj5, t_yv) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gZBG():\n return Hy7s.path.join(Hy7s.path.dirname(xAKo), 'resources') + Hy7s.path.sep",
"def Q63V(Qth0):\n try:\n XSj5 = HwRy._MEIPASS\n except Exception:\n XSj5 = Hy7s.path.abspath(Hy7s.path.join(Hy7s.path.dirname(HwRy.modules[__name__].__file__), 'assets'))\n return Hy7s.path.join... | [
"0.83695436",
"0.8280479",
"0.82485795",
"0.8139178",
"0.8114118",
"0.80985415",
"0.80940944",
"0.80797124",
"0.80677074",
"0.80673695",
"0.8062465",
"0.8062465",
"0.8062465",
"0.8062465",
"0.8062465",
"0.8062465",
"0.8062465",
"0.80569947",
"0.80545217",
"0.80403364",
"0.802... | 0.80448323 | 33 |
An alternate to ``sort`` which allows you to specify a list of fields and use a leading (minus) to specify DESCENDING. | def DeLa(YKHO, *V_D6):
A97Q = []
for Jyyj in V_D6:
if Jyyj.startswith('-'):
A97Q.append((Jyyj.strip('-'), DpgL.DESCENDING))
else:
A97Q.append((Jyyj, DpgL.ASCENDING))
return YKHO.sort(A97Q) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DeLa(YKHO, *V_D6):\n YKHO._evaluated = False\n if YKHO._order is None:\n YKHO._order = []\n for Jyyj in V_D6:\n XSoh = 'asc'\n if Jyyj.startswith('-'):\n XSoh = 'desc'\n Jyyj = Jyyj[1:]\n YKHO._order.append({Jyyj: XSoh})\n return YKHO",
"def DeLa(... | [
"0.7397375",
"0.715554",
"0.70841825",
"0.6838644",
"0.6595371",
"0.6525477",
"0.6465225",
"0.6385546",
"0.6345356",
"0.6249541",
"0.62003624",
"0.61990386",
"0.6126375",
"0.61092085",
"0.60789746",
"0.6047222",
"0.60396147",
"0.6013097",
"0.6011415",
"0.5993869",
"0.59754676... | 0.7582132 | 0 |
Size of the vocabulary. | def cAlv(YKHO):
return len(YKHO.voc) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bV1g(YKHO):\n return len(YKHO.vocab)",
"def iq72(YKHO):\n return len(YKHO.vocab.keys())",
"def jXxl(YKHO) -> int:\n return len(YKHO.vocabulary)",
"def jXxl(YKHO):\n return len(YKHO.vocab)",
"def jXxl(YKHO):\n return YKHO._vocab_size",
"def jXxl(YKHO) -> int:\n return YKHO._vocab_siz... | [
"0.90801543",
"0.8996187",
"0.89002067",
"0.87715584",
"0.86575294",
"0.85344374",
"0.83551913",
"0.83551913",
"0.8272855",
"0.7911105",
"0.7891122",
"0.73179007",
"0.7248983",
"0.72476584",
"0.7226786",
"0.71281916",
"0.71182466",
"0.7115002",
"0.7052521",
"0.70446026",
"0.7... | 0.7216473 | 15 |
Size of the vocabulary. | def cAlv(YKHO):
return len(YKHO.voc) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bV1g(YKHO):\n return len(YKHO.vocab)",
"def iq72(YKHO):\n return len(YKHO.vocab.keys())",
"def jXxl(YKHO) -> int:\n return len(YKHO.vocabulary)",
"def jXxl(YKHO):\n return len(YKHO.vocab)",
"def jXxl(YKHO):\n return YKHO._vocab_size",
"def jXxl(YKHO) -> int:\n return YKHO._vocab_siz... | [
"0.90801543",
"0.8996187",
"0.89002067",
"0.87715584",
"0.86575294",
"0.85344374",
"0.83551913",
"0.83551913",
"0.8272855",
"0.7911105",
"0.7891122",
"0.73179007",
"0.7248983",
"0.72476584",
"0.7226786",
"0.71281916",
"0.71182466",
"0.7115002",
"0.7052521",
"0.70446026",
"0.7... | 0.7216473 | 16 |
Returns the sum of N_dot_token(w) for all w in the vocabulary | def EuZC(YKHO):
return YKHO._N_dot_dot_attr | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, Eab6, exwG, rrSk='', lWPh=None):\n YKHO.n = exwG\n YKHO.D = lWPh\n YKHO.corpus = rrSk\n YKHO.smoothingtechnique = 'Kneser Ney Smoothing'\n YKHO._N_dot_tokens_dict = KRtI = oRi_(set)\n YKHO._N_tokens_dot_dict = ggyd = oRi_(set)\n YKHO._N_dot_tokens_dot_dict = HS_G = oRi_(set)\n ... | [
"0.6275555",
"0.622169",
"0.6084959",
"0.599528",
"0.59766835",
"0.59654635",
"0.59228694",
"0.5921557",
"0.5911644",
"0.5897786",
"0.5897786",
"0.5897786",
"0.5897786",
"0.5897786",
"0.5887658",
"0.5882741",
"0.58770293",
"0.5861096",
"0.5844614",
"0.58393323",
"0.5829077",
... | 0.0 | -1 |
Returns a set of words in which count(prev_tokens+word) > 0 i.e., the different ngrams it completes tokens a tuple of strings | def ggyd(YKHO, s2mk):
if type(s2mk) is not tuple:
raise TypeError('`tokens` has to be a tuple of strings')
return YKHO._N_tokens_dot_dict[s2mk] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oG5U(YKHO):\n g68O = []\n for GIN8 in YKHO._words:\n if GIN8 not in YKHO._used_words + tuple(YKHO._tried_words):\n for YRbF in range(len(YKHO._start)):\n if GIN8[:YRbF] + GIN8[YRbF + 1:] == YKHO._start[:YRbF] + YKHO._start[YRbF + 1:]:\n g68O.append(GIN8... | [
"0.6721534",
"0.6553508",
"0.6448085",
"0.6401766",
"0.6389852",
"0.6383959",
"0.6318638",
"0.6232383",
"0.6221706",
"0.62105435",
"0.6198798",
"0.61718935",
"0.6148833",
"0.61377186",
"0.6130822",
"0.6130822",
"0.61092764",
"0.6089337",
"0.6026006",
"0.6021035",
"0.6011225",... | 0.0 | -1 |
Returns a set of ngrams it completes tokens a tuple of strings | def KRtI(YKHO, s2mk):
if type(s2mk) is not tuple:
raise TypeError('`tokens` has to be a tuple of strings')
return YKHO._N_dot_tokens_dict[s2mk] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aPuO(YKHO, s2mk):\n pCSA = []\n for YRbF in range(len(s2mk) - YKHO.N + 1):\n pCSA.append(tuple(s2mk[YRbF:YRbF + YKHO.N]))\n return pCSA",
"def pCSA(V22M, exwG=1):\n return [tuple(V22M[r845:r845 + exwG]) for r845 in range(len(V22M) - exwG + 1)]",
"def xg2I(_dZy, exwG):\n yCs1 = wr3U(_d... | [
"0.75475615",
"0.74653953",
"0.733667",
"0.72900254",
"0.7235636",
"0.7207656",
"0.7182965",
"0.7078364",
"0.6948618",
"0.6937495",
"0.6845577",
"0.68126935",
"0.67981374",
"0.6762141",
"0.6740515",
"0.6710547",
"0.6703263",
"0.66820604",
"0.66626483",
"0.6661057",
"0.6636777... | 0.0 | -1 |
Returns a set of ngrams it completes tokens a tuple of strings | def HS_G(YKHO, s2mk):
if type(s2mk) is not tuple:
raise TypeError('`tokens` has to be a tuple of strings')
return YKHO._N_dot_tokens_dot_dict[s2mk] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aPuO(YKHO, s2mk):\n pCSA = []\n for YRbF in range(len(s2mk) - YKHO.N + 1):\n pCSA.append(tuple(s2mk[YRbF:YRbF + YKHO.N]))\n return pCSA",
"def pCSA(V22M, exwG=1):\n return [tuple(V22M[r845:r845 + exwG]) for r845 in range(len(V22M) - exwG + 1)]",
"def xg2I(_dZy, exwG):\n yCs1 = wr3U(_d... | [
"0.7549422",
"0.7466081",
"0.733683",
"0.72904867",
"0.7237156",
"0.7209284",
"0.718509",
"0.7079499",
"0.6950347",
"0.69392943",
"0.68475175",
"0.6815489",
"0.6799739",
"0.6765173",
"0.67419696",
"0.67118204",
"0.6705632",
"0.66824687",
"0.6663225",
"0.6661612",
"0.66390216"... | 0.0 | -1 |
Calculate the great circle distance between two points on the earth (specified in decimal degrees) | def GeVo(GgQG, igSk, tk0B, TGuP):
GgQG, igSk, tk0B, TGuP = map(Y_1E, [GgQG, igSk, tk0B, TGuP])
H91H = tk0B - GgQG
n_9K = TGuP - igSk
jzdc = YUNn(n_9K / 2) ** 2 + YhSR(igSk) * YhSR(TGuP) * YUNn(H91H / 2) ** 2
Z9rn = 2 * P099(PZyS(jzdc))
q5XV = 6367 * Z9rn
return q5XV * 1000 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KzuF(rCSf, hjIX, FNKk, T3JP):\n hjIX = r8hN.radians(hjIX)\n rCSf = r8hN.radians(rCSf)\n T3JP = r8hN.radians(T3JP)\n FNKk = r8hN.radians(FNKk)\n Csk6 = 2 * 6367.45 * r8hN.asin(r8hN.sqrt(GeVo(FNKk - rCSf) + r8hN.cos(rCSf) * r8hN.cos(FNKk) * GeVo(T3JP - hjIX)))\n return Csk6",
"def T97B(GgQG, ... | [
"0.81450045",
"0.7863265",
"0.76322985",
"0.76064754",
"0.75978696",
"0.75965863",
"0.75944835",
"0.75720793",
"0.75630087",
"0.7555095",
"0.7528691",
"0.7517629",
"0.7492963",
"0.7467739",
"0.7452678",
"0.7434477",
"0.73914117",
"0.7357736",
"0.73484355",
"0.73318124",
"0.73... | 0.0 | -1 |
Return how many pairs have the same element repeated. >>> pairs = [[1, 2], [2, 2], [2, 3], [4, 4]] >>> count_same(pairs) 2 | def xfLH(kgDL):
aE77 = 0
for WKvO, LVAh in kgDL:
if WKvO == LVAh:
aE77 = aE77 + 1
return aE77 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F1Vd(YKHO, xYvp: List[int]) -> int:\n Ylbp = 0\n i_PE = {}\n for exwG in xYvp:\n if exwG not in i_PE:\n i_PE[exwG] = 1\n else:\n if i_PE[exwG] == 1:\n Ylbp += 1\n else:\n Ylbp += i_PE[exwG]\n i_PE[exwG] += 1\n r... | [
"0.737167",
"0.6663921",
"0.6441439",
"0.59705436",
"0.5888085",
"0.5828141",
"0.5797325",
"0.5763642",
"0.5719257",
"0.5707483",
"0.56766546",
"0.5628875",
"0.5623081",
"0.5588617",
"0.5564828",
"0.5561986",
"0.55372685",
"0.55263036",
"0.5520277",
"0.5513476",
"0.550942",
... | 0.84958386 | 0 |
Extract register field value (as integer) from full register value, shift LSB of field to bit 0. | def ZNje(YKHO, oize):
Bali = oize / 2 ** YKHO.minBit
fIUu = Bali % 2 ** YKHO.nBits
return fIUu | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Y0mK(YKHO, Jyyj):\n bo34.debug('Getting field starting at bit {}, length {} from register {}'.format(Jyyj.startbit, Jyyj.length, Jyyj.register))\n smZL = YKHO.readU8(Jyyj.register)\n bo34.debug('Raw value: {0:b}'.format(smZL))\n BWXx = smZL & 255 >> 7 - Jyyj.startbit\n bo34.debug('high bits remo... | [
"0.7268996",
"0.6188747",
"0.60590976",
"0.6034995",
"0.60334855",
"0.59855926",
"0.5983088",
"0.5943512",
"0.58650875",
"0.58066285",
"0.5764958",
"0.57175565",
"0.5687581",
"0.5660893",
"0.5633933",
"0.5629249",
"0.5614483",
"0.56137604",
"0.56054026",
"0.56054026",
"0.5576... | 0.64437073 | 1 |
This just deletes the blank_label Label (the ___'s), it also clears the entry field and enables the ENTER button | def Cl_S():
_wZw.destroy()
_gAU['state'] = UxMK
HPjU.config(state='normal')
HPjU.delete(0, 'end') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DX2c(*qIxc, **B2fa):\n qIxc[0].set_text('')",
"def Pfcm(YKHO):\n for TEdI in YKHO.frame.winfo_children():\n if isinstance(TEdI, XW6u.Entry):\n TEdI.delete(0, XW6u.END)\n TEdI.insert(0, '')\n elif isinstance(TEdI, XW6u.Checkbutton):\n TEdI.deselect()",
"d... | [
"0.6908379",
"0.67667526",
"0.6617182",
"0.653331",
"0.6530346",
"0.63722754",
"0.6369459",
"0.63652277",
"0.6360387",
"0.6330588",
"0.63013846",
"0.62710434",
"0.6223806",
"0.6195896",
"0.61862385",
"0.6173401",
"0.6171386",
"0.61698526",
"0.6144116",
"0.6123324",
"0.6111427... | 0.74973905 | 0 |
This removes 1 space whenever double spaces occur which are created by newlines (\n) from the conversion list | def RYsh(ya19):
hiGn = 0
GNwR = len(ya19)
IzjM = []
for z1Rg in range(GNwR):
if ya19[z1Rg] == ' ':
hiGn += 1
if ya19[z1Rg] != ' ':
hiGn = 0
if hiGn == 2:
IzjM.append(z1Rg)
jmcN = len(IzjM)
_Q1I = 1
for P6bq in range(jmcN):
d... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mQFJ(YKHO) -> None:\n YKHO.text = ZbWC.sub('\\\\s[^\\n\\\\s]\\\\s', ' ', YKHO.text)",
"def uH_F(YKHO) -> None:\n YKHO.text = ZbWC.sub('\\\\s+', ' ', YKHO.text)",
"def ccMH(l5Ny):\n return CuOI.sub(' ', xlkR.sub('\\\\n', l5Ny)).strip()",
"def vweZ(ya19):\n cp89 = False\n while cp89 == Fals... | [
"0.6952602",
"0.6801459",
"0.6759515",
"0.67425925",
"0.66037345",
"0.65553635",
"0.65310633",
"0.64854646",
"0.6400185",
"0.63831073",
"0.6329255",
"0.6312175",
"0.63100946",
"0.6295229",
"0.6285186",
"0.6270837",
"0.6257369",
"0.6237584",
"0.6208447",
"0.62025416",
"0.61837... | 0.68371767 | 1 |
Return minimum number of reads an event should have. | def WjZ_(Emd4, YCct=20):
if 'min_event_reads' not in Emd4.global_settings:
return YCct
DhiY = Emd4.global_settings['min_event_reads']
return DhiY | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sgxw(YKHO) -> int:\n return YKHO._min_counts",
"def sgxw(YKHO) -> int:\n return YKHO._min_counts",
"def iiZ1(YKHO) -> qe4Y.Input[int]:\n return qe4Y.get(YKHO, 'minimum_count')",
"def VZdy(YKHO):\n if YKHO.read_size:\n LxeQ = sTYR * YKHO.read_size\n else:\n LxeQ = sTYR\n re... | [
"0.67483234",
"0.67483234",
"0.6633713",
"0.65021366",
"0.63818437",
"0.63714206",
"0.6309459",
"0.6281796",
"0.62768394",
"0.62768394",
"0.62768394",
"0.62768394",
"0.62731147",
"0.6158301",
"0.6127869",
"0.6086239",
"0.60644096",
"0.60603833",
"0.6004199",
"0.59121144",
"0.... | 0.72012913 | 0 |
Verify the 200 status code and the html type | def ADPN(YKHO):
geh0 = YKHO.client.post(gxEw('validate_ticket'), {'name': 'Vip', 'cost': 100})
YKHO.assertEqual(geh0.status_code, 200)
YKHO.assertIsInstance(geh0.context.get('m_entrada'), QgSC) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yQRe(YKHO, _hkX):\n m5r4 = _hkX.headers['Content-Type'].lower()\n return _hkX.status_code == 200 and m5r4 is not None and (m5r4.find('html') > -1)",
"def yQRe(YKHO, _hkX):\n m5r4 = _hkX.headers['Content-Type'].lower()\n return _hkX.status_code == 200 and m5r4 is not None and (m5r4.find('html') > ... | [
"0.8179198",
"0.8173363",
"0.7984639",
"0.797293",
"0.7969242",
"0.79625505",
"0.79216605",
"0.79204506",
"0.79204506",
"0.79204506",
"0.79204506",
"0.7903317",
"0.7898374",
"0.7885596",
"0.7885596",
"0.7885596",
"0.7885596",
"0.7885596",
"0.7885596",
"0.7885596",
"0.7885596"... | 0.0 | -1 |
Initialises an instance of SolrAdapter. In particular it creates SolrAPI object which helps to perform basic operation with Solr API. | def FIMM(YKHO, X4XH):
YKHO._settings = P2FR(X4XH)
YKHO.solr = gB3W(X4XH, WGFJ, YKHO._settings) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, X4XH, XO5J, gCuF):\n YKHO._zk_client = X4XH\n YKHO._solr_zk_root = XO5J\n YKHO._settings = gCuF\n YKHO._solr_live_nodes_list = []\n YKHO._solr_live_nodes_cycle = Hs6x.cycle(YKHO._solr_live_nodes_list)\n YKHO._local_solr = None\n YKHO._private_ip = Icmw.get_private_ip()\n YKHO... | [
"0.5864818",
"0.57887155",
"0.57228124",
"0.5681762",
"0.5560477",
"0.55442524",
"0.5538044",
"0.55008376",
"0.5463316",
"0.53220046",
"0.52978",
"0.5284038",
"0.52836037",
"0.52813184",
"0.52793705",
"0.52695966",
"0.52422255",
"0.522499",
"0.5218625",
"0.5209994",
"0.520088... | 0.73061705 | 0 |
Order event push. Order event of a specific vt_orderid is also pushed. | def NdPK(YKHO, T4Wy: OrderData):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NdPK(YKHO, T4Wy: OrderData):\n pass",
"def NdPK(YKHO, T4Wy: OrderData):\n pass",
"def NdPK(YKHO, T4Wy: OrderData):\n pass",
"def NdPK(YKHO, T4Wy: OrderData):\n pass",
"def NdPK(YKHO, T4Wy: OrderData):\n pass",
"def rBV8(YKHO, G8qI: event.EventOrder):\n pass",
"def rfs7(YKHO, G8qI)... | [
"0.73488975",
"0.6881863",
"0.6881863",
"0.6881863",
"0.68292356",
"0.6808553",
"0.6643166",
"0.65105563",
"0.638883",
"0.63441384",
"0.6327574",
"0.6322651",
"0.6249114",
"0.6217018",
"0.62142456",
"0.6174468",
"0.6140966",
"0.6140917",
"0.5995929",
"0.5886804",
"0.5873217",... | 0.75756866 | 0 |
GIVEN a flask app for testing WHEN the '/' page is request (GET) THEN check that the response is valid | def hDnz(YKHO):
I78j = P4t4.test_client(YKHO)
geh0 = I78j.get('/')
YKHO.assertEqual(geh0.status_code, 200)
assert b'Moscow Ring Road Distance Finder' in geh0.data
assert b'search address' in geh0.data | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hDnz():\n with H6Ho.test_client() as x0hE:\n geh0 = x0hE.get('/')\n assert geh0.status_code == 200\n assert b'milhouse' in geh0.data\n geh0 = x0hE.get('/?url=https://imgs.xkcd.com/comics/bad_code.png')\n assert geh0.status_code == 200\n assert b'milhouse' not in geh... | [
"0.7510851",
"0.7267536",
"0.7171582",
"0.70825535",
"0.70630676",
"0.70601517",
"0.7041814",
"0.7034997",
"0.7007357",
"0.689066",
"0.68762076",
"0.687487",
"0.6873317",
"0.68633586",
"0.68460417",
"0.68210155",
"0.6807326",
"0.6785253",
"0.6760433",
"0.6760012",
"0.67210686... | 0.6368401 | 54 |
GIVEN a Flask app for testing WHEN the '/' page is posted to (POST) THEN check that a '200' status code is returned | def YdU6(YKHO):
I78j = P4t4.test_client(YKHO)
geh0 = I78j.post('/', data=dict(search_address='paris'), follow_redirects=True)
print('post response code : ', geh0.status_code)
YKHO.assertEqual(geh0.status_code, 200)
assert b'Moscow Ring Road Distance Finder' not in geh0.data | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kgM1(YKHO):\n Aofo = YKHO.app.get('/')\n YKHO.assertEqual(Aofo.status_code, 200)",
"def DWk6(YKHO):\n Ylbp = YKHO.app.post('/login')\n YKHO.assertEqual(Ylbp.status_code, 400)\n Ylbp = YKHO.app.get('/login')\n YKHO.assertEqual(Ylbp.status_code, 200)",
"def hWs_(YKHO):\n geh0 = YKHO.clie... | [
"0.7298343",
"0.7093471",
"0.7087781",
"0.70681024",
"0.70513445",
"0.69758976",
"0.69524634",
"0.6817583",
"0.68103117",
"0.6807932",
"0.6791542",
"0.6775251",
"0.6753944",
"0.6750742",
"0.6712324",
"0.66977817",
"0.6678591",
"0.66730857",
"0.66416866",
"0.66405445",
"0.6633... | 0.63775754 | 43 |
Path to local Docker context for a component. Override this to change the convention. | def XlL_(YKHO, mWFP: str) -> str:
return str(YKHO.component_path(mWFP).parent.absolute()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xCAF(YKHO):\n pass",
"def j1XE(x0hE):\n if x0hE is None:\n x0hE = O2Ii.from_env()\n U34r = x0hE.info()\n return Hy7s.path.join(U34r['DockerRootDir'], oghK)",
"def viRI(YKHO):\n return bt5O.format(o9hJ)",
"def pmON(YKHO):\n return YKHO._container_dir",
"def _C6J(YKHO, mWFP: str)... | [
"0.64843893",
"0.6233802",
"0.62149805",
"0.6190897",
"0.61639947",
"0.6155003",
"0.5897566",
"0.58841807",
"0.5860392",
"0.5798749",
"0.5783135",
"0.57429874",
"0.5709132",
"0.5696928",
"0.56917614",
"0.5690987",
"0.56765944",
"0.56334805",
"0.5633477",
"0.5631776",
"0.56100... | 0.73254883 | 0 |
Help function to parse tf.Example | def wvEv(AIu6):
U5Jc = ZylS.parse_single_example(AIu6, w89X)
UXqs = U5Jc.pop(i8e2)
return (U5Jc, UXqs) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sSfN(PU1l):\n\n def hIe0():\n \"\"\"Returns data format of the serialized tf record file.\"\"\"\n return {'feature_1': ZylS.io.VarLenFeature(dtype=ZylS.int64), 'feature_2': ZylS.io.VarLenFeature(dtype=ZylS.int64), 'feature_3': ZylS.io.VarLenFeature(dtype=ZylS.int64), 'label': ZylS.io.FixedLenF... | [
"0.783491",
"0.72759557",
"0.7096526",
"0.7002307",
"0.6992622",
"0.6902555",
"0.6832018",
"0.682758",
"0.6818539",
"0.67757034",
"0.67540777",
"0.65847784",
"0.6560768",
"0.65106195",
"0.6485208",
"0.64809793",
"0.64576226",
"0.6451485",
"0.642992",
"0.64115256",
"0.6405193"... | 0.6929886 | 5 |
Creates an input function from serving. | def yoku(zB1J):
def hbsH():
"""Serving input function that reads raw data and applies transforms."""
i0DE = chnw.schema.as_batched_placeholders()
i0DE.pop(i8e2)
qmeI = ZylS.estimator.export.build_raw_serving_input_receiver_fn(i0DE)
oOVv, SHFm, bGrB = qmeI()
bGrB, xJV... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wtUp(YKHO):\n KRZ2 = ZylS.feature_column.make_parse_example_spec(YKHO.example_feature_columns().values())\n return ZylS.estimator.export.build_parsing_serving_input_receiver_fn(KRZ2)",
"def krAF():\n qmeI = ZylS.estimator.export.build_parsing_serving_input_receiver_fn(zaRM)\n oOVv, bGrB, L6M2 = q... | [
"0.75494516",
"0.75111854",
"0.7449138",
"0.7133447",
"0.70840776",
"0.7033347",
"0.6915049",
"0.68528545",
"0.6741342",
"0.6690766",
"0.666791",
"0.66549575",
"0.6629078",
"0.6596276",
"0.6593102",
"0.64814514",
"0.62196803",
"0.6202279",
"0.615665",
"0.6139365",
"0.6055477"... | 0.73521835 | 3 |
Returns a tuple containing the coordinates of the bounding box around an element | def RTP6(YKHO, U6D_):
yvT9 = (0, 0, 0, 0)
if 'title' in U6D_.attrib:
hHld = YKHO.boxPattern.search(U6D_.attrib['title'])
if hHld:
jNOo = hHld.group(1).split()
yvT9 = (int(jNOo[0]), int(jNOo[1]), int(jNOo[2]), int(jNOo[3]))
return yvT9 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HV3G(YKHO):\n rwK9 = oyIN.max(YKHO.points[:, 0])\n re6M = oyIN.max(YKHO.points[:, 1])\n KDmU = oyIN.min(YKHO.points[:, 0])\n wBZN = oyIN.min(YKHO.points[:, 1])\n return ((re6M, rwK9), (wBZN, KDmU))",
"def C1GJ(YKHO, I7N1):\n wHeb = YKHO.grid.insure_index(I7N1)\n LFlW = YKHO.cell_size[0] ... | [
"0.79562795",
"0.7819308",
"0.76530695",
"0.75867385",
"0.75867385",
"0.75829047",
"0.7519784",
"0.75154656",
"0.7512208",
"0.7444188",
"0.735543",
"0.72964966",
"0.7293521",
"0.72631943",
"0.72102225",
"0.7194959",
"0.71631783",
"0.71494526",
"0.7063128",
"0.70375645",
"0.70... | 0.74058026 | 10 |
This function is used to compute the inner product between two signals sig1 and sig2. | def K3CQ(Rnru, NqbJ, MbOp, i73w, DmgQ):
nF5c = len(MbOp)
ywwl = len(Rnru)
fChD = oyIN.delete(oyIN.fft.rfftn(Rnru), 0)
IkgG = oyIN.delete(oyIN.fft.rfftn(NqbJ), 0)
return oyIN.real(sum(fChD * oyIN.conj(IkgG) / (DmgQ * ywwl / (4 * i73w)))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mQY2(hbUd, BzON):\n Kt_s = hbUd.shape[1]\n wEf2 = sum(sum(hbUd * BzON)) / Kt_s\n return wEf2",
"def eN5c(R2H8, tmPC):\n return oyIN.sum(oyIN.multiply(R2H8, tmPC))",
"def eN5c(dTZv, Z3AJ):\n return XTiz.dot(dTZv.conjugate(), Z3AJ)",
"def QlW8(o4D3, ajwV):\n return oyIN.multiply(o4D3, ajw... | [
"0.7477272",
"0.68256444",
"0.679716",
"0.66450185",
"0.66256344",
"0.6595885",
"0.656716",
"0.6566644",
"0.6430629",
"0.6416564",
"0.6358206",
"0.6332734",
"0.6324636",
"0.63146913",
"0.62795645",
"0.6275231",
"0.62525284",
"0.62258905",
"0.62074965",
"0.62072194",
"0.618562... | 0.777571 | 0 |
Compute softmax values for each sets of scores in x. | def N93T(WKvO):
uw5A = oyIN.exp(WKvO - oyIN.max(WKvO))
return uw5A / uw5A.sum(axis=0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def N93T(YKHO, cCrA):\n MvhI = oyIN.sum(oyIN.exp(cCrA), axis=1, keepdims=True)\n N93T = oyIN.exp(cCrA) / MvhI\n return N93T",
"def N93T(WKvO):\n j1LR = oyIN.exp(oyIN.asarray(WKvO))\n return j1LR / j1LR.sum(0)",
"def N93T(cCrA):\n XeFQ = oyIN.exp(cCrA)\n return XeFQ / oyIN.sum(XeFQ)",
"de... | [
"0.7796294",
"0.7760558",
"0.7759004",
"0.77567077",
"0.76577055",
"0.76577055",
"0.76577055",
"0.76577055",
"0.7585655",
"0.743143",
"0.7407772",
"0.73941606",
"0.7358175",
"0.73174125",
"0.72689486",
"0.72623265",
"0.72614294",
"0.7256868",
"0.723019",
"0.7214918",
"0.72017... | 0.7123029 | 34 |
Creates and returns a pythonconstraint Variable name from a Machine instance. | def CdC3(YKHO, fwgd):
assert type(fwgd) != str or type(fwgd) != QMSQ
return str(fwgd.name) + '-quantity' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def S5Hp(YKHO, Q6kx):\n if isinstance(Q6kx, jZ4I.Attribute):\n XK3Q = YKHO._get_attribute_path(Q6kx)\n if XK3Q:\n azoT = tuple(XK3Q[1:])\n return yc3x(XK3Q[0], azoT)\n else:\n return None\n elif isinstance(Q6kx, jZ4I.Name):\n return Q6kx.id\n el... | [
"0.62002146",
"0.6001203",
"0.5998224",
"0.5963957",
"0.5963957",
"0.5938052",
"0.5742885",
"0.5700491",
"0.5643986",
"0.5634193",
"0.5631169",
"0.5614241",
"0.5559302",
"0.55260164",
"0.549777",
"0.5497258",
"0.5497258",
"0.5497258",
"0.5472313",
"0.5390369",
"0.53859454",
... | 0.6128698 | 1 |
Return a clone of config and optionally overwrite it from yaml file | def tgzD(cLAE=None):
GPtr = KupS.clone()
if cLAE:
o6o_(GPtr, cLAE)
return GPtr | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LgIG(YKHO):\n if YKHO.last_updated != Hy7s.stat(YKHO.config_file).st_mtime:\n with open(YKHO.config_file, 'r') as wOb_:\n YKHO.config = eJb6.load(wOb_, Loader=eJb6.FullLoader)\n YKHO.last_updated = Hy7s.stat(YKHO.config_file).st_mtime\n return YKHO.config",
"def tyeH():\n ... | [
"0.6607694",
"0.6604495",
"0.64144754",
"0.6306236",
"0.627252",
"0.6209549",
"0.62023884",
"0.6197363",
"0.6194321",
"0.61841416",
"0.6181121",
"0.6165241",
"0.6135942",
"0.6132373",
"0.61131954",
"0.6110868",
"0.6080359",
"0.6077181",
"0.60658175",
"0.6025907",
"0.6010285",... | 0.56593955 | 82 |
Redefine the queryset to use based on the current action. | def k66M(YKHO):
DYeJ = YKHO.get_related_video_id()
if DYeJ is None:
return super().get_queryset().none()
SR0I = super().get_queryset().filter(video_id=DYeJ)
if YKHO.request.resource is not None:
SR0I = YKHO._get_lti_queryset(SR0I)
if not YKHO.request.resource and YKHO.request.user an... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k66M(YKHO, QePW, SR0I):\n return SR0I",
"def fRXs(YKHO, SR0I):\n SR0I = super().filter_queryset(SR0I)\n SR0I = tIYZ(YKHO, SR0I)\n return SR0I",
"def k66M(YKHO):\n return None",
"def k66M(YKHO):\n return None",
"def k66M(YKHO):\n if YKHO.queryset is not None:\n SR0I = YKHO.qu... | [
"0.69331104",
"0.673258",
"0.65510607",
"0.65510607",
"0.650296",
"0.6420856",
"0.63378215",
"0.63330275",
"0.63307005",
"0.6329984",
"0.6324365",
"0.6302659",
"0.6238357",
"0.6229539",
"0.6218141",
"0.61931103",
"0.6191909",
"0.618728",
"0.6176474",
"0.6151327",
"0.6132051",... | 0.0 | -1 |
Return sentences of given text. Returned sentences are specially designed for extracting ngrams and defining domain of words and it's not equal to "lexical sentences". Also commas are not considered sentence. For better result use slower sentences function from layer1 module. | def Rhv4(l5Ny, Fbzf=True):
if Fbzf:
KG9w = map(lambda Z9rn: Z9rn.strip(), sv42.split(l5Ny))
else:
raise NotImplemented('sentences with punct is not implemented')
return KG9w | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Y2KJ(l5Ny):\n return l5Ny.split('.')",
"def Y2KJ(l5Ny, K9NE):\n Rhv4 = [yAmx for yAmx in l5Ny.replace('!', '.').replace('?', '.').split('.')]\n wzNP = [yf2C(T2IP(x1CH(yAmx, K9NE))) for yAmx in l5Ny.replace('!', '.').replace('?', '.').split('.')]\n khGx = [K9NE(yAmx).vector for yAmx in wzNP]\n ... | [
"0.8246737",
"0.81249493",
"0.80643475",
"0.8014183",
"0.7850547",
"0.78394216",
"0.7787075",
"0.770226",
"0.77014863",
"0.7615479",
"0.74900234",
"0.74900234",
"0.73804504",
"0.7367105",
"0.73461807",
"0.73159736",
"0.7302279",
"0.7285127",
"0.72825885",
"0.72803146",
"0.723... | 0.7570544 | 10 |
Return dict of generated ngrams with number of occurences. >>> ngrams([1,2,5,1,2], 2) | def dPOE(DumB, exwG):
r9tF = {}
k4uh = len(DumB)
for YRbF in Ni9Y(k4uh - exwG + 1):
SMR4 = tuple(DumB[YRbF:YRbF + exwG])
r9tF[SMR4] = r9tF.get(SMR4, 0) + 1
return r9tF | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def q0q_(hIub):\n BWz1 = {}\n for a1PO in hIub:\n H5ew = WKO2(a1PO)\n if H5ew in BWz1:\n BWz1[H5ew] += 1\n else:\n BWz1[H5ew] = 1\n return BWz1",
"def Y908(vwCE, exwG):\n fMtn = dict()\n for YRbF in Ni9Y(len(vwCE) - exwG + 1):\n u8Mh = tuple(vwCE[Y... | [
"0.83145696",
"0.79901856",
"0.7651477",
"0.7514293",
"0.7459078",
"0.7364761",
"0.7297265",
"0.72768366",
"0.7273962",
"0.71394825",
"0.70060945",
"0.69731927",
"0.69476545",
"0.6938373",
"0.69341236",
"0.69320977",
"0.6853194",
"0.68412584",
"0.6790985",
"0.6779783",
"0.675... | 0.7834778 | 2 |
Normalize path to behave the same way under windows and unix The result returned by the script can be slightly different than returned by tempfile.gettempdir(), but equivalent (eg. trailing slashes, or case on windows). | def j4AN(YKHO, pmON):
return Hy7s.path.normpath(Hy7s.path.normcase(pmON)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tgbc(pmON: str) -> str:\n if lQ1Q == 'WSL':\n return pmON.replace('/', '\\\\')\n return pmON",
"def VFZ9(pmON):\n return Hy7s.path.abspath(Hy7s.path.expanduser(pmON))",
"def bTPP(pmON):\n if pmON is None:\n return None\n return Hy7s.path.abspath(Hy7s.path.expanduser(Hy7s.path.e... | [
"0.7818494",
"0.78165764",
"0.72872657",
"0.72717774",
"0.7216308",
"0.71680665",
"0.71201986",
"0.7000176",
"0.69925016",
"0.699066",
"0.6914385",
"0.68728125",
"0.6839477",
"0.6831662",
"0.6767004",
"0.6764507",
"0.6763272",
"0.67557406",
"0.6704108",
"0.66875094",
"0.66784... | 0.6981128 | 10 |
Packs a 32bit unsigned integer. | def yWcp(YRbF):
if not isinstance(YRbF, int):
raise TypeError('Must be an int')
elif YRbF.bit_length() > 32:
raise ValueError('Must be a 32bit value.')
return BlNT.pack('>I', YRbF) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Fh76(Csk6):\n return tMMy('<I', Csk6)",
"def K3A2(BWXx: bytes, dmhX: str='little', Zihr: bool=False) -> int:\n return MZ6z(BWXx, 32, dmhX, Zihr)",
"def S2nz(YKHO, wEf2):\n VcYD = BlNT.pack('>L', wEf2)\n YKHO.StoreBits((gLGo(VcYD), 32))",
"def cExT(*qIxc):\n HNC5 = ''\n for WKvO in qIxc:... | [
"0.7211658",
"0.7036173",
"0.68231976",
"0.67207664",
"0.67169887",
"0.6659006",
"0.6612813",
"0.65595245",
"0.6492883",
"0.64723843",
"0.6400573",
"0.6397588",
"0.6358023",
"0.63535374",
"0.63236547",
"0.631642",
"0.6274708",
"0.6269809",
"0.62476444",
"0.62476444",
"0.61933... | 0.7840479 | 0 |
IMPORTANT All files created on FTP for this test ARE NOT DELETED ON tearDown for security reasons. Also notice that all test are named test_NUMBER_... that's just an ugly hack to force order | def FCbF(YKHO):
YKHO._temp_files = list()
YKHO.host = ''
YKHO.port = 21
YKHO.user = ''
YKHO.password = ''
YKHO.temp_file_content = 'Hello, can you see me?'
YKHO.temp_file_on_ftp = 'test-you-can-delete-me.txt'
YKHO.temp_file = gbPf.NamedTemporaryFile(delete=False)
YKHO.temp_file.write... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tBIc(YKHO):\n YKHO.remove_test_files()",
"def tBIc(YKHO):\n for IznC in YKHO.fnames:\n R5Bl.unlink(IznC)",
"def tBIc(YKHO):\n for IznC in YKHO.fnames:\n Hy7s.remove(IznC)",
"def tBIc(YKHO):\n Hy7s.remove(YKHO.testfilename)",
"def tBIc(YKHO):\n for eHNT in Hy7s.listdir('/tmp... | [
"0.7233481",
"0.7181018",
"0.71489435",
"0.71340096",
"0.705852",
"0.6783461",
"0.67784953",
"0.67379665",
"0.6720946",
"0.6701504",
"0.6655789",
"0.66335166",
"0.66335166",
"0.66335166",
"0.6591785",
"0.65860134",
"0.6574243",
"0.6562178",
"0.6560275",
"0.65413",
"0.65290844... | 0.0 | -1 |
Since some peptides might be longer than the max sequence supported by this model, this helper expanded peptides by tiling over them and returns a 4 element tuple with the | def b5mO(YKHO, NN77, Crrw, _mSQ):
vHPW, c6ZQ, g8Iq = YKHO._tile_over_long_peptides(NN77)
assert len(vHPW) == len(c6ZQ) == len(g8Iq)
Mlmp = oyIN.array([Crrw[YRbF] for YRbF in c6ZQ])
GamQ = oyIN.array([_mSQ[YRbF] for YRbF in c6ZQ])
GamQ /= g8Iq
assert len(Mlmp) == len(GamQ) == len(vHPW)
assert... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lHli(NN77):\n uWDs = [57, 71, 87, 97, 99, 101, 103, 113, 114, 115, 128, 129, 131, 137, 147, 156, 163, 186]\n oDLd = []\n for M31e in NN77:\n for bMbF in uWDs:\n oDLd.append(M31e + bMbF)\n return oDLd",
"def wdjL(WhY1):\n return list(zip(WhY1[0::4], WhY1[1::4], WhY1[2::4], WhY... | [
"0.5989674",
"0.5774895",
"0.5774895",
"0.55495995",
"0.55242354",
"0.5476059",
"0.53260416",
"0.5271328",
"0.5233505",
"0.5153018",
"0.5136478",
"0.5134412",
"0.5122165",
"0.5118904",
"0.5113962",
"0.50631535",
"0.5051593",
"0.5027131",
"0.5018007",
"0.49797294",
"0.49720693... | 0.50765944 | 15 |
Get filename for metaObj If absoluteName is True the file name is absolute otherwise it is relative to the relevant baseDir | def gzF_(YKHO, VRVC, K43f=True, BQmU=False):
if K43f:
iiMj = [YKHO.rootDirName, YKHO.baseDirName]
else:
iiMj = []
if VRVC.container is None:
iiMj.append(rQfT.modellingPackageName)
if YKHO.codeDirName:
iiMj.append(YKHO.codeDirName)
iiMj.append(YKHO.rootFile... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PgHl(object, sx1R=None):\n if sx1R is None:\n sx1R = fQjr(object) or bEPt(object)\n return Hy7s.path.normcase(Hy7s.path.abspath(sx1R))",
"def Ux0P(YKHO):\n Ux0P = YKHO.use_name\n if YKHO.extension:\n Ux0P = '{0}.{1}'.format(YKHO.use_name, YKHO.extension)\n didV = pBmG.config.get(... | [
"0.7153405",
"0.6605777",
"0.64896375",
"0.63828737",
"0.6363132",
"0.6315062",
"0.62202597",
"0.6190266",
"0.6181392",
"0.61398834",
"0.6133548",
"0.6113686",
"0.6074031",
"0.606194",
"0.6028334",
"0.6018541",
"0.6017956",
"0.60136366",
"0.6003066",
"0.5993673",
"0.59935987"... | 0.81249905 | 0 |
Return the same kind of dictionary as our_outputs, but containing only unspent outputs. | def BReG(vLRc, gQVK):
sz11 = vLRc.copy()
for NtK1, UShr in gQVK.items():
tLY8 = UShr['vin']
for EpEn in tLY8:
dqOt = '{}:{}'.format(EpEn['txid'], EpEn['vout'])
if dqOt in vLRc:
del sz11[dqOt]
return sz11 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sz11(YKHO, ZieQ=None):\n return YKHO._call_account_method('unspentOutputs', {'filterOptions': ZieQ})",
"def eKRn(YKHO):\n return YKHO._call_account_method('addressesWithUnspentOutputs')",
"def Jvkf():\n o4Jx = {}\n for YEnM in vars(PJEB.output).values():\n if hasattr(YEnM, 'OUTPUT_NAME')... | [
"0.66805416",
"0.65701175",
"0.64093447",
"0.6388399",
"0.6225979",
"0.6151711",
"0.61398494",
"0.6084161",
"0.606322",
"0.58745074",
"0.5781394",
"0.5768739",
"0.57094604",
"0.56363976",
"0.56269735",
"0.56145483",
"0.5569536",
"0.5563832",
"0.550199",
"0.5496938",
"0.549693... | 0.72766113 | 0 |
The representation of this statement | def wHJl(YKHO):
return '%s[%s]' % (YKHO.index_type, YKHO.query) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wHJl(YKHO):\n sWfS = ''\n sWfS += str(YKHO.literal) + '\\n'\n sWfS += str(YKHO.bindings) + '\\n'\n sWfS += str(YKHO.facts) + '\\n'\n return sWfS",
"def wHJl(YKHO):\n return EyO9(vars(YKHO))",
"def wHJl(YKHO):\n U5bT = ''\n if T9yY(YKHO.root):\n U5bT += YKHO.root + '('\n ... | [
"0.72862864",
"0.72211355",
"0.71016175",
"0.7022621",
"0.69675",
"0.6941591",
"0.6890707",
"0.68829566",
"0.6853902",
"0.6853902",
"0.6853902",
"0.6853902",
"0.6853902",
"0.68460786",
"0.6841674",
"0.6835022",
"0.6835022",
"0.6835022",
"0.6835022",
"0.6835022",
"0.6835022",
... | 0.0 | -1 |
Creates a vehicle if the request path is /VehicleCreate | def bPL6(YKHO):
return 'Success' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def X0xe(YKHO):\n pB3N = {'user': YKHO.user, 'type': 'Ambulance', 'license_plate': 'AA-123-AA'}\n YKHO.client.post(IXbq, pB3N)\n vtfo = fC1M.objects.filter(user=YKHO.user, type=pB3N['type'], license_plate=pB3N['license_plate'])\n YKHO.assertTrue(vtfo)",
"def BXZd():\n L03z = iPDJ()\n if L03z.va... | [
"0.73406184",
"0.7029629",
"0.7024583",
"0.6749924",
"0.65953195",
"0.6421174",
"0.63027984",
"0.62136954",
"0.6189882",
"0.60633713",
"0.6053973",
"0.594588",
"0.59412247",
"0.5918387",
"0.59089935",
"0.59064823",
"0.59064823",
"0.5892016",
"0.5886901",
"0.58751124",
"0.5869... | 0.72765726 | 1 |
Initialize the wemo switch device. | def FIMM(YKHO, _AKB, w2IS):
QmBF.__init__(YKHO, _AKB, w2IS)
YKHO.device_type = YKHO._Parent._DeviceTypes.get('wemo_light')
YKHO.FEATURES.update({zxrT: True, aHIf: True, cxJf: 100}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, _AKB, w2IS):\n QmBF.__init__(YKHO, _AKB, w2IS)\n YKHO.device_type = YKHO._Parent._DeviceTypes.get('wemo_switch')\n YKHO.FEATURES.update({zxrT: False, aHIf: False, cxJf: False})",
"def z85L(YKHO):\n return",
"def DbxN(YKHO):\n YKHO.reset()\n YKHO.__interface.send_command('POWER_... | [
"0.6781631",
"0.67000526",
"0.66200083",
"0.65512633",
"0.64506453",
"0.6409576",
"0.6350889",
"0.63333046",
"0.6312037",
"0.62924767",
"0.6253098",
"0.6229048",
"0.62273324",
"0.6219736",
"0.6191489",
"0.61760354",
"0.61513036",
"0.61090803",
"0.6102186",
"0.6076614",
"0.606... | 0.6200799 | 14 |
Initialize the wemo switch device. | def FIMM(YKHO, _AKB, w2IS):
QmBF.__init__(YKHO, _AKB, w2IS)
YKHO.device_type = YKHO._Parent._DeviceTypes.get('wemo_switch')
YKHO.FEATURES.update({zxrT: False, aHIf: False, cxJf: False}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def z85L(YKHO):\n return",
"def DbxN(YKHO):\n YKHO.reset()\n YKHO.__interface.send_command('POWER_SETTING')\n YKHO.__interface.send_data(55)\n YKHO.__interface.send_data(0)\n YKHO.__interface.send_command('PANEL_SETTING')\n YKHO.__interface.send_data(207)\n YKHO.__interface.send_data(8)\n... | [
"0.67000526",
"0.66200083",
"0.65512633",
"0.64506453",
"0.6409576",
"0.6350889",
"0.63333046",
"0.6312037",
"0.62924767",
"0.6253098",
"0.6229048",
"0.62273324",
"0.6219736",
"0.6200799",
"0.6191489",
"0.61760354",
"0.61513036",
"0.61090803",
"0.6102186",
"0.6076614",
"0.606... | 0.6781631 | 0 |
Implies alpha parameter from the ATM normal volatility. | def Cwt5(YKHO):
eHNT, KCHu, a1PO, k0sL = (YKHO.f, YKHO.shift, YKHO.t, YKHO.v_atm_n)
UqYS, oZuG, Pasm = (YKHO.beta, YKHO.rho, YKHO.volvol)
return Cwt5(eHNT + KCHu, a1PO, k0sL, UqYS, oZuG, Pasm) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Cwt5(YKHO):\n H8rT = oyIN.sin(YKHO.omega())\n return YKHO.a1() / Z9rn.c * H8rT",
"def z6J6(YKHO, o4_K, DxNS):\n return max(0, (-o4_K * YKHO._psi + epAf.sqrt(o4_K ** 2 * YKHO._phi ** 4 / 4 + DxNS * YKHO._phi ** 2 * YKHO._xi)) / (DxNS * YKHO._xi))",
"def iJgB(C3ST):\n jzdc = C3ST.params.alpha_pri... | [
"0.67842203",
"0.6536301",
"0.6473875",
"0.6356771",
"0.63168865",
"0.62779045",
"0.62022036",
"0.61800414",
"0.61585456",
"0.6137045",
"0.6111133",
"0.611044",
"0.60996604",
"0.6096841",
"0.60243607",
"0.6019985",
"0.600591",
"0.59857184",
"0.5982693",
"0.593025",
"0.5925332... | 0.77537096 | 0 |
Hagan's 2002 f minus k ratio formula (B.67a). | def KVXB(eHNT, G1Hx, UqYS):
SGf8 = 1e-07
if abs(eHNT - G1Hx) > SGf8:
if abs(1 - UqYS) > SGf8:
return (1 - UqYS) * (eHNT - G1Hx) / (eHNT ** (1 - UqYS) - G1Hx ** (1 - UqYS))
else:
return (eHNT - G1Hx) / oyIN.log(eHNT / G1Hx)
else:
return G1Hx ** UqYS | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pDxq(LVAh, iWzb, SSKv, KjaM, UqYS, kTwQ, oZuG):\n TYzN = 1.0 - UqYS\n YAye = TYzN * TYzN\n if SSKv != LVAh:\n woig = SSKv * LVAh\n B9W8 = epAf.pow(woig, TYzN / 2.0)\n LJ0w = epAf.log(SSKv / LVAh)\n epBp = kTwQ / KjaM * B9W8 * LJ0w\n WKvO = epAf.log((epAf.sqrt(1.0 - 2... | [
"0.6478672",
"0.64695257",
"0.6409994",
"0.63936585",
"0.6326703",
"0.627741",
"0.6237583",
"0.61376715",
"0.61229515",
"0.608743",
"0.60761917",
"0.6071998",
"0.6022832",
"0.60136616",
"0.60024124",
"0.59882283",
"0.5971131",
"0.5964748",
"0.59607166",
"0.5951144",
"0.592556... | 0.6054674 | 12 |
Compute SABR parameter alpha from an ATM normal volatility. Alpha is determined as the root of a 3rd degree polynomial. Return a single scalar alpha. | def Cwt5(eHNT, a1PO, k0sL, UqYS, oZuG, Pasm):
TYyO = eHNT ** (1 - UqYS)
XP5J = [-UqYS * (2 - UqYS) / (24 * TYyO ** 2) * a1PO * eHNT ** UqYS, a1PO * eHNT ** UqYS * oZuG * UqYS * Pasm / (4 * TYyO), (1 + a1PO * Pasm ** 2 * (2 - 3 * oZuG ** 2) / 24) * eHNT ** UqYS, -k0sL]
YPJ1 = oyIN.roots(XP5J)
ejIZ = oyIN... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Cwt5(YKHO):\n eHNT, KCHu, a1PO, k0sL = (YKHO.f, YKHO.shift, YKHO.t, YKHO.v_atm_n)\n UqYS, oZuG, Pasm = (YKHO.beta, YKHO.rho, YKHO.volvol)\n return Cwt5(eHNT + KCHu, a1PO, k0sL, UqYS, oZuG, Pasm)",
"def THNF(epBp, WKvO, UqYS):\n eHNT = lambda jzdc: jzdc - UqYS / 2 * PZyS(WKvO ** 2 + 4 * (1 + WKvO)... | [
"0.7562916",
"0.7035309",
"0.6903913",
"0.68692124",
"0.67685026",
"0.66871417",
"0.6466509",
"0.6448226",
"0.64276",
"0.6413284",
"0.6391889",
"0.6351715",
"0.63226056",
"0.6322114",
"0.63196594",
"0.6265549",
"0.62475973",
"0.6193508",
"0.6160172",
"0.6121254",
"0.6107339",... | 0.72554344 | 1 |