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 |
|---|---|---|---|---|---|---|
Gets the specified accumulator from this counter object. | def NMoC(YKHO, Bo5g):
return getattr(YKHO, 'count_' + Bo5g, 0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pN0o(YKHO):\n return YKHO.ACCUMULATOR",
"def c1EA(YKHO, alQJ: int) -> int:\n return alQJ",
"def k06t(YKHO):\n raise NotImplementedError",
"def k06t(YKHO) -> l3Mo:\n return {}",
"def bMpl():\n pass",
"def c1EA(YKHO, alQJ):\n raise NotImplementedError",
"def YAq3(WiGy: int, alQJ, n8... | [
"0.72960806",
"0.66314626",
"0.628824",
"0.5919295",
"0.5787861",
"0.56600875",
"0.54951143",
"0.54827005",
"0.5428628",
"0.5382291",
"0.5373962",
"0.51670355",
"0.513239",
"0.51320636",
"0.51240146",
"0.5068",
"0.5049705",
"0.50312996",
"0.50075924",
"0.49847364",
"0.4969608... | 0.0 | -1 |
Gets an integer ID that is guaranteed to be different from any ID previously returned by this static method. | def srZh():
ShR8 = MfiP()
ShR8.put()
return ShR8.key().id() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hajL(YKHO):\n id = YKHO.id()\n if not isinstance(id, (int, Swre)):\n id = None\n return id",
"def id(YKHO) -> int:\n return YKHO._oid",
"def wfbg(YKHO):\n return int(YKHO.id)",
"def unpH(YKHO) -> int:\n return YKHO.id",
"def unpH(YKHO) -> int:\n return YKHO.id",
"def OyzV(... | [
"0.82013637",
"0.78027546",
"0.7674348",
"0.7614026",
"0.7614026",
"0.7568451",
"0.75040185",
"0.73927766",
"0.73816633",
"0.73816633",
"0.73816633",
"0.73816633",
"0.73816633",
"0.73816633",
"0.7357538",
"0.7356729",
"0.73359656",
"0.7333701",
"0.73305786",
"0.73305786",
"0.... | 0.0 | -1 |
Initialize restaurant name and cuisine type attributes | def FIMM(YKHO, zqv0, N4Ku):
YKHO.restaurant_name = zqv0
YKHO.cuisine_type = N4Ku | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, zqv0, N4Ku):\n YKHO.restaurant_name = zqv0\n YKHO.cuisine_type = N4Ku",
"def FIMM(YKHO, zqv0, N4Ku):\n YKHO.name = zqv0\n YKHO.type = N4Ku",
"def FIMM(YKHO, zqv0, N4Ku):\n YKHO.restaurant_name = zqv0.title()\n YKHO.cuisine_type = N4Ku",
"def FIMM(YKHO, zqv0, N4Ku):\n YKHO.... | [
"0.8867893",
"0.88307756",
"0.8777077",
"0.86650914",
"0.8590518",
"0.854975",
"0.854975",
"0.8524922",
"0.85144866",
"0.84030193",
"0.84030193",
"0.8368049",
"0.83221966",
"0.83221966",
"0.8252662",
"0.8079612",
"0.7813271",
"0.78129244",
"0.78112715",
"0.7777169",
"0.736069... | 0.87326837 | 5 |
Go through all empty positions and initialize their possible values, according to the constraints. Called once when the board is first created. | def JpoM(YKHO):
for (rdlD, fvDH), Fs3j in oyIN.ndenumerate(YKHO.final_values):
YKHO.possible_values[rdlD][fvDH] = []
if Fs3j == 0:
for BWXx in range(1, 10):
if YKHO.__is_valid_value(rdlD, fvDH, BWXx):
YKHO.possible_values[rdlD][fvDH].append(BWXx)
r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, CSCV):\n YKHO.final_values = CSCV\n YKHO.possible_values = oyIN.empty(shape=(9, 9), dtype=list)",
"def KFny(YKHO):\n YKHO.board = oyIN.zeros(shape=(P5Bq, P5Bq), dtype=oyIN.int)\n hgjH = int(P5Bq / 2)\n YKHO.board[hgjH - 1][hgjH - 1] = YKHO.board[hgjH][hgjH] = eJVO\n YKHO.board[hg... | [
"0.69556713",
"0.69445854",
"0.6928109",
"0.6829788",
"0.68030906",
"0.67487305",
"0.66930026",
"0.6672037",
"0.66359526",
"0.6585402",
"0.652841",
"0.65129584",
"0.650719",
"0.6502183",
"0.64733964",
"0.64556843",
"0.6449356",
"0.6448072",
"0.6445054",
"0.642698",
"0.637587"... | 0.76460886 | 0 |
Checks if the board is solvable, i.e. each empty position has at least one possible value. | def dd1_(YKHO):
for rdlD, fvDH in oyIN.ndindex(9, 9):
if len(YKHO.possible_values[rdlD][fvDH]) < 1 and YKHO.final_values[rdlD][fvDH] == 0:
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oQYC(YKHO):\n for VmPb in YKHO.board.values():\n if not VmPb.value:\n return False\n return True",
"def Yprr(YKHO):\n if not YKHO.is_legal():\n return False\n for VmPb in YKHO._cells_iterable():\n if VmPb == YKHO.EMPTY_CELL:\n return False\n return Tr... | [
"0.8226037",
"0.7956708",
"0.77154416",
"0.7613739",
"0.76123434",
"0.75807106",
"0.7487948",
"0.7479519",
"0.73125523",
"0.72673947",
"0.72199494",
"0.71548647",
"0.71472603",
"0.7147121",
"0.7127494",
"0.70912015",
"0.7089305",
"0.7081779",
"0.7027587",
"0.701583",
"0.70122... | 0.83548516 | 0 |
Checks if the board has been solved, i.e. there are no empty positions (signified by zeroes). | def HjJj(YKHO):
if 0 in YKHO.final_values:
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eGi5(iBIi):\n neBz = hJnP(iBIi)\n if not neBz:\n return True\n else:\n rdlD, fvDH = neBz\n for YRbF in range(1, 10):\n if deVW(iBIi, YRbF, (rdlD, fvDH)):\n iBIi[rdlD][fvDH] = YRbF\n if eGi5(iBIi):\n return True\n iBIi[rdlD][fvDH] ... | [
"0.8065399",
"0.79596627",
"0.79174244",
"0.77993",
"0.7604317",
"0.7598087",
"0.7514709",
"0.7465813",
"0.7465206",
"0.74407125",
"0.74258065",
"0.74165255",
"0.7411672",
"0.7367736",
"0.7352679",
"0.7340678",
"0.732091",
"0.73000395",
"0.7285851",
"0.728125",
"0.72783285",
... | 0.0 | -1 |
Generates a list with the coordinates of all the empty slots that have only 1 possible value (singletons). Called after assignment (generate of new board). | def NkH9(YKHO):
fnO7 = []
for rdlD in range(9):
for fvDH in range(9):
if len(YKHO.possible_values[rdlD][fvDH]) == 1 and YKHO.final_values[rdlD][fvDH] == 0:
fnO7.append((rdlD, fvDH))
return fnO7 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IbE9(YKHO):\n U5bT = []\n for YRbF in range(0, YKHO.size):\n for r845 in range(0, YKHO.size):\n if YKHO.grid[YRbF][r845] == YKHO.terminal:\n U5bT.append((YRbF, r845))\n return U5bT",
"def mWT0(YKHO):\n lsmZ = []\n for rdlD in range(YKHO._dim):\n for fvDH... | [
"0.73838145",
"0.71295583",
"0.7018735",
"0.6972191",
"0.6946488",
"0.6906955",
"0.6903224",
"0.6879551",
"0.68740577",
"0.68387556",
"0.6811779",
"0.674936",
"0.6731642",
"0.672649",
"0.67142946",
"0.67014825",
"0.66878414",
"0.66877687",
"0.6650112",
"0.6625762",
"0.6603511... | 0.7582303 | 0 |
Deprecated status setup end_date. | def xIPy(YKHO):
z5su = Rqdq.ControlFactory()
YKHO.assertIsNone(z5su.end_date)
YKHO.api.put(z5su, z5su.id, {'status': Uk9h.Control.DEPRECATED})
z5su = NCls.session.query(Uk9h.Control).get(z5su.id)
YKHO.assertIsNotNone(z5su.end_date) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EmhK(YKHO, _c1T):\n pass",
"def zvAj(YKHO, Id2S):\n YKHO.end_date = Id2S",
"def KhBf(YKHO, KhBf):\n YKHO._end_date = KhBf",
"def KhBf(YKHO, KhBf):\n if KhBf is None:\n KhBf = qcWV.utcnow()\n YKHO._end_date = X8kJ.parse_date(KhBf)",
"def KhBf(YKHO):\n return YKHO.__end_date",
... | [
"0.7037978",
"0.65168864",
"0.64707625",
"0.64283144",
"0.6330095",
"0.62186366",
"0.62186366",
"0.62186366",
"0.62186366",
"0.62186366",
"0.62186366",
"0.62186366",
"0.62186366",
"0.61597675",
"0.6109338",
"0.6109338",
"0.60571206",
"0.6051189",
"0.6051189",
"0.59943473",
"0... | 0.59660435 | 24 |
Test order of ExternalComments returned by /query. | def j8MV(YKHO, EmSE):
with Rqdq.single_commit():
z5su = Rqdq.ControlFactory()
for bGrB in range(5):
aM_I = Rqdq.ExternalCommentFactory(description=Rqdq.random_str())
Rqdq.RelationshipFactory(source=z5su, destination=aM_I)
xGqu = [{'filters': {'expression': {'object_name':... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def h7Rh(YKHO):\n with Rqdq.single_commit():\n z5su = Rqdq.ControlFactory()\n aM_I = Rqdq.ExternalCommentFactory(description='test comment')\n Rqdq.RelationshipFactory(source=z5su, destination=aM_I)\n xGqu = [{'filters': {'expression': {'object_name': 'Control', 'op': {'name': 'relevant'... | [
"0.7089441",
"0.6435584",
"0.62819415",
"0.62208265",
"0.6208567",
"0.60752714",
"0.60502255",
"0.6033374",
"0.5925397",
"0.5853359",
"0.58321196",
"0.5813381",
"0.5785427",
"0.5702853",
"0.56935304",
"0.5685173",
"0.5685115",
"0.56263196",
"0.55783224",
"0.5520285",
"0.54655... | 0.77446896 | 0 |
Returns the next action the agent will take | def bk5W(YKHO, QTBn):
"""*** YOUR CODE HERE ***"""
WKvO, LVAh = QTBn.getPacmanPosition(YKHO.index)
AZlh = QTBn.getNumPacmanAgents()
if not YeP6.customFood:
YeP6.customFood = QTBn.getFood()
YeP6.foodLeft = len(YeP6.customFood.asList())
if YKHO.path and YKHO.path[0] == 'place':
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XeOP(YKHO):\n HUMG = YKHO.strategy.get_next_move(YKHO)\n return HUMG",
"def mq_y(YKHO):\n P6bq = YKHO.plan.pop(0)\n return P6bq",
"def mq_y(YKHO):\n eUNT = None\n while eUNT is None:\n Acvy = input('Action: ')\n eUNT = d5fj.get(Acvy)\n return eUNT",
"def next(YKHO, QTBn... | [
"0.8337207",
"0.79425484",
"0.79240257",
"0.75870395",
"0.7547049",
"0.73340666",
"0.73014915",
"0.7267236",
"0.7194915",
"0.71547794",
"0.71327364",
"0.7079289",
"0.70439297",
"0.69918877",
"0.6959046",
"0.6955211",
"0.69239324",
"0.69239324",
"0.6898673",
"0.6885382",
"0.68... | 0.0 | -1 |
Create instance of LightningDataModule class which can be used for creating DataLoader for particular dataset. | def MeZg(GPtr: Config) -> odhw:
ckRy = {'train': GPtr.TRAIN_DATA_DIR, 'test': GPtr.TEST_DATA_DIR, 'val': GPtr.VALID_DATA_DIR}
return w_F9(ckRy) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rHzL(YKHO, **B2fa):\n return pVAc(YKHO, **B2fa)",
"def K1Op(YKHO) -> pVAc:\n return pVAc(YKHO.train_dataset, batch_size=YKHO.hparams.batch_size, shuffle=True, num_workers=laXl.cpu_count())",
"def K1Op(YKHO) -> ht2j.utils.data.DataLoader:\n return ht2j.utils.data.DataLoader(YKHO.dataset_train, **YK... | [
"0.735904",
"0.735311",
"0.7320936",
"0.73052824",
"0.7230452",
"0.71447974",
"0.7044497",
"0.6889275",
"0.68658566",
"0.6865417",
"0.6857626",
"0.6827875",
"0.6810419",
"0.67897904",
"0.665286",
"0.6627414",
"0.66264206",
"0.6625209",
"0.6599837",
"0.6570209",
"0.6516974",
... | 0.71475625 | 5 |
Return a ROS message from a serialized string | def sI7B(YKHO, EGzx, Emd4):
tO9_ = Emd4()
Aofo = tO9_.deserialize(EGzx)
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n5rA(YKHO, str):\n T_Uj.lookup_error('rosmsg').msg_type = YKHO._type\n try:\n if YKHO.header is None:\n YKHO.header = kKAJ.msg.Header()\n if YKHO.type is None:\n YKHO.type = kKAJ.msg.String()\n if YKHO.parent_name is None:\n YKHO.parent_name = kKAJ.ms... | [
"0.72504485",
"0.7245892",
"0.7094195",
"0.69345707",
"0.6886136",
"0.6874164",
"0.6864935",
"0.6849131",
"0.68235683",
"0.6793045",
"0.67202127",
"0.6682759",
"0.66647387",
"0.66523033",
"0.6595845",
"0.6576521",
"0.6566095",
"0.6548959",
"0.64836025",
"0.64610857",
"0.64535... | 0.64915717 | 18 |
This function creates the buttons to be pressed/clicked during the game. | def jHsu(f4IJ):
YZz6 = D04X(f4IJ, height=2, width=2, text=' ', command=lambda: wlc7(YZz6))
YZz6.pack(side=pY1r)
V_Tw = D04X(f4IJ, height=2, width=2, text=' ', command=lambda: wlc7(V_Tw))
V_Tw.pack(side=pY1r)
nBRS = D04X(f4IJ, height=2, width=2, text=' ', command=lambda: wlc7(nBRS))
nBRS.pack(sid... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jHsu(YKHO):\n YKHO.easy_button = D04X(YKHO.ai_game, 'Easy', -1, 0)\n YKHO.normal_button = D04X(YKHO.ai_game, 'Normal', 0, 0)\n YKHO.hard_button = D04X(YKHO.ai_game, 'Hard', 1, 0)\n YKHO.quit_button = D04X(YKHO.ai_game, 'Quit', 0, 1)\n YKHO.buttons = (YKHO.easy_button, YKHO.normal_button, YKHO.ha... | [
"0.8152329",
"0.7905322",
"0.77345216",
"0.76290643",
"0.7562581",
"0.7429676",
"0.7409013",
"0.7391837",
"0.73436",
"0.7276186",
"0.7248884",
"0.72447884",
"0.72356814",
"0.72100484",
"0.7117757",
"0.7070466",
"0.70612425",
"0.7014205",
"0.6998184",
"0.6946568",
"0.6931892",... | 0.76530534 | 3 |
Sets the seed for this env's random number generator(s). Returns Returns the list of seeds used in this env's random number generators | def yokr(YKHO, yokr=None):
YKHO.np_random, yokr = ch3p.utils.seeding.np_random(yokr)
return [yokr] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yokr(YKHO, yokr=None):\n YKHO.np_random, yokr = Gt3g.np_random(yokr)\n return [yokr]",
"def yokr(YKHO, yokr=None):\n YKHO.np_random, yokr = Gt3g.np_random(yokr)\n return [yokr]",
"def yokr(YKHO, yokr=None):\n YKHO.np_random, yokr = Gt3g.np_random(yokr)\n return [yokr]",
"def yokr(YKHO, ... | [
"0.84853697",
"0.8463831",
"0.8463831",
"0.8447249",
"0.8351227",
"0.8250413",
"0.80403525",
"0.796306",
"0.7315629",
"0.72712773",
"0.7259946",
"0.7238558",
"0.7234487",
"0.7211908",
"0.7199528",
"0.7169771",
"0.714234",
"0.71165854",
"0.71165854",
"0.70867884",
"0.69960344"... | 0.8513289 | 0 |
This function generates a random string using the given length and character set. | def R9li(zNig=6, gLiZ=vIwR.ascii_uppercase + vIwR.digits):
return ''.join((tuKI.choice(gLiZ) for bGrB in range(zNig))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def osaO(zZas, u54L):\n KCHu = ''\n Rv0k = len(zZas) - 1\n Mkmy = tuKI.SystemRandom()\n for YRbF in range(0, u54L + 1):\n exwG = Mkmy.randint(0, Rv0k)\n KCHu = KCHu + zZas[exwG]\n return KCHu",
"def YzjY(u54L: int):\n FLLz = vIwR.ascii_letters + vIwR.digits\n return ''.join(tuK... | [
"0.83858544",
"0.8240503",
"0.81806076",
"0.81035495",
"0.80651194",
"0.8061078",
"0.7977482",
"0.79770094",
"0.7972302",
"0.7967095",
"0.7918699",
"0.7916532",
"0.79160416",
"0.7904953",
"0.78926355",
"0.7887011",
"0.78824776",
"0.7862049",
"0.7859437",
"0.78591144",
"0.7845... | 0.0 | -1 |
label(a) == label(b) && a != b | def rUth(Crrw):
ooTa = ZylS.shape(Crrw)[0]
hVkF = ZylS.logical_not(OPo9(Crrw))
H_De = ZylS.logical_not(ZylS.eye(ooTa, dtype=ZylS.bool))
return ZylS.logical_and(hVkF, H_De) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif):\n return ZylS.math.not_equal(YKHO._ordinals, Elif.ordinal())",
"def Zu14(jzdc, Fg_i):\n return jzdc != Fg_i",
"def xa14(YKHO, Elif):\n return YKHO.label == Elif.label and YKHO.positive_state == Elif.positive_state",
"def rsJ8(k0lF, jzdc, tjUW, Fg_i):\n return jzdc != Fg_i",
... | [
"0.71798927",
"0.7076246",
"0.70062286",
"0.68969136",
"0.6873993",
"0.6742048",
"0.66909033",
"0.65883094",
"0.6566443",
"0.6555804",
"0.6532703",
"0.65173995",
"0.6475816",
"0.6444344",
"0.6441343",
"0.64171046",
"0.64070123",
"0.63709736",
"0.6359963",
"0.6357309",
"0.6338... | 0.0 | -1 |
Initialises a `Spectrum1D` object from an `astropy.table.Table` instance. | def zDGD(Emd4, tyNF, PDEV, ZJ11, cjPF=None, vMcK=None, PXGI=None, dNkE=None):
wgnM = f9X8(tyNF[PDEV])
shSu = f9X8(tyNF[ZJ11])
if cjPF is not None:
P1dF = f9X8(tyNF[cjPF])
else:
P1dF = None
if vMcK is not None:
oe3X = f9X8(tyNF[vMcK])
else:
oe3X = None
e5kH = t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zDGD(Emd4, tyNF):\n GAzA = fyLx(tyNF['THETA_LO'].squeeze(), tyNF['THETA_HI'].squeeze())\n GAzA = CEWs(GAzA, tyNF['THETA_LO'].unit)\n QpQ9 = fyLx(tyNF['ENERG_LO'].squeeze(), tyNF['ENERG_HI'].squeeze())\n QpQ9 = KgdB(QpQ9, tyNF['ENERG_LO'].unit)\n BWz1 = f9X8(tyNF['counts'].squeeze(), tyNF['counts... | [
"0.58847636",
"0.5752756",
"0.57239497",
"0.5702236",
"0.5557037",
"0.54563797",
"0.5385332",
"0.53390545",
"0.5298843",
"0.52871335",
"0.5243626",
"0.52360696",
"0.5224612",
"0.5213403",
"0.51625204",
"0.5160665",
"0.5160665",
"0.51571715",
"0.51257694",
"0.51250327",
"0.510... | 0.5642316 | 4 |
returns True if number is prime, False otherwise | def T1qg(FGW3):
for YRbF in range(2, FGW3):
if FGW3 % YRbF == 0:
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T1qg(FGW3):\n if FGW3 < 2:\n return False\n elif FGW3 == 2:\n return True\n elif FGW3 % 2 == 0:\n return False\n else:\n for WKvO in range(2, FGW3):\n if FGW3 % WKvO == 0:\n return False\n else:\n return True",
"def GiUy(f813... | [
"0.8485697",
"0.8467493",
"0.84140295",
"0.8360368",
"0.83536255",
"0.8352131",
"0.8317346",
"0.82874715",
"0.8270817",
"0.82524806",
"0.82370245",
"0.82214177",
"0.8217482",
"0.82134634",
"0.8209622",
"0.8198739",
"0.81563526",
"0.81278956",
"0.80930114",
"0.8090869",
"0.808... | 0.81863403 | 16 |
The table name with the details we want will either be the new table (only possible after made of course) or if an existing table, the original name. | def H6U0(YKHO):
I1iR = kJNw.DATADETS_OBJ
if not YKHO.read_only:
if not YKHO.panel.Validate():
raise Exception(bGrB('Invalid table design.'))
eG7b = YKHO.txt_tblname.GetValue()
if YKHO.new:
try:
del YKHO.tblname_lst[0]
except Exception:
pass
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GTA_(YKHO):\n return YKHO._new_table.name",
"def GTA_() -> str:\n pass",
"def mQH2(YKHO):\n if len(YKHO._old_table.name) < si3H.MAX_TABLE_LENGTH - 10:\n return si3H.NEW_TABLE_PREFIX + YKHO.table_name\n elif len(YKHO._old_table.name) >= si3H.MAX_TABLE_LENGTH - 10 and len(YKHO._old_table.n... | [
"0.82664675",
"0.7914891",
"0.7804374",
"0.7452047",
"0.7402411",
"0.7402411",
"0.7402411",
"0.73365813",
"0.732864",
"0.7300404",
"0.7268513",
"0.7258091",
"0.7197089",
"0.71480244",
"0.71113324",
"0.7037499",
"0.70236194",
"0.7012551",
"0.70000315",
"0.69864565",
"0.6977005... | 0.0 | -1 |
convert an image to tensor | def ia7W(QMAG: str, n80H: str) -> None:
LNo8 = oyIN.asarray(hnIv.open(QMAG).resize((224, 224))) / 255.0
if LNo8.shape == (224, 224, 4):
LNo8 = LNo8[:, :, 0] * 0.21 + LNo8[:, :, 1] * 0.72 + LNo8[:, :, 2] * 0.07
pbId = ht2j.tensor(oyIN.expand_dims(oyIN.repeat(LNo8[..., oyIN.newaxis], 3, -1), axis=0)).... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ia7W(LNo8):\n return SZFh(LNo8)",
"def EAZM(VXjJ):\n VXjJ = _J6p()(VXjJ)\n return VXjJ",
"def uaVh(VXjJ):\n a1PO = Ymkf.ToPILImage()\n return a1PO(VXjJ)",
"def KlI5(LNo8):\n aEZk = LNo8.transpose(2, 0, 1)\n aEZk = aEZk.astype(oyIN.float32)\n aEZk = ht2j.from_numpy(aEZk)\n if ht... | [
"0.8577761",
"0.8157437",
"0.8129766",
"0.8020487",
"0.7826417",
"0.7674793",
"0.76635075",
"0.7605076",
"0.74680465",
"0.7453381",
"0.7411015",
"0.7337452",
"0.7310343",
"0.7255455",
"0.72391504",
"0.72352755",
"0.72217673",
"0.7181541",
"0.7170399",
"0.7105143",
"0.70998234... | 0.7480528 | 8 |
Closes the SSEClient instance. | def DDI8(YKHO):
YKHO.should_connect = False
YKHO.retry = 0
YKHO.resp.close() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DDI8(YKHO):\n if YKHO.client:\n YKHO.client.connection.close()\n YKHO.client = None",
"async def close(YKHO) -> None:\n if YKHO._client:\n await YKHO._client.__aexit__()",
"def DDI8(YKHO):\n YKHO._client.close()\n YKHO._transport.close()",
"def DDI8(YKHO):\n YKHO._clie... | [
"0.70056486",
"0.69517237",
"0.6944841",
"0.68412125",
"0.68307555",
"0.6823133",
"0.6763972",
"0.67183405",
"0.66115445",
"0.6608905",
"0.65187925",
"0.64577305",
"0.6432181",
"0.64266264",
"0.6422844",
"0.63979894",
"0.63341075",
"0.6315731",
"0.62710834",
"0.6245288",
"0.6... | 0.0 | -1 |
Take a function that accepts input arrays. This is a temporary thing until we have a proper decorator system for these array functions. | def E0uw(vm1a):
return lambda qIxc: (vm1a(*qIxc),) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zIjt(eHNT):\n\n @zaGL(eHNT)\n def b6ry(YKHO, a1PO):\n a1PO = oyIN.atleast_1d(a1PO)\n Mkmy = eHNT(YKHO, a1PO)\n return Mkmy\n return b6ry",
"def dVTl(YKHO, JfyU, SnBA, qIxc, B2fa):\n try:\n if not JfyU.__module__.startswith('numpy'):\n return NotImplemented\n... | [
"0.78472435",
"0.7292039",
"0.71375084",
"0.6872393",
"0.6783825",
"0.65298057",
"0.6491657",
"0.6351075",
"0.6334589",
"0.6271168",
"0.6224946",
"0.6210089",
"0.6186544",
"0.615926",
"0.6145688",
"0.6110263",
"0.6102116",
"0.6027178",
"0.602611",
"0.60202897",
"0.6020025",
... | 0.52309525 | 78 |
[This function checks for similarity between understat and fpl names, and returns a dataframe with all the unique understat names with the most similarly matching FPL name.] | def bT_r(WohW, ixXH):
WohW, ixXH = (WohW['player_name'].unique(), ixXH['player_name'].unique())
Q6uT = _ama.SequenceMatcher()
FFbU = []
QQPD = []
dMYj = []
for YRbF in range(len(WohW)):
for r845 in range(len(ixXH)):
Q6uT.set_seqs(WohW[YRbF].lower(), ixXH[r845].lower())
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n01d(zJ62, Efy2, K4ro):\n cJf1 = zJ62[~zJ62['player_name'].isin(K4ro['player_name'].unique())]\n Z8iT = Efy2[~Efy2['player_name'].isin(K4ro['player_name'].unique())]\n return (cJf1, Z8iT)",
"def Hms2(Efy2, zJ62, gzes='inner'):\n xVRb = XMlP(Efy2['player_name'].unique(), zJ62['player_name'].unique... | [
"0.67464316",
"0.6070741",
"0.587723",
"0.5818824",
"0.5750044",
"0.5457883",
"0.54351366",
"0.5387454",
"0.5255924",
"0.51499546",
"0.5148366",
"0.51164156",
"0.5079236",
"0.50657415",
"0.5030209",
"0.502642",
"0.49840075",
"0.49655002",
"0.4962999",
"0.49557227",
"0.4934124... | 0.8124159 | 0 |
Operator converter for brelu. | def fdYz(Oa1e, khtY, XkN1):
WKvO = Oa1e.get_node(khtY.input('X')[0])
w3IF = khtY.attr('t_max')
XXcz = khtY.attr('t_min')
yvT9 = Bchp.tensor.clip(WKvO, XXcz, w3IF)
Oa1e.add_node(khtY.output('Out')[0], yvT9) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SXYu(Q6kx, **B2fa):\n return PZJO('Relu', Q6kx, B2fa)",
"def zMt_(input):\n CkYf = GVKG(axis=3)(input)\n return MroH('relu')(CkYf)",
"def zMt_(input):\n CkYf = GVKG()(input)\n return MroH('relu')(CkYf)",
"def zMt_(input):\n CkYf = GVKG()(input)\n return MroH('relu')(CkYf)",
"def zM... | [
"0.6997577",
"0.67862815",
"0.6746368",
"0.6746368",
"0.6721262",
"0.6600945",
"0.6600945",
"0.65476614",
"0.65432006",
"0.64540356",
"0.6344826",
"0.6294202",
"0.62071335",
"0.6112909",
"0.5998305",
"0.58736885",
"0.5863295",
"0.58511233",
"0.580061",
"0.57899237",
"0.577433... | 0.5725523 | 26 |
Operator converter for conv2d. | def wDdk(Oa1e, khtY, XkN1):
mJgj = khtY.attr('dilations')
moMn = khtY.attr('groups')
LkVj = khtY.attr('paddings')
DSTW = khtY.attr('padding_algorithm')
FEri = khtY.attr('strides')
WZcn = Oa1e.get_node(khtY.input('Filter')[0])
bVvo = Oa1e.get_node(khtY.input('Input')[0])
TcmJ = khtY.attr(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NwVq(YKHO, khtY):\n return YKHO.convert_conv(khtY, 'depthwise')",
"def YWvJ(*qIxc):\n return t627.itkScalarConnectedComponentImageFilterIUL2IUL2_cast(*qIxc)",
"def YWvJ(*qIxc):\n return t627.itkScalarConnectedComponentImageFilterIUC2IUC2_cast(*qIxc)",
"def mCnf(*qIxc):\n return t627.itkScalar... | [
"0.77124536",
"0.6659152",
"0.66298926",
"0.66006505",
"0.6547993",
"0.6544018",
"0.65421",
"0.6529408",
"0.64761746",
"0.64688337",
"0.6439539",
"0.64111936",
"0.6385079",
"0.6316574",
"0.628645",
"0.6282204",
"0.62778354",
"0.62658465",
"0.62658465",
"0.62357426",
"0.623200... | 0.67047113 | 1 |
Operator converter for conv3d. | def NYQB(Oa1e, khtY, XkN1):
mJgj = khtY.attr('dilations')
moMn = khtY.attr('groups')
LkVj = khtY.attr('paddings')
DSTW = khtY.attr('padding_algorithm')
FEri = khtY.attr('strides')
WZcn = Oa1e.get_node(khtY.input('Filter')[0])
bVvo = Oa1e.get_node(khtY.input('Input')[0])
TcmJ = khtY.attr(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def A941(*qIxc):\n return t627.itkScalarConnectedComponentImageFilterIUL3IUL3_cast(*qIxc)",
"def YWvJ(*qIxc):\n return t627.itkScalarConnectedComponentImageFilterIUL3IUL3_cast(*qIxc)",
"def YWvJ(*qIxc):\n return t627.itkScalarConnectedComponentImageFilterIUS3IUS3_cast(*qIxc)",
"def YWvJ(*qIxc):\n ... | [
"0.6859782",
"0.6835417",
"0.68006456",
"0.67527854",
"0.6750266",
"0.6737496",
"0.66440094",
"0.6570769",
"0.6542995",
"0.65286976",
"0.6474901",
"0.64694494",
"0.646473",
"0.6462924",
"0.64120245",
"0.6361748",
"0.6354526",
"0.63530177",
"0.63488555",
"0.6339379",
"0.631805... | 0.7081379 | 0 |
Operator converter for dist. | def _dNp(Oa1e, khtY, XkN1):
WKvO = Oa1e.get_node(khtY.input('X')[0])
LVAh = Oa1e.get_node(khtY.input('Y')[0])
epBp = Bchp.abs(Bchp.subtract(WKvO, LVAh))
yDqo = a8US(WKvO).checked_type.dtype
XP5J = khtY.attr('p')
if XP5J == oyIN.inf:
yvT9 = Bchp.reduce.max(epBp)
elif XP5J == oyIN.NINF... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ijrG(YKHO):\n raise NotImplementedError",
"def zHs4(D2_H):\n return 10.0 ** (D2_H / 5.0 - 2.0)",
"def XGol(seET):\n if isinstance(seET, str):\n return jfMT.STRING_OPERATOR_MAP[seET]\n else:\n return seET",
"def pImw(YKHO):\n pass",
"def XGol(YKHO) -> uS0y:\n return uS0y(... | [
"0.6339641",
"0.58407134",
"0.5719981",
"0.55249023",
"0.55137885",
"0.5484184",
"0.5455077",
"0.5454385",
"0.5448707",
"0.54449403",
"0.5438097",
"0.5403102",
"0.5321066",
"0.53005666",
"0.52721924",
"0.5269971",
"0.5256855",
"0.52475345",
"0.5199331",
"0.5192369",
"0.517775... | 0.6126183 | 1 |
Operator converter for dot. | def pgfN(Oa1e, khtY, XkN1):
WKvO = Oa1e.get_node(khtY.input('X')[0])
LVAh = Oa1e.get_node(khtY.input('Y')[0])
yvT9 = Bchp.sum(Bchp.multiply(WKvO, LVAh), axis=[-1], keepdims=True)
Oa1e.add_node(khtY.output('Out')[0], yvT9) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BJ1H(YKHO, WKvO):\n pass",
"def BJ1H(YKHO, Elif):\n from divisi2 import operators\n return operators.dot(YKHO, Elif)",
"def BJ1H(jzdc, Fg_i):\n raise NotImplementedError",
"def BJ1H(YKHO):\n return YKHO.__dot",
"def BQE4(Extv, VN2L):\n return '{((%s) \\\\cdot (%s))}' % (VN2L.args[0], ... | [
"0.7000113",
"0.69225705",
"0.6734694",
"0.66602993",
"0.6594274",
"0.6549932",
"0.6436715",
"0.6356107",
"0.63459045",
"0.6322401",
"0.6261979",
"0.6168339",
"0.6146374",
"0.60558003",
"0.6028431",
"0.6012952",
"0.59742177",
"0.5954042",
"0.5941271",
"0.58944374",
"0.5888765... | 0.55892116 | 51 |
Operator converter for fill_constant. | def w1PO(Oa1e, khtY, XkN1):
BWXx = khtY.attr('value')
ROpF = XkN1.var(khtY.output('Out')[0]).shape
yDqo = khtY.attr('dtype')
yDqo = ON1p(yDqo)
BWXx = fJ4t.const(BWXx).astype(yDqo)
if 'ValueTensor' in khtY.input_names and khtY.input('ValueTensor'):
ROpF = Oa1e.get_node(khtY.input('ValueTe... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zs9C(Q6kx, **B2fa):\n return PZJO('ConstantFill', Q6kx, B2fa)",
"def ucF5(YKHO, Q6kx):\n if Q6kx.is_constant(rIn6):\n return YKHO.convert_func(Cl3a({}, Q6kx.value, Q6kx.abstract))\n return YKHO.make_const(Q6kx.value, Q6kx.abstract)",
"def XBHe(YKHO, BWXx, cjXo, sHw7, yCnv):\n cjXo = YKHO... | [
"0.70990324",
"0.6030638",
"0.5743218",
"0.5708666",
"0.56673795",
"0.5635013",
"0.5507181",
"0.55013335",
"0.5461051",
"0.54267126",
"0.53893894",
"0.53808427",
"0.5360184",
"0.53533846",
"0.5340008",
"0.5330984",
"0.5328292",
"0.5297096",
"0.52946055",
"0.52735186",
"0.5270... | 0.70311314 | 1 |
Operator converter for grid_sampler. | def f4jA(Oa1e, khtY, XkN1):
WKvO = Oa1e.get_node(khtY.input('X')[0])
KDwe = FVqP(WKvO)
Cs6h = Oa1e.get_node(khtY.input('Grid')[0])
Tuqy = khtY.attr('mode')
ktt2 = khtY.attr('padding_mode')
v8sN = khtY.attr('align_corners')
if len(KDwe) == 4:
LAOT = 'NCHW'
MPlV = [0, 3, 1, 2]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ijrG(YKHO):\n raise NotImplementedError",
"def XGol(seET):\n if isinstance(seET, str):\n return jfMT.STRING_OPERATOR_MAP[seET]\n else:\n return seET",
"def XGol(YKHO) -> uS0y:\n return uS0y(YKHO.to_instruction())",
"def FIMM(YKHO, RFg8: cirq.Sampler, H4pg: Union[Callable[[cirq.C... | [
"0.59936064",
"0.54852706",
"0.53029156",
"0.52232623",
"0.5098335",
"0.49979678",
"0.49866682",
"0.49159187",
"0.4880294",
"0.48530972",
"0.48529428",
"0.4848007",
"0.48410067",
"0.4820684",
"0.48026562",
"0.47862282",
"0.47634876",
"0.4757607",
"0.47517854",
"0.47374362",
"... | 0.54407173 | 2 |
Operator converter for hard_sigmoid. | def g8Xv(Oa1e, khtY, XkN1):
VMex = khtY.attr('slope')
vgXP = khtY.attr('offset')
WKvO = Oa1e.get_node(khtY.input('X')[0])
yvT9 = WKvO * fJ4t.const(VMex) + fJ4t.const(vgXP)
yvT9 = Bchp.clip(yvT9, 0, 1)
Oa1e.add_node(khtY.output('Out')[0], yvT9) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vAno(Q6kx, **B2fa):\n return PZJO('Sigmoid', Q6kx, B2fa)",
"def VSk8(WKvO):\n return WKvO * 0.5 + 0.5",
"def eyDK(input, LpaZ=False):\n return o8DQ.apply('HardSigmoid', input.device, [input], outputs=[input if LpaZ else None], alpha=1.0 / 6.0, beta=0.5)",
"def m1Hg(nPrm):\n return sfxH.sigmoi... | [
"0.79609686",
"0.7310558",
"0.72265494",
"0.71526724",
"0.7123541",
"0.6998369",
"0.6943257",
"0.69178456",
"0.68699634",
"0.6850029",
"0.6830203",
"0.68278205",
"0.68142104",
"0.6812073",
"0.6808258",
"0.6808258",
"0.6802319",
"0.6753503",
"0.6730246",
"0.6716248",
"0.671316... | 0.72889036 | 2 |
Operator converter for leaky_relu. | def SHYT(Oa1e, khtY, XkN1):
Cwt5 = khtY.attr('alpha')
WKvO = Oa1e.get_node(khtY.input('X')[0])
yvT9 = Bchp.nn.leaky_relu(WKvO, alpha=Cwt5)
Oa1e.add_node(khtY.output('Out')[0], yvT9) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def x9D0(pNZh: Graph, hHld: dict):\n H5Ae = hHld['mul_op']\n mLuS = hHld['const_data']\n fZyO = hHld['mul_data']\n WbAn = hHld['data']\n e503 = hHld['max_op']\n aq7Y = e503.out_node()\n if len(e503.in_nodes()) > 2:\n RKD7.debug('Maximum layer ({}) can not participate in conversion to le... | [
"0.7370343",
"0.73001176",
"0.66221714",
"0.65967107",
"0.6582359",
"0.6566005",
"0.65279996",
"0.6521039",
"0.64799136",
"0.64645904",
"0.6457674",
"0.64572585",
"0.6341657",
"0.6341657",
"0.6295495",
"0.6295495",
"0.62341285",
"0.6212536",
"0.62066454",
"0.6202043",
"0.6190... | 0.7227731 | 2 |
Operator converter for logsigmoid. | def QQd9(Oa1e, khtY, XkN1):
WKvO = Oa1e.get_node(khtY.input('X')[0])
yvT9 = Bchp.log(Bchp.tensor.sigmoid(WKvO))
Oa1e.add_node(khtY.output('Out')[0], yvT9) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vAno(Q6kx, **B2fa):\n return PZJO('Sigmoid', Q6kx, B2fa)",
"def Ccnu(d7pR):\n if d7pR >= 0:\n epBp = oyIN.exp(-d7pR)\n return 1.0 / (1.0 + epBp)\n else:\n epBp = oyIN.exp(d7pR)\n return epBp / (1 + epBp)",
"def VSk8(WKvO):\n return WKvO * 0.5 + 0.5",
"def X2PU(WKvO... | [
"0.76032346",
"0.70990795",
"0.6969098",
"0.69575626",
"0.68987423",
"0.68571717",
"0.6832141",
"0.6832141",
"0.68300146",
"0.68188673",
"0.68188673",
"0.6813658",
"0.6809938",
"0.6804544",
"0.6792052",
"0.6792052",
"0.67841154",
"0.67658395",
"0.67627764",
"0.67627764",
"0.6... | 0.7840095 | 0 |
Operator converter for pool2d. | def CiU_(Oa1e, khtY, XkN1):
qbr2 = khtY.attr('adaptive')
YaRV = khtY.attr('ceil_mode')
xoOX = khtY.attr('global_pooling')
M6vu = khtY.attr('ksize')
LkVj = khtY.attr('paddings')
DSTW = khtY.attr('padding_algorithm')
x11t = khtY.attr('pooling_type')
wH3T = khtY.attr('data_format')
if x... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ijrG(YKHO):\n raise NotImplementedError",
"def YWvJ(*qIxc):\n return t627.itkScalarConnectedComponentImageFilterIUS2IUS2_cast(*qIxc)",
"def YWvJ(*qIxc):\n return t627.itkScalarConnectedComponentImageFilterIUL2IUL2_cast(*qIxc)",
"def JMcY(*qIxc):\n return t627.itkScalarConnectedComponentImageF... | [
"0.67155707",
"0.63085103",
"0.6243801",
"0.624234",
"0.6140723",
"0.61363566",
"0.6072542",
"0.60115415",
"0.5975536",
"0.59201026",
"0.5870939",
"0.582125",
"0.57917345",
"0.57905704",
"0.57591844",
"0.57531637",
"0.57522684",
"0.57241905",
"0.57233334",
"0.5720315",
"0.570... | 0.627663 | 2 |
Operator converter for pool3d. | def no0K(Oa1e, khtY, XkN1):
qbr2 = khtY.attr('adaptive')
YaRV = khtY.attr('ceil_mode')
xoOX = khtY.attr('global_pooling')
M6vu = khtY.attr('ksize')
LkVj = khtY.attr('paddings')
DSTW = khtY.attr('padding_algorithm')
x11t = khtY.attr('pooling_type')
wH3T = khtY.attr('data_format')
if x... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YWvJ(*qIxc):\n return t627.itkScalarConnectedComponentImageFilterIUS3IUS3_cast(*qIxc)",
"def Wxhj(*qIxc):\n return t627.itkScalarConnectedComponentImageFilterIUS3IUS3_cast(*qIxc)",
"def YWvJ(*qIxc):\n return t627.itkScalarConnectedComponentImageFilterIUL3IUL3_cast(*qIxc)",
"def A941(*qIxc):\n ... | [
"0.64802796",
"0.634125",
"0.6329923",
"0.62835914",
"0.6072355",
"0.600861",
"0.5975352",
"0.5970682",
"0.5958929",
"0.5951508",
"0.59156597",
"0.5907593",
"0.5903646",
"0.59001213",
"0.5845868",
"0.5841345",
"0.5837835",
"0.583599",
"0.5832108",
"0.58082217",
"0.58035505",
... | 0.63981235 | 1 |
Operator converter for set_value. | def IGEK(Oa1e, khtY, XkN1):
WKvO = Oa1e.get_node(khtY.input('Input')[0])
if khtY.input('StartsTensorList'):
EV1I = Oa1e.get_node(khtY.input('StartsTensorList')[0])
else:
EV1I = khtY.attr('starts')[0]
if khtY.input('EndsTensorList'):
JmmR = Oa1e.get_node(khtY.input('EndsTensorList... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XGol(seET):\n if isinstance(seET, str):\n return jfMT.STRING_OPERATOR_MAP[seET]\n else:\n return seET",
"def a8Pe(YKHO, BWXx):\n return BWXx",
"def a8Pe(YKHO, BWXx):\n return BWXx",
"def D8IQ(YKHO, BWXx, khtY):\n if YKHO.date_value is not None:\n try:\n retu... | [
"0.63077563",
"0.6290146",
"0.62251383",
"0.6105594",
"0.6038026",
"0.5998612",
"0.5933695",
"0.59143376",
"0.5882397",
"0.5819177",
"0.5806699",
"0.57977116",
"0.5791342",
"0.57765645",
"0.5772728",
"0.5739569",
"0.5734919",
"0.57314175",
"0.5720462",
"0.56565744",
"0.565098... | 0.58093953 | 10 |
Operator converter for softmax. | def texz(Oa1e, khtY, XkN1):
jDK_ = khtY.attr('axis')
GhuM = XkN1.var(khtY.input('X')[0]).shape
if jDK_ < 0:
jDK_ = len(GhuM) + jDK_
WKvO = Oa1e.get_node(khtY.input('X')[0])
r8hN = Bchp.max(WKvO, jDK_, keepdims=True)
tTpl = Bchp.exp(WKvO - r8hN)
yvT9 = tTpl / Bchp.sum(tTpl, jDK_, keep... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NNr8(Emd4, khtY, dbXf):\n Q6kx = Emd4._common_singa_tensor_to_onnx_node(khtY, dbXf)\n Q6kx.attribute.extend([B0gN.make_attribute('axis', khtY.axis)])\n return Q6kx",
"def NNr8(Emd4, vWye, g4y1, bwrw):\n aM8h = vWye.getattr('axis', 1)\n if aM8h < 0:\n aM8h = len(g4y1[0].shape) + aM8h\n ... | [
"0.64913285",
"0.64781654",
"0.6419903",
"0.6419903",
"0.63959384",
"0.6354198",
"0.6307182",
"0.629241",
"0.62803423",
"0.6260943",
"0.6226556",
"0.62239",
"0.6220813",
"0.6220813",
"0.6134256",
"0.6113583",
"0.60977525",
"0.60738033",
"0.60657024",
"0.60635906",
"0.6058736"... | 0.66949296 | 0 |
Operator converter for softmax_with_cross_entropy. | def PW2j(Oa1e, khtY, XkN1):
KeL5 = Oa1e.get_node(khtY.input('Logits')[0])
Crrw = Oa1e.get_node(khtY.input('Label')[0])
Ngtq = khtY.attr('ignore_index')
jDK_ = khtY.attr('axis')
if jDK_ < 0:
jDK_ = len(FVqP(KeL5)) + jDK_
N93T = Bchp.nn.softmax(KeL5, axis=jDK_)
Oa1e.add_node(khtY.outpu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aqfh(g4y1, jDK_=1, gH2v='mean', **B2fa):\n qIxc = Wov5.parse(locals())\n qIxc['reduction'] = gH2v.upper()\n CqFm = uL8A.SoftmaxCrossEntropy\n if QpfX.executing_eagerly():\n return CqFm.instantiate(axis=jDK_, reduction=qIxc['reduction']).apply(g4y1)\n else:\n return CqFm.blend(**qIx... | [
"0.64137816",
"0.6352757",
"0.63304996",
"0.6288456",
"0.6251121",
"0.62245667",
"0.61739784",
"0.6161671",
"0.6141829",
"0.61134845",
"0.6104285",
"0.6102624",
"0.60936904",
"0.60571945",
"0.5995504",
"0.5986937",
"0.5984326",
"0.59788394",
"0.59710175",
"0.5968684",
"0.5946... | 0.6448857 | 0 |
return a dictionary with ngram counts | def Y908(vwCE, exwG):
fMtn = dict()
for YRbF in Ni9Y(len(vwCE) - exwG + 1):
u8Mh = tuple(vwCE[YRbF:YRbF + exwG])
if u8Mh in fMtn:
fMtn[u8Mh] += 1
else:
fMtn[u8Mh] = 1
return fMtn | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tbgJ(YKHO, exwG):\n hlel = {}\n for YRbF in range(len(YKHO.text) - exwG + 1):\n KCHu = ' '.join(YKHO.text[YRbF:YRbF + exwG])\n hlel.setdefault(KCHu, 0)\n hlel[KCHu] += 1\n return hlel",
"def ZraO(nPrm, exwG, bgyR='<s>', x6td='<e>'):\n HyjZ = {}\n for yAmx in nPrm:\n ... | [
"0.7743292",
"0.77199584",
"0.7716969",
"0.76105267",
"0.75992095",
"0.74991006",
"0.7440763",
"0.7403988",
"0.7346905",
"0.7243749",
"0.72091806",
"0.71726334",
"0.71435004",
"0.7117929",
"0.7001526",
"0.6987259",
"0.6980143",
"0.6945595",
"0.6943904",
"0.6909837",
"0.689564... | 0.76826704 | 3 |
Return time formatted for Ploneboard | def aygj(QpfX, QePW, vnE3=None):
hi2u = None
i8WE = OZpC(QpfX, 'translation_service')
format = '%Y;%m;%d;%w;%H;%M;%S'
zLlm = '%A %H:%M'
UnKk = '%B %d. %Y'
if not vnE3:
return 'Unknown date'
if callable(vnE3):
vnE3 = vnE3()
try:
if isinstance(vnE3, cJ1g):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m7L9(YKHO):\n wzkt = qcWV.datetime.now()\n ROt1 = 12 if wzkt.hour % 12 == 0 else wzkt.hour % 12\n pjEG = 'AM' if wzkt.hour < 12 else 'PM'\n return '%d:%02d %s' % (ROt1, wzkt.minute, pjEG)",
"def zU5u(ITS7=None):\n if ITS7 is None:\n ITS7 = qIe0()\n return ITS7.strftime(GPtr.TIME_PRIN... | [
"0.78443176",
"0.78165925",
"0.7803336",
"0.77409714",
"0.77112925",
"0.7694536",
"0.7676821",
"0.7670104",
"0.7653917",
"0.76407",
"0.7574116",
"0.7524239",
"0.7480668",
"0.7449746",
"0.74482924",
"0.7436809",
"0.73982805",
"0.7323254",
"0.73225206",
"0.7317877",
"0.729542",... | 0.7136611 | 31 |
Returns the number of conversations in this forum. | def uAfk(Q6kx, Piln=None):
if Piln is None:
Piln = OZpC(Q6kx, 'portal_catalog')
return len(Piln(object_provides=EWxu.__identifier__, path='/'.join(Q6kx.getPhysicalPath()))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vh81(YKHO):\n return len(YKHO.messages)",
"def Vh81(YKHO):\n return YKHO._message_count",
"def BkHi(YKHO, XKAm):\n xDcj = oOLZ('trust/count_chat_with') % XKAm\n geh0 = YKHO._submit_query(xDcj)\n return geh0[0]['num_chats']['value'].split('/')[-1] if geh0 != [] else ''",
"def z1Db(YKHO):\n ... | [
"0.7046309",
"0.67483366",
"0.6559145",
"0.647817",
"0.6411175",
"0.6347197",
"0.6342727",
"0.63276786",
"0.6303933",
"0.6276361",
"0.6274735",
"0.62053746",
"0.6204217",
"0.619952",
"0.6168952",
"0.6164415",
"0.6070203",
"0.60651463",
"0.60547584",
"0.59845173",
"0.597897",
... | 0.72814435 | 0 |
Returns a string concatenated with '!!!'. | def _gRY(GIN8):
return GIN8 + '!!!' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _xQu():\n yUNm = 'congratulations' + '!!!'\n print(yUNm)",
"def wPFE(KCHu, aNfM):\n Aofo = KCHu + KCHu + KCHu\n if aNfM:\n Aofo = Aofo + '!!!'\n return Aofo",
"def _xQu():\n yUNm = 'congratulations' + '!!!'\n print(yUNm)",
"def _xQu(GIN8):\n yUNm = GIN8 + '!!!'\n return ... | [
"0.6222425",
"0.62033045",
"0.61873996",
"0.59948725",
"0.59948725",
"0.59463835",
"0.59098756",
"0.5884046",
"0.57748294",
"0.5744767",
"0.57358265",
"0.57358265",
"0.57358265",
"0.5682084",
"0.5681596",
"0.5601378",
"0.5575337",
"0.5566258",
"0.5560172",
"0.5552537",
"0.554... | 0.6519947 | 0 |
Define the name of the instance of RNNModel using its arguments. | def __name__(YKHO):
return '_'.join([m2Zb.__name__ for m2Zb in YKHO.functions]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oSgC(YKHO, *qIxc):\n return _VfD.ModelCreator_setName(YKHO, *qIxc)",
"def Ry74(YKHO):\n wzkt = qcWV.datetime.now()\n mWFP = '%s_%s_%s_%s_%s_%s' % (wzkt.day, wzkt.month, 'rnn', YKHO._controller_type, YKHO._num_layers, YKHO._layer_size)\n if YKHO._dropout > 0:\n mWFP += '_dropout'\n retur... | [
"0.6435514",
"0.63512707",
"0.6342804",
"0.6240059",
"0.6175415",
"0.61512685",
"0.5970166",
"0.59167725",
"0.58603233",
"0.5857045",
"0.58183295",
"0.5817024",
"0.5815913",
"0.57817906",
"0.5767783",
"0.5733591",
"0.57298726",
"0.57222044",
"0.5717912",
"0.5713784",
"0.56984... | 0.0 | -1 |
Asks user to specify a city, month, and day to analyze. | def RxGd():
print("Hello! Let's explore some US bikeshare data!")
k0Sr = ['chi', 'ny', 'w']
while True:
j5sA = input('Kindly specify a city by typing chicago or new york city or washington: \n\n').lower()
if j5sA in OerS.keys():
break
elif j5sA.lower() == 'new york':
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NoUH(j5sA, x0eS, CjKC):\n print('The city you have entered is: ', j5sA)\n print('The month you have entered is: ', x0eS)\n print('The day you have entered is: ', CjKC)",
"def RxGd():\n j5sA = None\n x0eS = None\n CjKC = None\n while CjKC == None:\n j5sA = input('Please enter a cit... | [
"0.6671029",
"0.65359104",
"0.6458688",
"0.63752216",
"0.6348333",
"0.6310136",
"0.6286666",
"0.6259401",
"0.6232757",
"0.6214305",
"0.6204918",
"0.6181069",
"0.61726975",
"0.6168352",
"0.61584324",
"0.61581767",
"0.61533356",
"0.6144159",
"0.6131992",
"0.61047643",
"0.610251... | 0.6008372 | 27 |
Loads data for the specified city and filters by month and day if applicable. | def UlWi(j5sA, x0eS, CjKC):
jQ3Z = rLdf.read_csv(OerS[j5sA])
jQ3Z['Start Time'] = rLdf.to_datetime(jQ3Z['Start Time'])
jQ3Z['month'] = jQ3Z['Start Time'].dt.month_name()
jQ3Z['day_of_week'] = jQ3Z['Start Time'].dt.day_name()
if x0eS != 'all':
jQ3Z = jQ3Z[jQ3Z['month'] == x0eS.title()]
if... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UlWi(j5sA, x0eS, CjKC):\n jQ3Z = rLdf.read_csv(OerS[j5sA])\n jQ3Z['Start Time'] = rLdf.to_datetime(jQ3Z['Start Time'])\n jQ3Z['month'] = jQ3Z['Start Time'].dt.month\n jQ3Z['hour'] = jQ3Z['Start Time'].dt.hour\n jQ3Z['day_of_week'] = jQ3Z['Start Time'].dt.weekday_name\n if x0eS == 0 and CjKC =... | [
"0.813227",
"0.8108956",
"0.8046483",
"0.8042587",
"0.8009157",
"0.80073005",
"0.7999508",
"0.79889566",
"0.7979226",
"0.7973997",
"0.7961329",
"0.79560906",
"0.7947187",
"0.794649",
"0.7908341",
"0.79083204",
"0.7904475",
"0.79011774",
"0.78934294",
"0.7889157",
"0.78827393"... | 0.7998818 | 7 |
Displays statistics on the most frequent times of travel. | def dWJR(jQ3Z):
print('\nCalculating statistics of The Most Frequent Times of Travel...\n')
SWox = ITS7.time()
hFPs = jQ3Z['month'].mode()[0]
print('Most common Month is: ', hFPs)
DSEJ = jQ3Z['day_of_week'].mode()[0]
print('Most common Day is: ', DSEJ)
jQ3Z['hour'] = jQ3Z['Start Time'].dt.ho... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dWJR(jQ3Z):\n print('\\nDisplaying the statistics on the most frequent times of travel...\\n')\n SWox = ITS7.time()\n hFPs = jQ3Z['Month'].mode()[0]\n print('For the selected filter, the month with the most travels is: ' + str(X_bn[hFPs - 1]).title() + '.')\n DSEJ = jQ3Z['Weekday'].mode()[0]\n ... | [
"0.80247396",
"0.80233026",
"0.7915788",
"0.78266186",
"0.7822246",
"0.78143597",
"0.77659196",
"0.7740343",
"0.773628",
"0.77344066",
"0.76867086",
"0.7668633",
"0.7651731",
"0.7644636",
"0.76399267",
"0.76367253",
"0.7625196",
"0.7623158",
"0.7612803",
"0.76002145",
"0.7583... | 0.75023395 | 28 |
Displays statistics on the most popular stations and trip. | def Huc_(jQ3Z):
print('\nCalculating The Most Popular Stations and Trip...\n')
SWox = ITS7.time()
_8rG = jQ3Z['Start Station'].mode()[0]
print('Most popular Start station is: ', _8rG)
oFx8 = jQ3Z['End Station'].mode()[0]
print('Most popular End Station is ', oFx8)
Oapu = (jQ3Z['Start Station... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Huc_(jQ3Z):\n print('\\nCalculating The Most Popular Stations and Trip...\\n')\n SWox = ITS7.time()\n print(_8rG(jQ3Z))\n print(oFx8(jQ3Z))\n print(_Ek3(jQ3Z))\n print('\\nThis took %s seconds.' % (ITS7.time() - SWox))\n print('-' * 40)",
"def Huc_(nPrm):\n print('\\nCalculating The M... | [
"0.7816157",
"0.7662524",
"0.7554042",
"0.7492024",
"0.7475423",
"0.74471235",
"0.7430301",
"0.74246186",
"0.741813",
"0.7387859",
"0.73857087",
"0.7365416",
"0.73599696",
"0.73571277",
"0.73555714",
"0.73525584",
"0.7351796",
"0.735084",
"0.7342505",
"0.734093",
"0.7337747",... | 0.7400704 | 9 |
Displays statistics on the total and average trip duration. | def kDMA(jQ3Z):
print('\nCalculating Trip Duration...\n')
SWox = ITS7.time()
bJiw = jQ3Z['Trip Duration'].sum()
print('Total travel time in seconds is : ', bJiw)
RB_u = jQ3Z['Trip Duration'].mean()
print('Average travel time in seconds is : ', RB_u)
print('\nThis took %s seconds.' % (ITS7.ti... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kDMA(nPrm):\n print('\\nCalculating Trip Duration...\\n')\n SWox = ITS7.time()\n DbBi = nPrm['Trip Duration'].sum()\n print('The Total Travel Time is {} Hours'.format(DbBi / 3600))\n IEfE = nPrm['Trip Duration'].mean()\n print('The Average Travel Time is {} Minutes'.format(IEfE / 60))\n pr... | [
"0.8142488",
"0.802504",
"0.8003995",
"0.7949535",
"0.7937111",
"0.793114",
"0.7926624",
"0.79147255",
"0.7913882",
"0.7907699",
"0.79052943",
"0.7900545",
"0.78914416",
"0.7889074",
"0.7886493",
"0.7884836",
"0.7884105",
"0.78822976",
"0.78735834",
"0.7868467",
"0.7866015",
... | 0.7855678 | 26 |
return a string containing file name (the calling routine will need to open the file) | def NFsI(YKHO, leAC='Save File', IL9V=None, KJKl=''):
if IL9V == None:
IL9V = [('CSV File', '*.csv'), ('Any File', '*.*')]
uRP3 = BkHq.asksaveasfilename(parent=YKHO.tk_root, filetypes=IL9V, initialfile=KJKl, title=leAC)
return uRP3 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def g_2H(YKHO):\n return str(YKHO.get_file())",
"def g_2H(YKHO):\n return YKHO.file_name",
"def g_2H(YKHO):\n return YKHO.__file_name",
"def g_2H(YKHO):\n return YKHO.path.name[6:]",
"def gIsw(YKHO):\n return YKHO.lib.file_name",
"def W0tD(YKHO):\n return YKHO.file_name",
"def gIsw(YK... | [
"0.85806555",
"0.78965586",
"0.7884057",
"0.7878058",
"0.7865611",
"0.77958035",
"0.7770247",
"0.7767001",
"0.77409166",
"0.77409166",
"0.77409166",
"0.77409166",
"0.77409166",
"0.7704209",
"0.7672761",
"0.76636815",
"0.7619641",
"0.7506628",
"0.74642754",
"0.7448468",
"0.743... | 0.0 | -1 |
Compute the padding necessary to ensure that convolving 'X' with a 2D kernel of shape 'kernel_shape' and stride 'stride' produces outputs with dimension 'out_dim' | def NdS3(WNSx, Fmaf, RndV, _0fC, ivFb=0):
if not isinstance(WNSx, tuple):
raise ValueError('X_shape must be of type tuple')
if not isinstance(Fmaf, tuple):
raise ValueError('out_dim must be of type tuple')
if not isinstance(RndV, tuple):
raise ValueError('kernel_shape must be of type... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NdS3(WNSx, Fmaf, RndV, _0fC, ivFb=0):\n if not isinstance(WNSx, tuple):\n raise ValueError('`X_shape` must be of type tuple')\n if not isinstance(Fmaf, tuple):\n raise ValueError('`out_dim` must be of type tuple')\n if not isinstance(RndV, tuple):\n raise ValueError('`kernel_shape... | [
"0.8247134",
"0.7567151",
"0.7563502",
"0.75364166",
"0.7374004",
"0.7361205",
"0.7306342",
"0.729063",
"0.7279653",
"0.7209143",
"0.7207988",
"0.7174449",
"0.7173881",
"0.71691567",
"0.71236885",
"0.71168876",
"0.7110765",
"0.709979",
"0.7019291",
"0.6944721",
"0.6938874",
... | 0.8221825 | 1 |
Compute the padding necessary to ensure that convolving 'X' with a 1D kernel of shape 'kernel_shape' and stride 'stride' produces outputs with length 'l_out' | def ykES(WNSx, T2Jh, CS3p, _0fC, ivFb=0, F6Lg=False):
if not isinstance(WNSx, tuple):
raise ValueError('X_shape must be type tuple')
if not isinstance(T2Jh, int):
raise ValueError('l_out must be type int')
if not isinstance(CS3p, int):
raise ValueError('kernel_width must be type int'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T2Jh(DVQq: int, dvgN: int, ivFb: int, WZcn: int, _0fC: int) -> int:\n return (DVQq + 2 * dvgN - ivFb * (WZcn - 1) - 1) // _0fC + 1",
"def ePwd(DVQq, Ot1W, _0fC=None, dvgN=0, ivFb=1):\n if _0fC == None:\n _0fC = Ot1W\n T2Jh = int(oyIN.floor((DVQq + 2 * dvgN - ivFb * (Ot1W - 1) - 1) / _0fC) + 1... | [
"0.7611012",
"0.733894",
"0.72302073",
"0.7213094",
"0.71773523",
"0.7081073",
"0.6933778",
"0.68309605",
"0.67562455",
"0.668144",
"0.6660785",
"0.66606504",
"0.6654768",
"0.6646968",
"0.66388535",
"0.66267",
"0.6568458",
"0.6564548",
"0.6563976",
"0.65409815",
"0.65240794",... | 0.79546314 | 0 |
Perform a "deconvolution" (more accurately, a transposed convolution) of an input volume `X` with a weight kernel `W`, incorporating stride, pad, and dilation. Notes Rather than using the transpose of the convolution matrix, this approach uses a direct convolution with zero padding, which, while conceptually straightfo... | def K6Cz(EcVT, XcU5, _0fC, hVLt, ivFb=0):
if _0fC > 1:
EcVT = T4EJ(EcVT, _0fC - 1)
_0fC = 1
eXLS, XP5J = RMMP(EcVT, hVLt, XcU5.shape[:2], stride=_0fC, dilation=ivFb)
tinM, umGk, _WTL, Ya2q = EcVT.shape
aF0O, FBfN, Ya2q, _LFN = XcU5.shape
KCHu, Csk6 = (_0fC, ivFb)
caN0, w6FF, vsIr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wL3W(EcVT, XcU5, _0fC, hVLt, ivFb=0):\n KCHu, Csk6 = (_0fC, ivFb)\n bGrB, XP5J = RMMP(EcVT, hVLt, XcU5.shape[:2], KCHu, dilation=ivFb)\n caN0, w6FF, vsIr, cX_Q = XP5J\n aF0O, FBfN, vC8u, nrLm = XcU5.shape\n tinM, umGk, _WTL, vC8u = EcVT.shape\n Rvs7, WeuL = (aF0O * (Csk6 + 1) - Csk6, FBfN * (... | [
"0.7789402",
"0.7657116",
"0.73724806",
"0.7076886",
"0.70751727",
"0.7072442",
"0.6950653",
"0.6888651",
"0.68331355",
"0.6727414",
"0.66853243",
"0.6679687",
"0.66354847",
"0.6598508",
"0.6594285",
"0.6574297",
"0.6558899",
"0.6554841",
"0.6531102",
"0.6515422",
"0.65014327... | 0.84939915 | 0 |
input a twocharacter string xy and return a base2500 value | def d6pt(M_DK):
if len(M_DK) != 2:
return 'Not a valid string'
with open('ch.txt', encoding='utf-8') as nUeQ:
gLiZ = nUeQ.read()
print(gLiZ)
for YRbF in range(len(gLiZ)):
if gLiZ.contains(M_DK[0]):
return 'Yeah' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jEMH(WKvO, LVAh=8):\n if WKvO >= 2 ** (LVAh - 1) or WKvO < -(2 ** (LVAh - 1) or LVAh < 1):\n raise Exception('Argument outside of range.')\n if WKvO >= 0:\n eugZ = bin(WKvO)\n while len(eugZ) < LVAh + 2:\n eugZ = '0b0' + eugZ[2:]\n return eugZ\n return bin(2 ** L... | [
"0.58406514",
"0.5641362",
"0.55234545",
"0.5480494",
"0.5448977",
"0.5391766",
"0.5346254",
"0.5310514",
"0.52967805",
"0.52910286",
"0.5280652",
"0.52701575",
"0.52520615",
"0.52370185",
"0.5218431",
"0.5205449",
"0.52035004",
"0.52021116",
"0.5200173",
"0.51575506",
"0.515... | 0.0 | -1 |
Test for failing to get auth token for invalid user credentials | def hEZB(YKHO):
geh0 = YKHO.client.post('/auth/login', data=dict(username='random_test_user', password='random_test_password'))
YKHO.assertEqual(geh0.status_code, 401) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def p9Uw(x0hE, QePW):\n Ylbp = x0hE.get('/token?uid=1')\n assert Ylbp.status_code == 400\n assert 'User does not exist' in Ylbp.data.decode('utf-8')",
"def CFAE(YKHO):\n bD7m = '/api-token-auth/'\n nPrm = {'username': 'adam', 'password': '321'}\n geh0 = i9zE().post(bD7m, nPrm)\n YKHO.assertE... | [
"0.8102997",
"0.7945774",
"0.7934029",
"0.7864483",
"0.78641933",
"0.7798869",
"0.77983093",
"0.7778654",
"0.77361274",
"0.7645643",
"0.764208",
"0.7635275",
"0.76208466",
"0.7603388",
"0.7593273",
"0.75691026",
"0.7556424",
"0.753166",
"0.7528433",
"0.74639946",
"0.7459939",... | 0.83376944 | 0 |
Test for creating and getting bucketlist and constituent items | def vtYd(YKHO):
geh0 = YKHO.client.post('/bucketlists/', data=dict(name='test_bucketlist'), headers={'Authorization': YKHO.user_token})
ZoOm = qQXR.loads(geh0.data)
YKHO.assertEqual(geh0.status_code, 200)
YKHO.assertEqual(ZoOm['name'], 'test_bucketlist')
YKHO.bucketlist_id = ZoOm['bucketlist_id']
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yfSc(YKHO):\n _hkX = YKHO.client.post('/bucketlists', data=qQXR.dumps(YKHO.bucketlist), content_type='application/json', headers={'Authorization': YKHO.token})\n YKHO.assertEqual(_hkX.status_code, 201)\n GtJD = YKHO.client.post('/bucketlistitems/1/items', data=qQXR.dumps({'name': 'visit the busy surbu... | [
"0.7643662",
"0.73914295",
"0.7356936",
"0.73352313",
"0.72897893",
"0.72300017",
"0.7208685",
"0.71998215",
"0.7146859",
"0.71368647",
"0.7119349",
"0.7117094",
"0.7090583",
"0.7025843",
"0.7002102",
"0.69745415",
"0.6969966",
"0.6968271",
"0.69138056",
"0.68787915",
"0.6868... | 0.74604183 | 1 |
Test that data is published to expected topics | def Ak3F(mcIl):
vI1d(mcIl, XVZz) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rlaM(YKHO):\n pass",
"def drYK(YKHO):\n Pjr8 = c6QV.PubSubBus()\n YKHO.assertRaises(ValueError, Pjr8.publish, 'foo', 'data')\n onQq = Jpj_(YKHO, Pjr8, 'foo', 'data', create_topic=False)\n YKHO.assertRaises(ValueError, onQq.subscribe_good)\n Pjr8.create_topic('foo')\n onQq.subscribe_good(... | [
"0.7107211",
"0.7087697",
"0.707206",
"0.69657946",
"0.6940049",
"0.6910118",
"0.68783116",
"0.68650997",
"0.6853177",
"0.6827456",
"0.677853",
"0.675708",
"0.6741788",
"0.6727343",
"0.67225796",
"0.6717456",
"0.67075086",
"0.6682258",
"0.66819495",
"0.66674376",
"0.6660347",... | 0.0 | -1 |
returns True if ad_url is in filter list, meaning it is not an ad and should be filtered | def gJID(WGuF):
filter = ['http:pagead2.googlesyndication.compageadimagesgoogle-logo.png', 'http:pagead2.googlesyndication.compageadimagesgreen-check.png', 'http:pagead2.googlesyndication.compageadimagesnessie_icon_thin_chevron_white.png', 'http:pagead2.googlesyndication.compageadimagesnessie_icon_chevron_white.png... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fp9L(YKHO, QePW, PhGN):\n if not YKHO.audiences:\n return PhGN == QePW.host_url\n for qcQt in YKHO._audience_patterns:\n if qcQt.match(PhGN):\n return True\n return False",
"def dN5O(YKHO):\n return YKHO.proto.details.appDetails.containsAds",
"def naKh(YKHO, bD7m):\n ... | [
"0.63571125",
"0.60815376",
"0.59847295",
"0.596617",
"0.57923347",
"0.5784023",
"0.5747687",
"0.56860244",
"0.56672096",
"0.56461245",
"0.56422883",
"0.5639728",
"0.55854344",
"0.5545889",
"0.5516618",
"0.55105555",
"0.5492124",
"0.54894924",
"0.54785776",
"0.5471862",
"0.54... | 0.79558086 | 0 |
Reads a float array from Example proto to np array. | def vsfm(W5Xi, H5ew, ROpF):
if ROpF is None:
qOQL, ANqq, vwEp = W5Xi.feature[H5ew + '/dim'].int64_list.value
else:
qOQL, ANqq, vwEp = ROpF
vhpA = oyIN.array(W5Xi.feature[H5ew].float_list.value[:]).reshape(qOQL, ANqq, vwEp)
return vhpA | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wUR_(Ux0P):\n eHNT = open(Ux0P, 'r')\n ezWE = oyIN.fromfile(eHNT, dtype='>f4')\n return ezWE",
"def UlWi(YKHO):\n return XTiz.fromfile(YKHO.data_fname, dtype=XTiz.float32)",
"def VnLJ(YKHO, wOb_):\n return oyIN.fromstring(wOb_, 'Float32')",
"def DMrX(gIsw) -> oyIN.ndarray:\n N5Pj = m6_J... | [
"0.69671804",
"0.6889737",
"0.6788302",
"0.6292833",
"0.6253976",
"0.6239448",
"0.6226115",
"0.61455786",
"0.60687584",
"0.6067613",
"0.6035139",
"0.60305834",
"0.6010634",
"0.59828347",
"0.5940118",
"0.59288985",
"0.59206367",
"0.5876959",
"0.5862205",
"0.58601415",
"0.58596... | 0.55965406 | 55 |
Returns the maximum allowable outgoing flow for a given stream. If the allowable flow is zero, then waits on the network until WindowUpdated frames have increased the flow rate. | async def _wait_for_outgoing_flow(YKHO, QePW: Request, MLMj: int) -> int:
rUIY: int = YKHO._h2_state.local_flow_control_window(MLMj)
xOJB: int = YKHO._h2_state.max_outbound_frame_size
_uqo = min(rUIY, xOJB)
while _uqo == 0:
await YKHO._receive_events(QePW)
rUIY = YKHO._h2_state.local_flo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KQXK(YKHO, JZXy, fDOI):\n KQXK = 0\n for YRbF in range(YKHO.V):\n for r845 in range(YKHO.V):\n YKHO.flow[YRbF, r845] = 0\n while YKHO.bfs(JZXy, fDOI):\n EAdr = am9U\n P6bq = fDOI\n while YKHO.pred[P6bq] != -1:\n EAdr = min(EAdr, YKHO.capacity[YKHO.pred... | [
"0.6194889",
"0.6043823",
"0.5908881",
"0.55964226",
"0.5325499",
"0.53132993",
"0.51967525",
"0.5127323",
"0.4998654",
"0.49965987",
"0.4975326",
"0.49690938",
"0.49684918",
"0.48983842",
"0.48562852",
"0.48515046",
"0.48479512",
"0.48470542",
"0.48407075",
"0.48086783",
"0.... | 0.7008591 | 0 |
Parse start date and time. | def hFBJ(YKHO, ZfUD, SWox):
mbyn = ZfUD.css('*::text').extract_first()
if not mbyn:
return
ehn8 = ZbWC.search('\\w{3,9} \\d{1,2}, \\d{4}', mbyn)
if ehn8:
v27i = qcWV.strptime(ehn8.group(), '%B %d, %Y')
return qcWV.combine(v27i.date(), SWox.time()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hFBJ(YKHO, mbyn):\n return qcWV.strptime(mbyn.title(), '%B %d, %Y')",
"def hFBJ(YKHO, geh0):\n mbyn = geh0.css('.date time::attr(datetime)').extract_first()\n jmHs = ''.join(geh0.css('article.time::text').extract()).strip()\n if not jmHs:\n jmHs = ''.join(geh0.css('article.time *::text').e... | [
"0.8012607",
"0.7956383",
"0.775254",
"0.7745357",
"0.7708766",
"0.7648467",
"0.7642984",
"0.754136",
"0.74821883",
"0.7459805",
"0.7399587",
"0.7093819",
"0.697785",
"0.69141096",
"0.6728942",
"0.65998924",
"0.6470897",
"0.6462791",
"0.6380753",
"0.634331",
"0.6262659",
"0... | 0.79541355 | 2 |
This is the constructor of the Line class | def FIMM(YKHO, EBgd, HpuQ):
YKHO.p1 = EBgd
YKHO.p2 = HpuQ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, iXlf, **B2fa):\n super(NTRO, YKHO).__init__(iXlf, **B2fa)\n YKHO._geotype = 'Line'\n return",
"def FIMM(YKHO, Z9rn, EBgd=PvyL(), HpuQ=PvyL()):\n NTRO.__init__(YKHO, EBgd, HpuQ)\n YKHO.cnv = Z9rn",
"def FIMM(YKHO, zFiD):\n YKHO.start = aCpm(zFiD, 1)\n YKHO.end = aCpm(zFiD, 0)... | [
"0.8268392",
"0.8146298",
"0.7959601",
"0.79078287",
"0.7490877",
"0.7410803",
"0.7288737",
"0.7281866",
"0.7220005",
"0.72124076",
"0.7203657",
"0.71134865",
"0.7107252",
"0.7057454",
"0.70520735",
"0.6942884",
"0.6937187",
"0.689195",
"0.6846719",
"0.6831642",
"0.6812054",
... | 0.0 | -1 |
xaxis label and units. Axis labels know about units. We need to do this so that we can detect when axes are not commesurate. Currently this is ignored other than for formatting purposes. | def NkBi(YKHO, UXqs, rYO3):
if rYO3 != '':
UXqs = UXqs + ' (' + rYO3 + ')'
YKHO.xbox.set_text('$%s$' % UXqs)
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NkBi(YKHO, UXqs, rYO3):\n if rYO3 != '':\n UXqs = UXqs + ' (' + rYO3 + ')'\n YKHO.subplot.set_xlabel(UXqs)\n pass",
"def i2d8(YKHO, rYO3, q3VD):\n if q3VD:\n QrM1.xlabel('x (' + YKHO.xunits_from_units(units=rYO3) + ')', fontsize=YKHO.xsize)\n else:\n QrM1.xlabel(YKHO.xunit... | [
"0.77864",
"0.68611026",
"0.6854408",
"0.65931517",
"0.6455449",
"0.64169616",
"0.63975906",
"0.6340904",
"0.6327228",
"0.62637603",
"0.62549233",
"0.62412125",
"0.6206764",
"0.61634564",
"0.6145363",
"0.61047965",
"0.6085972",
"0.60728234",
"0.6061254",
"0.6040449",
"0.60404... | 0.7472149 | 1 |
yaxis label and units. | def i4e5(YKHO, UXqs, rYO3):
if rYO3 != '':
UXqs = UXqs + ' (' + rYO3 + ')'
YKHO.ybox.set_text('$%s$' % UXqs)
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def i4e5(YKHO, UXqs, rYO3):\n if rYO3 != '':\n UXqs = UXqs + ' (' + rYO3 + ')'\n YKHO.subplot.set_ylabel(UXqs)\n pass",
"def IICq(IICq):\n m5hN.ylabel(**locals())",
"def EqZa(bRbl, _svw=True, PJWX=0):\n if PJWX > 1:\n print('SpectraTools.Resources.UnitConversion.labels_y()')\n i... | [
"0.8391478",
"0.7328002",
"0.7229695",
"0.72150916",
"0.7116793",
"0.70888394",
"0.70200956",
"0.7003589",
"0.6940507",
"0.6940507",
"0.6785098",
"0.67295647",
"0.67104685",
"0.66930753",
"0.6681132",
"0.66706085",
"0.6655517",
"0.6536776",
"0.65352345",
"0.65045035",
"0.6448... | 0.83645123 | 1 |
Get the initial conditions (a PDF) withsupport `x`. This function must be redefined in subclasses. `x` is a length N ndarray representing the support of the initial condition PDF, i.e. the xdomain. This returns a length N ndarray describing the distribution. | def yuhX(YKHO, WKvO, Jw7X, **B2fa):
raise NotImplementedError('IC model %s invalid: must define the get_IC function' % YKHO.__class__.__name__) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YxEG(YKHO, WKvO):\n geh0 = []\n for G1Hx in range(YKHO._n_components):\n geh0.append(YKHO._multivariate_gaussian(WKvO, YKHO._mu[G1Hx], YKHO._sigma[G1Hx]))\n geh0 = oyIN.transpose(oyIN.array(geh0))\n return geh0",
"def kzAT(YKHO, WKvO):\n q7In = oyIN.zeros(YKHO.p)\n q7In[:2] = WKvO\n ... | [
"0.63827074",
"0.5953372",
"0.5933818",
"0.5843133",
"0.58424085",
"0.58012825",
"0.5771625",
"0.5761548",
"0.5727641",
"0.569203",
"0.569203",
"0.56865376",
"0.5683423",
"0.5653233",
"0.5639571",
"0.56326306",
"0.5591509",
"0.5555189",
"0.55493927",
"0.55066127",
"0.55061513... | 0.0 | -1 |
Setup flask test app | def P4t4():
mQNO = 'sqlite:///ratemovies_test.db'
gCuF = {'DEBUG': False, 'TESTING': True, 'SQLALCHEMY_DATABASE_URI': mQNO}
wMcu = LUif(test_config=gCuF)
OaeV = wMcu.app_context()
OaeV.push()
yield wMcu
OaeV.pop() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FCbF(YKHO):\n YKHO.app = L2w0(__name__)\n YKHO.app_context = YKHO.app.app_context()\n YKHO.app_context.push()\n YKHO.client = YKHO.app.test_client()",
"def P4t4():\n Hy7s.environ['FLASK_ENV'] = 'test'\n return LUif()",
"def LUif(zmu8='test_config.py'):\n P4t4 = L2w0(__name__, instance_... | [
"0.80199814",
"0.80170506",
"0.7855729",
"0.7794914",
"0.7754035",
"0.76583874",
"0.765709",
"0.7655299",
"0.7642242",
"0.76025945",
"0.7588315",
"0.75806785",
"0.7536184",
"0.7536184",
"0.7519244",
"0.75121415",
"0.7507728",
"0.74758744",
"0.7475763",
"0.7467466",
"0.7467227... | 0.0 | -1 |
Return the number of nodes in this search trie. | def szAg(YKHO):
return YKHO._size | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kRap(YKHO):\n return YKHO._root.count()",
"def UHFx(YKHO):\n return YKHO.__tree.node_count",
"def tIln(YKHO):\n Ylbp = 0\n for exwG in YKHO.iternodes():\n Ylbp += 1\n return Ylbp",
"def kRap(YKHO):\n return YKHO._node_count",
"def OtzW(YKHO):\n return int(YKHO._data['number_... | [
"0.82841825",
"0.8099688",
"0.8029568",
"0.80173093",
"0.79952693",
"0.79530835",
"0.7946479",
"0.7946479",
"0.7913318",
"0.7880282",
"0.7842051",
"0.7803598",
"0.7797644",
"0.7692612",
"0.7683431",
"0.7664927",
"0.7659269",
"0.76226175",
"0.75838107",
"0.75726026",
"0.749792... | 0.0 | -1 |
Recursively construct nodes in a trie for the given term and metadata element, adding the element to every intermediate node along the way. | def Qw6N(YKHO, Q6kx, OXAZ, YRbF, U6D_):
if YRbF > 0:
Q6kx.add_element(U6D_)
if YRbF == len(OXAZ):
return
hcXw = OXAZ[YRbF]
afYC = Q6kx.get_children()
if hcXw not in afYC:
aUGN = YKHO._new_node()
Q6kx.add_child(hcXw, aUGN)
else:
aUGN = afYC[hcXw]
YKHO._... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def t7Rj(YKHO, tk5Y, *V22M):\n b2ZK = '_end_'\n for GIN8 in V22M:\n TXkI = tk5Y\n for sZqf in GIN8:\n TXkI = TXkI.setdefault(sZqf, {})\n TXkI[b2ZK] = GIN8\n return tk5Y",
"def e0k0(YKHO, GIN8):\n AsCw = YKHO.root\n for G1Hx in GIN8:\n if G1Hx in AsCw.chil... | [
"0.6279866",
"0.62746936",
"0.61444885",
"0.60815966",
"0.5994504",
"0.5903968",
"0.5847147",
"0.58295196",
"0.5803181",
"0.5780361",
"0.57369155",
"0.57229745",
"0.57040226",
"0.5597469",
"0.5591795",
"0.5583159",
"0.5581413",
"0.5521476",
"0.55119896",
"0.5501063",
"0.54988... | 0.6254299 | 2 |
Counts the maximum number of references any given production in the grammar can have on the final tree. | def Awz9(YKHO) -> AzJI[cuzp[str, x1iM[str]], cuzp[str, cuzp[str, int]]]:
CJXH = {}
dWiO = {}
for K4sN in YKHO.non_terminals:
for Fomj in YKHO.grammar[K4sN]:
UHFx = {}
for MTKo in Fomj.split():
UHFx.setdefault(MTKo, 0)
if MTKo in YKHO.non_termin... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pbx7(GTXn, z3LN):\n mjLE = ' '.join(GTXn)\n HaGu = []\n for ZfUD in z3LN:\n HaGu.append(len(ZbWC.findall(mjLE, ZfUD)))\n return HaGu",
"def pbx7(GTXn, z3LN):\n mjLE = ' '.join(GTXn)\n HaGu = []\n for ZfUD in z3LN:\n HaGu.append(len(ZbWC.findall(mjLE, ZfUD)))\n return HaG... | [
"0.6344946",
"0.6331416",
"0.61905414",
"0.59246284",
"0.57841647",
"0.5763673",
"0.5751604",
"0.57489383",
"0.57478607",
"0.57450664",
"0.57291263",
"0.57115686",
"0.56965035",
"0.56922156",
"0.56860703",
"0.56548613",
"0.56532294",
"0.56429106",
"0.5602189",
"0.5600686",
"0... | 0.7292844 | 0 |
Gets the maximum number of references a non terminal production has. | def vuCF(YKHO, K4sN: str, dWiO: Dict[str, List[str]], sAln: Dict[str, Dict[str, int]]) -> cuzp[str, int]:
dixj = []
if K4sN == '<expr_0>':
return 1
if K4sN in YKHO.rec_refs:
return YKHO.rec_refs[K4sN]
z3LN = sum(sAln[K4sN].values())
for bf9h in dWiO[K4sN]:
dixj.append(YKHO.fi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CFDy(YKHO):\n return YKHO._max_num_links",
"def AcLp(YKHO):\n return YKHO._n_refs",
"def Fr48(YKHO, bf9h):\n aS9G = YKHO._get_references_node()\n return Fr48(aS9G, bf9h)",
"def ngWW(YKHO):\n if YKHO.global_external_references:\n return len(YKHO.global_external_references)\n else:... | [
"0.68808335",
"0.6746698",
"0.67138547",
"0.6631458",
"0.65965766",
"0.65712804",
"0.6564011",
"0.6546533",
"0.6501295",
"0.63953185",
"0.6383301",
"0.6367133",
"0.63469726",
"0.629366",
"0.62000734",
"0.6180161",
"0.6173758",
"0.61720425",
"0.6171267",
"0.6166574",
"0.614614... | 0.60324514 | 36 |
Returns the estimated probability of the query using rejection method. Ignore any samples that result in any invalid evidence variables. | def PpYF(YKHO, rePX):
UHFx = 0
a2DI = 1
for YRbF in Ni9Y(rePX):
hkxX = {}
bKBv = True
for sZqf in YKHO.letters:
JxU2 = YKHO.variables[sZqf].get_prob(hkxX)
hkxX[sZqf] = YKHO.sample(JxU2)
if sZqf in YKHO.query.evidence:
if YKHO.query.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def flq3(YKHO, TgWZ, sITO):\n Aofo = YKHO.choose(TgWZ, sITO) * V6IE ** sITO * (1 - V6IE) ** (TgWZ - sITO)\n return Aofo",
"def BkFg(nPrm, _mSQ):\n _mSQ = oyIN.asarray(_mSQ)\n or8S = _mSQ > oyIN.random.uniform(0, oyIN.max(_mSQ), len(_mSQ))\n bo34.info('Rejection sampling resulted in {} samples ({} ... | [
"0.6198907",
"0.5918354",
"0.5898204",
"0.5746092",
"0.5730764",
"0.5658549",
"0.56502354",
"0.5639987",
"0.5632724",
"0.5616158",
"0.56135935",
"0.56078446",
"0.5594434",
"0.55477095",
"0.5545576",
"0.55351746",
"0.5517408",
"0.5516377",
"0.5474847",
"0.5454276",
"0.54473037... | 0.7291372 | 0 |
Electron density per m^3 | def wYgR(YKHO):
return YKHO.electron_density * 1000000.0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BOU9(YKHO):\n return NVY8 * YKHO.num_electrons * YKHO.density / YKHO.molar_mass",
"def InLe(YKHO):\n return 0.001 * YKHO.molar_mass * YKHO.pressure / (K6Rf * YKHO.temperature)",
"def Z42X(YKHO) -> P6bq.m ** (-3):\n return YKHO._number_density",
"def M92e(YKHO):\n return YKHO._density_kg_m3 / ... | [
"0.75250614",
"0.7471538",
"0.6671602",
"0.6617881",
"0.6527502",
"0.65202945",
"0.6465667",
"0.64480203",
"0.641283",
"0.6402636",
"0.6392911",
"0.6370481",
"0.62934023",
"0.62076735",
"0.6181983",
"0.6180715",
"0.61612326",
"0.6125147",
"0.60930717",
"0.6088828",
"0.6076462... | 0.8596014 | 0 |
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`. | def LwSz(Bcwd, KndY, NkkI=False):
if NkkI:
Bcwd = Bcwd.astype('float') / Bcwd.sum(axis=1)[:, oyIN.newaxis]
QrM1.imshow(Bcwd, interpolation='nearest', cmap=QrM1.cm.Blues)
QrM1.title('Confusion Matrix', fontsize=20)
QrM1.colorbar()
wIWT = oyIN.arange(len(KndY))
QrM1.xticks(wIWT, KndY, rota... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LwSz(Bcwd, KndY=[0, 1], NkkI=False, leAC='Confusion matrix', RMso=False):\n if NkkI:\n Bcwd = Bcwd.astype('float') / Bcwd.sum(axis=1)[:, oyIN.newaxis]\n print('Normalized confusion matrix')\n else:\n print('Confusion matrix, without normalization')\n if RMso:\n print(Bcwd)"... | [
"0.81922984",
"0.80933887",
"0.80272716",
"0.8016492",
"0.79913706",
"0.79885876",
"0.79777396",
"0.79729784",
"0.7958926",
"0.7954523",
"0.79347897",
"0.7931899",
"0.7931772",
"0.7928666",
"0.7923684",
"0.7921764",
"0.79213995",
"0.7920191",
"0.792016",
"0.7919876",
"0.79153... | 0.0 | -1 |
Calculate the DamerauLevenshtein distance between sequences. | def xbQw(YKHO, wxdF, O48g):
oInn = None
zvgq = range(1, len(O48g) + 1) + [0]
for WKvO in Ni9Y(len(wxdF)):
h6_P, oInn, zvgq = (oInn, zvgq, [0] * len(O48g) + [WKvO + 1])
for LVAh in Ni9Y(len(O48g)):
XTbL = oInn[LVAh] + 1
hgol = zvgq[LVAh - 1] + 1
O_2T = oInn... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UfmV(YKHO, wxdF, O48g):\n return Kunh.damerau_levenshtein_distance(str(wxdF), str(O48g))",
"def i8SG(j93S, Nqp_):\n BfDw.check_for_none(j93S, Nqp_)\n BfDw.check_for_type(str, j93S, Nqp_)\n MxXY, cWFu = (len(j93S), len(Nqp_))\n iZKH = MxXY + cWFu\n _Mvv = oRi_(int)\n TifC = [[0] * (cWFu +... | [
"0.7851929",
"0.75725025",
"0.74737394",
"0.7240839",
"0.7121927",
"0.7057333",
"0.70353204",
"0.7017338",
"0.70074964",
"0.68133575",
"0.6793625",
"0.6783736",
"0.6783736",
"0.675899",
"0.67561644",
"0.6752951",
"0.67469144",
"0.67329764",
"0.66845506",
"0.6648064",
"0.65433... | 0.7028208 | 7 |
Applies network layers and ops on input image(s) x. | def KVH6(YKHO, WKvO):
begE = WKvO.device
WKvO, c7pe = YKHO._get_sources(WKvO)
Fv2L = []
hksT = []
for YRbF, (tg3m, PRXy) in enumerate(zip(YKHO.loc, YKHO.conf)):
vC9B = tg3m(c7pe[YRbF]).permute(0, 2, 3, 1).contiguous()
vC9B = vC9B.view(WKvO.size(0), -1, 4)
hksT.append(vC9B)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def L4s3(g4y1):\n return jX85(ZylS.sigmoid(jX85(g4y1, 64)), 1)",
"def KVH6(YKHO, WKvO):\n for e4Jv in YKHO.task_module_name_path[YKHO.task_idx]:\n for gEmA in YKHO.task_modules[e4Jv]:\n WKvO = gEmA(WKvO)\n WKvO = WKvO.view(WKvO.size(0), -1)\n WKvO = YKHO.classification_layers[str(YK... | [
"0.65635645",
"0.6369926",
"0.6366342",
"0.6353145",
"0.6308525",
"0.63080144",
"0.6259044",
"0.6207936",
"0.61983746",
"0.6192247",
"0.6176785",
"0.6163958",
"0.61539495",
"0.61442596",
"0.61295325",
"0.61276245",
"0.6121304",
"0.6115892",
"0.61109567",
"0.60991436",
"0.6084... | 0.0 | -1 |
make conv2d layer with parameters | def yIp6(input, AG8q, Uzl2, CIys, ft8c, hMIr, Pggg, dvgN='SAME', mWFP='conv_layer'):
with ZylS.name_scope(mWFP) as rrBf:
gEmA = ZylS.layers.conv2d(input, Uzl2, CIys, strides=(hMIr, Pggg), padding='same', activation=ZylS.nn.relu)
return gEmA | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qkdo(C3ST, rb7a):\n C3ST.add(Ofph(rb7a, 3, 3, subsample=(1, 1)))",
"def adXX(YKHO, g4y1, VqiK, Ot1W, mWFP, e5sz=False, FEri=1):\n if FEri > 1:\n g4y1 = ZylS.pad(g4y1, paddings=[[0, 0], [1, 0], [1, 0], [0, 0]], mode='CONSTANT')\n yIp6 = ZylS.layers.conv2d(inputs=g4y1, filters=VqiK, kernel_size... | [
"0.7279625",
"0.7188575",
"0.70890415",
"0.7070724",
"0.70557415",
"0.699893",
"0.69928545",
"0.69468975",
"0.69453466",
"0.69453466",
"0.69366103",
"0.6928607",
"0.6926231",
"0.69182336",
"0.6902095",
"0.68858635",
"0.6836865",
"0.68286",
"0.68230224",
"0.6821344",
"0.681808... | 0.71879214 | 2 |
add L2 pooling layer to input L2norm pooling selects average of squared rectangular neighborhood & apply square root. | def ECcD(input, CIys, ft8c, hMIr, Pggg, dvgN, mWFP):
with ZylS.name_scope(mWFP):
lRRB = ZylS.square(input)
U1hP = ZylS.nn.avg_pool(lRRB, ksize=[1, CIys, ft8c, 1], strides=[1, hMIr, Pggg, 1], padding=dvgN)
kvtG = ZylS.multiply(U1hP, CIys * ft8c)
return ZylS.sqrt(kvtG) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fk8g(WKvO, x98M=True):\n return vuvg.average_pooling_2d(WKvO, ksize=(WKvO.shape[2], WKvO.shape[3]), use_cudnn=x98M)",
"def V70B(_mSQ):\n return oyIN.sqrt(oyIN.sum(_mSQ * _mSQ))",
"def CiU_(Oa1e, khtY, XkN1):\n qbr2 = khtY.attr('adaptive')\n YaRV = khtY.attr('ceil_mode')\n xoOX = khtY.attr('g... | [
"0.5871164",
"0.5676643",
"0.5663675",
"0.5580594",
"0.55603546",
"0.5511111",
"0.5453032",
"0.5402045",
"0.5380037",
"0.534318",
"0.53420675",
"0.53215724",
"0.5320973",
"0.53174394",
"0.53137684",
"0.5274193",
"0.52677375",
"0.52624005",
"0.52130866",
"0.5212137",
"0.520823... | 0.6388516 | 0 |
Generate a random United States Employer Identification Number (EIN). An United States An Employer Identification Number (EIN) is also known as a Federal Tax Identification Number, and is used to identify a business entity. EINs follow a format of a | def KuQj(YKHO) -> str:
_kjq: x1iM[str] = ['01', '02', '03', '04', '05', '06', '10', '11', '12', '13', '14', '15', '16', '20', '21', '22', '23', '24', '25', '26', '27', '30', '31', '32', '33', '34', '35', '36', '37', '38', '39', '40', '41', '42', '43', '44', '45', '46', '47', '48', '50', '51', '52', '53', '54', '55'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aeVJ(YKHO) -> str:\n f0tD = YKHO.random_int(min=900, max=999)\n Pt6R = YKHO.random_int(min=0, max=9999)\n uOe2: int = YKHO.random_element([WKvO for WKvO in range(70, 100) if WKvO not in [89, 93]])\n aeVJ = f'{f0tD:03d}-{uOe2:02d}-{Pt6R:04d}'\n return aeVJ",
"def AgI8(LKey, GKBI):\n ut5U = o... | [
"0.60033274",
"0.58758867",
"0.5875787",
"0.5840039",
"0.57153285",
"0.5701205",
"0.5681064",
"0.56764835",
"0.56096095",
"0.5591005",
"0.5551279",
"0.55171835",
"0.5484305",
"0.5462546",
"0.54304606",
"0.5371505",
"0.5335441",
"0.5277129",
"0.52713925",
"0.5239948",
"0.52139... | 0.6028611 | 0 |
Get default cell size value. | def x5xv(Emd4, NCls, WKvO, LVAh, epBp, VmPb):
UxQk, VmPb.value = gK4f.WrapBIGRID._get_default_cell_size(umdP._get_tls_geo(), NCls, WKvO.encode(), LVAh.encode(), epBp.encode(), VmPb.value)
return UxQk | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DEza(YKHO, WmM4=None):\n return YKHO.data.get('size', WmM4)",
"def APbI(YKHO):\n return YKHO.default_page_size",
"def u3AR(YKHO):\n NKoN = Ky_k = ''\n if YKHO.selector_declarations:\n NKoN = YKHO.selector_declarations[1].getPropertyValue('width')\n Ky_k = YKHO.selector_declaration... | [
"0.7406437",
"0.71481436",
"0.70099425",
"0.68779343",
"0.6874531",
"0.67571783",
"0.6701486",
"0.6659154",
"0.6642595",
"0.65857077",
"0.6541842",
"0.6533074",
"0.6533074",
"0.6533074",
"0.6525733",
"0.6525733",
"0.6494386",
"0.64833504",
"0.64423037",
"0.64131445",
"0.63781... | 0.8013108 | 0 |
Add a new experience to memory. | def H2v5(YKHO, wspz, e77t, XeOP, xlpn, vOGg, rxHc, a3pK, _ins):
tTpl = YKHO.experience(wspz, e77t, XeOP, xlpn, vOGg, rxHc, a3pK, _ins)
YKHO.memory.append(tTpl) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wOcu(YKHO, QTBn, XeOP, vOGg, rxHc, _ins):\n tTpl = YKHO.experience(QTBn, XeOP, vOGg, rxHc, _ins, YKHO.max_priority)\n YKHO.memory.append(tTpl)",
"def H2v5(YKHO, QTBn, XeOP, vOGg, rxHc, _ins):\n GsKL = XlZM(QTBn, XeOP, vOGg, rxHc, _ins)\n YKHO.memory.append(GsKL)",
"def H2v5(YKHO, GsKL):\n YK... | [
"0.79568833",
"0.79042006",
"0.78795445",
"0.7577913",
"0.7570969",
"0.74478436",
"0.7361023",
"0.72697705",
"0.721816",
"0.71984994",
"0.71984994",
"0.71984994",
"0.71984994",
"0.71984994",
"0.71984994",
"0.71984994",
"0.71984994",
"0.71984994",
"0.71984994",
"0.71984994",
"... | 0.6427997 | 33 |
Return the current size of internal memory. | def szAg(YKHO):
return len(YKHO.memory) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R8e4(YKHO) -> int:\n return len(YKHO.mem)",
"def R8e4(YKHO):\n return YKHO.bf.memory()",
"def ZGo4(YKHO):\n return YKHO.xlist('get-memsize')[1][0] * 1024",
"def zNig(YKHO):\n zNig = 0\n zNig += YKHO.data.size * HwRy.getsizeof(YKHO.data)\n return zNig / 1024.0 / 1024.0 / 1024.0",
"def ... | [
"0.8573752",
"0.82169205",
"0.8200361",
"0.8087402",
"0.8021614",
"0.7890747",
"0.78219426",
"0.78017354",
"0.77905464",
"0.7758844",
"0.77559924",
"0.77559924",
"0.775519",
"0.77544576",
"0.7733221",
"0.7732168",
"0.7720068",
"0.77145016",
"0.77092093",
"0.77077913",
"0.7697... | 0.75127405 | 53 |
Set the parameters threshold. | def vm5J(YKHO, gwAu):
YKHO._threshold = gPW0('threshold', gwAu) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OB7A(YKHO, gwAu):\n pass",
"def OB7A(YKHO, Ty9i):\n YKHO._set(threshold=Ty9i)\n return YKHO",
"def OB7A(YKHO, Ty9i):\n YKHO._set(threshold=Ty9i)\n return YKHO",
"def OB7A(YKHO, Ty9i):\n YKHO._set(threshold=Ty9i)\n return YKHO",
"def OB7A(YKHO, Ty9i):\n YKHO._set(threshold=Ty9i)\... | [
"0.75904775",
"0.6962668",
"0.6962668",
"0.6962668",
"0.6962668",
"0.6962668",
"0.66798",
"0.6573095",
"0.6557857",
"0.65344787",
"0.647978",
"0.6470806",
"0.6400144",
"0.63341093",
"0.6318119",
"0.63161755",
"0.6308599",
"0.6299662",
"0.6247986",
"0.62410915",
"0.62218195",
... | 0.69708884 | 1 |
Compute mean and standard deviation for historical daily counts in given window. | def C2ER(YKHO, FLXQ, KnxT=28):
FLXQ = oyIN.array(FLXQ[-KnxT - 1:-1])
zqwM = [YKHO.decay ** jzdc for jzdc in range(len(FLXQ), 0, -1)]
qHDB = FLXQ * zqwM
JBMS = qHDB.mean()
M1Jx = qHDB.std()
return (JBMS, M1Jx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ktIB(YKHO, KnxT=20, NkkI=False):\n hkxX = YKHO.daily['Adj Close']\n if NkkI:\n hkxX = YKHO.normalize(hkxX)\n return hkxX.rolling(KnxT).std()",
"def xJ7n(hkxX, KnxT):\n return rLdf.rolling_std(hkxX, window=KnxT)",
"def xJ7n(hkxX, KnxT):\n return rLdf.rolling_std(hkxX, window=KnxT)",
... | [
"0.7156707",
"0.69563454",
"0.68889934",
"0.68031394",
"0.65568167",
"0.64584196",
"0.6405226",
"0.62985945",
"0.6296525",
"0.6267641",
"0.617713",
"0.6114039",
"0.6094793",
"0.6086178",
"0.6078605",
"0.60264426",
"0.5976451",
"0.59609866",
"0.59573233",
"0.59519356",
"0.5931... | 0.6974525 | 1 |
Return true if the priority queue does not contain any node | def A4KR(YKHO):
return len(YKHO._pool) == 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FBfn(YKHO):\n return len(YKHO.priority_queue) == 0",
"def any(YKHO) -> bool:\n return len(YKHO.queue) > 0",
"def FBfn(YKHO):\n return YKHO.queue == []",
"def lsmZ(YKHO):\n return YKHO.queue == []",
"def _OiT(gGq6):\n return gGq6.front is None",
"def A4KR(YKHO):\n if len(YKHO.queue) ... | [
"0.78619343",
"0.724722",
"0.72285265",
"0.7219937",
"0.7177337",
"0.7157373",
"0.7142936",
"0.7136744",
"0.7136744",
"0.7133738",
"0.71158105",
"0.7115304",
"0.7108593",
"0.7107909",
"0.7100756",
"0.70957786",
"0.7091771",
"0.70899045",
"0.7075348",
"0.7073441",
"0.7071565",... | 0.0 | -1 |
Get variables that participate in an expression The exact variables returned depends on the method used to determine incidence. For example, ``method=IncidenceMethod.identify_variables`` will return all variables participating in the expression, while ``method=IncidenceMethod.standard_repn`` will return only the variab... | def y3Ht(VN2L, **c_sp):
GPtr = c4_v(c_sp)
NKcE = GPtr.method
I7IO = GPtr.include_fixed
ChoB = GPtr.linear_only
if ChoB and NKcE is gY9o.identify_variables:
raise RuntimeError('linear_only=True is not supported when using identify_variables')
if NKcE is gY9o.identify_variables:
re... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kc1W(YKHO, *qIxc, **B2fa):\n return YKHO._optimizer.variables(*qIxc, **B2fa)",
"def kc1W(YKHO) -> qe4Y.Input[bdIy[qe4Y.Input['AssetModelExpressionVariableArgs']]]:\n return qe4Y.get(YKHO, 'variables')",
"def kc1W(YKHO) -> qe4Y.Input[bdIy[qe4Y.Input['AssetModelExpressionVariableArgs']]]:\n return q... | [
"0.54273486",
"0.519651",
"0.519651",
"0.5124917",
"0.511992",
"0.5001495",
"0.4977053",
"0.4906163",
"0.4903531",
"0.48541722",
"0.48529178",
"0.4833822",
"0.48131612",
"0.47701487",
"0.47678682",
"0.47662506",
"0.47530222",
"0.4728819",
"0.4672121",
"0.4639792",
"0.46338844... | 0.6816663 | 0 |
Convert data columns to datetimes. Check if object columns in a dataframe can be parsed as dates. If yes, rewrite column with values parsed as dates. | def FUA9(WafH):
for YRbF, yDqo in enumerate(WafH.dtypes):
if yDqo.type == oyIN.object_:
iVRZ = WafH.columns[YRbF]
cPoC = GLci(WafH, iVRZ)
if not cPoC is None:
WafH[iVRZ] = cPoC
return WafH | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VnKZ(f4IJ):\n f4IJ = f4IJ.convert_objects(convert_numeric=True)\n for iVRZ in f4IJ:\n if iVRZ in Z9rn.dates:\n f4IJ[iVRZ] = f4IJ[iVRZ].astype('datetime64')\n return f4IJ",
"def OeY9(jQ3Z: DataFrame) -> hxoQ:\n for fvDH in jQ3Z.select_dtypes(include=['datetime64[ns, UTC]']):\n ... | [
"0.75098544",
"0.7087017",
"0.7058885",
"0.69461",
"0.69408333",
"0.69273263",
"0.6719332",
"0.65359586",
"0.65048695",
"0.6471247",
"0.63772154",
"0.63733363",
"0.636413",
"0.63515455",
"0.6293363",
"0.6286831",
"0.622281",
"0.61918646",
"0.613217",
"0.60787344",
"0.6051648"... | 0.7748912 | 0 |
Get a list of Products | def hqp0(YKHO):
YKHO._create_products(5)
_hkX = YKHO.app.get('/products')
YKHO.assertEqual(_hkX.status_code, jGRS.HTTP_200_OK)
nPrm = _hkX.get_json()
YKHO.assertEqual(len(nPrm), 5) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uQsB(YKHO):\n return YKHO._make_get_request(YKHO._urls['products'])",
"def CnKV(YKHO):\n pass",
"def NMoC(YKHO):\n return c0_m().get_all_products()",
"def Ldyl(YKHO):\n return list(msfn.select())",
"def uQsB(YKHO):\n bD7m = YKHO.base_url\n iN3H = YKHO.connection.make_get(bD7m)\n re... | [
"0.8526346",
"0.8258815",
"0.81158453",
"0.80976355",
"0.8046384",
"0.7997196",
"0.7990647",
"0.7961487",
"0.7903322",
"0.78983736",
"0.78821486",
"0.786502",
"0.7746972",
"0.77126104",
"0.7627231",
"0.7615329",
"0.7557139",
"0.7552181",
"0.7544176",
"0.75401574",
"0.7512356"... | 0.6995828 | 44 |
Get a Product thats not found | def Jd7O(YKHO):
_hkX = YKHO.app.get('/products/0')
YKHO.assertEqual(_hkX.status_code, jGRS.HTTP_404_NOT_FOUND) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wgId(YKHO):\n _hkX = YKHO.admin_register()\n Amyp = YKHO.admin_login()\n eOtH = Amyp['token']\n Lx3t = dict(prod_name='NY_denims', category='denims', stock=20, price=150)\n _hkX = YKHO.client.post('/api/v1/products', content_type='application/json', data=qQXR.dumps(Lx3t), headers={'Authorization... | [
"0.64637876",
"0.6316111",
"0.62717265",
"0.62078625",
"0.6204175",
"0.6191436",
"0.6137049",
"0.6117989",
"0.60395724",
"0.6025381",
"0.5980918",
"0.5956974",
"0.5952704",
"0.59502584",
"0.59479815",
"0.5933025",
"0.59325606",
"0.59083056",
"0.5860325",
"0.58585984",
"0.5841... | 0.7146867 | 0 |
Query Products by Price | def Amya(YKHO):
Ldyl = YKHO._create_products(10)
VLyg = 30
tqYe = 100
KPpy = [Lx3t for Lx3t in Ldyl if Lx3t.price >= VLyg and Lx3t.price <= tqYe]
_hkX = YKHO.app.get('/products', query_string='low={}&high={}'.format(VLyg, tqYe))
YKHO.assertEqual(_hkX.status_code, jGRS.HTTP_200_OK)
nPrm = _hk... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H1kw(Emd4, hI0L: float):\n Emd4.logger.info('Processing price query for %s ...', hI0L)\n return Emd4.query.filter(Emd4.price == hI0L).order_by(Emd4.id).all()",
"def N_Zi():\n return 200",
"def Dpgk(xDcj, B2Dn=1, GBmG=12, yA2c=99999999, _7x7=0):\n BwKt()\n kXUa = wxaU(['elasticsearch:9200'])\... | [
"0.77169204",
"0.70002115",
"0.69464356",
"0.6510316",
"0.65097415",
"0.62784094",
"0.60495",
"0.5991454",
"0.591836",
"0.59093183",
"0.59022754",
"0.58641595",
"0.5856563",
"0.58137536",
"0.58039916",
"0.5785772",
"0.57851064",
"0.5779367",
"0.57670563",
"0.57445174",
"0.571... | 0.7231043 | 1 |
Create a Product with missing data | def OzTr(YKHO):
_hkX = YKHO.app.post('/products', json={}, content_type='application/json')
YKHO.assertEqual(_hkX.status_code, jGRS.HTTP_400_BAD_REQUEST) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yuqV(YKHO):\n YKHO.assertIsNone(YKHO.product3.main_image)\n YKHO.assertIsNone(YKHO.product3.protein)\n YKHO.assertIsNone(YKHO.product3.fat)\n YKHO.assertIsNone(YKHO.product3.carbs)\n YKHO.assertIsNone(YKHO.product3.calories)",
"def CCwT(YKHO):\n BZgl = YKHO.data.copy()\n del BZgl['title'... | [
"0.65588826",
"0.65119845",
"0.64869165",
"0.64614993",
"0.64162344",
"0.6397853",
"0.63894874",
"0.63328326",
"0.63087726",
"0.63005304",
"0.62383354",
"0.61990327",
"0.6116126",
"0.6066462",
"0.60569936",
"0.6048549",
"0.6039679",
"0.6032216",
"0.60268784",
"0.6024345",
"0.... | 0.6918995 | 0 |
Return the active track. | def T3KA(hGU7, YPqY, YwkQ):
H5ew = (YPqY, YwkQ)
if H5ew in HqKa[hGU7]:
return HqKa[hGU7][H5ew]
HqKa[hGU7][H5ew] = SXEm(YPqY, DuIQ(YwkQ))
return HqKa[hGU7][H5ew] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def A6b2(YKHO):\n return YKHO._track",
"def A6b2(YKHO):\n return YKHO._track",
"def D6B2(YKHO):\n return YKHO._active",
"def OGXr():\n A6b2 = EVSx.get_current_track_info()\n A6b2['title'] = A6b2['title'][:30]\n A6b2['artist'] = A6b2['artist'][:30]\n return A6b2",
"def PmVz(YKHO):\n ... | [
"0.7342291",
"0.7312559",
"0.6865959",
"0.6812659",
"0.6757633",
"0.6757633",
"0.6757633",
"0.6757633",
"0.6561503",
"0.64777946",
"0.64161944",
"0.6393138",
"0.6377567",
"0.6377567",
"0.63317627",
"0.6324405",
"0.62764555",
"0.6223306",
"0.62065953",
"0.6198751",
"0.6164824"... | 0.7382982 | 0 |
Return pretty_midi Note object as a MusPy Note object. | def ju13(fytP: PrettyMIDINote) -> L_TV:
return L_TV(fytP.start, fytP.duration, fytP.pitch, fytP.velocity) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CtFS(b_q9: PrettyMIDI) -> vpph:\n IYan = J2iw(b_q9)\n FbkR = CEXT(b_q9)\n SHov = M2oB(b_q9)\n HqKa = [qpYU(A6b2) for A6b2 in b_q9.tracks]\n return vpph(metadata=H1ja(source_format='midi'), key_signatures=IYan, time_signatures=FbkR, lyrics=SHov, tracks=HqKa)",
"def qpYU(YKiD: Instrument) -> SXE... | [
"0.7293404",
"0.69942254",
"0.6827884",
"0.6659135",
"0.66532123",
"0.65662116",
"0.63545966",
"0.6179956",
"0.61643726",
"0.60831136",
"0.6072116",
"0.60466844",
"0.6038118",
"0.6034175",
"0.5991713",
"0.5982047",
"0.59645224",
"0.592573",
"0.5920061",
"0.5893302",
"0.588902... | 0.8291737 | 0 |
Return a pretty_midi Instrument object as a Track object. | def qpYU(YKiD: Instrument) -> SXEm:
rpno = [ju13(fytP) for fytP in YKiD.notes]
return SXEm(YKiD.program, YKiD.is_drum, YKiD.name, rpno) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CtFS(b_q9: PrettyMIDI) -> vpph:\n IYan = J2iw(b_q9)\n FbkR = CEXT(b_q9)\n SHov = M2oB(b_q9)\n HqKa = [qpYU(A6b2) for A6b2 in b_q9.tracks]\n return vpph(metadata=H1ja(source_format='midi'), key_signatures=IYan, time_signatures=FbkR, lyrics=SHov, tracks=HqKa)",
"def ju13(fytP: PrettyMIDINote) ->... | [
"0.70979977",
"0.67129993",
"0.6334844",
"0.59775984",
"0.5868439",
"0.58336437",
"0.57237566",
"0.57043034",
"0.5686008",
"0.5639041",
"0.56086385",
"0.5597634",
"0.55318654",
"0.5401908",
"0.5341095",
"0.52723014",
"0.5243355",
"0.5189497",
"0.5172072",
"0.51548624",
"0.512... | 0.82236636 | 0 |
Used for comparing tokens' chronological orders. If t1.key() < t2.key() then t1 appears before t2. | def H5ew(YKHO):
return YKHO.sentence_idx * 10 ** 6 + YKHO.get_id() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JWbp(YKHO, Elif):\n return YKHO._key < Elif._key",
"def JWbp(YKHO, Elif):\n return Elif > YKHO._cmpkey()",
"def jmxi(YKHO, Elif):\n return YKHO._key > Elif._key",
"def tPPv(n2Q1, SpII):\n return eHkp(n2Q1['total_seconds'], SpII['total_seconds'])",
"def TPjt(YKHO, Elif):\n return YKHO._ke... | [
"0.7047981",
"0.6762525",
"0.6563232",
"0.6541728",
"0.65251356",
"0.64715487",
"0.642599",
"0.6399123",
"0.6358407",
"0.6275156",
"0.6262451",
"0.62558246",
"0.62328625",
"0.6192279",
"0.61878246",
"0.6184352",
"0.6175027",
"0.61494285",
"0.6135046",
"0.60539305",
"0.6048277... | 0.0 | -1 |
Distance in tokens between the two given tokens. | def bApQ(n2Q1, SpII):
assert n2Q1.document.id == SpII.document.id
if n2Q1.key() > SpII.key():
ycBG = n2Q1
n2Q1 = SpII
SpII = ycBG
assert n2Q1.sentence_idx <= SpII.sentence_idx, 'wrong order for tokens, t1 should appear before t2'
C13M = n2Q1.document
Ayfi = 0
for YRbF in ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JFmb(YKHO, MxXY, cWFu):\n FUjE = YKHO.getText()\n if MxXY < cWFu:\n yKcO = MxXY.getSpan()[1] + 1\n Os4s = cWFu.getSpan()[0]\n XSoh = 1\n else:\n yKcO = cWFu.getSpan()[1] + 1\n Os4s = MxXY.getSpan()[0]\n XSoh = -1\n jdgs = FUjE[yKcO:Os4s]\n s2mk = jdgs.sp... | [
"0.8172838",
"0.8170361",
"0.797784",
"0.703881",
"0.6943071",
"0.6893108",
"0.68514365",
"0.6758776",
"0.6743447",
"0.6735663",
"0.6735647",
"0.6726448",
"0.66758597",
"0.66699535",
"0.6649276",
"0.6644578",
"0.6642823",
"0.6636252",
"0.6635442",
"0.66315943",
"0.6617269",
... | 0.84209156 | 0 |
Converts Users to JSON and returns it | def qQXR(YKHO):
return {'id': YKHO.id, 'id_bank_data': YKHO.id_bank_data, 'national_id_document': YKHO.national_id_document, 'country': YKHO.country, 'name': YKHO.name, 'surname': YKHO.surname, 'mail': YKHO.mail, 'google_token': YKHO.google_token, 'role': YKHO.role} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sEHT():\n CBIr = cuiw.query(mv1M).all()\n Aofo = []\n for YRbF in CBIr:\n Aofo += [YRbF.serialize]\n return pz3A(Users=Aofo)",
"def qQXR(YKHO):\n Aofo = {}\n for CBIr in YKHO.users:\n Aofo[CBIr.user_id] = CBIr.json\n return Aofo",
"def U_6g():\n yVA2 = []\n b7K4 = S... | [
"0.81121004",
"0.8069787",
"0.7850647",
"0.78057593",
"0.7632436",
"0.7553775",
"0.7504452",
"0.7455339",
"0.74321014",
"0.74134016",
"0.7411823",
"0.73564863",
"0.7353144",
"0.7344763",
"0.7330775",
"0.7289913",
"0.7217889",
"0.7205674",
"0.7182952",
"0.71791804",
"0.7173752... | 0.0 | -1 |
Get the Gateway URL. | async def get_gw(jmYf) -> str:
hxLB = await jmYf.get('/api/v6/gateway')
foCS = await hxLB.json
return foCS['url'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T54d(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'gateway_url')",
"def T54d(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'gateway_url')",
"def Gcrl(YKHO, QePW):\n raise NotImplementedError('Must be implemented in PaymentProcessor')",
"def Eh0g(YKHO) -> qe4Y.Output[str]:\n re... | [
"0.8808191",
"0.8464898",
"0.7873342",
"0.7534917",
"0.73695016",
"0.73621035",
"0.73621035",
"0.7348563",
"0.7348563",
"0.7249318",
"0.72031534",
"0.71239895",
"0.7105501",
"0.7040983",
"0.70385796",
"0.70027286",
"0.69962215",
"0.6957233",
"0.6953203",
"0.69384307",
"0.6931... | 0.706232 | 13 |
'licenses' value will be changed when it installed licenses is below to sql, license _id is no license select from osf_nodelicense; | def c_Ov(YKHO, C0xh, qGol, BCdN, veV6, RHKR):
nPrm = {}
azoT = {}
azoT['description'] = veV6
azoT['doi'] = RHKR
azoT['original_publication_date'] = qGol
OzUo = {}
OzUo['copyright_holders'] = [BCdN]
OzUo['year'] = 2018
azoT['license_record'] = OzUo
Q6kx = {}
license = {}
j... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zR92():\n HKwb = C13M.add_paragraph('')\n C13M.add_heading('License', level=1)\n hFZ4 = ['lef', 'serial', 'name', 'organization', 'product', 'numberOfCores', 'isExpired', 'expiredReason', 'isBlacklisted', 'isInvalid']\n orHE = GbT5.get_license()\n oBUx = len(orHE)\n tyNF = C13M.add_table(rows... | [
"0.64473814",
"0.61319053",
"0.598101",
"0.5975616",
"0.57881576",
"0.5660515",
"0.5626086",
"0.5614522",
"0.55855227",
"0.55624175",
"0.5561593",
"0.5558785",
"0.55549985",
"0.55407196",
"0.5540423",
"0.5510674",
"0.547765",
"0.5455072",
"0.54527754",
"0.54357624",
"0.543523... | 0.0 | -1 |
Transform x, y, z values into RGB colors. | def OHiQ(WKvO, LVAh, epBp):
d7Eb = oyIN.array([WKvO, LVAh, epBp]).T
d7Eb -= d7Eb.min(0)
d7Eb /= oyIN.maximum(d7Eb.max(0), 1e-16)
return d7Eb | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LyyR(WKvO):\n JDof = int(1000 * WKvO % 255)\n FdQZ = int(10000 * WKvO % 255)\n L_To = int(100000 * WKvO % 255)\n return (JDof, FdQZ, L_To)",
"def vK5y(WKvO):\n WKvO = 0 if WKvO == 0 else int(1 / WKvO)\n Fg_i = WKvO & 255\n Oa1e = WKvO >> 8 & 255\n Mkmy = WKvO >> 16 & 255\n return [... | [
"0.67375964",
"0.66734827",
"0.6468065",
"0.6397281",
"0.63308555",
"0.6318717",
"0.62222016",
"0.6016022",
"0.6011604",
"0.601133",
"0.5971275",
"0.59469557",
"0.59302026",
"0.58573526",
"0.5854485",
"0.5842732",
"0.5829991",
"0.5825446",
"0.58073014",
"0.5768837",
"0.576405... | 0.7237567 | 0 |
Create a colormap with value below a threshold being greyed out and transparent. Params | def Enh0(i6Hb=256, Uf0t=None, iMGt='inferno', Cwt5=0.3):
Bcwd = QrM1.cm.get_cmap(iMGt)(oyIN.linspace(0, 1, i6Hb))
if Uf0t is None:
Uf0t = oyIN.argmin(abs(oyIN.linspace(0.0, 3.5, i6Hb) + oyIN.log10(0.05)))
Bcwd[:Uf0t, :] = oyIN.c_[Bcwd[:Uf0t, 0], Bcwd[:Uf0t, 1], Bcwd[:Uf0t, 2], Cwt5 * oyIN.ones(len(B... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CQcQ(VXjJ, gwAu):\n for WKvO, LVAh, fvDH in VXjJ:\n Z5Q9, jlxe, pPPK = fvDH\n if Z5Q9 < gwAu:\n Z5Q9 = 255 - Z5Q9\n if jlxe < gwAu:\n jlxe = 255 - jlxe\n if pPPK < gwAu:\n pPPK = 255 - pPPK\n fvDH = egIk(Z5Q9, jlxe, pPPK)\n rqSI(VXjJ... | [
"0.65614676",
"0.6512516",
"0.64896274",
"0.64896274",
"0.64896274",
"0.6484343",
"0.6243192",
"0.62310296",
"0.6212723",
"0.61078703",
"0.60917246",
"0.60615873",
"0.59070307",
"0.5900779",
"0.58830136",
"0.58513767",
"0.5808906",
"0.579982",
"0.57951266",
"0.57929254",
"0.5... | 0.5943468 | 12 |
Annotate barplot with pvalues. | def GO9P(_1qI, zDMu, nPrm, hgjH, H2v2, qfpW='k', EGG0=None, GzWn=0.05, qUFU=0.05, Vb5F=None, Ua69=None):
if type(nPrm) is str:
l5Ny = nPrm
else:
l5Ny = ''
XP5J = 0.05
while nPrm < XP5J:
l5Ny += '*'
XP5J /= 10.0
if Ua69 and len(l5Ny) == Ua69:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YI04(aNZO, HHea=5):\n for mawX in aNZO.patches:\n AgRN = mawX.get_height()\n Yqag = mawX.get_x() + mawX.get_width() / 2\n n294 = HHea\n b4lR = 'bottom'\n if AgRN < 0:\n n294 *= -1\n b4lR = 'top'\n UXqs = '{:.1f}'.format(AgRN)\n aNZO.anno... | [
"0.722161",
"0.6651087",
"0.6488847",
"0.64184594",
"0.6393515",
"0.6376214",
"0.6118446",
"0.6086852",
"0.5960943",
"0.59527975",
"0.5939206",
"0.5854869",
"0.57599854",
"0.574859",
"0.56947863",
"0.56895536",
"0.56891966",
"0.56863445",
"0.5686152",
"0.5646012",
"0.56211436... | 0.5666118 | 19 |