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 |
|---|---|---|---|---|---|---|
Initialize the model by setting up the layers. | def FIMM(YKHO, jXxl, a6Jb, lhva, Norb, hUTg, j63z=0.7):
super(gcuF, YKHO).__init__()
YKHO.output_size = a6Jb
YKHO.n_layers = hUTg
YKHO.hidden_dim = Norb
YKHO.embed = U78l.Embedding(jXxl, lhva)
YKHO.lstm = U78l.LSTM(lhva, Norb, hUTg, dropout=j63z, batch_first=True)
YKHO.fc = U78l.Linear(Norb,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def J2K6(YKHO):\n YKHO._init_predictor()\n if YKHO.use_edge_fusion:\n YKHO._init_edge_module()",
"def kHAz(YKHO):\n YKHO.create_variables()\n YKHO.create_placeholders()\n YKHO.build_model()\n YKHO.reset_lr(None, True)\n YKHO.build_loss()\n YKHO.initialised = True",
"def J2K6(YKHO... | [
"0.7877656",
"0.740135",
"0.73939556",
"0.73799825",
"0.72304994",
"0.72242755",
"0.7183698",
"0.7181406",
"0.7175707",
"0.71491647",
"0.70773673",
"0.70694804",
"0.7036073",
"0.70194495",
"0.7018242",
"0.69936645",
"0.6969751",
"0.6949472",
"0.69274527",
"0.6899944",
"0.6853... | 0.0 | -1 |
Checks rows, columns and diagonals for a winner and returns player name if winner found | def ND5o(YKHO):
for rdlD in YKHO.board.values():
if all([Bc7X == 'x' for Bc7X in rdlD]):
return YKHO.player_1
elif all([Bc7X == 'o' for Bc7X in rdlD]):
return YKHO.player_2
for YRbF in range(3):
BDYS, yvOa, ahg_ = YKHO.board.values()
if BDYS[YRbF] == 'x' a... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BM5L(YKHO):\n BDYS = YKHO.find_three_in_row([YKHO._board[0][0], YKHO._board[0][1], YKHO._board[0][2]])\n yvOa = YKHO.find_three_in_row([YKHO._board[1][0], YKHO._board[1][1], YKHO._board[1][2]])\n ahg_ = YKHO.find_three_in_row([YKHO._board[2][0], YKHO._board[2][1], YKHO._board[2][2]])\n jUUv = BDYS ... | [
"0.7850276",
"0.7844686",
"0.78040963",
"0.77991927",
"0.7786862",
"0.7772859",
"0.7772767",
"0.775103",
"0.77378315",
"0.77017176",
"0.769776",
"0.7691695",
"0.76738596",
"0.7589716",
"0.7542575",
"0.7541765",
"0.7540349",
"0.753474",
"0.75276124",
"0.7417552",
"0.74025553",... | 0.8051105 | 0 |
If the input is unicode, it will be converted to utf8 encoded bytes; others will be returned to original way. | def ntSl(nPrm):
if isinstance(nPrm, QMSQ):
return nPrm.encode('utf-8')
else:
return nPrm | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vl_n(l5Ny):\n if isinstance(l5Ny, iauG):\n return l5Ny\n else:\n return l5Ny.encode('utf-8')",
"def rSlX(d7pR):\n try:\n if isinstance(d7pR, QMSQ):\n return d7pR.encode('utf-8')\n except NameError:\n pass\n return d7pR",
"def umXX(BWXx):\n assert BWX... | [
"0.72585714",
"0.7057726",
"0.705013",
"0.70202917",
"0.69109493",
"0.68745905",
"0.6828343",
"0.6787694",
"0.6770514",
"0.6762633",
"0.6759491",
"0.67589563",
"0.6746645",
"0.6735249",
"0.6671572",
"0.66674966",
"0.66594577",
"0.66577935",
"0.6628185",
"0.6556121",
"0.653581... | 0.6503458 | 23 |
Convert the input to unicode, input is required to be unicode or utf8 encoded bytes. | def brQJ(nPrm):
if isinstance(nPrm, bytes):
return nPrm.decode('utf-8')
else:
return nPrm | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def brQJ(BWXx):\n if isinstance(BWXx, iHh1):\n return BWXx\n if not isinstance(BWXx, vWp3):\n raise TypeError('Expected bytes, unicode, or None; got %r' % type(BWXx))\n return BWXx.decode('utf-8')",
"def VIcC(d7pR):\n try:\n if isinstance(d7pR, QMSQ):\n return d7pR.dec... | [
"0.7793887",
"0.77113724",
"0.75553405",
"0.7408156",
"0.7390316",
"0.7390316",
"0.738984",
"0.736352",
"0.73187596",
"0.72773427",
"0.7253526",
"0.7247552",
"0.7231445",
"0.71971655",
"0.71865135",
"0.7123094",
"0.7112982",
"0.70650494",
"0.703904",
"0.703389",
"0.70170397",... | 0.75615406 | 2 |
If the string subobject in the input object is unicode encoded, it is converted to a byte of utf8; the other is returned as it is. | def ddrW(input):
if isinstance(input, dict):
return dict([(ddrW(H5ew), ddrW(BWXx)) for H5ew, BWXx in input.iteritems()])
elif isinstance(input, list):
return [ddrW(U6D_) for U6D_ in input]
elif isinstance(input, QMSQ):
return input.encode('utf-8')
else:
return input | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iyQ9(YEnM, tZ2K='UTF-8'):\n if isinstance(YEnM, exCv):\n if not isinstance(YEnM, QMSQ):\n YEnM = QMSQ(YEnM, tZ2K)\n return YEnM",
"def umXX(BWXx):\n assert BWXx is None or isinstance(BWXx, SnBA.StringTypes)\n if isinstance(BWXx, SnBA.UnicodeType):\n return BWXx.encode('ut... | [
"0.70804787",
"0.7054887",
"0.70273423",
"0.70273423",
"0.70273423",
"0.70273423",
"0.70273423",
"0.70273423",
"0.69450444",
"0.6890117",
"0.6826282",
"0.67923164",
"0.6772603",
"0.6772084",
"0.6770586",
"0.67700917",
"0.67441547",
"0.6667456",
"0.66381395",
"0.66276354",
"0.... | 0.0 | -1 |
If the input is str (ie unicode), it will be converted to utf8 encoded bytes; others will return as they are. | def ntSl(nPrm):
if isinstance(nPrm, str):
return nPrm.encode(encoding='utf-8')
else:
return nPrm | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PQSR(vIwR):\n return vIwR.encode('utf8') if isinstance(vIwR, str) else vIwR",
"def umXX(BWXx):\n assert BWXx is None or isinstance(BWXx, SnBA.StringTypes)\n if isinstance(BWXx, SnBA.UnicodeType):\n return BWXx.encode('utf-8')\n else:\n return BWXx",
"def jShR(BWXx):\n if isinst... | [
"0.7504459",
"0.7472167",
"0.7422524",
"0.7396655",
"0.73131263",
"0.7242583",
"0.7220387",
"0.7214761",
"0.7203917",
"0.71764106",
"0.7152591",
"0.7113217",
"0.70409924",
"0.6968084",
"0.69579387",
"0.6933949",
"0.69033337",
"0.6884524",
"0.68819547",
"0.68632",
"0.68306863"... | 0.6585055 | 42 |
If the input is bytes, it is considered to be utf8 encoding, and returns str | def yLCI(nPrm):
if isinstance(nPrm, bytes):
return nPrm.decode('utf-8')
else:
return nPrm | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jShR(BWXx):\n if isinstance(BWXx, RP9d):\n return BWXx\n elif isinstance(BWXx, wCZ0):\n return BWXx.encode('utf-8')\n else:\n return str(BWXx)",
"def e__i(KCHu):\n return KCHu.encode('utf-8')",
"def jShR(BWXx):\n if isinstance(BWXx, jKi7.text_type):\n return BWXx.... | [
"0.76432323",
"0.76154476",
"0.7567259",
"0.75092566",
"0.7471273",
"0.74313176",
"0.7378342",
"0.73617756",
"0.73536265",
"0.7344269",
"0.7342175",
"0.73386896",
"0.7317219",
"0.7298769",
"0.7298769",
"0.72802126",
"0.72549284",
"0.7251981",
"0.7217084",
"0.72070533",
"0.718... | 0.68467027 | 37 |
Convert the input to unicode, input is required to be unicode or utf8 encoded bytes. | def brQJ(nPrm):
return yLCI(nPrm) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def brQJ(BWXx):\n if isinstance(BWXx, iHh1):\n return BWXx\n if not isinstance(BWXx, vWp3):\n raise TypeError('Expected bytes, unicode, or None; got %r' % type(BWXx))\n return BWXx.decode('utf-8')",
"def VIcC(d7pR):\n try:\n if isinstance(d7pR, QMSQ):\n return d7pR.dec... | [
"0.7793887",
"0.77113724",
"0.75615406",
"0.75553405",
"0.7408156",
"0.7390316",
"0.7390316",
"0.738984",
"0.736352",
"0.73187596",
"0.72773427",
"0.7253526",
"0.7247552",
"0.7231445",
"0.71971655",
"0.71865135",
"0.7123094",
"0.7112982",
"0.70650494",
"0.703904",
"0.703389",... | 0.68372756 | 34 |
Returns the ManagementForm instance for this FormSet. | def YVCp(YKHO):
if YKHO.is_bound:
L03z = wGQZ(YKHO.data, auto_id=YKHO.auto_id, prefix=YKHO.prefix)
if not L03z.is_valid():
raise sUXu('ManagementForm data is missing or has been tampered with')
else:
L03z = wGQZ(auto_id=YKHO.auto_id, prefix=YKHO.prefix, initial={floL: YKHO.to... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SW4j(YKHO):\n if YKHO.is_bound:\n L03z = KuOU(YKHO.data, auto_id=YKHO.auto_id, prefix=YKHO.prefix)\n if not L03z.is_valid():\n raise sUXu('ManagementForm data is missing or has been tampered with')\n else:\n L03z = KuOU(auto_id=YKHO.auto_id, prefix=YKHO.prefix, initial={fl... | [
"0.71396756",
"0.66645527",
"0.66645527",
"0.63575435",
"0.6231655",
"0.62000716",
"0.61292356",
"0.6125592",
"0.6120834",
"0.6112439",
"0.6102003",
"0.60750073",
"0.5939128",
"0.5879666",
"0.58429885",
"0.57521427",
"0.5715844",
"0.56427836",
"0.557819",
"0.5555635",
"0.5554... | 0.7361751 | 0 |
Desirializing of nonuuid formatted value should raise an error. | def Bb6H():
uPxI = _1xC()
Aofo = uPxI.load({'uuid_str': mHQ8, 'uuid_uuid': S7kj(mw6P)})
tDkU(Aofo.errors['uuid_str'], sjXf('Not a valid UUID.')) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Flfh(BWXx: Any, rqIe: bool, qQNS: str) -> None:\n if rqIe and BWXx is None:\n return\n if not isinstance(BWXx, S7kj) or BWXx.version != 4:\n raise TypeError(f'{qQNS} must be a UUID version 4')",
"def hr4y(LPdC, Pn22=tuple([None, '']), m5CN=True):\n if LPdC in Pn22:\n return (LPd... | [
"0.68983275",
"0.66873175",
"0.65473825",
"0.65364915",
"0.64650166",
"0.6401455",
"0.6399042",
"0.6303111",
"0.62995964",
"0.6214849",
"0.62138045",
"0.60851914",
"0.6074883",
"0.6074883",
"0.60541576",
"0.6017049",
"0.6000152",
"0.6000152",
"0.6000152",
"0.59587204",
"0.594... | 0.60952204 | 11 |
compute dot production of two vectors | def uYbU(hQHm, jlSq):
return hQHm[0] * jlSq[0] + hQHm[1] * jlSq[1] + hQHm[2] * jlSq[2] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BJ1H(jzdc, Fg_i):\n if len(jzdc) != len(Fg_i):\n raise Exception('Input vectors must be of same length, not %d and %d' % (len(jzdc), len(Fg_i)))\n return float(sum([jzdc[YRbF] * Fg_i[YRbF] for YRbF in range(len(jzdc))]))",
"def BJ1H(ENWa, ZoT5):\n return sum((XOOk * pHXX for XOOk, pHXX in zip... | [
"0.8511496",
"0.84440446",
"0.8402081",
"0.8395364",
"0.83690804",
"0.8349456",
"0.8316363",
"0.83106387",
"0.8247005",
"0.8224876",
"0.8203073",
"0.8202561",
"0.8144584",
"0.8127831",
"0.80985284",
"0.80964756",
"0.80841047",
"0.8082877",
"0.80808747",
"0.80802584",
"0.80544... | 0.8106549 | 14 |
compute cross production of two vectors | def wnaF(hQHm, jlSq):
return _J6W.CG3dVector(hQHm[1] * jlSq[2] - jlSq[1] * hQHm[2], hQHm[2] * jlSq[0] - jlSq[2] * hQHm[0], hQHm[0] * jlSq[1] - jlSq[0] * hQHm[1]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WHx2(jzdc, Fg_i):\n return iArr(jzdc[1] * Fg_i[2] - jzdc[2] * Fg_i[1], jzdc[2] * Fg_i[0] - jzdc[0] * Fg_i[2], jzdc[0] * Fg_i[1] - jzdc[1] * Fg_i[0])",
"def vNib(jzdc, Fg_i):\n return [jzdc[1] * Fg_i[2] - jzdc[2] * Fg_i[1], jzdc[2] * Fg_i[0] - jzdc[0] * Fg_i[2], jzdc[0] * Fg_i[1] - jzdc[1] * Fg_i[0]]",
... | [
"0.8276196",
"0.8221919",
"0.80771583",
"0.8044745",
"0.79784995",
"0.7958217",
"0.7818568",
"0.7786286",
"0.7779489",
"0.777509",
"0.7701375",
"0.76462483",
"0.76118815",
"0.7483775",
"0.74591064",
"0.7422321",
"0.7417814",
"0.74160844",
"0.73222435",
"0.7279918",
"0.7129102... | 0.79456735 | 6 |
Get all legal moves for the current board_state. For Tictactoe that is all positions that do not currently have pieces played. | def Yi8B(HSQX):
for WKvO, LVAh in Hs6x.product(range(len(HSQX)), range(len(HSQX[0]))):
if HSQX[WKvO][LVAh] == 0:
yield (WKvO, LVAh) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dgbU(YKHO):\n oLdq = []\n KzJa = [YKHO.turn]\n if YKHO.turn == j6j3:\n KzJa.extend((_1Sw, Ntwz))\n WhY1 = oyIN.nditer(YKHO.board_state, flags=['multi_index'])\n while not WhY1.finished:\n d6pt = WhY1.multi_index\n nr7v = WhY1[0]\n if nr7v in KzJa:\n oLdq.ex... | [
"0.8104835",
"0.79265124",
"0.78373796",
"0.7735789",
"0.77165693",
"0.7643346",
"0.75891775",
"0.7550649",
"0.7538445",
"0.74807423",
"0.7466644",
"0.7418224",
"0.7406417",
"0.7396408",
"0.7373833",
"0.73277944",
"0.7315183",
"0.7275858",
"0.7267511",
"0.7243297",
"0.7232759... | 0.7168862 | 29 |
x component of the coordinates in the interior domain. | def WKvO(YKHO):
return YKHO.coords[0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m2os(YKHO):\n return YKHO.x0 + oyIN.arange(YKHO.nx) * YKHO.dx",
"def WKvO(YKHO):\n return YKHO._coords[0]",
"def WKvO(YKHO):\n if YKHO._x is None:\n YKHO.compute_coordinates()\n return YKHO._x",
"def nIKw(YKHO):\n return YKHO.coords[0]",
"def p5xg(YKHO):\n return YKHO.x_coord",... | [
"0.8358697",
"0.8154594",
"0.8109607",
"0.8066341",
"0.8036693",
"0.7739915",
"0.7691257",
"0.7688244",
"0.7548885",
"0.7508032",
"0.74587315",
"0.74127597",
"0.7358614",
"0.73565143",
"0.7294545",
"0.7292517",
"0.7270111",
"0.72684973",
"0.72265565",
"0.72084564",
"0.7204393... | 0.8181522 | 1 |
y component of the coordinates in the interior domain. | def LVAh(YKHO):
return YKHO.coords[1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bmPF(YKHO):\n return YKHO.y0 + oyIN.arange(YKHO.ny) * YKHO.dy",
"def LVAh(YKHO):\n return YKHO._coords[1]",
"def LVAh(YKHO) -> int:\n return YKHO.data.y_centre >> 4",
"def yDCK(YKHO):\n return YKHO.coords[1]",
"def LVAh(YKHO):\n if YKHO._y is None:\n YKHO.compute_coordinates()\n ... | [
"0.84114426",
"0.81654555",
"0.80646",
"0.79960674",
"0.78949875",
"0.7806516",
"0.77400583",
"0.77166253",
"0.7681602",
"0.7681602",
"0.7681602",
"0.7681602",
"0.7681602",
"0.7681602",
"0.7681602",
"0.7681602",
"0.7681602",
"0.7681602",
"0.76600176",
"0.76600176",
"0.7660017... | 0.82379454 | 1 |
x component of the coordinates of the whole domain (halo points included). | def AdJO(YKHO):
return YKHO.coords_halo[0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m2os(YKHO):\n return YKHO.x0 + oyIN.arange(YKHO.nx) * YKHO.dx",
"def WKvO(YKHO):\n if YKHO._x is None:\n YKHO.compute_coordinates()\n return YKHO._x",
"def WKvO(YKHO):\n return YKHO.coords[0]",
"def WKvO(YKHO):\n return YKHO._coords[0]",
"def nIKw(YKHO):\n return YKHO.coords[0]... | [
"0.7628023",
"0.7627613",
"0.7605079",
"0.7560858",
"0.75197285",
"0.73364943",
"0.7319262",
"0.7208585",
"0.7040728",
"0.70402396",
"0.700919",
"0.6968909",
"0.69673264",
"0.6955738",
"0.69547075",
"0.69454676",
"0.69199395",
"0.682559",
"0.681483",
"0.6806043",
"0.6782578",... | 0.77378696 | 0 |
y component of the coordinates of the whole domain (halo points included). | def HnfM(YKHO):
return YKHO.coords_halo[1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bmPF(YKHO):\n return YKHO.y0 + oyIN.arange(YKHO.ny) * YKHO.dy",
"def LVAh(YKHO):\n return YKHO.coords[1]",
"def yDCK(YKHO):\n return YKHO.__y",
"def LVAh(YKHO):\n return YKHO._coords[1]",
"def LVAh(YKHO):\n if YKHO._y is None:\n YKHO.compute_coordinates()\n return YKHO._y",
"... | [
"0.7791334",
"0.7649934",
"0.7597563",
"0.75450903",
"0.75338155",
"0.75070745",
"0.74508405",
"0.7420105",
"0.74109304",
"0.7409863",
"0.7409863",
"0.7409863",
"0.7409863",
"0.7409863",
"0.7409863",
"0.7409863",
"0.7409863",
"0.7409863",
"0.7409863",
"0.73475975",
"0.7347597... | 0.80401057 | 0 |
Return the coordinates of the bottom right and upper left corner of the interior domain. | def pmnP(YKHO):
XOP0 = oyIN.asarray([YKHO.coords[G1Hx][0] for G1Hx in range(YKHO.dim)])
K3QL = oyIN.asarray([YKHO.coords[G1Hx][-1] for G1Hx in range(YKHO.dim)])
return (XOP0, K3QL) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HhD9(YKHO):\n XOP0 = oyIN.asarray([YKHO.coords_halo[G1Hx][0] for G1Hx in range(YKHO.dim)])\n K3QL = oyIN.asarray([YKHO.coords_halo[G1Hx][-1] for G1Hx in range(YKHO.dim)])\n return (XOP0, K3QL)",
"def yH9b(YKHO):\n YKHO._updateExtents()\n return (YKHO._mMinX, YKHO._mMaxY)",
"def PgrI(YKHO):\n... | [
"0.76211905",
"0.7292665",
"0.69914323",
"0.67774415",
"0.6669149",
"0.6615716",
"0.6581587",
"0.6549148",
"0.6523538",
"0.65019536",
"0.64836305",
"0.64644194",
"0.64228207",
"0.6417498",
"0.6398502",
"0.63445574",
"0.63234276",
"0.6316152",
"0.6315162",
"0.6314326",
"0.6278... | 0.77522284 | 0 |
Mock the requests.get return value. If we try to set attributes on requests.get directly, we'll | def QmTQ(AZgw, QTa6):
def tgX0(yR_P, hGN5, jGRS):
j1mP = AZgw.patch(f'{yR_P}.requests.get')
j1mP.return_value = QTa6(hGN5, jGRS)
return tgX0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QmTQ(YKHO, AZgw):\n TMAJ = AZgw.patch('requests.get')\n TMAJ.return_value.__enter__.return_value.json.return_value = {'item': {'icon': '', 'icon_large': '', 'id': 21787, 'type': 'Miscellaneous', 'typeIcon': '', 'name': 'Steadfast boots', 'description': 'A pair of powerful-looking boots.', 'current': {'tr... | [
"0.72807246",
"0.72359955",
"0.7179954",
"0.70539004",
"0.7024782",
"0.69704086",
"0.69374245",
"0.68708456",
"0.6863891",
"0.68198556",
"0.67906505",
"0.6764723",
"0.67489815",
"0.6732757",
"0.6729054",
"0.6710932",
"0.66979325",
"0.6666944",
"0.6651065",
"0.66106665",
"0.65... | 0.719874 | 2 |
Create a fake requests.Response object. | def QTa6():
class MockResponse:
def FIMM(YKHO, RKft, Pst5):
YKHO.content = RKft
YKHO.status_code = Pst5
def hGN5(YKHO):
return YKHO.content
return HiyZ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def geh0():\n\n def _gRY(_p9N, dCz_):\n \"\"\"Set up response with the given parameters.\n\n :param ret_code: Return code for the response\n :param ret_value: Return value for the response\n :return: Mocked Responce object with the given parameters\n \"\"\"\n ... | [
"0.736011",
"0.71040297",
"0.7098835",
"0.6869094",
"0.6854902",
"0.6733961",
"0.6733961",
"0.6719025",
"0.6631267",
"0.6599584",
"0.6549238",
"0.65430015",
"0.6531704",
"0.6485677",
"0.64722425",
"0.643935",
"0.64389443",
"0.6423061",
"0.642237",
"0.6392279",
"0.63886",
"0... | 0.73249215 | 1 |
Get the string representation of the model | def zAg0(YKHO):
return qQXR.dumps(YKHO.to_dict()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return super().__str__() + YKHO.model.__str__()",
"def zAg0(YKHO) -> str:\n VKhi = YKHO._meta\n if YKHO.name_field:\n Aofo = str(VKhi.get_field(YKHO.name_field).value_from_object(YKHO))\n else:\n NrJ9 = FcL8(VKhi.model, foreign=False, m2m=False, exclude=YKHO.exclude_fr... | [
"0.8463654",
"0.7898162",
"0.77145106",
"0.77145106",
"0.76879215",
"0.7655091",
"0.7650248",
"0.757232",
"0.75623566",
"0.7551965",
"0.7551965",
"0.7551292",
"0.7549884",
"0.7536579",
"0.7519798",
"0.7517772",
"0.75146",
"0.745953",
"0.74590117",
"0.74517524",
"0.7426484",
... | 0.0 | -1 |
Computes cross entropy between targets (encoded as onehot vectors) and predictions. | def qN0O(N6Z1, x6A0, _hZ2=1e-12):
N6Z1 = oyIN.clip(N6Z1, _hZ2, 1.0 - _hZ2)
ywwl = N6Z1.shape[0]
NszA = -oyIN.sum(x6A0 * oyIN.log(N6Z1 + 1e-09)) / ywwl
return NszA | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CqbS(N6Z1, x6A0):\n NzrI = x6A0 * oyIN.log(N6Z1)\n return -oyIN.sum(NzrI) / N6Z1.shape[0]",
"def CqbS(PjQx, pan_):\n Ep8u, jTqs = PjQx.shape\n uw5A = PjQx.exp()\n GCQa = uw5A.log()\n jzdc = w9Rj(PjQx)\n Mftn = PjQx - jzdc\n tX1M = Mftn.exp()\n Vn69 = tX1M.sum(axis=1, keepdims=True)... | [
"0.7892568",
"0.75793386",
"0.75247025",
"0.751529",
"0.7430935",
"0.73616475",
"0.73616475",
"0.7344533",
"0.7198154",
"0.7078395",
"0.7066774",
"0.7011896",
"0.69843245",
"0.6977101",
"0.69487417",
"0.69227016",
"0.6911786",
"0.68707484",
"0.685989",
"0.68182206",
"0.679910... | 0.7006511 | 12 |
get the domain ldap root for the given dn >>> dn = "sambaDomainName=IEPERTEST,dc=Ieper,dc=elex" >>> domainroot(dn) 'dc=Ieper,dc=elex' | def Njhs(Csk6):
CCrh = MTrT(Csk6)
CCrh.pop(0)
return F71q(CCrh) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Bf72(bD7m):\n if bD7m is None:\n return ''\n Xqgu = l5Ny.find_between(bD7m, 'http://', '/')\n TzmZ = l5Ny.find_between(bD7m, 'https://', '/')\n if Xqgu != '':\n if Xqgu.startswith('www.'):\n return Xqgu[4:]\n else:\n return Xqgu\n elif TzmZ != '':\n ... | [
"0.59731376",
"0.58926845",
"0.58213747",
"0.57498807",
"0.5353788",
"0.53386265",
"0.5327255",
"0.53180313",
"0.52835435",
"0.5229424",
"0.51967984",
"0.51759446",
"0.5168741",
"0.512568",
"0.51203126",
"0.5037568",
"0.5010395",
"0.49844295",
"0.49844295",
"0.49776703",
"0.4... | 0.78520805 | 0 |
Returns a Polynomial Decomposition impedance. | def KVH6(YKHO, q7In, yzQ0):
return z3Ds(yzQ0, YKHO.taus, YKHO.log_taus, YKHO.c_exp, R0=q7In[0], a=q7In[1:]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BXW4(YKHO):\n Z9rb = []\n for YRbF, wEf2 in enumerate(YKHO.coeff):\n Z9rb.append(YRbF * wEf2)\n del Z9rb[0]\n return Pj0c(Z9rb)",
"def v77j(YKHO):\n iIc2 = [0]\n for YRbF, wEf2 in enumerate(YKHO.coeff):\n iIc2.append(round(wEf2 / (YRbF + 1.0), 2))\n return Pj0c(iIc2)",
"d... | [
"0.6602687",
"0.6434507",
"0.61124486",
"0.594507",
"0.59432936",
"0.5882449",
"0.5757533",
"0.571267",
"0.5697987",
"0.56913066",
"0.5650294",
"0.5599147",
"0.55832195",
"0.55588233",
"0.5545277",
"0.5538527",
"0.5534198",
"0.55121106",
"0.55069256",
"0.5482732",
"0.54679424... | 0.0 | -1 |
Find input channels of the yolo model from layer configs. | def qHdH(Pklp):
KJ3G = Pklp['000_net']
return KJ3G.get('channels', 3) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dxEX(YKHO, ApQ8):\n return ApQ8",
"def rGw7(g4y1, l7uB=False):\n SWgO = a8US(g4y1)\n mM9L = [vqgD(SWgO.checked_type.shape)]\n xMux = mM9L[0][0] if not l7uB else mM9L[0][1]\n return xMux",
"def bo_C(YKHO):\n HkzR = A7lk * B9jy ** 2\n _kfW = [HkzR]\n for yzQ0 in YKHO._conv_weights + Y... | [
"0.58312744",
"0.5742968",
"0.56544346",
"0.5654426",
"0.5552283",
"0.54746956",
"0.5446388",
"0.5428018",
"0.5343479",
"0.5341048",
"0.53252137",
"0.53120375",
"0.52911556",
"0.5288412",
"0.5281511",
"0.52737856",
"0.527295",
"0.52729017",
"0.5260956",
"0.52438396",
"0.52409... | 0.63726634 | 0 |
Initializes the model with weights and bias Conv layers get random weights from a normal distribution and bias is set to 0 | def C0Lv(YKHO):
for r8hN in YKHO.modules():
if isinstance(r8hN, U78l.Conv2d):
r8hN.weight.data.normal_(0, 0.05)
if r8hN.bias is not None:
r8hN.bias.data.zero_() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DVZr(C3ST):\n mPQc = C3ST.__class__.__name__\n if mPQc.find('Conv') != -1:\n U78l.init.normal_(C3ST.weight.data, 0.0, 0.02)\n elif mPQc.find('BatchNorm') != -1:\n U78l.init.normal_(C3ST.weight.data, 1.0, 0.02)\n U78l.init.constant_(C3ST.bias.data, 0)",
"def i7WW(YKHO):\n yYlq... | [
"0.7880966",
"0.77078766",
"0.76977557",
"0.7682001",
"0.7630087",
"0.7623425",
"0.7612172",
"0.7602894",
"0.7602894",
"0.7602894",
"0.75905013",
"0.7564779",
"0.7564779",
"0.75269467",
"0.7512145",
"0.751193",
"0.75105506",
"0.75105506",
"0.75105506",
"0.7505411",
"0.748072"... | 0.7725655 | 1 |
Iterates the model for a single batch of data, calculates the loss and updates the model parameters. | def YPaw(YKHO, nPrm: torch.Tensor) -> AzJI:
LNo8, bGrB = nPrm
LNo8 = LNo8.to(YKHO.device)
Ep8u = LNo8.shape[0]
UXqs = ht2j.full((Ep8u,), YKHO.label, dtype=ht2j.float, device=YKHO.device)
YKHO.zero_grad()
hlel = YKHO(LNo8).view(-1)
XObx = YKHO.criterion(hlel, UXqs)
XObx.backward()
y2_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def N2uJ(YKHO):\n o6yt = YKHO.X_train.shape[0]\n BHML = oyIN.random.choice(o6yt, YKHO.batch_size)\n dTb3 = YKHO.X_train[BHML]\n omIE = YKHO.y_train[BHML]\n N77f, vtNT = YKHO.model.loss(dTb3, omIE)\n YKHO.loss_history.append(N77f)\n for XP5J, yzQ0 in YKHO.model.params.items():\n ncXl = v... | [
"0.7212915",
"0.7017608",
"0.6971652",
"0.6964363",
"0.69216657",
"0.69077504",
"0.6877378",
"0.6855926",
"0.68448675",
"0.6819717",
"0.6796839",
"0.6751691",
"0.67510575",
"0.6746935",
"0.6739293",
"0.6734196",
"0.6725004",
"0.67016226",
"0.66975546",
"0.66851646",
"0.667173... | 0.0 | -1 |
Replaces `suffix` of `word` with `replacement | def G3AH(YKHO, GIN8, ZI14, m1Oc):
assert GIN8.endswith(ZI14), "Given word doesn't end with given suffix"
if ZI14 == '':
return GIN8 + m1Oc
else:
return GIN8[:-len(ZI14)] + m1Oc | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yJjD(GIN8, ZI14):\n ZI14, VWe_, wOmD = ZI14.partition(' ')\n Tdem = DDAp(GIN8, ZI14)\n return Tdem + VWe_ + wOmD",
"def rssD(eJh7, gv2B, BdN0):\n ...",
"def LNzK(mWFP, il7a):\n assert isinstance(mWFP, exCv)\n assert isinstance(il7a, exCv)\n lpha = Hy7s.path.splitext(mWFP)\n return l... | [
"0.7701713",
"0.7665795",
"0.66624486",
"0.64749455",
"0.63054746",
"0.6149442",
"0.61022633",
"0.6039127",
"0.6027953",
"0.6017234",
"0.59906757",
"0.59685665",
"0.5966546",
"0.5966546",
"0.5966546",
"0.5966546",
"0.5965606",
"0.5955456",
"0.59381366",
"0.59128815",
"0.58945... | 0.89509475 | 0 |
Applies the first applicable suffixremoval rule to the word Takes a word and a list of suffixremoval rules represented as 3tuples, with the first element being the suffix to remove, the second element being the string to replace it with, and the final element being the condition for the rule to be applicable, or None i... | def imMI(YKHO, GIN8, c_NS):
for eD8c in c_NS:
ZI14, m1Oc, XEri = eD8c
if ZI14 == '*d' and YKHO._ends_double_consonant(GIN8):
XPB5 = GIN8[:-2]
if XEri is None or XEri(XPB5):
return XPB5 + m1Oc
else:
return GIN8
if GIN8.endswi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tRQg(GIN8):\n return ZbWC.sub(TgwQ, qx_G, GIN8)",
"def wFCk(YKHO, GIN8):\n zX95 = GIN8\n if GIN8 not in YKHO.vocab_list:\n GIN8 = GIN8.strip(',.!?')\n for YRbF in range(len(StJU)):\n kUBT, vIwR = Fk9L(GIN8, StJU[YRbF])\n if kUBT:\n bGrB, ZI14 = vI0u(zX95, vIwR)\n ... | [
"0.6241091",
"0.6044743",
"0.58442014",
"0.56673056",
"0.5549546",
"0.55156666",
"0.5505275",
"0.53335893",
"0.53203624",
"0.52443767",
"0.5229112",
"0.52215064",
"0.5208779",
"0.51806766",
"0.51736385",
"0.5163402",
"0.51501673",
"0.51331615",
"0.5123183",
"0.5071901",
"0.50... | 0.68673265 | 0 |
Implements Step 1b from "An algorithm for suffix stripping" | def b39j(YKHO, GIN8):
if YKHO.mode == YKHO.NLTK_EXTENSIONS:
if GIN8.endswith('ied'):
if len(GIN8) == 4:
return YKHO._replace_suffix(GIN8, 'ied', 'ie')
else:
return YKHO._replace_suffix(GIN8, 'ied', 'i')
if GIN8.endswith('eed'):
XPB5 = YKHO.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qmW4(YKHO, WKvO) -> FgBH:\n pass",
"def vgd6(KCHu, iRsl):\n for ZI14 in iRsl:\n if KCHu.endswith(ZI14):\n return KCHu.rstrip(ZI14)\n return KCHu",
"def uzLI(YKHO):\n YKHO.numSuffixes = 0\n YKHO.forceStress = 0\n Owm6 = []\n for eHNT in YKHO.suffixes.finditer(YKHO.wd):... | [
"0.71120393",
"0.6927874",
"0.68953496",
"0.6655125",
"0.6539592",
"0.64849085",
"0.6369599",
"0.6365083",
"0.62968457",
"0.6283579",
"0.62531453",
"0.6191985",
"0.6188154",
"0.6157653",
"0.61504936",
"0.6122239",
"0.6086603",
"0.6043726",
"0.60027677",
"0.59654695",
"0.59466... | 0.54680014 | 60 |
Implements Step 1c from "An algorithm for suffix stripping" | def SvhX(YKHO, GIN8):
def dcdA(XPB5):
"""
This has been modified from the original Porter algorithm so
that y->i is only done when y is preceded by a consonant,
but not if the stem is only a single consonant, i.e.
(*c and not c) Y -> I
So 'ha... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qmW4(YKHO, WKvO) -> FgBH:\n pass",
"def vgd6(KCHu, iRsl):\n for ZI14 in iRsl:\n if KCHu.endswith(ZI14):\n return KCHu.rstrip(ZI14)\n return KCHu",
"def uzLI(YKHO):\n YKHO.numSuffixes = 0\n YKHO.forceStress = 0\n Owm6 = []\n for eHNT in YKHO.suffixes.finditer(YKHO.wd):... | [
"0.7151827",
"0.7035866",
"0.68370575",
"0.6659626",
"0.658684",
"0.65657824",
"0.6438374",
"0.6393294",
"0.638715",
"0.633172",
"0.62455475",
"0.6197732",
"0.61885804",
"0.61792827",
"0.61698663",
"0.6149805",
"0.61285746",
"0.60832727",
"0.60544956",
"0.60506916",
"0.597244... | 0.0 | -1 |
Return if ingestion mode is on. | def HKhZ(YKHO):
return Hy7s.environ.get('SNYK_INGESTION_FORCE_RUN', 'false').lower() in ('1', 'yes', 'true') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pctY(YKHO) -> str:\n return qe4Y.get(YKHO, 'ingestion_mode')",
"def pctY(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'ingestion_mode')",
"def pctY(YKHO) -> qe4Y.Input[uLKX[str, 'IngestionMode']]:\n return qe4Y.get(YKHO, 'ingestion_mode')",
"def Debg(YKHO) -> bool:\n return YKHO.coordin... | [
"0.7885129",
"0.77932876",
"0.7579588",
"0.6684772",
"0.65818673",
"0.64385766",
"0.6314662",
"0.62913567",
"0.6282229",
"0.6282229",
"0.6282229",
"0.6250472",
"0.6242138",
"0.6233455",
"0.6213318",
"0.62132466",
"0.61894625",
"0.61894625",
"0.61894625",
"0.61894625",
"0.6189... | 0.6460671 | 5 |
Return if the vuln mode is on. | def ChxF(YKHO):
return Hy7s.environ.get('DISABLE_VULN_MODE', 'false').lower() in ('1', 'yes', 'true') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Debg(YKHO):\n return YKHO._program.get('enabled') is True",
"def t5bX(YKHO):\n return Hy7s.environ.get('COMPLETE_VULN_MODE', 'false').lower() in ('1', 'yes', 'true')",
"def hVQ4(YKHO):\n return getattr(YKHO.env, 'mode', None) == 'production'",
"def OfCz(YKHO):\n return YKHO.is_valid_platform(... | [
"0.66916114",
"0.66532433",
"0.6499631",
"0.64198023",
"0.6398497",
"0.6380015",
"0.6346437",
"0.633201",
"0.63165367",
"0.63053477",
"0.6267307",
"0.6243341",
"0.6215645",
"0.62144536",
"0.6212919",
"0.61458015",
"0.6141528",
"0.61412394",
"0.6140185",
"0.6138267",
"0.613293... | 0.69225055 | 0 |
Get a User object from the user_id. | def TKWP(YKHO, uJjO):
try:
return tHSi.objects.get(pk=uJjO)
except tHSi.DoesNotExist:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bt8D(uJjO):\n return mv1M.query.get(uJjO)",
"def B9ST(uJjO):\n return YJv1.query.filter_by(id=uJjO).first()",
"def bt8D(uJjO):\n return mv1M.query.get(uJjO)",
"def TKWP(Emd4, uJjO):\n try:\n return mv1M.objects.get(pk=uJjO)\n except mv1M.DoesNotExist:\n return None",
"def N... | [
"0.89135295",
"0.8838515",
"0.8776147",
"0.8770163",
"0.87386477",
"0.8667805",
"0.8667805",
"0.8667805",
"0.8667805",
"0.86468965",
"0.8629112",
"0.85356957",
"0.8495958",
"0.8457728",
"0.83978903",
"0.8372216",
"0.8274367",
"0.8245512",
"0.82040536",
"0.82040536",
"0.820405... | 0.79216135 | 71 |
Sets the created_at of this ChannelReturnResponse. | def aJ2e(YKHO, aJ2e):
YKHO._created_at = aJ2e | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aJ2e(YKHO, aJ2e):\n YKHO._created_at = aJ2e",
"def aJ2e(YKHO, aJ2e: 'datetime'):\n YKHO._attrs['createdAt'] = aJ2e",
"def aJ2e(YKHO, aJ2e: 'datetime'):\n YKHO._attrs['createdAt'] = aJ2e",
"def aJ2e(YKHO, aJ2e: 'datetime'):\n YKHO._attrs['createdAt'] = aJ2e",
"def aJ2e(YKHO, aJ2e: 'str'):\n ... | [
"0.65770507",
"0.6559553",
"0.6559553",
"0.6559553",
"0.6474776",
"0.6138583",
"0.6138583",
"0.6078942",
"0.58889717",
"0.58354366",
"0.57629526",
"0.5630299",
"0.55852574",
"0.5564892",
"0.5560603",
"0.5560603",
"0.5560603",
"0.5560603",
"0.5516017",
"0.54996145",
"0.549091"... | 0.65525055 | 20 |
Sets the updated_at of this ChannelReturnResponse. | def zB0d(YKHO, zB0d):
YKHO._updated_at = zB0d | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zB0d(YKHO, zB0d: 'datetime'):\n YKHO._attrs['updatedAt'] = zB0d",
"def zB0d(YKHO, zB0d: 'datetime'):\n YKHO._attrs['updatedAt'] = zB0d",
"def zB0d(YKHO, zB0d: 'datetime'):\n YKHO._attrs['updatedAt'] = zB0d",
"def sPBL(YKHO) -> qcWV:\n return qcWV.strptime(YKHO.data['updated_at'], '%Y-%m-%dT%H... | [
"0.68167144",
"0.68167144",
"0.68167144",
"0.6386273",
"0.63290477",
"0.5913079",
"0.5913079",
"0.5913079",
"0.5907891",
"0.5907891",
"0.5907891",
"0.58465546",
"0.58141243",
"0.5764128",
"0.57118255",
"0.5696651",
"0.56540555",
"0.56540555",
"0.5617201",
"0.56079227",
"0.557... | 0.659471 | 12 |
Sets the id of this ChannelReturnResponse. | def id(YKHO, id):
YKHO._id = id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dVGB(YKHO, dVGB):\n YKHO._response_id = dVGB",
"def V_9M(YKHO, id):\n YKHO.data['id'] = id",
"def SxPR(YKHO, SxPR):\n YKHO._rc_response_sets_id = SxPR",
"def ekm0(YKHO, id):\n YKHO._id = id\n return YKHO.callRemote('setID', id)",
"def yrkp(YKHO, yrkp):\n YKHO._response_status_id = yrk... | [
"0.6502312",
"0.62223506",
"0.60702217",
"0.6044452",
"0.603114",
"0.59509647",
"0.587993",
"0.5855515",
"0.58248156",
"0.58248156",
"0.58248156",
"0.58248156",
"0.58248156",
"0.58175635",
"0.5816122",
"0.5767343",
"0.57582766",
"0.57190806",
"0.57190806",
"0.57190806",
"0.57... | 0.0 | -1 |
Sets the customer_comment of this ChannelReturnResponse. | def REFV(YKHO, REFV):
if YKHO.local_vars_configuration.client_side_validation and REFV is not None and (len(REFV) > 4001):
raise ValueError('Invalid value for `customer_comment`, length must be less than or equal to `4001`')
if YKHO.local_vars_configuration.client_side_validation and REFV is not None an... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m3Nh(YKHO, m3Nh):\n if m3Nh is None:\n raise ValueError('Invalid value for `customer`, must not be `None`')\n YKHO._customer = m3Nh",
"def m3Nh(YKHO, m3Nh):\n YKHO._customer = m3Nh",
"def m3Nh(YKHO, m3Nh):\n YKHO._customer = m3Nh",
"def aM_I(YKHO, aM_I):\n YKHO.logger.debug(\"In 'co... | [
"0.6495456",
"0.6428357",
"0.6428357",
"0.64145833",
"0.6283955",
"0.6139833",
"0.6139833",
"0.6139833",
"0.6139833",
"0.6139833",
"0.6139833",
"0.6139833",
"0.6139833",
"0.6139833",
"0.6139833",
"0.60955757",
"0.60955757",
"0.60955757",
"0.60955757",
"0.60454875",
"0.595792"... | 0.77025354 | 0 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, cPvk):
return False
return YKHO.to_dict() == Elif.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
if not isinstance(Elif, cPvk):
return True
return YKHO.to_dict() != Elif.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)",
"def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)",
... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
... | 0.0 | -1 |
Returns a key having "version_number" as its name. | def FmW0(YKHO, pNGv):
return YKHO.dict[str(pNGv)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rkfH(YKHO, DpZH):\n if YKHO._generic_only:\n return a2AD\n else:\n YKHO.check_version_exists(DpZH)\n return DpZH",
"def V7mA(YKHO) -> str:\n return qe4Y.get(YKHO, 'kms_key_version_name')",
"def z6lS(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'key_version')",
"def OIiq(YK... | [
"0.79072005",
"0.7538215",
"0.72869647",
"0.6993121",
"0.6867462",
"0.6741636",
"0.6617988",
"0.64844215",
"0.6324501",
"0.63166916",
"0.6312392",
"0.6282849",
"0.62616396",
"0.6225029",
"0.62159294",
"0.61619556",
"0.6107714",
"0.6094575",
"0.609297",
"0.6043491",
"0.6031558... | 0.88732076 | 0 |
get train_loader and test_loader | def rqQU(YKHO):
return (YKHO.train_loader, YKHO.test_loader) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RuZU(Tuqy):\n global train_loader, valid_loader\n GPtr = PSrQ\n dTqX = []\n Zicv = []\n qqqI = Tuqy == 'train'\n if GPtr.train.use_augmentation:\n dTqX.extend([Ymkf.Resize((GPtr.data.image_size, GPtr.data.image_size)), qFO5()])\n dTqX.extend([Ymkf.Resize((GPtr.data.image_size, GPtr.... | [
"0.77100426",
"0.76738524",
"0.76040876",
"0.7384658",
"0.7363785",
"0.72057515",
"0.71765244",
"0.71735513",
"0.7090515",
"0.6992934",
"0.6848907",
"0.6813013",
"0.67717856",
"0.6755532",
"0.6742161",
"0.6734493",
"0.67340785",
"0.67340785",
"0.67340785",
"0.67340785",
"0.67... | 0.90590286 | 0 |
Create the number of hidden units in each layer if the HYPER_PARAMS.layer_sizes_scale_factor > 0 then it will use a "decay" mechanism to define the number of units in each layer. Otherwise, parameters.HYPER_PARAMS.hidden_units will be used asis. | def PBQt():
Lh1F = list(map(int, SGPK.HYPER_PARAMS.hidden_units.split(',')))
if SGPK.HYPER_PARAMS.layer_sizes_scale_factor > 0:
N7LA = Lh1F[0]
SnCn = SGPK.HYPER_PARAMS.layer_sizes_scale_factor
CLda = SGPK.HYPER_PARAMS.num_layers
Lh1F = [max(2, int(N7LA * SnCn ** YRbF)) for YRbF i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vArt(YKHO):\n return iter([YKHO.delta_h * vC9B for vC9B in range(int(YKHO.h / YKHO.delta_h) - 1)])",
"def g6fV(YKHO):\n return YKHO.hidden_layer_size",
"def DbxN(cstO, H2OP, OwvU, ECsK=None):\n global HiddenUnit\n rEli = []\n if ECsK is None:\n ECsK = []\n elif isinstance(ECsK, int... | [
"0.6702567",
"0.64026886",
"0.6389147",
"0.6316787",
"0.6186162",
"0.61597973",
"0.6137765",
"0.6114793",
"0.61083937",
"0.6039899",
"0.6028688",
"0.6006836",
"0.59841716",
"0.5980518",
"0.5980518",
"0.5961161",
"0.5955761",
"0.5954433",
"0.5954433",
"0.5954433",
"0.5954433",... | 0.7744325 | 0 |
Connects node to topics for publish tau and extract dynamic parameters. | def iXC1(YKHO):
UpQR = sQC5.Time(0)
while not sQC5.is_shutdown():
YKHO.mutex.acquire()
GOdN = all(YKHO.reference_flags.values())
if GOdN:
if not YKHO.ready:
YKHO.ni_ref.last_value[0:3] = YKHO.eta1_ref_body.dot + YKHO.speed_ref
YKHO.ni_ref.last_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rUZg(YKHO, Q6kx, rlUa, nPrm={}, D4Td=None, uSz0=None):\n pass",
"def G9dR(YKHO, Q6kx, rlUa, nPrm={}):\n pass",
"def rUZg(YKHO, Q6kx, rlUa, **B2fa):\n rlUa = YKHO.generate_node_topic(Q6kx, rlUa)\n return YKHO.publish_mqtt(rlUa, **B2fa)",
"def FIMM(YKHO):\n sQC5.init_node('DWM1001_Double_Ini... | [
"0.63137764",
"0.6111883",
"0.6041055",
"0.6023848",
"0.59356666",
"0.5801089",
"0.5713184",
"0.56949735",
"0.5686285",
"0.5680989",
"0.56607276",
"0.5635899",
"0.5633615",
"0.561198",
"0.560544",
"0.55918163",
"0.5556044",
"0.5550037",
"0.5547674",
"0.5534404",
"0.5524704",
... | 0.0 | -1 |
Token ids from Tokenizer vocab | def ZzRC(YKHO, s2mk, b0j5, G8d9):
juz4 = b0j5.convert_tokens_to_ids(s2mk)
Pha6 = juz4 + [0] * (G8d9 - len(juz4))
return Pha6 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def I44O(yAmx, ED_H):\n return [ED_H.get(yzQ0, zxQc) for yzQ0 in yAmx.strip().split()]",
"def _Eet(s2mk, CtWL):\n A07C = []\n for eOtH in s2mk:\n if eOtH in CtWL.tok2id:\n A07C.append(CtWL.tok2id[eOtH])\n else:\n A07C.append(CtWL.tok2id[CtWL.UNK])\n return A07C",
... | [
"0.74453104",
"0.7427918",
"0.72003746",
"0.7193835",
"0.71358985",
"0.7134197",
"0.7128639",
"0.70729506",
"0.70416474",
"0.7035099",
"0.69734365",
"0.69675064",
"0.69156736",
"0.68288344",
"0.6781958",
"0.6779992",
"0.67489445",
"0.6704759",
"0.6686456",
"0.6618584",
"0.661... | 0.7092017 | 7 |
returns true if building is placeable at pos, else false | def CMYd(YKHO, v32L, oeNL):
QOxj, SCLJ = oeNL
r8hN = v32L.mask_full()
nnyg, Yjog = r8hN.shape
if QOxj + Yjog > SyWi or SCLJ + nnyg > SyWi:
return False
for WKvO in range(0, Yjog):
for LVAh in range(0, nnyg):
if r8hN[LVAh, WKvO] == 1:
if YKHO.bmap_id[SCLJ +... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sfPQ(YKHO, oeNL):\n if oeNL in YKHO.tiles:\n return True\n else:\n return False",
"def pHbF(YKHO, hksT):\n Kh7E = [z3yr, eZmG, GscU]\n oyg0 = [YKHO._pos, YKHO._pos + joet(0, 1, 0)]\n for Kwmb in f8_X + [joet(0, 1, 0), joet(0, -1, 0)]:\n oU_z = hksT + Kwmb\n if oU_z ... | [
"0.69598156",
"0.69421697",
"0.6878886",
"0.685575",
"0.67933196",
"0.67796236",
"0.6751459",
"0.6727748",
"0.6723218",
"0.66230464",
"0.66161877",
"0.66148025",
"0.66137296",
"0.6579545",
"0.65682584",
"0.65298176",
"0.6518893",
"0.651155",
"0.65102607",
"0.64806265",
"0.647... | 0.716373 | 0 |
Calculate the great circle distance between two points on the earth (specified in decimal degrees) | def GeVo(GgQG, igSk, tk0B, TGuP):
GgQG, igSk, tk0B, TGuP = map(Y_1E, [GgQG, igSk, tk0B, TGuP])
H91H = tk0B - GgQG
n_9K = TGuP - igSk
jzdc = YUNn(n_9K / 2) ** 2 + YhSR(igSk) * YhSR(TGuP) * YUNn(H91H / 2) ** 2
Z9rn = 2 * P099(PZyS(jzdc))
Mkmy = 6371
return Z9rn * Mkmy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KzuF(rCSf, hjIX, FNKk, T3JP):\n hjIX = r8hN.radians(hjIX)\n rCSf = r8hN.radians(rCSf)\n T3JP = r8hN.radians(T3JP)\n FNKk = r8hN.radians(FNKk)\n Csk6 = 2 * 6367.45 * r8hN.asin(r8hN.sqrt(GeVo(FNKk - rCSf) + r8hN.cos(rCSf) * r8hN.cos(FNKk) * GeVo(T3JP - hjIX)))\n return Csk6",
"def T97B(GgQG, ... | [
"0.8146062",
"0.78638023",
"0.7632202",
"0.7604661",
"0.7595527",
"0.75950956",
"0.7592873",
"0.757031",
"0.7564319",
"0.75560796",
"0.75300086",
"0.7516366",
"0.7493803",
"0.746558",
"0.7450864",
"0.7432722",
"0.7391925",
"0.7355981",
"0.7347892",
"0.7330029",
"0.73271745",
... | 0.0 | -1 |
Take file path as string; return text as string. Takes a string that is a file path, opens the file, and turns the file's contents as one string of text. | def OcVp():
qaEx = HwRy.argv[1]
hObn = open(qaEx, 'r')
a05k = hObn.read()
return a05k | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OcVp(qaEx):\n OwN0 = open(qaEx)\n LFxn = OwN0.read()\n OwN0.close()\n return LFxn",
"def OcVp(qaEx):\n OwN0 = open(qaEx)\n SFw1 = OwN0.read()\n return SFw1",
"def cHUw(VqRE):\n assert JC7M(VqRE), 'filepath does not exist'\n with open(VqRE, 'r', encoding='utf-8') as eHNT:\n ... | [
"0.80703825",
"0.8048914",
"0.8015025",
"0.79924196",
"0.7922689",
"0.7865267",
"0.780107",
"0.768055",
"0.76599956",
"0.76151365",
"0.76083297",
"0.75717854",
"0.7540605",
"0.7529533",
"0.75045687",
"0.75038856",
"0.7500699",
"0.74132633",
"0.7371461",
"0.7362938",
"0.732943... | 0.0 | -1 |
Gives a list of bounding boxes containg faces in the given image | def kf76(YKHO, VXjJ, gwAu):
y_PJ = YKHO.mark_detector.extract_cnn_facebox(VXjJ, gwAu)
SeBd = []
for RpU_ in y_PJ:
yKcO = (RpU_[0], RpU_[1])
Os4s = (RpU_[2], RpU_[3])
FlUN = rh6a.setStartEnd(yKcO, Os4s)
SeBd.append(FlUN)
return SeBd | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bu7Y(LNo8):\n for RpU_ in LNo8.faces:\n JA3n(LNo8, RpU_)\n return LNo8",
"def kf76(YKHO, LNo8, gwAu):\n usx6, WfCS, bGrB = LNo8.shape\n JOUx = []\n SeBd = []\n YKHO.face_net.setInput(XC5k.dnn.blobFromImage(LNo8, 1.0, (300, 300), (104.0, 177.0, 123.0), False, False))\n SVFM = YKHO.... | [
"0.8085123",
"0.7980415",
"0.79564846",
"0.7850688",
"0.7760176",
"0.77158284",
"0.76029724",
"0.760038",
"0.75674653",
"0.7496214",
"0.74177533",
"0.74149823",
"0.7411155",
"0.727319",
"0.72631246",
"0.7260427",
"0.7202723",
"0.7196494",
"0.7174461",
"0.7151705",
"0.71304613... | 0.7947982 | 3 |
Define and evaluate the limit state functions that may be computationally expensive | def NeUM(q7In):
_Iob = -((q7In[:, 0] ** 2 + 4) * (q7In[:, 1] - 1) / 20 - oyIN.sin(5 * q7In[:, 0] / 2) - 2)
return _Iob.reshape(_Iob.shape[0], -1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OcoU(YKHO, QTBn):\n \"\"\"Description:\n Find all of q-values of current state, and choose the action \n with the hight q-value as optimal policy\n \"\"\"\n ' YOUR CODE HERE '\n Xz9E = YKHO.getLegalActions(QTBn)\n XeOP = None\n Qabx = gnPz.Counter()\n if len(Xz9E) == 0:\n retu... | [
"0.60537744",
"0.5802507",
"0.57057804",
"0.570512",
"0.5688094",
"0.5668728",
"0.56588054",
"0.5634615",
"0.5567792",
"0.55573106",
"0.5543706",
"0.5541091",
"0.5526567",
"0.55199945",
"0.5508761",
"0.55018425",
"0.5476276",
"0.5455228",
"0.5455228",
"0.5450378",
"0.5447722"... | 0.0 | -1 |
Incorporate any useable fields in this record, and if it gives us a new true wind value, return it. | def SZFh(YKHO, AIu6):
if not AIu6:
return None
if not type(AIu6) is OGVa:
G9jH.warning('Improper format record: %s', AIu6)
return None
QdZT = False
for vXX7 in AIu6.fields:
if vXX7 in YKHO.course_fields:
YKHO.course_val = AIu6.fields[vXX7]
elif vXX7 in... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QV5D(YKHO):\n return YKHO.data.wind_meta",
"def r_1b(YKHO):\n return YKHO._wind",
"def HDrg(YKHO):\n return YKHO.__wred",
"def HDrg(YKHO):\n return YKHO.__wred",
"def HDrg(YKHO):\n return YKHO.__wred",
"def gpeE(YKHO):\n if YKHO.comp_specs['proposed capacity'] != Sil8:\n YKHO... | [
"0.5335317",
"0.52828914",
"0.52291673",
"0.52291673",
"0.52291673",
"0.51694596",
"0.49782172",
"0.49209738",
"0.49078652",
"0.48731014",
"0.48608252",
"0.48421362",
"0.48118705",
"0.4774674",
"0.47562644",
"0.47545525",
"0.4751787",
"0.4737342",
"0.47335005",
"0.472048",
"0... | 0.6221449 | 0 |
Return a dataset for testing the FieldLoader class. | def DuiZ(YKHO, WZrJ='train'):
llEa = YKHO.load_hdf5_file_SetLoader(WZrJ)
RiKd = YKHO.dataset[WZrJ]
ofuq = YKHO.data_fields[WZrJ]
return (llEa, RiKd, ofuq) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def h7tC(YKHO):\n mxwL = YKHO.get_test_DataLoader_info()\n mWFP = mxwL['name']\n D5gV = mxwL['task']\n h_xa = mxwL['data_dir']\n TzSL = mxwL['hdf5_file']\n zQKy = pVAc(mWFP, D5gV, h_xa, TzSL)\n return (zQKy, YKHO.dataset, YKHO.data_fields)",
"def Bgt5(YKHO, WZrJ='train', Jyyj='data'):\n p... | [
"0.78888327",
"0.7603223",
"0.73044086",
"0.72188866",
"0.7082152",
"0.7069775",
"0.69244474",
"0.6873793",
"0.6871499",
"0.68013656",
"0.6789716",
"0.6701403",
"0.67012626",
"0.66969347",
"0.65904266",
"0.6579232",
"0.6568345",
"0.65629375",
"0.6548726",
"0.65372163",
"0.652... | 0.6751672 | 11 |
Return a dataset for testing the FieldLoader class. | def h7tC(YKHO):
mxwL = YKHO.get_test_DataLoader_info()
mWFP = mxwL['name']
D5gV = mxwL['task']
h_xa = mxwL['data_dir']
TzSL = mxwL['hdf5_file']
zQKy = pVAc(mWFP, D5gV, h_xa, TzSL)
return (zQKy, YKHO.dataset, YKHO.data_fields) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Bgt5(YKHO, WZrJ='train', Jyyj='data'):\n pmON = '/{set_name}/{field}'.format(set_name=WZrJ, field=Jyyj)\n bPR1 = YKHO.load_hdf5_file_FieldLoader(pmON)\n RiKd = YKHO.dataset[WZrJ]\n return (bPR1, RiKd)",
"def M_QP(YKHO) -> pVAc:\n return YKHO._custom_data_loader()",
"def M_QP(YKHO) -> ht2j.ut... | [
"0.76030594",
"0.73050845",
"0.7218909",
"0.70823777",
"0.707011",
"0.6923885",
"0.6874425",
"0.68715763",
"0.680077",
"0.67888016",
"0.6751399",
"0.670098",
"0.67003936",
"0.66979426",
"0.6590271",
"0.6578667",
"0.65673375",
"0.6562923",
"0.6548202",
"0.65370923",
"0.6524199... | 0.7889583 | 0 |
Gets the type of this Scheduler. | def type(YKHO):
return YKHO._type | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zwpN(YKHO):\n return YKHO._schedule_type",
"def FRul(YKHO):\n return YKHO._TYPE",
"def FRul(YKHO):\n return YKHO._stype",
"def FRul(YKHO):\n return YKHO._type",
"def FRul(YKHO):\n return YKHO._type",
"def FRul(YKHO):\n return YKHO._type_obj",
"def type(YKHO):\n return YKHO.__ty... | [
"0.8195117",
"0.71118546",
"0.71044254",
"0.70377827",
"0.70377827",
"0.7005059",
"0.698471",
"0.6981658",
"0.6981658",
"0.6939486",
"0.69035137",
"0.6889826",
"0.68877524",
"0.68441236",
"0.6835996",
"0.6827982",
"0.6810675",
"0.68067247",
"0.6794449",
"0.67832",
"0.6767924"... | 0.69478595 | 27 |
Sets the type of this Scheduler. | def type(YKHO, type):
if type is None:
raise ValueError('Invalid value for `type`, must not be `None`')
YKHO._type = type | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zwpN(YKHO, zwpN):\n YKHO._schedule_type = zwpN",
"def zwpN(YKHO, zwpN):\n YKHO._schedule_type = zwpN",
"def TG_K(YKHO, type):\n YKHO.type = type",
"def TG_K(YKHO, type):\n YKHO.type = type",
"def TG_K(YKHO, type):\n YKHO._type = type",
"def PHUN(YKHO, type):\n YKHO.execution_type = ... | [
"0.80057335",
"0.80057335",
"0.75507337",
"0.75507337",
"0.7483278",
"0.7115609",
"0.7019111",
"0.70181847",
"0.69953287",
"0.6979536",
"0.6979536",
"0.695165",
"0.695165",
"0.69398105",
"0.69398105",
"0.69398105",
"0.69398105",
"0.69398105",
"0.69398105",
"0.69398105",
"0.69... | 0.6880235 | 43 |
Return the partial density of states | def Swfa(YKHO, vBWh=False):
VT38 = YKHO.get_array('partial_dos')
if vBWh:
return VT38
_0VL, _mSQ = YKHO._get_equivalent_atom_list(with_weights=True)
VT38 = [YLnl * upAO for upAO, YLnl in zip(_mSQ, VT38[_0VL])]
return VT38 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def InLe(YKHO):\n return YKHO.count_ones() / float(YKHO.xspan * YKHO.yspan)",
"def Vibm(YKHO, S22D):\n return ITsA.freerotor_densityofstates(S22D, YKHO.frequencies, 1 if YKHO.linear else 0)",
"def Vibm(YKHO, S22D):\n pass",
"def Vibm(YKHO, S22D):\n oZuG = oyIN.zeros(len(S22D), oyIN.float64)\n ... | [
"0.6990002",
"0.68468076",
"0.6540495",
"0.64641935",
"0.64567894",
"0.6429281",
"0.6427787",
"0.6427787",
"0.6427787",
"0.6426647",
"0.6402431",
"0.6341133",
"0.633433",
"0.6293956",
"0.62743706",
"0.62305063",
"0.61604667",
"0.6110642",
"0.6062941",
"0.6012021",
"0.5964267"... | 0.0 | -1 |
Returns true if no imaginary modes (shown as negative frequency DOS) | def kVYE(YKHO, yJiH=1e-06):
import numpy as oyIN
y52s = YKHO.get_dos()
QTg7 = YKHO.get_frequencies()
lvju = oyIN.ma.masked_less(QTg7, 0.0).mask
rER9 = oyIN.ma.masked_greater(QTg7, 0.0).mask
if lvju.any() == False:
return True
if rER9.any() == False:
return False
GmFp = -o... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JkRs(YKHO):\n return YKHO._real.is_zero()",
"def JkRs(YKHO) -> bool:\n return YKHO < 0",
"def gKHD(YKHO):\n return YKHO._imag.is_zero()",
"def knLE(YKHO):\n return YKHO.fibres is None",
"def Witr(YKHO):\n return YKHO._real.is_zero() and YKHO._imag.is_zero()",
"def Rb_1(YKHO):\n retu... | [
"0.7435767",
"0.7236454",
"0.70290595",
"0.677156",
"0.6736559",
"0.64063257",
"0.64053893",
"0.6321965",
"0.6316691",
"0.6256833",
"0.620375",
"0.615895",
"0.61450577",
"0.6060106",
"0.6021838",
"0.60216886",
"0.59767884",
"0.59512895",
"0.5950726",
"0.594923",
"0.5943724",
... | 0.0 | -1 |
Set all parameters of the model to 0 Parameters. layers_dims list, the number of layers of the model and the number of nodes corresponding to each layer Returns parameters a dictionary containing all W and b W1 weight matrix with dimension (layers_dims[1], layers_dims[0]) b1 bias vector, dimension (layers_dims[1], 1) W... | def FgVI(w6du):
SGPK = {}
aPd6 = len(w6du)
for vC9B in range(1, aPd6):
SGPK['W' + str(vC9B)] = oyIN.zeros((w6du[vC9B], w6du[vC9B - 1]))
SGPK['b' + str(vC9B)] = oyIN.zeros((w6du[vC9B], 1))
return SGPK | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FKcf(w6du):\n oyIN.random.seed(3)\n SGPK = {}\n aPd6 = len(w6du)\n for vC9B in range(1, aPd6):\n SGPK['W' + str(vC9B)] = oyIN.random.randn(w6du[vC9B], w6du[vC9B - 1]) * 10\n SGPK['b' + str(vC9B)] = oyIN.zeros((w6du[vC9B], 1))\n return SGPK",
"def K55i(A4Ra, NxFC='0.01'):\n SGP... | [
"0.66994137",
"0.6524211",
"0.6484232",
"0.6440478",
"0.64257056",
"0.63918364",
"0.6384597",
"0.63792133",
"0.6360458",
"0.63285124",
"0.6324615",
"0.6255973",
"0.61910826",
"0.61910826",
"0.61910826",
"0.61248976",
"0.609352",
"0.6068253",
"0.6025813",
"0.6024569",
"0.59612... | 0.80968946 | 0 |
Compute instance mean and variance. | def htF3(WKvO):
return (ht2j.mean(WKvO, dim=(2, 3), keepdim=True), ht2j.var(WKvO, dim=(2, 3), keepdim=True)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xp4O(YKHO):\n bcV4 = T_iO(46, 3000.0, 0.332, 0.616, 2)\n YKHO.assertAlmostEqual(bcV4, 489.07164965)",
"def W2X8(YKHO):\n YKHO._set_statistics()\n return (YKHO.statistics_object.get_mean(), YKHO.statistics_object.get_variance())",
"def JBMS(YKHO):\n return YKHO.vmean",
"def I8JS(YKHO, JBMS=... | [
"0.7042789",
"0.7030097",
"0.684569",
"0.6785732",
"0.6705467",
"0.65460956",
"0.6473726",
"0.6455855",
"0.64296347",
"0.6423424",
"0.64022136",
"0.63945234",
"0.6373781",
"0.6314979",
"0.6271918",
"0.6263915",
"0.62379485",
"0.6202545",
"0.61835915",
"0.6181711",
"0.6178875"... | 0.7274688 | 0 |
RadiationModel() returns a DataFrame of which the size depends on the input. The time resolution for the output is a quarter ("15T") by default but can be changed with the "TimeResolution" parameter. | def FIMM(YKHO, lGE9, n2Q1, Wave=('00:00', '23:45'), G_27='DK', CkYf=False, yK_A='15T'):
YKHO.t0 = lGE9
YKHO.t1 = n2Q1
YKHO.muni_input = G_27
YKHO.norm = CkYf
YKHO.Time = yK_A
YKHO.fc_zones = YKHO._muni_interpreter(YKHO.muni_input)
YKHO.fc_obj = Un7J(YKHO.t0, YKHO.t1, hours=Wave, muni_list=YK... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yRIc(YKHO) -> rLdf.DataFrame:\n Ylbp = YKHO.options.resolution\n tpio = YKHO.options.dimension\n v6s6 = (oyIN.arange(Ylbp) + 1) / Ylbp\n SuXl = [YKHO.sample(x=WKvO).as_datarow(tpio) for WKvO in v6s6]\n NKcn = ['m_tokens', 'n_types', 'alpha', 'gamma']\n if tpio is not None:\n NKcn += ['... | [
"0.566602",
"0.55865186",
"0.55567604",
"0.55247164",
"0.5453741",
"0.54424953",
"0.5365442",
"0.5311694",
"0.5263339",
"0.52498996",
"0.5234416",
"0.52332824",
"0.52237743",
"0.52104026",
"0.5177271",
"0.515588",
"0.5075149",
"0.50734264",
"0.5069924",
"0.5063935",
"0.506119... | 0.0 | -1 |
Returns the total number of documents, DELETED OR UNDELETED, in this reader. | def l6oH(YKHO):
return YKHO.index.collection.count() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Xfk6(YKHO):\n return YKHO.total_number_of_documents",
"def WPSX(YKHO):\n return YKHO.index.collection.count()",
"def nHKE(YKHO):\n UHFx = 0\n for bGrB, tTpl in YKHO.contents.items():\n UHFx = UHFx + tTpl.count_deleted()\n return UHFx",
"def rYGI(YKHO):\n return YKHO.client.scard(... | [
"0.7694914",
"0.7510874",
"0.7456718",
"0.74369824",
"0.7400394",
"0.7376454",
"0.7318653",
"0.70306486",
"0.6979551",
"0.69476104",
"0.6910956",
"0.68551785",
"0.6845533",
"0.67889684",
"0.67852783",
"0.67809534",
"0.675962",
"0.6714335",
"0.6646297",
"0.66243535",
"0.661896... | 0.7317203 | 7 |
Returns the total number of UNDELETED documents in this reader. | def WPSX(YKHO):
return YKHO.index.collection.count() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nHKE(YKHO):\n UHFx = 0\n for bGrB, tTpl in YKHO.contents.items():\n UHFx = UHFx + tTpl.count_deleted()\n return UHFx",
"def nHKE(YKHO):\n UHFx = 0\n for mWFP, tTpl in YKHO.contents.iteritems():\n UHFx = UHFx + tTpl.count_deleted()\n return UHFx",
"def nHKE(YKHO):\n if YKH... | [
"0.774052",
"0.7685259",
"0.7200083",
"0.71623373",
"0.6974863",
"0.69508916",
"0.68825483",
"0.6874336",
"0.67723584",
"0.65331846",
"0.6532005",
"0.64764756",
"0.64342594",
"0.6419995",
"0.64097446",
"0.639157",
"0.63764316",
"0.6351271",
"0.63395876",
"0.62947416",
"0.6248... | 0.65769726 | 9 |
This method is used to convert a given pd.Series object into a list | def lvo1(dy_H: pd.Series) -> x1iM:
Lrf7 = []
for ZfUD in dy_H:
Lrf7.append(ZfUD)
return Lrf7 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mFWN(YKHO):\n return nASC.register(CwDs.Series.to_list)(YKHO)",
"def _Jar(dy_H: Union[TimeSeries, Sequence[TimeSeries]]) -> bdIy[YXTX]:\n return [dy_H] if not isinstance(dy_H, bdIy) else dy_H",
"def tFUn(YKHO, nPrm: pd.Series) -> rLdf.Series:\n ...",
"def pfsR(jQ3Z: pandas.DataFrame) -> list:\n ... | [
"0.8163235",
"0.8084659",
"0.67696327",
"0.6688192",
"0.6478346",
"0.6332372",
"0.63315487",
"0.63113815",
"0.6291304",
"0.6289916",
"0.6243208",
"0.6221836",
"0.62096226",
"0.6204572",
"0.6184458",
"0.6167135",
"0.6163509",
"0.61454004",
"0.61151385",
"0.6111333",
"0.608589"... | 0.80512226 | 2 |
Fetches a block from IOTA with an address. Since IOTA does not support exactly blocks, what is fetched is all the transactions of an address which are then sorted based on their timestamps and then concatenated in one block. | def ps_8(YKHO, UTX6: str, RKD7: Logger) -> n3Kt:
def HkQT(UTX6: str) -> iu5r['Transaction']:
nuPx = YKHO._iota_api.adapter
return Ry1B(nuPx, addresses=[UTX6])
def ZKHl(a1PO: 'Transaction') -> str:
return a1PO.signature_message_fragment.as_string()
if not UTX6:
raise QkRS.In... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def q9Sn(YKHO, UTX6: str, fsbt: bool=False) -> None:\n try:\n YKHO._address_index[UTX6] = YKHO._connector.fetch(UTX6, YKHO._logger)\n YKHO._logger.info(f'Fetched block with address {UTX6}')\n except Exception as e:\n YKHO._logger.error(msg=f'Could not fetch block with address {UTX6}. {re... | [
"0.63075423",
"0.6130317",
"0.60563076",
"0.59326637",
"0.5903281",
"0.590054",
"0.5893151",
"0.5886603",
"0.58753556",
"0.5863715",
"0.57891095",
"0.57841134",
"0.57321405",
"0.57314",
"0.5723248",
"0.5698044",
"0.56945467",
"0.56176645",
"0.55606705",
"0.5559356",
"0.550265... | 0.7177153 | 0 |
Set a Qvalue for a given (observation, action) pair | def O1R3(YKHO, H5ew: tuple, BWXx: float):
KCHu, jzdc = H5ew
if not isinstance(KCHu, YKHO.observation_space) or not isinstance(jzdc, YKHO.action_space):
raise KeyError
YKHO.store.setdefault(KCHu, dict())[jzdc] = BWXx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dbP_(YKHO, QTBn, XeOP, BWXx):\n YKHO.value_function[lCim(QTBn, XeOP)] = BWXx",
"def aTzy(YKHO, QTBn, XeOP, vOGg):\n YKHO.qvals[QTBn, XeOP] = 0",
"def T8ck(YKHO, rNYq, XeOP):\n return YKHO[rNYq, XeOP]",
"def iDe0(YKHO, QTBn, XeOP, iMVu, vOGg, lK91):\n YKHO.q[tuple(QTBn), XeOP] = iMVu + YKHO.al... | [
"0.7207835",
"0.7086363",
"0.7083719",
"0.70424414",
"0.6665662",
"0.65934515",
"0.64996874",
"0.64944345",
"0.6423975",
"0.6421755",
"0.6347077",
"0.63399047",
"0.633607",
"0.6334427",
"0.63263094",
"0.6285045",
"0.6201128",
"0.6188193",
"0.6188193",
"0.6188193",
"0.6188193"... | 0.5894809 | 47 |
Read an image into a numpy array given the path of a H5 file. | def zaFx(Xw5U, *qIxc, **B2fa):
rjCV = yK6n.File(Xw5U, 'a')
LNo8 = rjCV['data']['image']
return LNo8 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ueki(pmON: Union[Path, str]) -> oyIN.ndarray:\n return jBy1.imread(str(pmON))",
"def ZAQi(pmON):\n with g5R2.File(pmON, 'r') as CVOT:\n nPrm = oyIN.array(CVOT.get('data'))\n return nPrm",
"def B_59(qaEx):\n aF0O = g5R2.File(qaEx, 'r')\n SzJA = list(aF0O.keys())[0]\n nPrm = list... | [
"0.7554185",
"0.75005555",
"0.73265314",
"0.73265314",
"0.72788644",
"0.7277284",
"0.72648257",
"0.72648257",
"0.7202138",
"0.71711314",
"0.7156384",
"0.7148705",
"0.713533",
"0.71084225",
"0.7078591",
"0.701594",
"0.69675314",
"0.6962734",
"0.69086313",
"0.6829945",
"0.67954... | 0.74092174 | 2 |
Returns the hostname and record type of the record. | def ccae(xwUm):
QePW = Ogrw.parse(xwUm)
cVnI = QePW.q.qname
ayrW = str(cVnI)
if ayrW[-1] == '.':
ayrW = ayrW[:-1]
UaAr = aMoq.get(QePW.q.qtype)
return (ayrW, UaAr) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EruN(YKHO, x6aZ):\n if x6aZ.type == 1:\n return {'type': 'a', 'ipv4': GGmw.inet_ntoa(x6aZ.rdata), 'hostname': x6aZ.name}\n elif x6aZ.type == 28:\n return {'type': 'aaaa', 'ipv6': GGmw.inet_ntop(GGmw.AF_INET6, x6aZ.rdata), 'hostname': x6aZ.name}\n elif x6aZ.type == 5:\n return {'ty... | [
"0.7288703",
"0.638681",
"0.6237808",
"0.6174709",
"0.59828585",
"0.5811655",
"0.5811644",
"0.5750304",
"0.5713665",
"0.56564605",
"0.56298727",
"0.5611728",
"0.5604755",
"0.5574632",
"0.5544346",
"0.552044",
"0.551721",
"0.54946756",
"0.54894084",
"0.54869735",
"0.54860216",... | 0.57737625 | 7 |
Area of the shape. | def f0tD(YKHO) -> float:
raise NotImplementedError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def f0tD(YKHO):\n return YKHO._ned_shape.area",
"def f0tD(YKHO):\n return YKHO.length * YKHO.length",
"def f0tD(YKHO):\n f0tD = YKHO.__size * YKHO.__size\n return f0tD",
"def f0tD(YKHO):\n f0tD = YKHO.__size * YKHO.__size\n return f0tD",
"def f0tD(YKHO):\n f0tD = YKHO.__length * YKHO._... | [
"0.859661",
"0.8539494",
"0.8486993",
"0.84419984",
"0.8439382",
"0.8387308",
"0.83254606",
"0.8314752",
"0.8312584",
"0.8241274",
"0.8237015",
"0.8232725",
"0.821546",
"0.821546",
"0.821546",
"0.8212535",
"0.8212535",
"0.8206858",
"0.8191822",
"0.8187152",
"0.8187152",
"0.... | 0.853149 | 2 |
Check if the point is inside the shape. Support semantics like `if point in shape` | def FYXB(YKHO, AU8u: Point2D) -> bool:
raise NotImplementedError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def p4_Z(wF0t, raMf, Y6Km, qMXf, iH7q, RS0L):\n return Y6Km <= wF0t < Y6Km + iH7q and qMXf <= raMf < qMXf + RS0L",
"def lnQW(rack: float, BB4A: float) -> bool:\n if rack <= 1:\n return False\n AU8u = LBWB.geometry.Point(rack, BB4A)\n return QibD.contains(AU8u) or QibD.intersects(AU8u)",
"def... | [
"0.7572516",
"0.75540507",
"0.7464582",
"0.7464582",
"0.74356055",
"0.74341583",
"0.73613477",
"0.73446983",
"0.732574",
"0.732574",
"0.72910684",
"0.72736067",
"0.721901",
"0.7183408",
"0.7174966",
"0.7172073",
"0.7092216",
"0.7086525",
"0.7081146",
"0.7063076",
"0.70347816"... | 0.6834352 | 40 |
Implementation for Gaussian blur to reduce noise and detail in the image | def jUpx(YwkQ, M6vu=3):
return XC5k.GaussianBlur(YwkQ, (M6vu, M6vu), 0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xsYF(YKHO, VXjJ):\n return XC5k.GaussianBlur(VXjJ, (YKHO.kernel_size, YKHO.kernel_size), 0)",
"def IgYM(YKHO, VXjJ, Ot1W=3):\n return XC5k.GaussianBlur(VXjJ, (Ot1W, Ot1W), 0)",
"def BKdC(HPR0):\n VXjJ = oyIN.array(HPR0)\n kX19 = 1.5\n BqFm = XC5k.GaussianBlur(VXjJ, (11, 11), kX19)\n retur... | [
"0.81383604",
"0.81237864",
"0.7887736",
"0.7797448",
"0.77877295",
"0.7773531",
"0.77326",
"0.77160615",
"0.77160615",
"0.77160615",
"0.77160615",
"0.77160615",
"0.77160615",
"0.77160615",
"0.77160615",
"0.77160615",
"0.77160615",
"0.77160615",
"0.77160615",
"0.77160615",
"0... | 0.6984415 | 54 |
Asks user to specify a city, month, and day to analyze. | def RxGd():
print("Hello! Let's explore some US bikeshare data!")
while True:
j5sA = input('Would you like to see data for Chicago, New York City or Washington?')
if j5sA.lower() in OerS:
break
print('ERROR: City does not match. Please try again.')
while True:
x0e... | {
"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.6670955",
"0.65355206",
"0.64598334",
"0.6373697",
"0.63487226",
"0.6310236",
"0.6287051",
"0.6259993",
"0.62314963",
"0.62125754",
"0.62053525",
"0.61813915",
"0.6171331",
"0.6169096",
"0.61588687",
"0.6158631",
"0.6153347",
"0.6144922",
"0.6131542",
"0.6105515",
"0.61029... | 0.0 | -1 |
Loads data for the specified city and filters by month and day if applicable. | def UlWi(j5sA, x0eS='all', CjKC='all'):
jQ3Z = rLdf.read_csv(OerS[j5sA.lower()]).rename(columns={'Unnamed: 0': 'Trip Id'})
WfCS = jQ3Z.columns
jQ3Z['Start Time'] = rLdf.to_datetime(jQ3Z['Start Time'])
jQ3Z['Month'] = jQ3Z['Start Time'].dt.month
jQ3Z['Day of Week'] = jQ3Z['Start Time'].dt.dayofweek
... | {
"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.81320685",
"0.8108889",
"0.8042514",
"0.80090284",
"0.80071104",
"0.79991937",
"0.7998333",
"0.7988789",
"0.797905",
"0.79737365",
"0.79610896",
"0.7956163",
"0.7947432",
"0.79463065",
"0.7908287",
"0.7908229",
"0.7904569",
"0.7900715",
"0.78930074",
"0.7889219",
"0.788254... | 0.8045821 | 2 |
Displays statistics on the most frequent times of travel. | def dWJR(jQ3Z):
print('\nCalculating The Most Frequent Times of Travel...\n')
SWox = ITS7.time()
p06G = jQ3Z[['Month', 'Start Time']].groupby('Month').count()['Start Time']
FY04 = p06G.idxmax()
u2wg = p06G.max()
print('Most common month was {} with {} trips.'.format(Pevp[FY04], u2wg))
p06G =... | {
"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.8023522",
"0.802221",
"0.7914353",
"0.7826378",
"0.7821697",
"0.78140223",
"0.7765606",
"0.7739828",
"0.7735833",
"0.7733764",
"0.7686237",
"0.76675326",
"0.7651101",
"0.7644171",
"0.7639292",
"0.7636152",
"0.76248395",
"0.76227194",
"0.7611663",
"0.7599656",
"0.75825727",... | 0.7194641 | 71 |
Displays statistics on the most popular stations and trip. | def Huc_(jQ3Z):
print('\nCalculating The Most Popular Stations and Trip...\n')
SWox = ITS7.time()
p06G = jQ3Z[['Start Station', 'Start Time']].groupby('Start Station').count()['Start Time']
jo6B = p06G.idxmax()
e7j6 = p06G.max()
print('Most common start station was {} with {} trips.'.format(jo6B... | {
"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.7815998",
"0.7661799",
"0.755378",
"0.74918276",
"0.74751854",
"0.7446441",
"0.7429881",
"0.74239737",
"0.7417978",
"0.74006975",
"0.73876286",
"0.7385986",
"0.7365314",
"0.73597723",
"0.7356932",
"0.7355265",
"0.7352331",
"0.7351879",
"0.73507756",
"0.734247",
"0.734072",... | 0.0 | -1 |
Displays statistics on the total and average trip duration. | def kDMA(jQ3Z):
print('\nCalculating Trip Duration...\n')
SWox = ITS7.time()
wEf2 = jQ3Z['Trip Duration'].sum() / 3600
print('Total trip duration was {:.2f} hours'.format(wEf2))
wEf2 = jQ3Z['Trip Duration'].mean() / 60
print('Average trip duration was {:.2f} minutes'.format(wEf2))
print('\nT... | {
"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.8144002",
"0.8025936",
"0.80051756",
"0.7950414",
"0.7938244",
"0.7932019",
"0.7927543",
"0.79160506",
"0.7915316",
"0.79089457",
"0.79064983",
"0.7901538",
"0.7892409",
"0.7890379",
"0.7887529",
"0.78859615",
"0.78849727",
"0.7883412",
"0.78750104",
"0.7869431",
"0.786734... | 0.78604645 | 25 |
Creates a new nest operator. The set of keys is initially empty. If the map or entries operator is invoked before any key functions are registered, the nest operator simply returns the input array. | def FIMM(YKHO):
YKHO._keys = []
YKHO._sortKeys = [] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def J_Es():\n return oRi_(J_Es)",
"def acay(JfyU):\n\n def h3Xc(cRc2, *qIxc, **B2fa):\n return ZylS.nest.map_structure(lambda WKvO: JfyU(WKvO, *qIxc, **B2fa), cRc2)\n return h3Xc",
"def w8z1():\n return g760.defaultdict(w8z1)",
"def ygOU(C25Z: PatternStructure):\n T4Wy = list(range(len(... | [
"0.50510037",
"0.5038567",
"0.4854392",
"0.48375788",
"0.47468472",
"0.4714622",
"0.4705582",
"0.47014457",
"0.46549824",
"0.4628407",
"0.46255538",
"0.46242553",
"0.45791712",
"0.45502764",
"0.4549578",
"0.44959244",
"0.4480521",
"0.44716427",
"0.44619203",
"0.44552702",
"0.... | 0.0 | -1 |
Given a full Learner and Team population, where each Team points to two unique Learners, randomly add existing Learners to each Team until that Team reaches its full complement. | def gdb_(YKHO):
for dZPi in YKHO.team_pop:
while len(dZPi.learners) < dZPi.max_size:
sT9b = [vC9B for vC9B in YKHO.learner_pop if vC9B not in dZPi.learners]
if len(sT9b) == 0:
break
else:
n7Md = Acvy(sT9b)
dZPi.addLearner(n7... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XTPd(YKHO):\n XOOk = ajWY(0, wnMz.ATOMIC_ACTION_RANGE)\n pHXX = ajWY(0, wnMz.ATOMIC_ACTION_RANGE)\n while XOOk == pHXX:\n pHXX = ajWY(0, wnMz.ATOMIC_ACTION_RANGE)\n jtyf = GDlB(action=XOOk)\n V70B = GDlB(action=pHXX)\n dZPi = r2Kd()\n dZPi.addLearner(jtyf)\n dZPi.addLearner(V70B)... | [
"0.6198892",
"0.60099727",
"0.5909377",
"0.5602736",
"0.5578461",
"0.5570028",
"0.55162257",
"0.54663473",
"0.54535234",
"0.5446338",
"0.5419894",
"0.5384661",
"0.53839433",
"0.537948",
"0.53772473",
"0.53582704",
"0.53372985",
"0.53203225",
"0.5301221",
"0.5300238",
"0.52959... | 0.71697813 | 0 |
We use heapq class to implement Heaps in Python. By default Min Heap is implemented by this class. But we multiply each value by 1 so that we can use it as MaxHeap. | def UZcu(YKHO, mLGw: int) -> None:
wuLw, D4CG = YKHO.heaps
_eVy.heappush(D4CG, -_eVy.heappushpop(wuLw, -mLGw))
if len(D4CG) > len(wuLw):
wEf2 = _eVy.heappop(D4CG)
_eVy.heappush(wuLw, -wEf2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO):\n YKHO.max_heap = []\n YKHO.min_heap = []",
"def FIMM(YKHO):\n YKHO.heaps = ([], [])",
"def yryI(YKHO):\n for oeNL in range(YKHO.size // 2, 0, -1):\n YKHO.min_heapify(oeNL)",
"def FIMM(YKHO):\n YKHO.lower_q = []\n YKHO.higher_q = []",
"def ENpy(YKHO):\n for bGrB ... | [
"0.76983464",
"0.7662596",
"0.74752456",
"0.7363196",
"0.7337437",
"0.7319882",
"0.72922516",
"0.72666025",
"0.7229037",
"0.7225333",
"0.72153676",
"0.7207476",
"0.7174666",
"0.71282834",
"0.704995",
"0.70068634",
"0.7000654",
"0.6952775",
"0.68923765",
"0.6872462",
"0.684775... | 0.0 | -1 |
Method to delete the failing tests from the schema.yml. | def c28N(YKHO, a9K4: Path, ZGE9: str, IeMX: Dict[str, List[str]]):
hGN5 = PwzS(a9K4, preserve_yaml_order=YKHO._sugar_config.config.get('preserve_yaml_order', False))
for C3ST in hGN5['models']:
if C3ST['name'] == ZGE9:
for iVRZ in C3ST.get('columns', []):
u350 = IeMX.get(iVRZ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tBIc(YKHO):\n with P4t4.app_context():\n NCls = P4t4.db.get_db()\n DpUl = NCls.cursor()\n with P4t4.open_resource('sql/drop_tests.sql', mode='r') as eHNT:\n DpUl.execute(eHNT.read())\n NCls.commit()\n DpUl.close()\n NCls.close()",
"def tBIc(YKHO):\n ... | [
"0.7157708",
"0.6840837",
"0.6840837",
"0.6744383",
"0.67398924",
"0.6644065",
"0.663067",
"0.6602651",
"0.66019326",
"0.65678084",
"0.65678084",
"0.65678084",
"0.65678084",
"0.6532619",
"0.65185887",
"0.6497793",
"0.6494446",
"0.6491216",
"0.64835113",
"0.648288",
"0.6480997... | 0.7389425 | 0 |
Return the other player, for a player PLAYER numbered 0 or 1. >>> other(0) 1 >>> other(1) 0 | def Elif(oyg0):
return 1 - oyg0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QzY_(Emd4, oyg0):\n return 0 if oyg0 == 1 else 1",
"def wNmq(Emd4, oyg0):\n return 0 if oyg0 == 1 else 1",
"def wNmq(YKHO, oyg0):\n if oyg0 == YKHO.__opponent:\n return YKHO.__pid\n else:\n return YKHO.__opponent",
"def t7fg(YKHO):\n return eHpk.Engine.game_manager.players[(Y... | [
"0.81847143",
"0.81327176",
"0.79256344",
"0.7875795",
"0.7709813",
"0.7093842",
"0.68455774",
"0.6804346",
"0.66201985",
"0.66201985",
"0.6579255",
"0.6476013",
"0.64561236",
"0.64236355",
"0.6390737",
"0.63760537",
"0.6363144",
"0.6363144",
"0.6335515",
"0.62314063",
"0.619... | 0.780577 | 5 |
Applies the logistic function to x, elementwise. | def m1Hg(EcVT):
return 1 / (1 + oyIN.exp(-EcVT)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def D7Jk(YKHO, yzQ0, IYWQ):\n jzdc = oyIN.dot(yzQ0.T, IYWQ)\n return 1 / (1 + oyIN.exp(-jzdc))",
"def D7Jk(YKHO, EcVT, yzQ0):\n Oa1e = 1 / (1 + oyIN.exp(-EcVT.dot(yzQ0)))\n return Oa1e",
"def KVH6(YKHO, WKvO):\n CzSl = YKHO.dvector(WKvO)\n KeL5 = YKHO.linear(CzSl)\n return KeL5",
"def D7... | [
"0.7002704",
"0.6978957",
"0.6883872",
"0.68210745",
"0.6803985",
"0.6706345",
"0.66907454",
"0.6664395",
"0.6663363",
"0.66488755",
"0.664373",
"0.660833",
"0.6597647",
"0.6596353",
"0.6534404",
"0.64707106",
"0.64558506",
"0.64442515",
"0.64267933",
"0.6374905",
"0.6363094"... | 0.0 | -1 |
Set up each webpage with a header and navigation bar. | def tV4x(YKHO, nUCy, wPdp, UXqs=None, leAC=None, tHLe=None, gktE=None, qGCh=False):
FqQF = FHax.open_html(web_dir=YKHO.webdir, base_url=YKHO.base_url, html_page=nUCy, label=UXqs)
FqQF.make_header(approximant=tHLe)
if nUCy == 'home' or nUCy == 'home.html':
FqQF.make_navbar(links=wPdp, samples_path=YK... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NtcA(YKHO):\n if YKHO.add_to_existing:\n YKHO.add_existing_data()\n YKHO.make_home_pages()\n YKHO.make_1d_histogram_pages()\n YKHO.make_corner_pages()\n YKHO.make_config_pages()\n if YKHO.make_comparison:\n YKHO.make_comparison_pages()\n if YKHO.make_interactive:\n YKH... | [
"0.6627888",
"0.6465586",
"0.62752324",
"0.6114537",
"0.6103888",
"0.606285",
"0.60445887",
"0.6036751",
"0.60337174",
"0.6021009",
"0.5930741",
"0.5924869",
"0.5913862",
"0.58483374",
"0.5833003",
"0.58251595",
"0.57794666",
"0.57769567",
"0.57743686",
"0.5753638",
"0.575228... | 0.6815308 | 0 |
Make a navbar for the homepage | def Niy2(YKHO):
wPdp = ['home', ['Result Pages', YKHO._result_page_links()], 'Version']
if len(YKHO.samples) > 1:
wPdp[1][1] += ['Comparison']
if YKHO.publication:
wPdp.insert(2, 'Publication')
if YKHO.gwdata is not None:
wPdp.append(['Detchar', [YRbF for YRbF in YKHO.gwdata.keys... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DGYk():\n return TvZl('home.html')",
"def C_QL():\n return TvZl('home/index.html', title='Bem vindo!')",
"def d6pt():\n return TvZl('index.html', nav=eynd, title='Home Page', year=qcWV.now().year)",
"def kZiy():\n return TvZl('index.html', title='Home Page', year=qcWV.now().year)",
"def kZi... | [
"0.736893",
"0.67783135",
"0.6750848",
"0.66524625",
"0.6623326",
"0.6588633",
"0.6580005",
"0.6562279",
"0.6562279",
"0.6562279",
"0.6562279",
"0.6562279",
"0.6562279",
"0.6562279",
"0.6562279",
"0.6562279",
"0.6562279",
"0.653496",
"0.6521001",
"0.6503073",
"0.64983183",
... | 0.71998024 | 1 |
Make a navbar for the result page homepage | def Ip17(YKHO):
wPdp = {YRbF: ['1d Histograms', [{'Custom': YRbF}, {'All': YRbF}]] for YRbF in YKHO.labels}
for mLGw, UXqs in enumerate(YKHO.labels):
for r845 in YKHO.categorize_parameters(YKHO.samples[UXqs].keys()):
r845 = [r845[0], [{G1Hx: UXqs} for G1Hx in r845[1]]]
wPdp[UXqs]... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Niy2(YKHO):\n wPdp = ['home', ['Result Pages', YKHO._result_page_links()], 'Version']\n if len(YKHO.samples) > 1:\n wPdp[1][1] += ['Comparison']\n if YKHO.publication:\n wPdp.insert(2, 'Publication')\n if YKHO.gwdata is not None:\n wPdp.append(['Detchar', [YRbF for YRbF in YKHO... | [
"0.80170983",
"0.7169193",
"0.6690814",
"0.6587678",
"0.6552421",
"0.6529632",
"0.65201473",
"0.65188295",
"0.64830226",
"0.6469217",
"0.64192796",
"0.64133656",
"0.6382045",
"0.6367651",
"0.63470757",
"0.63470757",
"0.63470757",
"0.63470757",
"0.63470757",
"0.63470757",
"0.6... | 0.6568194 | 4 |
The ``.git`` directory for the current project. | def mD2v(mfIW):
return mfIW('git rev-parse --git-dir') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WGYS() -> BKva:\n Bicb = BKva.dirname(BKva.realpath(xAKo))\n zTfP = BKva.dirname(BKva.dirname(Bicb))\n return zTfP",
"def Kl_y(J_Es):\n return Hy7s.path.join(J_Es, '.git')",
"def zTfP():\n return Yn3K.check_output(['git', 'rev-parse', '--git-dir']).decode().strip()",
"def J1KI():\n pmON... | [
"0.83023816",
"0.8015751",
"0.7522234",
"0.74142706",
"0.70690876",
"0.7059461",
"0.70178574",
"0.6930033",
"0.68814874",
"0.6830864",
"0.67350674",
"0.6637658",
"0.64931214",
"0.64922035",
"0.6490604",
"0.64626306",
"0.646249",
"0.64517623",
"0.6420175",
"0.63963944",
"0.638... | 0.66105205 | 12 |
Creates a model, given the type of model and the output method. Adds the output layer with activation corresponding to the output type after the constructed model. This allows for easy switching between binary and multiclass classification, and prevents us from having to implement two types of each model. The model is ... | def LQs7(DMw4: str, zi3C: Tuple[int, ...], hlel='binary', QxIo=True) -> bdPE.Model:
if DMw4 in _vtG:
g4y1, o4Jx = _vtG[DMw4](zi3C)
else:
raise ValueError(f'Model type "{DMw4}" not supported')
if hlel == 'binary':
YDYE = fhcK.Dense(1, activation='sigmoid')(o4Jx)
N77f = 'binary... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n8cN(Gzv5, vNJY, EDoJ):\n C3ST = ileL([l6ZH(vNJY, input_dim=Gzv5), MroH('relu'), lARV(0.2), l6ZH(vNJY), MroH('relu'), lARV(0.2), l6ZH(EDoJ, activation='softmax')])\n C3ST.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy'])\n return C3ST",
"def pPQk():\n rvDU = QLgM.Ef... | [
"0.6704527",
"0.66973925",
"0.66615975",
"0.66041964",
"0.6572064",
"0.6570199",
"0.6549063",
"0.647823",
"0.6476947",
"0.6459976",
"0.6454561",
"0.6407263",
"0.64054805",
"0.638561",
"0.63830036",
"0.63781667",
"0.63442785",
"0.6344052",
"0.6315975",
"0.6313631",
"0.63134235... | 0.71340376 | 0 |
The function ``is_admin`` detects whether the calling process is running with administrator/superuser privileges. It works crossplatform on either Windows NT systems or Unixbased systems. | def _Kb1():
if Hy7s.name == 'nt':
try:
Hy7s.listdir(Hy7s.sep.join([Hy7s.environ.get('SystemRoot', 'C:\\windows'), 'temp']))
except:
return False
else:
return True
elif 'SUDO_USER' in Hy7s.environ and Hy7s.geteuid() == 0:
return True
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _Kb1():\n if Zglz(IpOu):\n return uGYL.shell32.IsUserAnAdmin()\n return Hy7s.getuid() == 0",
"def _Kb1():\n m_IJ = Hy7s.name\n if m_IJ == 'nt':\n try:\n return aVQH()\n except Exception:\n raise EnvironmentError('Cannot check admin privileges')\n elif... | [
"0.8821815",
"0.8732962",
"0.8634657",
"0.80681646",
"0.78383905",
"0.7656703",
"0.75744766",
"0.7562517",
"0.75570256",
"0.74586576",
"0.74525267",
"0.74387234",
"0.74240386",
"0.74240386",
"0.74135554",
"0.73537236",
"0.7341056",
"0.73286927",
"0.7305158",
"0.7260963",
"0.7... | 0.79539204 | 4 |
Set `password_hash` only when `password` is not set. | def J4uR(Emd4, jxGD, *qIxc, **B2fa):
assert 'password' in B2fa
assert 'passwd_hash' in B2fa
if B2fa.get('password'):
B2fa.pop('passwd_hash')
return super()._create(jxGD, *qIxc, **B2fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def L4rx(YKHO, jTXt):\n NTfD = B8ni.gensalt()\n YKHO.password_hash = B8ni.hashpw(jTXt.encode(), NTfD)",
"def qzFd(YKHO, jTXt):\n YKHO.password_hash = vT87(jTXt)",
"def G3s8(YKHO, jTXt):\n YKHO.password = YKHO.hash_password(jTXt)",
"def PnS7(YKHO, jTXt, Nzyw=False):\n if Nzyw or YKHO.hashed:\n ... | [
"0.7201298",
"0.7091728",
"0.70867187",
"0.6961345",
"0.69605434",
"0.69136447",
"0.6894837",
"0.6894837",
"0.68855447",
"0.6867788",
"0.68643236",
"0.6862712",
"0.68401206",
"0.68401206",
"0.68401206",
"0.68401206",
"0.67581147",
"0.6730123",
"0.6710391",
"0.6706543",
"0.668... | 0.0 | -1 |
If the input URL contains a port number, strip it out | def MNKb(zFiD):
_cS9 = zFiD.split(' ')
dVss = _cS9[0]
IBRk = '\n'
if dVss.endswith('jpg') or dVss.endswith('.jpeg'):
Ux0P = str(qxeD.uuid4()) + '.jpg'
RMAL = '/usr/bin/wget -q -O /var/www/html/img/' + Ux0P + ' ' + dVss
RKD7(RMAL)
Hy7s.system(RMAL)
TMZH = '/usr/bin... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def orcT():\n assert gmoQ('http://www.example.com:/') == 'http://www.example.com/'",
"def Aggu():\n assert gmoQ('http://www.example.com:80/bar.html') == 'http://www.example.com/bar.html'\n assert gmoQ('HTTPS://example.com:443/abc/') == 'https://example.com/abc'",
"def Nlxd(bD7m):\n lpha = list(NoPH... | [
"0.7776715",
"0.7397051",
"0.6689824",
"0.6589313",
"0.650951",
"0.650275",
"0.6461937",
"0.6428155",
"0.64266",
"0.6361706",
"0.6282323",
"0.62341475",
"0.61968756",
"0.6188919",
"0.6155203",
"0.6127684",
"0.61132604",
"0.60064256",
"0.59795815",
"0.5977992",
"0.5977227",
... | 0.0 | -1 |
Transformer blocks which includes multihead attention layer and mlp block | def FIMM(YKHO, hC9O, lWPh, Y3Wb, hr1G=0.1, eUcT=1e-12):
super(T44s, YKHO).__init__()
YKHO.attention = vKQ5(num_heads=hC9O, key_dim=lWPh, dropout=hr1G)
YKHO.norm_attention = T0Ce(epsilon=eUcT)
YKHO.mlp = MQOM(Y3Wb, hr1G)
YKHO.norm_mlp = T0Ce(epsilon=eUcT) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gKD2(YKHO, _IM9, Yfm6, v1wX, SUd8=False, iexi=None, pt4o=32, _9ty=1, nqfV=5, LLg9=10, dZoc=3, Rdrh=0, tIjl=0.2, WtCM=0, AUZ9=0.005, _299=0.005, M00I=0.0005, SwZx=False, NlU1=50, chVH=0, iV0M=False, q2d0=40, FCaV=20, mCXC='concat', VDDT=1, kHrY=1, YDYE='gelu', Xc7p='gelu', K7Z0=False, xP7B=1, tnmE=False, slSf=F... | [
"0.6663586",
"0.6597379",
"0.64268494",
"0.6360674",
"0.6338788",
"0.6257444",
"0.6235589",
"0.6209039",
"0.60610014",
"0.59759337",
"0.59740186",
"0.59430027",
"0.590821",
"0.5900392",
"0.58956826",
"0.5895034",
"0.58770245",
"0.58639365",
"0.5794944",
"0.5788988",
"0.576384... | 0.6992421 | 0 |
Commit the current local SQLAlchemy session (created with L{db_session_localize} on this widget) and remove/close the session, making the global session visible to this widget and descendant widgets again. You might want to do self.db_session.expire() after this to make any changes to your local session visible in the ... | def O8YB(YKHO):
YKHO.db_session.commit()
YKHO.session.worm_localized.remove(YKHO.db_session)
del YKHO.db_session
YKHO.db_session.expire_all() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eKO4(YKHO):\n YKHO.db_session.rollback()\n YKHO.session.worm_localized.remove(YKHO.db_session)\n del YKHO.db_session",
"def ESiG(YKHO):\n if YKHO.db_window:\n YKHO.db_window.destroy()\n YKHO.destroy()",
"def jSYO(YKHO):\n YKHO.getSession().commit()",
"def _YD7(YKHO):\n if YKHO... | [
"0.67239785",
"0.66214174",
"0.64808667",
"0.64619935",
"0.63480055",
"0.6337384",
"0.6296969",
"0.6253922",
"0.6190622",
"0.612898",
"0.6086176",
"0.6084393",
"0.6043479",
"0.598818",
"0.59869117",
"0.5958185",
"0.59485453",
"0.5934197",
"0.5917074",
"0.5917074",
"0.5917074"... | 0.78256214 | 0 |
Rollback the current local SQLAlchemy session (created with L{db_session_localize} on this widget) and remove/close the session, making the global session visible to this widget and descendant widgets again. | def eKO4(YKHO):
YKHO.db_session.rollback()
YKHO.session.worm_localized.remove(YKHO.db_session)
del YKHO.db_session | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def O8YB(YKHO):\n YKHO.db_session.commit()\n YKHO.session.worm_localized.remove(YKHO.db_session)\n del YKHO.db_session\n YKHO.db_session.expire_all()",
"def HuIG(YKHO):\n if YKHO.__session is not None:\n YKHO._rollback()\n YKHO.__session.close()",
"def ESiG(YKHO):\n if YKHO.db_w... | [
"0.69830817",
"0.6831465",
"0.6580956",
"0.63987786",
"0.63065374",
"0.6255354",
"0.6255354",
"0.6255354",
"0.62003577",
"0.619857",
"0.61350036",
"0.60096955",
"0.6001342",
"0.5989135",
"0.59747803",
"0.59709346",
"0.59528714",
"0.5927543",
"0.5882605",
"0.58783174",
"0.5874... | 0.78382546 | 0 |
Context manager for a temporary directory. This is similar to tempfile.TemporaryDirectory in python>=3.2. | def d3K9():
mWFP = gbPf.mkdtemp()
try:
yield mWFP
finally:
RDuA.rmtree(mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bvw3():\n AGPF = gbPf.mkdtemp()\n try:\n yield AGPF\n finally:\n RDuA.rmtree(AGPF)",
"def U9hK():\n\n class ctx(object):\n\n def DMw_(YKHO):\n YKHO.prevdir = Hy7s.getcwd()\n YKHO.tempdir = gbPf.mkdtemp()\n Hy7s.chdir(YKHO.tempdir)\n ... | [
"0.8151143",
"0.80606616",
"0.79753256",
"0.79536724",
"0.79371685",
"0.79356587",
"0.79355663",
"0.7912876",
"0.78649515",
"0.78183824",
"0.7785393",
"0.7777123",
"0.77747816",
"0.7705706",
"0.7695398",
"0.7673213",
"0.7660842",
"0.76580966",
"0.7650998",
"0.7628625",
"0.761... | 0.8148666 | 1 |
Create a SageMaker ``TensorFlowModel`` object that can be deployed to an ``Endpoint``. | def LQs7(YKHO, vNVA=None, LmAn=None, Rthh=ACuk, UdWu=None):
LmAn = LmAn or YKHO.role
if UdWu == 'tensorflow-serving' or YKHO._script_mode_enabled():
return YKHO._create_tfs_model(role=LmAn, vpc_config_override=Rthh)
return YKHO._create_default_model(model_server_workers=vNVA, role=LmAn, vpc_config_o... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eLpg(YKHO) -> ZylS.keras.models.Model:\n raise NotImplementedError()",
"def yAxP(YKHO):\n YKHO._model = ZylS.estimator.Estimator(model_fn=YKHO.model_fn, model_dir=YKHO.model_dir, config=YKHO._config, params=YKHO._params)",
"def LQs7():\n wvEv = j1Jz.ArgumentParser()\n wvEv.add_argument('--DISC_... | [
"0.6819635",
"0.65104693",
"0.6498425",
"0.64926046",
"0.64838105",
"0.6425016",
"0.63994265",
"0.63273954",
"0.63156533",
"0.6306389",
"0.61792016",
"0.6173705",
"0.6173564",
"0.61605144",
"0.6146582",
"0.6115818",
"0.607953",
"0.6077646",
"0.60186505",
"0.6012362",
"0.59610... | 0.7037425 | 0 |
Returns True if row and col are valid values | def WY9P(YKHO, rdlD, fvDH):
return (rdlD, fvDH) not in YKHO.marks and rdlD <= Wl2e and (rdlD > 0) and (fvDH in cTuJ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SGVO(YKHO, rdlD, fvDH) -> bool:\n if rdlD >= 0 and fvDH >= 0 and (rdlD < YKHO.row) and (fvDH < YKHO.col) and (YKHO.array[rdlD][fvDH] == -1):\n return True\n return False",
"def SGVO(YKHO):\n if YKHO.get_row() != -1 and YKHO.get_column() != -1:\n return True\n else:\n return F... | [
"0.8091675",
"0.80864257",
"0.7924023",
"0.78902096",
"0.7659951",
"0.75877786",
"0.7548906",
"0.75047547",
"0.7499336",
"0.74562085",
"0.74394834",
"0.7436682",
"0.7368682",
"0.7337169",
"0.73290545",
"0.73265445",
"0.7304924",
"0.7300693",
"0.7293138",
"0.7280832",
"0.72412... | 0.8213445 | 0 |
Returns true if a tie exists on this board | def vSA1(YKHO):
return len(YKHO.marks) == 9 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KVX8(iBIi):\n return 0 not in iBIi[0]",
"def e6hU(YKHO):\n ROpF = YKHO.board.shape\n if oyIN.count_nonzero(YKHO.board) == ROpF[0] * ROpF[1]:\n oyg0 = 0\n return True\n else:\n return False",
"def czdq(YKHO):\n for LVAh in range(YKHO.size_y):\n for WKvO in range(YK... | [
"0.7543741",
"0.74421966",
"0.7174385",
"0.7158319",
"0.70751244",
"0.6951705",
"0.6935137",
"0.6933638",
"0.68399227",
"0.6839235",
"0.67778605",
"0.66985226",
"0.6692007",
"0.6671597",
"0.6668072",
"0.66296566",
"0.6591076",
"0.655537",
"0.65299284",
"0.6523104",
"0.6508229... | 0.75141263 | 1 |
poll_git.filter_dict Utility method to remove all keys from a dict except those in the key set | def HwUi(weiJ, YWxY):
for G1Hx in set(weiJ.keys()) - YWxY:
weiJ.pop(G1Hx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KEYS(eJh7):\n return {G1Hx: Ty9i for G1Hx, Ty9i in eJh7.items() if '_pass' not in G1Hx}",
"def KEYS(eJh7):\n return dict(((G1Hx, Ty9i) for G1Hx, Ty9i in eJh7.items() if '_pass' not in G1Hx))",
"def guY0(cmPJ):\n return {G1Hx: Ty9i for G1Hx, Ty9i in cmPJ.items() if Ty9i}",
"def guY0(fil5):\n f... | [
"0.7563569",
"0.7440057",
"0.7419116",
"0.7418322",
"0.740843",
"0.73695225",
"0.72462183",
"0.72018117",
"0.71871424",
"0.7120856",
"0.7070811",
"0.70674783",
"0.70619494",
"0.70096827",
"0.69330645",
"0.69295365",
"0.6927854",
"0.6914809",
"0.69089794",
"0.6890785",
"0.6881... | 0.81835246 | 0 |
Converts the education experience to a single int representing the minimum qualifications held. This is one higher than the EducationLevel values (0 = no education, 1 = certification, etc.) | def kIGv(YKHO) -> int:
if len(YKHO._history_edus) == 0:
return 0
return int(max([tTpl.education_lvl for tTpl in YKHO._history_edus])) + 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Cf5B(YKHO) -> int:\n return YKHO._base_experience",
"def kiKI(YKHO):\n return YKHO.experiences.min_weight",
"def XXf2(YKHO, hLWA, mWFP):\n RCCf = YKHO.university\n GYmR = [bXx8 for bXx8 in mWFP if bXx8 != '']\n fdMZ = []\n for bXx8 in GYmR:\n o9ng = []\n for feRu in RCCf['Na... | [
"0.6091574",
"0.60766613",
"0.5663413",
"0.5663034",
"0.5594252",
"0.5542864",
"0.5542864",
"0.54906315",
"0.5470742",
"0.54238975",
"0.5421171",
"0.53634584",
"0.5359417",
"0.5359417",
"0.5327927",
"0.5322198",
"0.53167486",
"0.5293654",
"0.5291187",
"0.5285667",
"0.5284425"... | 0.7296643 | 0 |
A string to represent the age of this post. | def ZJe_(YKHO) -> str:
RocC = JRYC.now() - YKHO.created_timestamp
if RocC.days >= 548:
return f'about {RocC.days / 365:.0f} years'
elif RocC.days >= 345:
return f'about a year'
elif RocC.days > 45:
return f'about {RocC.days / 30:.0f} months'
elif RocC.days > 24:
retur... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZJe_(YKHO):\n ulWt, X_bn, Sm0u = PQNy(YKHO.birthdate)\n if ulWt:\n return '%d year%s old' % (ulWt, 's' if ulWt > 1 else '')\n elif X_bn:\n return '%d month%s old' % (X_bn, 's' if X_bn > 1 else '')\n else:\n return '%d day%s old' % (Sm0u, 's' if Sm0u > 1 else '')",
"def ZJe_(Y... | [
"0.82187986",
"0.77554965",
"0.7717731",
"0.7594224",
"0.7593773",
"0.7579443",
"0.75256914",
"0.7522066",
"0.7522066",
"0.7522066",
"0.75171536",
"0.7515912",
"0.74829715",
"0.74518067",
"0.74498564",
"0.7447325",
"0.7446756",
"0.73713535",
"0.7241897",
"0.7241897",
"0.71139... | 0.8177297 | 1 |
Return the index of the blank square in a given state | def W8jM(YKHO, QTBn):
return QTBn.index(0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def a0dL(YKHO, QTBn):\n for YRbF in range(3):\n for r845 in range(3):\n if QTBn[YRbF][r845] == 0:\n return (YRbF, r845)",
"def lwiA(QTBn):\n kGOI, nhBs, AugJ, NMo4, a5GE = QTBn\n xASv, H2v2, TVTK, bGrB, bGrB, bGrB = T8ck.shape\n LVAh = int(H2v2 / 2 + kGOI / fIaK - 1)\... | [
"0.7701521",
"0.72728777",
"0.66417044",
"0.6527599",
"0.6459278",
"0.64067525",
"0.63600284",
"0.6277902",
"0.6268305",
"0.62539375",
"0.6250342",
"0.6234354",
"0.62124133",
"0.6211223",
"0.61981434",
"0.61808527",
"0.6180443",
"0.61688066",
"0.6149172",
"0.61204535",
"0.610... | 0.8688786 | 0 |