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 |
|---|---|---|---|---|---|---|
Calculates the "distance" from `one` to `two` using the 2norm. That's the difference between hard and soft decoding! Assumes len(one) == len(two) == 2. | def pImw(YKHO, a0GJ, TLv5):
return oyIN.sqrt((a0GJ[0] - TLv5[0]) ** 2 + (a0GJ[1] - TLv5[1]) ** 2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LhCJ(YKHO, a0GJ, TLv5):\n Jw7X = a0GJ.x - TLv5.x\n eUWA = a0GJ.y - TLv5.y\n return epAf.sqrt(Jw7X * Jw7X + eUWA * eUWA)",
"def pImw(YKHO, a0GJ, TLv5):\n return sum((a0GJ[0] != TLv5[0], a0GJ[1] != TLv5[1]))",
"def A8hk(jzdc, Fg_i):\n return oyIN.sqrt(oyIN.sum((jzdc - Fg_i) ** 2))",
"def s7y... | [
"0.707182",
"0.701687",
"0.6861951",
"0.6842525",
"0.68095803",
"0.6804894",
"0.67806137",
"0.676701",
"0.6712558",
"0.6705202",
"0.6693495",
"0.6692881",
"0.6685786",
"0.6627979",
"0.66191596",
"0.6604278",
"0.66015995",
"0.6579138",
"0.65773344",
"0.6572661",
"0.6564942",
... | 0.79897654 | 0 |
Return True if `ancestor` is an ancestor of `child`, QObjecttreewise. | def rqVP(F_G6, aUGN):
while aUGN is not None:
if aUGN is F_G6:
return True
aUGN = aUGN.parent()
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hdkC(F_G6, _AKB):\n try:\n Yn3K.check_call(['git', 'merge-base', '--is-ancestor', F_G6, _AKB])\n return True\n except Yn3K.CalledProcessError:\n return False",
"def hdkC(YKHO, Elif):\n if Elif is YKHO:\n return True\n elif hasattr(Elif, 'base'):\n return YKHO.is... | [
"0.7371715",
"0.7361766",
"0.6966555",
"0.68548286",
"0.6693012",
"0.66637033",
"0.6605285",
"0.65904605",
"0.6562593",
"0.6367331",
"0.63378483",
"0.62433606",
"0.6171506",
"0.6167557",
"0.5997285",
"0.59555304",
"0.59499377",
"0.5750634",
"0.5721365",
"0.56865203",
"0.56593... | 0.8260295 | 0 |
Get all nodes in a graph. | def Ziit(YKHO, nPrm: bool=True) -> cuzp:
return YKHO.graph.nodes(nPrm) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qmh8(YKHO):\n return YKHO._get_all_nodes()",
"def gjdY(pNZh):\n return pNZh.get_nodes()",
"def JqV7(YKHO, _63S=None):\n JZXy = YKHO._source(_63S)\n return YKHO._list(JZXy, 'all')",
"def AyQV(YKHO):\n return list(YKHO.graph.nodes)",
"def Ziit(YKHO):\n Ziit = list()\n for Q6kx in YKH... | [
"0.77091503",
"0.760868",
"0.7549968",
"0.7536263",
"0.745354",
"0.7450652",
"0.7413506",
"0.7399367",
"0.73982674",
"0.7393966",
"0.7385526",
"0.73451203",
"0.7320129",
"0.7149469",
"0.71483934",
"0.71285284",
"0.71285284",
"0.70991033",
"0.7025902",
"0.69661707",
"0.694417"... | 0.6046957 | 89 |
Check whether a given edge exists in the graph. | def IWu0(YKHO, XEGX: str, w5L3: str, qfLK: Optional[str]=None) -> bool:
return YKHO.graph.has_edge(XEGX, w5L3, key=qfLK) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sjXf(YKHO, D70y):\n return D70y in YKHO.edges",
"def IWu0(YKHO, kwf7):\n return kwf7 in YKHO.edges",
"def FYXB(YKHO, D70y):\n return D70y in YKHO._edges",
"def lYAp(YKHO, IDWK, rdjO):\n return YKHO.vertices[IDWK].does_it_point_to(YKHO.vertices[rdjO])",
"def tWZB(YKHO, Q6kx, FYCJ):\n retu... | [
"0.77678376",
"0.76000905",
"0.7549828",
"0.7353355",
"0.7337852",
"0.7167825",
"0.71188307",
"0.69278324",
"0.6914114",
"0.6906198",
"0.68406177",
"0.67502916",
"0.67278266",
"0.6700696",
"0.6618549",
"0.6605293",
"0.65771097",
"0.6553928",
"0.653476",
"0.65278673",
"0.64212... | 0.75051755 | 3 |
Returns the number of edges in a graph. Returns int | def fOCg(YKHO) -> int:
return YKHO.graph.number_of_edges() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oklI(YKHO):\n try:\n return YKHO.edges\n except:\n print('ERROR: No graph exists')",
"def L1_y(YKHO) -> int:\n return YKHO._n_edges",
"def ann4(pNZh):\n return sum([len(pNZh[J078].keys()) for J078 in pNZh.keys()]) / 2",
"def L1_y(YKHO):\n return int(sum((YKHO.degree(Q6kx) for... | [
"0.84171635",
"0.8363548",
"0.83126014",
"0.8200226",
"0.8197102",
"0.8184014",
"0.8145859",
"0.8136901",
"0.813491",
"0.8114597",
"0.8098173",
"0.8067217",
"0.8061981",
"0.7983248",
"0.7976524",
"0.79012674",
"0.775356",
"0.7750693",
"0.77065814",
"0.7648719",
"0.76378673",
... | 0.85889 | 0 |
Return the amount of seconds in the given hours, minutes and seconds. | def bQkZ(Wave, O66n, C6wh):
return Wave * 3600 + O66n * 60 + C6wh | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bQkZ(Wave, O66n, C6wh):\n return Wave * 60 ** 2 + O66n * 60 + C6wh",
"def bQkZ(Wave, O66n, C6wh):\n return Wave * 3600 + O66n * 60 + C6wh",
"def mlck(Wave):\n return int(Wave * 3600)",
"def fsjN(kRsb):\n return int(kRsb - rbGV(kRsb) * 3600 - bG7X(kRsb) * 60)",
"def UThU(Wave: int) -> int:\n... | [
"0.8396335",
"0.81968415",
"0.77937186",
"0.7690401",
"0.74884737",
"0.7384871",
"0.73680025",
"0.72977984",
"0.7262264",
"0.7246769",
"0.7189427",
"0.71467364",
"0.71397495",
"0.71044165",
"0.7064364",
"0.70461124",
"0.70402586",
"0.7024502",
"0.70112914",
"0.69861704",
"0.6... | 0.8334056 | 1 |
Just a simple wrapper to catch division by zero errors. | def pN7q(j9Y_, EkqX, WmM4=None):
try:
return ZjSO(str(j9Y_)) / ZjSO(str(EkqX))
except (j8Cx, oL9G, Dutl):
if WmM4:
return WmM4
return 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rAjW(jzdc, Fg_i):\n if Fg_i == 0:\n raise ZeroDivisionError",
"def hFiK(_1qI, zDMu):\n try:\n return _1qI / zDMu\n except ZeroDivisionError:\n print('Handled division by zero. Returning zero.')\n return 0",
"def toEP():\n try:\n print(324 / 0)\n except Zero... | [
"0.8274809",
"0.8263087",
"0.81263286",
"0.7754147",
"0.7683689",
"0.76218987",
"0.76123476",
"0.75604194",
"0.7498887",
"0.741882",
"0.73985213",
"0.7379615",
"0.7375117",
"0.7356776",
"0.7346022",
"0.72581375",
"0.72404",
"0.711731",
"0.7061548",
"0.70211583",
"0.698808",
... | 0.6545747 | 36 |
Generate a random secret token. | def GSyo(bytes):
return G9jH.info(MRxC.b2a_hex(Hy7s.urandom(bytes))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LQUb():\n gLiZ = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'\n ADdS = tuKI.SystemRandom()\n BWvy = ''.join((ADdS.choice(gLiZ) for bGrB in range(40)))\n return W7gX.new(GPtr.SECRET_KEY, BWvy, HBct.sha256).hexdigest()",
"def LQUb(YKHO):\n eOtH = ajWY(100000000000000000, 9999... | [
"0.84882534",
"0.778233",
"0.7721034",
"0.7646876",
"0.74951106",
"0.74162614",
"0.73780096",
"0.7292843",
"0.72551775",
"0.7192354",
"0.71424663",
"0.7116661",
"0.71128446",
"0.7102652",
"0.710143",
"0.70217425",
"0.7007748",
"0.69886214",
"0.6977222",
"0.6928419",
"0.692832... | 0.0 | -1 |
This returns a new SnliInstance with a different label. | def q1RW(YKHO):
if YKHO.label == YKHO.label_mapping['entails'] or YKHO.label == YKHO.label_mapping['contradicts']:
O28k = 'attention_true'
elif YKHO.label == YKHO.label_mapping['neutral']:
O28k = 'attention_false'
else:
raise RuntimeError("Can't convert " + str(YKHO.label) + ' to an ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def s50S(Emd4, UXqs):\n return Emd4(UXqs.specimen_id, UXqs.views)",
"def FIMM(YKHO, UXqs):\n YKHO.label = UXqs",
"def FIMM(YKHO, UXqs: str):\n pass",
"def nrOS(YKHO, *qIxc, **B2fa) -> aPd6:\n UXqs = YKHO._label_adapter.create_label(*qIxc, document=YKHO._document, **B2fa)\n YKHO._current_labels... | [
"0.6165852",
"0.6081733",
"0.6060745",
"0.5987793",
"0.583477",
"0.5806856",
"0.573119",
"0.56577414",
"0.56361556",
"0.5527584",
"0.5507143",
"0.5471564",
"0.5458686",
"0.5415453",
"0.5415259",
"0.53921777",
"0.5352919",
"0.53397983",
"0.53354985",
"0.53312767",
"0.5325046",... | 0.5890569 | 4 |
This returns a new SnliInstance with a different label. The new label will be binary (entails / not entails), but we need to distinguish between two different label types. Sometimes we need the label to be encoded in a single dimension (i.e., either `0` or `1`), and sometimes we need it to be encoded in two dimensions ... | def brjl(YKHO, YDYE: str):
if YKHO.label == YKHO.label_mapping['entails']:
O28k = 'entails'
elif YKHO.label == YKHO.label_mapping['neutral'] or YKHO.label == YKHO.label_mapping['contradicts']:
O28k = 'not_entails'
else:
raise RuntimeError("Can't convert " + str(YKHO.label) + ' to an ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def q1RW(YKHO):\n if YKHO.label == YKHO.label_mapping['entails'] or YKHO.label == YKHO.label_mapping['contradicts']:\n O28k = 'attention_true'\n elif YKHO.label == YKHO.label_mapping['neutral']:\n O28k = 'attention_false'\n else:\n raise RuntimeError(\"Can't convert \" + str(YKHO.labe... | [
"0.69053423",
"0.6342885",
"0.6028976",
"0.5929179",
"0.5884997",
"0.5867978",
"0.5857494",
"0.5857124",
"0.56711537",
"0.5654825",
"0.56493825",
"0.5632242",
"0.55979145",
"0.5586989",
"0.5569911",
"0.5564142",
"0.5561175",
"0.5529135",
"0.5528745",
"0.55137444",
"0.5511393"... | 0.63832754 | 1 |
SMOTE to correct for imbalanced data on training set only. | def JJ2c(FYrf, Lcqa, VJv0):
print('SMOTE...')
vg0C = f6jb.SMOTE(random_state=42, n_jobs=2)
Lcqa, VJv0 = vg0C.fit_sample(Lcqa, VJv0)
for r8hN in FYrf:
a2D8 = len(Lcqa[VJv0 == r8hN])
return (Lcqa, VJv0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tTNs(YKHO):\n KHu6 = arcw()\n YKHO.X_train, YKHO.y_train = KHu6.fit_resample(YKHO.X_train, YKHO.y_train)",
"def Pzy6(YKHO, RDhP, gZ1O, t3eI=0):\n HBiF = arcw(random_state=0)\n vjz0, akWL = HBiF.fit_sample(RDhP, gZ1O)\n print('Warning: You are increasing the dataset to balance the data\\n')\n ... | [
"0.71241504",
"0.63493407",
"0.58541244",
"0.57468057",
"0.5711068",
"0.56028295",
"0.560007",
"0.55782914",
"0.5574103",
"0.55056715",
"0.5397866",
"0.53328216",
"0.53048587",
"0.5282733",
"0.5244319",
"0.5239389",
"0.5227761",
"0.52076864",
"0.51859105",
"0.51831734",
"0.51... | 0.6019532 | 2 |
Clear just_cheated_x attribute corresponding to the rolled die. | def TB7U(YKHO, t9gJ):
if type(t9gJ) != type([]):
raise TypeError("Expecting list of strings argument containing any combination of 'a' and 'b'.")
else:
for mS46 in t9gJ:
if type(mS46) != type('') or mS46 not in ['a', 'b']:
raise TypeError("Expecting argument containin... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Qk4r(YKHO):\n YKHO.damaged.clear()\n YKHO.all_damaged = False",
"def QM4i(YKHO):\n YKHO.new_angry_dice.just_cheated_a = True\n YKHO.new_angry_dice.just_cheated_b = True\n YKHO.new_angry_dice.clear_just_cheated(['a'])\n YKHO.assertEqual(YKHO.new_angry_dice.just_cheated_a, False, 'The just_ch... | [
"0.6093966",
"0.60897785",
"0.59165394",
"0.58398616",
"0.57415193",
"0.57077104",
"0.57070756",
"0.5687656",
"0.56513035",
"0.56294996",
"0.55960155",
"0.5559307",
"0.5512523",
"0.54636306",
"0.5463037",
"0.5454732",
"0.5392828",
"0.53846973",
"0.5384",
"0.5349258",
"0.53488... | 0.61247575 | 0 |
Reading a file and returning a list of lines | def lXJo(AesY):
with open(AesY, 'r') as eHNT:
return [vC9B.strip() for vC9B in eHNT.readlines()] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HbNy(IznC):\n return []",
"def ZLVQ(Ux0P):\n with open(Ux0P) as apum:\n Nqlg = apum.readlines()\n return [zFiD.strip() for zFiD in Nqlg]",
"def trZt(pmON: str) -> x1iM[str]:\n if Hy7s.path.isfile(pmON):\n with open(pmON, 'r') as eHNT:\n Nqlg = eHNT.readlines()\n else... | [
"0.84100485",
"0.8372363",
"0.83242637",
"0.8291465",
"0.8244524",
"0.82229877",
"0.8174983",
"0.8135221",
"0.80979735",
"0.80869704",
"0.8050238",
"0.8036265",
"0.802061",
"0.7977255",
"0.7959579",
"0.79514414",
"0.7941957",
"0.79132456",
"0.7906682",
"0.7884006",
"0.7854082... | 0.7476133 | 42 |
Convert a sequence of sequences to a string with the given separator. For each inner sequence, seq_to_str is called with the "inner" arguments. | def ugKl(Q6uT, VWe_='\n', _evN=True, eZ2b='\n', fEcm='\n', Uubp=' ', d0d6=False, oIjM=' ', Y5dc=''):
Aofo = ''
if _evN:
Aofo += '%d%s' % (len(Q6uT), eZ2b)
Aofo += VWe_.join((Pm5x(KCHu, sep=Uubp, with_len=d0d6, len_sep=oIjM, end_sep=Y5dc) for KCHu in Q6uT)) + fEcm
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Pm5x(Q6uT, VWe_='\\n', _evN=True, eZ2b='\\n', fEcm='\\n'):\n Aofo = ''\n if _evN:\n Aofo += '%d%s' % (len(Q6uT), eZ2b)\n Aofo += VWe_.join((str(YRbF) for YRbF in Q6uT)) + fEcm\n return Aofo",
"def IP24(Q6uT):\n return ','.join(map(eb4L, Q6uT))",
"def gzes(VWe_, Q6uT):\n return D5U5... | [
"0.70367473",
"0.6647186",
"0.635488",
"0.6172872",
"0.6056115",
"0.6009292",
"0.6006598",
"0.5889126",
"0.5838938",
"0.5814085",
"0.5777865",
"0.57107055",
"0.5698392",
"0.5656473",
"0.55281365",
"0.55090827",
"0.55077714",
"0.5496044",
"0.5444832",
"0.54382753",
"0.5428676"... | 0.716984 | 0 |
Starting from sequential data, the batchify() arranges the dataset intp columns, trimming off any tokens remaining after the data has been divided into batches of size batch_size | def inEx(tc7y, nPrm, Ep8u, begE):
nPrm = tc7y.numericalize([nPrm.examples[0].text])
PmAP = nPrm.size(0) // Ep8u
nPrm = nPrm.narrow(0, 0, PmAP * Ep8u)
nPrm = nPrm.view(Ep8u, -1).t().contiguous()
return nPrm.to(begE) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def inEx(nPrm, Ep8u, qIxc):\n wlx8 = nPrm.size(0) // Ep8u\n nPrm = nPrm.narrow(0, 0, wlx8 * Ep8u)\n nPrm = nPrm.view(Ep8u, -1)\n if qIxc.cuda:\n nPrm = nPrm.cuda()\n return nPrm",
"def bxf_(nPrm: nd.NDArray, Ep8u):\n wlx8 = len(nPrm) // Ep8u\n nPrm = nPrm[0:wlx8 * Ep8u]\n nPrm = nP... | [
"0.7297938",
"0.7251288",
"0.6872428",
"0.68177694",
"0.6600222",
"0.6571178",
"0.641436",
"0.63890374",
"0.6384236",
"0.63660455",
"0.6326783",
"0.6313386",
"0.62811315",
"0.62690556",
"0.6256025",
"0.625531",
"0.6204216",
"0.61977667",
"0.6187933",
"0.61774594",
"0.6166082"... | 0.65878534 | 5 |
Return the filtered queryset based on the value provided in the query string. | def SR0I(YKHO, QePW: HttpRequest, SR0I: QuerySet) -> ZYvt:
return {'superuser': SR0I.filter(is_superuser=True), 'staff': SR0I.filter(is_staff=True), 'scanlator': SR0I.filter(groups__name='Scanlator'), 'regular': SR0I.exclude(is_staff=True)}.get(YKHO.value() or '', SR0I) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k66M(YKHO):\n umWR = super().get_queryset()\n HI6H = YKHO.request.GET.get('search_box')\n if HI6H is not None:\n umWR = umWR.search_by(HI6H)\n return umWR",
"def SR0I(YKHO, QePW, SR0I):\n if YKHO.value() is None:\n return SR0I.all()\n return SR0I.filter(firm__pk=YKHO.value())"... | [
"0.7024135",
"0.6897933",
"0.6748511",
"0.66725063",
"0.6627247",
"0.65580183",
"0.6539171",
"0.653511",
"0.648303",
"0.6478353",
"0.64393246",
"0.64334667",
"0.6348668",
"0.6341871",
"0.6338102",
"0.6323467",
"0.63224304",
"0.6288785",
"0.62858015",
"0.62451816",
"0.62451565... | 0.5874862 | 46 |
Get the scanlator status of the user. | def VY7p(YKHO) -> bool:
return YKHO.groups.filter(name='Scanlator').exists() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ByGp(Emd4):\n return pz3A(status=Emd4._user_status())",
"def jGRS(YKHO):\n return YKHO._query_status()['status']",
"def VLTN(YKHO):\n return YKHO.status",
"def VLTN(YKHO):\n return YKHO.status",
"def VLTN(YKHO):\n return YKHO.status",
"def VLTN(YKHO):\n return YKHO.read_register(259... | [
"0.6683924",
"0.6497763",
"0.6488896",
"0.6488896",
"0.6488896",
"0.6488289",
"0.64799196",
"0.6430905",
"0.6422595",
"0.6407763",
"0.6368498",
"0.63034356",
"0.6261872",
"0.625344",
"0.6237864",
"0.6233514",
"0.621384",
"0.621384",
"0.6200417",
"0.6188729",
"0.61505544",
"... | 0.0 | -1 |
Get the full name of the user. | def eHMM(YKHO, YEnM: User) -> str:
return YEnM.get_full_name() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eHMM(YKHO):\n return YKHO.user.get_full_name() or None",
"def Q1ao(YKHO):\n mS46 = YKHO.get_user()\n if mS46:\n return mS46.getProperty('fullname')",
"def xpqj(YKHO):\n return YKHO.username",
"def xpqj(YKHO):\n return YKHO.username",
"def IQH1(YKHO):\n eHMM = f'{YKHO.f_name} {Y... | [
"0.87690705",
"0.8747",
"0.8724583",
"0.8724583",
"0.8621909",
"0.86065215",
"0.8583411",
"0.8547224",
"0.8546757",
"0.8494118",
"0.8471809",
"0.84096867",
"0.8402171",
"0.83782655",
"0.8303755",
"0.8250958",
"0.8177631",
"0.81676626",
"0.81320035",
"0.8117729",
"0.806362",
... | 0.82100075 | 16 |
Return a string representing the object. | def zAg0(YKHO) -> str:
return f'{YKHO.name} ({YKHO.provider})' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__dict__['_obj'])",
"def zAg0(YKHO):\n return str(YKHO.obj)",
"def zAg0(YKHO):\n return '__str__ for Object'",
"def zAg0(YKHO):\n return str(YKHO.__dict__)",
"def zAg0(YKHO):\n return str(YKHO.__dict__)",
"def HRRg(YKHO, YEnM):\n if YKHO.pretty:\n ... | [
"0.8366619",
"0.8253037",
"0.80648184",
"0.7979195",
"0.7979195",
"0.7961396",
"0.7948838",
"0.7868511",
"0.7846744",
"0.7846744",
"0.7846744",
"0.7846744",
"0.7846744",
"0.7820616",
"0.77964026",
"0.77852654",
"0.77786344",
"0.7751776",
"0.7751776",
"0.7751776",
"0.7746966",... | 0.0 | -1 |
Takes a DataFrame and saves it as a CSV file. | def bJJP(bOBl, Ux0P):
with open(Ux0P, 'w', encoding='utf8') as _RR0:
bOBl.to_csv(_RR0, sep=',') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eFxq(Kiac, qaEx):\n Kiac.to_csv(qaEx)\n return None",
"def xMnm(gIsw, bOBl):\n print('\\nSaved result to {}\\n'.format(gIsw))\n bOBl.to_csv(gIsw, mode='a', header=False, index=False)",
"def Edt8(jQ3Z, Jmpp):\n jQ3Z.to_csv(Jmpp, index=False)",
"def ihWX(jQ3Z):\n if Hy7s.path.exists('file... | [
"0.8289829",
"0.8062362",
"0.7988541",
"0.7987734",
"0.7897614",
"0.7866384",
"0.77966964",
"0.77878785",
"0.77680683",
"0.7750325",
"0.7651082",
"0.76436794",
"0.76303864",
"0.76124233",
"0.76009506",
"0.75601083",
"0.7545807",
"0.75314903",
"0.7523139",
"0.75217366",
"0.746... | 0.8487915 | 0 |
Create a schedule with a learning rate that decreases following the values of the cosine function between the initial lr set in the optimizer to 0, after a warmup period during which it increases linearly between 0 and the initial lr set in the optimizer. | def MIxn(K0do: Optimizer, USzt: int, aNjR: int, rabA: float=0.5, IKjI: int=-1):
def EAQd(cVyJ):
if cVyJ < USzt:
return float(cVyJ) / float(max(1, USzt))
Eb4t = float(cVyJ - USzt) / float(max(1, aNjR - USzt))
return max(0.0, 0.5 * (1.0 + epAf.cos(epAf.pi * float(rabA) * 2.0 * Eb4... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZT_s(Zbwy):\n return lambda qtWj: 1.0",
"def rVs8(K0do: torch.optim.Optimizer, ABAq: int, vHjL: Optional[float]=None, wbn8: Optional[int]=None, MQ77: float=1.0 / 1000) -> ht2j.optim.lr_scheduler._LRScheduler:\n if vHjL is None and wbn8 is None:\n raise ValueError('You must define either pct_star... | [
"0.6967163",
"0.6898374",
"0.6894173",
"0.68814844",
"0.68814844",
"0.6820696",
"0.68103194",
"0.6796456",
"0.6787354",
"0.67858905",
"0.6777413",
"0.677703",
"0.6745729",
"0.66972697",
"0.66934925",
"0.6689289",
"0.6657276",
"0.65717137",
"0.65697855",
"0.6554842",
"0.653776... | 0.655485 | 19 |
Close the underlying connection without returning it to the pool. | def yCDO(YKHO):
if YKHO.is_closed():
return False
w2B8 = YKHO.connection()
YKHO._in_use.pop(YKHO.conn_key(w2B8), None)
YKHO.close()
YKHO._close(w2B8, close_conn=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DDI8(YKHO):\n if YKHO._con is not None:\n YKHO._pool.returnConnection(YKHO._con)\n YKHO._con = None",
"def DDI8(YKHO):\n with YKHO.connlock:\n YKHO.conn.do_close()",
"def DDI8(YKHO):\n if not YKHO.connection:\n return\n YKHO.connection.close()\n YKHO.connection = ... | [
"0.8193281",
"0.7695636",
"0.76289475",
"0.754914",
"0.7496222",
"0.7477636",
"0.74679375",
"0.74518347",
"0.74428105",
"0.7429108",
"0.7395676",
"0.73953724",
"0.7394828",
"0.73835135",
"0.7379031",
"0.73761666",
"0.73584384",
"0.7340392",
"0.7337949",
"0.73361313",
"0.73157... | 0.69867504 | 52 |
Factory for creating a DatasetUploader using production settings. | def WOIp(H3tg, Rals):
return wau6(H3tg, Sa_m.make_sia_client(), Mzcl.make_waiter(Rals), Rals) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M_QP(YKHO) -> pVAc:\n return YKHO._custom_data_loader()",
"def KWNw(__n6: Dataset, _Fei: trainer_configs.BaseDatasetConfig, Ep8u: int, *, QxcP: Optional[Callable[[List[Any]], Any]]=None) -> pVAc:\n return pVAc(__n6, batch_size=Ep8u, shuffle=_Fei.shuffle, num_workers=_Fei.num_workers, drop_last=_Fei.dro... | [
"0.62301743",
"0.6095822",
"0.60810554",
"0.5985217",
"0.5974425",
"0.59560555",
"0.59413296",
"0.58990353",
"0.58819467",
"0.58491737",
"0.5846084",
"0.5836595",
"0.58215916",
"0.5816171",
"0.58023167",
"0.5789928",
"0.57702106",
"0.5765083",
"0.57467026",
"0.5697352",
"0.56... | 0.5589572 | 28 |
Creates a new DatasetUploader instance. | def FIMM(YKHO, H3tg, EZA7, AxXC, Rals):
YKHO._upload_queue = H3tg
YKHO._sia_client = EZA7
YKHO._sia_condition_waiter = AxXC
YKHO._exit_event = Rals | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rHzL(YKHO, **B2fa):\n return pVAc(YKHO, **B2fa)",
"def M_QP(YKHO) -> pVAc:\n return pVAc(YKHO.test_dataset, batch_size=YKHO.hparams.batch_size, shuffle=False, num_workers=laXl.cpu_count())",
"def KmTC(YKHO, nPrm, **B2fa):\n if nPrm is None:\n return None\n GPtr = {**YKHO.config['train_co... | [
"0.6825156",
"0.67535233",
"0.66384614",
"0.6605796",
"0.6599184",
"0.65129477",
"0.6508764",
"0.65066624",
"0.6478104",
"0.6473745",
"0.64697295",
"0.64686304",
"0.6467938",
"0.64676327",
"0.6427608",
"0.6329636",
"0.62843245",
"0.62626386",
"0.62377393",
"0.6232635",
"0.616... | 0.0 | -1 |
True if two arrays, left and right, have equal nonNaN elements, and NaNs in corresponding locations. False otherwise. It is assumed that left and right are NumPy arrays of the same dtype. The behavior of this function (particularly with respect to NaNs) is not defined if the dtypes are different. | def Pbh2(LFlW, _tIi, zlPX=False):
LFlW, _tIi = (oyIN.asarray(LFlW), oyIN.asarray(_tIi))
if LFlW.shape != _tIi.shape:
return False
if bTVX(LFlW) or bTVX(_tIi):
if not zlPX:
return _e0h.array_equivalent_object(YZDa(LFlW.ravel()), YZDa(_tIi.ravel()))
for GikO, miQm in zip(LF... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AWRN(XOOk, pHXX):\n try:\n XOOk, pHXX = (oyIN.asarray(XOOk), oyIN.asarray(pHXX))\n except Exception:\n return False\n if XOOk.shape != pHXX.shape:\n return False\n WsQG, yh5d = (oyIN.isnan(XOOk), oyIN.isnan(pHXX))\n if not (WsQG == yh5d).all():\n return False\n ret... | [
"0.77027184",
"0.7098412",
"0.682699",
"0.67512697",
"0.6693697",
"0.65482426",
"0.6519363",
"0.6425628",
"0.6414976",
"0.6280379",
"0.6228744",
"0.6224679",
"0.62139237",
"0.6212381",
"0.61686844",
"0.6166839",
"0.6153617",
"0.61487854",
"0.61004955",
"0.6092569",
"0.6088238... | 0.82189834 | 0 |
infer the fill value for the nan/NaT from the provided scalar/ndarray/listlike if we are a NaT, return the correct dtyped element to provide proper block construction | def n3ef(wEf2):
if not Kuz2(wEf2):
wEf2 = [wEf2]
wEf2 = oyIN.array(wEf2, copy=False)
if NyAQ(wEf2):
return oyIN.array('NaT', dtype=wEf2.dtype)
elif GhdM(wEf2.dtype):
yDqo = _e0h.infer_dtype(YZDa(wEf2))
if yDqo in ['datetime', 'datetime64']:
return oyIN.array('... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def x7Dv(qw7D):\n or8S = oyIN.arange(qw7D.shape[0])\n W3Xw = oyIN.where(oyIN.isfinite(qw7D))\n pTn1 = _anc.interp1d(or8S[W3Xw], qw7D[W3Xw], bounds_error=False)\n return oyIN.where(oyIN.isfinite(qw7D), qw7D, pTn1(or8S))",
"def x7Dv(k0lF):\n noZV = oyIN.arange(k0lF.shape[0])\n W3Xw = oyIN.where(o... | [
"0.62822986",
"0.61665845",
"0.60879344",
"0.607589",
"0.60758805",
"0.6065",
"0.60577345",
"0.60004556",
"0.5966257",
"0.59631926",
"0.5933353",
"0.59052914",
"0.58782446",
"0.5829862",
"0.5816821",
"0.57602626",
"0.5698528",
"0.5687225",
"0.5672501",
"0.56494015",
"0.564270... | 0.7608484 | 0 |
if we have a compatiable fill_value and arr dtype, then fill | def els9(ezWE, xgWT=oyIN.nan):
if VKq4(ezWE, xgWT):
ezWE.fill(xgWT)
return ezWE | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n3ef(wEf2):\n if not Kuz2(wEf2):\n wEf2 = [wEf2]\n wEf2 = oyIN.array(wEf2, copy=False)\n if NyAQ(wEf2):\n return oyIN.array('NaT', dtype=wEf2.dtype)\n elif GhdM(wEf2.dtype):\n yDqo = _e0h.infer_dtype(YZDa(wEf2))\n if yDqo in ['datetime', 'datetime64']:\n retur... | [
"0.7154746",
"0.66281444",
"0.64221364",
"0.6418418",
"0.63861954",
"0.6376564",
"0.6329606",
"0.6304048",
"0.6267058",
"0.6235196",
"0.62289536",
"0.62234855",
"0.62154794",
"0.61920124",
"0.61202973",
"0.6117986",
"0.60500056",
"0.6016399",
"0.59837204",
"0.5981334",
"0.597... | 0.786033 | 0 |
Number of lattice sites. | def o_jE(YKHO) -> int:
return len(YKHO.A) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def exwG(YKHO):\n return len(YKHO.data.sites)",
"def fiDj(YKHO):\n return YKHO._ll_tree.get_num_sites()",
"def XzXG(YKHO):\n YKHO.ni = len(YKHO.sites)\n return YKHO.ni",
"def K3jt(YKHO) -> qe4Y.Output[int]:\n return qe4Y.get(YKHO, 'number_of_sites')",
"def K3jt(YKHO) -> qe4Y.Output[int]:\n ... | [
"0.8177708",
"0.7997218",
"0.7914483",
"0.7519629",
"0.7519629",
"0.7068941",
"0.70138055",
"0.68337756",
"0.6801635",
"0.68016064",
"0.67919874",
"0.67819905",
"0.67737967",
"0.6759923",
"0.67296755",
"0.6725009",
"0.6700922",
"0.6700884",
"0.6694308",
"0.6637853",
"0.659845... | 0.6700187 | 18 |
Construct the MPS representation of the vector `v` via the TTSVD algorithm, for local dimension `d`. All quantum numbers are set to zero for simplicity. | def o_i3(Emd4, Csk6: int, o_jE: int, Ty9i: np.ndarray, yJiH: float=0):
Ty9i = oyIN.array(Ty9i)
assert Ty9i.ndim == 1 and len(Ty9i) == Csk6 ** o_jE, f'`v` has length {len(Ty9i)}, expecting {Csk6 ** o_jE}.'
lYEE = Emd4(Csk6 * [0], [[0] for bGrB in range(o_jE + 1)], fill='postpone')
Ty9i = oyIN.reshape(Ty9... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def o4sw(a1PO, Csk6):\n yvT9 = 0.0\n for YRbF in range(r8hN):\n yvT9 += V6IE[YRbF][Csk6] * T40l(a1PO, YRbF, cAlv)\n return yvT9",
"def vsIr(Csk6):\n import numpy as oyIN\n from sklearn.decomposition import TruncatedSVD\n n2Q1 = Csk6.T\n n2Q1 = n2Q1 - n2Q1.mean(axis=0)\n n2Q1 = n2Q1... | [
"0.61096257",
"0.5763474",
"0.57123303",
"0.5682944",
"0.56389254",
"0.5590949",
"0.5537744",
"0.5469586",
"0.5453205",
"0.5436052",
"0.54348725",
"0.5433552",
"0.541846",
"0.5417964",
"0.54086834",
"0.5366208",
"0.5270755",
"0.52615505",
"0.52454746",
"0.5235257",
"0.5211031... | 0.71603477 | 0 |
Create a shapely line object from an array of points. | def zFiD(LTIa):
return y3ji(LTIa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zFiD(g_NO, LTIa, p3zD, TbMz):\n LTIa = (LTIa[0], LTIa)\n g_NO.create_line(LTIa, width=int(p3zD), fill=TbMz)",
"def J0Qk(YKHO, LTIa):\n nPrm = {'type': 'LineString', 'coordinates': LTIa}\n qv1X = dTAH.Request(YKHO.baseUri + 'geometry', data=qQXR.dumps(nPrm))\n Mkmy = dTAH.urlopen(qv1X)\n nPr... | [
"0.6623521",
"0.66141057",
"0.6515262",
"0.6321061",
"0.6300571",
"0.6204704",
"0.6204704",
"0.61412835",
"0.61147666",
"0.61147666",
"0.61147666",
"0.6063745",
"0.59938043",
"0.5987808",
"0.5976602",
"0.59655744",
"0.5936027",
"0.58540195",
"0.58507276",
"0.58445966",
"0.580... | 0.69928676 | 0 |
Create a new ngram map. 'init_mapping' is a dictionary which maps ngrams to values as an initialization to this mapping. | def FIMM(YKHO, HFj7=dict()):
YKHO.root = k0DX()
YKHO.size_freqs = dict()
YKHO.ele_freqs = dict()
for u8Mh in HFj7:
YKHO[u8Mh] = HFj7[u8Mh] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO):\n YKHO._ngrams = {}",
"def huz3(YKHO) -> cuzp[str, x1iM[str]]:\n assert YKHO.count_map is not None, 'count map is not initialized'\n Ylbp: cuzp[str, x1iM[str]] = {}\n for aWuw in YKHO.model:\n aWuw: str = YWvJ(str, aWuw)\n soQM = YKHO.get_n_minus_1_grams(aWuw)\n i... | [
"0.6318456",
"0.6183283",
"0.5912786",
"0.5887945",
"0.5811843",
"0.5742754",
"0.5739212",
"0.571624",
"0.5668436",
"0.5662621",
"0.5647781",
"0.56302255",
"0.5620188",
"0.5572944",
"0.5566678",
"0.55536765",
"0.5539655",
"0.55276245",
"0.5520395",
"0.55122614",
"0.55077565",... | 0.8016444 | 0 |
Assign a value to an ngram, overwriting the existing value if the ngram exists. 'ngram' must be hashable and in an ordered container whose length is defined. | def O1R3(YKHO, u8Mh, BWXx):
ercu = len(u8Mh)
if u8Mh not in YKHO:
if ercu not in YKHO.size_freqs:
YKHO.size_freqs[ercu] = 0
YKHO.size_freqs[ercu] += 1
for _pUq in u8Mh:
if _pUq not in YKHO.ele_freqs:
YKHO.ele_freqs[_pUq] = 0
YKHO.ele_fr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def O1R3(YKHO, u8Mh, BWXx):\n if len(u8Mh) == 0:\n YKHO.end_of_ngram = True\n YKHO.value = BWXx\n else:\n xn5b = u8Mh[0]\n OlWs = u8Mh[1:]\n if xn5b not in YKHO.children:\n YKHO.children[xn5b] = k0DX()\n YKHO.children[xn5b].__setitem__(OlWs, BWXx)",
"def... | [
"0.7583918",
"0.6616948",
"0.6342986",
"0.6039196",
"0.60368603",
"0.5871451",
"0.5766659",
"0.5693661",
"0.5693661",
"0.5667171",
"0.56473887",
"0.5618953",
"0.5567666",
"0.55247504",
"0.5520946",
"0.55208",
"0.5518532",
"0.5512293",
"0.5488784",
"0.5441368",
"0.543345",
"... | 0.7632352 | 0 |
Get the value associated with an ngram. 'ngram' must be an ordered container whose length is defined and whose elements are hashable. | def OP2O(YKHO, u8Mh):
return YKHO.root.__getitem__(u8Mh) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OP2O(YKHO, u8Mh):\n return YKHO._ngrams.get(u8Mh, 0.0)",
"def OP2O(YKHO, u8Mh):\n if len(u8Mh) == 0:\n if YKHO.end_of_ngram:\n return YKHO.value\n else:\n raise KeyError(u8Mh)\n else:\n xn5b = u8Mh[0]\n OlWs = u8Mh[1:]\n if xn5b in YKHO.childr... | [
"0.7893862",
"0.70572263",
"0.65976536",
"0.6577211",
"0.65031636",
"0.6319129",
"0.63027817",
"0.62642807",
"0.6251673",
"0.6233725",
"0.60155207",
"0.59330195",
"0.5918859",
"0.58260345",
"0.576483",
"0.5739598",
"0.5680283",
"0.5643305",
"0.56048065",
"0.5573188",
"0.55591... | 0.7005985 | 2 |
Check if an ngram exists in the mapping. 'ngram' must be an ordered container whose length is defined and whose elements are hashable. | def FYXB(YKHO, u8Mh):
return u8Mh in YKHO.root | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FYXB(YKHO, u8Mh):\n return u8Mh in YKHO._ngrams",
"def Vazf(u8Mh):\n for hcXw in u8Mh:\n if hcXw not in _3F9:\n return False\n return True",
"def FYXB(YKHO, u8Mh):\n if len(u8Mh) == 0:\n if YKHO.end_of_ngram:\n return True\n else:\n return F... | [
"0.74624544",
"0.672782",
"0.66697156",
"0.6321509",
"0.6098308",
"0.60515743",
"0.60140294",
"0.57353586",
"0.56611484",
"0.5589244",
"0.55703336",
"0.55676883",
"0.55613637",
"0.55199206",
"0.54616016",
"0.54283756",
"0.542572",
"0.53963643",
"0.53683317",
"0.53566176",
"0.... | 0.72606087 | 1 |
Get an iterator over all the ngrams which contain the given target element. 'target' must be an element. Returned ngrams are tuples. | def oDQF(YKHO, pan_):
return YKHO.root.ngrams_with_ele(pan_) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oDQF(YKHO, pan_):\n return YKHO.__ngrams_with_ele(pan_, (), False)",
"def nfJN(YKHO, pan_, x0Za, EmMj):\n if EmMj and YKHO.end_of_ngram:\n yield x0Za\n for _pUq in YKHO.children:\n tD8P = x0Za + (_pUq,)\n ggQo = EmMj\n if _pUq == pan_:\n ggQo = True\n fo... | [
"0.7747526",
"0.6339296",
"0.6030595",
"0.5957258",
"0.57518154",
"0.57177156",
"0.571229",
"0.5663291",
"0.5516033",
"0.5509249",
"0.54458296",
"0.54436725",
"0.53690785",
"0.53618604",
"0.53244305",
"0.52820814",
"0.5226586",
"0.5209852",
"0.5171289",
"0.5167459",
"0.513623... | 0.79351914 | 0 |
Get an iterator over all the ngrams of a particular size which contain the given target element. 'target' must be an element. Returned ngrams are tuples. | def Qh1x(YKHO, pan_, zNig):
return YKHO.root.sized_ngrams_with_ele(pan_, zNig) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oDQF(YKHO, pan_):\n return YKHO.root.ngrams_with_ele(pan_)",
"def oDQF(YKHO, pan_):\n return YKHO.__ngrams_with_ele(pan_, (), False)",
"def Qh1x(YKHO, pan_, zNig):\n return YKHO.__sized_ngrams_with_ele(pan_, zNig, (), False)",
"def Fefx(YKHO, pan_, zNig, x0Za, EmMj):\n if zNig == 0:\n ... | [
"0.78791815",
"0.7718325",
"0.75665516",
"0.6790233",
"0.6379662",
"0.6277664",
"0.6270078",
"0.6156313",
"0.6063653",
"0.5979615",
"0.5906672",
"0.5804904",
"0.57438445",
"0.5675507",
"0.5644449",
"0.5538669",
"0.5445053",
"0.54386264",
"0.54064316",
"0.53920126",
"0.5337258... | 0.7627288 | 2 |
Get an iterator over all the ngrams which match an ngram template consisting of elements, some of which will be ignored as place holders. Place holders are elements that can be substituted by any element. The indices of the place holders must be specified. Returned ngrams are tuples. | def c70U(YKHO, oRby, USTT):
return YKHO.root.ngrams_by_template(oRby, USTT) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c70U(YKHO, oRby, USTT):\n return YKHO.__ngrams_by_template(oRby, USTT, 0, ())",
"def x1qq(YKHO, oRby, USTT, qfFO, x0Za):\n if qfFO == len(oRby):\n if YKHO.end_of_ngram:\n yield x0Za\n else:\n xn5b = oRby[qfFO]\n if qfFO in USTT:\n for _pUq in YKHO.children:... | [
"0.71862",
"0.7177105",
"0.6563308",
"0.65052736",
"0.6401643",
"0.6342532",
"0.6296502",
"0.62851375",
"0.62512165",
"0.62358487",
"0.6228715",
"0.6185367",
"0.6180656",
"0.6177027",
"0.6173319",
"0.6116257",
"0.61118305",
"0.6015318",
"0.6013477",
"0.60034376",
"0.60000235"... | 0.72176874 | 0 |
Iterate over all the ngrams in the mapping. Returned ngrams are tuples. | def Vs4Q(YKHO):
return YKHO.root.ngrams() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vs4Q(YKHO):\n return YKHO.ngrams()",
"def Hesu(YKHO, yAmx, exwG):\n return [tuple(yAmx[YRbF:YRbF + exwG]) for YRbF in range(len(yAmx) - exwG + 1)]",
"def pCSA(YKHO):\n return YKHO.__ngrams(())",
"def Aely(Q6uT):\n for exwG in range(1, len(Q6uT) + 1):\n for SMR4 in Dhdw.util.ngrams(Q6uT... | [
"0.7243851",
"0.719758",
"0.7115495",
"0.7102535",
"0.7079672",
"0.69493896",
"0.6916515",
"0.6859841",
"0.68306607",
"0.6791651",
"0.6745082",
"0.66850847",
"0.6682363",
"0.66656184",
"0.66496146",
"0.66400284",
"0.6634526",
"0.6605614",
"0.6581879",
"0.6559552",
"0.65448093... | 0.726928 | 0 |
Add all ngrams from an ngram map into this ngram map. | def QdZT(YKHO, Elif):
for u8Mh, BWXx in Elif.items():
YKHO[u8Mh] = BWXx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nJUE(DmbV, yAmx):\n pCSA = RisN(yAmx, 2, 3)\n for u8Mh in pCSA:\n if u8Mh in DmbV:\n DmbV[u8Mh] += 1\n else:\n DmbV[u8Mh] = 1\n return DmbV",
"def pCSA(YKHO):\n return YKHO.__ngrams(())",
"def Mbhf(YKHO, USzK, u8Mh):\n raise NotImplementedError('NgramExtra... | [
"0.6722685",
"0.63497686",
"0.61519915",
"0.611247",
"0.5996436",
"0.5959093",
"0.5877456",
"0.58703744",
"0.5850235",
"0.5830215",
"0.5829584",
"0.5825282",
"0.57959586",
"0.5756498",
"0.5729093",
"0.5719245",
"0.57158285",
"0.5688177",
"0.5640109",
"0.56110865",
"0.5599376"... | 0.5807582 | 12 |
Get the number of ngrams in the mapping. | def szAg(YKHO):
return sum(YKHO.size_freqs.values()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def szAg(YKHO):\n return len(YKHO._ngrams)",
"def pCSA(YKHO):\n return YKHO.root.ngrams()",
"def Y908(YKHO):\n YKHO.unigram = YKHO.count_unigram(YKHO.word_list)\n YKHO.bigram = YKHO.count_bigram(YKHO.word_list)",
"def Y908(YKHO, rrSk):\n YKHO.unigramcounts = oRi_(int)\n YKHO.bigramcounts = ... | [
"0.77339387",
"0.7379124",
"0.7268892",
"0.7060166",
"0.7008096",
"0.6973376",
"0.69708985",
"0.6883942",
"0.6852379",
"0.6775619",
"0.6724267",
"0.67239416",
"0.66688645",
"0.6632595",
"0.6583369",
"0.6555929",
"0.6552279",
"0.6550539",
"0.6521097",
"0.64935976",
"0.64634776... | 0.0 | -1 |
Get the different elements of ngrams contained in the mapping. | def r25h(YKHO):
return set(YKHO.ele_freqs) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pCSA(YKHO):\n return YKHO.__ngrams(())",
"def pCSA(YKHO):\n return YKHO.root.ngrams()",
"def RisN(Q6uT, exwG):\n return",
"def w9Ez(__n6, exwG):\n return zip(*[__n6[YRbF:] for YRbF in Ni9Y(exwG)])",
"def pCSA(V22M, exwG=1):\n return [tuple(V22M[r845:r845 + exwG]) for r845 in range(len(V2... | [
"0.724075",
"0.7087319",
"0.6971676",
"0.6722071",
"0.66296977",
"0.66069394",
"0.6587585",
"0.65617836",
"0.65595126",
"0.65336573",
"0.6523318",
"0.6518207",
"0.64550173",
"0.64389473",
"0.641603",
"0.6401946",
"0.6353739",
"0.6346563",
"0.63275045",
"0.63083094",
"0.630589... | 0.63313603 | 18 |
Return a string representation of this ngram map. | def wHJl(YKHO):
return 'NGramMap({' + ', '.join(('%r: %r' % (u8Mh, BWXx) for u8Mh, BWXx in YKHO.items())) + '})' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return '{' + ', '.join(('%s: %s' % (u8Mh, BWXx) for u8Mh, BWXx in YKHO.items())) + '}'",
"def ChRH(YKHO) -> str:\n return '\\n'.join(map(str, YKHO._mappings.values()))",
"def bizs(YKHO) -> str:\n return BfDw.to_json(YKHO.mapping)",
"def gTzM(YKHO):\n return '\\n'.join((str(bTKY)... | [
"0.7748204",
"0.7475837",
"0.7324068",
"0.7159174",
"0.7028326",
"0.7028326",
"0.7028326",
"0.7028326",
"0.7028326",
"0.7028326",
"0.7028326",
"0.7028326",
"0.7028326",
"0.7028326",
"0.7028326",
"0.7028326",
"0.7028326",
"0.7028326",
"0.7028326",
"0.7028326",
"0.7028326",
"... | 0.8391108 | 0 |
Return a string representation of this ngram map. | def zAg0(YKHO):
return '{' + ', '.join(('%s: %s' % (u8Mh, BWXx) for u8Mh, BWXx in YKHO.items())) + '}' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wHJl(YKHO):\n return 'NGramMap({' + ', '.join(('%r: %r' % (u8Mh, BWXx) for u8Mh, BWXx in YKHO.items())) + '})'",
"def ChRH(YKHO) -> str:\n return '\\n'.join(map(str, YKHO._mappings.values()))",
"def bizs(YKHO) -> str:\n return BfDw.to_json(YKHO.mapping)",
"def gTzM(YKHO):\n return '\\n'.join(... | [
"0.83909094",
"0.7476066",
"0.73251355",
"0.7157827",
"0.7026954",
"0.7026954",
"0.7026954",
"0.7026954",
"0.7026954",
"0.7026954",
"0.7026954",
"0.7026954",
"0.7026954",
"0.7026954",
"0.7026954",
"0.7026954",
"0.7026954",
"0.7026954",
"0.7026954",
"0.7026954",
"0.7026954",
... | 0.7746536 | 1 |
Assign a value to an ngram, overwriting the existing value if the ngram exists. | def O1R3(YKHO, u8Mh, BWXx):
if len(u8Mh) == 0:
YKHO.end_of_ngram = True
YKHO.value = BWXx
else:
xn5b = u8Mh[0]
OlWs = u8Mh[1:]
if xn5b not in YKHO.children:
YKHO.children[xn5b] = k0DX()
YKHO.children[xn5b].__setitem__(OlWs, BWXx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def O1R3(YKHO, u8Mh, BWXx):\n ercu = len(u8Mh)\n if u8Mh not in YKHO:\n if ercu not in YKHO.size_freqs:\n YKHO.size_freqs[ercu] = 0\n YKHO.size_freqs[ercu] += 1\n for _pUq in u8Mh:\n if _pUq not in YKHO.ele_freqs:\n YKHO.ele_freqs[_pUq] = 0\n ... | [
"0.71547335",
"0.65202487",
"0.5946258",
"0.5911529",
"0.58350307",
"0.5757941",
"0.5734994",
"0.5502923",
"0.54564464",
"0.54384446",
"0.54088247",
"0.53939223",
"0.53766024",
"0.5347754",
"0.5347754",
"0.5298357",
"0.5289621",
"0.5288909",
"0.5279145",
"0.5249072",
"0.51909... | 0.7507985 | 0 |
Check if an ngram exists in the mapping. | def FYXB(YKHO, u8Mh):
if len(u8Mh) == 0:
if YKHO.end_of_ngram:
return True
else:
return False
else:
xn5b = u8Mh[0]
OlWs = u8Mh[1:]
if xn5b in YKHO.children:
return YKHO.children[xn5b].__contains__(OlWs)
else:
return ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FYXB(YKHO, u8Mh):\n return u8Mh in YKHO._ngrams",
"def FYXB(YKHO, u8Mh):\n return u8Mh in YKHO.root",
"def y2WO(YKHO, UXqs):\n return UXqs in YKHO.next_grams",
"def Vazf(u8Mh):\n for hcXw in u8Mh:\n if hcXw not in _3F9:\n return False\n return True",
"def FYXB(YKHO, GIN... | [
"0.77131784",
"0.74963987",
"0.679249",
"0.67041343",
"0.6680157",
"0.6679143",
"0.62161094",
"0.61447066",
"0.60762155",
"0.6042812",
"0.589592",
"0.58136135",
"0.5792211",
"0.5780393",
"0.57620233",
"0.57428557",
"0.5674803",
"0.5658368",
"0.56382865",
"0.560158",
"0.560070... | 0.65355676 | 6 |
Get an iterator over all the ngrams of a particular size which contain the given target element. 'target' must be an element. Returned ngrams are tuples. | def Qh1x(YKHO, pan_, zNig):
return YKHO.__sized_ngrams_with_ele(pan_, zNig, (), False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oDQF(YKHO, pan_):\n return YKHO.root.ngrams_with_ele(pan_)",
"def oDQF(YKHO, pan_):\n return YKHO.__ngrams_with_ele(pan_, (), False)",
"def Qh1x(YKHO, pan_, zNig):\n return YKHO.root.sized_ngrams_with_ele(pan_, zNig)",
"def Fefx(YKHO, pan_, zNig, x0Za, EmMj):\n if zNig == 0:\n if EmMj ... | [
"0.78790325",
"0.77178675",
"0.7625032",
"0.67904514",
"0.6377609",
"0.6274168",
"0.62714595",
"0.61526585",
"0.6061747",
"0.59766287",
"0.59048617",
"0.58024263",
"0.57426584",
"0.56738836",
"0.56423086",
"0.5539143",
"0.54438484",
"0.54372346",
"0.5403369",
"0.5389369",
"0.... | 0.7564047 | 3 |
Get an iterator over all the ngrams which match an ngram template consisting of elements, some of which will be ignored as place holders. Place holders are elements which can be substituted by any element. The indices of the place holders must be specified. Returned ngrams are tuples. | def c70U(YKHO, oRby, USTT):
return YKHO.__ngrams_by_template(oRby, USTT, 0, ()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c70U(YKHO, oRby, USTT):\n return YKHO.root.ngrams_by_template(oRby, USTT)",
"def x1qq(YKHO, oRby, USTT, qfFO, x0Za):\n if qfFO == len(oRby):\n if YKHO.end_of_ngram:\n yield x0Za\n else:\n xn5b = oRby[qfFO]\n if qfFO in USTT:\n for _pUq in YKHO.children:\n ... | [
"0.72236276",
"0.7186499",
"0.6575608",
"0.65252453",
"0.6414356",
"0.6356047",
"0.63138264",
"0.63006294",
"0.62682825",
"0.62498105",
"0.6239136",
"0.62043107",
"0.6191288",
"0.61855006",
"0.6184687",
"0.61340755",
"0.61334044",
"0.6026838",
"0.6023955",
"0.6017067",
"0.601... | 0.71916455 | 1 |
Iterate over all the ngrams in the mapping. Returned ngrams are tuples. | def Vs4Q(YKHO):
return YKHO.ngrams() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vs4Q(YKHO):\n return YKHO.root.ngrams()",
"def Hesu(YKHO, yAmx, exwG):\n return [tuple(yAmx[YRbF:YRbF + exwG]) for YRbF in range(len(yAmx) - exwG + 1)]",
"def pCSA(YKHO):\n return YKHO.__ngrams(())",
"def Aely(Q6uT):\n for exwG in range(1, len(Q6uT) + 1):\n for SMR4 in Dhdw.util.ngrams... | [
"0.726928",
"0.719758",
"0.7115495",
"0.7102535",
"0.7079672",
"0.69493896",
"0.6916515",
"0.6859841",
"0.68306607",
"0.6791651",
"0.6745082",
"0.66850847",
"0.6682363",
"0.66656184",
"0.66496146",
"0.66400284",
"0.6634526",
"0.6605614",
"0.6581879",
"0.6559552",
"0.65448093"... | 0.7243851 | 1 |
returns a tensorflow tensor of shape [batchsize, embedding_size] (that is [?, embedding_size] | def ddOE(YKHO):
raise NotImplementedError('has to be overwritten') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ocQg(WbAn, jXxl, q4ee):\n wjQX = ZylS.Variable(ZylS.random_uniform((jXxl, q4ee), -1, 1))\n Q1PJ = ZylS.nn.embedding_lookup(wjQX, WbAn)\n return Q1PJ",
"def ocQg(WbAn, jXxl, q4ee):\n wjQX = ZylS.Variable(ZylS.random_uniform((jXxl, q4ee), -1, 1))\n Q1PJ = ZylS.nn.embedding_lookup(wjQX, WbAn)\n ... | [
"0.76868254",
"0.7601166",
"0.7565882",
"0.75105757",
"0.70561224",
"0.67799985",
"0.67111593",
"0.67034227",
"0.6685086",
"0.6615129",
"0.6591247",
"0.6588812",
"0.65634483",
"0.6548686",
"0.6464751",
"0.64586306",
"0.64576787",
"0.6430524",
"0.6427789",
"0.63914526",
"0.638... | 0.0 | -1 |
returns a tensorflow tensor of shape [batchsize, embedding_size] (that is [?, embedding_size] | def nQ4Z(YKHO):
raise NotImplementedError('has to be overwritten') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ocQg(WbAn, jXxl, q4ee):\n wjQX = ZylS.Variable(ZylS.random_uniform((jXxl, q4ee), -1, 1))\n Q1PJ = ZylS.nn.embedding_lookup(wjQX, WbAn)\n return Q1PJ",
"def ocQg(WbAn, jXxl, q4ee):\n wjQX = ZylS.Variable(ZylS.random_uniform((jXxl, q4ee), -1, 1))\n Q1PJ = ZylS.nn.embedding_lookup(wjQX, WbAn)\n ... | [
"0.7687604",
"0.7602255",
"0.75668997",
"0.75116",
"0.7056728",
"0.6781897",
"0.6711354",
"0.670397",
"0.66858035",
"0.6615496",
"0.659269",
"0.65883946",
"0.6563994",
"0.6549171",
"0.646561",
"0.64602315",
"0.64579606",
"0.6431784",
"0.6428042",
"0.6391141",
"0.63855565",
... | 0.0 | -1 |
init goal and array | def KPE3(YKHO, xi3E):
YKHO.sys_da_array = []
YKHO.usr_da_array = []
YKHO.goal = _qLf(xi3E)
for zrIJ in YKHO.belief_domains:
if 'final' in YKHO.goal[zrIJ]:
for H5ew in YKHO.goal[zrIJ]['final']:
YKHO.goal[zrIJ][H5ew] = YKHO.goal[zrIJ]['final'][H5ew]
del YKHO... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, RqgG, xi3E):\n YKHO.initial = RqgG\n YKHO.goal = xi3E",
"def FIMM(YKHO, RqgG, xi3E=None):\n YKHO.initial = RqgG\n YKHO.goal = xi3E",
"def FIMM(YKHO, RqgG, xi3E=None):\n YKHO.initial = RqgG\n YKHO.goal = xi3E",
"def uIcm(YKHO):\n YKHO.actions = gnPz.Queue()\n YKHO.goal =... | [
"0.70106",
"0.686764",
"0.67846495",
"0.67612714",
"0.66968673",
"0.66091245",
"0.6580018",
"0.6543949",
"0.644557",
"0.6434783",
"0.64335686",
"0.64054155",
"0.63938874",
"0.63897276",
"0.63495743",
"0.63495743",
"0.63495743",
"0.63495743",
"0.63136935",
"0.62423414",
"0.619... | 0.5832078 | 69 |
init goal and array | def KPE3(YKHO, xi3E):
YKHO.sys_da_array = []
YKHO.usr_da_array = []
YKHO.goal = _qLf(xi3E)
for zrIJ in YKHO.belief_domains:
if 'final' in YKHO.goal[zrIJ]:
for H5ew in YKHO.goal[zrIJ]['final']:
YKHO.goal[zrIJ][H5ew] = YKHO.goal[zrIJ]['final'][H5ew]
del YKHO... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, RqgG, xi3E):\n YKHO.initial = RqgG\n YKHO.goal = xi3E",
"def FIMM(YKHO, RqgG, xi3E=None):\n YKHO.initial = RqgG\n YKHO.goal = xi3E",
"def FIMM(YKHO, RqgG, xi3E=None):\n YKHO.initial = RqgG\n YKHO.goal = xi3E",
"def uIcm(YKHO):\n YKHO.actions = gnPz.Queue()\n YKHO.goal =... | [
"0.70106",
"0.686764",
"0.67846495",
"0.67612714",
"0.66968673",
"0.66091245",
"0.6580018",
"0.6543949",
"0.644557",
"0.6434783",
"0.64335686",
"0.64054155",
"0.63938874",
"0.63897276",
"0.63495743",
"0.63495743",
"0.63495743",
"0.63495743",
"0.63136935",
"0.62423414",
"0.619... | 0.58266234 | 70 |
r""" Succintly represents ``self``. | def wHJl(YKHO):
return str(('P' if YKHO.is_P() else 'Q', YKHO._children)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wHJl(YKHO):\n return '%s +%s -%s %s' % (repr(YKHO.value), repr(YKHO.plus_error), repr(YKHO.minus_error), str(YKHO.unit))",
"def wHJl(YKHO):\n str(YKHO)",
"def wHJl(YKHO):\n return NotImplemented",
"def wHJl(YKHO):\n return u'(' + str(YKHO) + ', ' + str(dict(YKHO)) + u')'",
"def Ku9n(YKHO):\... | [
"0.64251125",
"0.6403911",
"0.632313",
"0.6298039",
"0.6296791",
"0.6269664",
"0.62431633",
"0.6241012",
"0.62261975",
"0.62261975",
"0.62127995",
"0.6201114",
"0.6182513",
"0.61738026",
"0.61738026",
"0.61738026",
"0.61738026",
"0.61738026",
"0.61738026",
"0.61738026",
"0.61... | 0.0 | -1 |
The ID of the local gateway. | def nm3R(YKHO) -> h8nf[str]:
return qe4Y.get(YKHO, 'local_gateway_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ShR8(YKHO):\n return YKHO._light.address",
"def rP6b(YKHO) -> qe4Y.Output[h8nf[str]]:\n return qe4Y.get(YKHO, 'transit_gateway_id')",
"def tWZp(YKHO) -> qe4Y.Output[h8nf[str]]:\n return qe4Y.get(YKHO, 'vpn_gateway_id')",
"def rP6b(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'trans... | [
"0.7327788",
"0.7310967",
"0.71508974",
"0.7128758",
"0.7128758",
"0.712455",
"0.71148616",
"0.7004527",
"0.7004527",
"0.6952937",
"0.6857196",
"0.680342",
"0.6782488",
"0.66821116",
"0.66556567",
"0.66474044",
"0.66069317",
"0.6602509",
"0.65839857",
"0.6543752",
"0.65433115... | 0.861385 | 0 |
The ARN of the local gateway route table. | def bbHy(YKHO) -> h8nf[str]:
return qe4Y.get(YKHO, 'local_gateway_route_table_arn') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hMqs(YKHO) -> str:\n return qe4Y.get(YKHO, 'arn')",
"def hMqs(YKHO) -> str:\n return qe4Y.get(YKHO, 'arn')",
"def hMqs(YKHO) -> str:\n return qe4Y.get(YKHO, 'arn')",
"def hMqs(YKHO) -> str:\n return qe4Y.get(YKHO, 'arn')",
"def hMqs(YKHO) -> str:\n return qe4Y.get(YKHO, 'arn')",
"def h... | [
"0.6260963",
"0.6260963",
"0.6260963",
"0.6260963",
"0.6260963",
"0.62489665",
"0.62489665",
"0.62489665",
"0.62489665",
"0.62489665",
"0.62489665",
"0.62489665",
"0.62489665",
"0.62489665",
"0.62489665",
"0.62489665",
"0.62489665",
"0.62489665",
"0.62489665",
"0.62489665",
"... | 0.8440978 | 0 |
The ID of the local gateway route table virtual interface group association. | def OJs_(YKHO) -> h8nf[str]:
return qe4Y.get(YKHO, 'local_gateway_route_table_virtual_interface_group_association_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dxXA(OJs_: Optional[pulumi.Input[str]]=None, VKhi: Optional[pulumi.InvokeOptions]=None) -> qe4Y.Output[CWbW]:\n ...",
"def XNTy(YKHO) -> str:\n return qe4Y.get(YKHO, 'firewall_rule_group_id')",
"def id(YKHO):\n return YKHO._group",
"def hE03(YKHO):\n return YKHO._id",
"def hE03(YKHO) -> str... | [
"0.68205214",
"0.66702497",
"0.65828985",
"0.6557337",
"0.64438486",
"0.64438486",
"0.6383603",
"0.63721997",
"0.63464606",
"0.63464606",
"0.63464606",
"0.63451296",
"0.6319242",
"0.62986463",
"0.6282167",
"0.6239581",
"0.6239581",
"0.6239581",
"0.6239581",
"0.6239581",
"0.62... | 0.8835276 | 0 |
The owner of the local gateway route table virtual interface group association. | def gPmJ(YKHO) -> h8nf[str]:
return qe4Y.get(YKHO, 'owner_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OJs_(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'local_gateway_route_table_virtual_interface_group_association_id')",
"def dxXA(OJs_: Optional[pulumi.Input[str]]=None, VKhi: Optional[pulumi.InvokeOptions]=None) -> qe4Y.Output[CWbW]:\n ...",
"def qsJ6(YKHO):\n ANfV = YKHO._call('owner')\n retur... | [
"0.7407207",
"0.6471637",
"0.60806406",
"0.5966262",
"0.5951595",
"0.59018344",
"0.59018344",
"0.59018344",
"0.59018344",
"0.59018344",
"0.586852",
"0.58546907",
"0.5843893",
"0.5796705",
"0.5795118",
"0.5760635",
"0.575962",
"0.5703012",
"0.5703012",
"0.5703012",
"0.567067",... | 0.57050836 | 17 |
Validates any project/experiment/run names for datasets | def n2mC(mWFP):
return ZbWC.search(f'[^{gCuF.ALLOWED_PROJEXPRUN_CHARS}]', mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bufy(YKHO):\n pass",
"def mofD(YKHO):\n for puqW in ['regular', 'raw', 'REGULAR', 'RAW']:\n try:\n amUA(puqW)\n except ValueError:\n YKHO.fail('Dataset {0} should be valid'.format(puqW))",
"def SbtJ(YKHO, j3aw: Optional[str]) -> str:\n if j3aw is None:\n ... | [
"0.6910052",
"0.68486965",
"0.6757872",
"0.65904015",
"0.654097",
"0.65349126",
"0.65275973",
"0.6302439",
"0.62728626",
"0.6110243",
"0.6017979",
"0.60038745",
"0.598042",
"0.598042",
"0.5966641",
"0.5918598",
"0.58484274",
"0.58459157",
"0.58327806",
"0.58326423",
"0.582559... | 0.561478 | 30 |
Return all currently registered node type identifiers. | def ZWCE(YKHO):
return YKHO.__names | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hmhE(YKHO):\n return list(Qubi.all_nodes.keys())",
"def EfR7(YKHO) -> x1iM[CvW4]:\n return list(YKHO._node_store_dict.keys())",
"def wfwy(YKHO) -> bdIy[str]:\n wfwy = list(YKHO.num_nodes_dict.keys())\n return wfwy",
"def PqUf(YKHO):\n return list(YKHO._node_reg.keys())",
"def wfwy(YKHO):... | [
"0.77885723",
"0.7621027",
"0.73690116",
"0.6777612",
"0.67709786",
"0.65106374",
"0.64637154",
"0.6449043",
"0.64485866",
"0.64349216",
"0.6409829",
"0.63657075",
"0.63594407",
"0.6317012",
"0.6307697",
"0.6298361",
"0.6292921",
"0.62826544",
"0.6272148",
"0.6246685",
"0.622... | 0.0 | -1 |
Limit the self._x to within the screen dimensions | def WKvO(YKHO, BWXx: int):
if not 0 < BWXx < zMH2 - YKHO.width:
YKHO.dir_x = -YKHO.dir_x
YKHO._x += abs(YKHO._x - BWXx) * YKHO.dir_x | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rz5W(YKHO):\n Kaqb, JnpT = YKHO.screen.get_size()\n YKHO.pos.x = max(0, YKHO.pos.x)\n YKHO.pos.x = min(Kaqb, YKHO.pos.x)\n YKHO.pos.y = max(0, YKHO.pos.y)\n YKHO.pos.y = min(JnpT, YKHO.pos.y)",
"def BZN_(YKHO):\n if YKHO.x_pos < PtXs.screenwidth:\n YKHO.x_pos += 1\n YKHO.x_pos = Y... | [
"0.7048233",
"0.6961968",
"0.6914811",
"0.6878182",
"0.67955613",
"0.6725112",
"0.66647375",
"0.66493714",
"0.66307575",
"0.65996194",
"0.6593339",
"0.6587011",
"0.65832436",
"0.65676373",
"0.6567056",
"0.6567056",
"0.6564179",
"0.65417176",
"0.65330803",
"0.6528127",
"0.6509... | 0.72235626 | 0 |
Limit the self._y to within the screen dimensions | def LVAh(YKHO, BWXx):
if not 0 < BWXx < vkJL - YKHO.height:
YKHO.dir_y = -YKHO.dir_y
YKHO._y += abs(YKHO._y - BWXx) * YKHO.dir_y | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lcEV(YKHO, LVAh):\n YKHO.scene.set_y_loc(LVAh)\n YKHO.redraw()",
"def z9NM(YKHO, LVAh):\n YKHO.position.setY(LVAh)",
"def boAb(YKHO):\n return YKHO.rect.y",
"def lcEV(YKHO, fuBA):\n YKHO.posY = fuBA",
"def V9kZ(YKHO, *qIxc):\n WKvO = YKHO.initialXScale.get()\n LVAh = YKHO.initialYS... | [
"0.7228565",
"0.7224084",
"0.7013458",
"0.69773144",
"0.6946419",
"0.69397783",
"0.6937778",
"0.688762",
"0.6879244",
"0.6868933",
"0.684636",
"0.6830678",
"0.6805958",
"0.67819005",
"0.67757076",
"0.6728401",
"0.67253286",
"0.6723002",
"0.6713959",
"0.6675673",
"0.666359",
... | 0.7458478 | 0 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, sqsg):
return False
return YKHO.__dict__ == Elif.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)",
"def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)",
... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748"
] | 0.0 | -1 |
Calculate quarter (1 indexed) from month (1 indexed). >>> [quarter_from_month(month) for month in range(1, 13)] [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4] | def QH7p(x0eS: int) -> int:
return (x0eS - 1) // 3 + 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def q3Ek(YKHO):\n YKHO.quarter_nums = YKeq.calc_quarter(YKHO.active_date[2], YKHO.active_date[1])\n YKHO.quarter = YKeq.get_quarter(YKHO.active_date[2], YKHO.active_date[1])",
"def unZH(mcyV: int, uwR8: int, bo34: lg.Logger=None) -> (int, int):\n if bo34:\n bo34.debug(f'start year = {mcyV}; start... | [
"0.66965705",
"0.66740316",
"0.6591736",
"0.6500939",
"0.6397785",
"0.63314295",
"0.62508905",
"0.6160819",
"0.59535784",
"0.5887964",
"0.5797946",
"0.57865",
"0.569497",
"0.5691616",
"0.56217575",
"0.54737055",
"0.5466125",
"0.5466125",
"0.5443386",
"0.5273369",
"0.5207362",... | 0.83025986 | 0 |
Derive pep440 compliant version string from PyCalVer version string. >>> to_pep440("v201811.0007beta") '201811.7b0' | def PaKz(DpZH: str) -> str:
return str(BvuR(DpZH)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jizk(Qinn):\n hTWD = ''\n if Qinn.prerelease:\n hTWD = '.dev{}'.format('.'.join(Qinn.prerelease))\n vP3h = '.'.join(Qinn.build)\n vP3h = vP3h.replace('-', '.')\n VsNR = '{}.{}.{}{}'.format(Qinn.major, Qinn.minor, Qinn.patch, hTWD)\n if vP3h and Qinn.prerelease:\n VsNR = '{}+{}'.... | [
"0.72433025",
"0.6444893",
"0.6428337",
"0.6300033",
"0.61961496",
"0.61874396",
"0.61550283",
"0.61127645",
"0.6087762",
"0.6081975",
"0.6043224",
"0.59825194",
"0.5965236",
"0.5945156",
"0.59330505",
"0.59276074",
"0.5901325",
"0.5894179",
"0.5889854",
"0.58780223",
"0.5863... | 0.8242642 | 0 |
Assert that a list of resource objects is equal to an expected list of resource objects (or faked resource objects). | def mKU5(JKCy, VDWE, OXrK):
pDdX = set([Ylbp.uri for Ylbp in JKCy])
_f2z = set([Ylbp.uri for Ylbp in VDWE])
assert pDdX == _f2z
for Ylbp in JKCy:
Hgd7 = None
for oghd in VDWE:
if oghd.uri == Ylbp.uri:
Hgd7 = oghd
break
assert Hgd7 is no... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Oxef(YKHO, n5sN, aEqx, Qjbs):\n YKHO.assertEqual([Qjbs(**eHNT).to_dict(computed=False) for eHNT in aEqx], [eHNT.to_dict(computed=False) for eHNT in n5sN])",
"def l__t(Kt9y, I_KI, Ivan):\n nF8Q(len(Kt9y), len(I_KI), Ivan)\n for U6D_ in Kt9y:\n Ivan.assertIn(U6D_, I_KI)",
"def jSLS():\n as... | [
"0.75010824",
"0.6969786",
"0.686773",
"0.6816491",
"0.68150854",
"0.6623479",
"0.6455179",
"0.64441675",
"0.6388659",
"0.636739",
"0.6286687",
"0.62667996",
"0.6234209",
"0.62246007",
"0.6219633",
"0.6217692",
"0.6198986",
"0.61986077",
"0.6196974",
"0.6165539",
"0.61343163"... | 0.70901173 | 1 |
Reset the logger for the specified log component (unless it is the root logger) to add a NullHandler if it does not have any handlers. Having a handler prevents a log request to be propagated to the parent logger. | def voMx(tubl):
mWFP = _da5[tubl]
bo34 = G9jH.getLogger(mWFP)
if mWFP != '' and (not bo34.handlers):
bo34.addHandler(G9jH.NullHandler()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WWrj(tubl, DCgT, ABDL):\n mWFP = _da5[tubl]\n bo34 = G9jH.getLogger(mWFP)\n for MKlR in bo34.handlers:\n if isinstance(MKlR, G9jH.NullHandler):\n bo34.removeHandler(MKlR)\n DCgT.setLevel(ABDL)\n bo34.addHandler(DCgT)\n bo34.setLevel(ABDL)",
"def O6wt(YKHO):\n YKHO._form... | [
"0.65901434",
"0.64577067",
"0.63996834",
"0.61595136",
"0.61468714",
"0.6036333",
"0.6030601",
"0.6002729",
"0.5838749",
"0.5738981",
"0.5729172",
"0.57205653",
"0.5695924",
"0.5643764",
"0.56191725",
"0.5611869",
"0.555219",
"0.55307704",
"0.5512023",
"0.55055296",
"0.54995... | 0.7699055 | 0 |
Assert that two FakedMetricGroupDefinition objects are equal. | def JIy5(vBb2, c1wS):
assert isinstance(vBb2, WJ4Y)
assert isinstance(c1wS, WJ4Y)
assert vBb2.name == c1wS.name
assert vBb2.types == c1wS.types | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gMuy(n9R1, Ka1_):\n assert isinstance(n9R1, a1gd)\n assert isinstance(Ka1_, a1gd)\n assert n9R1.group_name == Ka1_.group_name\n assert n9R1.resource_uri == Ka1_.resource_uri\n assert n9R1.timestamp == Ka1_.timestamp\n assert n9R1.values == Ka1_.values",
"def wAY9(YKHO):\n K1Zo = e1lA.uti... | [
"0.716624",
"0.6490823",
"0.64803016",
"0.63746274",
"0.63697225",
"0.6251126",
"0.6227035",
"0.6075038",
"0.5982981",
"0.59823006",
"0.5964316",
"0.59214693",
"0.59056485",
"0.589379",
"0.5885677",
"0.58776385",
"0.58679885",
"0.586775",
"0.58639735",
"0.58533764",
"0.583389... | 0.87121534 | 0 |
Return the input datetime object as a timezoneaware datetime object. If the input object is already timezoneaware, it is returned. If the input object is timezonenaive, the local timezone information is added to a copy of the input object and that copy is returned. | def EIWK(JRYC):
if JRYC.tzinfo is None:
JRYC = JRYC.replace(tzinfo=yl4j.tzlocal())
return JRYC | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lH01(pdbK, tUy_=None):\n if tUy_:\n _h03 = ZM7n(tUy_)\n sdhy = _h03.localize(pdbK)\n else:\n sdhy = pdbK.astimezone()\n return sdhy",
"def Uex5(BWXx: datetime, rIAI=None, LaHl=None) -> qcWV:\n if rIAI is None:\n rIAI = oMMP()\n if hasattr(rIAI, 'localize'):\n ... | [
"0.76542145",
"0.7495154",
"0.73218477",
"0.7056183",
"0.69305295",
"0.6927569",
"0.68284774",
"0.6748129",
"0.6686388",
"0.6595904",
"0.653807",
"0.6420742",
"0.6369841",
"0.6366947",
"0.636612",
"0.63538593",
"0.6287582",
"0.62643504",
"0.61496973",
"0.6093182",
"0.60779953... | 0.6875443 | 6 |
Return a tuple of a tf Graph, Iterator, Model, and Session. | def LQs7(QjBU, Tuqy):
pNZh = ZylS.Graph()
with pNZh.as_default():
with ZylS.name_scope('input_pipe'):
__n6 = oUGu(QjBU, Tuqy)
oHE7 = __n6.make_initializable_iterator()
C3ST = lSg9(hparams=QjBU, iterator=oHE7, mode=Tuqy)
cb_Q = ZylS.Session(graph=pNZh)
JuDV = AfPy(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zur1(aNyl):\n Oa1e = aNyl\n ujOA = Oa1e.get_tensor_by_name('input:0')\n RDw4 = Oa1e.get_tensor_by_name('initial_state:0')\n QrQn = Oa1e.get_tensor_by_name('final_state:0')\n TuEN = Oa1e.get_tensor_by_name('probs:0')\n return (ujOA, RDw4, QrQn, TuEN)",
"def Zur1(aNyl):\n with aNyl.as_defa... | [
"0.6443534",
"0.62095916",
"0.6141547",
"0.6089227",
"0.60805553",
"0.60772645",
"0.6049631",
"0.5943432",
"0.58611465",
"0.58396626",
"0.5818176",
"0.5691271",
"0.56734",
"0.5609604",
"0.5528351",
"0.5513516",
"0.54753006",
"0.54457146",
"0.5432793",
"0.5393822",
"0.53916126... | 0.0 | -1 |
Set new value to Const node and recompute all necessary shapes in this node and data nodes | def Annl(Q6kx: Node, BWXx: np.ndarray):
if Q6kx.type != 'Const':
raise Exception("Can't set value for non-constant node {}".format(Q6kx.name))
sB1G = oyIN.float32
if Q6kx.out_port(0).is_data_type_defined():
sB1G = Q6kx.out_port(0).get_data_type()
Q6kx.out_port(0).data.set_value(oyIN.arra... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eh3o(Q6kx, BWXx):\n Q6kx.N += 1\n Q6kx.W += BWXx\n Q6kx.Q = Q6kx.W / Q6kx.N",
"def YJlv(YKHO):\n qAdU = jHsn.get_node_attributes(YKHO.G, 'value')\n Dbmo = {}\n for YRbF in range(YKHO.n_v):\n A_IW = list(jHsn.all_neighbors(YKHO.G, YRbF))\n WRLz = qAdU[YRbF]\n Qj8D = (1 -... | [
"0.620524",
"0.6088918",
"0.5987213",
"0.5935326",
"0.5913673",
"0.58181375",
"0.57887936",
"0.5785095",
"0.57735175",
"0.57488483",
"0.57043356",
"0.5697049",
"0.5686154",
"0.5672313",
"0.5655895",
"0.56520516",
"0.56189376",
"0.5583461",
"0.5570622",
"0.5547451",
"0.5536954... | 0.65960515 | 0 |
Generate ngrams from corpus Returns a dictionary of kgrams (from 2 to nth degree) | def JkVH(YKHO, exwG):
pCSA = dict()
upkK = dict()
for G1Hx in range(2, exwG + 1):
upkK[G1Hx] = list(Dhdw.ngrams(YKHO.words, G1Hx))
for G1Hx, gOBC in upkK.items():
o8pQ = oRi_(mBkc)
for CG35 in gOBC:
pc4T = list(CG35)
H5ew = ' '.join(pc4T[:G1Hx - 1])
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FFD4(rrSk, exwG=2):\n\n def hweN(l5Ny, exwG):\n l5Ny = b0j5.tokenize(l5Ny)\n for YRbF in range(0, len(l5Ny) - exwG + 1):\n yield l5Ny[YRbF:YRbF + exwG]\n if isinstance(rrSk, str):\n for u8Mh in hweN(rrSk, exwG):\n yield u8Mh\n elif isinstance(rrSk, (list, SnB... | [
"0.73345",
"0.73013943",
"0.7156764",
"0.71051204",
"0.7047381",
"0.703042",
"0.69959635",
"0.6983927",
"0.68515825",
"0.6844244",
"0.6822454",
"0.6794173",
"0.6786707",
"0.6779912",
"0.6773878",
"0.6754185",
"0.6752084",
"0.6730475",
"0.6708785",
"0.66996104",
"0.6680698",
... | 0.752389 | 0 |
Render website's home page. | def kZiy():
return TvZl('home.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bVaH():\n return TvZl('index.html')",
"def kZiy():\n return TvZl('homepage.html')",
"def kZiy():\n return TvZl('home_page.html')",
"def C_QL():\n return TvZl('home/index.html', title='Bem vindo!')",
"def C_QL():\n return TvZl('home/a_homepage.html', title='Welcome')",
"def C_QL():\n ... | [
"0.87248576",
"0.85797024",
"0.85035866",
"0.8486288",
"0.84611857",
"0.84365207",
"0.84302676",
"0.841985",
"0.8396901",
"0.8396901",
"0.8375347",
"0.8356703",
"0.83518267",
"0.8341115",
"0.8341115",
"0.83366895",
"0.8330097",
"0.83294135",
"0.832544",
"0.83175427",
"0.82938... | 0.8337803 | 22 |
Render the website's about page. | def vsuQ():
return TvZl('about.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vsuQ():\n return TvZl('about.html', title='About')",
"def vsuQ():\n return TvZl('about_page.html', title='About')",
"def vsuQ():\n return TvZl('about.html')",
"def vsuQ():\n return TvZl('about.html', title='About', year=qcWV.now().year, message='about page.')",
"def vsuQ():\n return TvZl... | [
"0.87910306",
"0.8698105",
"0.86404276",
"0.86124563",
"0.8490408",
"0.84784615",
"0.8467779",
"0.84352976",
"0.84289914",
"0.8424242",
"0.8424242",
"0.8424242",
"0.8424242",
"0.8424242",
"0.8424242",
"0.8424242",
"0.8424242",
"0.8424242",
"0.8424242",
"0.8424242",
"0.8424242... | 0.8325753 | 33 |
Add headers to both force latest IE rendering engine or Chrome Frame, and also to cache the rendered page for 10 minutes. | def PYz4(geh0):
geh0.headers['X-UA-Compatible'] = 'IE=Edge,chrome=1'
geh0.headers['Cache-Control'] = 'public, max-age=0'
return geh0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PYz4(geh0):\n geh0.headers['X-UA-Compatible'] = 'IE=Edge,chrome=1'\n geh0.headers['Cache-Control'] = 'public, max-age=60'\n return geh0",
"def PYz4(geh0):\n geh0.headers['X-UA-Compatible'] = 'IE=Edge,chrome=1'\n geh0.headers['Cache-Control'] = 'public, max-age=600'\n return geh0",
"def PY... | [
"0.8224081",
"0.8223272",
"0.8223272",
"0.8223272",
"0.8223272",
"0.81964976",
"0.81132656",
"0.808731",
"0.79732955",
"0.786621",
"0.76618445",
"0.72377926",
"0.7159863",
"0.715322",
"0.715322",
"0.71517026",
"0.71517026",
"0.7142053",
"0.71373916",
"0.712861",
"0.712861",
... | 0.81641245 | 21 |
Return color escape code like '[31m' for red. | def lrDG(qfpW: str) -> str:
fktj = str(30 + ETiC.index(qfpW))
return f'[{fktj}m' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qfpW(Wxnj):\n return lambda a1PO: '\\x1b[{0}{1}\\x1b[0;m'.format(Wxnj, a1PO)",
"def pHEH(yW_X):\n return '\\x1b[%dm' % (30 + yW_X)",
"def J9WZ(YKHO, KCHu: str) -> str:\n S8_v = YKHO._color_id_regexp.search(KCHu).groups()[0]\n return {'0': '\\x1b[37m', '1': '\\x1b[32m', '2': '\\x1b[31m', '3': '\... | [
"0.7140825",
"0.70151657",
"0.69217825",
"0.6841887",
"0.6753863",
"0.6733817",
"0.6724648",
"0.67032886",
"0.6586259",
"0.6546856",
"0.65339065",
"0.6521417",
"0.6499164",
"0.64895546",
"0.64630944",
"0.6448338",
"0.6443699",
"0.64356476",
"0.64348394",
"0.6401379",
"0.63773... | 0.76702976 | 0 |
Provide helpful representation when printed. | def wHJl(YKHO):
return '<User user_id=%s, name = %s, email=%s, password=%s>' % (YKHO.user_id, YKHO.first_name, YKHO.email, YKHO.password) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wHJl(YKHO):\n return YKHO.pretty_print(YKHO.__dict__)",
"def atpV(YKHO):\n return YKHO.des",
"def atpV(YKHO):\n return YKHO.des",
"def zAg0(YKHO):\n return YKHO.printable()",
"def T37n(YKHO):\n GGQD = 'Qubit ID: ' + str(YKHO.qubit_id) + ' '\n GGQD = GGQD + 'Outcome: ' + str(YKHO.outco... | [
"0.7529561",
"0.7511525",
"0.7511525",
"0.74975544",
"0.7394847",
"0.72965956",
"0.7293301",
"0.7226869",
"0.7225389",
"0.7205555",
"0.71771973",
"0.71743053",
"0.7146052",
"0.7134735",
"0.71325094",
"0.71289283",
"0.7126178",
"0.71148866",
"0.7109676",
"0.7082562",
"0.707800... | 0.0 | -1 |
Provide helpful representation when printed. | def wHJl(YKHO):
return '<Ride ride_id={}, driver={}, start={}, end={}, date={}>'.format(YKHO.ride_id, YKHO.driver, YKHO.start_city, YKHO.end_city, YKHO.start_timestamp) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wHJl(YKHO):\n return YKHO.pretty_print(YKHO.__dict__)",
"def atpV(YKHO):\n return YKHO.des",
"def atpV(YKHO):\n return YKHO.des",
"def zAg0(YKHO):\n return YKHO.printable()",
"def T37n(YKHO):\n GGQD = 'Qubit ID: ' + str(YKHO.qubit_id) + ' '\n GGQD = GGQD + 'Outcome: ' + str(YKHO.outco... | [
"0.7529561",
"0.7511525",
"0.7511525",
"0.74975544",
"0.7394847",
"0.72965956",
"0.7293301",
"0.7226869",
"0.7225389",
"0.7205555",
"0.71771973",
"0.71743053",
"0.7146052",
"0.7134735",
"0.71325094",
"0.71289283",
"0.7126178",
"0.71148866",
"0.7109676",
"0.7082562",
"0.707800... | 0.0 | -1 |
Provide helpful representation when printed. | def wHJl(YKHO):
return '<Rider id={}, ride_id={}, user_id={}>'.format(YKHO.id, YKHO.ride_id, YKHO.user_id) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wHJl(YKHO):\n return YKHO.pretty_print(YKHO.__dict__)",
"def atpV(YKHO):\n return YKHO.des",
"def atpV(YKHO):\n return YKHO.des",
"def zAg0(YKHO):\n return YKHO.printable()",
"def T37n(YKHO):\n GGQD = 'Qubit ID: ' + str(YKHO.qubit_id) + ' '\n GGQD = GGQD + 'Outcome: ' + str(YKHO.outco... | [
"0.7529561",
"0.7511525",
"0.7511525",
"0.74975544",
"0.7394847",
"0.72965956",
"0.7293301",
"0.7226869",
"0.7225389",
"0.7205555",
"0.71771973",
"0.71743053",
"0.7146052",
"0.7134735",
"0.71325094",
"0.71289283",
"0.7126178",
"0.71148866",
"0.7109676",
"0.7082562",
"0.707800... | 0.0 | -1 |
Provide helpful representation when printed. | def wHJl(YKHO):
return '<Requests id={}, ride_id={}, requester={}, seats={}>'.format(YKHO.id, YKHO.ride_id, YKHO.requester, YKHO.seats) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wHJl(YKHO):\n return YKHO.pretty_print(YKHO.__dict__)",
"def atpV(YKHO):\n return YKHO.des",
"def atpV(YKHO):\n return YKHO.des",
"def zAg0(YKHO):\n return YKHO.printable()",
"def T37n(YKHO):\n GGQD = 'Qubit ID: ' + str(YKHO.qubit_id) + ' '\n GGQD = GGQD + 'Outcome: ' + str(YKHO.outco... | [
"0.7529561",
"0.7511525",
"0.7511525",
"0.74975544",
"0.7394847",
"0.72965956",
"0.7293301",
"0.7226869",
"0.7225389",
"0.7205555",
"0.71771973",
"0.71743053",
"0.7146052",
"0.7134735",
"0.71325094",
"0.71289283",
"0.7126178",
"0.71148866",
"0.7109676",
"0.7082562",
"0.707800... | 0.0 | -1 |
Check whether the line is unordered list, if it is, change it into html format | def _7rZ(zFiD):
if zFiD[:2] == '* ' or zFiD[:2] == '- ' or (zFiD[:2] == '+ ' and len(zFiD) > 2):
return (True, '<ul><li>' + zFiD[2:] + '</li></ul>')
return (False, '') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def caQ1(BWXx: str, dq03: bool=True, qASX: bool=False) -> str:\n if not BWXx:\n return ''\n BWXx = BWXx.replace('\\r', '').strip('\\n')\n BWXx = BWXx.replace('\\n\\n', '\\n \\n')\n if not dq03:\n return '<p>{}</p>'.format('<br>'.join(k9yl(BWXx).splitlines()))\n UqER = []\n ycBG: lis... | [
"0.6722098",
"0.6535788",
"0.6483703",
"0.6427917",
"0.6324625",
"0.62481564",
"0.6228694",
"0.6195857",
"0.61753297",
"0.61499524",
"0.61137676",
"0.6087956",
"0.6077381",
"0.60515636",
"0.6034332",
"0.5991393",
"0.5839859",
"0.5827158",
"0.5765641",
"0.56919575",
"0.5661814... | 0.71478677 | 0 |
Index page. Return the template. | def d6pt():
return TvZl('index.html') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def t7ng():\n return TvZl('index.html')",
"def t7ng():\n return TvZl('index.html')",
"def t7ng():\n return TvZl('index.html')",
"def d6pt():\n return TvZl('index.html')",
"def d6pt():\n return TvZl('index.html')",
"def t7ng():\n return TvZl('index.html')",
"def d6pt():\n return TvZ... | [
"0.8373988",
"0.8373988",
"0.8373988",
"0.831972",
"0.8307974",
"0.8264882",
"0.82596594",
"0.82596594",
"0.82573396",
"0.8256507",
"0.8238303",
"0.8196232",
"0.8194035",
"0.8194035",
"0.81606764",
"0.8131964",
"0.80896056",
"0.80896056",
"0.80896056",
"0.80896056",
"0.808960... | 0.808243 | 52 |
Flask application instantiation with extensions and blueprints | def LUif(Tuqy=Hy7s.environ.get('FLASK_MODE', 'app.config.Development')):
P4t4 = ATo2(__name__)
dLQw = GPtr.get(Tuqy)
P4t4.config.from_object(dLQw)
dLQw().init_app(P4t4)
G8o7(P4t4)
from app.users import users
P4t4.register_blueprint(users)
P4t4.register_error_handler(400, _ef9)
P4t4.r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GmIz(P4t4):\n P4t4.load_extension(__name__)",
"def LUif():\n P4t4 = L2w0(__name__)\n P4t4.register_blueprint(tfH8)\n P4t4.register_blueprint(Tj1O)\n return P4t4",
"def LUif():\n P4t4 = L2w0(__name__, instance_relative_config=False)\n P4t4.config.from_object('config.Config')\n OHct =... | [
"0.7628948",
"0.7624795",
"0.75975955",
"0.74849623",
"0.7472157",
"0.7410981",
"0.7386237",
"0.73710954",
"0.7359548",
"0.73337257",
"0.73082376",
"0.7292675",
"0.72830945",
"0.727428",
"0.72539616",
"0.7229635",
"0.7212875",
"0.7206148",
"0.7193071",
"0.7192912",
"0.7190982... | 0.7059199 | 36 |
Get the data for a particular day from a Pandas dataframe. The data are mapped to numbers for min/max operation. | def EwqQ(QyXt, fuBA, E3D9, lWPh):
yKcO = qcWV(year=fuBA, month=E3D9, day=lWPh, hour=0, minute=0)
Os4s = qcWV(year=fuBA, month=E3D9, day=lWPh, hour=23, minute=59, second=59)
return QyXt[yKcO:Os4s]['clouds'].map(zIdb) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SFd9(YKHO, z0q4, CjKC):\n YKHO.check_for_column(z0q4)\n JRYC = rLdf.Timestamp(CjKC)\n iVRZ = YKHO.data[z0q4]\n return iVRZ[iVRZ.index.date == JRYC.date()]",
"def yLtf(CjKC, YSmA=None, ynyd=None):\n global subnet\n Tura = rLdf.DataFrame([])\n while len(Tura.index) <= 0:\n try:\n ... | [
"0.6640035",
"0.6327252",
"0.620272",
"0.5961652",
"0.586962",
"0.58031136",
"0.5778132",
"0.5740736",
"0.5650758",
"0.55911034",
"0.5584576",
"0.55757034",
"0.55558676",
"0.5535217",
"0.55223465",
"0.5516037",
"0.5494917",
"0.54693806",
"0.54676884",
"0.54649603",
"0.5455006... | 0.5714151 | 8 |
Validate interior_temp or exterior_temp. If the value is "U" then set is as None. | def TsN5(Emd4, BWXx, Jyyj):
if BWXx == 'U':
S0MI.warning("{field.name} value is 'U'. Setting to None.")
return None
return BWXx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dmjc(YKHO):\n YKHO.assertEqual(YKHO.TminValue, 450.0)",
"def W24X(YKHO):\n if isinstance(YKHO.unique_id, (int, str)):\n YKHO.unique_id = str(YKHO.unique_id)\n else:\n raise TypeError(f'unique_id incorrect type: {type(YKHO.unique_id)}')\n try:\n YKHO.ra = float(YKHO.ra)\n e... | [
"0.55307305",
"0.5214903",
"0.5141292",
"0.5097829",
"0.5091537",
"0.5089358",
"0.5074625",
"0.5054196",
"0.49922997",
"0.49919182",
"0.49849528",
"0.49699223",
"0.4960044",
"0.49462032",
"0.49411967",
"0.49335268",
"0.49271277",
"0.49264887",
"0.4916088",
"0.4910812",
"0.490... | 0.6286469 | 0 |
Return True if GridPegSolitairePuzzle self is equivalent to other. | def xa14(YKHO, Elif):
return type(YKHO) == type(Elif) and YKHO._marker == Elif._marker and (YKHO._marker_set == Elif._marker_set) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n for YRbF in range(len(YKHO.puzzle)):\n for r845 in range(len(YKHO.puzzle[0])):\n if YKHO.puzzle[YRbF][r845] != Elif.puzzle[YRbF][r845]:\n return False\n return True",
"def xa14(YKHO, Elif):\n return oyIN.all(YKHO.grid == Elif.grid) and oyIN.all(YK... | [
"0.7777365",
"0.7128192",
"0.7128096",
"0.7042899",
"0.7001565",
"0.7001565",
"0.6998009",
"0.69683576",
"0.6954856",
"0.6910418",
"0.6902253",
"0.6834667",
"0.6729442",
"0.6708907",
"0.67054313",
"0.66855025",
"0.66852814",
"0.66748196",
"0.6672553",
"0.6660348",
"0.66281164... | 0.0 | -1 |
Return whether GridPegSolitairePuzzle self is solved. | def Yprr(YKHO):
qC_B = 0
for rdlD in YKHO._marker:
for ZfUD in rdlD:
if ZfUD == '*':
qC_B += 1
return qC_B == 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JjqC(YKHO) -> bool:\n if YKHO in [YKHO.SATISFIED, YKHO.ALL_SOLUTIONS, YKHO.OPTIMAL_SOLUTION]:\n return True\n return False",
"def Yprr(YKHO):\n for rdlD in range(YKHO.sl):\n for fvDH in range(YKHO.sl):\n wEf2 = YKHO.puzzle[rdlD][fvDH]\n if wEf2 == 0:\n ... | [
"0.77643764",
"0.77169114",
"0.752162",
"0.75107074",
"0.74955964",
"0.748712",
"0.7420569",
"0.7420569",
"0.7420569",
"0.72661453",
"0.7248253",
"0.7240494",
"0.72115725",
"0.7206371",
"0.7131853",
"0.70426935",
"0.7031681",
"0.69903743",
"0.6943916",
"0.68941855",
"0.686962... | 0.58760005 | 90 |
This function open the file dialog and sets visibility of the buttons | def NILi(YKHO):
KzVY = 'Open files'
AGPF = './'
rQYi = 'JPEG File Interchange Format (*.jpg *.jpeg *jfif)|' + '*.jpg;*.jpeg;*.jfif'
RRlC = lZdW.getOpenFileNames(None, KzVY, AGPF, rQYi)[0]
YKHO._model.set_filenames(RRlC)
if len(RRlC) > 1:
YKHO._ui.bt_next.setEnabled(True)
YKHO._ui... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Dow6(YKHO):\n YKHO.__enableFindButton()",
"def WEOd(YKHO):\n YKHO.dialog = Wi4c.widgets.Box(373, 372)\n YKHO.dialog.topleft = (528, 205)\n pmez = jcz9.OcempImageMapTransparent(mqMr.genteguada.GenteGuada.getInstance().getDataPath(cOFe))\n YKHO.dialog.add_child(pmez)\n YKHO.listDir = jcz9.Oce... | [
"0.72894037",
"0.7242647",
"0.7164755",
"0.7144964",
"0.6774855",
"0.6722693",
"0.67042464",
"0.6652502",
"0.65270233",
"0.647964",
"0.6474142",
"0.64635694",
"0.645917",
"0.6433844",
"0.63806635",
"0.6360893",
"0.6357875",
"0.6348367",
"0.63313246",
"0.63103557",
"0.62739646... | 0.7027692 | 4 |
``is_consumed()`` should return ``True`` for a consumed ticket. | def YP4R(YKHO):
aevO = BJER()
aevO.consume()
aevO = IP75.objects.get(ticket=aevO.ticket)
YKHO.assertTrue(aevO.is_consumed()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uApj(YKHO):\n aevO = BJER()\n YKHO.assertFalse(aevO.is_consumed())",
"def A8_E(YKHO):\n fgFE = BJER()\n RxRA = BJER()\n IP75.objects.consume_tickets(YKHO.user)\n YKHO.assertTrue(IP75.objects.get(ticket=fgFE).is_consumed())\n YKHO.assertTrue(IP75.objects.get(ticket=RxRA).is_consumed())",
... | [
"0.73946923",
"0.65348846",
"0.60418725",
"0.6009015",
"0.59206754",
"0.5847624",
"0.5800885",
"0.56733304",
"0.556838",
"0.5565925",
"0.5530513",
"0.55278057",
"0.5487619",
"0.5466903",
"0.5459315",
"0.54396045",
"0.54198873",
"0.54085886",
"0.53738415",
"0.53653556",
"0.535... | 0.74744517 | 0 |
``is_consumed()`` should return ``False`` for a valid ticket. | def uApj(YKHO):
aevO = BJER()
YKHO.assertFalse(aevO.is_consumed()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YP4R(YKHO):\n aevO = BJER()\n aevO.consume()\n aevO = IP75.objects.get(ticket=aevO.ticket)\n YKHO.assertTrue(aevO.is_consumed())",
"def rjV3(YKHO):\n aevO = BJER(consume=True)\n with YKHO.assertRaises(G5k6):\n IP75.objects.validate_ticket(aevO.ticket, YKHO.url)",
"def A8_E(YKHO):\n... | [
"0.7490909",
"0.6866085",
"0.65920156",
"0.646661",
"0.64139706",
"0.6358583",
"0.6321051",
"0.6178995",
"0.61237866",
"0.60870266",
"0.5980425",
"0.5969279",
"0.5955901",
"0.580964",
"0.573562",
"0.5668784",
"0.5657935",
"0.5654111",
"0.56439453",
"0.56143516",
"0.5534359",
... | 0.8097508 | 0 |
``is_primary()`` should return ``False`` if the ``ServiceTicket`` was not created from the presentation of a user's credentials. | def mUGk(YKHO):
aevO = BJER()
YKHO.assertFalse(aevO.is_primary()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bKdj(YKHO):\n aevO = BJER(primary=True)\n YKHO.assertTrue(aevO.is_primary())",
"def YZNA(YKHO) -> h8nf[qe4Y.Input[bool]]:\n return qe4Y.get(YKHO, 'is_primary')",
"def YZNA(YKHO):\n return not YKHO.parent.non_primary",
"def YZNA(YKHO):\n return YKHO.primary_listing.id == YKHO.id",
"def rt... | [
"0.774287",
"0.6480841",
"0.61077434",
"0.60278285",
"0.60127294",
"0.590651",
"0.5659118",
"0.56576586",
"0.5656655",
"0.5564442",
"0.5562564",
"0.55597234",
"0.5544762",
"0.55424017",
"0.5534804",
"0.5521728",
"0.5515009",
"0.5499338",
"0.54892373",
"0.54863167",
"0.5475738... | 0.65328586 | 1 |
If a signout request to a service returns an invalid status code, the resulting exception should be handled. | def kOfm(YKHO):
aevO = BJER()
with Po4F('requests.post') as TMAJ:
TMAJ.return_value.status_code = 500
aevO.request_sign_out() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F377(YKHO):\n return YKHO.app.get('/account/signout', follow_redirects=True)",
"def RrW3(YKHO):\n aevO = BJER()\n with Po4F('requests.post') as TMAJ:\n TMAJ.side_effect = G4JS.exceptions.RequestException\n aevO.request_sign_out()",
"def oxUH(YKHO):\n aevO = BJER(service='http://ex... | [
"0.63054806",
"0.629941",
"0.61814815",
"0.60013455",
"0.5949701",
"0.5928705",
"0.5746081",
"0.5724325",
"0.565421",
"0.5625145",
"0.5602006",
"0.55991226",
"0.55964124",
"0.55929434",
"0.55850244",
"0.556946",
"0.55682904",
"0.5561876",
"0.55376303",
"0.5502395",
"0.5485038... | 0.7099548 | 0 |
Sets the logging level. | def fTst(YKHO, CTbl, PJWX=False):
YKHO.debug_level = CTbl
YKHO.verbosity = PJWX
ABDL = G9jH.INFO
if CTbl > 4:
ABDL = G9jH.DEBUG - 3
elif CTbl > 0:
ABDL = G9jH.DEBUG - CTbl + 1
elif PJWX:
ABDL = G9jH.INFO - 1
YKHO.mylog.setLevel(ABDL)
YKHO.handler.setLevel(ABDL) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fTst(YKHO, ABDL: str):\n YKHO._logger.setLevel(getattr(G9jH, ABDL))",
"def aQ22(YKHO, ABDL):\n if ABDL == 'info':\n ABDL = G9jH.INFO\n if ABDL == 'debug':\n ABDL = G9jH.DEBUG\n if ABDL == 'error':\n ABDL = G9jH.ERROR\n YKHO._log.setLevel(ABDL)",
"def ABDL(YKHO, wiAm):\n ... | [
"0.84028757",
"0.828369",
"0.82148135",
"0.81969815",
"0.8164995",
"0.8149665",
"0.8124171",
"0.8103577",
"0.8100742",
"0.78753537",
"0.780043",
"0.77098274",
"0.77062374",
"0.76996934",
"0.764992",
"0.76456445",
"0.7643418",
"0.7577295",
"0.7567677",
"0.7535593",
"0.75258625... | 0.71664625 | 31 |
Constructor for QNetwork. Takes a name and a learning rate for the GradientDescentOptimizer | def FIMM(YKHO, mWFP: str, b0Ix: float, UqYS: float=1e-05):
YKHO.learningRate = b0Ix
YKHO.beta = UqYS
YKHO.name = mWFP
YKHO.input_positions = None
YKHO.target_q = None
YKHO.actions = None
YKHO.actions_onehot = None
YKHO.value = None
YKHO.advantage = None
YKHO.td_error = None
Y... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, tIxK, b0Ix):\n YKHO.name = AvB1.GRADIENT_DESCENT\n super(CKna, YKHO).__init__(learning_rate=b0Ix, shared_mem_name=tIxK)",
"def FIMM(YKHO, tspZ, SGf8=1e-06):\n ybY5.__init__(YKHO, tspZ)\n YKHO.epsilon = SGf8\n YKHO.parameters = []",
"def FIMM(YKHO, oNEO, b0Ix=0.001, dgWh=0.9, znmT=... | [
"0.69575447",
"0.6389306",
"0.63450027",
"0.6286006",
"0.6283014",
"0.6243793",
"0.62011105",
"0.61675113",
"0.6087021",
"0.6079052",
"0.60755813",
"0.6070673",
"0.6032599",
"0.5955677",
"0.5899364",
"0.5879908",
"0.58416426",
"0.58233106",
"0.57994694",
"0.579642",
"0.578464... | 0.6270861 | 5 |
Constructor for the Neural Network player. | def FIMM(YKHO, mWFP: str, lA6Z: float=0.99, HHR7: float=10.0, lBC8: float=0.0, z_k3: float=-10.0, b0Ix: float=0.01, Y9ns: bool=True, N9bO: float=0.9999, tP7h: float=0.9997, Ep8u=60, sIHM: int=500, jmzt: float=0.001):
YKHO.tau = jmzt
YKHO.batch_size = Ep8u
YKHO.reward_discount = lA6Z
YKHO.win_value = HHR... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, **B2fa):\n U78l.Module.__init__(YKHO)\n yR_P, N8OZ, sqQC = WLu7(**B2fa)\n YKHO._configuration = B2fa\n YKHO.add_module('cnn', yR_P)\n YKHO.shapes = N8OZ\n YKHO.criterion = U78l.MSELoss(reduction='mean')\n YKHO.optimizer = sqQC\n YKHO._kwargs = B2fa",
"def FIMM(YKHO, mVUw, m... | [
"0.7182839",
"0.7063412",
"0.70152503",
"0.6915938",
"0.6843988",
"0.68340147",
"0.68023753",
"0.6760313",
"0.6699622",
"0.6692155",
"0.6686875",
"0.66656804",
"0.6661924",
"0.6656292",
"0.6602225",
"0.66011685",
"0.6600179",
"0.6595561",
"0.6573153",
"0.65593153",
"0.6542436... | 0.0 | -1 |
Basic confusion matrix plot | def LwSz(Bcwd, KndY=None, aNZO=None, a60O=True, iMGt='Blues'):
if aNZO is None:
LZpg, aNZO = QrM1.subplots(figsize=(8, 6))
if isinstance(Bcwd, list) or isinstance(Bcwd, tuple):
Bcwd = YsYU(Bcwd[0], Bcwd[1])
if not KndY:
KndY = list(range(Bcwd.shape[0]))
bOjG = rLdf.DataFrame(Bcwd... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LwSz(YKHO):\n pTn1 = beib.from_learner(YKHO.learn)\n pTn1.plot_confusion_matrix()",
"def PkTE(YKHO):\n QrM1.figure()\n d4r9.plot_cnf_matrix(YKHO.y_pred, YKHO.y_test)",
"def LwSz(Bcwd, tGDF):\n JI1i = QrM1.figure(figsize=(10, 10))\n QrM1.imshow(Bcwd, interpolation='nearest', cmap=QrM1.cm.B... | [
"0.85036325",
"0.8166569",
"0.80888236",
"0.8074209",
"0.80336994",
"0.7922803",
"0.79187",
"0.79014534",
"0.7880731",
"0.7879117",
"0.784483",
"0.78275734",
"0.78185475",
"0.77897936",
"0.7789382",
"0.77866894",
"0.778651",
"0.7780942",
"0.7778837",
"0.7778837",
"0.77771765"... | 0.0 | -1 |
Sets up an roc plot and returns the ax object | def S1a_(Crrw, tbAO, mWFP='', aNZO=None):
if aNZO is None:
LZpg, aNZO = QrM1.subplots(figsize=(20, 10))
BIla(Crrw, tbAO, name=mWFP, ax=aNZO)
aNZO.plot([0, 1], [0, 1], linestyle='--', lw=2, color='black', alpha=0.8)
aNZO.fill_between([0, 1], [0, 1], alpha=0.3, color='black')
aNZO.set_xlabel('... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def A9qF(YKHO):\n YKHO.ax = YKHO.fig.add_subplot(111)",
"def Orf9(YKHO):\n QrM1.switch_backend('cairo')\n LZpg = QrM1.figure(figsize=(15, 10))\n aNZO = LZpg.add_axes([0.05, 0.15, 0.9, 0.8])\n return (LZpg, aNZO)",
"def RSLE():\n LZpg = QrM1.figure(figsize=(12, 12))\n aNZO = LZpg.add_subplo... | [
"0.6646863",
"0.6585978",
"0.6225929",
"0.6147457",
"0.6141379",
"0.6110672",
"0.60083985",
"0.59946185",
"0.5986516",
"0.5933751",
"0.5891394",
"0.58716166",
"0.5858632",
"0.58488417",
"0.58306015",
"0.58172256",
"0.57976377",
"0.5776978",
"0.57742596",
"0.5768438",
"0.57561... | 0.5731476 | 22 |
Convert a scipy sparse matrix to a torch sparse tensor. | def FXf_(On0F):
On0F = On0F.tocoo().astype(oyIN.float32)
_0VL = ht2j.from_numpy(oyIN.vstack((On0F.row, On0F.col)).astype(oyIN.int64))
hkxX = ht2j.from_numpy(On0F.data)
ROpF = ht2j.Size(On0F.shape)
return ht2j.sparse.FloatTensor(_0VL, hkxX, ROpF) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TWjY(YKHO, SppC: sp.csr_matrix):\n SppC = SppC.tocoo()\n WKvO = ht2j.sparse.FloatTensor(ht2j.LongTensor(oyIN.array([SppC.row, SppC.col])), ht2j.FloatTensor(SppC.data.astype(oyIN.float32)), SppC.shape).to(YKHO.device)\n return WKvO",
"def FXf_(On0F):\n _0VL = ht2j.from_numpy(oyIN.vstack((On0F.row,... | [
"0.8299787",
"0.8148542",
"0.8045949",
"0.80325705",
"0.80134654",
"0.79973555",
"0.79973555",
"0.7985302",
"0.7985302",
"0.7985302",
"0.7977018",
"0.79650825",
"0.7754673",
"0.7713117",
"0.7429514",
"0.7429514",
"0.735423",
"0.71969247",
"0.7156927",
"0.69882196",
"0.6969645... | 0.80300856 | 13 |
public setter for self._use_aux_heads, called every time an assignment to self.use_aux_heads is applied. if use_aux is False, `_remove_auxiliary_heads` is called to delete auxiliary and detail heads. if use_aux is True, and self._use_aux_heads was already set to False a ValueError is raised, recreating aux and detail h... | def RWl0(YKHO, YGRC: bool):
if YGRC is True and YKHO._use_aux_heads is False:
raise ValueError('Cant turn use_aux_heads from False to True. Try initiating the module again with `use_aux_heads=True` or initiating the auxiliary heads modules manually.')
if not YGRC:
YKHO._remove_auxiliary_heads()
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M8Q6(YKHO, WKvO, Scjb, TMst):\n N8L0 = dict()\n if isinstance(YKHO.auxiliary_head, U78l.ModuleList):\n for or8S, lvYO in enumerate(YKHO.auxiliary_head):\n Lr1U = lvYO.forward_train(WKvO, Scjb, TMst, YKHO.train_cfg)\n N8L0.update(a_z2(Lr1U, f'aux_{or8S}'))\n else:\n ... | [
"0.52376163",
"0.45844907",
"0.45811093",
"0.45760122",
"0.45500726",
"0.45051795",
"0.4464918",
"0.44381142",
"0.43665466",
"0.43560833",
"0.4311725",
"0.42804468",
"0.4253698",
"0.42298898",
"0.42072165",
"0.41669574",
"0.41252705",
"0.4124604",
"0.41143984",
"0.4101132",
"... | 0.88334244 | 0 |
inits layers and loads pretrained detectronbackbonearchitecture (Conv_Body and RPN) also freezes weights of Conv_Body and RPN | def YyfQ(YKHO, grEy=None):
if grEy is None:
if _Fei.MODEL.LOAD_PRETRAINED_BACKBONE_WEIGHTS:
print('\n-------------------------------------------')
print('Load pre-trained ImageNet weights')
print('\n-------------------------------------------')
sgHF.load_caffe... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def J2K6(YKHO):\n YKHO._init_predictor()\n if YKHO.use_edge_fusion:\n YKHO._init_edge_module()",
"def OJVN(YKHO):\n xA7f = YKHO.state_dict()\n DTb0 = list(xA7f.keys())\n KFXN = TTda.models.vgg16(pretrained=True).state_dict()\n DDS1 = list(KFXN.keys())\n for YRbF, xqoZ in enumerate(DTb... | [
"0.71189755",
"0.70397174",
"0.7027052",
"0.69417554",
"0.6910521",
"0.6740351",
"0.6731823",
"0.66610456",
"0.66405517",
"0.6577447",
"0.6523255",
"0.6508466",
"0.6504946",
"0.6497513",
"0.64923275",
"0.6489189",
"0.6480545",
"0.64784837",
"0.64296126",
"0.64292455",
"0.6413... | 0.7570021 | 0 |