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 |
|---|---|---|---|---|---|---|
This is a helper function to turn the values of the keys of a python dictionary into a string. This is utilized for cleaning the swipes dataframe. | def hkWs(Csk6):
dh64 = {}
for H5ew, BWXx in Csk6.items():
dh64[H5ew] = str(BWXx)
return dh64 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E446(Csk6):\n return {str(G1Hx): Ty9i for G1Hx, Ty9i in Csk6.items()}",
"def dI34(cmPJ):\n if not isinstance(cmPJ, dict):\n return cmPJ\n return dict(((str(G1Hx), dI34(Ty9i)) for G1Hx, Ty9i in cmPJ.items()))",
"def RjrO(cmPJ):\n if not isinstance(cmPJ, dict):\n return cmPJ\n re... | [
"0.77008075",
"0.7463135",
"0.73454076",
"0.73070514",
"0.7253955",
"0.71603686",
"0.71259487",
"0.7066297",
"0.70552695",
"0.7034173",
"0.6974902",
"0.69219834",
"0.6862053",
"0.6799316",
"0.6796374",
"0.6788022",
"0.672934",
"0.6727243",
"0.6701444",
"0.6661141",
"0.6645962... | 0.60535806 | 46 |
Initialize the fake dataset. | def FIMM(YKHO, ZTY2, kraN):
assert len(ZTY2) == len(kraN)
YKHO.reps_batches = ZTY2
YKHO.feats_batches = kraN | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FCbF(YKHO):\n YKHO.dataset = YKHO.dataset_cls()",
"def FCbF(YKHO):\n YKHO.dataset = eis1()",
"def FIMM(YKHO):\n YKHO.__dataset = None",
"def FIMM(YKHO, __n6):\n YKHO._dataset = __n6",
"def FIMM(YKHO, __n6: Dataset):\n YKHO.dataset = __n6",
"def FCbF(YKHO):\n YKHO.directory = gbPf.Te... | [
"0.7854854",
"0.7644687",
"0.7560155",
"0.7505176",
"0.74379903",
"0.7395882",
"0.729152",
"0.72197926",
"0.70108587",
"0.6961162",
"0.6961162",
"0.6961162",
"0.6961162",
"0.6912438",
"0.69077843",
"0.6864246",
"0.68624324",
"0.6847528",
"0.6818014",
"0.6760041",
"0.67426294"... | 0.0 | -1 |
Returns batches of fake feature tensors for testing. | def bySB():
return tuple((ht2j.randint(GIfl, size=(q4aw,)) for q4aw in Ep51)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yViz(Ep8u, zi3C, WAcC):\n\n def N9CW(YRbF):\n jzdc = oyIN.zeros(zi3C, 'uint8')\n jzdc[YRbF] = 1\n return jzdc.tolist()\n iwRO = [[N9CW(2), N9CW(20)], [N9CW(5)]]\n Y3Wc = [[2, 10], [31]]\n\n def Nhbp(g4y1, Crrw):\n \"\"\"Converts the data into tf.train.SequenceExample.\"\... | [
"0.6421488",
"0.6393712",
"0.638047",
"0.61864674",
"0.618429",
"0.61762345",
"0.61470693",
"0.6135591",
"0.6072262",
"0.5994537",
"0.59875",
"0.59683275",
"0.5942359",
"0.59387666",
"0.59304696",
"0.58740455",
"0.5843243",
"0.5838933",
"0.5832894",
"0.5822024",
"0.5821198",
... | 0.0 | -1 |
Test the PUT and GET methods for ratings. | def PZ6q(YKHO):
YKHO.signup('user@example.com', 'user')
YKHO.login('user@example.com')
MUsr = YKHO.get_csrf_token_from_response(YKHO.testapp.get('/explore/%s' % YKHO.EXP_ID))
mwlV = YKHO.get_json('/explorehandler/rating/%s' % YKHO.EXP_ID)
YKHO.assertEqual(mwlV['user_rating'], None)
YKHO.assertEq... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TiIo(YKHO):\n Kr1P = {'user': YKHO.user.pk, 'book': YKHO.book.pk, 'rating': tuKI.randint(1, 5)}\n YKHO.client.post(YKHO.list_url, data=Kr1P)\n YKHO.book.refresh_from_db()\n assert YKHO.book.ratings.count() == 1\n YKHO.assertAlmostEqual(YKHO.book.average_rating, Kr1P['rating'])",
"def U41I(YKHO... | [
"0.7492016",
"0.7311704",
"0.70145845",
"0.69894004",
"0.685951",
"0.6665553",
"0.6469139",
"0.63895595",
"0.6316338",
"0.6277417",
"0.6271246",
"0.6263864",
"0.62464947",
"0.6229114",
"0.62232953",
"0.6206158",
"0.6195368",
"0.61885506",
"0.61521053",
"0.61303055",
"0.609022... | 0.81327856 | 0 |
test to see if invalid file raises an error | def yRS_(YKHO):
YKHO.assertRaises(JPHO.checkFile('blah', 'write')) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pP2J():\n with trZe.raises(ValueError):\n GSyo._valid_file(xAKo)",
"def UtdG(YKHO, nUeQ):\n try:\n bGrB = open(f'{nUeQ}')\n except FileNotFoundError:\n raise ValueError",
"def w_ae(qaEx):\n assert JgkM(qaEx), 'Training file is not generated'",
"def mxSk(YKHO):\n VF9Z =... | [
"0.81236607",
"0.7607157",
"0.7492643",
"0.7416563",
"0.7364817",
"0.73632103",
"0.73626834",
"0.7345573",
"0.72771174",
"0.7237749",
"0.7233718",
"0.7233718",
"0.7232252",
"0.72104526",
"0.7196611",
"0.7165781",
"0.71577656",
"0.71485966",
"0.7146494",
"0.713752",
"0.7123104... | 0.79525465 | 1 |
Hide widgets used to replace | def hKnM(YKHO):
YKHO.ui.replaceLabel.setVisible(False)
YKHO.ui.textToReplace.setVisible(False)
YKHO.ui.replaceButton.setVisible(False)
YKHO.ui.replaceAllButton.setVisible(False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Afoa(YKHO):\n YKHO.row_box.grid_remove()\n YKHO.field_name_box.grid_remove()\n YKHO.field_name_label.grid_remove()\n YKHO.value_box.grid_remove()\n YKHO.active_value_widget.grid_remove()",
"def Afoa(YKHO):\n YKHO.visible = False",
"def Rzeh(YKHO):\n YKHO.visible = True",
"def Afoa(YK... | [
"0.74319285",
"0.7316716",
"0.7252604",
"0.72415304",
"0.7231562",
"0.7176774",
"0.71270937",
"0.7087486",
"0.703734",
"0.70190805",
"0.70034736",
"0.6990393",
"0.69851243",
"0.6911782",
"0.6890413",
"0.6885022",
"0.6860507",
"0.68448097",
"0.6836431",
"0.68210477",
"0.680342... | 0.8568544 | 0 |
Error handler for all 404 not found errors | def DCL3(P1dF):
return (pz3A({'success': False, 'message': 'Resource not found', 'error': 404}), 404) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BQf5(P1dF):\n return TvZl('error.404.html')",
"def EEM3(YKHO):\n RKD7.err('HTTP Error 404')",
"def Ouod(PNq_):\n return (404, [], zGZ6('Not Found', PNq_['PATH_INFO']))",
"def zFDo(QePW):\n geh0 = SGJU('404.html', {})\n geh0.status_code = 404\n return geh0",
"def RQdI(P1dF):\n retur... | [
"0.8089497",
"0.78269464",
"0.77300256",
"0.77166814",
"0.77091134",
"0.7680059",
"0.7672964",
"0.7623633",
"0.7596676",
"0.75720745",
"0.7541706",
"0.7536495",
"0.75059175",
"0.747122",
"0.7401486",
"0.73624086",
"0.7351865",
"0.7324612",
"0.73184705",
"0.73124677",
"0.72939... | 0.67667943 | 79 |
Specifies rate from total number of points on grid, which should be refined. | def HWQk(YKHO, BWXx):
YKHO._refinement.setAdaptRate(BWXx)
return YKHO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rp5a(YKHO):\n VOlW = YKHO.data.iloc[2, 0] - YKHO.data.iloc[1, 0]\n YKHO.rate = int(1 / VOlW)",
"def HuEn(YKHO, mVUw):\n YKHO.recruit = int(oyIN.ceil(YKHO.INITIAL_POPULATION * mVUw))",
"def mVUw(YKHO, mVUw):\n YKHO._rate = mVUw",
"def mVUw(YKHO, mVUw):\n YKHO._rate = mVUw",
"def ZJGP(YKHO... | [
"0.7054117",
"0.6552802",
"0.6418355",
"0.6418355",
"0.6328499",
"0.611493",
"0.6067628",
"0.60670006",
"0.60062164",
"0.59988433",
"0.59878546",
"0.5920879",
"0.591833",
"0.5895778",
"0.5889928",
"0.5859504",
"0.5846122",
"0.5800671",
"0.5792975",
"0.57916087",
"0.5785541",
... | 0.5349811 | 81 |
Function that applies normalization to the data by subtracting the mean and dividing by the std for every observation in each column | def kdro(jQ3Z, Crrw=True):
jQ3Z.columns = jQ3Z.columns.str.lstrip()
LVAh = None
if Crrw:
LVAh = jQ3Z['ATT_FLAG']
jQ3Z.drop(['ATT_FLAG'], axis=1, inplace=True)
yQww = rLdf.DataFrame(txNa().fit_transform(jQ3Z.values), index=jQ3Z.index, columns=jQ3Z.columns)
return (yQww, LVAh) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n2ri(jQ3Z):\n return jQ3Z.apply(lambda iVRZ: (iVRZ - iVRZ.mean()) / iVRZ.std())",
"def hWT_(nPrm):\n JBMS = nPrm.mean(axis=0)\n M1Jx = nPrm.std(axis=0)\n return (nPrm - JBMS) / M1Jx",
"def hWT_(EcVT):\n qQqn = EcVT\n JBMS = EcVT.mean(axis=0)\n M1Jx = EcVT.std(axis=0)\n for fvDH in r... | [
"0.8147484",
"0.814717",
"0.8068044",
"0.7960649",
"0.7960649",
"0.7911893",
"0.78902406",
"0.7857458",
"0.784475",
"0.7807569",
"0.7793336",
"0.7769386",
"0.77469194",
"0.7719458",
"0.7718339",
"0.7573229",
"0.75375575",
"0.7471872",
"0.74626684",
"0.7452656",
"0.74139076",
... | 0.0 | -1 |
Return the bin width to use for normalizing bin contents. returns The bin width to use as the denominator for plotting bin contents. If 'None', bin contents should be displayed without normalizing to a fixed bin width. | def PXrs(YKHO, _Cnz):
nkck = _Cnz.get('normalize_bin_size', 'auto')
if nkck == 'auto':
nJ9F, o4D3 = YKHO.histogram.axis.getBinRange(0)
nkck = o4D3 - nJ9F
return nkck | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jtTA(YKHO):\n return YKHO.bins[2] - YKHO.bins[1]",
"def bFc4(YKHO):\n YKHO.binWidth = (YKHO.data[-1] - YKHO.data[0]) / YKHO.numBins\n for YRbF in range(YKHO.numBins):\n YKHO.frequencies.append(0)",
"def vq1G(YKHO, _Cnz):\n nkck = _Cnz.get('normalize_bin_size', 'auto')\n if nkck == 'au... | [
"0.78802156",
"0.7723355",
"0.7381942",
"0.7069086",
"0.70071006",
"0.6869877",
"0.66121763",
"0.6534182",
"0.62684083",
"0.62300706",
"0.6190163",
"0.6182235",
"0.6143632",
"0.6112729",
"0.5990901",
"0.59051055",
"0.59008485",
"0.5886812",
"0.5852261",
"0.5842295",
"0.582263... | 0.79796773 | 0 |
Return the bin widths to use for normalizing bin contents. returns The two bin widths to use as the denominator for plotting bin contents. If 'None', bin contents should be displayed without normalizing to a fixed bin width. | def vq1G(YKHO, _Cnz):
nkck = _Cnz.get('normalize_bin_size', 'auto')
if nkck == 'auto':
nJ9F, o4D3 = YKHO.histogram.axes[0].getBinRange(0)
nxyw, si3g = YKHO.histogram.axes[1].getBinRange(0)
return (o4D3 - nJ9F, si3g - nxyw)
elif nkck is None:
return None
else:
Lkng... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def L3es(YKHO):\n Imlj = [YKHO._lowbinedges[YRbF + 1] - YKHO._lowbinedges[YRbF] for YRbF in range(len(YKHO._lowbinedges) - 1)]\n return Imlj",
"def PXrs(YKHO, _Cnz):\n nkck = _Cnz.get('normalize_bin_size', 'auto')\n if nkck == 'auto':\n nJ9F, o4D3 = YKHO.histogram.axis.getBinRange(0)\n ... | [
"0.7677445",
"0.7472313",
"0.736145",
"0.7269431",
"0.72542816",
"0.71608865",
"0.7037428",
"0.66407084",
"0.6169346",
"0.6142871",
"0.60611624",
"0.5948143",
"0.59319663",
"0.5915866",
"0.5915866",
"0.5770978",
"0.57363",
"0.57347083",
"0.57191324",
"0.56850314",
"0.5680741"... | 0.7792254 | 0 |
Load an image from file into a numpy array. Puts image into numpy array to feed into tensorflow graph. Note that by convention we put it into a numpy array with shape (height, width, channels), where channels=3 for RGB. | def IrN9(YKHO, pmON):
return oyIN.array(hnIv.open(pmON)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IrN9(pmON):\n ThLH = ZylS.io.gfile.GFile(pmON, 'rb').read()\n LNo8 = hnIv.open(aKaX(ThLH))\n nbX2, t4ML = LNo8.size\n return oyIN.array(LNo8.getdata()).reshape((t4ML, nbX2, 3)).astype(oyIN.uint8)",
"def IrN9(pmON):\n return oyIN.array(hnIv.open(pmON))",
"def IrN9(pmON):\n return oyIN.arra... | [
"0.78665286",
"0.77754813",
"0.77754813",
"0.7717838",
"0.7716612",
"0.77052444",
"0.770156",
"0.7623063",
"0.76111406",
"0.7500111",
"0.74317414",
"0.7402159",
"0.7348851",
"0.73125565",
"0.7294386",
"0.72750413",
"0.7240601",
"0.7219427",
"0.7202111",
"0.7185911",
"0.718137... | 0.74526995 | 10 |
return NGramsSequence object from dict | def pktP(Emd4, k3N2: str, nPrm: Dict[str, Any]):
aWuw = Emd4(k3N2)
aWuw.total_count = nPrm['total_count']
aWuw.next_count = nPrm['next_count']
return aWuw | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pktP(Emd4, nPrm: Dict[str, Any]) -> fOdl:\n HyjZ: int = nPrm['n_grams']\n XzgL = Emd4(HyjZ)\n C3ST: cuzp[str, tIrr] = {}\n for aWuw, fQat in nPrm['model'].items():\n C3ST[aWuw] = tIrr.from_json(aWuw, fQat)\n XzgL.model = C3ST\n XzgL.count_map = Emd4.dict_str_to_int(nPrm['count_map'])\n... | [
"0.5980302",
"0.5829396",
"0.57926756",
"0.54370123",
"0.5435297",
"0.53666174",
"0.536562",
"0.5347345",
"0.52914196",
"0.5288009",
"0.5184858",
"0.516624",
"0.5155609",
"0.5145033",
"0.51327556",
"0.51326644",
"0.51249367",
"0.5122596",
"0.5116368",
"0.51152927",
"0.5110895... | 0.0 | -1 |
dict with string keys to int | def B4an(YEnM: Dict[str, Any]) -> cuzp[int, ImMB]:
Ylbp: cuzp[str, ImMB] = {}
for H5ew, wEf2 in YEnM.items():
Ylbp[int(H5ew)] = wEf2
return Ylbp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UnH3(nPrm):\n return {int(G1Hx): nPrm[G1Hx] for G1Hx in sorted(nPrm.keys())}",
"def fYQT(dict):\n hlel = {}\n for H5ew, BWXx in dict.items():\n hlel[int(H5ew)] = BWXx\n return hlel",
"def ha_G(aoD7, sjXb):\n for G1Hx, Ty9i in aoD7.items():\n if G1Hx in sjXb:\n aoD7[G... | [
"0.79824007",
"0.71892446",
"0.71380085",
"0.7126491",
"0.70278645",
"0.6609454",
"0.65651965",
"0.6549052",
"0.65419114",
"0.649324",
"0.6477879",
"0.6453551",
"0.64230794",
"0.63829917",
"0.63057864",
"0.62804836",
"0.6260816",
"0.6231681",
"0.6182311",
"0.61225575",
"0.609... | 0.7465834 | 1 |
return NGramsSequence object from dict | def pktP(Emd4, nPrm: Dict[str, Any]) -> fOdl:
HyjZ: int = nPrm['n_grams']
XzgL = Emd4(HyjZ)
C3ST: cuzp[str, tIrr] = {}
for aWuw, fQat in nPrm['model'].items():
C3ST[aWuw] = tIrr.from_json(aWuw, fQat)
XzgL.model = C3ST
XzgL.count_map = Emd4.dict_str_to_int(nPrm['count_map'])
XzgL.n_1_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Fhxj(YKHO, exwG, Op6c={}):\n if YKHO.sequence == '':\n YKHO.fetchSequence()\n YKHO.sequence = YKHO.sequence.upper()\n for YRbF in range(0, len(YKHO.sequence) - exwG):\n Rkvh = YKHO.sequence[YRbF:][:exwG]\n Op6c[Rkvh] = 1 + Op6c.get(Rkvh, 0)\n del Rkvh\n return Op6c",
"... | [
"0.5829396",
"0.57926756",
"0.54370123",
"0.5435297",
"0.53666174",
"0.536562",
"0.5347345",
"0.52914196",
"0.5288009",
"0.5184858",
"0.516624",
"0.5155609",
"0.5145033",
"0.51327556",
"0.51326644",
"0.51249367",
"0.5122596",
"0.5116368",
"0.51152927",
"0.5110895",
"0.5110315... | 0.5980302 | 0 |
Renders the home page. | def kZiy():
return TvZl('index.html', title='Home Page', year=qcWV.now().year) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bVaH():\n return TvZl('index.html')",
"def kZiy():\n return TvZl('home_page.html')",
"def kZiy():\n return TvZl('home.html')",
"def kZiy():\n return TvZl('home.html')",
"def kZiy():\n return TvZl('home.html')",
"def kZiy():\n return TvZl('home.html')",
"def kZiy():\n return TvZ... | [
"0.85574406",
"0.853399",
"0.8351404",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.82762724",
"0.827363",
"... | 0.8061255 | 43 |
Initilizes the whole event loop with a seperated thread, where the event loop is running. | def yKcO(YKHO):
if YKHO.thread is None:
YKHO.thread = T6FA.Thread(target=YKHO.__run__, daemon=True)
YKHO.thread.start()
S0MI.debug('Starting thread `%s` for event loop `%s`.', YKHO.ident, YKHO.thread.ident) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def locw(YKHO):\n if YKHO.loop is not None:\n raise Exception('Event loop is already started!')\n YKHO.loop = V7ok.new_event_loop()\n YKHO.thread = Esm4(target=oWRi, args=(YKHO.loop,))\n YKHO.thread.setDaemon(True)\n YKHO.thread.start()",
"def C0CK(YKHO):\n pU0a = V7ok.get_event_loop_pol... | [
"0.7944864",
"0.78450817",
"0.76813805",
"0.7136728",
"0.7033592",
"0.70063716",
"0.69827086",
"0.6961245",
"0.69509304",
"0.69415987",
"0.6894436",
"0.6876219",
"0.6876219",
"0.6876219",
"0.6876219",
"0.68324876",
"0.6806173",
"0.6727917",
"0.6713544",
"0.6713544",
"0.662690... | 0.7894374 | 1 |
Get an environment variable safely, tries to load it from file if not found. | def FUrY(H5ew: str) -> str:
try:
return PNq_[H5ew]
except KeyError as exc:
oagM = GkAb(uwaB.ENV_FILE_DEFAULT_PATH.value)
if oagM.exists() and oagM.is_file():
try:
zKSo()
return PNq_[H5ew]
except KeyError as exc:
rais... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YH6L(XuY2, pXt1=False):\n if pXt1:\n if XuY2 not in Hy7s.environ.keys():\n return None\n assert XuY2 in Hy7s.environ.keys(), 'Please supply %s in environment' % XuY2\n return Hy7s.environ[XuY2]",
"def Cu40(YKHO, XuY2, CYSX=False):\n try:\n return PNq_[XuY2]\n except Ke... | [
"0.737349",
"0.73287576",
"0.7326425",
"0.7326145",
"0.7195848",
"0.7175811",
"0.71706396",
"0.71382815",
"0.7109022",
"0.7074804",
"0.70155084",
"0.7013515",
"0.70077306",
"0.69910717",
"0.69632024",
"0.6936707",
"0.6902253",
"0.68668413",
"0.67869276",
"0.6769845",
"0.67567... | 0.7102582 | 9 |
Responsible for displaying user's fridge. Note that form to add an ingredient is also shown here, as there is no need for a separate page for such a small form. | def UilB(QePW):
CBIr = QePW.user
vIQn = o276.objects.get_or_create(user=CBIr)[0]
zKHR = NqdW.objects.filter(fridge=vIQn)
AHLC = vIQn.recipes.all()
if QePW.method == 'POST':
L03z = _yaX(QePW.POST)
if L03z.is_valid():
o36Q = L03z.save(commit=False)
try:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UjEH(QePW):\n CBIr = QePW.user\n vIQn = o276.objects.get_or_create(user=CBIr)[0]\n tl_G = vIQn.ingredients.all()\n glP1 = [uBMr.name for uBMr in tl_G]\n AHLC = MuXg(glP1, fridge=vIQn)\n hGN5 = {'ingredients': glP1, 'recipes': AHLC}\n return _1tc(QePW, 'fridge/fridge_recipes.html', hGN5)",
... | [
"0.71831393",
"0.67995745",
"0.67022413",
"0.60869473",
"0.6061109",
"0.5985206",
"0.58212996",
"0.5779938",
"0.576676",
"0.57642764",
"0.5740424",
"0.5723733",
"0.56843567",
"0.566176",
"0.563532",
"0.55935574",
"0.5491119",
"0.5479765",
"0.544285",
"0.5428146",
"0.5427262",... | 0.7832167 | 0 |
Render website's home page. | def kZiy(H5ew):
dixj = []
_hkX = G4JS.get(dK7R.format(H5ew))
if _hkX.ok:
GChh = kJm3.StringIO(_hkX.content)
HGCR = m6_J.DictReader(GChh)
for rdlD in HGCR:
dixj.append(rdlD)
return oGir(response=qQXR.dumps(dixj), status=200, mimetype='application/json') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bVaH():\n return TvZl('index.html')",
"def kZiy():\n return TvZl('homepage.html')",
"def kZiy():\n return TvZl('home_page.html')",
"def C_QL():\n return TvZl('home/index.html', title='Bem vindo!')",
"def C_QL():\n return TvZl('home/a_homepage.html', title='Welcome')",
"def C_QL():\n ... | [
"0.8724249",
"0.85791856",
"0.850329",
"0.84860355",
"0.84612614",
"0.84362435",
"0.8429879",
"0.8419578",
"0.8396612",
"0.8396612",
"0.8374868",
"0.8356488",
"0.8350785",
"0.8340763",
"0.8340763",
"0.83374727",
"0.83374727",
"0.83374727",
"0.83374727",
"0.83374727",
"0.83374... | 0.0 | -1 |
Add headers to both force latest IE rendering engine or Chrome Frame, and also to cache the rendered page for 10 minutes. | def PYz4(geh0):
geh0.headers['X-UA-Compatible'] = 'IE=Edge,chrome=1'
geh0.headers['Cache-Control'] = 'public, max-age=600'
return geh0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PYz4(geh0):\n geh0.headers['X-UA-Compatible'] = 'IE=Edge,chrome=1'\n geh0.headers['Cache-Control'] = 'public, max-age=60'\n return geh0",
"def PYz4(geh0):\n geh0.headers['X-UA-Compatible'] = 'IE=Edge,chrome=1'\n geh0.headers['Cache-Control'] = 'public, max-age=0'\n return geh0",
"def PYz4... | [
"0.82236516",
"0.81961995",
"0.8163723",
"0.8163723",
"0.8163723",
"0.8163723",
"0.8163723",
"0.8163723",
"0.8163723",
"0.8163723",
"0.8163723",
"0.8163723",
"0.8163723",
"0.8163723",
"0.8163723",
"0.8163723",
"0.8163723",
"0.8163723",
"0.8163723",
"0.8163723",
"0.8163723",
... | 0.8222848 | 4 |
Get botocore package version. | def jyK4() -> str:
return RW0X | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gfwy() -> str:\n try:\n from aiobotocore import __version__ as DpZH\n except ImportError:\n raise RuntimeError('aiobotocore is not installed')\n return DpZH",
"def HKH9() -> str:\n return M7qq",
"def cEOP() -> str:\n try:\n from aioboto3 import __version__ as DpZH\n e... | [
"0.78680444",
"0.765513",
"0.71913964",
"0.715537",
"0.7147764",
"0.7147764",
"0.7147764",
"0.70105004",
"0.6968503",
"0.6928803",
"0.692623",
"0.6907918",
"0.6907567",
"0.6907567",
"0.6891363",
"0.68780994",
"0.68743736",
"0.6862947",
"0.683245",
"0.68177754",
"0.68081677",
... | 0.8543725 | 0 |
Get boto3 package version. | def HKH9() -> str:
return M7qq | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cEOP() -> str:\n try:\n from aioboto3 import __version__ as DpZH\n except ImportError:\n raise RuntimeError('aioboto3 is not installed')\n return DpZH",
"def jyK4() -> str:\n return RW0X",
"def gfwy() -> str:\n try:\n from aiobotocore import __version__ as DpZH\n exce... | [
"0.8140883",
"0.7582766",
"0.71447617",
"0.6887908",
"0.6887908",
"0.6887908",
"0.68872106",
"0.6879318",
"0.68086505",
"0.68086505",
"0.6804615",
"0.67819107",
"0.6779405",
"0.67780316",
"0.67723364",
"0.67608714",
"0.6757582",
"0.6746531",
"0.67390364",
"0.672341",
"0.67187... | 0.871558 | 0 |
Converts binary (l, 1) array to onehot (l, 2) array | def QfEj(ezWE: np.ndarray) -> oyIN.ndarray:
Ylbp = oyIN.zeros((ezWE.shape[0], 2))
Ylbp[oyIN.where(ezWE == 1)[0], 0] = 1
Ylbp[oyIN.where(ezWE == 0)[0], 1] = 1
return Ylbp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zGX0(WKvO):\n hlel = oyIN.zeros((len(WKvO), 10))\n for YRbF, r845 in enumerate(WKvO):\n hlel[YRbF, r845] = 1\n return hlel",
"def zGX0(WKvO):\n SxSJ = list(WKvO)\n for d6pt in oyIN.arange(len(SxSJ)):\n SxSJ[d6pt] = dmUM(WKvO[d6pt])[WKvO[d6pt]]\n return oyIN.array(SxSJ)",
"de... | [
"0.8280845",
"0.80964357",
"0.80849147",
"0.8008895",
"0.79582685",
"0.78934133",
"0.78606147",
"0.78175247",
"0.77903146",
"0.7769803",
"0.776282",
"0.7757748",
"0.77461106",
"0.77360934",
"0.77356505",
"0.77163607",
"0.7714669",
"0.76704556",
"0.76672757",
"0.7661375",
"0.7... | 0.82738936 | 1 |
Converts likelihood array back to one hot depending on highest value | def E3DW(ezWE: np.ndarray) -> oyIN.ndarray:
return QfEj(oyIN.argmin(ezWE, axis=1)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xAV3(KeL5):\n return Kt_s.extra_ops.to_one_hot(Kt_s.argmax(KeL5, -1), KeL5.shape[-1])",
"def ymiX(LNo8):\n WKvO = oyIN.argmax(LNo8, axis=-1)\n return WKvO",
"def ELEM(GQ7f):\n return oyIN.argmax(GQ7f, axis=1)",
"def ymiX(LNo8):\n LNo8 = LNo8.permute(1, 2, 0)\n WKvO = ht2j.argmax(LNo8, d... | [
"0.72739863",
"0.7112829",
"0.7071621",
"0.7028016",
"0.654678",
"0.6461915",
"0.64383554",
"0.6425988",
"0.6425061",
"0.64052826",
"0.6384727",
"0.63543844",
"0.6338996",
"0.62720567",
"0.62135184",
"0.6200054",
"0.61939496",
"0.6177994",
"0.6171241",
"0.61653167",
"0.616386... | 0.69912195 | 4 |
Save a checkpoint file to `checkpoint_dir`. | def IRyE(C3ST, qtWj, bPTx, eQSh):
QTBn = {'epoch': qtWj, 'state_dict': C3ST.state_dict(), 'stats': eQSh}
Ux0P = Hy7s.path.join(bPTx, 'epoch={}.checkpoint.pth.tar'.format(qtWj))
ht2j.save(QTBn, Ux0P) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IRyE(YKHO, bPTx):\n if not Hy7s.path.exists(bPTx):\n Hy7s.makedirs(bPTx)\n pmON = Hy7s.path.join(bPTx, 'model.pt')\n ht2j.save(YKHO.model.state_dict(), pmON)",
"def xkzz(YKHO, V1C0: str):\n raise NotImplementedError",
"def t4X7(vauY, eG0V, aaCO):\n V1C0 = Hy7s.path.join(eG0V, aaCO)\n ... | [
"0.80452263",
"0.800499",
"0.78747916",
"0.77815384",
"0.76896876",
"0.7574583",
"0.7534235",
"0.75064737",
"0.7501034",
"0.7466035",
"0.7462241",
"0.745421",
"0.7392644",
"0.7365168",
"0.7340274",
"0.7302462",
"0.72531676",
"0.72474486",
"0.7244837",
"0.72426933",
"0.7215009... | 0.7233075 | 20 |
Restore model from checkpoint if it exists. Returns the model and the current epoch. | def fFVS(C3ST, bPTx, lDLs=False, DHvX=False, Hj7O=False):
try:
kxnm = [jQJk for jQJk in Hy7s.listdir(bPTx) if jQJk.startswith('epoch=') and jQJk.endswith('.checkpoint.pth.tar')]
except FileNotFoundError:
kxnm = None
Hy7s.makedirs(bPTx)
if not kxnm:
print('No saved model param... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wBIE(YKHO):\n if YKHO._restored_model:\n return\n with YKHO.eval_graph.graph.as_default():\n x8fl = YKHO._find_last_checkpoint()\n jkyf = ZylS.train.Saver()\n jkyf.restore(YKHO._get_shared_session(train=False), x8fl)\n YKHO._restored_model = True",
"def hLQf(YKHO, vau... | [
"0.77573466",
"0.7590565",
"0.75367033",
"0.7495357",
"0.7446445",
"0.7435409",
"0.72213614",
"0.716913",
"0.71452117",
"0.7120259",
"0.7120259",
"0.7112676",
"0.70710856",
"0.7037954",
"0.70236856",
"0.70143163",
"0.7003166",
"0.69157535",
"0.68999827",
"0.6879434",
"0.68791... | 0.77778536 | 0 |
Draw a single pixel wide line starting at x0, y0 and ending at x1, y1. | def zFiD(YKHO, nJ9F, nxyw, o4D3, si3g, qfpW):
gqlh = abs(si3g - nxyw) > abs(o4D3 - nJ9F)
if gqlh:
nJ9F, nxyw = (nxyw, nJ9F)
o4D3, si3g = (si3g, o4D3)
if nJ9F > o4D3:
nJ9F, o4D3 = (o4D3, nJ9F)
nxyw, si3g = (si3g, nxyw)
Jw7X = o4D3 - nJ9F
eUWA = abs(si3g - nxyw)
XOb... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def s9P8(g_NO, nJ9F, nxyw, o4D3, si3g, qfpW):\n UoOD = max(abs(nJ9F - o4D3), abs(nxyw - si3g))\n fUYa = oyIN.linspace(nJ9F, o4D3, UoOD)\n bEXe = oyIN.linspace(nxyw, si3g, UoOD)\n for YRbF in range(len(fUYa) - 1):\n g_NO[int(epAf.ceil(fUYa[YRbF]))][int(epAf.ceil(bEXe[YRbF]))] = qfpW\n g_NO... | [
"0.74158645",
"0.7394731",
"0.7148242",
"0.7095709",
"0.70662713",
"0.6953858",
"0.6814485",
"0.68017435",
"0.67833173",
"0.67407763",
"0.6734903",
"0.6726154",
"0.67147684",
"0.66671616",
"0.6559366",
"0.6558718",
"0.6539604",
"0.65368116",
"0.65349036",
"0.650588",
"0.64964... | 0.70972323 | 3 |
Closes this session in the database. | def EM8p(YKHO):
Pe9W = '\n UPDATE sessions\n SET\n end_time = ?,\n duration = ? - start_time\n WHERE id == ?;\n '
i8WE = Ei1M.GetTime()
gnPz.Database().Execute(Pe9W, (i8WE, i8WE, Ei1M.GetEnvInt('ASH_SESSION_ID'))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ryg1(YKHO, cuiw):\n cuiw.close()",
"def DDI8(YKHO):\n YKHO.__session.close()",
"def DDI8(YKHO):\n YKHO.__session.close()",
"def DDI8(YKHO):\n YKHO.__session.close()",
"def DDI8(YKHO):\n YKHO.__session.close()",
"def DDI8(YKHO):\n YKHO.__session.close()",
"def DDI8(YKHO):\n YKHO... | [
"0.82106435",
"0.77334374",
"0.77334374",
"0.77334374",
"0.77334374",
"0.77334374",
"0.77334374",
"0.768885",
"0.762851",
"0.7587804",
"0.7587804",
"0.7587804",
"0.7584962",
"0.7573747",
"0.7569822",
"0.7353879",
"0.7330498",
"0.7329504",
"0.73101395",
"0.72975266",
"0.728678... | 0.67199004 | 56 |
before we pass x to next conv, we apply batch normalization | def tF9S(WKvO, tTpl=1e-07):
yGTL = oyIN.mean(WKvO)
UkX0 = oyIN.var(WKvO)
A3mO = (WKvO - yGTL) / oyIN.sqrt(UkX0 + tTpl)
return A3mO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KVH6(YKHO, WKvO):\n WKvO = vuvg.max_pool2d(vuvg.relu(YKHO.batch_norm1(YKHO.conv1(WKvO))), 3, stride=2, padding=1)\n WKvO = vuvg.max_pool2d(vuvg.relu(YKHO.batch_norm2(YKHO.conv2(WKvO))), 3, stride=2, padding=1)\n WKvO = vuvg.max_pool2d(vuvg.relu(YKHO.batch_norm3_b(YKHO.conv3_b(vuvg.relu(YKHO.batch_norm... | [
"0.68538624",
"0.682618",
"0.6822019",
"0.68064326",
"0.674407",
"0.6742077",
"0.67335135",
"0.6729097",
"0.6716522",
"0.6674791",
"0.66210794",
"0.65989494",
"0.6594042",
"0.65796685",
"0.65714985",
"0.6562576",
"0.6558288",
"0.6516352",
"0.65058446",
"0.64991534",
"0.649632... | 0.0 | -1 |
Given width, kernel size and slide, compute how to pad to make output same as input | def eQnH(TVTK, WZcn, THEQ):
Ylbp = (TVTK - WZcn) / THEQ + 1
hVLt = (TVTK - Ylbp) / 2
return hVLt | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WtCT(Ot1W, _0fC, ivFb):\n return -((-Ot1W - (Ot1W - 1) * (ivFb - 1)) // _0fC + 1) // 2",
"def _2Ky(WZcn, TVTK):\n CJdE = len(WZcn)\n RA_F = (TVTK - CJdE) / 2\n z1wY = ZylS.cast(RA_F, ZylS.int32)\n nXcG = ZylS.cast(ZylS.math.ceil(RA_F), ZylS.int32)\n LkVj = [[z1wY, nXcG], [z1wY, nXcG], [0, 0... | [
"0.75854933",
"0.7139086",
"0.7016609",
"0.67164576",
"0.6670249",
"0.6651689",
"0.664683",
"0.6644851",
"0.6589808",
"0.6585164",
"0.6561296",
"0.65253985",
"0.6513961",
"0.65131944",
"0.6512792",
"0.65065634",
"0.64974165",
"0.64952624",
"0.64903253",
"0.64390147",
"0.64382... | 0.83880424 | 0 |
Construct the layer in tensorflow | def Cc7Y(YKHO, vHnr, XJsN=True):
with ZylS.variable_scope(YKHO.name):
GhuM = vHnr.get_shape()
VBqE = GhuM[-1].value
qmhL = [YKHO.kernel_shape[0], YKHO.kernel_shape[1], VBqE, YKHO.num_kernels]
YKHO.weights = E9N2(qmhL, 'weights', XJsN)
YKHO.bias = Y7ph([YKHO.num_kernels], 'bia... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def s6ah(THkp, exwG, YDYE):\n z7JX = ZylS.contrib.layers.variance_scaling_initializer(mode='FAN_AVG')\n gEmA = ZylS.layers.Dense(units=exwG, activation=YDYE, kernel_initializer=z7JX, name='layer')\n return gEmA(THkp)",
"def FIMM(YKHO, Fi_Q, Bdz4, aBpa=False, XcU5=ZylS.zeros, Fg_i=ZylS.zeros, jzdc=ZylS.s... | [
"0.74185485",
"0.73529774",
"0.7272762",
"0.72462964",
"0.711412",
"0.70790905",
"0.70484775",
"0.7017083",
"0.7007014",
"0.69657415",
"0.6953619",
"0.6940279",
"0.69260556",
"0.6925511",
"0.69183576",
"0.69041395",
"0.6902256",
"0.6889688",
"0.6889339",
"0.68756807",
"0.6850... | 0.71078867 | 5 |
Construct the layer in tensorflow | def Cc7Y(YKHO, vHnr, XJsN=True):
with ZylS.variable_scope(YKHO.name):
zi3C = vHnr.get_shape()[-1].value
YKHO.weights = E9N2([zi3C, YKHO.output_size], 'weights', XJsN, False)
YKHO.bias = Y7ph([YKHO.output_size], 'bias', XJsN)
YKHO.layer = ZylS.matmul(vHnr, YKHO.weights) + YKHO.bias
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def s6ah(THkp, exwG, YDYE):\n z7JX = ZylS.contrib.layers.variance_scaling_initializer(mode='FAN_AVG')\n gEmA = ZylS.layers.Dense(units=exwG, activation=YDYE, kernel_initializer=z7JX, name='layer')\n return gEmA(THkp)",
"def FIMM(YKHO, Fi_Q, Bdz4, aBpa=False, XcU5=ZylS.zeros, Fg_i=ZylS.zeros, jzdc=ZylS.s... | [
"0.74185485",
"0.73529774",
"0.7272762",
"0.72462964",
"0.711412",
"0.71078867",
"0.70790905",
"0.70484775",
"0.7017083",
"0.7007014",
"0.69657415",
"0.6953619",
"0.6940279",
"0.69260556",
"0.6925511",
"0.69183576",
"0.69041395",
"0.6902256",
"0.6889688",
"0.6889339",
"0.6875... | 0.67509955 | 36 |
Construct the layer in tensorflow | def Cc7Y(YKHO, vHnr, XJsN=True):
with ZylS.variable_scope(YKHO.name):
QURz = vHnr.get_shape()[1:].dims
GnyN = Pusg(lambda WKvO, LVAh: WKvO * LVAh, QURz, ZylS.Dimension(1))
YKHO.layer = ZylS.reshape(vHnr, [-1, GnyN.value])
return (YKHO.layer, None, None) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def s6ah(THkp, exwG, YDYE):\n z7JX = ZylS.contrib.layers.variance_scaling_initializer(mode='FAN_AVG')\n gEmA = ZylS.layers.Dense(units=exwG, activation=YDYE, kernel_initializer=z7JX, name='layer')\n return gEmA(THkp)",
"def FIMM(YKHO, Fi_Q, Bdz4, aBpa=False, XcU5=ZylS.zeros, Fg_i=ZylS.zeros, jzdc=ZylS.s... | [
"0.74185485",
"0.73529774",
"0.7272762",
"0.72462964",
"0.71078867",
"0.70790905",
"0.70484775",
"0.7017083",
"0.7007014",
"0.69657415",
"0.6953619",
"0.6940279",
"0.69260556",
"0.6925511",
"0.69183576",
"0.69041395",
"0.6902256",
"0.6889688",
"0.6889339",
"0.68756807",
"0.68... | 0.711412 | 4 |
Converts a boolean array to a blackandwhite uint8 array (0 and 255). | def tR39(XXMy):
assert XXMy.dtype == 'bool', 'improc.bool_2_uint8() only accepts boolean arrays.'
return (255 * XXMy).astype('uint8') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qwpu(LVAh):\n LVAh[LVAh <= 255.0 / 2] = 0\n LVAh[LVAh > 255.0 / 2] = 1\n GkyP = LVAh.astype(oyIN.uint8)\n return GkyP",
"def ZT4b(YKHO):\n CG11 = [[False], [True], [True, False], [True, False, True], [True, False, True, False], [True, False, True, False, True], [True, False, True, False, True,... | [
"0.70000464",
"0.67567515",
"0.6691188",
"0.66493595",
"0.6503561",
"0.6437251",
"0.6343648",
"0.6343648",
"0.63272667",
"0.6257117",
"0.6148952",
"0.60243195",
"0.5986081",
"0.5973253",
"0.5969509",
"0.5947595",
"0.5940527",
"0.59184945",
"0.5917785",
"0.5871754",
"0.5858442... | 0.7936691 | 0 |
Gets the frames per second from the path of the video. | def kgix(u4AQ, y0cW):
bGrB, mWFP = Hy7s.path.split(u4AQ)
TPao = mWFP.find(y0cW) + len(y0cW)
fVVZ = mWFP[TPao:].find('_')
bW5R = int(mWFP[TPao:TPao + fVVZ])
return bW5R | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def e7dp(Ux0P):\n vJPk = Gw5u(Ux0P)\n abR5 = vJPk.fps\n vJPk.close()\n return abR5",
"def kgix(YKHO):\n return YKHO._num_frames / (qcWV.now() - YKHO._start).total_seconds()",
"def SnPu(f6W2):\n f6W2 = XC5k.VideoCapture(f6W2)\n e7Nl, x2fV, TM6m = XC5k.__version__.split('.')\n if int(e7Nl... | [
"0.682971",
"0.6742381",
"0.6571456",
"0.65680206",
"0.6548314",
"0.647691",
"0.6395355",
"0.638466",
"0.63700545",
"0.6337529",
"0.6279134",
"0.6269005",
"0.62289846",
"0.62284875",
"0.61991984",
"0.6185409",
"0.61828214",
"0.61795723",
"0.6169377",
"0.6138065",
"0.61221766"... | 0.7152967 | 0 |
get blob by name | def Y2Bz(YKHO, mWFP):
roAH = YKHO.index.df[YKHO.index.df[QyXt.SDATA_NAME] == mWFP]
print('df_selected', len(roAH))
Oz57 = []
for PObu, rdlD in YKHO.index.df[YKHO.index.df[QyXt.SDATA_NAME] == mWFP].iterrows():
G9jH.debug('get_blob_by_name: load {}'.format(PObu))
nPrm = YKHO.load_blob(PObu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FTlF(YKHO, zvSV):\n return YKHO.bucket.get_blob(zvSV)",
"def FTlF(YKHO, cdaG):\n WqHM = cdaG['blob_id']\n if isinstance(WqHM, str):\n WqHM = qxeD.UUID(WqHM)\n cuiw = YKHO.DBSession()\n vxw0 = cuiw.get(vWSL, WqHM)\n return vxw0.data",
"def U6WZ(YKHO, zvSV):\n return f'{YKHO._blob... | [
"0.8583244",
"0.6953601",
"0.67586577",
"0.6631318",
"0.6628308",
"0.6619851",
"0.661244",
"0.6508382",
"0.64547384",
"0.64527833",
"0.64366126",
"0.64326876",
"0.6331034",
"0.62562263",
"0.62432146",
"0.62357354",
"0.622683",
"0.62171483",
"0.6169855",
"0.61662745",
"0.61598... | 0.7327133 | 1 |
Takes input from the user to add an entry to the database of donors and adds a contribution value | def GkOu():
while True:
geh0 = input("\nPlease enter the name of the person donating or type 'List' for a list of donors: ")
Z5kt = 0
pDev = '\n'
if geh0.lower() == 'list':
QNkC()
else:
hfse = geh0.title()
h2ZV = kmps.get_donor_by_name(hfse... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hoW5():\n bo34.info('+++ Adding/Updating Donors')\n JX2A.connect_db()\n p9bx.execute_sql('PRAGMA foreign_keys = ON;')\n mWFP = input('Type donor first and last name: ')\n Rci7 = input('Type donor location (optional): ')\n try:\n iDjA = float(input(' Donation in USD: '))\n except Val... | [
"0.7516698",
"0.7397058",
"0.7342615",
"0.7121032",
"0.67970127",
"0.679675",
"0.6650254",
"0.6474992",
"0.6350873",
"0.6305209",
"0.6271407",
"0.6241869",
"0.6203297",
"0.6188504",
"0.61658436",
"0.6158504",
"0.6145111",
"0.6103586",
"0.6087066",
"0.6084738",
"0.606843",
"... | 0.6427393 | 8 |
displays the list of donor objects by name | def QNkC():
print(kmps.donor_names) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QU6N():\n for mWFP in WRzd:\n print(mWFP)",
"def MFo1(Csk6):\n print('\\nOur generous donors: \\n')\n for UZsd in iter(Csk6.donors):\n print(UZsd)\n print('\\n')",
"def WEmW():\n y9La()\n print('\\nDonors')\n print('-' * 20)\n for dgtG in rFbR:\n print(dgtG.full... | [
"0.7952669",
"0.7942223",
"0.7774109",
"0.77006596",
"0.76222634",
"0.7202344",
"0.7029816",
"0.6894928",
"0.6893581",
"0.6838041",
"0.67764795",
"0.6755879",
"0.6601801",
"0.6550669",
"0.64183605",
"0.63900656",
"0.6368784",
"0.6354311",
"0.63281417",
"0.6042331",
"0.6002365... | 0.7640701 | 4 |
Verifiy that the values entered into the two password fields match. Note that an error here will end up in ``non_field_errors()`` because it doesn't apply to a single field. | def x0SS(YKHO):
if 'password1' in YKHO.cleaned_data and 'password' in YKHO.cleaned_data:
if YKHO.cleaned_data['password1'] != YKHO.cleaned_data['password']:
raise H6V6.ValidationError(bGrB(u'You must type the same password each time'))
return YKHO.cleaned_data | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BhJx(YKHO):\n GUUE = YKHO.cleaned_data.get('password1')\n tTya = YKHO.cleaned_data.get('password2')\n if GUUE and tTya and (GUUE != tTya):\n raise H6V6.ValidationError('Passwords do not match')\n return tTya",
"def x0SS(YKHO):\n if 'password1' in YKHO.cleaned_data and 'password2' in YKH... | [
"0.7938596",
"0.78743976",
"0.7868922",
"0.7839647",
"0.7839647",
"0.77343154",
"0.76528925",
"0.76365894",
"0.7626773",
"0.7620667",
"0.76096493",
"0.75964826",
"0.75890887",
"0.7567576",
"0.75642955",
"0.75642955",
"0.7562649",
"0.7547011",
"0.7527047",
"0.7463841",
"0.7376... | 0.7362963 | 22 |
Verifiy that the values entered into the two password fields match. Note that an error here will end up in ``non_field_errors()`` because it doesn't apply to a single field. | def x0SS(YKHO):
if 'password1' in YKHO.cleaned_data and 'password' in YKHO.cleaned_data:
if YKHO.cleaned_data['password1'] != YKHO.cleaned_data['password']:
raise H6V6.ValidationError(bGrB(u'You must type the same password each time'))
return YKHO.cleaned_data | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BhJx(YKHO):\n GUUE = YKHO.cleaned_data.get('password1')\n tTya = YKHO.cleaned_data.get('password2')\n if GUUE and tTya and (GUUE != tTya):\n raise H6V6.ValidationError('Passwords do not match')\n return tTya",
"def x0SS(YKHO):\n if 'password1' in YKHO.cleaned_data and 'password2' in YKH... | [
"0.79393995",
"0.78751373",
"0.7869208",
"0.7840083",
"0.7840083",
"0.7735661",
"0.7653578",
"0.76377136",
"0.76262844",
"0.7619865",
"0.76103294",
"0.75963074",
"0.7589395",
"0.7565969",
"0.75650203",
"0.75650203",
"0.756335",
"0.7547981",
"0.7527759",
"0.74647665",
"0.73782... | 0.73637694 | 23 |
Returns a specific Load Balancer Type. | def jRq6(YKHO, id: int) -> LyxG:
geh0 = YKHO._client.request(url=f'/load_balancer_types/{id}', method='GET')
return LyxG(YKHO, geh0['load_balancer_type']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c_QG(YKHO) -> h8nf[qe4Y.Input['CloudRunConfigLoadBalancerType']]:\n return qe4Y.get(YKHO, 'load_balancer_type')",
"def j_oG(YKHO, mWFP: str) -> LyxG | None:\n return YKHO._get_first_by(name=mWFP)",
"def lgIp(AiZN):\n return KXx7[AiZN]",
"def j_oG(YKHO, mWFP):\n return super(VSvz, YKHO).get_by... | [
"0.7697015",
"0.7048308",
"0.64723015",
"0.6184815",
"0.61697686",
"0.5986609",
"0.5942168",
"0.5854504",
"0.58489555",
"0.58068526",
"0.5801489",
"0.57934284",
"0.5766882",
"0.5757444",
"0.5738254",
"0.5703507",
"0.5632313",
"0.56231433",
"0.5622337",
"0.5597706",
"0.5592917... | 0.73384243 | 1 |
Get all Load Balancer types | def pi1E(YKHO, mWFP: str | None=None) -> list[LyxG]:
return YKHO._iter_pages(YKHO.get_list, name=mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sZsV(YKHO):\n TJdH = YKHO.client['Network_Application_Delivery_Controller_LoadBalancer_Routing_Type']\n return TJdH.getAllObjects()",
"def d9y6(YKHO):\n TJdH = YKHO.client['Network_Application_Delivery_Controller_LoadBalancer_Health_Check_Type']\n return TJdH.getAllObjects()",
"def UMnH(YKHO, m... | [
"0.67840147",
"0.6777749",
"0.67510355",
"0.65186286",
"0.60493803",
"0.6040032",
"0.5934778",
"0.5848135",
"0.5802933",
"0.57381284",
"0.57212526",
"0.5698644",
"0.568985",
"0.5668318",
"0.56618404",
"0.5596496",
"0.55843914",
"0.55799466",
"0.5430556",
"0.5428883",
"0.54186... | 0.66892415 | 3 |
returns an integer that represents the number of days between self and other | def yk4i(YKHO, Elif):
Ji0Q = YKHO.copy()
c_2B = Elif.copy()
UHFx = 0
if Ji0Q.is_before(c_2B):
while Ji0Q != c_2B:
Ji0Q.tomorrow()
UHFx += 1
return -1 * UHFx
elif Ji0Q.is_after(c_2B):
while Ji0Q != c_2B:
c_2B.tomorrow()
UHFx += 1... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qfAF(YKHO, Elif):\n QGkr = YKHO.copy()\n L8h2 = Elif.copy()\n UHFx = 0\n if YKHO.is_before(Elif):\n while True:\n if QGkr == L8h2:\n break\n UHFx -= 1\n QGkr.advance_one()\n elif YKHO.is_after(Elif):\n while True:\n if QGkr... | [
"0.82386976",
"0.70530134",
"0.67978424",
"0.6775341",
"0.6709735",
"0.6676344",
"0.65471363",
"0.6511809",
"0.6486291",
"0.6408992",
"0.6377475",
"0.6338442",
"0.62765944",
"0.6248925",
"0.6202768",
"0.6182246",
"0.6177284",
"0.6140237",
"0.6139887",
"0.6131793",
"0.61233735... | 0.7145879 | 1 |
This view should return a list of all students. In addition, there should be only good marks. | def list(YKHO, QePW):
Icli = _OuP.objects.all()
LdEd = Icli.filter(name='5')
lqqv = Icli.filter(name='4')
bhWC = Icli.filter(name='Зачтено')
J2us = mS_x(QePW)
VLXD = G2rF.objects.all()
wj1T = []
for g3Gt in VLXD:
sc0v = J2us.filter(student_id=g3Gt.id)
nCAV = 0
wle... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def list(YKHO, QePW):\n Icli = _OuP.objects.all()\n x6OW = Icli.filter(name='Неявка')\n J2us = mS_x(QePW)\n VLXD = G2rF.objects.all()\n wj1T = []\n for g3Gt in VLXD:\n sc0v = J2us.filter(student_id=g3Gt.id)\n vr3X = 0\n for AIu6 in sc0v:\n AV1E = FZ5p(AIu6.mark_id)... | [
"0.7704175",
"0.76867867",
"0.75906557",
"0.7530616",
"0.75230175",
"0.7489456",
"0.7480893",
"0.7480148",
"0.74564373",
"0.7452671",
"0.7437693",
"0.736777",
"0.73336023",
"0.7310782",
"0.7275589",
"0.7222147",
"0.7193991",
"0.71782666",
"0.7060949",
"0.70577484",
"0.7046231... | 0.75417066 | 3 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, Tsve):
return False
return YKHO.to_dict() == Elif.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
if not isinstance(Elif, Tsve):
return True
return YKHO.to_dict() != Elif.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)",
"def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)",
... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
... | 0.0 | -1 |
Add word given a root node. | def NrOU(tk5Y, F6PT):
JOhO = tk5Y
for hcXw in list(F6PT):
bxIJ = False
for Q6kx in JOhO.nodes:
if Q6kx.char == hcXw:
bxIJ = True
JOhO.num_words_at_letter += 1
JOhO = Q6kx
if not bxIJ:
Esd_ = o7DN(hcXw)
JO... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def e0k0(YKHO, GIN8):\n Q6kx = YKHO.root\n for Npgh in GIN8:\n Q6kx = Q6kx.children[Npgh]\n Q6kx.isWord = True",
"def e0k0(YKHO, GIN8: str) -> None:\n Q6kx = YKHO.root\n for Z9rn in GIN8:\n Q6kx = Q6kx.children[Z9rn]\n Q6kx.word = True",
"def e0k0(YKHO, GIN8):\n Q6kx = YKHO.r... | [
"0.83533823",
"0.8351877",
"0.8149061",
"0.80621004",
"0.8037361",
"0.8030805",
"0.7984513",
"0.79783726",
"0.7957425",
"0.79151547",
"0.7880366",
"0.7765811",
"0.7745045",
"0.7738159",
"0.7724717",
"0.7721523",
"0.77167696",
"0.76098984",
"0.7597129",
"0.7584415",
"0.7547717... | 0.78166264 | 11 |
Check if word is in the Trie and return True/False. | def EO99(tk5Y, F6PT):
JOhO = tk5Y
for hcXw in list(F6PT):
W_XC = False
for Q6kx in JOhO.nodes:
if Q6kx.char == hcXw:
W_XC = True
JOhO = Q6kx
break
if not W_XC:
print('Exited in for loop')
return False
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Gtm1(ZOCz, vIwR: str) -> bool:\n return any((yzQ0 == vIwR for yzQ0 in ZOCz))",
"def DUe0(YKHO, ZOCz, GIN8):\n TXkI = ZOCz\n for sZqf in GIN8:\n if sZqf in TXkI:\n TXkI = TXkI[sZqf]\n else:\n return False\n else:\n if '_end_' in TXkI:\n return ... | [
"0.78279203",
"0.78150284",
"0.7639355",
"0.7597991",
"0.7583713",
"0.7550558",
"0.7488371",
"0.746716",
"0.74369377",
"0.7392812",
"0.73679054",
"0.7359811",
"0.73518616",
"0.7349344",
"0.7289214",
"0.7264449",
"0.725595",
"0.7247846",
"0.7246868",
"0.72430587",
"0.7224231",... | 0.6662107 | 69 |
Magic repr method for SSH2NetResponse class | def wHJl(YKHO) -> str:
return f'Scrape <Success: {str(not YKHO.failed)}>' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wHJl(YKHO):\n Aofo = '%s (%s):\\n' % (YKHO.host, YKHO.status)\n for bIwZ in YKHO.ports:\n Aofo += '\\t%s %s %s %s %s\\n' % (bIwZ[0], bIwZ[1], bIwZ[2], bIwZ[3], bIwZ[4])\n Aofo += '\\n'\n return Aofo",
"def wmQE(YKHO):\n return '%s:%d' % YKHO.remote_address",
"def wHJl(YKHO):\n if Y... | [
"0.66276807",
"0.63989747",
"0.6329773",
"0.6314293",
"0.62837774",
"0.62481976",
"0.62478364",
"0.6216609",
"0.6209437",
"0.6209437",
"0.6209437",
"0.61855537",
"0.61855537",
"0.6158552",
"0.6145132",
"0.60990405",
"0.6094247",
"0.60862947",
"0.6075949",
"0.60723454",
"0.604... | 0.0 | -1 |
Returns job end time. | def fGfF(YKHO):
assert YKHO.isFinished(), 'Too early to tell: %s' % YKHO
return '%s' % YKHO.__jobInfo.endTime | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C7pn(YKHO):\n return YKHO._end_time",
"def C7pn(YKHO):\n return YKHO._end_time",
"def C7pn(YKHO):\n return YKHO._end_time",
"def C7pn(YKHO):\n return YKHO._end_time",
"def C7pn(YKHO):\n return YKHO._end_time",
"def C7pn(YKHO):\n return YKHO._end_time",
"def P_sM(YKHO):\n return... | [
"0.8111544",
"0.8111544",
"0.8111544",
"0.8111544",
"0.8111544",
"0.8111544",
"0.8037826",
"0.80237937",
"0.8018209",
"0.80113596",
"0.7996403",
"0.78806096",
"0.77789956",
"0.77435184",
"0.77417636",
"0.7739532",
"0.7675434",
"0.76678777",
"0.7655654",
"0.7646786",
"0.764678... | 0.8536573 | 0 |
Returns the worker state field. | def jHMJ(YKHO):
if YKHO.__jobInfo.engWorkerState is not None:
return qQXR.loads(YKHO.__jobInfo.engWorkerState)
else:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ja6o(YKHO):\n return YKHO.state",
"def ja6o(YKHO):\n return YKHO.state",
"def QTBn(YKHO):\n if YKHO._state in OJXQ:\n return OJXQ[YKHO._state]\n else:\n return str(YKHO._state)",
"def ja6o(YKHO):\n return YKHO._state",
"def ja6o(YKHO):\n return YKHO._state",
"def ja6o(... | [
"0.72628546",
"0.72628546",
"0.71927243",
"0.7162981",
"0.7162981",
"0.7162981",
"0.7162981",
"0.7162981",
"0.7157988",
"0.7102734",
"0.7063946",
"0.7063946",
"0.7063946",
"0.7063946",
"0.7063946",
"0.7063946",
"0.7063946",
"0.7063946",
"0.7063946",
"0.7063946",
"0.7063946",
... | 0.8094049 | 0 |
Returns the model milestones field. | def pLL_(YKHO):
if YKHO.__jobInfo.engModelMilestones is not None:
return qQXR.loads(YKHO.__jobInfo.engModelMilestones)
else:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RqJC(YKHO):\n return RqJC.Milestones(YKHO)",
"def RqJC(YKHO):\n return q8XR(YKHO)",
"def azJU(YKHO):\n pass",
"def RqJC(YKHO, lgNN=None):\n if lgNN is None:\n return YKHO._get('milestones').json()\n else:\n return YKHO._get('milestones/search', params={'predicate': lgNN}).jso... | [
"0.7469835",
"0.72463524",
"0.66949993",
"0.6528074",
"0.6370817",
"0.622086",
"0.6164753",
"0.6148986",
"0.5797363",
"0.5729991",
"0.56449383",
"0.55825627",
"0.551658",
"0.5498727",
"0.5471341",
"0.5460314",
"0.53906316",
"0.53802806",
"0.5335208",
"0.5262265",
"0.5227346",... | 0.7750251 | 0 |
Returns the engine status field used for progress messages | def O9Bf(YKHO):
return YKHO.__jobInfo.engStatus | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jGRS(YKHO):\n return O6qs[YKHO.fields['status']]",
"def VLTN(YKHO):\n return YKHO.msg",
"def jGRS(YKHO):\n return YKHO._status",
"def CHRo(YKHO):\n return YKHO.status",
"def hqCf(YKHO):\n return YKHO.__status",
"def Jxmr(YKHO):\n return YKHO.__status",
"def VLTN(YKHO):\n return... | [
"0.734921",
"0.7318182",
"0.7284048",
"0.72439176",
"0.7236883",
"0.71345514",
"0.7127194",
"0.7127194",
"0.7127194",
"0.711014",
"0.70938134",
"0.70938134",
"0.7077344",
"0.7063186",
"0.7063186",
"0.70607",
"0.7059274",
"0.7042555",
"0.70139337",
"0.70110583",
"0.7009274",
... | 0.7318947 | 1 |
Returns mode evaluation end time. | def fGfF(YKHO):
assert YKHO.isFinished(), 'Too early to tell: %s' % YKHO
return '%s' % YKHO.__rawInfo.endTime | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C7pn(YKHO):\n return YKHO._end_time",
"def C7pn(YKHO):\n return YKHO._end_time",
"def C7pn(YKHO):\n return YKHO._end_time",
"def C7pn(YKHO):\n return YKHO._end_time",
"def C7pn(YKHO):\n return YKHO._end_time",
"def C7pn(YKHO):\n return YKHO._end_time",
"def C7pn(YKHO) -> float:\n ... | [
"0.6871513",
"0.6871513",
"0.6871513",
"0.6871513",
"0.6871513",
"0.6871513",
"0.6847472",
"0.68212",
"0.6789769",
"0.67512214",
"0.6719372",
"0.65398186",
"0.6523274",
"0.652276",
"0.652276",
"0.6471463",
"0.6464866",
"0.6460032",
"0.6425014",
"0.642498",
"0.6410677",
"0.6... | 0.65939265 | 11 |
Create an instance of UpdateEnvironmentVariableRequest from a JSON string | def pktP(Emd4, nMY2: str) -> AuyY:
return Emd4.from_dict(qQXR.loads(nMY2)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jG8h(Emd4, YEnM: dict) -> AuyY:\n if YEnM is None:\n return None\n if not isinstance(YEnM, dict):\n return AuyY.parse_obj(YEnM)\n UTAq = AuyY.parse_obj({'value': YEnM.get('value')})\n return UTAq",
"def P89k(_WGB):\n gXX7 = ['_', 'SHLVL', 'PWD', 'OLDPWD']\n sEAN = Hy7s.environ... | [
"0.78420097",
"0.6015838",
"0.58913106",
"0.5780866",
"0.54473996",
"0.5341671",
"0.5335344",
"0.5240499",
"0.5231903",
"0.51314425",
"0.5115087",
"0.50613713",
"0.49942768",
"0.4991524",
"0.49260193",
"0.4918025",
"0.49011448",
"0.48712215",
"0.48394608",
"0.4784052",
"0.478... | 0.9128517 | 0 |
Create an instance of UpdateEnvironmentVariableRequest from a dict | def jG8h(Emd4, YEnM: dict) -> AuyY:
if YEnM is None:
return None
if not isinstance(YEnM, dict):
return AuyY.parse_obj(YEnM)
UTAq = AuyY.parse_obj({'value': YEnM.get('value')})
return UTAq | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pktP(Emd4, nMY2: str) -> AuyY:\n return Emd4.from_dict(qQXR.loads(nMY2))",
"def ZoC9(Csk6: dict, kc1W: List[str], LpaZ: bool=False):\n k4hq = {}\n for SRYB in kc1W:\n k4hq[SRYB] = Hy7s.environ[SRYB]\n if LpaZ:\n Csk6.update(k4hq)\n return Csk6\n for H5ew in Csk6:\n ... | [
"0.8053762",
"0.60907316",
"0.56004316",
"0.5599761",
"0.55824286",
"0.5463682",
"0.5453835",
"0.5403641",
"0.53862965",
"0.53660077",
"0.52896136",
"0.52467716",
"0.52072847",
"0.52046406",
"0.5177021",
"0.5173695",
"0.5161458",
"0.515281",
"0.5150338",
"0.5149689",
"0.51433... | 0.81470627 | 0 |
Find leftmost index that contains a value greater than x | def fr7v(jzdc, WKvO):
YRbF = eEIR(jzdc, WKvO)
if YRbF < len(jzdc):
return YRbF
raise ValueError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VvHN(YKHO, qw7D, d6pt):\n vC9B, Mkmy = (0, len(qw7D) - 1)\n TK2h = -1\n while vC9B <= Mkmy:\n x1fj = vC9B + (Mkmy - vC9B) // 2\n if qw7D[x1fj] <= d6pt:\n vC9B = x1fj + 1\n else:\n TK2h = x1fj\n Mkmy = x1fj - 1\n return TK2h",
"def d6pt(WKvO, a... | [
"0.71488917",
"0.70495975",
"0.6960628",
"0.69586027",
"0.69337624",
"0.6920742",
"0.69124764",
"0.6719617",
"0.6716822",
"0.6703825",
"0.66295373",
"0.6544341",
"0.65367997",
"0.65367997",
"0.64331937",
"0.6385439",
"0.63720375",
"0.6357101",
"0.6350155",
"0.63230723",
"0.63... | 0.7796241 | 0 |
Asks user to specify a city, month, and day to analyze. | def RxGd():
print("Hello! Let's explore some US bikeshare data!")
j5sA = input('Which city do you want? please choose a city by typing (c) for chicago or (n) for new york or (w) for washington: \n\n ').lower()
while j5sA not in OerS.keys():
print("\n Error: That's invalid city name.\n")
j5sA... | {
"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.66714007",
"0.65354675",
"0.64593667",
"0.6374057",
"0.6348314",
"0.63097656",
"0.62868035",
"0.6259136",
"0.62316",
"0.62130964",
"0.62050414",
"0.6181105",
"0.6171822",
"0.61686903",
"0.6158568",
"0.61582303",
"0.61532456",
"0.61444426",
"0.6131269",
"0.610484",
"0.61025... | 0.0 | -1 |
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['day_of_week'] = jQ3Z['Start Time'].dt.day_name()
if x0eS != 'all':
X_bn = ['january', 'february', 'march', 'april', 'may', ... | {
"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.740803 | 95 |
Displays statistics on the most frequent times of travel. | def dWJR(jQ3Z):
print('\nCalculating The Most Frequent Times of Travel...\n')
SWox = ITS7.time()
hFPs = jQ3Z['month'].value_counts().idxmax()
print('The most common month is: {} '.format(hFPs))
fI26 = jQ3Z['day_of_week'].value_counts().idxmax()
print('The most common day of week is: {} '.format(... | {
"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.74281055 | 43 |
Displays statistics on the most popular stations and trip. | def Huc_(jQ3Z):
print('\nCalculating The Most Popular Stations and Trip...\n')
SWox = ITS7.time()
Ri0C = jQ3Z['Start Station'].value_counts().idxmax()
print('The most common start station is: {} '.format(Ri0C))
k7bv = jQ3Z['End Station'].value_counts().idxmax()
print('The most common 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.7815675",
"0.7662213",
"0.7553417",
"0.74914914",
"0.74748665",
"0.7446617",
"0.7428588",
"0.74237514",
"0.74177027",
"0.7400495",
"0.7387161",
"0.7385634",
"0.73647535",
"0.735934",
"0.73566747",
"0.73548365",
"0.7351854",
"0.7351274",
"0.735057",
"0.73421645",
"0.7340198... | 0.7083453 | 68 |
Displays statistics on the total and average trip duration. | def kDMA(jQ3Z):
print('\nCalculating Trip Duration...\n')
SWox = ITS7.time()
sanW = jQ3Z['Trip Duration'].sum()
print('Total travel time :', sanW)
XVYG = jQ3Z['Trip Duration'].mean()
print('Total travel time :', XVYG)
Atc8 = jQ3Z['Trip Duration'].max()
print('Total travel time :', Atc8)
... | {
"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.814274",
"0.8025143",
"0.80041367",
"0.79496753",
"0.7937415",
"0.79312176",
"0.7926815",
"0.7915187",
"0.79142886",
"0.7908032",
"0.79055744",
"0.7900715",
"0.7891682",
"0.78894734",
"0.7886722",
"0.78851086",
"0.7884266",
"0.7882474",
"0.78738385",
"0.78686154",
"0.78664... | 0.754587 | 97 |
Create a Match object. | async def make_match(gr_i=False, QdZT=False, **B2fa) -> h8nf[PrRj]:
if 'match_id' in B2fa and B2fa['match_id'] is not None:
fFjA = await Luyz(B2fa['match_id'])
if QdZT and fFjA is not None:
fFjA.raw_update(**B2fa)
await fFjA.commit()
return fFjA
kUBT = PrRj(commit... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wahk(YKHO, YbVa, KcSv, h3kA):\n kUBT = PrRj(YbVa, KcSv, h3kA)\n YKHO.db.execute('INSERT INTO MATCH VALUES (%s,%s,%s,null,%s,null);', (kUBT.tournament, kUBT.round, kUBT.p1, kUBT.p2))\n return kUBT",
"def wahk(YKHO, bKta, oNm6, m0Ij, XgAV, J5gC, spMS, DOO5):\n vipE = YKHO.lastID\n YKHO.lastID +=... | [
"0.7278967",
"0.7267012",
"0.7112327",
"0.7067215",
"0.7045645",
"0.6722733",
"0.6594269",
"0.6515744",
"0.6483527",
"0.6274965",
"0.62431604",
"0.6183739",
"0.6183594",
"0.61627644",
"0.60679156",
"0.5971559",
"0.59684986",
"0.59127575",
"0.5882531",
"0.57972544",
"0.5793921... | 0.6591878 | 7 |
Normalises words to lowercase and stems and lemmatizes it. | def kwsU(GIN8):
GIN8 = GIN8.lower()
GIN8 = LkXt.lemmatize(GIN8)
return GIN8 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kwsU(GIN8):\n GIN8 = GIN8.lower()\n GIN8 = mkhU.stem_word(GIN8)\n GIN8 = LkXt.lemmatize(GIN8)\n return GIN8",
"def jnV4(YKHO, GIN8):\n return YKHO.lemmatize(GIN8.lower())",
"def kwsU(GIN8):\n GIN8 = GIN8.lower()\n GIN8 = LkXt.lemmatize(GIN8)\n return GIN8",
"def X5wq(YKHO):\n s... | [
"0.7970904",
"0.7810673",
"0.751768",
"0.7473084",
"0.7466711",
"0.72114766",
"0.72114766",
"0.71895856",
"0.71399814",
"0.7126659",
"0.70802057",
"0.7058855",
"0.6884069",
"0.6880759",
"0.6839107",
"0.6807959",
"0.6766981",
"0.6766872",
"0.6756455",
"0.6753187",
"0.673803",
... | 0.80520403 | 0 |
Validate a username Return True if username is valid, False otherwise. | def Z3WL(YKHO, NtEF: str) -> bool:
if '/' in NtEF:
return False
if not NtEF:
return False
if not YKHO.username_regex:
return True
return bool(YKHO.username_regex.match(NtEF)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QoUL(NtEF: str) -> bool:\n mXDZ = ZbWC.compile('^[A-Za-z]+[A-Za-z0-9]*$')\n return mXDZ.match(NtEF)",
"def Gt2s(YKHO, NtEF):\n gVaL = '^[a-zA-Z]{3,}$'\n return ZbWC.match(gVaL, NtEF)",
"def N3mX(NtEF: str) -> bool:\n if sjSk <= len(NtEF) < iIx2:\n return bool(ZbWC.search(apw8, NtEF))\... | [
"0.8811856",
"0.86236155",
"0.8575717",
"0.84850246",
"0.8468672",
"0.840418",
"0.8333429",
"0.83305794",
"0.8314878",
"0.8291812",
"0.82422143",
"0.82138175",
"0.81280553",
"0.8114554",
"0.81036395",
"0.8068309",
"0.80683035",
"0.7972643",
"0.7934942",
"0.7882645",
"0.784881... | 0.8713345 | 1 |
Input n>=6, Returns a array of primes, 2 <= p < n | def LT6d(exwG):
KwQv = oyIN.ones(exwG / 3 + (exwG % 6 == 2), dtype=oyIN.bool)
KwQv[0] = False
for YRbF in Ni9Y(int(exwG ** 0.5) / 3 + 1):
if KwQv[YRbF]:
G1Hx = 3 * YRbF + 1 | 1
KwQv[G1Hx * G1Hx / 3::2 * G1Hx] = False
KwQv[(G1Hx * G1Hx + 4 * G1Hx - 2 * G1Hx * (YRbF... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YPz2(exwG: int) -> [int]:\n return [6 * exwG - 1, 6 * exwG + 1]",
"def DwOa(exwG):\n return list(uVDW(exwG))",
"def Z2Il(xGUU) -> qw7D:\n XP5J = qw7D('i', list(rPed(xGUU)))\n return XP5J",
"def kAOJ(exwG):\n uED7 = []\n for YRbF in range(2, exwG):\n if T1qg(YRbF):\n uE... | [
"0.78810406",
"0.78444964",
"0.77933097",
"0.7650548",
"0.7626844",
"0.75202084",
"0.75010294",
"0.7486007",
"0.74678427",
"0.74572444",
"0.7429019",
"0.74092805",
"0.73962444",
"0.73798555",
"0.7366298",
"0.7364451",
"0.7356198",
"0.7351732",
"0.73305947",
"0.7302029",
"0.72... | 0.7249863 | 26 |
Will show users all their friends posts | def Pw9H(QePW):
pR0U = oCbT(QePW)
Pw9H = klJY(QePW)
SGll = qHv6(QePW.user.id)
QpfX = {'news_feed': Pw9H, 'user_profile': SGll, 'status_form': RSAE}
return _1tc(QePW, 'status/news_feed.html', QpfX) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QUSx(QePW):\n yKDG = QePW.user.profile.followers.values_list('pk', flat=True)\n FvVY = T97t.objects.filter(author_id__in=yKDG)\n return _1tc(QePW, 'posts/feed.html', {'posts': FvVY})",
"def Aide():\n uJjO = cuiw.get('user_id')\n zvy7 = T97t.query.join(xx7x, NCls.and_(T97t.user_id == xx7x.user_... | [
"0.7125192",
"0.70658857",
"0.7034748",
"0.6823669",
"0.66174895",
"0.6555519",
"0.6415663",
"0.6290897",
"0.62776536",
"0.6208367",
"0.61907196",
"0.6180155",
"0.61784595",
"0.6170124",
"0.61567014",
"0.61384284",
"0.61375713",
"0.6134775",
"0.6131179",
"0.60234916",
"0.6008... | 0.5773725 | 45 |
XY normal to each point | def yos1(y5bX, gyoy=1):
LTIa = oyIN.array(y5bX)
I6vM = oyIN.zeros(LTIa.shape)
for or8S in range(1, len(LTIa) - 1):
AitI = NkkI(LTIa[or8S + 1] - LTIa[or8S - 1])
TnpD = oyIN.array([0.0, 0.0, 1.0])
SEcv = NkkI(oyIN.cross(AitI, TnpD))
I6vM[or8S] = SEcv
I6vM[0] = I6vM[1]
I... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mhAC(YKHO, LTIa):\n aVwc = oyIN.array([[0, 0, 1]])\n Ty9i = (LTIa - YKHO.pos() * aVwc) * YKHO.C - aVwc\n return Ty9i / oyIN.linalg.norm(Ty9i, axis=1)[:, oyIN.newaxis]",
"def mhAC(YKHO) -> Cd5b:\n fJfP = YKHO.planes[1] - YKHO.planes[0]\n hWOy = YKHO.planes[2] - YKHO.planes[1]\n return Cd5b.c... | [
"0.76818764",
"0.75678325",
"0.7465488",
"0.7200837",
"0.71959573",
"0.7132862",
"0.70886123",
"0.69784385",
"0.69351876",
"0.6926986",
"0.6893272",
"0.6862748",
"0.68409956",
"0.6830747",
"0.67921174",
"0.67429256",
"0.67371815",
"0.67248917",
"0.6707516",
"0.6693952",
"0.66... | 0.0 | -1 |
Validates if input base domain url is valid or not. When base domain url is as below, | def OWOV(VcWd) -> bool:
dwge = KVWQ(VcWd)
return True if all([dwge.scheme, dwge.netloc]) else False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aWtO(bD7m: str) -> None:\n GgvZ = KVWQ(bD7m)\n if GgvZ.scheme not in ('http', 'https'):\n raise ValueError(f'Only HTTP[S] URLs are permitted. Actual URL: {bD7m!r}')\n if bD7m.endswith('/'):\n raise ValueError(f'Base (DICOMweb service) URL cannot have a trailing forward slash: {bD7m!r}')"... | [
"0.82622397",
"0.8051212",
"0.7563928",
"0.73428303",
"0.72552854",
"0.7243861",
"0.7190538",
"0.6972963",
"0.68810725",
"0.68802017",
"0.6878582",
"0.68414766",
"0.68033135",
"0.67836744",
"0.67651474",
"0.6760566",
"0.6737333",
"0.6736706",
"0.6722989",
"0.67102164",
"0.670... | 0.8470519 | 0 |
non parametrized Maxout activation function | def _DOk(WKvO, XcU5, Fg_i=None):
if Fg_i is None:
return ZEJU()(WKvO, XcU5)
else:
return ZEJU()(WKvO, XcU5, Fg_i) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YDYE(WKvO):\n return oyIN.maximum(0, WKvO)",
"def Kmxe(WKvO):\n return WKvO",
"def v9B7(WKvO):\n jzdc = -1\n return 1 / (1 + oyIN.exp(-jzdc * WKvO))",
"def YDYE(epBp):\n return 1 / (1 + oyIN.exp(-epBp))",
"def ECMu(YKHO, epBp):\n return 1.0 / (1.0 + oyIN.exp(-oyIN.clip(epBp, -250, 250... | [
"0.79006284",
"0.71687245",
"0.6802542",
"0.6707076",
"0.6648482",
"0.66483694",
"0.66483694",
"0.6608942",
"0.6579475",
"0.6552926",
"0.6481756",
"0.6456798",
"0.64282477",
"0.640685",
"0.6349475",
"0.6294701",
"0.6294621",
"0.62904185",
"0.62651837",
"0.62651837",
"0.626456... | 0.6790125 | 3 |
Opens a new database connection if there is none yet for the current application context. | def GGod():
tlxW = rwhr.top
if not hasattr(tlxW, 'sqlite_db'):
Ab5G = iHv3.connect(P4t4.config['DATABASE'])
Ab5G.row_factory = iHv3.Row
tlxW.sqlite_db = Ab5G
return tlxW.sqlite_db | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FuuS():\n if not hasattr(Oa1e, 'sqlite_db'):\n Oa1e.sqlite_db = WyYT()\n return Oa1e.sqlite_db",
"def BF3r(YKHO):\n if YKHO._conn is None:\n YKHO._conn = iHv3.connect(YKHO._db_path)",
"def YJJL(wnys: str=mDZH) -> JdIE:\n return iHv3.connect(wnys, cached_statements=PwCU)",
"def W... | [
"0.7737639",
"0.7582971",
"0.73180443",
"0.71693045",
"0.70220166",
"0.6966687",
"0.6954785",
"0.69486743",
"0.6897534",
"0.6842663",
"0.68292314",
"0.68191963",
"0.680592",
"0.67950195",
"0.67697805",
"0.6762173",
"0.6751266",
"0.6746273",
"0.67316663",
"0.670031",
"0.668866... | 0.66801256 | 23 |
Parses and returns the CLI arguments. | def rwTO() -> jFQi:
wvEv = WDqQ(description='A Minecraft RCON client.')
wvEv.add_argument('server', help='the server to connect to')
wvEv.add_argument('-t', '--timeout', type=float, help='connection timeout in seconds')
wvEv.add_argument('-d', '--debug', action='store_true', help='print additional debug... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DDxj():\n wvEv = PDen()\n return wvEv.parse_args()",
"def DDxj():\n wvEv = j1Jz.ArgumentParser()\n wvEv.add_argument('ENV', help='Enviorment SCANNER, PC, REMOMTE')\n qIxc = wvEv.parse_args()\n return qIxc",
"def i3Q8() -> jFQi:\n wvEv = cwNh()\n Ltpw = wvEv.parse_args()\n return ... | [
"0.81047094",
"0.7992189",
"0.7911029",
"0.7781474",
"0.76845586",
"0.7631972",
"0.7598254",
"0.755523",
"0.75498956",
"0.7540424",
"0.75258577",
"0.74695265",
"0.7463572",
"0.74630207",
"0.7389721",
"0.7389663",
"0.73843396",
"0.73570395",
"0.7331802",
"0.73315644",
"0.73206... | 0.0 | -1 |
Constructor of Node object Takes two int values representing node's location on grid. Terrain is initially set to regular unblocked | def FIMM(YKHO, uLhl, XtYH, type='1'):
YKHO.column_pos = uLhl
YKHO.row_pos = XtYH
YKHO.terrain_type = type | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, KV9e, WKvO, LVAh, epBp):\n o7DN.number_of_nodes += 1\n YKHO.node_num = int(KV9e)\n YKHO.x = float(WKvO)\n YKHO.y = float(LVAh)\n YKHO.z = float(epBp)\n YKHO.coords = (YKHO.x, YKHO.y, YKHO.z)\n YKHO.ux = None\n YKHO.uy = None\n YKHO.uz = None",
"def FIMM(YKHO, jHsn, pvd3,... | [
"0.6802516",
"0.6479612",
"0.63621426",
"0.6361217",
"0.63526535",
"0.6346478",
"0.63329417",
"0.62767774",
"0.6255036",
"0.622559",
"0.6206693",
"0.6195798",
"0.6175756",
"0.61594975",
"0.61533475",
"0.6138487",
"0.61096054",
"0.60924697",
"0.607669",
"0.60698164",
"0.603621... | 0.645317 | 2 |
Create train/test split of data. | def LiKb(nPrm, NI2E=0.25):
LVAh = nPrm['fraud'].values
EcVT = nPrm.drop(columns=['fraud', 'description', 'name', 'org_desc', 'org_name', 'payee_name']).values
return bHtP(EcVT, LVAh, test_size=NI2E, stratify=LVAh, shuffle=True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cTf9(onqj):\n XxFT, t4zr = bHtP(onqj, test_size=0.2, random_state=42)\n return (XxFT, t4zr)",
"def F_Ph(YKHO):\n YKHO.train, YKHO.valid, bGrB, bGrB = bHtP(YKHO.data, YKHO.data, test_size=0.2)\n YKHO.valid, YKHO.test, bGrB, bGrB = bHtP(YKHO.valid, YKHO.valid, test_size=0.5)",
"def JWSc(nPrm):\n ... | [
"0.834073",
"0.8159496",
"0.80857575",
"0.80185705",
"0.79812026",
"0.7917847",
"0.785271",
"0.78495353",
"0.77984136",
"0.77579045",
"0.75940084",
"0.7547821",
"0.75050133",
"0.75045913",
"0.74999416",
"0.74996966",
"0.7471788",
"0.74677473",
"0.7464823",
"0.74551773",
"0.74... | 0.71590966 | 55 |
r"""Saves the FluView data to a csv file. | def aVpL(YKHO, gXgy=''):
if not gXgy:
ITS7 = qcWV.now()
ITS7 = qcWV.strftime(ITS7, '%Y-%m-%d_%H:%M:%S')
Ux0P = ITS7 + '.csv'
gXgy = Hy7s.path.join(Hy7s.path.abspath(Hy7s.curdir), Ux0P)
nPrm = YKHO._get_data()
with open(gXgy, 'wb') as eHNT:
for zFiD in nPrm:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aVpL(YKHO, Ux0P):\n YKHO.data.to_csv(Ux0P)",
"def RZtn(YKHO):\n YKHO.tableView.df.to_csv('Data export.csv', index=False)\n print('CSV file exported')",
"def D8Ps(YKHO):\n YKHO.data.to_csv('data/c&le/{}'.format(YKHO.name))",
"def xkzz(YKHO, nPrm, LWY6):\n nPrm.to_csv(LWY6)",
"def aVpL(YKH... | [
"0.8161714",
"0.7605331",
"0.7593002",
"0.75481236",
"0.73539597",
"0.73438215",
"0.7325988",
"0.7291074",
"0.7286425",
"0.72844994",
"0.72449815",
"0.7233741",
"0.7223009",
"0.720938",
"0.71992403",
"0.7101992",
"0.7055687",
"0.70231277",
"0.7020289",
"0.6999421",
"0.6988875... | 0.6895601 | 25 |
Set the target where the pioneer should go to. format = (speed, angle) speed in range 0 to 1 positive values are to the right angle in range 180 to 180, where +180 is backwards and 0 is forward This is the function behaviors should call when they want the robot to go to some direction. | def us_G(YKHO, pan_, Z0yy=False, PJWX=False, RHzD=1, Cv4z=False):
gBCK = pan_
w2De, QUJ0 = YKHO.target_to_left_right_speeds(gBCK)
YKHO.logger.debug('endVector: %s' % repr(gBCK))
YKHO.logger.debug('Wheel speeds: %d, %d' % (w2De, QUJ0)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rSDa(YKHO, iBLD=0.0):\n YKHO.target_speed = iBLD",
"def RDsk(YKHO, pan_, Z0yy=False, PJWX=False):\n YKHO.logger.info('Deprecated function set_target called. Please call head_direction.')\n YKHO.head_direction(YKHO, pan_, Z0yy, PJWX)",
"def Wvuc(YKHO, pan_: Tuple[float, float], iBLD: float=1.5):\n ... | [
"0.7218563",
"0.7005362",
"0.68461096",
"0.68447584",
"0.68369645",
"0.674346",
"0.6703164",
"0.6644767",
"0.66020375",
"0.65391976",
"0.6483005",
"0.6463844",
"0.6460567",
"0.6455835",
"0.6381777",
"0.634165",
"0.63214177",
"0.6290165",
"0.6269597",
"0.62401617",
"0.6229454"... | 0.6327713 | 16 |
Returns missing output path definitions. Returns List[StringInputDefinition] List of missing output path configurations that should be generated | def eFuu(YKHO) -> x1iM[iJs8]:
return [vwGj for vwGj in YKHO.input_definitions if YKHO.input_definition_is_a_missing_output_path(vwGj)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Noos(YKHO) -> x1iM[W1dx]:\n return [vwGj for vwGj in YKHO.input_definitions if YKHO.input_definition_is_a_missing_output_directory(vwGj)]",
"def yejQ(YKHO) -> x1iM[iJs8]:\n return [vwGj for vwGj in YKHO.input_definitions if getattr(vwGj, 'dynamic_default', False) and vwGj.key not in YKHO.raw_configurat... | [
"0.8126535",
"0.6882914",
"0.619403",
"0.6131936",
"0.60928166",
"0.5913624",
"0.58075553",
"0.5790286",
"0.5721315",
"0.56983703",
"0.5691175",
"0.5664256",
"0.56525165",
"0.5572411",
"0.5490895",
"0.5422516",
"0.5400101",
"0.539198",
"0.5360286",
"0.53019834",
"0.53015035",... | 0.91761845 | 0 |
Projects x_adv into the l_norm ball around x Assumes x and x_adv are 4D Tensors representing batches of images | def bNKA(WKvO: torch.Tensor, woqx: torch.Tensor, CkYf: Union[str, int], SGf8: float) -> ht2j.Tensor:
if WKvO.shape != woqx.shape:
raise ValueError('Input Tensors must have the same shape')
if CkYf == 'inf':
woqx = ht2j.max(ht2j.min(woqx, WKvO + SGf8), WKvO - SGf8)
else:
RA_F = woqx -... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eAFQ(YKHO, WKvO, LVAh):\n woqx = WKvO.clone().detach().requires_grad_(True).to(WKvO.device)\n zUiX = YKHO.y_target is not None\n Qi3c = WKvO.shape[1]\n if YKHO.random:\n woqx = sqiB(woqx, YKHO.norm, YKHO.eps)\n for YRbF in range(YKHO.num_steps):\n YXYL = woqx.clone().detach().requi... | [
"0.6010313",
"0.5764632",
"0.57455456",
"0.5686472",
"0.5639733",
"0.56184214",
"0.5607059",
"0.54946554",
"0.5483953",
"0.5472571",
"0.54118526",
"0.5399653",
"0.5355483",
"0.5339555",
"0.5324876",
"0.53185195",
"0.5263014",
"0.52543664",
"0.52485275",
"0.5239181",
"0.520049... | 0.5851757 | 1 |
Reconstruct complete string starting at the given leaf node. Return [string] + markers, separated by newline characters string = complete string markers = list of sequence markers, a list of indices of word positions for each sequence | def XUHm(kjp6):
def eAXk(WKvO):
return '\n'.join([''.join(LVAh) for LVAh in zip(*WKvO)])
gLiZ = [[exwG.newchars] + [exwG.mrkchars if not (exwG.lvl + KCHu) % LK4X else exwG.blkchars for KCHu in Ni9Y(LK4X)] for exwG in kjp6.walk()]
return eAXk(gLiZ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cDR2(Q6kx):\n cfuW = []\n aeK2 = 1\n vIwR = Q6kx.newchars\n jvSB = Q6kx\n while jvSB.parent:\n aeK2 += 1\n jvSB = jvSB.parent\n vIwR += jvSB.newchars\n if not aeK2 % LK4X:\n cfuW.append(vIwR)\n vIwR = ''\n if aeK2 % LK4X:\n cfuW.append(... | [
"0.5817577",
"0.57523584",
"0.56255406",
"0.561789",
"0.55956167",
"0.5458605",
"0.54539764",
"0.5437394",
"0.54178405",
"0.5409667",
"0.5337532",
"0.53276205",
"0.52995473",
"0.5289498",
"0.5280274",
"0.52424437",
"0.52116287",
"0.52086776",
"0.52019626",
"0.5162287",
"0.512... | 0.63192785 | 0 |
Yield successive nsized chunks from lst. | def eHxA(yv6U, exwG):
for YRbF in range(0, len(yv6U), exwG):
yield yv6U[YRbF:YRbF + exwG] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eHxA(YKHO, yv6U, exwG):\n for YRbF in range(0, len(yv6U), exwG):\n yield yv6U[YRbF:YRbF + exwG]",
"def eHxA(yv6U: list, exwG: int):\n for YRbF in range(0, len(yv6U), exwG):\n yield yv6U[YRbF:YRbF + exwG]",
"def eHxA(yv6U, exwG):\n for YRbF in range(0, len(yv6U), exwG):\n yield... | [
"0.83071756",
"0.81939614",
"0.81910837",
"0.81910837",
"0.8190213",
"0.81267184",
"0.80773693",
"0.80533457",
"0.80533457",
"0.80533457",
"0.80533457",
"0.80533457",
"0.80533457",
"0.80533457",
"0.80533457",
"0.80533457",
"0.80533457",
"0.80533457",
"0.80533457",
"0.80533457",... | 0.81218547 | 6 |
function to write JSON objects to file. | def qrQM(JXUQ):
nUeQ = open('data.json', 'w')
nUeQ.write(qQXR.dumps(JXUQ, sort_keys=True, indent=4, separators=(',', ': ')))
print('File written') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uP8n(eB5x: Any, Ux0P: str):\n with open(Ux0P, 'w') as wM3v:\n qQXR.dump(eB5x, wM3v, indent=4)",
"def Lsrz(YKHO, Mu0k=None):\n HeoJ = qQXR.dumps(YKHO.json_dict, indent=2)\n YKHO._write_json_text(HeoJ, Mu0k)",
"def JrK_(KGvk, Ux0P):\n try:\n KGvk = qQXR.dumps(KGvk)\n except TypeE... | [
"0.84070903",
"0.8079656",
"0.80556744",
"0.80358475",
"0.80358475",
"0.7992646",
"0.7988177",
"0.7950244",
"0.7942161",
"0.7940754",
"0.7940444",
"0.7928388",
"0.7895177",
"0.78731847",
"0.7860227",
"0.7851541",
"0.7841824",
"0.78380555",
"0.7828391",
"0.77942973",
"0.778653... | 0.7313542 | 68 |
Test for GET / (health endpoint) | def gFUG(YKHO):
Ylbp = YKHO.client().get('/')
nPrm = qQXR.loads(Ylbp.data)
YKHO.assertEqual(Ylbp.status_code, 200)
YKHO.assertIn('health', nPrm)
YKHO.assertEqual(nPrm['health'], 'Running!!') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gFUG(YKHO):\n YKHO.assert_request('get', '/_health')",
"def gFUG(YKHO) -> None:\n YKHO._response = YKHO._app.get('/health')\n YKHO.assertEqual(YKHO._response.status, '200 OK')",
"def hW4g(YKHO):\n bD7m = f'{zDeW}/health'\n geh0 = G4JS.get(bD7m)\n zs78 = geh0.json()\n assert geh0.status... | [
"0.8251945",
"0.80668825",
"0.80259746",
"0.791631",
"0.7642327",
"0.7626863",
"0.74548656",
"0.7326561",
"0.7280934",
"0.7209201",
"0.71579635",
"0.7087214",
"0.7059149",
"0.70518994",
"0.7038417",
"0.6939561",
"0.6903391",
"0.6882012",
"0.68737626",
"0.68729866",
"0.6862952... | 0.73830485 | 7 |
Failing Test trying to make a call without token | def mfQe(YKHO):
Ylbp = YKHO.client().get('/actors')
nPrm = qQXR.loads(Ylbp.data)
YKHO.assertEqual(Ylbp.status_code, 401)
YKHO.assertFalse(nPrm['success'])
YKHO.assertEqual(nPrm['message'], 'Authentication error.') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def test_token_request_fails(ajET: HomeAssistant) -> None:\n _uqo = KQxB.EcobeeFlowHandler()\n _uqo.hass = ajET\n _uqo.hass.data[Cnbr] = {}\n with Po4F('homeassistant.components.ecobee.config_flow.Ecobee') as inRY:\n inRY = inRY.return_value\n inRY.request_tokens.return_value = Fals... | [
"0.72698295",
"0.7194623",
"0.70600694",
"0.6862822",
"0.6857448",
"0.68524134",
"0.6845458",
"0.6835685",
"0.68316644",
"0.6822409",
"0.6814288",
"0.6798466",
"0.6767201",
"0.6730683",
"0.67017066",
"0.6692944",
"0.6692449",
"0.66837025",
"0.66750854",
"0.6673969",
"0.664081... | 0.6812332 | 11 |
Passing Test for PATCH /actors/ | def ubvS(YKHO):
Ylbp = YKHO.client().post('/actors', headers={'Authorization': 'Bearer {}'.format(YKHO.casting_director_token)}, json=YKHO.VALID_NEW_ACTOR)
Ylbp = YKHO.client().patch('/actors/1', headers={'Authorization': 'Bearer {}'.format(YKHO.casting_director_token)}, json=YKHO.VALID_UPDATE_ACTOR)
nPrm =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XOKm(YKHO):\n Ylbp = YKHO.client().patch('/actors/2', json=OJWc, headers=Tr60)\n nPrm = qQXR.loads(Ylbp.data)",
"def sU8b(YKHO):\n QiwA = tuKI.choice(Zrzj.query.all()).id\n Ylbp = YKHO.client().put('/api/actors/' + str(QiwA), json=YKHO.actor_update_request)\n YKHO.assertEqual(Ylbp.status_code,... | [
"0.8398941",
"0.81463003",
"0.7860032",
"0.7607362",
"0.7517165",
"0.71381193",
"0.71378934",
"0.7120896",
"0.7106048",
"0.68080217",
"0.67421913",
"0.6513809",
"0.6464629",
"0.6430521",
"0.64204746",
"0.63613564",
"0.63567466",
"0.6335496",
"0.6332567",
"0.63321215",
"0.6327... | 0.7405627 | 5 |
Failing Test for PATCH /actors/ | def YwMv(YKHO):
Ylbp = YKHO.client().post('/actors', headers={'Authorization': 'Bearer {}'.format(YKHO.casting_director_token)}, json=YKHO.VALID_NEW_ACTOR)
Ylbp = YKHO.client().patch('/actors/1', headers={'Authorization': 'Bearer {}'.format(YKHO.casting_director_token)}, json=YKHO.INVALID_UPDATE_ACTOR)
nPrm... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PUhK(YKHO):\n QiwA = tuKI.choice(Zrzj.query.all()).id\n Ylbp = YKHO.client().patch('/api/actors/' + str(QiwA), json={'movies': [9000]})\n YKHO.assertEqual(Ylbp.status_code, 422)",
"def XOKm(YKHO):\n Ylbp = YKHO.client().patch('/actors/2', json=OJWc, headers=Tr60)\n nPrm = qQXR.loads(Ylbp.data)... | [
"0.8155448",
"0.8154448",
"0.7919237",
"0.7873413",
"0.7536734",
"0.72329193",
"0.70393634",
"0.7033134",
"0.6944088",
"0.68332404",
"0.67514133",
"0.67509943",
"0.67076075",
"0.6704728",
"0.6698768",
"0.66561097",
"0.6607798",
"0.65855294",
"0.6574192",
"0.65741485",
"0.6484... | 0.75916505 | 4 |
Failing Test for DELETE /actors/ | def Od6w(YKHO):
Ylbp = YKHO.client().post('/actors', headers={'Authorization': 'Bearer {}'.format(YKHO.casting_director_token)}, json=YKHO.VALID_NEW_ACTOR)
Ylbp = YKHO.client().delete('/actors/1', headers={'Authorization': 'Bearer {}'.format(YKHO.casting_assistant_token)})
nPrm = qQXR.loads(Ylbp.data)
Y... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jlQg(YKHO):\n Ylbp = YKHO.client().delete('/actors/2/delete', headers=Tr60)\n nPrm = qQXR.loads(Ylbp.data)",
"def hdMT(YKHO):\n Ylbp = YKHO.client().delete('/actors/2/delete', headers=lwuw)\n nPrm = qQXR.loads(Ylbp.data)",
"def hdMT(YKHO):\n Ylbp = YKHO.client().post('/actors', headers={'Aut... | [
"0.8515708",
"0.84060234",
"0.83009595",
"0.82764095",
"0.82305604",
"0.7850222",
"0.7192429",
"0.7166413",
"0.7031176",
"0.69918895",
"0.69705707",
"0.6963958",
"0.6899954",
"0.6896889",
"0.6893751",
"0.68756676",
"0.6852871",
"0.68255246",
"0.6825454",
"0.68230754",
"0.6804... | 0.7465022 | 6 |
Failing Test for DELETE /actors/ | def ebto(YKHO):
Ylbp = YKHO.client().delete('/actors/100', headers={'Authorization': 'Bearer {}'.format(YKHO.executive_producer_token)})
nPrm = qQXR.loads(Ylbp.data)
YKHO.assertEqual(Ylbp.status_code, 404)
YKHO.assertFalse(nPrm['success'])
YKHO.assertIn('message', nPrm) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jlQg(YKHO):\n Ylbp = YKHO.client().delete('/actors/2/delete', headers=Tr60)\n nPrm = qQXR.loads(Ylbp.data)",
"def hdMT(YKHO):\n Ylbp = YKHO.client().delete('/actors/2/delete', headers=lwuw)\n nPrm = qQXR.loads(Ylbp.data)",
"def hdMT(YKHO):\n Ylbp = YKHO.client().post('/actors', headers={'Aut... | [
"0.8515708",
"0.84060234",
"0.83009595",
"0.82764095",
"0.7850222",
"0.7465022",
"0.7192429",
"0.7166413",
"0.7031176",
"0.69918895",
"0.69705707",
"0.6963958",
"0.6899954",
"0.6896889",
"0.6893751",
"0.68756676",
"0.6852871",
"0.68255246",
"0.6825454",
"0.68230754",
"0.68040... | 0.82305604 | 4 |
Passing Test for GET /movies | def mvTD(YKHO):
Ylbp = YKHO.client().post('/movies', headers={'Authorization': 'Bearer {}'.format(YKHO.executive_producer_token)}, json=YKHO.VALID_NEW_MOVIE)
Ylbp = YKHO.client().get('/movies', headers={'Authorization': 'Bearer {}'.format(YKHO.casting_director_token)})
nPrm = qQXR.loads(Ylbp.data)
YKHO.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QsdV(YKHO):\n geh0 = YKHO.client.get(YKHO.url)\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_200_OK)",
"def wUmT(YKHO):\n Ylbp = YKHO.client().get('/api/movies?page=9000')\n YKHO.assertEqual(Ylbp.status_code, 404)",
"def wSpc(YKHO):\n Ylbp = YKHO.client().get('/api/movies/9000')\n YKHO.a... | [
"0.75681794",
"0.7447046",
"0.7371268",
"0.72619987",
"0.7251278",
"0.7162897",
"0.7108152",
"0.7104886",
"0.7052178",
"0.7010938",
"0.69762075",
"0.69005466",
"0.68050385",
"0.6666411",
"0.6638633",
"0.6591838",
"0.6581041",
"0.6564964",
"0.65397155",
"0.65233713",
"0.652152... | 0.7545144 | 1 |
Passing Test for GET /movies/ | def OL9c(YKHO):
Ylbp = YKHO.client().post('/movies', headers={'Authorization': 'Bearer {}'.format(YKHO.executive_producer_token)}, json=YKHO.VALID_NEW_MOVIE)
Ylbp = YKHO.client().get('/movies/1', headers={'Authorization': 'Bearer {}'.format(YKHO.casting_assistant_token)})
nPrm = qQXR.loads(Ylbp.data)
YK... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QsdV(YKHO):\n geh0 = YKHO.client.get(YKHO.url)\n YKHO.assertEqual(geh0.status_code, jGRS.HTTP_200_OK)",
"def mvTD(YKHO):\n Ylbp = YKHO.client().post('/movies', headers={'Authorization': 'Bearer {}'.format(YKHO.executive_producer_token)}, json=YKHO.VALID_NEW_MOVIE)\n Ylbp = YKHO.client().get('/mov... | [
"0.7826686",
"0.76404965",
"0.7579268",
"0.74985737",
"0.74398667",
"0.74196446",
"0.74160683",
"0.73658085",
"0.72294664",
"0.72230697",
"0.71414554",
"0.70558065",
"0.6959048",
"0.6915027",
"0.6823108",
"0.6763487",
"0.6758742",
"0.6755376",
"0.6583582",
"0.6570524",
"0.650... | 0.67004037 | 18 |
Failing Test for GET /movies/ | def R8iZ(YKHO):
Ylbp = YKHO.client().get('/movies/100', headers={'Authorization': 'Bearer {}'.format(YKHO.casting_assistant_token)})
nPrm = qQXR.loads(Ylbp.data)
YKHO.assertEqual(Ylbp.status_code, 404)
YKHO.assertFalse(nPrm['success'])
YKHO.assertIn('message', nPrm) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wUmT(YKHO):\n Ylbp = YKHO.client().get('/api/movies?page=9000')\n YKHO.assertEqual(Ylbp.status_code, 404)",
"def wSpc(YKHO):\n Ylbp = YKHO.client().get('/api/movies/9000')\n YKHO.assertEqual(Ylbp.status_code, 404)",
"def wUmT(YKHO):\n Ylbp = YKHO.client().get('/movies', headers=f9yS)\n nP... | [
"0.87375647",
"0.8698605",
"0.8510944",
"0.8193842",
"0.80282557",
"0.768131",
"0.76552606",
"0.7446751",
"0.7428576",
"0.7427963",
"0.7328333",
"0.7291098",
"0.72378427",
"0.7211664",
"0.7202105",
"0.7175501",
"0.7166001",
"0.7133243",
"0.7126452",
"0.7044128",
"0.6986399",
... | 0.77664185 | 5 |
Failing Test for POST /movies | def thIr(YKHO):
Ylbp = YKHO.client().post('/movies', headers={'Authorization': 'Bearer {}'.format(YKHO.casting_assistant_token)}, json=YKHO.VALID_NEW_MOVIE)
nPrm = qQXR.loads(Ylbp.data)
YKHO.assertEqual(Ylbp.status_code, 401)
YKHO.assertFalse(nPrm['success'])
YKHO.assertIn('message', nPrm) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Njes(YKHO):\n Mkmy = YKHO.client.post(gxEw('movieapi:movies'))\n YKHO.assertJSONEqual(Mkmy.content, '{\"error\": \"Please provide a movie title\"}')\n YKHO.assertEqual(Mkmy.status_code, 400)",
"def ewWG(YKHO):\n Ylbp = YKHO.client().post('/movies/create', json=R5D2, headers=Tr60)\n nPrm = qQXR... | [
"0.8371155",
"0.8038133",
"0.80133086",
"0.77943146",
"0.7757783",
"0.7719608",
"0.7671089",
"0.7578243",
"0.7557744",
"0.75315154",
"0.75018644",
"0.74732554",
"0.74630344",
"0.7441814",
"0.7404335",
"0.7402587",
"0.7347975",
"0.7307684",
"0.7298438",
"0.7255972",
"0.7253126... | 0.6955713 | 25 |
Passing Test for POST /movies | def ZXwU(YKHO):
Ylbp = YKHO.client().post('/movies', headers={'Authorization': 'Bearer {}'.format(YKHO.executive_producer_token)}, json=YKHO.VALID_NEW_MOVIE)
nPrm = qQXR.loads(Ylbp.data)
YKHO.assertEqual(Ylbp.status_code, 201)
YKHO.assertTrue(nPrm['success'])
YKHO.assertIn('created', nPrm) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ewWG(YKHO):\n Ylbp = YKHO.client().post('/movies/create', json=R5D2, headers=Tr60)\n nPrm = qQXR.loads(Ylbp.data)\n YKHO.assertEqual(Ylbp.status_code, 200)\n YKHO.assertTrue(nPrm['success'])\n YKHO.assertTrue(nPrm['new movie'])",
"def mvTD(YKHO):\n Ylbp = YKHO.client().post('/movies', heade... | [
"0.78790075",
"0.77236646",
"0.7686145",
"0.75400877",
"0.73486745",
"0.7317212",
"0.72094804",
"0.7135864",
"0.7076869",
"0.70270675",
"0.6976263",
"0.69618773",
"0.6898901",
"0.68431604",
"0.6817838",
"0.67827696",
"0.67598355",
"0.6711431",
"0.6691043",
"0.66896975",
"0.66... | 0.75174266 | 4 |
Failing Test for POST /movies | def wKYt(YKHO):
Ylbp = YKHO.client().post('/movies', headers={'Authorization': 'Bearer {}'.format(YKHO.executive_producer_token)}, json=YKHO.INVALID_NEW_MOVIE)
nPrm = qQXR.loads(Ylbp.data)
YKHO.assertEqual(Ylbp.status_code, 422)
YKHO.assertFalse(nPrm['success'])
YKHO.assertIn('message', nPrm) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Njes(YKHO):\n Mkmy = YKHO.client.post(gxEw('movieapi:movies'))\n YKHO.assertJSONEqual(Mkmy.content, '{\"error\": \"Please provide a movie title\"}')\n YKHO.assertEqual(Mkmy.status_code, 400)",
"def ewWG(YKHO):\n Ylbp = YKHO.client().post('/movies/create', json=R5D2, headers=Tr60)\n nPrm = qQXR... | [
"0.8371155",
"0.8038133",
"0.80133086",
"0.77943146",
"0.7757783",
"0.7719608",
"0.7671089",
"0.7578243",
"0.7557744",
"0.75315154",
"0.75018644",
"0.74732554",
"0.74630344",
"0.7404335",
"0.7402587",
"0.7347975",
"0.7307684",
"0.7298438",
"0.7255972",
"0.7253126",
"0.7157058... | 0.7441814 | 13 |
Passing Test for PATCH /movies/ | def LGRm(YKHO):
Ylbp = YKHO.client().post('/movies', headers={'Authorization': 'Bearer {}'.format(YKHO.executive_producer_token)}, json=YKHO.VALID_NEW_MOVIE)
Ylbp = YKHO.client().patch('/movies/1', headers={'Authorization': 'Bearer {}'.format(YKHO.casting_director_token)}, json=YKHO.VALID_UPDATE_MOVIE)
nPrm... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W2Ku(YKHO):\n Ylbp = YKHO.client().patch('/movies/2', json=qIhf, headers=lwuw)\n nPrm = qQXR.loads(Ylbp.data)",
"def hrqP(YKHO):\n xTXs = tuKI.choice(H4Ej.query.all()).id\n Ylbp = YKHO.client().put('/api/movies/' + str(xTXs), json=YKHO.movie_update_request)\n YKHO.assertEqual(Ylbp.status_code,... | [
"0.8359734",
"0.80181515",
"0.77029324",
"0.7450323",
"0.7336893",
"0.73261225",
"0.7279741",
"0.7224709",
"0.71743196",
"0.69120044",
"0.6862464",
"0.6711024",
"0.6707462",
"0.66505367",
"0.662897",
"0.65439945",
"0.6515825",
"0.6505924",
"0.6500439",
"0.64689964",
"0.638920... | 0.6985476 | 9 |
Failing Test for PATCH /movies/ | def N3Gv(YKHO):
Ylbp = YKHO.client().post('/movies', headers={'Authorization': 'Bearer {}'.format(YKHO.executive_producer_token)}, json=YKHO.VALID_NEW_MOVIE)
Ylbp = YKHO.client().patch('/movies/1', headers={'Authorization': 'Bearer {}'.format(YKHO.casting_director_token)}, json=YKHO.INVALID_UPDATE_MOVIE)
nP... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W2Ku(YKHO):\n Ylbp = YKHO.client().patch('/movies/2', json=qIhf, headers=lwuw)\n nPrm = qQXR.loads(Ylbp.data)",
"def ZqXY(YKHO):\n xTXs = tuKI.choice(H4Ej.query.all()).id\n Ylbp = YKHO.client().patch('/api/movies/' + str(xTXs), json={'actors': [9000]})\n YKHO.assertEqual(Ylbp.status_code, 422)... | [
"0.8307092",
"0.8222295",
"0.81145364",
"0.8045712",
"0.7875036",
"0.75862557",
"0.73306894",
"0.728995",
"0.71445",
"0.7033189",
"0.69510734",
"0.6948936",
"0.6943321",
"0.69264346",
"0.68925536",
"0.6847339",
"0.68296945",
"0.6814258",
"0.6812384",
"0.6780035",
"0.6778357",... | 0.7647494 | 5 |
Failing Test for DELETE /movies/ | def hpvm(YKHO):
Ylbp = YKHO.client().delete('/movies/3', headers={'Authorization': 'Bearer {}'.format(YKHO.casting_director_token)})
nPrm = qQXR.loads(Ylbp.data)
YKHO.assertEqual(Ylbp.status_code, 401)
YKHO.assertFalse(nPrm['success'])
YKHO.assertIn('message', nPrm) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nw73(YKHO):\n Ylbp = YKHO.client().delete('/movies/1/delete', headers=Tr60)\n nPrm = qQXR.loads(Ylbp.data)",
"def wPYH(YKHO):\n Ylbp = YKHO.client().delete('/movies/100', headers={'Authorization': 'Bearer {}'.format(YKHO.executive_producer_token)})\n nPrm = qQXR.loads(Ylbp.data)\n YKHO.assertE... | [
"0.8744383",
"0.85685897",
"0.8433189",
"0.8286374",
"0.81845725",
"0.7867165",
"0.77320486",
"0.76232123",
"0.7515415",
"0.7421281",
"0.7282693",
"0.72813296",
"0.7234886",
"0.7215988",
"0.71798795",
"0.71788114",
"0.7138051",
"0.7128132",
"0.71142435",
"0.70806247",
"0.7064... | 0.7601411 | 8 |
Instantiate a dataset object. | def FIMM(YKHO, AQSv):
YKHO.dirs = AQSv
YKHO.fps = YKHO.get_filepaths() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oUGu(y7GR):\n zQKy = rYeY(y7GR)\n __n6 = zQKy.load_data()\n return __n6",
"def FIMM(YKHO, __n6: Dataset):\n YKHO.dataset = __n6",
"def oUGu(y7GR):\n zQKy = rYeY(y7GR)\n __n6 = zQKy.load_data()\n return __n6",
"def FIMM(YKHO, __n6):\n YKHO._dataset = __n6",
"def cNYr(K2u2):\n ... | [
"0.7481295",
"0.745104",
"0.7433498",
"0.73673564",
"0.71029025",
"0.7079965",
"0.7039017",
"0.6927163",
"0.6920064",
"0.68439627",
"0.6842319",
"0.68168753",
"0.68091935",
"0.6798143",
"0.67187166",
"0.6712773",
"0.66911787",
"0.66739595",
"0.6580442",
"0.6551021",
"0.654483... | 0.0 | -1 |
Retrieve leaf nodes Category.objects.filter(children__isnull=True) Category.objects.filter(lft=F('rght') 1) | def DumB(YKHO):
LeZt = []
for Ghho in qZuN.objects.filter(level__gt=0):
LeZt.append(('shop:product-category', {'store': 'default', 'slug': Ghho.slug}))
return LeZt | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WKa2(YKHO):\n return YKHO.nodes.filter(lft=FYrf.F('rght') - 1)",
"def lju5(YKHO):\n pass",
"def O02Y(YKHO):\n xDcj = lambda WKvO: WKvO.filter(YKHO.model.get_pk_column() < 0)\n J_Es = YKHO.model.get_tree(YKHO.session, query=xDcj)\n YKHO.assertEqual(J_Es, [])",
"def Ziit(YKHO):\n return Y... | [
"0.73577267",
"0.65503293",
"0.6390857",
"0.63709074",
"0.62199116",
"0.62062895",
"0.61387396",
"0.61029476",
"0.6086997",
"0.6078367",
"0.6041393",
"0.5997456",
"0.5974315",
"0.5941335",
"0.59121615",
"0.58992505",
"0.58544385",
"0.5803178",
"0.57905704",
"0.5782293",
"0.57... | 0.0 | -1 |
Transfers parameters of generator, discriminator and loss to GPU memory. | def B2eJ(YKHO):
if XN37.CUDA:
YKHO.generator.cuda()
YKHO.discriminator.cuda()
YKHO.adv_loss.cuda() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, qIxc):\n YKHO.G = jd6F(qIxc).cuda()\n YKHO.D = wr3B(qIxc).cuda()\n YKHO.gen_optim = sqQC.Adam(YKHO.G.parameters(), lr=qIxc.lrG, betas=(qIxc.Gbeta1, qIxc.Gbeta2))\n YKHO.dis_optim = sqQC.Adam(YKHO.D.parameters(), lr=qIxc.lrD, betas=(qIxc.Dbeta1, qIxc.Dbeta2))\n YKHO.l2 = U78l.MSELoss()... | [
"0.6459089",
"0.63655895",
"0.6279508",
"0.62752277",
"0.6266197",
"0.6194699",
"0.6143015",
"0.61315554",
"0.6098562",
"0.60911524",
"0.6077004",
"0.6046039",
"0.6026579",
"0.60203594",
"0.6010709",
"0.60060513",
"0.5981729",
"0.5951136",
"0.59388965",
"0.5922772",
"0.592005... | 0.0 | -1 |