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 |
|---|---|---|---|---|---|---|
Test delete request that lacks authorization header | def e2sU(YKHO):
from espresso import db
from espresso import Restaurant
mWFP = 'Restaurant Pandemic Plaza'
db.session.add(Restaurant(name=mWFP, creator='test-user@gmail.com'))
db.session.commit()
_hkX = YKHO.test_client.delete(YKHO.API_BASE + '/1', headers={})
YKHO.assertEqual(_hkX.status_co... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KMi9(YKHO):\n bD7m = gxEw('file')\n nPrm = {}\n geh0 = YKHO.client.delete(bD7m, nPrm)\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_401_UNAUTHORIZED)",
"def xD4r(YKHO):\n if not YKHO.url:\n return\n geh0 = YKHO.client.delete(YKHO.url, {}, format='json')\n YKHO.assertIn(geh0.statu... | [
"0.82418334",
"0.8100495",
"0.76601547",
"0.7654358",
"0.7626185",
"0.7605876",
"0.7579169",
"0.7563034",
"0.7486684",
"0.7393692",
"0.73798585",
"0.7345264",
"0.7324629",
"0.7307584",
"0.7272983",
"0.7248154",
"0.72391975",
"0.7234803",
"0.7226264",
"0.7216723",
"0.7209334",... | 0.68173075 | 52 |
this test is only to call tearDown for last | def Q4lQ(YKHO):
YKHO.lasttest = True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tBIc(YKHO):\n pass",
"def tBIc(YKHO):\n pass",
"def tBIc(YKHO):\n pass",
"def tBIc(YKHO):\n pass",
"def tBIc(YKHO):\n pass",
"def tBIc(YKHO):\n pass",
"def tBIc(YKHO):\n pass",
"def tBIc(YKHO):\n pass",
"def tBIc(YKHO):\n pass",
"def tBIc(YKHO):\n pass",
"def t... | [
"0.8973465",
"0.89305085",
"0.89072907",
"0.89072907",
"0.89072907",
"0.8894844",
"0.8894844",
"0.8894844",
"0.8894844",
"0.8894844",
"0.8867175",
"0.8859265",
"0.8859265",
"0.8859265",
"0.8859265",
"0.8859265",
"0.8859265",
"0.8859265",
"0.8859265",
"0.8859265",
"0.8859265",... | 0.0 | -1 |
Get the specific config key | def NMoC(YKHO, VTsS: str, HyJ9: Any=None) -> ImMB:
gIbD = VTsS.split('.')
dfHy = len(gIbD)
if dfHy > 1:
Aofo = None
ewCu = 1
for UVwN in gIbD:
if ewCu == 1:
Aofo = YKHO._data.get(UVwN, {})
elif ewCu < dfHy:
Aofo = Aofo.get(UVwN,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Dn9U(YKHO, H5ew):\n if H5ew in YKHO.conf:\n return YKHO.conf[H5ew]\n else:\n return None",
"def tgzD(YKHO, H5ew):\n return getattr(YKHO.args, 'conf.{}'.format(H5ew))",
"def NMoC(YKHO, H5ew):\n return YKHO.config.get(H5ew)",
"def egFI(YKHO, H5ew):\n return YKHO.config[H5ew]",
... | [
"0.8074716",
"0.7811012",
"0.768878",
"0.7523581",
"0.7507415",
"0.7426547",
"0.7290503",
"0.72611684",
"0.7176533",
"0.7147605",
"0.7061338",
"0.70091444",
"0.70052725",
"0.69857496",
"0.6959535",
"0.68893516",
"0.6847201",
"0.6782263",
"0.6777762",
"0.67684025",
"0.67622083... | 0.0 | -1 |
converts scipy sparse matrix to pytorch sparse matrix | def aRIu(BvD3):
if not H4yH.isspmatrix_coo(BvD3):
BvD3 = BvD3.tocoo()
jNOo = oyIN.vstack((BvD3.row, BvD3.col)).transpose()
hkxX = BvD3.data
ROpF = BvD3.shape
xGZp = ht2j.sparse.FloatTensor(ht2j.LongTensor(jNOo.T), ht2j.FloatTensor(hkxX), ht2j.Size(ROpF))
return xGZp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FXf_(On0F):\n _0VL = ht2j.from_numpy(oyIN.vstack((On0F.row, On0F.col)).astype(oyIN.int64))\n hkxX = ht2j.from_numpy(On0F.data)\n ROpF = ht2j.Size(On0F.shape)\n return ht2j.sparse.FloatTensor(_0VL, hkxX, ROpF)",
"def LoH6(On0F, qIxc):\n On0F = On0F.tocoo().astype(oyIN.float32)\n _0VL = vhpA(... | [
"0.77674377",
"0.76159346",
"0.74340236",
"0.7406437",
"0.73998225",
"0.73998225",
"0.73998225",
"0.73998225",
"0.73998225",
"0.73998225",
"0.73998225",
"0.73998225",
"0.73998225",
"0.73998225",
"0.73998225",
"0.73998225",
"0.73998225",
"0.73817235",
"0.73600703",
"0.73600703",... | 0.73203886 | 25 |
Compare structural equality This method should be used only when deep structural equality checks are actually needed, and not for all equality checks. Typically the default implmentation of __eq__, which checks pointer equality, is | def ZW_z(YKHO, Elif):
if not isinstance(Elif, HORM):
return False
if YKHO.uuid != Elif.uuid or YKHO.aux_data.keys() != Elif.aux_data.keys():
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif: Any) -> bool:\n return super().__eq__(Elif) and isinstance(Elif, lndC) and (YKHO._valid_struct_metadata().fields == Elif._valid_struct_metadata().fields) and (list(YKHO._valid_struct_metadata().fields.keys()) == list(Elif._valid_struct_metadata().fields.keys()))",
"def cIT_(YKHO, Elif: An... | [
"0.75430477",
"0.68294096",
"0.6763503",
"0.67519224",
"0.6751524",
"0.6710562",
"0.6694197",
"0.6675667",
"0.6648754",
"0.6641783",
"0.6641783",
"0.6641783",
"0.6641783",
"0.6641783",
"0.6624067",
"0.66170835",
"0.6616474",
"0.661255",
"0.6611706",
"0.66116923",
"0.65812916"... | 0.0 | -1 |
Get and cache an example batch of `inputs, labels` for plotting. | def PU1l(YKHO):
Aofo = getattr(YKHO, '_example', None)
if Aofo is None:
Aofo = next(iter(YKHO.train))
YKHO._example = Aofo
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jLgV(YKHO, g4y1):\n return g4y1",
"def kTGD(bySB, Crrw, Wc9F):\n __n6 = ZylS.data.Dataset.from_tensor_slices((dict(bySB), Crrw))\n return __n6.batch(Wc9F)",
"def w3GI(PU1l):\n return (PU1l['input_ids'], PU1l['label_ids'])",
"def w3GI(PU1l):\n return (PU1l['input_ids'], PU1l['label_ids'])",... | [
"0.6369013",
"0.62388337",
"0.6229535",
"0.6229535",
"0.62281907",
"0.61593646",
"0.6137396",
"0.61306596",
"0.61035913",
"0.6094535",
"0.60919744",
"0.607866",
"0.6076077",
"0.6064496",
"0.6051889",
"0.6024423",
"0.59806055",
"0.59686154",
"0.59668773",
"0.59559965",
"0.5954... | 0.0 | -1 |
Return the path to the file holding the currently applied configuration. If no configuration is applied, the file should not exist. | def Nug2(YKHO):
return Hy7s.path.join(YKHO.cloudletdir, 'applied_config') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tK9U(YKHO):\n if YKHO.configfilepath is None:\n return Hy7s.path.join(YKHO.workdir, 'config.txt')\n else:\n return YKHO.configfilepath",
"def Zg0d(YKHO, lqQH=Fm4J):\n return Hy7s.path.join(lqQH, YKHO.filename)",
"def AU2S(YKHO):\n if not YKHO.__args.configfile:\n tO9_ = 'no... | [
"0.75602216",
"0.7283077",
"0.7259527",
"0.7187205",
"0.7181478",
"0.7156296",
"0.70767206",
"0.7043788",
"0.704047",
"0.7016742",
"0.6959687",
"0.69504124",
"0.6939785",
"0.6927641",
"0.69026655",
"0.68227136",
"0.6794443",
"0.6793703",
"0.67565596",
"0.6742962",
"0.6593512"... | 0.7714502 | 0 |
Perform canny edge detection for the given image | def aGAH(LNo8, WTkW=0.33):
Ty9i = oyIN.median(LNo8)
LSh8 = int(max(0, (1.0 - WTkW) * Ty9i))
CN9P = int(min(255, (1.0 + WTkW) * Ty9i))
MvDL = XC5k.Canny(LNo8, LSh8, CN9P)
return MvDL | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AbVF(LNo8, kVwb=100, JgLq=150):\n return XC5k.Canny(LNo8, kVwb, JgLq)",
"def xpef(VXjJ):\n LSh8, CN9P = NJbQ(VXjJ)\n hJ5I = jbYn.GaussianBlur(VXjJ, (7, 7), jbYn.BORDER_DEFAULT)\n iuQA = jbYn.Canny(hJ5I, LSh8, CN9P)\n iuQA = jbYn.dilate(iuQA, VYsY, iterations=1)\n return jbYn.copyTo(VXjJ, iu... | [
"0.86345",
"0.8511235",
"0.82839733",
"0.8151199",
"0.8103302",
"0.79969984",
"0.7973058",
"0.79687303",
"0.7912679",
"0.7912679",
"0.7912679",
"0.7912679",
"0.7912679",
"0.7912679",
"0.7912679",
"0.7912679",
"0.7912679",
"0.7912679",
"0.7912679",
"0.7912679",
"0.7912679",
... | 0.6974965 | 43 |
true, if the user making the request is a workshop contact, otherwise false | def tvI9(YKHO, YEnM):
CBIr = YKHO.context['request'].user
if not CBIr.is_authenticated:
return False
z39Z = BFpK.objects.get(user=CBIr)
return z39Z in YEnM.contacts.all() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CVrT(YKHO):\n return YKHO.user_type == 'C'",
"def h8ch(YKHO, QePW, YEnM=None):\n CBIr = QePW.user\n if YEnM and type(YEnM) is i9zE:\n return YEnM.is_user_in_sales_contacts_of_client(CBIr) or YEnM.is_user_in_support_contacts_of_client(CBIr)\n return True",
"def oAB_(YKHO, j9Wu, **B2fa):\n... | [
"0.6154161",
"0.6126311",
"0.6123491",
"0.5908577",
"0.5899939",
"0.5810381",
"0.572367",
"0.5705393",
"0.5695254",
"0.5665383",
"0.56634945",
"0.56212705",
"0.56204695",
"0.5615299",
"0.56088257",
"0.56049836",
"0.5589522",
"0.55646783",
"0.55400664",
"0.55267364",
"0.552442... | 0.79111147 | 0 |
Returns the item corresponding to the int w where item[1] is its weight. | def Osrk(list, yzQ0):
TY0P = 0
Yt63 = list[0][1]
while Yt63 < yzQ0:
TY0P += 1
Yt63 += list[TY0P][1]
return list[TY0P] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KsS5(DumB, upAO):\n if not DumB:\n return None\n r8o1 = sum((upAO(ZfUD) for ZfUD in DumB))\n if r8o1 <= 0:\n return None\n Acvy = tuKI.random() * r8o1\n for ZfUD in DumB:\n Acvy -= upAO(ZfUD)\n if Acvy < 0:\n return (ZfUD, upAO(ZfUD) / r8o1)\n return (Du... | [
"0.6808156",
"0.67339885",
"0.65599847",
"0.6547899",
"0.6509515",
"0.6470214",
"0.6464248",
"0.61489886",
"0.6100368",
"0.60713285",
"0.60669535",
"0.5990098",
"0.5945571",
"0.5930912",
"0.5897772",
"0.58686405",
"0.5858001",
"0.5812967",
"0.5809362",
"0.5794877",
"0.5790223... | 0.79470766 | 0 |
FindSmallest element in the tree | def mGx7(YKHO):
qD1g = min(YKHO.values)
DruW = YKHO.tree.findSmallest(YKHO.tree.root)
YKHO.assertEqual(qD1g, DruW) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oJr1(Q6kx):\n if Q6kx.left:\n return UmtR._find_smallest(Q6kx.left)\n else:\n return Q6kx",
"def k9Va(YKHO):\n return YKHO._find_smallest(YKHO.root)",
"def k9Va(Q6kx):\n CL9V = Q6kx.value\n while Q6kx.left is not None:\n Q6kx = Q6kx.left\n CL9V = Q6kx.value\n r... | [
"0.82073605",
"0.8178883",
"0.8110074",
"0.7962785",
"0.7797918",
"0.7655078",
"0.76372546",
"0.76195335",
"0.75676394",
"0.7536055",
"0.750011",
"0.7479726",
"0.74674207",
"0.74401844",
"0.7404642",
"0.7371038",
"0.7350525",
"0.733797",
"0.73188895",
"0.7229432",
"0.7219386"... | 0.7910918 | 4 |
Find the second smallest value | def Q85O(YKHO):
APSU = sorted(YKHO.values)[1]
DruW = YKHO.tree.findSecondSmallest(YKHO.tree.root)
YKHO.assertEquals(APSU, DruW) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def B5um(qwMH):\n iZKJ = oyIN.arange(len(qwMH))\n dMiR = oyIN.argmin(qwMH)\n iZKJ = oyIN.delete(iZKJ, dMiR)\n cNi5 = oyIN.delete(qwMH, dMiR)\n CZPm = min(cNi5)\n choZ = oyIN.argmin(oyIN.abs(qwMH - CZPm))\n return (CZPm, choZ)",
"def ElkK(qwMH):\n N2na = qwMH\n CZPm, choZ = B5um(qwMH)\n... | [
"0.7242769",
"0.68707734",
"0.6814374",
"0.6742284",
"0.66932535",
"0.6680455",
"0.6664402",
"0.665205",
"0.6638381",
"0.66290003",
"0.66219544",
"0.6611311",
"0.6498995",
"0.6492467",
"0.6475887",
"0.6413694",
"0.6391913",
"0.6281708",
"0.6277807",
"0.6277421",
"0.6267607",
... | 0.75088274 | 0 |
declare the new min variable and check if min stack holds values. If it does, we need to compare the current number to be pushed with recent entry in min stack in order to update min value In either case (whether min stack holds values or is empty, append the min value to the min stack and append number to stack) | def _jXH(YKHO, WKvO: int) -> None:
LWLc = WKvO
if YKHO.minStack:
NVTH = YKHO.minStack[-1]
LWLc = min(NVTH, WKvO)
YKHO.minStack.append(LWLc)
YKHO.stack.append(WKvO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO):\n YKHO.stack = []\n YKHO.currentMin = float('-inf')",
"def CtM3(g5mF: MyStack) -> ARKn:\n COjP = ARKn()\n while g5mF.is_empty() is False:\n hv9k = g5mF.pop()\n if COjP.top() is not None and hv9k >= int(COjP.top()):\n COjP.push(hv9k)\n else:\n ... | [
"0.661721",
"0.6556882",
"0.63958097",
"0.63913655",
"0.6233521",
"0.61784446",
"0.61757475",
"0.6139187",
"0.6124339",
"0.6119457",
"0.6111156",
"0.6085982",
"0.6058196",
"0.604469",
"0.59292495",
"0.5923163",
"0.5884398",
"0.58825237",
"0.5871226",
"0.5851434",
"0.5846011",... | 0.68916386 | 0 |
return last element from [] or top element from stack (LIFO) | def tlxW(YKHO) -> int:
return YKHO.stack[-1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tlxW(YKHO) -> object:\n if YKHO.is_empty() == True:\n raise Syp4\n return YKHO.da.get_at_index(YKHO.size() - 1)\n pass",
"def FKg7(YKHO):\n if YKHO.length > 0:\n return YKHO.container.pop()\n else:\n return None",
"def BEuN(YKHO):\n ZfUD = YKHO.stack[-1]\n YKHO.sta... | [
"0.7615601",
"0.75714296",
"0.74301463",
"0.74067",
"0.7336468",
"0.73218465",
"0.72721",
"0.7266203",
"0.7253656",
"0.72334874",
"0.7231203",
"0.7201661",
"0.7200565",
"0.7187911",
"0.71574193",
"0.7145977",
"0.713428",
"0.71179134",
"0.7115027",
"0.7101934",
"0.7098952",
... | 0.0 | -1 |
return last entry from min stack | def d1Ro(YKHO) -> int:
return YKHO.minStack[-1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WlKn(YKHO):\n if YKHO.maxx == []:\n return None\n return YKHO.maxx[-1]",
"def tlxW(YKHO):\n if YKHO.stack == []:\n return None\n return YKHO.stack[-1]",
"def tlxW(YKHO):\n return YKHO.stack[-1]",
"def T7C_(YKHO):\n return YKHO.the_stack[-1]",
"def tlxW(YKHO):\n if YKH... | [
"0.7611403",
"0.74267566",
"0.7364067",
"0.7227407",
"0.71940744",
"0.71912694",
"0.7141873",
"0.7141873",
"0.7141873",
"0.71339905",
"0.71094394",
"0.70984787",
"0.70932937",
"0.7081411",
"0.7036137",
"0.69928306",
"0.6982336",
"0.6974163",
"0.6974163",
"0.69733983",
"0.6946... | 0.7272136 | 3 |
Computes the accuracy for the specified values of k | def Andz(YKHO, o4Jx, x6A0, hz5a=(1,)):
q49w = max(hz5a)
bGrB, nvEb = o4Jx.topk(q49w, 1, True, True)
nvEb = nvEb.t()
gXXc = nvEb.eq(x6A0.view(1, -1).expand_as(nvEb))
Ylbp = []
for G1Hx in hz5a:
j5D8 = (gXXc[:G1Hx].view(-1).float() == 0).nonzero()
Ylbp.append(j5D8)
return Ylbp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bFBL(YKHO, G1Hx=None):\n G1Hx = 1 if G1Hx is None else G1Hx\n smhU = 0\n for xDcj, ANfV in PRqg(zip(YKHO.test_queries, YKHO.results)):\n UTXY = YKHO.correct_answers[xDcj]\n RquP = False\n for SkC9 in ANfV[:G1Hx]:\n if SkC9 in UTXY:\n RquP = True\n ... | [
"0.77260184",
"0.7489935",
"0.7489935",
"0.7489935",
"0.7247535",
"0.72364694",
"0.7115022",
"0.7100411",
"0.70968854",
"0.7088704",
"0.708722",
"0.7086801",
"0.7082005",
"0.7082005",
"0.7077323",
"0.70487505",
"0.70470345",
"0.70419353",
"0.70382833",
"0.70382833",
"0.703819... | 0.0 | -1 |
This function prints and plots the confusion matrix. Normalization can be applied by setting `normalize=True`. | def LwSz(Bcwd, KndY, NkkI=False, leAC='Confusion matrix', iMGt=QrM1.cm.Blues):
if NkkI:
Bcwd = Bcwd.astype('float') / Bcwd.sum(axis=1)[:, oyIN.newaxis]
print('Normalized confusion matrix')
else:
print('Confusion matrix, without normalization')
print(Bcwd)
QrM1.imshow(Bcwd, interp... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LwSz(Bcwd, KndY=[0, 1], NkkI=False, leAC='Confusion matrix', RMso=False):\n if NkkI:\n Bcwd = Bcwd.astype('float') / Bcwd.sum(axis=1)[:, oyIN.newaxis]\n print('Normalized confusion matrix')\n else:\n print('Confusion matrix, without normalization')\n if RMso:\n print(Bcwd)"... | [
"0.8194862",
"0.80949175",
"0.8029915",
"0.8019153",
"0.79941195",
"0.7991258",
"0.7980955",
"0.7976606",
"0.79610753",
"0.79590565",
"0.79378676",
"0.7934962",
"0.7934504",
"0.79313844",
"0.7926313",
"0.7924577",
"0.79241234",
"0.7923211",
"0.7923023",
"0.7921931",
"0.791787... | 0.7847642 | 47 |
Delete this crawler object and properly free the used resources. | def fFx9(YKHO):
try:
YKHO.socket.shutdown(GGmw.SHUT_RDWR)
YKHO.socket.close()
except OSError:
pass
if YKHO.driver:
YKHO.driver.quit()
RRlC = SC2F.glob('linkfinder_tmp*')
for nUeQ in RRlC:
Hy7s.remove(nUeQ)
try:
Hy7s.kill(YKHO.helper_pid, Gaon.SIGKI... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fFx9(YKHO):\n YKHO._cleanup()",
"def fFx9(YKHO):\n YKHO.cleanup()",
"def fFx9(YKHO) -> None:\n YKHO.delete()",
"def fFx9(YKHO):\n RDuA.rmtree('tmp')\n YKHO.quit_browser()",
"def fFx9(YKHO):\n if YKHO.__database_connection:\n YKHO.__database_connection.close()\n YKHO.__da... | [
"0.74714595",
"0.7254336",
"0.7125767",
"0.70617694",
"0.6999953",
"0.6936757",
"0.6928526",
"0.6928526",
"0.6928526",
"0.6928526",
"0.6928526",
"0.6928526",
"0.68960375",
"0.6861052",
"0.6856186",
"0.679702",
"0.67759156",
"0.67566735",
"0.67097104",
"0.6685942",
"0.6665202"... | 0.6820504 | 15 |
test already used email | def zbRl(YKHO):
geh0 = YKHO.client.post('/api/v2/auth/signup', data=qQXR.dumps(DW23[0]), headers=YKHO.admin_headers, content_type='application/json')
YKHO.assertEqual(geh0.status_code, 409)
YKHO.assertIn('user with email already registred', str(geh0.data)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wiRp(YKHO):\n YKHO.signup('Bo', 'Theo', 'Bo_theo5@example.com', 'Bo1995', 'Bo1995')\n im04 = YKHO.signup('Bo', 'Theo', 'Bo_theo5@example.com', 'Bo1995', 'Bo1995')\n YKHO.assertIn(b'Sorry email already exist', im04.data)",
"def eSEi(YKHO, D3lj):\n QePW = YKHO.req_factory.post('unused_url', data={'... | [
"0.76198804",
"0.75595206",
"0.73519176",
"0.7202967",
"0.7082485",
"0.70301807",
"0.7015599",
"0.69065064",
"0.68943477",
"0.68929374",
"0.6863265",
"0.68616337",
"0.6860934",
"0.6860934",
"0.68567973",
"0.6847087",
"0.68324393",
"0.67946994",
"0.6776414",
"0.67558825",
"0.6... | 0.6447767 | 48 |
test resgister invalid email | def S9ak(YKHO):
geh0 = YKHO.client.post('/api/v2/auth/signup', data=qQXR.dumps(DW23[3]), headers=YKHO.admin_headers, content_type='application/json')
YKHO.assertEqual(geh0.status_code, 422)
YKHO.assertIn('invalid email', str(geh0.data)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def N4Bn(YKHO):\n YKHO.assertFalse(xxbx('helloworld'))",
"def NDUF(YKHO):\n pass",
"def R697(YKHO):\n im04 = YKHO.login('Bo_wrong@example.com', 'Bo1995')\n YKHO.assertIn(b'Invalid email! Please try again', im04.data)",
"def hBqO(YKHO):\n CBIr = YKHO.make_user()\n nPrm = {'email': 'bogus'}\n... | [
"0.82027185",
"0.8188234",
"0.80019844",
"0.79532915",
"0.79104507",
"0.78299177",
"0.7778266",
"0.7752785",
"0.7714714",
"0.7679159",
"0.75695974",
"0.75613135",
"0.7557446",
"0.75516695",
"0.7551251",
"0.7528325",
"0.74853534",
"0.7462079",
"0.74602276",
"0.7426714",
"0.741... | 0.73026997 | 29 |
test login invalid email | def ACsd(YKHO):
geh0 = YKHO.client.post('/api/v2/auth/login', data=qQXR.dumps(DW23[5]), content_type='application/json')
YKHO.assertEqual(geh0.status_code, 422)
YKHO.assertIn('invalid credentials', str(geh0.data)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Lrio(YKHO):\n im04 = YKHO.login('wrong@email.com')\n assert im04.status_code in [404]\n assert b'The provided email is invalid' in im04.data",
"def R697(YKHO):\n im04 = YKHO.login('Bo_wrong@example.com', 'Bo1995')\n YKHO.assertIn(b'Invalid email! Please try again', im04.data)",
"def wF13(YKH... | [
"0.8743506",
"0.8687062",
"0.8599527",
"0.8579673",
"0.82863444",
"0.8060929",
"0.80323905",
"0.7924116",
"0.7921799",
"0.7910541",
"0.79017353",
"0.7858385",
"0.78553873",
"0.78442335",
"0.77081645",
"0.75630546",
"0.754606",
"0.7504398",
"0.74717873",
"0.74657243",
"0.74454... | 0.6908862 | 75 |
Tests that events conforming to string queries are returned | def lsEx(YKHO):
YTVa = list(wDWS(QRWf.objects.all(), 'Film'))
YKHO.assertTrue(YKHO.event_film in YTVa)
YKHO.assertFalse(YKHO.event_show1 in YTVa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cvL_(YKHO):\n GPHi = {'q': 'test', 'type': 'show'}\n dixj = OfAU(GPHi)\n YTVa = list(dixj['events'])\n A1r4 = list(dixj['showcase_events'])\n YKHO.assertTrue(YKHO.event_show1 in YTVa)\n YKHO.assertTrue(YKHO.event_show2 in A1r4)\n YKHO.assertFalse(YKHO.event_film in YTVa)",
"def OtwN(YKHO... | [
"0.75579286",
"0.68505645",
"0.6762481",
"0.6658069",
"0.6607486",
"0.6446209",
"0.6434576",
"0.6357096",
"0.632592",
"0.6279772",
"0.62537444",
"0.62406003",
"0.6127644",
"0.6096756",
"0.6066213",
"0.6055026",
"0.6040843",
"0.6012588",
"0.5992469",
"0.59918445",
"0.5982417",... | 0.6837877 | 2 |
Create a mock Hue bridge. | def D72c():
eV_n = FM6F(available=True, allow_unreachable=False, allow_groups=False, api=FM6F(), spec=Hafq.HueBridge)
eV_n.mock_requests = []
eV_n.mock_sensor_responses = MUE7()
async def mock_request(NKcE, pmON, **B2fa):
B2fa['method'] = NKcE
B2fa['path'] = pmON
eV_n.mock_reque... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Trxo(ajET):\n return D72c()",
"async def test_hue_bridge_setup(ajET):\n h2sE = await obd6(ajET, 'hue_bridge.json')\n PhL6, NfW2 = await Mwmd(ajET, h2sE)\n wMDS = await ajET.helpers.entity_registry.async_get_registry()\n JeMb = 'sensor.hue_dimmer_switch_battery'\n FefQ = wMDS.async_get(JeMb)... | [
"0.76612836",
"0.7170115",
"0.7112733",
"0.6501393",
"0.638152",
"0.6303694",
"0.61823136",
"0.60383654",
"0.6035404",
"0.59657604",
"0.5910633",
"0.58577",
"0.5840861",
"0.5806066",
"0.5799553",
"0.5788887",
"0.5722134",
"0.5721093",
"0.57163197",
"0.57156295",
"0.57132155",... | 0.74970704 | 1 |
Generate a sample static React application. | def Xxl4(dJIB):
ejh1 = Hy7s.path.join(dJIB, 'static-react')
if Hy7s.path.isdir(ejh1):
S0MI.error('Error generating sample repo -- directory %s already exists!', ejh1)
HwRy.exit(1)
RDuA.copytree(Hy7s.path.join(YnkN, 'templates', 'static-react'), ejh1)
UF_G(Hy7s.path.join(ejh1, 'sample-app... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LUif():\n P4t4 = L2w0(__name__)\n gCuF = {'DEBUG': True, 'WEBPACK_MANIFEST_PATH': './build/manifest.json', 'SECRET_KEY': 'the quick brown fox jumps over the lazy dog', 'SQLALCHEMY_DATABASE_URI': 'sqlite:///db.sqlite', 'SQLALCHEMY_COMMIT_ON_TEARDOWN': True, 'UPLOAD_FOLDER': XKCD, 'ALLOWED_EXTENSIONS': set... | [
"0.6643457",
"0.6353099",
"0.63418156",
"0.6284694",
"0.6196394",
"0.6196394",
"0.6060801",
"0.6055373",
"0.6045188",
"0.59819436",
"0.5967713",
"0.59084",
"0.5887365",
"0.58845866",
"0.5864085",
"0.5805739",
"0.57898957",
"0.57879746",
"0.57686937",
"0.5766021",
"0.5741608",... | 0.78804713 | 0 |
Step function activation that in backward pass acts as if it was a function given in the `pseudoderivative_of` parameter. | def eaae(WKvO, G_gR=ZylS.nn.tanh):
return G_gR(WKvO) + ZylS.stop_gradient(-G_gR(WKvO) + ZylS.nn.relu(ZylS.sign(WKvO))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PPkV(etIE, XcU5, Fg_i, YDYE):\n pass",
"def ZD5u(Emd4, EYyA, QwYN):\n raise Exception('Unimplemented')",
"def ZD5u(Emd4, EYyA, QwYN):\n raise Exception('Unimplemented')",
"def OTrv(epBp):\n return YDYE(epBp) * (1 - YDYE(epBp))",
"def KVH6(YKHO, QTBn):\n WKvO = YKHO.nonlin(YKHO.fc1(YKHO.i... | [
"0.60895324",
"0.6041764",
"0.6041764",
"0.6018972",
"0.6011782",
"0.59771794",
"0.5922997",
"0.5906574",
"0.59033567",
"0.5900355",
"0.5894251",
"0.58475006",
"0.5805008",
"0.5777626",
"0.57695657",
"0.57609296",
"0.57434684",
"0.5740475",
"0.5708426",
"0.57046837",
"0.57015... | 0.78861594 | 0 |
Leaky_relu activation with alpha changed to 0.1 by default. | def E4Y4(WKvO, Cwt5=0.1):
return ZylS.nn.leaky_relu(WKvO, alpha=Cwt5) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KzM8(WKvO, Cwt5=0.01):\n return ZylS.maximum(WKvO, Cwt5 * WKvO)",
"def KzM8(WKvO, Cwt5, mWFP=None):\n import tensorflow as ZylS\n with ZylS.name_scope(mWFP, 'leaky_relu_{}'.format(Cwt5)):\n return ZylS.nn.relu(WKvO) - Cwt5 * ZylS.nn.relu(-WKvO)",
"def KzM8(WKvO, Cwt5=0.01):\n return ZylS... | [
"0.80525506",
"0.79926425",
"0.79449296",
"0.7752299",
"0.7493365",
"0.74143517",
"0.7252294",
"0.7196845",
"0.70634973",
"0.6996927",
"0.69214845",
"0.6861359",
"0.6680064",
"0.6650479",
"0.6591281",
"0.6586597",
"0.64699894",
"0.6449589",
"0.64443",
"0.638058",
"0.6357944",... | 0.7905869 | 3 |
Do a quick gaussian blur on an image. | def jUwU(VXjJ, V3HY=(3, 3)):
return XC5k.GaussianBlur(VXjJ, V3HY, 0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Bz8F(LNo8, I8JS=2, Ot1W=(9, 9)):\n return XC5k.GaussianBlur(LNo8, Ot1W, I8JS)",
"def wBBO(LNo8, Ot1W=5):\n return XC5k.GaussianBlur(LNo8, (Ot1W, Ot1W), 0)",
"def xsYF(VXjJ, Ot1W):\n return XC5k.GaussianBlur(VXjJ, (Ot1W, Ot1W), 0)",
"def xsYF(VXjJ, Ot1W):\n return XC5k.GaussianBlur(VXjJ, (Ot1W... | [
"0.8126518",
"0.7797927",
"0.77884144",
"0.77884144",
"0.77884144",
"0.77884144",
"0.77884144",
"0.77884144",
"0.77884144",
"0.77884144",
"0.77884144",
"0.77884144",
"0.77884144",
"0.77884144",
"0.77884144",
"0.77884144",
"0.77884144",
"0.7773319",
"0.7741339",
"0.7693843",
"... | 0.7297827 | 28 |
Calculates the apparent magnitude of an object given the measured and catalog values of some standard candle. | def fbRy(Zmfr, rLVf, Oo3p):
a8qi = -2.5 * oyIN.log10(rLVf)
vgXP = a8qi - Oo3p
return -2.5 * oyIN.log10(Zmfr) - vgXP | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Wjo_(pKYF, CKMo, P2sP, BadC, ITS7):\n dQgj = P2sP + pKYF\n LiTy = P2sP + CKMo\n OW_4 = dQgj.at(ITS7).observe(LiTy)\n C7gK = dQgj.at(ITS7).observe(BadC)\n EEmv = OW_4.separation_from(C7gK).radians\n bGrB, bGrB, Ayfi = OW_4.radec()\n U6Wl = -1.3\n jMaQ = +5.0 * oyIN.log10(Ayfi.km / 1000.0... | [
"0.6531491",
"0.6211478",
"0.61837965",
"0.6045733",
"0.6015871",
"0.5945818",
"0.5897963",
"0.58891606",
"0.58810604",
"0.57912004",
"0.57692724",
"0.5756854",
"0.57400006",
"0.57351846",
"0.5706006",
"0.57059735",
"0.56903374",
"0.5670171",
"0.56684154",
"0.5656018",
"0.559... | 0.7379322 | 0 |
Plots subimage to a window. | def nUHY(YKHO):
QrM1.close()
QrM1.imshow(YKHO.data, extent=[YKHO.c - YKHO.radius, YKHO.c + YKHO.radius, YKHO.r + YKHO.radius, YKHO.r - YKHO.radius])
QrM1.colorbar()
QrM1.title(YKHO.time.strftime('%Y%m%d %H:%M:%S.%f %Z'))
QrM1.show() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kj9G(YKHO):\n YKHO.fig = QrM1.figure('black hole')\n YKHO.fig.clf()\n YKHO.ax = QrM1.subplot()\n if YKHO.img2 is not None:\n YKHO.ax.imshow(YKHO.img2)\n else:\n print('No black hole deformation in the memory, displayed the original image instead.')\n YKHO.ax.imshow(YKHO.img_... | [
"0.6585604",
"0.6476631",
"0.646777",
"0.63921666",
"0.63867915",
"0.6375552",
"0.62475246",
"0.6098657",
"0.6098657",
"0.6098657",
"0.6098135",
"0.60468364",
"0.602167",
"0.5978065",
"0.5967192",
"0.59639806",
"0.5942982",
"0.5904141",
"0.59006065",
"0.5898086",
"0.5890351",... | 0.0 | -1 |
String representation of the City model instance. | def wHJl(YKHO):
return f'<Venue {YKHO.id} {YKHO.name} {YKHO.state_name}>' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yLCI(YKHO):\n return 'Address: {city} {state} {country}'.format(city=YKHO.city, state=YKHO.state, country=YKHO.country)",
"def zAg0(YKHO):\n return super().__str__() + YKHO.model.__str__()",
"def zAg0(YKHO):\n return YKHO.as_string()",
"def oGUy(YKHO):\n j5sA = YKHO.city\n return f'{j5sA.n... | [
"0.7304293",
"0.6916136",
"0.6912027",
"0.69046444",
"0.6883636",
"0.6883636",
"0.68643653",
"0.68110955",
"0.6763266",
"0.6754198",
"0.67477196",
"0.67440134",
"0.6717281",
"0.6716404",
"0.6708341",
"0.67007923",
"0.6694687",
"0.6676734",
"0.66614",
"0.6646527",
"0.66329914"... | 0.0 | -1 |
String representation of the Venue model instance. | def wHJl(YKHO):
return f'<Venue {YKHO.id} {YKHO.name}>' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wHJl(YKHO):\n return f'<Venue {YKHO.id} {YKHO.name} {YKHO.state_name}>'",
"def wHJl(YKHO):\n return f'<Venue id={YKHO.venue_id} city={YKHO.city} name={YKHO.city} country={YKHO.country_code} description={YKHO.description} status={YKHO.status} length={YKHO.length} turns={YKHO.turns} latitude={YKHO.latitu... | [
"0.77340204",
"0.7712625",
"0.7271824",
"0.7016513",
"0.7004695",
"0.6943402",
"0.68710244",
"0.6862498",
"0.6862498",
"0.68609613",
"0.6812589",
"0.6811955",
"0.6789128",
"0.67781144",
"0.6772795",
"0.6735792",
"0.6735792",
"0.6735792",
"0.6735792",
"0.6735792",
"0.6735792",... | 0.79395324 | 0 |
Get upcoming shows list of current artist. | def pEJQ(YKHO):
pEJQ = V4m6.query.filter(V4m6.start_time > qcWV.now(), V4m6.artist_id == YKHO.id).all()
return [nUHY.serialized_data for nUHY in pEJQ] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FMcB(YKHO):\n pEJQ = V4m6.query.filter(V4m6.start_time < qcWV.now(), V4m6.artist_id == YKHO.id).all()\n return [nUHY.serialized_data for nUHY in pEJQ]",
"def pEJQ(YKHO):\n pEJQ = V4m6.query.filter(V4m6.start_time > qcWV.now(), V4m6.venue_id == YKHO.id).all()\n return [nUHY.serialized_data for nUH... | [
"0.76951236",
"0.7589596",
"0.72486675",
"0.6503909",
"0.6481537",
"0.6454226",
"0.644768",
"0.6444269",
"0.6391697",
"0.6347712",
"0.62461483",
"0.6217654",
"0.6139426",
"0.6067543",
"0.60469717",
"0.6035985",
"0.60318226",
"0.60066307",
"0.5958003",
"0.59344584",
"0.592027"... | 0.8177529 | 0 |
String representation of the Artist model instance. | def wHJl(YKHO):
return f'<Artist {YKHO.id} {YKHO.name}>' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wHJl(YKHO):\n VlDb = f'{YKHO.__class__.__name__} Model'\n try:\n VlDb += f': {YKHO.filename}'\n except AttributeError:\n pass\n KCHu = [VlDb]\n for mWFP, Ty9i in YKHO.metadata.items():\n KCHu += [f'{mWFP:16} : {Ty9i}']\n return '\\n'.join(KCHu)",
"def wHJl(YKHO):\n r... | [
"0.72941595",
"0.71699774",
"0.7030813",
"0.69912463",
"0.68484235",
"0.68144685",
"0.6812806",
"0.68028337",
"0.6789436",
"0.6789286",
"0.67453915",
"0.6656143",
"0.66371936",
"0.6595155",
"0.6595155",
"0.6595155",
"0.6595155",
"0.6595155",
"0.65605164",
"0.6544952",
"0.6537... | 0.7856273 | 0 |
String representation of the Show model instance. | def wHJl(YKHO):
return f'<Show {YKHO.id} {str(YKHO.start_time)}>' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return super().__str__() + YKHO.model.__str__()",
"def zAg0(YKHO):\n C3ST = YKHO._meta.verbose_name.title()\n leAC = YKHO.extended_object.get_title()\n return f'{C3ST:s}: {leAC:s}'",
"def zAg0(YKHO):\n return 'DataModel(name={},attributes={},description={})'.format(YKHO.name, {... | [
"0.77951896",
"0.7482265",
"0.74616283",
"0.74577326",
"0.7442753",
"0.7442753",
"0.7426323",
"0.74237216",
"0.7422453",
"0.7393438",
"0.7393438",
"0.73930997",
"0.7350342",
"0.73491806",
"0.73491806",
"0.73491806",
"0.73491806",
"0.73491806",
"0.7344203",
"0.73250407",
"0.73... | 0.7213092 | 27 |
Compare with another object. | def xa14(YKHO, Elif: Any) -> bool:
return isinstance(Elif, i3wb) and str(YKHO) == str(Elif) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eHkp(YKHO, F5TF, BPWI):\n return eHkp(YKHO.get_raw_value(F5TF), YKHO.get_raw_value(BPWI))",
"def eHkp(YKHO, F5TF, BPWI):\n return eHkp(F5TF[YKHO.index], BPWI[YKHO.index])",
"def Aicm(YKHO, M8mL):\n if YKHO.compare(M8mL):\n return True\n else:\n return False",
"def xa14(YKHO, Eli... | [
"0.762473",
"0.7613882",
"0.7363944",
"0.73189265",
"0.73189265",
"0.73189265",
"0.7303699",
"0.7303699",
"0.7216503",
"0.7216503",
"0.719504",
"0.71596247",
"0.7152792",
"0.71477723",
"0.71477723",
"0.71477723",
"0.71477723",
"0.71477723",
"0.71477723",
"0.71477723",
"0.7147... | 0.0 | -1 |
Compare with another object. | def xa14(YKHO, Elif: Any) -> bool:
return isinstance(Elif, zC3q) and YKHO.connection_id == Elif.connection_id and (YKHO.uri == Elif.uri) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eHkp(YKHO, F5TF, BPWI):\n return eHkp(YKHO.get_raw_value(F5TF), YKHO.get_raw_value(BPWI))",
"def eHkp(YKHO, F5TF, BPWI):\n return eHkp(F5TF[YKHO.index], BPWI[YKHO.index])",
"def Aicm(YKHO, M8mL):\n if YKHO.compare(M8mL):\n return True\n else:\n return False",
"def xa14(YKHO, Eli... | [
"0.762473",
"0.7613882",
"0.7363944",
"0.73189265",
"0.73189265",
"0.73189265",
"0.7303699",
"0.7303699",
"0.7216503",
"0.7216503",
"0.719504",
"0.71596247",
"0.7152792",
"0.71477723",
"0.71477723",
"0.71477723",
"0.71477723",
"0.71477723",
"0.71477723",
"0.71477723",
"0.7147... | 0.0 | -1 |
Get address of receiver. | def Br5Q(YKHO) -> EDCT:
return YKHO._to | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vAkW(YKHO):\n return YKHO._addr",
"def vAkW(YKHO):\n return YKHO._addr",
"def vAkW(YKHO):\n if YKHO._addr == None:\n return YKHO._socket.getpeername()\n return YKHO._addr",
"def vAkW(YKHO):\n if YKHO.address:\n return YKHO.address",
"def Nn1n(YKHO):\n return YKHO.__addre... | [
"0.7618283",
"0.7618283",
"0.746994",
"0.7261091",
"0.7188633",
"0.7112171",
"0.69569093",
"0.69393903",
"0.6905081",
"0.68309414",
"0.6828146",
"0.67971253",
"0.67554",
"0.6751669",
"0.6751669",
"0.6751669",
"0.6751669",
"0.6751669",
"0.67439055",
"0.6729098",
"0.6716069",
... | 0.6202332 | 55 |
Get address of sender. | def vC92(YKHO) -> EDCT:
return YKHO._sender | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vC92(YKHO):\n H5ew, Zc6P = ('Sender', 'From') if not YKHO.resent else ('Resent-Sender', 'Resent-From')\n BWXx = YKHO.get(H5ew) or YKHO.get(Zc6P)\n bGrB, rRzo = gfUS([BWXx])[0]\n return rRzo",
"def vAkW(YKHO):\n if YKHO._addr == None:\n return YKHO._socket.getpeername()\n return YKHO.... | [
"0.8083071",
"0.76276594",
"0.7247431",
"0.7247431",
"0.71350235",
"0.708967",
"0.6983083",
"0.6948125",
"0.69183254",
"0.6910468",
"0.67712796",
"0.6724256",
"0.6711023",
"0.67036957",
"0.6691818",
"0.6643035",
"0.66367733",
"0.6610175",
"0.65805316",
"0.6574633",
"0.6534134... | 0.7855265 | 1 |
Get the protocolspecific message. | def Ol8d(YKHO) -> uLKX[LuKW, bytes]:
return YKHO._message | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Eair(YKHO):\n return YKHO.msg",
"def Eair(YKHO):\n nPrm = YKHO.socket.recv(1024)\n if not nPrm:\n G9jH.error('Failed to read data from socket')\n return\n return YKHO.decode_message(nPrm)",
"def iquo(YKHO) -> Q1RE:\n return YKHO._sender.protocol",
"def S_Qd(YKHO):\n return... | [
"0.72864074",
"0.71999866",
"0.7192544",
"0.7158122",
"0.7081583",
"0.7081583",
"0.69952434",
"0.69528997",
"0.68255633",
"0.6751695",
"0.6751695",
"0.67385274",
"0.67339796",
"0.67339796",
"0.67138207",
"0.67053795",
"0.66678864",
"0.6621161",
"0.6617188",
"0.6613193",
"0.65... | 0.6310122 | 33 |
Get the protocolspecific message. | def Ooas(YKHO) -> bytes:
if isinstance(YKHO._message, LuKW):
return YKHO._message.encode()
return YKHO._message | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Eair(YKHO):\n return YKHO.msg",
"def Eair(YKHO):\n nPrm = YKHO.socket.recv(1024)\n if not nPrm:\n G9jH.error('Failed to read data from socket')\n return\n return YKHO.decode_message(nPrm)",
"def iquo(YKHO) -> Q1RE:\n return YKHO._sender.protocol",
"def S_Qd(YKHO):\n return... | [
"0.72864074",
"0.71999866",
"0.7192544",
"0.7158122",
"0.7081583",
"0.7081583",
"0.69952434",
"0.69528997",
"0.68255633",
"0.6751695",
"0.6751695",
"0.67385274",
"0.67339796",
"0.67339796",
"0.67138207",
"0.67053795",
"0.66678864",
"0.6621161",
"0.6617188",
"0.6613193",
"0.65... | 0.0 | -1 |
Compare with another object. | def xa14(YKHO, Elif: Any) -> bool:
return isinstance(Elif, ltXn) and YKHO.to == Elif.to and (YKHO.sender == Elif.sender) and (YKHO.protocol_specification_id == Elif.protocol_specification_id) and (YKHO.message == Elif.message) and (YKHO.context == Elif.context) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eHkp(YKHO, F5TF, BPWI):\n return eHkp(YKHO.get_raw_value(F5TF), YKHO.get_raw_value(BPWI))",
"def eHkp(YKHO, F5TF, BPWI):\n return eHkp(F5TF[YKHO.index], BPWI[YKHO.index])",
"def Aicm(YKHO, M8mL):\n if YKHO.compare(M8mL):\n return True\n else:\n return False",
"def xa14(YKHO, Eli... | [
"0.762473",
"0.7613882",
"0.7363944",
"0.73189265",
"0.73189265",
"0.73189265",
"0.7303699",
"0.7303699",
"0.7216503",
"0.7216503",
"0.719504",
"0.71596247",
"0.7152792",
"0.71477723",
"0.71477723",
"0.71477723",
"0.71477723",
"0.71477723",
"0.71477723",
"0.71477723",
"0.7147... | 0.0 | -1 |
Get the string representation of an envelope. | def zAg0(YKHO) -> str:
return 'Envelope(to={to}, sender={sender}, protocol_specification_id={protocol_specification_id}, message={message})'.format(to=YKHO.to, sender=YKHO.sender, protocol_specification_id=YKHO.protocol_specification_id, message='{!r}'.format(YKHO.message) if isinstance(YKHO.message, bytes) else YK... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PjZe(g8x2):\n NRcB = []\n sEAN = {'envelope': g8x2}\n Z2IP(NRcB, 0, sEAN)\n return ''.join(NRcB)",
"def vwqL(YKHO):\n WBPg, TBsA = (None, None)\n if YKHO._header:\n WBPg = b'<?xml version=\"1.0\" encoding=\"utf-8\"?>'\n if YKHO._main() is not None:\n TBsA = GXnK.tostring(YK... | [
"0.674651",
"0.63018584",
"0.6250627",
"0.61731416",
"0.59367156",
"0.59367156",
"0.5827394",
"0.579237",
"0.57641184",
"0.57167494",
"0.57167494",
"0.57167494",
"0.57167494",
"0.57167494",
"0.57167494",
"0.57167494",
"0.57167494",
"0.57167494",
"0.57167494",
"0.57167494",
"0... | 0.7034442 | 0 |
return list of elements that exists only in list A but not in B | def by6d(jzdc, Fg_i):
Z9rn = [YRbF for YRbF in jzdc + Fg_i if YRbF not in jzdc or YRbF not in Fg_i]
return Z9rn | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def by6d(jzdc, Fg_i):\n return list(nmsr(lambda WKvO: WKvO in Fg_i, jzdc))",
"def w7GX(jzdc, Fg_i):\n QvJ5 = list(jzdc)\n for WKvO in Fg_i:\n if WKvO in QvJ5:\n QvJ5.remove(WKvO)\n return QvJ5",
"def XAyz(jzdc, Fg_i):\n Z9rn = [YRbF for YRbF in iHrl if YRbF not in X1zw]\n re... | [
"0.7633952",
"0.7135928",
"0.7069993",
"0.6961386",
"0.6897351",
"0.6894724",
"0.68783104",
"0.67009443",
"0.6613386",
"0.6610032",
"0.6600514",
"0.65871257",
"0.65689933",
"0.65508705",
"0.6535918",
"0.65235204",
"0.64354485",
"0.6414254",
"0.6395312",
"0.63871044",
"0.63856... | 0.68996155 | 4 |
Make x y two dim list with '' values in it | def WKkr(cvUw, Misx):
epBp = [[''] * Misx for YRbF in range(cvUw)]
return epBp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z_iz(DR2N, P3RF, BWXx=None):\n jzdc = [None] * DR2N\n for rdlD in range(DR2N):\n jzdc[rdlD] = [BWXx] * P3RF\n return jzdc",
"def E0Pg(YKHO):\n return [YKHO.coord1, YKHO.coord2] if YKHO.__dim == 2 else [YKHO.coord1, YKHO.coord2, YKHO.coord3]",
"def WhKS():\n WKvO = [[]] * 3\n WKvO[0... | [
"0.633943",
"0.6227869",
"0.6193736",
"0.6169322",
"0.607285",
"0.60409284",
"0.6020129",
"0.5997472",
"0.5912802",
"0.5862278",
"0.5857195",
"0.58335567",
"0.5829755",
"0.5783023",
"0.578225",
"0.57819974",
"0.575235",
"0.5746532",
"0.57448775",
"0.5719083",
"0.57106006",
... | 0.6370906 | 0 |
Return a string representing the type of vehicle this is. | def GnEY(YKHO):
return 'HI' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gKPu():\n pass",
"def gKPu(YKHO):\n pass",
"def gKPu(YKHO):\n return 'car'",
"def gKPu(YKHO):\n return 'car'",
"def gKPu(YKHO):\n return 'car'",
"def gKPu(YKHO):\n return 'truck'",
"def gKPu(YKHO):\n return 'truck'",
"def type(YKHO) -> str:\n return qe4Y.get(YKHO, 'type')"... | [
"0.8265945",
"0.8171127",
"0.79946303",
"0.79946303",
"0.79946303",
"0.78402793",
"0.78402793",
"0.7387936",
"0.7387936",
"0.7387936",
"0.7387936",
"0.7387936",
"0.7387936",
"0.7387936",
"0.7387936",
"0.7387936",
"0.7387936",
"0.7387936",
"0.7387936",
"0.7387936",
"0.7387936"... | 0.0 | -1 |
Return a string representing the type of vehicle this is. | def GnEY(YKHO):
return 'SubSystem' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gKPu():\n pass",
"def gKPu(YKHO):\n pass",
"def gKPu(YKHO):\n return 'car'",
"def gKPu(YKHO):\n return 'car'",
"def gKPu(YKHO):\n return 'car'",
"def gKPu(YKHO):\n return 'truck'",
"def gKPu(YKHO):\n return 'truck'",
"def type(YKHO) -> str:\n return qe4Y.get(YKHO, 'type')"... | [
"0.8264676",
"0.81698346",
"0.7994656",
"0.7994656",
"0.7994656",
"0.78400844",
"0.78400844",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
"0.738759",
... | 0.0 | -1 |
Updates the view offset based on the center of the screen. | def hmPq(YKHO, BWXx):
YKHO._viewCenter = ftz7.b2Vec2(*BWXx)
YKHO._viewCenter *= YKHO._viewZoom
YKHO._viewOffset = YKHO._viewCenter - YKHO.screenSize / 2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hgjH(YKHO):\n YKHO.centerx = YKHO.screen_rect.centerx\n YKHO.centery = YKHO.screen_rect.centery",
"def QdZT(YKHO):\n super().update()\n if YKHO.center_x < uwaB.left_limit:\n YKHO.center_x = YKHO.screen_width + uwaB.offscreen_space\n if YKHO.center_x > YKHO.screen_width + uwaB.offscreen_... | [
"0.73102534",
"0.72775304",
"0.70998013",
"0.6961202",
"0.6942405",
"0.6860998",
"0.68110615",
"0.6777373",
"0.6732383",
"0.6708982",
"0.66924673",
"0.66924673",
"0.6674286",
"0.6643728",
"0.6643728",
"0.66400164",
"0.6606953",
"0.65825343",
"0.65825343",
"0.65825343",
"0.651... | 0.730855 | 1 |
Store the start time | def I_9r(YKHO, E3oo):
YKHO.start_day = int(E3oo[8:10])
ROt1 = int(E3oo[11:13])
yVtz = int(E3oo[14:16])
CsFy = int(E3oo[17:19])
buJh = float(int(E3oo[21:])) / 1000000
YKHO.start_time = float(ROt1 * 3600 + yVtz * 60 + CsFy) + buJh | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def I_9r():\n sEuK = qg8b()",
"def SWox(YKHO):\n pass",
"def SWox(YKHO) -> float:\n ...",
"def yKcO(YKHO):\n YKHO.start_time = ITS7.time()",
"def SWox(YKHO, SWox):\n YKHO._start_time = SWox",
"def SWox(YKHO, SWox):\n YKHO._start_time = SWox",
"def SWox(YKHO, BWXx):\n YKHO._start_ti... | [
"0.82752585",
"0.82677233",
"0.81328845",
"0.8125686",
"0.8039249",
"0.8039249",
"0.7970167",
"0.78758496",
"0.78758496",
"0.78758496",
"0.78758496",
"0.78758496",
"0.7862989",
"0.7824047",
"0.77697295",
"0.7720857",
"0.7720857",
"0.7720857",
"0.7720857",
"0.7720857",
"0.7720... | 0.725419 | 48 |
Returns starting state of the board. | def W9gz():
return [[KAvf, KAvf, KAvf], [KAvf, KAvf, KAvf], [KAvf, KAvf, KAvf]] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rEkR(YKHO):\n return oyIN.zeros(YKHO.board_size, dtype=oyIN.int8)",
"def rEkR():\n return H66R.Board()",
"def jKlz(YKHO):\n return (YKHO.startingPosition, (False, False, False, False))",
"def D3Ar(YKHO):\n gnPz.raiseNotDefined()",
"def D3Ar(YKHO):\n gnPz.raiseNotDefined()",
"def D3Ar(Y... | [
"0.8081514",
"0.7890486",
"0.7534929",
"0.72789717",
"0.72789717",
"0.72262055",
"0.72262055",
"0.72262055",
"0.72262055",
"0.72262055",
"0.72262055",
"0.72262055",
"0.72262055",
"0.72262055",
"0.72262055",
"0.72262055",
"0.72262055",
"0.72262055",
"0.72262055",
"0.72262055",
... | 0.0 | -1 |
Returns player who has the next turn on a board. | def oyg0(iBIi):
if f9TP(iBIi) == True:
return None
_SCC, gk9H = (0, 0)
for YRbF in range(3):
for r845 in range(3):
if iBIi[YRbF][r845] == EcVT:
gk9H += 1
elif iBIi[YRbF][r845] == LTX_:
_SCC += 1
if _SCC >= gk9H:
return EcVT
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zia_(iBIi, UwI3):\n RUgX = VlLD.opponent(UwI3)\n if VlLD.any_legal_move(RUgX, iBIi):\n return RUgX\n elif VlLD.any_legal_move(UwI3, iBIi):\n return UwI3\n return None",
"def Zia_(YKHO, iBIi, UwI3):\n RUgX = YKHO.opponent(UwI3)\n iiQJ = YKHO.any_legal_move(RUgX, iBIi)\n v5zX... | [
"0.79088944",
"0.75199264",
"0.7417399",
"0.73678493",
"0.719489",
"0.6975714",
"0.6962515",
"0.69239026",
"0.6918084",
"0.6898119",
"0.68501276",
"0.68410057",
"0.6837679",
"0.6824917",
"0.67710704",
"0.67710704",
"0.6766936",
"0.6711427",
"0.67082745",
"0.66566026",
"0.6611... | 0.0 | -1 |
Returns the optimal action for the current player on the board. | def SR1K(iBIi):
if f9TP(iBIi) == True:
return None
elif oyg0(iBIi) == EcVT:
XeOP = h3Np(iBIi)[1:]
elif oyg0(iBIi) == LTX_:
XeOP = zlMY(iBIi)[1:]
return XeOP | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ePBn(YKHO):\n if YKHO.bestAction is None:\n YKHO.calculate_best_action()\n return YKHO.bestAction",
"def bk5W(YKHO, Ov5A: GameState):\n SkJr = float('-inf')\n XeOP = None\n for BZN_ in Ov5A.getLegalActions(0):\n gnPz = SR1K(YKHO.evaluationFunction, 1, 0, Ov5A.generateSuccessor(0,... | [
"0.7766856",
"0.76323676",
"0.75855315",
"0.75285065",
"0.75175256",
"0.74667144",
"0.7460485",
"0.74263537",
"0.7416421",
"0.73943585",
"0.7375846",
"0.7333894",
"0.73147565",
"0.7306611",
"0.7284639",
"0.72650313",
"0.72650313",
"0.7250975",
"0.72331834",
"0.7203267",
"0.71... | 0.7144644 | 24 |
Return tuple (utility, i, j) where (i, j) represents the move with the minimum utility and utility represents that minimum utility, given the board board. | def zlMY(iBIi):
ormZ = 2
begg = None
TMa9 = None
if f9TP(iBIi) == True:
Aofo = f7Dd(iBIi)
return (Aofo, 0, 0)
for YRbF in range(0, 3):
for r845 in range(0, 3):
if iBIi[YRbF][r845] == KAvf:
iBIi[YRbF][r845] = LTX_
r8hN, wmQo, d3xX = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DQDj(iBIi):\n WKvO = iBIi.size / 2\n return (WKvO, WKvO)",
"def f7Dd(iBIi):\n return B3Vf[bHVe(iBIi)]",
"def h_4H(YKHO, iBIi: Board) -> (float, int):\n L0av = iBIi.hash_value()\n if L0av in YKHO.cache:\n return YKHO.cache[L0av]\n dgIT = YKHO.DRAW_VALUE\n XeOP = -1\n bHVe = iB... | [
"0.6896989",
"0.6810057",
"0.6700318",
"0.6450558",
"0.6429713",
"0.64233893",
"0.6407684",
"0.6405761",
"0.6383748",
"0.6382555",
"0.6351855",
"0.63290083",
"0.62967384",
"0.62944794",
"0.6292816",
"0.62923044",
"0.6264656",
"0.62461305",
"0.6224251",
"0.6211949",
"0.6192992... | 0.7353371 | 0 |
Sets the charge_group_id of this RefundRequestBreakUpItem. | def EBzk(YKHO, EBzk):
YKHO._charge_group_id = EBzk | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hE03(YKHO, hE03):\n YKHO._group_id = hE03",
"def hE03(YKHO, hE03):\n YKHO._group_id = hE03",
"def hE03(YKHO, hE03):\n YKHO._group_id = hE03",
"def hE03(YKHO, hE03):\n YKHO._group_id = hE03",
"def hE03(YKHO, hE03):\n YKHO._group_id = hE03",
"def hE03(YKHO, hE03):\n YKHO._group_id = h... | [
"0.668687",
"0.668687",
"0.668687",
"0.668687",
"0.668687",
"0.668687",
"0.6168282",
"0.6028392",
"0.6028392",
"0.6028392",
"0.6018705",
"0.59898925",
"0.5987983",
"0.5912117",
"0.5900073",
"0.58515054",
"0.5842612",
"0.5811728",
"0.58039033",
"0.57326233",
"0.57115966",
"0... | 0.8028447 | 0 |
Sets the security_user_id of this RefundRequestBreakUpItem. | def cm0c(YKHO, cm0c):
YKHO._security_user_id = cm0c | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uJjO(YKHO, uJjO):\n YKHO._user_id = uJjO",
"def uJjO(YKHO, uJjO):\n YKHO._user_id = uJjO",
"def uJjO(YKHO, uJjO):\n YKHO._user_id = uJjO",
"def uJjO(YKHO, uJjO):\n YKHO._user_id = uJjO",
"def uJjO(YKHO, uJjO):\n YKHO._user_id = uJjO",
"def uJjO(YKHO, uJjO):\n YKHO._user_id = uJjO",
... | [
"0.6214704",
"0.6214704",
"0.6214704",
"0.6214704",
"0.6214704",
"0.6214704",
"0.6214704",
"0.6214704",
"0.6214704",
"0.6214704",
"0.6214704",
"0.6214704",
"0.6214704",
"0.6214704",
"0.6119607",
"0.59191567",
"0.5782431",
"0.563117",
"0.5561852",
"0.55523545",
"0.55523545",
... | 0.761579 | 0 |
Sets the created_by_security_user_id of this RefundRequestBreakUpItem. | def rIF2(YKHO, rIF2):
YKHO._created_by_security_user_id = rIF2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tC0c(YKHO, tC0c):\n YKHO._created_by = tC0c",
"def tC0c(YKHO, tC0c):\n YKHO._created_by = tC0c",
"def tC0c(YKHO, tC0c):\n YKHO._created_by = tC0c",
"def tC0c(YKHO, tC0c):\n YKHO._created_by = tC0c",
"def tC0c(YKHO, tC0c):\n YKHO._created_by = tC0c",
"def tC0c(YKHO, tC0c):\n YKHO._cr... | [
"0.6548153",
"0.6548153",
"0.6548153",
"0.6548153",
"0.6548153",
"0.6548153",
"0.64006186",
"0.63229865",
"0.62986654",
"0.61275554",
"0.61150676",
"0.61150676",
"0.5920104",
"0.5920104",
"0.5920104",
"0.5920104",
"0.5832952",
"0.58056253",
"0.5644031",
"0.56397736",
"0.55688... | 0.7538895 | 0 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, ONIE):
return False
return YKHO.__dict__ == Elif.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)",
"def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)",
... | [
"0.84568954",
"0.83923674",
"0.81447554",
"0.81407183",
"0.81326675",
"0.80941343",
"0.8092415",
"0.8092415",
"0.8092415",
"0.8085536",
"0.8085536",
"0.8076502",
"0.8076502",
"0.8066026"
] | 0.0 | -1 |
Check the query string parameter is allowed or should be removed. | def GerO(YKHO, xqoZ, BWXx):
if xqoZ.startswith('utm_'):
return False
if xqoZ == 'spref' and BWXx == 'tw':
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WqRc(QePW) -> bool:\n return QePW.param",
"def _oNs(o2VW):\n\n def Bp1A(exwG, Ty9i):\n if not exwG.startswith('oauth_'):\n return True\n else:\n G9jH.warning('Protocol parameter ignored from URL query parameters: `%r`', exwG)\n return False\n return hRy... | [
"0.668178",
"0.667525",
"0.64733666",
"0.6468181",
"0.63959676",
"0.6314691",
"0.6279993",
"0.62287086",
"0.61140823",
"0.6099023",
"0.60848767",
"0.6079547",
"0.601698",
"0.601698",
"0.60128665",
"0.6008308",
"0.59997356",
"0.599811",
"0.595535",
"0.5944981",
"0.59124076",
... | 0.6577006 | 2 |
Clean the given URL. | def _1lG(YKHO, bD7m):
if YKHO.is_blacklisted(bD7m):
return None
P8mz = YKHO.untiny.extract(bD7m)
if P8mz != bD7m:
return YKHO.clean_url(P8mz)
u61l = YKHO.follow_redirects(P8mz)
if not u61l:
return None
if u61l != bD7m:
return YKHO.clean_url(u61l)
return YKHO.c... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _1lG(bD7m):\n ht58, RYr6, pmON, xDcj, vBtp = Jc8s.urlsplit(bD7m)\n pmON = Jc8s.quote(pmON)\n bD7m = Jc8s.urlunsplit((ht58, RYr6, pmON, xDcj, vBtp))\n return bD7m",
"def QQ6h(YKHO, bD7m):\n return ''.join(bD7m.split('?')[:1])",
"def _1lG(bD7m):\n z1Rg = NoPH(bD7m)\n return '{scheme}://{... | [
"0.801504",
"0.79892147",
"0.7761624",
"0.76837766",
"0.75280935",
"0.7390052",
"0.7334529",
"0.72802687",
"0.7245754",
"0.7230822",
"0.72074914",
"0.7204729",
"0.7145431",
"0.7137376",
"0.71047664",
"0.6884523",
"0.68456733",
"0.6833181",
"0.6807046",
"0.67996746",
"0.676993... | 0.77442855 | 3 |
Makes sure the absolute path is added to the bottle template files global | def JViy(qaEx):
UhR0 = hgmy(qaEx, 'views')
LWPK.insert(0, UhR0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xFqD(YKHO):\n YKHO.libs['template'] = ('#libs/templates/include', None, '')\n YKHO['CPPPATH'].append('#libs/templates/include')",
"def Ejpk(t_yv, **B2fa):\n return t_yv",
"def ek9N(YKHO):\n pass",
"def grf7(pmON):\n return cs4A('templates', pmON)",
"def FIMM(YKHO, B7c0):\n XSj5 = WsL5... | [
"0.64122564",
"0.6379324",
"0.63452774",
"0.6175168",
"0.61669165",
"0.6155688",
"0.6089532",
"0.60713017",
"0.603411",
"0.60281646",
"0.6013094",
"0.6001903",
"0.5901084",
"0.5901002",
"0.5877754",
"0.5831337",
"0.5822694",
"0.5819203",
"0.5794728",
"0.5781366",
"0.5759009",... | 0.69305766 | 0 |
Get enum element by core mask. | def wjJN(jmqF: CoreMask) -> 'MaskState':
if jmqF == hreQ.NoMask:
return fhhk.Missing
if jmqF == hreQ.Mask:
return fhhk.MedicalMask
if jmqF == hreQ.OccludedFace:
return fhhk.Occluded
raise RuntimeError(f'bad core mask state {jmqF}') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EORR(XJAX, ZHfW):\n return [WKvO for WKvO in XJAX if WKvO.value & ZHfW == WKvO.value]",
"def OP2O(YKHO, H5ew):\n try:\n if BfDw.is_str(H5ew):\n H5ew = BfDw.force_name_case(H5ew)\n return next((qQ1Y for qQ1Y in YKHO if qQ1Y.name == H5ew))\n else:\n return Y... | [
"0.6204872",
"0.5842061",
"0.56393087",
"0.5600411",
"0.5474189",
"0.54355806",
"0.5324193",
"0.53138506",
"0.52949286",
"0.5244011",
"0.52304053",
"0.5228535",
"0.52173483",
"0.5181734",
"0.5162053",
"0.51483774",
"0.5113189",
"0.5094201",
"0.5089052",
"0.5089052",
"0.504170... | 0.58328825 | 2 |
Get a Product by it's Type instead of Name. | def IQsa(YKHO, TLz0):
for XP5J in YKHO.Products.itervalues():
if XP5J.Type == TLz0:
return XP5J
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bYql(YKHO):\n try:\n return YKHO.activities[ovw8.MANUFACTURING].products[0].typeID\n except (KeyError, IndexError):\n return None",
"def NMoC(YKHO, QNO6):\n return YKHO.products.setdefault(QNO6, c0_m.ProductMapping(QNO6))",
"def AI9R(YKHO, id):\n w2IS = '/v3/educator/products/%s' ... | [
"0.68648094",
"0.6820259",
"0.6774459",
"0.6762229",
"0.6700315",
"0.6675385",
"0.658021",
"0.64660287",
"0.64358795",
"0.6319597",
"0.62767184",
"0.6232248",
"0.6218744",
"0.62163055",
"0.6171077",
"0.6106671",
"0.6040627",
"0.5998399",
"0.5995556",
"0.5966858",
"0.5959658",... | 0.7740967 | 0 |
Return the first nonNone value from the iterator. | def pnbo(DumB: Iterable[tuple[bool | None, str] | None]) -> tuple[bool, str]:
for uiPQ in DumB:
if uiPQ is not None:
ZfUD, lo9Y = uiPQ
if ZfUD is not None:
return (ZfUD, lo9Y)
return (False, 'default') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def z4ax(oHE7):\n return oHE7.get_next_as_optional()",
"def cntZ(YKHO):\n try:\n return YKHO.next()\n except StopIteration:\n return None",
"def E_TU(YKHO):\n if not YKHO.is_empty():\n return YKHO.data[YKHO.head]\n return None",
"def cntZ(YKHO):\n return YKHO.head and Y... | [
"0.81334937",
"0.7775944",
"0.76339",
"0.74998116",
"0.7386747",
"0.7325384",
"0.7305718",
"0.72354954",
"0.72288877",
"0.7223604",
"0.7182362",
"0.7094297",
"0.7094297",
"0.6998806",
"0.6958998",
"0.6917823",
"0.68897766",
"0.6870175",
"0.6838372",
"0.68376744",
"0.6809466",... | 0.71926254 | 10 |
Repeat elements of an array. | def wPFE(jzdc, DVQL, jDK_=0):
jzdc = f3R4.aspolynomial(jzdc)
Aofo = XTiz.repeat(jzdc.values, repeats=DVQL, axis=jDK_)
return f3R4.aspolynomial(Aofo, names=jzdc.indeterminants) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wPFE(jzdc, DVQL, jDK_=None):\n return gC0V.asarray(jzdc).repeat(DVQL, axis=jDK_)",
"def sWfS(WKvO: Any, WXkz: IntOrIter=1, u54L: int=None, mAB6: int=1) -> sUKM:\n if OjXW(WKvO):\n WKvO = [WKvO]\n if GfZ5(WXkz):\n if len(WXkz) != len(WKvO):\n raise ValueError(f'Invalid times ... | [
"0.77669495",
"0.6952881",
"0.68815815",
"0.67514676",
"0.6715123",
"0.6682219",
"0.66743696",
"0.65719515",
"0.65643",
"0.6558338",
"0.65580964",
"0.6512198",
"0.64070255",
"0.6353142",
"0.62469375",
"0.62239957",
"0.6217",
"0.6207992",
"0.618354",
"0.6103445",
"0.6020468",
... | 0.661403 | 7 |
Draw detected bounding boxes. | def qfB5(Xn71, _2sc, l40E, knl1=0.5):
noZV = oyIN.where(l40E[:, -1] >= knl1)[0]
h8NK = 0
jB5X = 0.0
if len(noZV) == 0:
return
elif len(noZV) > 1:
for YRbF in noZV:
if l40E[YRbF, -1] > jB5X:
h8NK = YRbF
jB5X = l40E[YRbF, -1]
cviu = l40E[... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sGG5(YKHO, NncF, hlel):\n for YRbF, edvT in enumerate(NncF):\n if edvT[2] > hlel.shape[1] or edvT[3] > hlel.shape[0] or edvT[0] < 0 or (edvT[1] < 0):\n continue\n XC5k.rectangle(oyIN.asarray(hlel), (edvT[0], edvT[1]), (edvT[2], edvT[3]), YKHO.colors[YRbF % len(YKHO.colors)], thickne... | [
"0.77598673",
"0.7638101",
"0.7510348",
"0.72977304",
"0.7150563",
"0.7103931",
"0.7101873",
"0.7083905",
"0.7020769",
"0.6993739",
"0.6974172",
"0.69637305",
"0.6859061",
"0.68521667",
"0.68319523",
"0.6830371",
"0.6809837",
"0.6805064",
"0.67750585",
"0.6774759",
"0.6742592... | 0.0 | -1 |
Draw detected bounding boxes. | def _1rj(Xn71, _2sc, l40E, C7_O, knl1=0.5):
noZV = oyIN.where(l40E[:, -1] >= knl1)[0]
h8NK = 0
jB5X = 0.0
if len(noZV) == 0:
return
elif len(noZV) > 1:
for YRbF in noZV:
if l40E[YRbF, -1] > jB5X:
h8NK = YRbF
jB5X = l40E[YRbF, -1]
cviu =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sGG5(YKHO, NncF, hlel):\n for YRbF, edvT in enumerate(NncF):\n if edvT[2] > hlel.shape[1] or edvT[3] > hlel.shape[0] or edvT[0] < 0 or (edvT[1] < 0):\n continue\n XC5k.rectangle(oyIN.asarray(hlel), (edvT[0], edvT[1]), (edvT[2], edvT[3]), YKHO.colors[YRbF % len(YKHO.colors)], thickne... | [
"0.7760377",
"0.7638606",
"0.7509239",
"0.7299291",
"0.7151098",
"0.7104516",
"0.7102629",
"0.7085159",
"0.7021271",
"0.69941986",
"0.697518",
"0.69644916",
"0.6859386",
"0.6853273",
"0.68326604",
"0.68315536",
"0.68102115",
"0.68052995",
"0.6775847",
"0.6775714",
"0.67440426... | 0.0 | -1 |
Return the number of arcs in the DAG. | def lLkj(YKHO):
return len(YKHO.arcs) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nDhZ(YKHO):\n lLkj = 0\n for Q6kx in YKHO._nodes.values():\n lLkj += Q6kx._deg\n return lLkj / 2 + 1",
"def nDhZ(YKHO):\n lLkj = 0\n for Q6kx in YKHO._nodes.values():\n lLkj += Q6kx._deg\n return lLkj / 2 + 1",
"def lLkj(YKHO):\n return sum((len(QTBn) for QTBn in YKHO))",... | [
"0.77381676",
"0.77381676",
"0.76919484",
"0.72843695",
"0.7006593",
"0.6996576",
"0.6918832",
"0.6716626",
"0.67080903",
"0.67025733",
"0.66952705",
"0.66868395",
"0.66809255",
"0.66662467",
"0.66513133",
"0.66351557",
"0.66348517",
"0.6629658",
"0.6626222",
"0.6624958",
"0.... | 0.76032966 | 3 |
Compute backward variable for all arcs in the lattice. Store beta value on each arc. | def ZD5u(YKHO, npaS, skyf):
for zTvC in YKHO.traverse_arcs_topo(reverse=True):
if len(zTvC.dest.exits) == 0:
UqYS = 0
else:
UqYS = vJLF
for lnPd in zTvC.dest.exits:
UqYS = oyIN.logaddexp(UqYS, lnPd.beta)
zTvC.beta = UqYS + zTvC.ascr * npaS ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aw6j(YKHO):\n YKHO.beta = VNqG((YKHO.noOfEmmittingStates + 2, YKHO.T + 1))\n for r845 in range(YKHO.noOfEmmittingStates + 1):\n YKHO.beta[r845, -1] = YKHO.transitionMatrix[r845, -1]\n YKHO.beta[-1, -1] = 1.0\n for a1PO in range(YKHO.T, 1, -1):\n for r845 in range(YKHO.noOfEmmittingSta... | [
"0.6616474",
"0.6533678",
"0.6272543",
"0.6272543",
"0.6272154",
"0.6137506",
"0.61235636",
"0.6106762",
"0.60796076",
"0.6060276",
"0.6039843",
"0.6026853",
"0.600505",
"0.5973358",
"0.5966961",
"0.5937605",
"0.5894681",
"0.58945334",
"0.5889684",
"0.58734095",
"0.5868023",
... | 0.6948557 | 0 |
This is the constructor for the Main Window class | def FIMM(YKHO, *qIxc, **B2fa):
super(Cvzl, YKHO).__init__(*qIxc, **B2fa)
YKHO.setupUi(YKHO)
YKHO.outputString = ''
YKHO.stopSim = False
YKHO.numBarriers = 10
YKHO.createSim()
YKHO.sld.valueChanged.connect(YKHO.changeBarriers)
YKHO.runButton.pressed.connect(YKHO.runSim)
YKHO.createBut... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO):\n YKHO.window = xNQ_()\n YKHO.__initialize_variables__()\n YKHO.__initialize_menu__()\n YKHO.__initialize_status_bar__()\n YKHO.__initialize_gui__()",
"def FIMM(YKHO):\n YKHO.defaultTheme = 'DarkAmber'\n YKHO.version = 1.4\n YKHO.versionName = 'class update'\n YKHO.titl... | [
"0.76982",
"0.7693823",
"0.74358517",
"0.74062794",
"0.739473",
"0.7377134",
"0.7264559",
"0.7252969",
"0.7206408",
"0.7173788",
"0.71735656",
"0.7131486",
"0.7131486",
"0.7131486",
"0.7131486",
"0.7131486",
"0.71152717",
"0.7086129",
"0.70764524",
"0.70517886",
"0.70286393",... | 0.0 | -1 |
Asks user to specify a city, month, and day to analyze. | def RxGd():
print("Hello! Let's explore some US bikeshare data!")
while True:
j5sA = input("Please enter a city ('chicago', 'new york city' or 'washington'): ").lower()
if j5sA in ['chicago', 'new york city', 'washington']:
break
else:
print('Invalid input! Please... | {
"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.66709363",
"0.6536631",
"0.6460791",
"0.6373951",
"0.6349272",
"0.6310802",
"0.6287722",
"0.62607133",
"0.6230896",
"0.6212277",
"0.62065274",
"0.61828023",
"0.6171454",
"0.61700225",
"0.6159926",
"0.6158883",
"0.6154618",
"0.61455905",
"0.6130836",
"0.61063856",
"0.610411... | 0.5691864 | 93 |
Loads data for the specified city and filters by month and day if applicable. | def UlWi(j5sA, x0eS, CjKC):
jQ3Z = rLdf.read_csv(OerS[j5sA])
jQ3Z['Start Time'] = rLdf.to_datetime(jQ3Z['Start Time'])
jQ3Z['month'] = jQ3Z['Start Time'].dt.month
jQ3Z['weekday'] = jQ3Z['Start Time'].dt.day_name()
jQ3Z['hour'] = jQ3Z['Start Time'].dt.hour
if x0eS != 'all':
x0eS = X_bn.in... | {
"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.8045821",
"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.788921... | 0.7666826 | 70 |
Displays statistics on the most frequent times of travel. | def dWJR(jQ3Z):
print('\nCalculating The Most Frequent Times of Travel...\n')
SWox = ITS7.time()
print('Most Common Month:', X_bn[jQ3Z['month'].mode()[0] - 1].title())
print('Most Common Day of Week:', jQ3Z['weekday'].mode()[0])
print('Most Common Hour:', jQ3Z['hour'].mode()[0])
print('\nThis to... | {
"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.8023237",
"0.8021888",
"0.79149604",
"0.78255546",
"0.78211224",
"0.78133345",
"0.7739481",
"0.773519",
"0.77332956",
"0.7685631",
"0.7667726",
"0.7650597",
"0.76435405",
"0.7638843",
"0.76357967",
"0.76242906",
"0.762238",
"0.7612054",
"0.7599205",
"0.75824374",
"0.757876... | 0.77648497 | 6 |
Displays statistics on the most popular stations and trip. | def Huc_(jQ3Z):
print('\nCalculating The Most Popular Stations and Trip...\n')
SWox = ITS7.time()
print('Most Common Start Station:', jQ3Z['Start Station'].mode()[0])
print('Most Common End Station:', jQ3Z['End Station'].mode()[0])
jQ3Z['trip'] = jQ3Z['Start Station'] + ' to ' + jQ3Z['End Station']
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Huc_(jQ3Z):\n print('\\nCalculating The Most Popular Stations and Trip...\\n')\n SWox = ITS7.time()\n print(_8rG(jQ3Z))\n print(oFx8(jQ3Z))\n print(_Ek3(jQ3Z))\n print('\\nThis took %s seconds.' % (ITS7.time() - SWox))\n print('-' * 40)",
"def Huc_(nPrm):\n print('\\nCalculating The M... | [
"0.7815502",
"0.76617634",
"0.7553331",
"0.7491147",
"0.74459386",
"0.7431019",
"0.7423337",
"0.74172765",
"0.7400016",
"0.7387015",
"0.7385145",
"0.73644745",
"0.735896",
"0.7356297",
"0.73543596",
"0.73516876",
"0.73508674",
"0.73499984",
"0.7341763",
"0.7340006",
"0.733685... | 0.747456 | 4 |
Displays statistics on the total and average trip duration. | def kDMA(jQ3Z):
print('\nCalculating Trip Duration...\n')
SWox = ITS7.time()
print('Total Travel Time: {:.2f} minutes ({:.2f} hours)'.format(jQ3Z['Trip Duration'].sum() / 60, jQ3Z['Trip Duration'].sum() / 3600))
print('Average Travel Time: {:.2f} minutes'.format(jQ3Z['Trip Duration'].mean() / 60))
p... | {
"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.8143032",
"0.8024939",
"0.8004003",
"0.7949475",
"0.79372776",
"0.79307956",
"0.7926507",
"0.79149866",
"0.79077655",
"0.79054105",
"0.7900338",
"0.78913456",
"0.78892654",
"0.78863764",
"0.7884846",
"0.78839767",
"0.7882144",
"0.7873669",
"0.7868308",
"0.78662425",
"0.786... | 0.7914229 | 8 |
Description of runway surface type. `None` if not available. | def w4yF(YKHO) -> laHg.Union[None, str]:
w4yF = YKHO.data[3]
w4yF = ZbWC.findall('RWY surface: (.+)', w4yF)
return w4yF[0] if w4yF else None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def w4yF(YKHO):\n Efxl = ftu3(YKHO.topods_shape()).GetType()\n if Efxl == vwIV:\n return 'plane'\n if Efxl == rCIq:\n return 'cylinder'\n if Efxl == t1BQ:\n return 'cone'\n if Efxl == PUUo:\n return 'sphere'\n if Efxl == KNZg:\n return 'torus'\n if Efxl == LV... | [
"0.7507535",
"0.72148424",
"0.7195458",
"0.6143751",
"0.6143751",
"0.6143751",
"0.6143751",
"0.6143751",
"0.6143751",
"0.6143751",
"0.6084334",
"0.6082406",
"0.6082406",
"0.6082406",
"0.6082406",
"0.5947492",
"0.5945889",
"0.5938052",
"0.5927999",
"0.59271294",
"0.58862174",
... | 0.8337988 | 0 |
Helper to create an initialized Variable with weight decay. Note that the Variable is initialized with a truncated normal distribution. A weight decay is added only if one is specified. | def xSbR(YKHO, ROpF, z2bo, TI1B):
MuED = ZylS.truncated_normal_initializer(stddev=z2bo)
SRYB = ZylS.get_variable('weights', shape=ROpF, initializer=MuED)
return SRYB | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xSbR(mWFP, ROpF, z2bo, TI1B):\n SRYB = Es0b(mWFP, ROpF, initializer=ZylS.truncated_normal_initializer(stddev=z2bo, dtype=ZylS.float32))\n if TI1B is not None:\n oNEO = ZylS.multiply(ZylS.nn.l2_loss(SRYB), TI1B, name='weight_loss')\n ZylS.add_to_collection('losses', oNEO)\n return SRYB",
... | [
"0.75140905",
"0.74296427",
"0.74266",
"0.7331382",
"0.7331382",
"0.7315894",
"0.7274919",
"0.7273354",
"0.7264724",
"0.72545445",
"0.7236805",
"0.71951693",
"0.7103249",
"0.6969054",
"0.6798497",
"0.6731886",
"0.67170817",
"0.667655",
"0.65635747",
"0.6550742",
"0.6547196",
... | 0.7316302 | 5 |
Creates a new vertex with the provided information, unless a duplicate already exists in the database. | def Atwe(Z9rn, Uwyt, TKNc, q7V9, oeNL, iXlf):
xDcj = ','.join([TKNc, q7V9, str(oeNL)])
if xDcj in iXlf.keys():
iXlf[xDcj][-1].add(Uwyt)
uODQ = iXlf[xDcj][0]
return (uODQ, iXlf)
oqUi = iXlf['counter'] + 1
iXlf['counter'] += 1
H3sD = set()
H3sD.add(Uwyt)
rJkO = [oqUi, T... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ohmD(YKHO, SLBp):\n if SLBp.id not in YKHO.vertices.keys():\n YKHO.vertices[SLBp.id] = SLBp",
"def ohmD(YKHO, oqUi):\n YKHO.vertices[oqUi] = set()\n '\\n if vertex_id not in self.vertices:\\n self.vertices[vertex_id] = {}\\n\\n else:\\n return \"Ver... | [
"0.7023341",
"0.69997436",
"0.66771257",
"0.6499531",
"0.6479964",
"0.64189965",
"0.63731503",
"0.63593644",
"0.6349896",
"0.63497716",
"0.6342363",
"0.63273233",
"0.628484",
"0.628484",
"0.6282862",
"0.62793756",
"0.6236824",
"0.62117344",
"0.6182089",
"0.6170562",
"0.616551... | 0.69866663 | 2 |
Adds double quotes around the input string | def hmG8(KCHu):
KCHu = str(KCHu)
return '"' + KCHu + '"' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vPob(vIwR):\n return vIwR.replace('\"', \"'\")",
"def QqN4(KCHu):\n if not KCHu:\n return '\"\"'\n elif all((Z9rn in a_Gr for Z9rn in KCHu)):\n return KCHu\n else:\n return '\"' + KCHu.replace('\"', '\\\\\"') + '\"'",
"def xYp0(KCHu):\n return \"'{}'\".format(KCHu)",
"... | [
"0.80197185",
"0.75778174",
"0.7558612",
"0.7558612",
"0.75216377",
"0.7357164",
"0.7242684",
"0.72044283",
"0.71444243",
"0.7127985",
"0.71047366",
"0.7084999",
"0.7076033",
"0.7063414",
"0.703575",
"0.7034108",
"0.70278805",
"0.6994871",
"0.6902698",
"0.68954045",
"0.684385... | 0.7693009 | 1 |
Plot confusion matrix given X and y Note If X and y not given, use training data Return matplotlib figure object can be saved as obj.savefig('') | def tyM9(YKHO, EcVT=None, LVAh=None):
if EcVT is None and LVAh is None:
LVAh = YKHO.ytrain
elif EcVT is not None and LVAh is not None:
if isinstance(LVAh, rLdf.Series):
LVAh = YKHO.le.transform(LVAh)
else:
raise ValueError
WDHD = YKHO._predict(EcVT)
return XN37.pl... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kXdH(LVAh, nvEb, leAC, Crrw, _RR0, iMGt=QrM1.cm.Blues):\n Bcwd = YsYU(LVAh, nvEb)\n DnoE = Bcwd.astype('float') / Bcwd.sum(axis=1)[:, oyIN.newaxis]\n vjyh = aFTQ(LVAh, nvEb)\n LZpg = QrM1.figure(figsize=(10, 10))\n QrM1.imshow(DnoE, interpolation='nearest', cmap=iMGt, vmin=0, vmax=1)\n QrM1.t... | [
"0.7488487",
"0.7452592",
"0.7442257",
"0.73370373",
"0.73056525",
"0.7177896",
"0.7162475",
"0.7128709",
"0.7097752",
"0.7097081",
"0.7062196",
"0.7054716",
"0.7037424",
"0.7029118",
"0.7016283",
"0.70129234",
"0.69759333",
"0.69716394",
"0.6941338",
"0.6933181",
"0.69289416... | 0.0 | -1 |
Reshape a `tensor` to conform to a given shape.Currently torch doesn't support 16 bit tensors on cpu. | def huOL(vhpA: Tensor, oLRV: Sequence[int], s6jL: str='nearest') -> llWB:
assert s6jL in ['nearest', 'area'], "Only following resize modes are supported: 'nearest', 'area' "
if ZylS.is_tensor(vhpA):
return pHh4(vhpA, oLRV, s6jL)
elif isinstance(vhpA, ht2j.Tensor):
return ht2j.nn.functional.i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def q3V_(vhpA, etdq):\n raise NotImplementedError",
"def q3V_(vhpA):\n rdlD = ZylS.shape(vhpA)[0]\n ihqc = [rdlD, -1]\n yvT9 = ZylS.reshape(vhpA, ihqc)\n return yvT9",
"def lM46(vhpA, ROpF, OaeV):\n WyNa = vhpA._datatype_enum()\n N7Vf, (ROpF,) = nhfz.args_to_matching_eager([ROpF], OaeV, [m... | [
"0.7532104",
"0.72616476",
"0.6938396",
"0.68288803",
"0.6818953",
"0.6656605",
"0.6647852",
"0.66264313",
"0.64843637",
"0.6467933",
"0.6433559",
"0.6390068",
"0.63693494",
"0.6363407",
"0.63532853",
"0.6296335",
"0.62292653",
"0.61924976",
"0.6176196",
"0.6147967",
"0.61161... | 0.5358701 | 77 |
Ensure that the user is not passing wrong keywords when using policy_kwargs. | def f3I6(wd5T, B2fa):
if wd5T == 'mlp' and len(B2fa) > 0:
raise ValueError('Unknown keywords for policy: {}'.format(B2fa)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zOBu(piSu):\n\n def vgjZ(JfyU):\n\n @xBlr.wraps(JfyU)\n def Ch18(mWFP, JBZA, B2fa):\n IMwm = [jzdc for jzdc in B2fa.keys() if jzdc not in piSu]\n if IMwm:\n raise zIVr('Invalid kwargs for option \"{}\": \"{}\"'.format(mWFP, ' '.join(IMwm)))\n ret... | [
"0.6334507",
"0.6229454",
"0.61721796",
"0.61313355",
"0.6009598",
"0.5985709",
"0.59315604",
"0.5828801",
"0.5779185",
"0.5775942",
"0.5766666",
"0.57441235",
"0.57232225",
"0.5720929",
"0.5711281",
"0.566734",
"0.55992997",
"0.5595112",
"0.5579894",
"0.5568484",
"0.5567242"... | 0.7995728 | 0 |
ground truth, in onehot format | def ijL8(YKHO):
return ZylS.placeholder(dtype=ZylS.float32, shape=(None, YKHO._n_class), name='label') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aFAW(QWiF):\n if QWiF:\n return [1, 0]\n else:\n return [0, 1]",
"def KLLm(ijL8):\n ijL8 = ijL8.reshape(len(ijL8))\n uqVt = int(oyIN.max(ijL8)) + 1\n uqVt = 6\n return oyIN.eye(uqVt)[oyIN.array(ijL8, dtype=oyIN.int32)]",
"def KLLm(WKvO, yDqo=oyIN.float32):\n return oyIN.a... | [
"0.81171966",
"0.7639157",
"0.76262224",
"0.754561",
"0.7503727",
"0.72696173",
"0.7254412",
"0.72134036",
"0.72008246",
"0.71987766",
"0.7193573",
"0.7192733",
"0.7190283",
"0.7176916",
"0.7162557",
"0.7151551",
"0.71450466",
"0.7123999",
"0.7106279",
"0.7093663",
"0.7090800... | 0.0 | -1 |
Densely Connected Layer with hyperparamters and activation. Batch normalization inserted after nonlinearity as opposed to before as cited in Ioffe and Szegedy 2015. | def meuU(YKHO, vHnr, m1Qc, JfyU='relu', tF9S=True):
XcU5 = YKHO._weight_variable(shape=m1Qc[0])
Fg_i = YKHO._bias_variable(shape=m1Qc[1])
cOV1 = ZylS.reshape(vHnr, shape=[-1, m1Qc[0][0]])
if tF9S:
return YKHO._batch_normalize(YKHO._nonlinearity(JfyU)(ZylS.matmul(cOV1, XcU5) + Fg_i))
elif not... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def A0RF(PL8k):\n return l6ZH(vNnt, kernel_initializer=MuED())(PL8k)",
"def Ktos(YKHO, VXjJ, _mSQ, oug5):\n do44, Jarx, FJP9 = VXjJ.shape\n TLbF = VXjJ.reshape((do44 * Jarx * FJP9, 1))\n epBp = (_mSQ[0].dot(TLbF) + oug5[0]) / (_mSQ[0][0].shape[0] + 1)\n epBp[epBp <= 0] = 0\n hlel = (_mSQ[1].dot... | [
"0.7225758",
"0.68559605",
"0.6607964",
"0.6587362",
"0.65731734",
"0.655351",
"0.6544834",
"0.6480813",
"0.6450547",
"0.6435771",
"0.64159715",
"0.64090854",
"0.64044195",
"0.6397249",
"0.63936937",
"0.6392438",
"0.6385677",
"0.6379117",
"0.63715446",
"0.63371986",
"0.630498... | 0.7072137 | 1 |
Loads data for the specified city and filters by month and day if applicable. | def UlWi(j5sA, x0eS, CjKC):
if j5sA.lower() == 'chicago' or j5sA.lower() == 'c':
Ux0P = 'C:\\Neha\\Udacity\\BikeShare\\chicago.csv'
elif j5sA.lower() == 'New York' or j5sA.lower() == 'new york':
Ux0P = 'C:\\Neha\\Udacity\\BikeShare\\new_york_city.csv'
elif j5sA.lower() == 'Washington' or j5s... | {
"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.8133254",
"0.8109751",
"0.8046614",
"0.804365",
"0.8009928",
"0.8008326",
"0.8000499",
"0.7999591",
"0.79899186",
"0.7980696",
"0.7974759",
"0.7962582",
"0.795736",
"0.7948513",
"0.7947427",
"0.79095644",
"0.7909091",
"0.7905773",
"0.7902028",
"0.7894143",
"0.7890243",
"... | 0.7461542 | 92 |
Displays statistics on the most frequent times of travel. | def dWJR(jQ3Z):
print('\nCalculating The Most Frequent Times of Travel...\n')
SWox = ITS7.time()
jQ3Z['Start Time'] = rLdf.to_datetime(jQ3Z['Start Time'])
jQ3Z['hour'] = jQ3Z['Start Time'].dt.hour
pRsb = jQ3Z['hour'].mode()[0]
print('Most Popular Start Hour:', pRsb)
jQ3Z['month'] = jQ3Z['Sta... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dWJR(jQ3Z):\n print('\\nDisplaying the statistics on the most frequent times of travel...\\n')\n SWox = ITS7.time()\n hFPs = jQ3Z['Month'].mode()[0]\n print('For the selected filter, the month with the most travels is: ' + str(X_bn[hFPs - 1]).title() + '.')\n DSEJ = jQ3Z['Weekday'].mode()[0]\n ... | [
"0.80247396",
"0.80233026",
"0.7915788",
"0.78266186",
"0.7822246",
"0.78143597",
"0.77659196",
"0.7740343",
"0.773628",
"0.77344066",
"0.76867086",
"0.7668633",
"0.7651731",
"0.7644636",
"0.76399267",
"0.76367253",
"0.7625196",
"0.7623158",
"0.7612803",
"0.76002145",
"0.7583... | 0.7275329 | 59 |
Displays statistics on the most popular stations and trip. | def Huc_(jQ3Z):
print('\nCalculating The Most Popular Stations and Trip...\n')
SWox = ITS7.time()
S3Wi = jQ3Z.groupby('Start Station')['Start Station'].count()
IdSw = S3Wi.sort_values(ascending=False)
uxom = '\nMost popular start station: ' + IdSw.index[0]
qPeb = jQ3Z.groupby('End Station')['End... | {
"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.7816376",
"0.7662779",
"0.7554007",
"0.749191",
"0.7475349",
"0.7446666",
"0.7431475",
"0.7424602",
"0.74180853",
"0.74006534",
"0.7387897",
"0.73860437",
"0.73657554",
"0.7359602",
"0.73570734",
"0.7355466",
"0.7352646",
"0.7351677",
"0.7350823",
"0.73425794",
"0.7341161"... | 0.72893006 | 30 |
Displays statistics on the total and average trip duration. | def kDMA(jQ3Z):
print('\nCalculating Trip Duration...\n')
SWox = ITS7.time()
SYcA = jQ3Z['Trip Duration'].sum()
hd6L = jQ3Z['Trip Duration'].mean()
r8hN, KCHu = divmod(SYcA, 60)
MKlR, r8hN = divmod(r8hN, 60)
Csk6, MKlR = divmod(MKlR, 24)
LVAh, Csk6 = divmod(Csk6, 365)
SYcA = print('\... | {
"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.8145283",
"0.80273277",
"0.800625",
"0.79516613",
"0.79394716",
"0.7933188",
"0.79289365",
"0.7917429",
"0.79167455",
"0.79100615",
"0.79077137",
"0.7902854",
"0.7893696",
"0.7891645",
"0.7888904",
"0.7887135",
"0.78862405",
"0.7884963",
"0.78764445",
"0.7870734",
"0.78687... | 0.76926875 | 71 |
Return a file path relative to config.base_dir. | def lCCB(pmON):
import os
if pmON.startswith(oEge):
return pmON[len(oEge) + len(os.path.sep):]
return pmON | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iGvk():\n return Hy7s.path.abspath(Hy7s.path.join(Hy7s.path.dirname(xAKo), '..'))",
"def Zg0d(YKHO, lqQH=Fm4J):\n return Hy7s.path.join(lqQH, YKHO.filename)",
"def yE4I(YKHO):\n yzaj = Hy7s.path.dirname(Hy7s.path.abspath(xAKo))\n return Hy7s.path.dirname(yzaj)",
"def NE63(YKHO, qaEx):\n qa... | [
"0.7749423",
"0.76793826",
"0.76746416",
"0.75920844",
"0.75519174",
"0.75457096",
"0.74822664",
"0.72584325",
"0.7217989",
"0.7212018",
"0.72045124",
"0.7176792",
"0.71549654",
"0.7151723",
"0.71445584",
"0.7128008",
"0.7123869",
"0.70996827",
"0.70885736",
"0.70471776",
"0.... | 0.0 | -1 |
Join a room. This function puts the user in a room, under the current namespace. The user and the namespace are obtained from the event context. This is a | def iAN6(abiq):
return QePW.namespace.join_room(abiq) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vApJ(nPrm):\n NtEF = QePW.sid\n abiq = nPrm\n iAN6(abiq)\n G9jH.info(NtEF + ' has entered the room.')\n s_GD(NtEF + ' has entered the room.', room=abiq)",
"def gzes(YKHO, NtEF=None, jTXt=None):\n if NtEF is not None:\n G9jH.debug('Ignored username parameter on join(), it is unsupport... | [
"0.69718987",
"0.6957941",
"0.6855671",
"0.68236625",
"0.68236625",
"0.6760418",
"0.67351365",
"0.6723652",
"0.67204285",
"0.6649734",
"0.6625155",
"0.66217905",
"0.6597199",
"0.6554095",
"0.648366",
"0.64610386",
"0.64596605",
"0.62364256",
"0.6228655",
"0.62136847",
"0.6208... | 0.7588918 | 0 |
Constructor from a dictionary representation of the object. | def jG8h(Emd4, fGC9, Bwa6=None):
z_WG = {'home': XFez.Roster.from_dict(fGC9['rosters']['home']), 'away': XFez.Roster.from_dict(fGC9['rosters']['away'])}
lCrR = yIVm.GameMetadata.from_dict(fGC9['metadata'])
YTVa = []
for ch9c in fGC9['events']:
hEKL = ch9c['event_type']
tvqc = getattr(Emd... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jG8h(Emd4, YEnM):\n raise NotImplementedError",
"def jG8h(Emd4, nPrm):\n return Emd4(**nPrm)",
"def jG8h(Emd4, Csk6):\n return Emd4(**Csk6)",
"def jG8h(Emd4, cmPJ: Dict[str, Any]):\n return Emd4(**cmPJ)",
"def CCiu(Emd4, tbx9):\n return Emd4.from_dict(tbx9)",
"def CCiu(Emd4, tbx9):\n ... | [
"0.81675386",
"0.7939909",
"0.7925378",
"0.7887648",
"0.78722537",
"0.78722537",
"0.78722537",
"0.78722537",
"0.78722537",
"0.78722537",
"0.78722537",
"0.78722537",
"0.78722537",
"0.78722537",
"0.78722537",
"0.78722537",
"0.78722537",
"0.78722537",
"0.78722537",
"0.78722537",
... | 0.0 | -1 |
Replace invalid characters for a file path within the ``file_path`` | def Ay_O(qaEx, IK9T=''):
return mK_T.sub(IK9T, qaEx.strip()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AWVE(qaEx):\n pass",
"def VGqT(Ux0P):\n r3_g = [' ', ',', '+', '$', '_', '{', '}', '/', '&']\n FYKK = Ux0P\n for P9SZ in r3_g:\n FYKK = FYKK.replace(P9SZ, '')\n return FYKK",
"def HPFH(YKHO, pmON):\n hHld = ZbWC.finditer('\\\\%\\\\(.*?\\\\)[diouxXeEfFgGcrsa]', pmON)\n for bGrB, ... | [
"0.705184",
"0.6921472",
"0.685994",
"0.68242306",
"0.6715941",
"0.66662794",
"0.6581501",
"0.6580239",
"0.6498151",
"0.64948034",
"0.64843345",
"0.6355011",
"0.62640214",
"0.6217536",
"0.6130287",
"0.61046135",
"0.6037171",
"0.59908324",
"0.5888645",
"0.58840257",
"0.5880445... | 0.7909114 | 0 |
Tests the addition method for the case that the flle we are testing is not indexed. | def L74v(YKHO, Gb9j):
YKHO.inactive_db.database = {}
NUYP = qcWV(1970, 1, 1, 1, 0, 2, 0, tzinfo=C3G4('+', hours=1).get())
Gb9j = FM6F(wraps=qcWV)
Gb9j.utcnow = FM6F(return_value=NUYP)
kQ4O = Po4F('PyFunceble.database.inactive.datetime', new=Gb9j)
kQ4O.start()
U4ZT = 'hello.world'
aEqx = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JsCA(YKHO):\n print('test_add')\n YKHO.assertEqual(120, H2v5(100, 20))\n YKHO.assertNotEqual(3, H2v5(10, 10))",
"def JsCA(YKHO):\n YKHO.assertEqual(3, L70P.add(1, 2))\n YKHO.assertNotEqual(3, L70P.add(2, 2))",
"def JsCA(YKHO):\n YKHO.assertEqual(3, H2v5(1, 2))\n YKHO.assertNotEqual(3, ... | [
"0.668218",
"0.6668109",
"0.6655388",
"0.65338737",
"0.65218854",
"0.6499926",
"0.6483115",
"0.64665204",
"0.6419772",
"0.63010716",
"0.62950045",
"0.62094855",
"0.6133426",
"0.6090148",
"0.60828644",
"0.60505605",
"0.6024647",
"0.602135",
"0.60194373",
"0.60194373",
"0.60194... | 0.0 | -1 |
Return list of Boxes. | def c8Yy(YKHO) -> x1iM[rh6a]:
return [rh6a.from_npbox(KQog) for KQog in YKHO.boxlist.get()] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sYQy(YKHO):\n return YKHO._boxes",
"def c8Yy(YKHO):\n oUSw = [(' ', YKHO.worldbox.tl, YKHO.worldbox.br)]\n oUSw += [('.', Fg_i.tl, Fg_i.br) for Fg_i in YKHO.wallboxes]\n oUSw += [('x', Fg_i.tl, Fg_i.br) for Fg_i in YKHO.targetboxes]\n f1Tw = 100\n oUSw += [('a', (YKHO.i_state[0] - YKHO.dx *... | [
"0.79607993",
"0.765342",
"0.7435186",
"0.74128634",
"0.73214257",
"0.7180941",
"0.7139856",
"0.6799742",
"0.67231417",
"0.67105025",
"0.6701294",
"0.667834",
"0.64548504",
"0.63983184",
"0.63847095",
"0.63523287",
"0.634871",
"0.6344889",
"0.6282498",
"0.6259063",
"0.6213999... | 0.8418227 | 0 |
Creates an instance of this model from a dictionary | def rQfz(Emd4, cmPJ):
if cmPJ is None:
return None
iLMi = qRGs.models.application_parameters.ApplicationParameters.from_dictionary(cmPJ.get('applicationParameters')) if cmPJ.get('applicationParameters') else None
IGNB = cmPJ.get('enableSystemBackup')
xXFf = None
if cmPJ.get('filePaths') != N... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rQfz(Emd4, cmPJ):\n if cmPJ is None:\n return None\n id = cmPJ.get('id')\n mWFP = cmPJ.get('name')\n tDvy = cmPJ.get('type')\n fFb7 = cmPJ.get('usageBytes')\n return Emd4(id, mWFP, tDvy, fFb7)",
"def eLpg(Emd4, cmPJ):\n return Emd4(**cmPJ)",
"def eLpg(Emd4, cmPJ):\n return Em... | [
"0.83180064",
"0.81692255",
"0.81692255",
"0.81188524",
"0.8089153",
"0.7978471",
"0.7949498",
"0.7922631",
"0.78985846",
"0.7894865",
"0.78879577",
"0.78826904",
"0.78814775",
"0.78771174",
"0.78584737",
"0.78399473",
"0.7803621",
"0.7803621",
"0.7803621",
"0.7803621",
"0.78... | 0.0 | -1 |
Whether the course is likely to be offered in the future semester | def YZ46(YKHO):
if YKHO.score >= 5:
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KiOp(jboQ: float, PMU2: int, YPqY: str) -> bool:\n return jboQ >= 2 and PMU2 == (2 or 3) and (YPqY == 'CS')",
"def j6YD(YKHO):\n return YKHO.semester > '2022A'",
"def t9ZS(Sadh, LEp0, CsuE):\n for rXk1, mze9 in Sadh.items():\n if mze9 == -1:\n continue\n if LEp0 <= mze9 < ... | [
"0.6813464",
"0.6636036",
"0.61553955",
"0.6137581",
"0.6125385",
"0.61212665",
"0.6110093",
"0.6083633",
"0.6083135",
"0.6070616",
"0.6009461",
"0.59633106",
"0.5963247",
"0.59465426",
"0.5932103",
"0.5923425",
"0.58640134",
"0.5856844",
"0.5846142",
"0.5819533",
"0.57442725... | 0.5745183 | 20 |
Returns a QuerySet of Comic objects that a user can follow. Includes ended comics. | def aSSZ():
return x45A.objects.exclude(active=False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HX8s(YKHO):\n return KQdn.Follows(YKHO)",
"def kvzd(YKHO):\n return L9Jq.objects.filter(customer__in=YKHO.following.all())",
"def jjt2(YKHO, U34r):\n CBIr = U34r.context.user\n jQc4 = z1Ft.objects.filter(follower=CBIr.id, pending=False)\n return [NTN7.following for NTN7 in jQc4]",
"def Dmf... | [
"0.5666129",
"0.5524653",
"0.5524334",
"0.5520189",
"0.5514745",
"0.5514533",
"0.54982233",
"0.5471906",
"0.5469596",
"0.53893137",
"0.5379109",
"0.5358484",
"0.5350618",
"0.5344652",
"0.5304118",
"0.52893806",
"0.52867645",
"0.5278242",
"0.52769315",
"0.52633667",
"0.5214156... | 0.58848065 | 0 |
True if `pos` is a position inside the picture, i.e. it is valid coordinates. | def EDs6(oeNL):
rdlD, fvDH = oeNL
return 0 <= rdlD and rdlD < NwL4 and (0 <= fvDH) and (fvDH < ulBT) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IQ5w(YKHO, oeNL):\n WKvO, LVAh = oeNL\n return WKvO >= YKHO.posx and WKvO <= YKHO.posx + YKHO.sizex and (LVAh >= YKHO.posy) and (LVAh <= YKHO.posy + YKHO.sizey)",
"def deVW(YKHO, oeNL):\n oeNL = PvyL(oeNL)\n return 0 <= oeNL.x < YKHO.dims.width and 0 <= oeNL.y < YKHO.dims.height",
"def ETZU(oeN... | [
"0.8039734",
"0.8032641",
"0.77321994",
"0.7407808",
"0.7394166",
"0.73731244",
"0.73541284",
"0.7316801",
"0.7276194",
"0.7261473",
"0.72025096",
"0.715476",
"0.71473926",
"0.7144952",
"0.7128135",
"0.7121988",
"0.71028787",
"0.7054023",
"0.7021065",
"0.6980572",
"0.6908801"... | 0.7929574 | 2 |
Testing with valid user and valid perms. | def OpLy(YKHO):
YKHO.client.login(username='hodor', password='hodor')
ETXm.objects.create(user=YKHO.user, access_level=2).save()
geh0 = YKHO.client.post('/categories/add/', {'categoryType': 'tr0npr0n'})
YKHO.assertRedirects(geh0, '/categories/') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Hd8S(YKHO):\n nPrm = {'users': {1: 'view', 2: 'NONE'}}\n with YKHO.assertRaises(Bx6I.PermissionDenied):\n x8bO(nPrm, 1)\n with YKHO.assertRaises(Bx6I.PermissionDenied):\n x8bO(nPrm, 2)\n x8bO(nPrm, 3)",
"def it0w(YKHO):\n H7Sp = YKHO.test_save('TestGroup0', CDIB)\n KNEa = YKHO... | [
"0.7235732",
"0.6979977",
"0.6947357",
"0.67851806",
"0.6714532",
"0.6711313",
"0.66932464",
"0.6651339",
"0.663046",
"0.66159356",
"0.66043603",
"0.6602387",
"0.66009283",
"0.65911335",
"0.6587814",
"0.65618485",
"0.6526881",
"0.64902717",
"0.64871144",
"0.6484826",
"0.64596... | 0.0 | -1 |
Check that we do not accept edit with duplicate category name | def S9ZZ(YKHO):
YKHO.client.login(username='hodor', password='hodor')
ETXm.objects.create(user=YKHO.user, access_level=2).save()
geh0 = YKHO.client.post('/categories/edit/%s' % YKHO.category1.id, {'categoryType': 'AnotherTestCategoryType'})
YKHO.assertContains(geh0, 'already exists') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FI_p(YKHO, KBgZ, PObu, A07C, QpfX=None):\n for Ghho in YKHO.browse(KBgZ, PObu, A07C, context=QpfX):\n if len(YKHO.search(KBgZ, PObu, [('name', '=ilike', Ghho.name)], context=QpfX)) > 1:\n raise SuBO.except_osv(bGrB('Constraint Error'), bGrB('The Name Must Be Unique!'))\n return True",
... | [
"0.7429591",
"0.712183",
"0.711979",
"0.68612355",
"0.67351437",
"0.662806",
"0.66199476",
"0.6533732",
"0.6521902",
"0.64852035",
"0.6462641",
"0.6460746",
"0.6418229",
"0.63512856",
"0.634182",
"0.62515837",
"0.6117465",
"0.6107377",
"0.61037683",
"0.60956603",
"0.60841376"... | 0.781898 | 0 |
Check behaviour of view_all_categories if no category exists. We should not get any errors | def M50i(YKHO):
YKHO.client.login(username='hodor', password='hodor')
ETXm.objects.create(user=YKHO.user, access_level=2).save()
qZuN.objects.all().delete()
geh0 = YKHO.client.get('/categories/')
YKHO.assertEqual(geh0.status_code, 200)
YKHO.assertTemplateUsed(geh0, 'view_categories.html')
YK... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def o3WZ(YKHO):\n geh0 = YKHO.client.get(gxEw('closetclient:index'))\n YKHO.assertEqual(geh0.status_code, 200)\n YKHO.assertContains(geh0, 'No Categorys are available.')\n YKHO.assertQuerysetEqual(geh0.context['latest_category_list'], [])",
"def dqe5(YKHO):\n for ACia in eu_J:\n if not qZuN... | [
"0.77666897",
"0.7501498",
"0.7445073",
"0.73836553",
"0.7130899",
"0.6778781",
"0.6734663",
"0.6679412",
"0.66671926",
"0.6444569",
"0.64389026",
"0.6423348",
"0.6385631",
"0.63782746",
"0.6318286",
"0.62828165",
"0.6267523",
"0.6264924",
"0.62387925",
"0.6234147",
"0.622098... | 0.6971685 | 5 |