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 |
|---|---|---|---|---|---|---|
Draws a line btw 2 points onto img. | def H0yp(VXjJ, yKcO, Os4s, qfpW=(0, 0, 255), dGrG=3):
XC5k.line(VXjJ, yKcO, Os4s, qfpW, dGrG) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lXKT(LNo8, X3qZ, ZYCo, qfpW):\n yDSl(LNo8, X3qZ, qfpW)\n yDSl(LNo8, ZYCo, qfpW)",
"def H0yp(VXjJ, EBgd, HpuQ, qfpW):\n EBgd = (int(EBgd[0] * EhH2), int(EBgd[1] * EhH2))\n HpuQ = (int(HpuQ[0] * EhH2), int(HpuQ[1] * EhH2))\n XC5k.line(VXjJ, EBgd, HpuQ, (0, 0, 255))",
"def XaQl(YKHO, LNo8, o4D3... | [
"0.8275707",
"0.81932473",
"0.80199265",
"0.78069526",
"0.7677928",
"0.7619576",
"0.7494372",
"0.73717725",
"0.728805",
"0.72605205",
"0.72182786",
"0.7209821",
"0.71752787",
"0.7166648",
"0.7115649",
"0.7092167",
"0.7074217",
"0.7073948",
"0.705889",
"0.70519125",
"0.7017697... | 0.7854153 | 3 |
Draws an ellipse onto img. | def VQyQ(VXjJ, hgjH, MPlV, YylR, Y0xQ=0, Suvq=360, qfpW=(0, 0, 255), LGJQ=-1):
XC5k.ellipse(VXjJ, hgjH, MPlV, YylR, Y0xQ, Suvq, qfpW, LGJQ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OkvA(YKHO, LNo8, PHzW, qfpW):\n XC5k.ellipse(LNo8, PHzW, qfpW, 2)\n LTIa = XC5k.boxPoints(PHzW)\n for YRbF in range(4):\n XC5k.line(LNo8, tuple(oyIN.array(LTIa[YRbF], oyIN.int32)), tuple(oyIN.array(LTIa[(YRbF + 1) % 4], oyIN.int32)), qfpW, 2)",
"def PXEh(YKHO):\n eHNT = YKHO.img\n WKvO ... | [
"0.7779611",
"0.76049566",
"0.7396142",
"0.71519816",
"0.71197325",
"0.7035058",
"0.69604146",
"0.69507027",
"0.694127",
"0.6926593",
"0.6876455",
"0.68486536",
"0.6809056",
"0.6794539",
"0.67827743",
"0.675281",
"0.6747277",
"0.6746051",
"0.6743991",
"0.6705124",
"0.66552705... | 0.8222343 | 0 |
Draws a nearest fitting ellipse to a contour | def IvXT(VXjJ, r9Hf):
Csk6 = j53F(r9Hf)
XC5k.ellipse(VXjJ, Csk6['center'], (Csk6['major'], Csk6['minor']), Csk6['angle']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vi_a(WKvO, LVAh):\n\n def WgYu(WKvO, LVAh):\n WKvO = WKvO[:, oyIN.newaxis]\n LVAh = LVAh[:, oyIN.newaxis]\n lWPh = oyIN.hstack((WKvO * WKvO, WKvO * LVAh, LVAh * LVAh, WKvO, LVAh, oyIN.ones_like(WKvO)))\n o4sw = oyIN.dot(lWPh.T, lWPh)\n Nq1b = oyIN.zeros([6, 6])\n Nq... | [
"0.67455137",
"0.64667124",
"0.64615935",
"0.64611447",
"0.6340184",
"0.6303694",
"0.61486316",
"0.606283",
"0.59977704",
"0.59962744",
"0.59726065",
"0.59513366",
"0.59466463",
"0.59445435",
"0.5934852",
"0.5898245",
"0.5885931",
"0.585715",
"0.5832287",
"0.5831045",
"0.5805... | 0.66356623 | 1 |
Saves a list of images to a file | def gWC0(VXjJ, Ux0P=None):
if Ux0P is None:
_c1T = ITS7.strftime('%Y%m%d')
Ux0P = 'T' + str(_c1T)
xDRF = '.jpg'
UHFx = 0
for ZfUD in VXjJ:
mWFP = Ux0P + str(UHFx) + xDRF
XC5k.imwrite(mWFP, ZfUD)
UHFx += 1
else:
for YRbF in range... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sgTO(CL5K, pu8V, pmON):\n YRbF = 0\n for LNo8 in CL5K:\n mWFP = pu8V[YRbF]\n xDSY.imsave(pmON + '/' + mWFP + '.jpg', LNo8)\n YRbF += 1",
"def F3pe(e5N9, Zhab, EKkb, M4WL):\n Doz7 = xFQ7\n mbWt = xFQ7\n for VXjJ in e5N9:\n VXjJ.save(Zhab + str(Doz7) + '.png', 'PNG')\... | [
"0.8203593",
"0.78217983",
"0.77478117",
"0.75045323",
"0.7440167",
"0.74169284",
"0.73372126",
"0.7309631",
"0.7289666",
"0.72501945",
"0.72411066",
"0.7206147",
"0.7189419",
"0.7174229",
"0.71612227",
"0.71528816",
"0.714284",
"0.7080968",
"0.69198835",
"0.69140065",
"0.690... | 0.745483 | 4 |
Splits an MPS tensor in two MPS tensors. | def kqfg(r8hN: np.ndarray):
SmnK, Csk6, jUYd = r8hN.shape
P6bq, KCHu, Ty9i = oyIN.linalg.svd(r8hN.reshape(SmnK * 2, jUYd * Csk6 // 2))
XvJB = min(P6bq.shape[-1], Ty9i.shape[0])
KCHu = oyIN.diag(KCHu[:XvJB])
P6bq = P6bq[:, :XvJB].reshape((SmnK, 2, XvJB))
HJX9 = KCHu.dot(Ty9i[:XvJB]).reshape((XvJB... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def keMA():\n WKvO = ZylS.keras.Input(shape=[224, 224, 3])\n si3g, skBL = ZylS.split(WKvO, [100, 124], 1)\n si3g = ZylS.nn.relu(si3g)\n skBL = ZylS.keras.layers.BatchNormalization()(skBL)\n epBp = ZylS.keras.layers.concatenate([si3g, skBL], axis=1)\n epBp = ZylS.keras.layers.Flatten()(epBp)\n ... | [
"0.5394845",
"0.5314789",
"0.5299116",
"0.5235955",
"0.5227186",
"0.50350887",
"0.5022935",
"0.49576718",
"0.4954816",
"0.48991227",
"0.4898438",
"0.48950312",
"0.48836675",
"0.4877415",
"0.48702902",
"0.48522276",
"0.48391676",
"0.4820576",
"0.481683",
"0.48153678",
"0.47947... | 0.0 | -1 |
r""" Summary Plot probability density distribution. No documentation as of 20181101. Future Development 1. Add option to view by Sacramento Index Water Year Types. | def EdlS(TYfJ):
N7Fb = set(TYfJ.columns.get_level_values('Part B'))
U42z = len(N7Fb)
VCFe = oyIN.int(oyIN.around(oyIN.sqrt(U42z)))
if VCFe ** 2 >= U42z:
xL7R = VCFe
else:
xL7R = VCFe + 1
LZpg, aNZO = QrM1.subplots(nrows=VCFe, ncols=xL7R, figsize=(16, 9))
if VCFe * xL7R != U42... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rYip(nPrm):\n pqa3 = sorted(nPrm)\n WgYu = eQSh.norm.pdf(pqa3, oyIN.mean(pqa3), oyIN.std(pqa3))\n QrM1.plot(pqa3, WgYu, '-o')\n QrM1.ylabel('Prob')\n QrM1.xlabel('Prices')\n QrM1.title('Distribution of prices (Under 50 days) Demand Function')\n QrM1.show()",
"def NX0t(YKHO, **B2fa):\n ... | [
"0.61590064",
"0.58937997",
"0.5824077",
"0.57526475",
"0.57054085",
"0.5644698",
"0.56097686",
"0.55820024",
"0.5578682",
"0.55750066",
"0.5565971",
"0.5520006",
"0.55099964",
"0.5509225",
"0.5507384",
"0.5505618",
"0.5455496",
"0.54332995",
"0.54244936",
"0.5423401",
"0.540... | 0.0 | -1 |
Getter for accepted_records list. | def dD7q(YKHO):
return YKHO.accepted_records | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tmEL(YKHO):\n return YKHO.caller.player_ob.db.validated_list or []",
"def DvRW(YKHO):\n return YKHO._acceptedlines",
"def J2us(YKHO):\n return YKHO._records",
"def J2us(YKHO):\n return YKHO.db_data['records']",
"def eNDP(YKHO):\n return YKHO.accepted_players",
"def enhj(YKHO):\n ret... | [
"0.62575746",
"0.6212596",
"0.5994255",
"0.58803505",
"0.5832748",
"0.5473037",
"0.5401151",
"0.52982515",
"0.52567697",
"0.5111115",
"0.51070464",
"0.50864327",
"0.50864327",
"0.50864327",
"0.50864327",
"0.506505",
"0.5031924",
"0.50122136",
"0.5009222",
"0.5007536",
"0.5006... | 0.65625346 | 0 |
Get the dictionary of substitution values for the correlation matrix | def umYE(bSmD):
gbxM = {}
apZK = bSmD.shape[0]
for vGZc in Ni9Y(0, apZK):
for dRHZ in Ni9Y(vGZc + 1, apZK):
gbxM['rho_p{}p{}'.format(vGZc, dRHZ)] = bSmD[vGZc, dRHZ]
return gbxM | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C1EP(YKHO):\n return (YKHO.corr_matrix, YKHO.corr_signature)",
"def XoGi(YKHO) -> cuzp[int, float]:\n return YKHO._calc_qcorr",
"def dNGY(rdlD):\n return rdlD['correlation']",
"def KVc0(YKHO, a5Jp, NKcE='pearson'):\n zfTQ = YKHO.data.corr(method=NKcE)\n WPR7 = {}\n for hkS8 in a5Jp:\n ... | [
"0.60773355",
"0.5937705",
"0.5928046",
"0.58747303",
"0.5837948",
"0.5746387",
"0.5676144",
"0.56687707",
"0.5661569",
"0.56377834",
"0.5631204",
"0.55615264",
"0.55370194",
"0.5509791",
"0.5488653",
"0.5486903",
"0.5473979",
"0.5458713",
"0.5447157",
"0.5421518",
"0.5372255... | 0.7407273 | 0 |
Sets the usercode for this object | def LcBU(YKHO, iT22):
YKHO.userCode = iT22
bo34.debug('user code set to: %s' % YKHO.userCode) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Wxnj(YKHO, BWXx: str) -> None:\n YKHO._code = BWXx",
"def Wxnj(YKHO, Wxnj):\n YKHO._code = Wxnj",
"def Wxnj(YKHO, Wxnj: str):\n YKHO._code = Wxnj",
"def Wxnj(YKHO, Wxnj: int):\n YKHO._code = Wxnj",
"async def async_set_zwave_lock_user_code(YKHO, XjSm: int, Wxnj: int) -> None:\n if not aw... | [
"0.67118514",
"0.6658629",
"0.66468185",
"0.6457196",
"0.6357797",
"0.63123024",
"0.63053495",
"0.62903464",
"0.62903464",
"0.621532",
"0.621532",
"0.6189747",
"0.6189747",
"0.6172561",
"0.60310847",
"0.59753853",
"0.5957022",
"0.5828828",
"0.58207273",
"0.5805788",
"0.580476... | 0.820097 | 0 |
Creates a digraph (a tuple of chars) from the given row + col numbers. | def kapo(YKHO, a67f, elTF, xbKP, NqEh: int) -> tuple:
return (YKHO.key[a67f][elTF], YKHO.key[xbKP][NqEh]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aCLV(Mkmy, Z9rn, NwL4, TXzq):\n return [(xVQF, z1g5) for xVQF in [Mkmy + WKvO for WKvO in range(-1, 2) if Mkmy + WKvO >= 0 and Mkmy + WKvO < NwL4] for z1g5 in [Z9rn + WKvO for WKvO in range(-1, 2) if Z9rn + WKvO >= 0 and Z9rn + WKvO < TXzq] if (xVQF, z1g5) != (Mkmy, Z9rn)]",
"def JnVq(YKHO):\n return (... | [
"0.59369355",
"0.5887162",
"0.5854919",
"0.58440906",
"0.5814342",
"0.57257086",
"0.57229996",
"0.57114524",
"0.56640327",
"0.5640435",
"0.56323695",
"0.56259304",
"0.5625056",
"0.5571399",
"0.5528994",
"0.54961437",
"0.5493712",
"0.549109",
"0.5478688",
"0.5463726",
"0.54447... | 0.696209 | 0 |
Regularize the fitness vector to sum to 1. | def _zxd(wkbQ):
if all((wEf2 == 0 for wEf2 in wkbQ)):
return oyIN.array([1 / YRbF for YRbF in range(wkbQ.shape[0])])
return wkbQ / sum(wkbQ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wkbQ(YKHO):\n return 1",
"def wkbQ(YKHO):\n pass",
"def jbpc(YKHO, wkbQ: np.ndarray):\n JCoA = oyIN.amax(wkbQ, axis=0)\n kpLf = oyIN.amin(wkbQ, axis=0)\n YKHO.values = oyIN.multiply(YKHO.initial_values, oyIN.tile(oyIN.subtract(JCoA, kpLf), (YKHO.number_of_vectors, 1)))\n YKHO.normalize()"... | [
"0.6883125",
"0.6712311",
"0.65367615",
"0.6306168",
"0.62883186",
"0.62564754",
"0.6230146",
"0.6203829",
"0.6160371",
"0.6144281",
"0.61230785",
"0.61032933",
"0.6061126",
"0.60601443",
"0.59466374",
"0.59377205",
"0.59131664",
"0.5893865",
"0.58265716",
"0.58128595",
"0.57... | 0.82899326 | 0 |
return the number of subscribers from an Reddit API | def zdW_(_5RM):
import requests
Vh4W = requests.get('https://www.reddit.com/r/{}/about.json'.format(_5RM), headers={'User-Agent': 'My-User-Agent'}, allow_redirects=False)
if Vh4W.status_code >= 300:
return 0
return Vh4W.json().get('data').get('subscribers') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zdW_(_5RM):\n bD7m = 'https://www.reddit.com/r/{}/about.json'.format(_5RM)\n MOPg = {'User-Agent': 'my-integration/1.2.3'}\n geh0 = NMoC(url=bD7m, headers=MOPg)\n if geh0.status_code == 200:\n zs78 = geh0.json()\n nPrm = zs78.get('data')\n HV_K = nPrm.get('subscribers')\n ... | [
"0.8690226",
"0.852827",
"0.85145426",
"0.8506312",
"0.8458378",
"0.84446746",
"0.84387857",
"0.8436107",
"0.84342146",
"0.8407898",
"0.837066",
"0.8369056",
"0.8357816",
"0.83259296",
"0.83199066",
"0.8300205",
"0.828392",
"0.82822955",
"0.8178302",
"0.80417335",
"0.7842824"... | 0.83919066 | 10 |
Converts minutes to seconds for use when comparing timeframes with timestamps. Note that unix | def DDQC(O66n):
return O66n * 60 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DDQC(O66n: str) -> int:\n return int(O66n) * 60",
"def DDQC(O66n) -> int:\n return int(O66n) * 60",
"def iwLI(O66n):\n return int(O66n * 60)",
"def XYAA(E3oo):\n return int(E3oo.seconds) + 60 * int(E3oo.minutes) + 3600 * int(E3oo.hours) + float(int(E3oo.hours) / 1000)",
"def bQkZ(Wave, O66n... | [
"0.77763426",
"0.7723302",
"0.74715537",
"0.7301524",
"0.7070065",
"0.7061977",
"0.70093197",
"0.69206357",
"0.6919833",
"0.69142526",
"0.6730017",
"0.6719046",
"0.6710146",
"0.6676277",
"0.6658639",
"0.66509336",
"0.6617928",
"0.6600639",
"0.6585108",
"0.6553683",
"0.6499296... | 0.77987653 | 0 |
Returns model class from name. | def c6an(mWFP):
if mWFP == 'MLP':
return euTn
elif mWFP == 'CNN':
return KYEi
elif mWFP == 'Fixup':
return v11A
else:
raise ValueError('Specified model not found!') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def u5_9(Emd4, mWFP):\n ZGE9 = QQNo.camelize(mWFP)\n C3ST = Emd4.models[ZGE9]\n return C3ST",
"def YrZb(mWFP):\n ZGE9 = mWFP.lower()\n iwaC = ANWz.import_module('.' + ZGE9, _Fei.model_pck)\n [(bGrB, jxGD)] = tq_1.getmembers(iwaC, lambda Z9rn: tq_1.isclass(Z9rn) and HwRy.modules[Z9rn.__module__]... | [
"0.8350521",
"0.80171317",
"0.7696668",
"0.75552994",
"0.7503981",
"0.74854",
"0.7346131",
"0.7328943",
"0.7284878",
"0.7277501",
"0.72243315",
"0.7159031",
"0.7124333",
"0.70715046",
"0.70241",
"0.6967527",
"0.68931997",
"0.67149365",
"0.6668543",
"0.66665435",
"0.6635264",
... | 0.0 | -1 |
Save the current data frame as a csv filter | def aVpL(YKHO, Ux0P):
YKHO.data.to_csv(Ux0P) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RZtn(YKHO):\n YKHO.tableView.df.to_csv('Data export.csv', index=False)\n print('CSV file exported')",
"def xkzz(jQ3Z, ebdv, mWFP):\n jQ3Z.to_csv(ebdv + mWFP + '.csv', index=False)",
"def M8EF(YKHO, tvqc):\n DwPX = 'Filtered _iso_res_filt.csv file (*_iso_res_filt.csv)|*_iso_res_filt.csv|All file... | [
"0.7141041",
"0.69042283",
"0.6894039",
"0.6831629",
"0.6784716",
"0.671172",
"0.6711132",
"0.66984373",
"0.6697193",
"0.6691398",
"0.6686486",
"0.6665298",
"0.6656953",
"0.66529083",
"0.66270906",
"0.6581081",
"0.6573089",
"0.65584344",
"0.65407205",
"0.6530168",
"0.6512845"... | 0.7549787 | 0 |
Remove all entries from the_dict whose values cannot be converted to integers. | def Uu_l(dslb):
return dslb | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yIg2(XYf1):\n for H5ew, BWXx in XYf1.items():\n if isinstance(BWXx, oyIN.ndarray):\n p9sr = oyIN.nan_to_num(BWXx, nan=123456789, posinf=1e309, neginf=-1e309)\n XYf1.update({H5ew: p9sr})\n return XYf1",
"def F3m9(YKHO):\n return {G1Hx: Ty9i for G1Hx, Ty9i in YKHO.dict.ite... | [
"0.6412456",
"0.62956",
"0.62734354",
"0.61735386",
"0.609931",
"0.6084343",
"0.60367",
"0.5987266",
"0.5975014",
"0.59294957",
"0.58881366",
"0.5869249",
"0.58423907",
"0.5836237",
"0.582971",
"0.5812676",
"0.5804835",
"0.577178",
"0.5764925",
"0.5743125",
"0.5699217",
"0.... | 0.86471814 | 0 |
Generates a DIMENSIONSdimensional dataset consisting of uniformly distributed datapoints. The data is written to "OUTPUT.csv", the metadata to "OUTPUT.yaml". | def js4S(mWFP, hlel, DbyF):
uK8x(name=mWFP, output_filename=hlel, dimensions=DbyF).process() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vp8A(EDoJ=14, paGB=10000):\n\n def n4CQ(WKvO, tpio=EDoJ):\n yvT9 = oyIN.zeros(tpio)\n gbCy = oyIN.array(list(oyIN.binary_repr(WKvO))).astype('int')\n yvT9[-len(gbCy):] = gbCy\n return yvT9\n tjhK = (oyIN.random.rand(paGB) * 2 ** (EDoJ - 1)).astype('int')\n cg0V = (oyIN.rand... | [
"0.66922957",
"0.6520077",
"0.6514204",
"0.6334754",
"0.63172555",
"0.628898",
"0.6126599",
"0.610102",
"0.6041607",
"0.6001088",
"0.59859574",
"0.5982031",
"0.59705704",
"0.59334403",
"0.59123117",
"0.59010655",
"0.58769643",
"0.5874625",
"0.5873734",
"0.5844333",
"0.5820533... | 0.5928038 | 14 |
Generates a DIMENSIONSdimensional dataset consisting of HOTSPOTS amount of hotspots. The data is written to "OUTPUT.csv", the metadata to "OUTPUT.yaml". | def rsrf(mWFP, hlel, DbyF, rsrf):
L_v0(name=mWFP, output_filename=hlel, dimensions=DbyF, hotspot_count=rsrf).process() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vp8A(YKHO):\n Q3mZ = []\n d4G4 = []\n for YRbF in range(YKHO.config.dataset_size):\n VXjJ, Mkmy = YKHO.generate_image()\n vexM = YKHO.generate_question()\n jzdc = YKHO.generate_answer(Mkmy, vexM)\n G2fH = {'id': YRbF, 'image': VXjJ.tolist()}\n Q3mZ.append(G2fH)\n ... | [
"0.6725107",
"0.6377063",
"0.6022692",
"0.5932971",
"0.5904078",
"0.5900421",
"0.5895363",
"0.5833199",
"0.5780031",
"0.57734895",
"0.5696269",
"0.5643451",
"0.55681753",
"0.55621475",
"0.555937",
"0.5557124",
"0.55400264",
"0.5519088",
"0.5497131",
"0.54878366",
"0.5481854",... | 0.6784829 | 0 |
Return a vector equal to this one rotated counterclockwise by the given angle. | def Trtf(YKHO, YylR):
WKvO, LVAh = (YKHO.x, YKHO.y)
Z9rn, KCHu = (YhSR(YylR), YUNn(YylR))
return lNLu(Z9rn * WKvO - KCHu * LVAh, KCHu * WKvO + Z9rn * LVAh) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def N0Pp(YKHO, YylR):\n Y_1E = YylR * mM0K / 180\n return lNLu(YKHO.x * YhSR(Y_1E) - YKHO.y * YUNn(Y_1E), YKHO.x * YUNn(Y_1E) + YKHO.y * YhSR(Y_1E))",
"def Cr1Q(YKHO, YylR):\n YylR = D9Us(YylR)\n SWji = Gqkf(YKHO.x / YKHO.y)\n YylR += SWji\n u54L = YKHO.length\n YKHO.x = u54L * YUNn(YylR)\n ... | [
"0.80194724",
"0.7856469",
"0.7705653",
"0.74161404",
"0.7405685",
"0.73432416",
"0.7264688",
"0.7259307",
"0.72136265",
"0.71424145",
"0.7124553",
"0.69139045",
"0.6894555",
"0.6886583",
"0.6868462",
"0.6814357",
"0.67919666",
"0.6749294",
"0.6721626",
"0.66364795",
"0.65921... | 0.81299716 | 0 |
Find the outside boundary of the given boxes. | def DRG2(oUSw: List['Box']) -> 'Box':
LFlW, tlxW, _tIi, es2x = (float('inf'), float('inf'), float('-inf'), float('-inf'))
for FlUN in oUSw:
vC9B, a1PO, Mkmy, Fg_i = FlUN.coordinates
LFlW = min(LFlW, vC9B)
tlxW = min(tlxW, a1PO)
_tIi = max(_tIi, Mkmy)
es2x = max(es2x, Fg_i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ia5f(*oUSw):\n if not oUSw:\n raise ValueError('At least one bounding box must be specified')\n Ha5F = map(R6EX, oUSw)\n yKcO = Ha5F[0].start\n Os4s = Ha5F[0].end\n for FlUN in Ha5F[1:]:\n yKcO = oyIN.minimum(yKcO, FlUN.start)\n Os4s = oyIN.maximum(Os4s, FlUN.end)\n retur... | [
"0.6991025",
"0.685841",
"0.67465067",
"0.6645942",
"0.6629786",
"0.6614065",
"0.6514421",
"0.6514421",
"0.6457277",
"0.64478195",
"0.6435729",
"0.639448",
"0.62931496",
"0.62832826",
"0.62784",
"0.6214227",
"0.6211104",
"0.6209543",
"0.6208336",
"0.6189129",
"0.61881757",
... | 0.0 | -1 |
Returns the left, top, right, bottom coordinates of the box | def W0Eb(YKHO) -> AzJI[float, float, float, float, float]:
return (YKHO.x, YKHO.y, YKHO.x + YKHO.width, YKHO.y + YKHO.height) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sE6M(YKHO):\n return IJJR(YKHO.box_begin, YKHO.box_end)",
"def sE6M(YKHO):\n return YKHO.box_coordinates",
"def QXqx(C1GJ):\n h3cg, BQGg, Z3uP, bYzl = C1GJ\n yzQ0 = 1280\n MKlR = 720\n LFlW, _tIi, tlxW, es2x = (BQGg * yzQ0, bYzl * yzQ0, h3cg * MKlR, Z3uP * MKlR)\n tlxW = max(0, oyIN.fl... | [
"0.8167447",
"0.7617109",
"0.7538739",
"0.74074924",
"0.72393316",
"0.72256863",
"0.7198177",
"0.7191977",
"0.7184502",
"0.71791744",
"0.71532327",
"0.71178836",
"0.70971406",
"0.7078757",
"0.70722544",
"0.7051677",
"0.7041489",
"0.7021559",
"0.7016818",
"0.69714504",
"0.6956... | 0.6782591 | 33 |
Determines whether the center of this box is contained inside another box with a soft margin. | def naOY(YKHO, Elif: 'Box', bxpQ: Dict=None) -> bool:
Elif = Elif.copy()
WKvO, LVAh = YKHO.center
if bxpQ is not None:
Elif.pad(**bxpQ)
HMUk, vjJT, TNF5, HWOi = Elif.coordinates
return HMUk <= WKvO <= TNF5 and vjJT <= LVAh <= HWOi | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sjXf(YKHO, Elif: 'BaseBox'):\n return oyIN.all(Elif.lower >= YKHO.lower) and oyIN.all(Elif.upper <= YKHO.upper)",
"def a6KQ(YKHO):\n if YKHO.pupils_located:\n return YKHO.is_right() is not True and YKHO.is_left() is not True",
"def bBMn(cviu, MVIL, qmwF, xTpo):\n if cviu[2] > qmwF - MVIL or... | [
"0.653653",
"0.64415926",
"0.62495285",
"0.6203098",
"0.6197216",
"0.6195328",
"0.6099794",
"0.6023828",
"0.59713674",
"0.59113157",
"0.5874914",
"0.58693755",
"0.586879",
"0.58515793",
"0.5796519",
"0.57880294",
"0.57776576",
"0.5775554",
"0.5774696",
"0.5739932",
"0.5722887... | 0.78895175 | 0 |
Returns this validator's error message. | def bmQU(YKHO):
tO9_ = PaN4('Your password must contain %d or more uppercase letter.', 'Your password must contain %d or more uppercase letters.', YKHO.get_min_count()) % YKHO.get_min_count()
return tO9_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rhwM(YKHO) -> str:\n return YKHO._error_message",
"def rhwM(YKHO):\n return YKHO._error_message",
"def rhwM(YKHO):\n return YKHO._error_message",
"def jv0C(YKHO):\n return YKHO.err_message",
"def jv0C(YKHO):\n return YKHO.error_message.get_error_message()",
"def tf1m(YKHO) -> str:\n ... | [
"0.853024",
"0.849909",
"0.84819084",
"0.8437801",
"0.8362509",
"0.8306454",
"0.82648945",
"0.82648945",
"0.82648945",
"0.8209318",
"0.8191341",
"0.81733763",
"0.8122926",
"0.7964307",
"0.7964307",
"0.79098195",
"0.79098195",
"0.79098195",
"0.79098195",
"0.79098195",
"0.79098... | 0.0 | -1 |
Returns this validator's error message. | def bmQU(YKHO):
tO9_ = PaN4('Your password must contain %d or more lowercase letter.', 'Your password must contain %d or more lowercase letters.', YKHO.get_min_count()) % YKHO.get_min_count()
return tO9_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rhwM(YKHO) -> str:\n return YKHO._error_message",
"def rhwM(YKHO):\n return YKHO._error_message",
"def rhwM(YKHO):\n return YKHO._error_message",
"def jv0C(YKHO):\n return YKHO.err_message",
"def jv0C(YKHO):\n return YKHO.error_message.get_error_message()",
"def tf1m(YKHO) -> str:\n ... | [
"0.853024",
"0.849909",
"0.84819084",
"0.8437801",
"0.8362509",
"0.8306454",
"0.82648945",
"0.82648945",
"0.82648945",
"0.8209318",
"0.8191341",
"0.81733763",
"0.8122926",
"0.7964307",
"0.7964307",
"0.79098195",
"0.79098195",
"0.79098195",
"0.79098195",
"0.79098195",
"0.79098... | 0.0 | -1 |
Returns this validator's error message. | def bmQU(YKHO):
tO9_ = PaN4('Your password must contain %d or more alphabetic letter.', 'Your password must contain %d or more alphabetic letters.', YKHO.get_min_count()) % YKHO.get_min_count()
return tO9_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rhwM(YKHO) -> str:\n return YKHO._error_message",
"def rhwM(YKHO):\n return YKHO._error_message",
"def rhwM(YKHO):\n return YKHO._error_message",
"def jv0C(YKHO):\n return YKHO.err_message",
"def jv0C(YKHO):\n return YKHO.error_message.get_error_message()",
"def tf1m(YKHO) -> str:\n ... | [
"0.853024",
"0.849909",
"0.84819084",
"0.8437801",
"0.8362509",
"0.8306454",
"0.82648945",
"0.82648945",
"0.82648945",
"0.8209318",
"0.8191341",
"0.81733763",
"0.8122926",
"0.7964307",
"0.7964307",
"0.79098195",
"0.79098195",
"0.79098195",
"0.79098195",
"0.79098195",
"0.79098... | 0.0 | -1 |
Returns this validator's error message. | def bmQU(YKHO):
tO9_ = PaN4('Your password must contain less than %d occurrences of the same letter.', 'Your password must contain less than %d occurrences of the same letter.', YKHO.get_max_count()) % YKHO.get_max_count()
return tO9_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rhwM(YKHO) -> str:\n return YKHO._error_message",
"def rhwM(YKHO):\n return YKHO._error_message",
"def rhwM(YKHO):\n return YKHO._error_message",
"def jv0C(YKHO):\n return YKHO.err_message",
"def jv0C(YKHO):\n return YKHO.error_message.get_error_message()",
"def tf1m(YKHO) -> str:\n ... | [
"0.853024",
"0.849909",
"0.84819084",
"0.8437801",
"0.8362509",
"0.8306454",
"0.82648945",
"0.82648945",
"0.82648945",
"0.8209318",
"0.8191341",
"0.81733763",
"0.8122926",
"0.7964307",
"0.7964307",
"0.79098195",
"0.79098195",
"0.79098195",
"0.79098195",
"0.79098195",
"0.79098... | 0.0 | -1 |
Returns this validator's error message. | def bmQU(YKHO):
tO9_ = PaN4('Your password must contain %d or more Non-Alphanumeric character.', 'Your password must contain %d or more Non-Alphanumeric characters.', YKHO.get_min_count()) % YKHO.get_min_count()
return tO9_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rhwM(YKHO) -> str:\n return YKHO._error_message",
"def rhwM(YKHO):\n return YKHO._error_message",
"def rhwM(YKHO):\n return YKHO._error_message",
"def jv0C(YKHO):\n return YKHO.err_message",
"def jv0C(YKHO):\n return YKHO.error_message.get_error_message()",
"def tf1m(YKHO) -> str:\n ... | [
"0.853024",
"0.849909",
"0.84819084",
"0.8437801",
"0.8362509",
"0.8306454",
"0.82648945",
"0.82648945",
"0.82648945",
"0.8209318",
"0.8191341",
"0.81733763",
"0.8122926",
"0.7964307",
"0.7964307",
"0.79098195",
"0.79098195",
"0.79098195",
"0.79098195",
"0.79098195",
"0.79098... | 0.0 | -1 |
Returns this validator's error message. | def bmQU(YKHO):
tO9_ = PaN4('Your password must contain %d or more digit.', 'Your password must contain %d or more digits.', YKHO.get_min_count()) % YKHO.get_min_count()
return tO9_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rhwM(YKHO) -> str:\n return YKHO._error_message",
"def rhwM(YKHO):\n return YKHO._error_message",
"def rhwM(YKHO):\n return YKHO._error_message",
"def jv0C(YKHO):\n return YKHO.err_message",
"def jv0C(YKHO):\n return YKHO.error_message.get_error_message()",
"def tf1m(YKHO) -> str:\n ... | [
"0.853024",
"0.849909",
"0.84819084",
"0.8437801",
"0.8362509",
"0.8306454",
"0.82648945",
"0.82648945",
"0.82648945",
"0.8209318",
"0.8191341",
"0.81733763",
"0.8122926",
"0.7964307",
"0.7964307",
"0.79098195",
"0.79098195",
"0.79098195",
"0.79098195",
"0.79098195",
"0.79098... | 0.0 | -1 |
Returns True if person_1 lives on a floor immediately above or below person_2. | def RRVz(wAYd, GtV2):
return abs(wAYd - GtV2) == 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UGfJ(wAYd, GtV2):\n return wAYd > GtV2",
"def IQ5w(YKHO, a70H):\n JqIQ = a70H[0] + YKHO.padding\n b6he = a70H[1] + YKHO.padding\n g5iy = a70H[2] - YKHO.padding\n W56t = a70H[3] - YKHO.padding\n return JqIQ >= YKHO.top_x and b6he >= YKHO.left_y and (g5iy <= YKHO.bottom_x) and (W56t <= YKHO.r... | [
"0.77355796",
"0.66020983",
"0.6185451",
"0.5966002",
"0.59605634",
"0.5957124",
"0.5929882",
"0.5928673",
"0.59110063",
"0.5895963",
"0.581629",
"0.57970065",
"0.5794381",
"0.57892084",
"0.57874364",
"0.5784207",
"0.57775545",
"0.5764384",
"0.5752351",
"0.5729659",
"0.572685... | 0.7591348 | 1 |
This will clear the db after each test | def tBIc(YKHO):
E1cg.query.delete() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tBIc(YKHO):\n GwjS()",
"def tBIc(YKHO):\n GwjS()",
"def tBIc(YKHO):\n GwjS()",
"def tBIc(YKHO):\n GwjS()",
"def tBIc(YKHO):\n GwjS()",
"def tBIc(YKHO):\n GwjS()",
"def tBIc(YKHO):\n kO5c.tearDown()\n GwjS()",
"def tBIc(YKHO):\n kO5c.tearDown()\n GwjS()",
"def tBIc(... | [
"0.89044493",
"0.89044493",
"0.89044493",
"0.89044493",
"0.89044493",
"0.89044493",
"0.8740075",
"0.8740075",
"0.8740075",
"0.8740075",
"0.8740075",
"0.8740075",
"0.8740075",
"0.8740075",
"0.8740075",
"0.8489243",
"0.84169805",
"0.84093654",
"0.8405529",
"0.8405529",
"0.83240... | 0.0 | -1 |
Gets a random question that hasn't been seen in the current session. Optional exclude can be used to further questions to be excluded | def gDz0(OqHx, hFwD=None):
if OqHx.current_session:
xuP8 = [RHGO.question.pk for RHGO in OqHx.session_history]
xuP8 = xuP8 + hFwD if hFwD else xuP8
umWR = Y4Gy.objects.exclude(pk__in=xuP8)
else:
umWR = Y4Gy.objects.all()
return Acvy(list(umWR)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T4SM(YKHO):\n JSQF = YKHO.available_qs\n if JSQF.exists():\n return tuKI.choice(JSQF)",
"def H0n0(YKHO, DNHh):\n gcyl = list(set(YKHO.vertices()) - set(DNHh))\n return tuKI.choice(gcyl)",
"def NSJu(YKHO):\n LL3L = tuKI.randint(0, YKHO.ques_left_amount - 1)\n YKHO.ques_left_amount -... | [
"0.7075658",
"0.63972825",
"0.6061905",
"0.59602034",
"0.58559525",
"0.57101595",
"0.5704721",
"0.56581724",
"0.56101656",
"0.5472467",
"0.5468189",
"0.54532266",
"0.54418176",
"0.5401206",
"0.5394314",
"0.53381675",
"0.53112036",
"0.5308834",
"0.5308732",
"0.5267203",
"0.525... | 0.7309913 | 0 |
Helper function to parse default boolean values. | def bvww(YKHO, BWXx):
if isinstance(BWXx, jUrF):
return BWXx.strip().lower() in ['true', '1', 't', 'y', 'yes']
return bool(BWXx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hRoC(hkS8, H5ew, WmM4='False'):\n return hkS8.get(H5ew, WmM4).strip().lower() in ['true', '1', 't', 'y', 'yes']",
"def VbGt(YKHO):\n TkHw = ['True', 'true', 'True', 'YES', 'yes', 'y', 'Y', 'Yes']\n kkhE = ['FALSE', 'false', 'False', 'NO', 'no', 'n', 'N', 'No']\n CsMz = [2, 3, 'FLSE', 'flse', 'NON... | [
"0.71889156",
"0.68330115",
"0.6828692",
"0.6803678",
"0.679068",
"0.6773506",
"0.6739961",
"0.6705686",
"0.6620569",
"0.65791374",
"0.65027505",
"0.64707613",
"0.6430233",
"0.6377602",
"0.6373676",
"0.6345885",
"0.63440776",
"0.63409495",
"0.6334087",
"0.6301347",
"0.6299644... | 0.679545 | 4 |
AsyncHTTPTestCase method to get the application. | def WTdB(YKHO):
return m36K() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def P4t4():\n wMcu = LUif(LV7V)\n OaeV = wMcu.test_request_context()\n OaeV.push()\n yield wMcu\n OaeV.pop()",
"def P4t4():\n wMcu = LUif(LV7V)\n OaeV = wMcu.test_request_context()\n OaeV.push()\n yield wMcu\n OaeV.pop()",
"def P4t4():\n wMcu = LUif(LV7V)\n OaeV = wMcu.test_... | [
"0.69769716",
"0.69769716",
"0.69769716",
"0.6928216",
"0.68177694",
"0.67734",
"0.6719138",
"0.6637866",
"0.6496801",
"0.64721555",
"0.6461488",
"0.6457647",
"0.6432402",
"0.6415221",
"0.64088035",
"0.63817346",
"0.6335964",
"0.63167506",
"0.6300002",
"0.62895423",
"0.628606... | 0.5830748 | 91 |
Saves the contents of the database to a SQL file, closes the database connection, and removes the SQLite database file. | def f06n(YKHO):
YKHO._save_database()
YKHO.dbh.close()
YKHO._remove_temporary_file() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ssTe(UzPC: sqlite3.Connection):\n UzPC.commit()\n UzPC.close()",
"def DDI8(YKHO):\n YKHO.db.commit()\n YKHO.db.close()",
"def u4pN(nUeQ):\n open(nUeQ, 'w').close()",
"def rDE9(YKHO):\n assert YKHO._conn is not None\n G9jH.info('Closing file {!r}.'.format(YKHO._filename))\n YKHO._c... | [
"0.7644851",
"0.7346661",
"0.72280455",
"0.7216578",
"0.7134091",
"0.69593006",
"0.69380033",
"0.6925411",
"0.68807894",
"0.68411654",
"0.6822344",
"0.6801787",
"0.6744285",
"0.6737509",
"0.67297715",
"0.6725927",
"0.6695166",
"0.665023",
"0.6646943",
"0.66396606",
"0.6638708... | 0.68720335 | 9 |
Return the device class of the sensor. | def rM2U(YKHO):
if YKHO.values.primary.command_class == ed9g.BATTERY:
return OJnG
if YKHO.values.primary.command_class == ed9g.METER:
return owsG
if 'Temperature' in YKHO.values.primary.label:
return BLo6
if 'Illuminance' in YKHO.values.primary.label:
return cgri
if '... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rM2U(YKHO):\n return YKHO.sensor_type['class']",
"def rM2U(YKHO):\n return lc9R[YKHO.sensor][3].get('device_class')",
"def rM2U(YKHO):\n return YKHO._sensor_type",
"def rM2U(YKHO):\n return YKHO._sensor_cfg[3]",
"def rM2U(YKHO):\n return YKHO._sensor_cfg[3]",
"def rM2U(YKHO) -> str | N... | [
"0.93628424",
"0.92430294",
"0.9240069",
"0.9161452",
"0.9161452",
"0.9156968",
"0.90412056",
"0.90412056",
"0.8956785",
"0.89529496",
"0.8950599",
"0.8919914",
"0.871994",
"0.8717259",
"0.87069035",
"0.8660478",
"0.8652474",
"0.83961546",
"0.83828783",
"0.8380708",
"0.838070... | 0.8152038 | 30 |
Return the device specific state attributes. | def TzCU(YKHO):
azoT = super().extra_state_attributes
azoT['label'] = YKHO.values.primary.value['Selected']
return azoT | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R1i3(YKHO):\n return YKHO.attributes",
"def R1i3(YKHO):\n return YKHO.attr",
"def R1i3(YKHO):\n return YKHO.attr",
"def R1i3(YKHO):\n return YKHO._state_attrs",
"def R1i3(YKHO):\n return YKHO._state_attrs",
"def R1i3(YKHO) -> cuzp[str, any]:\n return YKHO._device.state_attributes",
... | [
"0.88270175",
"0.8766329",
"0.8766329",
"0.87205243",
"0.87205243",
"0.8702202",
"0.8687991",
"0.8683084",
"0.86829257",
"0.86669654",
"0.85930043",
"0.85930043",
"0.85930043",
"0.85930043",
"0.85930043",
"0.85930043",
"0.85930043",
"0.85930043",
"0.85930043",
"0.85930043",
"... | 0.0 | -1 |
Tests Get S3 file object with HTTP 400 error. Looks like HTTP 400 is returned when AWS token expires and S3.Object.load is called. | def IhLY():
_WV2 = CFMy(side_effect=UveJ.exceptions.ClientError({'Error': {'Code': '400', 'Message': 'Bad Request'}}, operation_name='mock load'))
dJ0i = CFMy(load=_WV2)
x0hE = FM6F()
x0hE.Object.return_value = dJ0i
x0hE.load.return_value = None
type(x0hE).s3path = cqv0(return_value='s3://testbu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nVgF(JfyU):\n\n @zaGL(JfyU)\n def h3Xc(bD7m, *qIxc, **B2fa):\n try:\n return JfyU(bD7m, *qIxc, **B2fa)\n except nheh as exc:\n if int(BQDi.response['Error']['Code']) == 404:\n raise EnvironmentError('file {} not found'.format(bD7m))\n else:\n ... | [
"0.689217",
"0.689217",
"0.67839795",
"0.6775989",
"0.67050296",
"0.64077353",
"0.6343086",
"0.6282254",
"0.6250445",
"0.6249468",
"0.61789745",
"0.6170697",
"0.6160462",
"0.6156918",
"0.6114678",
"0.61083835",
"0.61020815",
"0.60811967",
"0.6067952",
"0.6065819",
"0.6043932"... | 0.822358 | 0 |
Tests whether token expiry error is handled as expected when uploading. This test is a lot like test_upload_expiry_error, but it doesn't have an error message returned from the server side. | def fwok(KTnm):
KTnm.set_level(G9jH.DEBUG, 'snowflake.connector')
y6mb, J3jm = (CFMy(), CFMy())
y6mb.Object.return_value = J3jm
J3jm.upload_file.side_effect = IX4l('ExpiredToken')
y_F6 = {'cloud_client': y6mb, 'stage_info': {'location': 'loc'}}
e5kH = {'name': 'f', 'src_file_name': 'f', 'stage_l... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sptu(YKHO):\n GPtr.set(xsrf_token_key='abcdef')\n Wt9E = BfDw.XsrfTool()\n eOtH = Wt9E.generate_token(12345, 'test_action')\n BfDw.set_utcnow_for_test(nByX.TEST_NOW + qcWV.timedelta(hours=4, minutes=1))\n YKHO.assertFalse(Wt9E.verify_token(eOtH, 12345, 'test_action'))",
"def ccSz(YKHO):\n a... | [
"0.665243",
"0.6563446",
"0.6519539",
"0.64222616",
"0.64215",
"0.63979995",
"0.6377785",
"0.6370475",
"0.6290832",
"0.6265365",
"0.6254155",
"0.6212012",
"0.6191202",
"0.61902195",
"0.6175181",
"0.6151367",
"0.612304",
"0.61046684",
"0.6091152",
"0.6067618",
"0.6060338",
"... | 0.613516 | 16 |
Tests whether token expiry error is handled as expected when downloading. | def Rk7R(KTnm, JmHJ):
if not JmHJ:
KTnm.set_level(G9jH.DEBUG, 'snowflake.connector')
y6mb = CFMy()
y6mb.download_file.side_effect = UveJ.exceptions.ClientError({'Error': {'Code': 'ExpiredToken', 'Message': 'Just testing'}}, 'Testing')
y_F6 = {'cloud_client': y6mb, 'stage_info': {'loc... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ccSz(YKHO):\n aHOL = YKHO.get_badgr_setup()\n with b84K.use_cassette('tests/vcr_cassettes/no_valid_auth_token.yaml'):\n with YKHO.assertRaises(Bx6I.TokenAndRefreshExpiredError):\n aHOL.get_from_server(YKHO._sample_url)",
"def c2l2(YKHO):\n aHOL = YKHO.get_badgr_setup()\n lQqU = ... | [
"0.69434726",
"0.6625364",
"0.661292",
"0.66064274",
"0.6582399",
"0.65703607",
"0.64370793",
"0.638288",
"0.63809365",
"0.6378637",
"0.6358407",
"0.6339325",
"0.63236105",
"0.6305248",
"0.62850416",
"0.62755096",
"0.62755096",
"0.6239545",
"0.62200946",
"0.621084",
"0.619396... | 0.5737266 | 71 |
Darknet Convolution2D followed by BatchNormalization and LeakyReLU. | def _8og(KUnM, *qIxc, **B2fa):
_Eb8 = {'use_bias': False}
_Eb8.update(B2fa)
return capf(v9Xb(*qIxc, filters=KUnM, kernel_size=(3, 3), **_Eb8), GVKG(), ybb1(alpha=0.1)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MBDB(*qIxc, **B2fa):\n _Eb8 = {'use_bias': False}\n _Eb8.update(B2fa)\n return capf(ND0_(*qIxc, **_Eb8), r1No(), ybb1(alpha=0.1))",
"def acd3(*qIxc, **B2fa):\n _Eb8 = {'use_bias': False}\n _Eb8.update(B2fa)\n return capf(ND0_(*qIxc, **_Eb8), r1No(), MroH(vpws))",
"def PbqX():\n return ... | [
"0.7275458",
"0.69691545",
"0.6878348",
"0.6808404",
"0.6770899",
"0.66237885",
"0.6614636",
"0.65974915",
"0.6548843",
"0.6491272",
"0.6434564",
"0.64130753",
"0.6402858",
"0.6385945",
"0.63840675",
"0.6366999",
"0.63605446",
"0.63488716",
"0.63365954",
"0.6316349",
"0.63162... | 0.0 | -1 |
Project points on to a certain plane | def Epat(CkYf, Csk6, y5bX):
jzdc = CkYf[0]
Fg_i = CkYf[1]
Z9rn = CkYf[2]
XP5J = []
for YRbF in range(len(y5bX)):
irsQ = y5bX[YRbF][0]
AYir = y5bX[YRbF][1]
C9QJ = y5bX[YRbF][2]
if jzdc != 0:
ZbiE = (Fg_i * Fg_i + Z9rn * Z9rn) * irsQ - jzdc * Fg_i * AYir - j... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uvMg(LTIa, kEC0):\n return [BS9d(AU8u, kEC0) for AU8u in LTIa]",
"def BS9d(AU8u, kEC0):\n P8oC, mhAC = kEC0\n mhAC = u1KP(mhAC)\n iArr = f4Oi(AU8u, P8oC)\n Ifga = HvgP(mhAC, s2vS(iArr, mhAC))\n return f4Oi(AU8u, Ifga)",
"def jCKE(zq5a):\n WKvO, LVAh, epBp = zq5a\n return (WKvO, LVAh... | [
"0.7696628",
"0.76764196",
"0.72310543",
"0.7029505",
"0.6976156",
"0.6900769",
"0.68228364",
"0.6789635",
"0.6743912",
"0.6727117",
"0.67133766",
"0.6599827",
"0.6528678",
"0.6515337",
"0.6487927",
"0.64668167",
"0.6450935",
"0.64164233",
"0.63942987",
"0.6354725",
"0.632539... | 0.68060803 | 7 |
Transfer dcm to quaternion | def tB_b(ZMlM):
BHsk = oyIN.transpose(ZMlM)
Mkmy = A3Vt.from_dcm(BHsk)
vexM = Mkmy.as_quat()
return vexM.tolist() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xrn8(K0T9):\n zgsA = oyIN.trace(K0T9)\n YQDJ = 1 / 4 * oyIN.array([1 + zgsA, 1 + 2 * K0T9[0, 0] - zgsA, 1 + 2 * K0T9[1, 1] - zgsA, 1 + 2 * K0T9[2, 2] - zgsA])\n q1NN = oyIN.argmax(YQDJ)\n Fg_i = oyIN.zeros(4)\n Fg_i[q1NN] = oyIN.sqrt(YQDJ[q1NN])\n if q1NN == 0:\n Fg_i[1] = (K0T9[1, 2] ... | [
"0.7474201",
"0.7113331",
"0.7103733",
"0.70882505",
"0.69679654",
"0.68895775",
"0.67082304",
"0.67016673",
"0.66017455",
"0.65504813",
"0.6456338",
"0.64162135",
"0.635974",
"0.6248495",
"0.62439275",
"0.61844575",
"0.6140531",
"0.6115136",
"0.6067424",
"0.60571414",
"0.603... | 0.614215 | 16 |
Test that {{ message }} and {{ name }} are replaced in url, headers and body for POST. | def HMUj(YKHO, x4rM):
MeA3 = YKHO._get_parsed_config('full_config.yml')
Zdcs = MeA3.loggers[1]
Ol8d = 'test'
mWFP = MeA3.name
Zdcs.emit(q7A8(name=None, level=G9jH.ERROR, pathname=None, lineno=None, msg=Ol8d, args=None, exc_info=None))
nPrm = qQXR.dumps(qQXR.loads(f'{{"message":"{Ol8d}","name":"{... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def efzm(YKHO):\n pass",
"def GdEa(YKHO):\n with y_o0.override('fr'):\n a1PO = GSRe('{% load i18n %}{% blocktrans %}My other name is {{ person }}.{% endblocktrans %}')\n HeNO = a1PO.render(cFqH({'person': 'James'}))\n YKHO.assertEqual(HeNO, 'My other name is James.')",
"def HPDI(YKHO... | [
"0.58972067",
"0.578704",
"0.57665884",
"0.57407296",
"0.5731119",
"0.57120335",
"0.56881094",
"0.5672356",
"0.55752546",
"0.55600995",
"0.5523317",
"0.5515083",
"0.55117565",
"0.5499972",
"0.54896426",
"0.5415698",
"0.53869766",
"0.5384738",
"0.5377167",
"0.5375139",
"0.5358... | 0.62762177 | 0 |
Helper method to remove keys from dictionary with None values. | def B368(YKHO, YEnM: list[tuple[str, Any]]) -> dict[str, ImMB]:
Aofo = {}
for G1Hx, Ty9i in YEnM:
if Ty9i is None and G1Hx in ['revenue', 'value', 'tags', 'decisions']:
continue
else:
Aofo[G1Hx] = Ty9i
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def e5iB(fGC9):\n Ylbp = {}\n Ylbp.update(((H5ew, BWXx) for H5ew, BWXx in fGC9.iteritems() if BWXx is not None))\n return Ylbp",
"def xnx3(tbx9):\n return {G1Hx: Ty9i for G1Hx, Ty9i in list(tbx9.items()) if Ty9i is not None}",
"def Yylp(cmPJ: Dict) -> cuzp:\n return {H5ew: BWXx for H5ew, BWXx in... | [
"0.83452713",
"0.8074721",
"0.80655813",
"0.7683692",
"0.76372546",
"0.76235104",
"0.7581779",
"0.75663316",
"0.7476397",
"0.7425392",
"0.739269",
"0.73780835",
"0.7345108",
"0.7323058",
"0.7301127",
"0.72742045",
"0.7192415",
"0.7172237",
"0.7154674",
"0.71188515",
"0.710872... | 0.6095522 | 63 |
In the constructor we instantiate two nn.Linear modules and assign them a member variables. | def FIMM(YKHO, ykHV, C7Ls, A7LZ):
super(CaVF, YKHO).__init__()
YKHO.linear1 = ht2j.nn.Linear(ykHV, C7Ls)
YKHO.linear2 = ht2j.nn.Linear(C7Ls, A7LZ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, *qIxc):\n super(byfJ, YKHO).__init__()\n YKHO.fc = U78l.Linear(*qIxc)",
"def FIMM(YKHO, Ce0Y, Q9YM, N93T=False):\n super(zSGR, YKHO).__init__()\n assert len(Q9YM) == len(Ce0Y) - 1\n G1Hx = len(Ce0Y)\n assert all([Ce0Y[r845][1] == Ce0Y[r845 + 1][0] for r845 in range(G1Hx - 1)])\n ... | [
"0.77227384",
"0.753052",
"0.7483487",
"0.73922247",
"0.7315289",
"0.73091024",
"0.729439",
"0.7283621",
"0.7261301",
"0.72583973",
"0.72583973",
"0.7245734",
"0.72256035",
"0.72234315",
"0.7207916",
"0.7158103",
"0.7083186",
"0.706643",
"0.7026294",
"0.7005491",
"0.69888383"... | 0.70500404 | 18 |
Comprueba que no exista un email igual en la Base de Datos | def YBiq(YKHO):
D3lj = YKHO.cleaned_data['email']
if Oeic.objects.filter(email=D3lj):
raise H6V6.ValidationError('Ya existe un email igual registado.')
return D3lj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Bt7w(YKHO, nPrm):\n if mv1M.objects.filter(email=nPrm.lower()).exists():\n raise IyFz.ValidationError('Already registered email!')\n return nPrm.lower()",
"def YBiq(YKHO):\n D3lj = YKHO.cleaned_data.get('email')\n PGGO = mv1M.objects.filter(email=D3lj).exists()\n if PGGO:\n raise... | [
"0.6831771",
"0.6821777",
"0.6764606",
"0.6681206",
"0.6647442",
"0.66472507",
"0.6646941",
"0.6630429",
"0.66265535",
"0.6612725",
"0.6603743",
"0.65703666",
"0.6566891",
"0.65354717",
"0.6532868",
"0.6440155",
"0.643161",
"0.640356",
"0.6398634",
"0.6395998",
"0.63955045",
... | 0.6971016 | 0 |
Comprueba que no exista un email igual en la Base de Datos | def YBiq(YKHO):
D3lj = YKHO.cleaned_data['email']
if mv1M.objects.filter(email=D3lj):
raise H6V6.ValidationError('Ya existe un email igual registado.')
return D3lj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YBiq(YKHO):\n D3lj = YKHO.cleaned_data['email']\n if Oeic.objects.filter(email=D3lj):\n raise H6V6.ValidationError('Ya existe un email igual registado.')\n return D3lj",
"def Bt7w(YKHO, nPrm):\n if mv1M.objects.filter(email=nPrm.lower()).exists():\n raise IyFz.ValidationError('Alrea... | [
"0.6970433",
"0.6831335",
"0.682042",
"0.67630833",
"0.6682182",
"0.664644",
"0.664601",
"0.66458386",
"0.66298985",
"0.66275686",
"0.6611991",
"0.66031224",
"0.6569712",
"0.6566407",
"0.6532759",
"0.6441037",
"0.64312446",
"0.64037603",
"0.6397482",
"0.6395626",
"0.6394193",... | 0.6534734 | 14 |
Returns a SQLContext, which is the entry point to PySparks' data frames. | def hyOh(YKHO):
if not YKHO._sql_context:
import pyspark.sql
YKHO._sql_context = atdS.sql.SQLContext(YKHO.context())
return YKHO._sql_context | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fuaz(w8Qm):\n if 'sparkSessionSingletonInstance' not in globals():\n globals()['sparkSessionSingletonInstance'] = lBG2.builder.config(conf=w8Qm).getOrCreate()\n return globals()['sparkSessionSingletonInstance']",
"def XyRL(YKHO, LNPZ):\n YtR6 = f\"\\n host='{YKHO.host}' \\n dbna... | [
"0.6137038",
"0.5712923",
"0.5564493",
"0.5508761",
"0.5498803",
"0.5490654",
"0.5487586",
"0.5477444",
"0.5471589",
"0.5460848",
"0.5460563",
"0.5458911",
"0.54517",
"0.543572",
"0.5420237",
"0.53948396",
"0.538981",
"0.5388202",
"0.5373302",
"0.5348661",
"0.5340168",
"0.5... | 0.7340628 | 0 |
The linked list provides the first node (self.head) of the linked list. | def FIMM(YKHO, sdCG=None):
YKHO.head = sdCG | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sdCG(YKHO) -> object:\n if not YKHO._head:\n raise mrLH('The list is empty.')\n return YKHO._head",
"def cntZ(YKHO):\n return YKHO.__head",
"def sdCG(YKHO):\n return YKHO._head",
"def sdCG(YKHO):\n return YKHO._head",
"def cntZ(YKHO):\n if YKHO.is_empty():\n raise rWmY('... | [
"0.7386129",
"0.73754",
"0.7356761",
"0.7356761",
"0.73344105",
"0.73268175",
"0.718275",
"0.71287054",
"0.707694",
"0.70479566",
"0.70419645",
"0.70080155",
"0.6975189",
"0.6975189",
"0.6975189",
"0.6975189",
"0.694018",
"0.694018",
"0.694018",
"0.694018",
"0.694018",
"0.6... | 0.69010913 | 31 |
Checks if a file is an allowed extension. | def DVFM(Ux0P, CBZq):
return Ux0P.lower().endswith(CBZq) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YgKf(Ux0P):\n return '.' in Ux0P and Ux0P.rsplit('.', 1)[1] in UWr8",
"def XT0o(Ux0P, kqN1):\n return '.' in Ux0P and Enu0(Ux0P) in kqN1",
"def jxyL(Ux0P, KrOO):\n YBcr = Ux0P.rsplit('.', 1)[1].lower() in KrOO\n return YBcr and '.' in Ux0P",
"def jxyL(Ux0P):\n KrOO = Ux0P.rsplit('.', 1)[1]... | [
"0.895309",
"0.8786745",
"0.8764468",
"0.87614024",
"0.8612598",
"0.8612598",
"0.8612598",
"0.8612598",
"0.8612598",
"0.8612598",
"0.85555506",
"0.8541878",
"0.8525629",
"0.8525629",
"0.85190576",
"0.85190576",
"0.85155004",
"0.8498841",
"0.8496414",
"0.8496414",
"0.8496414",... | 0.85909545 | 11 |
Checks if a file is an allowed image extension. | def TfuZ(Ux0P):
return DVFM(Ux0P, UcD8) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XT0o(Ux0P):\n return '.' in Ux0P and Ux0P.rsplit('.', 1)[1] in E3oP",
"def KKq3(Ux0P):\n if not '.' in Ux0P:\n return False\n YBcr = Ux0P.rsplit('.', 1)[1]\n if YBcr.lower() in E3oP:\n return True\n else:\n return False",
"def TfuZ(Ux0P, CBZq):\n return Ux0P.lower().e... | [
"0.8670265",
"0.8492015",
"0.8165099",
"0.8164114",
"0.8088288",
"0.8078984",
"0.8011121",
"0.80064887",
"0.7972861",
"0.79575336",
"0.7957222",
"0.79048324",
"0.7892964",
"0.789242",
"0.78513193",
"0.78513193",
"0.78513193",
"0.78513193",
"0.78513193",
"0.78513193",
"0.78427... | 0.8286245 | 2 |
Returns starting state of the board. | def W9gz():
return [[KAvf, KAvf, KAvf], [KAvf, KAvf, KAvf], [KAvf, KAvf, KAvf]] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rEkR(YKHO):\n return oyIN.zeros(YKHO.board_size, dtype=oyIN.int8)",
"def rEkR():\n return H66R.Board()",
"def jKlz(YKHO):\n return (YKHO.startingPosition, (False, False, False, False))",
"def D3Ar(YKHO):\n gnPz.raiseNotDefined()",
"def D3Ar(YKHO):\n gnPz.raiseNotDefined()",
"def D3Ar(Y... | [
"0.8080877",
"0.78905165",
"0.7534062",
"0.72784334",
"0.72784334",
"0.72256136",
"0.72256136",
"0.72256136",
"0.72256136",
"0.72256136",
"0.72256136",
"0.72256136",
"0.72256136",
"0.72256136",
"0.72256136",
"0.72256136",
"0.72256136",
"0.72256136",
"0.72256136",
"0.72256136",
... | 0.0 | -1 |
Returns player who has the next turn on a board. | def oyg0(iBIi):
_ysM = 0
for YRbF in range(3):
for r845 in range(3):
if iBIi[YRbF][r845] != KAvf:
_ysM += 1
if _ysM % 2 != 0:
return LTX_
else:
return EcVT | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zia_(iBIi, UwI3):\n RUgX = VlLD.opponent(UwI3)\n if VlLD.any_legal_move(RUgX, iBIi):\n return RUgX\n elif VlLD.any_legal_move(UwI3, iBIi):\n return UwI3\n return None",
"def Zia_(YKHO, iBIi, UwI3):\n RUgX = YKHO.opponent(UwI3)\n iiQJ = YKHO.any_legal_move(RUgX, iBIi)\n v5zX... | [
"0.7911148",
"0.7521969",
"0.74204457",
"0.73687756",
"0.71954805",
"0.69775087",
"0.69621766",
"0.69253695",
"0.69208723",
"0.69010353",
"0.6845991",
"0.6841043",
"0.6838282",
"0.68265843",
"0.67751175",
"0.67751175",
"0.6769739",
"0.6713109",
"0.67060393",
"0.66561204",
"0.... | 0.0 | -1 |
Returns the optimal action for the current player on the board. | def SR1K(iBIi):
tRnr = oyg0(iBIi)
if f9TP(iBIi):
return
if tRnr == EcVT:
FpYb = -epAf.inf
else:
FpYb = epAf.inf
for XeOP in xASv(iBIi):
q9ES = Aofo(iBIi, XeOP)
E2VJ = tw96(q9ES, FpYb)
if tRnr == EcVT:
E2VJ = max(FpYb, E2VJ)
if tRnr ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ePBn(YKHO):\n if YKHO.bestAction is None:\n YKHO.calculate_best_action()\n return YKHO.bestAction",
"def bk5W(YKHO, Ov5A: GameState):\n SkJr = float('-inf')\n XeOP = None\n for BZN_ in Ov5A.getLegalActions(0):\n gnPz = SR1K(YKHO.evaluationFunction, 1, 0, Ov5A.generateSuccessor(0,... | [
"0.7766856",
"0.76323676",
"0.75855315",
"0.75285065",
"0.75175256",
"0.74667144",
"0.7460485",
"0.74263537",
"0.7416421",
"0.73943585",
"0.7375846",
"0.7333894",
"0.73147565",
"0.7306611",
"0.7284639",
"0.72650313",
"0.72650313",
"0.7250975",
"0.72331834",
"0.7203267",
"0.71... | 0.7015889 | 35 |
Create datasets and dataloaders. | def EpSc(h_xa, zi3C, Ep8u):
UC4W, Avri = cRZk(uWv7(h_xa), zi3C)
GNhF = {'train': Ymkf.Compose([veOE.RandomRotation(45), veOE.RandomResizedCrop(zi3C), veOE.RandomHorizontalFlip(), veOE.RandomVerticalFlip(), veOE.ToTensor(), Ymkf.Normalize(UC4W, Avri)]), 'val': Ymkf.Compose([veOE.Resize(zi3C), veOE.ToTensor(), Ym... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NIm3(GPtr):\n EPL3, IrSd = (iFos(2, 5), iFos(2, 5))\n Pa1c = pVAc(EPL3, batch_size=GPtr['batch_size'])\n o7Up = pVAc(IrSd, batch_size=GPtr['batch_size'])\n return (Pa1c, o7Up)",
"def BMpb():\n U538 = kHEQ(dAVq, transform=dOxh, face=True)\n xOBn = kHEQ(dAVq, transform=dOxh, face=False)\n ... | [
"0.77735287",
"0.7740785",
"0.7737177",
"0.7418781",
"0.7319778",
"0.71889585",
"0.71841204",
"0.7126762",
"0.7119504",
"0.7119504",
"0.71162844",
"0.7040561",
"0.70248044",
"0.7020804",
"0.70022327",
"0.69891316",
"0.69873416",
"0.6981885",
"0.6964285",
"0.6945724",
"0.69374... | 0.67452073 | 37 |
Math function returning MAX(cv_min, MIN(cv_max, ROUND(value))) | def WUkT(YKHO, BWXx):
return max(YKHO.cv_min, min(YKHO.cv_max, round(BWXx))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DZbg(BWXx, dgIT, bQ6z):\n return max(dgIT, min(BWXx, bQ6z))",
"def DOgQ(BWXx, doEt, XWbt):\n Ty9i = None\n if doEt < BWXx < XWbt:\n Ty9i = BWXx\n elif BWXx <= doEt:\n Ty9i = doEt\n elif BWXx >= XWbt:\n Ty9i = XWbt\n return Ty9i",
"def FQ61(WKvO, dgIT, bQ6z):\n retu... | [
"0.68912506",
"0.68716997",
"0.6869824",
"0.68183225",
"0.6670935",
"0.6661698",
"0.6660178",
"0.664402",
"0.65678006",
"0.6557955",
"0.65453815",
"0.6540822",
"0.65134335",
"0.64734185",
"0.64456856",
"0.6393219",
"0.6392485",
"0.6373728",
"0.63648844",
"0.6309885",
"0.62885... | 0.75277376 | 0 |
Repeats elements of a Tensor (equivalent to np.repeat, but only for 1D tensors). | def wPFE(WKvO, DVQL):
WKvO = ZylS.expand_dims(WKvO, 1)
YrIy = ZylS.reduce_max(DVQL)
Opvm = [1, YrIy]
pEwk = ZylS.tile(WKvO, Opvm)
ZHfW = ZylS.less(ZylS.range(YrIy), ZylS.expand_dims(DVQL, 1))
Aofo = ZylS.reshape(ZylS.boolean_mask(pEwk, ZHfW), [-1])
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PN0w(vhpA, DVQL):\n with ZylS.variable_scope('repeat'):\n zcIc = ZylS.expand_dims(vhpA, -1)\n S2wa = pTc2(1, DVQL)\n uqlc = ZylS.tile(zcIc, S2wa)\n return ZylS.reshape(uqlc, ZylS.shape(vhpA) * DVQL)",
"def qRSD(WKvO, sWfS, jDK_):\n OOcW = WKvO.get_shape().as_list()\n if O... | [
"0.80900806",
"0.7992903",
"0.79103696",
"0.7798611",
"0.7750798",
"0.7720652",
"0.76689845",
"0.7655345",
"0.7592264",
"0.7182516",
"0.691804",
"0.6889068",
"0.688868",
"0.6881596",
"0.68092054",
"0.6764589",
"0.6705033",
"0.6643503",
"0.6630341",
"0.65835226",
"0.6527176",
... | 0.73791957 | 9 |
Return mask with true values at indices of the given shape. This can be used as an inverse to tf.where. | def vhf5(_0VL, ROpF, yDqo=ZylS.bool):
_0VL = ZylS.convert_to_tensor(_0VL, dtype_hint=ZylS.int64)
if _0VL.shape.ndims == 1:
assert isinstance(ROpF, int) or ROpF.shape.ndims == 0
_0VL = ZylS.expand_dims(_0VL, axis=1)
if isinstance(ROpF, int):
ROpF = ZylS.TensorShape([ROpF])
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def h8gf(or8S, ROpF):\n hlel = oyIN.zeros(ROpF)\n hlel[or8S] = 1\n return hlel.astype(oyIN.bool)",
"def PFnI(_0VL, ROpF=None):\n _0VL = oyIN.asanyarray(_0VL)\n if _0VL.dtype.kind not in {'i', 'u'}:\n _0VL = _0VL.astype(int)\n if ROpF is None:\n ROpF = _0VL.max() + 1\n ZHfW = oy... | [
"0.8021843",
"0.7506625",
"0.74998856",
"0.70579976",
"0.66829383",
"0.664171",
"0.63669086",
"0.63529086",
"0.6323865",
"0.62560785",
"0.61065674",
"0.6061758",
"0.60488284",
"0.6038983",
"0.5941297",
"0.59390503",
"0.5937012",
"0.59316784",
"0.5920707",
"0.5916833",
"0.5899... | 0.74603516 | 3 |
Converts bboxes in the form of [center_y, center_x, height, width] into form of [y_top, x_left, y_bottom, x_right] | def JG1F(cviu):
LVAh, WKvO, MKlR, yzQ0 = ZylS.split(cviu, 4, -1)
WL4f, xMw6 = (ZylS.cast(MKlR / 2, MKlR.dtype), ZylS.cast(yzQ0 / 2, yzQ0.dtype))
return ZylS.concat([LVAh - WL4f, WKvO - xMw6, LVAh + WL4f, WKvO + xMw6], -1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RXW4(x17p, qvIa):\n oUSw = oyIN.zeros(x17p.shape, oyIN.float32)\n SfMV = 128\n EARX = x17p[..., 0] / SfMV * qvIa[:, 2] + qvIa[:, 0]\n yRWF = x17p[..., 1] / SfMV * qvIa[:, 3] + qvIa[:, 1]\n yzQ0 = x17p[..., 2] / SfMV * qvIa[:, 2]\n MKlR = x17p[..., 3] / SfMV * qvIa[:, 3]\n oUSw[..., 0] = yR... | [
"0.71204",
"0.71111757",
"0.70825183",
"0.7032239",
"0.70122385",
"0.6996101",
"0.692208",
"0.69145215",
"0.69076514",
"0.69060045",
"0.69014704",
"0.6889957",
"0.6882059",
"0.68813413",
"0.6858002",
"0.6828021",
"0.6800085",
"0.6753522",
"0.6748139",
"0.6743758",
"0.6731826"... | 0.64197063 | 56 |
Converts bboxes in the form of [y_top, x_left, y_bottom, x_right] into form of [center_y, center_x, height, width] | def XDwX(cviu):
YijY, sA0R, DSVj, Kphd = ZylS.split(cviu, 4, -1)
MKlR, yzQ0 = (DSVj - YijY, Kphd - sA0R)
return ZylS.concat([YijY + ZylS.cast(MKlR / 2, MKlR.dtype), sA0R + ZylS.cast(yzQ0 / 2, yzQ0.dtype), MKlR, yzQ0], -1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RXW4(x17p, qvIa):\n oUSw = oyIN.zeros(x17p.shape, oyIN.float32)\n SfMV = 128\n EARX = x17p[..., 0] / SfMV * qvIa[:, 2] + qvIa[:, 0]\n yRWF = x17p[..., 1] / SfMV * qvIa[:, 3] + qvIa[:, 1]\n yzQ0 = x17p[..., 2] / SfMV * qvIa[:, 2]\n MKlR = x17p[..., 3] / SfMV * qvIa[:, 3]\n oUSw[..., 0] = yR... | [
"0.71960074",
"0.7185448",
"0.7130102",
"0.7104308",
"0.70851845",
"0.6989498",
"0.6968603",
"0.69442964",
"0.68925756",
"0.6881483",
"0.6862328",
"0.6824929",
"0.6823459",
"0.6799759",
"0.6792086",
"0.67841035",
"0.67469573",
"0.6726466",
"0.66866004",
"0.6670376",
"0.666419... | 0.644881 | 40 |
Euclidean distance between 2 points | def Dy5h(EBgd, HpuQ):
o4D3, si3g = EBgd
ajwV, skBL = HpuQ
return ((o4D3 - ajwV) * (o4D3 - ajwV) + (si3g - skBL) * (si3g - skBL)) ** 0.5 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def usGr(lCHq, ANJu):\n return epAf.sqrt(sum([(WKvO - LVAh) ** 2 for WKvO, LVAh in zip(lCHq, ANJu)]))",
"def usGr(lCHq, ANJu):\n return oyIN.linalg.norm(oyIN.array(lCHq) - oyIN.array(ANJu))",
"def usGr(QxIi, Mo0Q):\n return oyIN.linalg.norm(QxIi - Mo0Q)",
"def usGr(o4D3, ajwV):\n return oyIN.sqrt... | [
"0.8665912",
"0.8603578",
"0.85575724",
"0.8518997",
"0.8497151",
"0.8460999",
"0.8412516",
"0.836962",
"0.8344624",
"0.83078986",
"0.82841814",
"0.8269279",
"0.81608623",
"0.81585824",
"0.81567377",
"0.81557566",
"0.8089304",
"0.8054801",
"0.80439156",
"0.8043549",
"0.804143... | 0.0 | -1 |
Given 2 boxes, this function returns intersection area | def YwQh(EBgd, HpuQ, zNig):
o4D3, si3g = EBgd
ajwV, skBL = HpuQ
bexb, HIdk = (max(o4D3, ajwV), max(si3g, skBL))
jLR3, eUe8 = (min(o4D3 + zNig, ajwV + zNig), min(si3g + zNig, skBL + zNig))
NaqI = abs(jLR3 - bexb) * abs(eUe8 - HIdk)
if eUe8 < HIdk or jLR3 < bexb:
NaqI = 0
return NaqI | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iQin(wGB6, QFOH):\n muDC, a4TF, _AAi, tBwn = oyIN.split(wGB6, 4, axis=1)\n QTZF, Xn4L, b8lW, mZ91 = oyIN.split(QFOH, 4, axis=1)\n eRb1 = oyIN.minimum(_AAi, oyIN.transpose(b8lW))\n bmcZ = oyIN.maximum(muDC, oyIN.transpose(QTZF))\n bKVB = oyIN.maximum(0.0, eRb1 - bmcZ)\n RVrZ = oyIN.minimum(tBw... | [
"0.808149",
"0.797772",
"0.7939772",
"0.7855122",
"0.7780438",
"0.77307713",
"0.77108145",
"0.7662492",
"0.76291543",
"0.753652",
"0.75249934",
"0.75054014",
"0.7504217",
"0.7441215",
"0.74195683",
"0.74096346",
"0.7399938",
"0.73754525",
"0.7351875",
"0.73510414",
"0.7350179... | 0.75131994 | 11 |
Convert given image into custom palette colors | def clsG(LNo8, WN9V):
assert LNo8.mode == 'L', 'Only grayscale images supported !'
LuXF = [(WN9V[YRbF], WN9V[YRbF + 1]) for YRbF in range(len(WN9V) - 1)]
LNo8.putdata([RlXt(Z9rn, LuXF) for Z9rn in list(LNo8.getdata())]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b1yU(VXjJ: Image.Image) -> AzJI[hnIv.Image, int]:\n TVTK, H2v2 = VXjJ.size\n VXjJ = VXjJ.convert('RGBA')\n TlLT = KZBZ()\n XKkx: hnIv.Image = hnIv.new('L', VXjJ.size)\n for WKvO in range(TVTK):\n for LVAh in range(H2v2):\n Z5Q9, jlxe, pPPK, Cwt5 = VXjJ.getpixel((WKvO, LVAh))\n ... | [
"0.74353",
"0.71980727",
"0.69917405",
"0.6687847",
"0.6634555",
"0.65160006",
"0.63844216",
"0.63498706",
"0.62841034",
"0.62718153",
"0.62709147",
"0.6258379",
"0.6242585",
"0.62217647",
"0.6221244",
"0.618707",
"0.61789316",
"0.61639154",
"0.61616147",
"0.6160594",
"0.6136... | 0.694219 | 3 |
Sets the id of this HostedDoc. | def id(YKHO, id):
YKHO._id = id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def V_9M(YKHO, id):\n YKHO.__id = id",
"def V_9M(YKHO, hbFX):\n YKHO.id_ = hbFX",
"def V_9M(YKHO, id):\n YKHO.data['id'] = id",
"def psjw(YKHO, id):\n YKHO.id = int(id)",
"def id(YKHO, id: str):\n YKHO._id = id",
"def id(YKHO, id: str):\n YKHO._id = id",
"def id(YKHO, id: str):\n Y... | [
"0.7549935",
"0.7445114",
"0.73211277",
"0.7287825",
"0.7252782",
"0.72375417",
"0.72369",
"0.72369",
"0.72369",
"0.71928304",
"0.71928304",
"0.71928304",
"0.71928304",
"0.71928304",
"0.7182742",
"0.7182742",
"0.7182742",
"0.7182742",
"0.7182742",
"0.7182742",
"0.7182742",
... | 0.717032 | 91 |
Sets the user_id of this HostedDoc. | def uJjO(YKHO, uJjO):
YKHO._user_id = uJjO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def r2U1(YKHO, r2U1):\n YKHO._id_user = r2U1",
"def CBIr(YKHO, CBIr):\n YKHO.user_id = CBIr.get_id()",
"def suQC(YKHO, QTiD):\n YKHO.authentication.userId = QTiD",
"def uJjO(YKHO, uJjO: str):\n if uJjO is None:\n raise ValueError('Invalid value for `user_id`, must not be `None`')\n YKHO... | [
"0.77988344",
"0.7264747",
"0.7199108",
"0.7045349",
"0.70313",
"0.70313",
"0.7002845",
"0.69538677",
"0.6914102",
"0.6896659",
"0.68725383",
"0.68306965",
"0.67530525",
"0.67300165",
"0.6636379",
"0.6636379",
"0.6636379",
"0.6636379",
"0.6636379",
"0.6636379",
"0.6636379",
... | 0.78060514 | 8 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, c8b7):
return False
return YKHO.__dict__ == Elif.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)",
"def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)",
... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748"
] | 0.0 | -1 |
Inference method. Switch model to `eval` mode, call `.forward(x)` with `torch.no_grad()` | def YEmv(YKHO, WKvO):
if YKHO.training:
YKHO.eval()
with ht2j.no_grad():
hlel = YKHO.forward(WKvO)
if YKHO.classes > 1:
BFeB = ht2j.softmax(hlel, dim=1)
else:
BFeB = ht2j.sigmoid(hlel)
BFeB = BFeB.squeeze(0)
ZylS = Ymkf.Compose([Ymkf.ToPILImage(), Ymkf.Resize(WKvO... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KVH6(YKHO, WKvO: Tensor) -> ImMB:\n return YKHO.model(WKvO)",
"def KVH6(YKHO, EcVT: Tensor) -> llWB:\n if YKHO.training:\n if YKHO.transform_on_train:\n return YKHO.transform(EcVT)\n elif YKHO.transform_on_eval:\n if _U3r.off() or YKHO.transform_on_fantasize:\n re... | [
"0.6793961",
"0.67194325",
"0.66591483",
"0.65891796",
"0.65779716",
"0.65765405",
"0.6434522",
"0.6383541",
"0.6347136",
"0.6328052",
"0.63274986",
"0.63203883",
"0.63144624",
"0.6304984",
"0.62984115",
"0.62945604",
"0.6267837",
"0.6265283",
"0.62537205",
"0.6209163",
"0.62... | 0.0 | -1 |
Selects pairs of individuals at random from mating population and performs uniform crossover | def N9v1(YKHO, SEZH, QOe9=False, kgDL=[], kv2E={}):
print('Performing crossovers')
A3Gp = U8Lr()
if QOe9 is False:
Uv0h = list(SEZH.keys())
tuKI.shuffle(Uv0h)
Uv0h = iter(Uv0h)
Uv0h = list(zip(Uv0h, Uv0h))
else:
Uv0h = kgDL
for d6pt, qwZm in enumerate(Uv0h):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jWUT(CHNM, YSA3=None, **B2fa):\n XwMf = []\n while len(XwMf) < len(CHNM):\n EBgd, HpuQ = (tuKI.choice(CHNM)['notes'], tuKI.choice(CHNM)['notes'])\n lpha = tuKI.randint(1, len(EBgd) - 1)\n map(XwMf.append, [EBgd[:lpha] + HpuQ[lpha:], HpuQ[:lpha] + EBgd[lpha:]])\n return XwMf",
"d... | [
"0.7380893",
"0.7152108",
"0.70001495",
"0.6927647",
"0.6886835",
"0.6865305",
"0.68208474",
"0.6793555",
"0.67773944",
"0.66755813",
"0.6660987",
"0.66530037",
"0.6640501",
"0.6633426",
"0.6632998",
"0.660032",
"0.65472764",
"0.6545151",
"0.6498023",
"0.649743",
"0.64895177"... | 0.7035463 | 2 |
Selects pairs of individuals at random from mating population and performs segmented crossover | def yGaR(YKHO, SEZH, QOe9=False, kgDL=[], kv2E={}):
print('Performing crossovers')
A3Gp = U8Lr()
if QOe9 is False:
Uv0h = list(SEZH.keys())
tuKI.shuffle(Uv0h)
Uv0h = iter(Uv0h)
Uv0h = list(zip(Uv0h, Uv0h))
else:
Uv0h = kgDL
for d6pt, qwZm in enumerate(Uv0h):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jWUT(CHNM, YSA3=None, **B2fa):\n XwMf = []\n while len(XwMf) < len(CHNM):\n EBgd, HpuQ = (tuKI.choice(CHNM)['notes'], tuKI.choice(CHNM)['notes'])\n lpha = tuKI.randint(1, len(EBgd) - 1)\n map(XwMf.append, [EBgd[:lpha] + HpuQ[lpha:], HpuQ[:lpha] + EBgd[lpha:]])\n return XwMf",
"d... | [
"0.6883596",
"0.6800745",
"0.67743516",
"0.6655921",
"0.6644784",
"0.6596214",
"0.65946054",
"0.6592522",
"0.6535841",
"0.64932644",
"0.6448248",
"0.6442825",
"0.63911873",
"0.63569015",
"0.6347295",
"0.6328471",
"0.6289912",
"0.626084",
"0.6254494",
"0.6241147",
"0.6207218",... | 0.68115205 | 1 |
Return the index of a column. | def f1pu(YKHO, vt_q):
return YKHO.column_labels.index(vt_q) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vn7Z(YKHO, iVRZ):\n return YKHO.columns.index(iVRZ)",
"def BgJs(YKHO, fvDH):\n try:\n return int(fvDH)\n except:\n return ord(fvDH) - ord('a')",
"def f1pu(YKHO, z0q4: str) -> int:\n return YKHO._column_indices[z0q4]",
"def BgJs(YKHO, fvDH):\n try:\n return int(fvDH)\n ... | [
"0.8677354",
"0.8431196",
"0.8420052",
"0.8419143",
"0.8015686",
"0.7687867",
"0.75376517",
"0.7522614",
"0.7490025",
"0.7490025",
"0.7490025",
"0.7490025",
"0.7490025",
"0.7490025",
"0.7490025",
"0.7490025",
"0.7490025",
"0.7490025",
"0.7490025",
"0.7490025",
"0.7490025",
... | 0.83825827 | 4 |
Return a Table with selected column or columns by label. | def EfUA(YKHO, eHYZ):
fNI0 = gK7r(eHYZ)
tyNF = TQJD()
for UXqs in fNI0:
YKHO._add_column_and_format(tyNF, UXqs, oyIN.copy(YKHO[UXqs]))
return tyNF | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EfUA(YKHO, Crrw):\n _GPT = []\n for YRbF in range(len(Crrw)):\n _GPT.append(YKHO.column_labels.index(Crrw[YRbF]))\n DYef = []\n for WKvO in YKHO.rows:\n gAQa = []\n for d6pt in _GPT:\n gAQa.append(WKvO[d6pt])\n DYef.append(gAQa)\n auaf = vG5k(DYef, Crrw)\n ... | [
"0.71968764",
"0.5904027",
"0.5876918",
"0.58585215",
"0.5723955",
"0.54890376",
"0.5437755",
"0.5436814",
"0.53728235",
"0.53688955",
"0.5358947",
"0.5330313",
"0.5330187",
"0.5305329",
"0.5274468",
"0.5219712",
"0.5193768",
"0.5189129",
"0.51855576",
"0.5177512",
"0.5141539... | 0.7645611 | 0 |
Return a formatting function that pads values. | def _XKy(Emd4, UXqs, iVRZ, QYB4=jnyc, gpgb=fTcl, B6O7=' ...'):
N7vo = 0 if len(iVRZ) == 0 else max((len(Emd4.format_value(Ty9i)) for Ty9i in iVRZ))
N7vo = min(N7vo, gpgb)
TVTK = max(N7vo, len(str(UXqs)), QYB4, len(B6O7))
def hVLt(BWXx):
m6Me = Emd4.format_value(BWXx)
if len(m6Me) > TVTK... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Y3k2(TVTK, KCHu):\n FMLJ = '{0:^%ds}' % TVTK\n return FMLJ.format(KCHu)",
"def hVLt(FGW3, TVTK=0):\n return str(FGW3).zfill(TVTK)",
"def q2Gr(wEf2: Union[int, str], TVTK: int, BY31: str='0') -> str:\n return str(wEf2).rjust(TVTK, BY31)",
"def RWNf(u54L, wEf2, phJ9=2):\n return '{0:0>{fill}... | [
"0.6454873",
"0.644634",
"0.6349001",
"0.62581176",
"0.6157596",
"0.6154019",
"0.6149456",
"0.6139503",
"0.61233884",
"0.60975385",
"0.60717624",
"0.6044765",
"0.60441875",
"0.603975",
"0.6032162",
"0.5956833",
"0.5955617",
"0.59335303",
"0.5885808",
"0.58782494",
"0.5867972"... | 0.54398453 | 63 |
Wrap a function on an np.ndarray to return 0 on a type error. | def oP7B(QeSB):
@xBlr.wraps(QeSB)
def b6ry(iVRZ):
try:
return QeSB(iVRZ)
except TypeError:
if isinstance(iVRZ, oyIN.ndarray):
return iVRZ.dtype.type()
else:
raise
return b6ry | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gTps(JfyU):\n return JfyU",
"def hwui(JfyU):\n\n @xBlr.wraps(JfyU)\n def h3Xc(*qIxc, **B2fa):\n Aofo = JfyU(*qIxc, **B2fa)\n if type(Aofo) in [tuple, list]:\n UHFx = 0\n for VosJ in Aofo:\n if type(VosJ) is dict:\n for H5ew in Vos... | [
"0.6354827",
"0.63062966",
"0.6284868",
"0.6182963",
"0.60895485",
"0.5886592",
"0.5879297",
"0.57888615",
"0.57888615",
"0.5776397",
"0.5754397",
"0.57135016",
"0.5639571",
"0.5633456",
"0.5624895",
"0.56212294",
"0.56053144",
"0.5600506",
"0.5599613",
"0.5534893",
"0.550502... | 0.74555403 | 0 |
Whether a value is iterable. | def MKQ6(BWXx):
if isinstance(BWXx, str):
return False
if hasattr(BWXx, '__iter__'):
return True
if isinstance(BWXx, g760.abc.Sequence):
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rUFq(BWXx):\n try:\n iter(BWXx)\n return True\n except:\n return False",
"def GfZ5(BWXx):\n return hasattr(BWXx, '__iter__') and hasattr(BWXx, '__getitem__')",
"def DDqk(BWXx):\n return isinstance(BWXx, list) or isinstance(BWXx, tuple)",
"def OxJJ(WKvO):\n try:\n ... | [
"0.8671964",
"0.8461713",
"0.8273151",
"0.78620726",
"0.7836823",
"0.7771756",
"0.77457356",
"0.7739959",
"0.77177155",
"0.7698039",
"0.76362705",
"0.7573118",
"0.75347775",
"0.74825734",
"0.7475645",
"0.737838",
"0.7307623",
"0.72827333",
"0.7204324",
"0.7182979",
"0.7104745... | 0.75446236 | 12 |
Standard error of estimate (Root mean square error) | def EcLx(XP5J, LVAh, ar_S):
exwG = LVAh.shape[0]
lypQ = ((LVAh - ar_S) ** 2).sum()
ciZM = exwG - XP5J - 1
if ciZM == 0:
KCHu = 0
elif lypQ / ciZM < 0:
KCHu = 0.001
else:
KCHu = (lypQ / ciZM) ** 0.5
return KCHu | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mJX1(YKHO):\n return YKHO.variance() ** (1 / 2)",
"def M1Jx(YKHO):\n return oyIN.sqrt(0.6)",
"def wlX9(YKHO) -> float:\n if YKHO.data:\n return oyIN.std(YKHO.data)\n else:\n return YKHO.sigma",
"def M1Jx(YKHO):\n NdnM = [(WKvO.m - YKHO.mean) ** 2 + WKvO.std ** 2 for WKvO in Y... | [
"0.76255953",
"0.7551994",
"0.7505911",
"0.7503446",
"0.74603534",
"0.74244446",
"0.7412778",
"0.7363041",
"0.7363041",
"0.7333144",
"0.72901833",
"0.727787",
"0.72770953",
"0.7227539",
"0.7223049",
"0.72060466",
"0.7197942",
"0.71941084",
"0.7191991",
"0.71721727",
"0.716825... | 0.0 | -1 |
Detect language for a batch of documents. Returns the detected language and a numeric score between zero and one. Scores close to one indicate 100% certainty that the identified | def aLLU(YKHO, ol4k, **B2fa):
njIk = B2fa.pop('country_hint', None)
rWIy = njIk if njIk is not None else YKHO._default_country_hint
Q5mJ = xC5U(ol4k, 'country_hint', rWIy)
TBez = B2fa.pop('model_version', None)
j1ca = B2fa.pop('show_stats', False)
ineY = B2fa.pop('disable_service_logs', None)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aLLU(l5Ny, cTCw):\n DuqQ = None\n t7hl = 0\n AxAm = []\n for rQow in cTCw:\n Aofo = pNTf(l5Ny, rQow['common_words'])\n print(Aofo)\n if Aofo > t7hl:\n DuqQ = rQow['name']\n t7hl = Aofo\n return DuqQ",
"def Vbvc(rdlD):\n global non_english_count_glo... | [
"0.68414056",
"0.6580281",
"0.63324946",
"0.6315463",
"0.6301533",
"0.618743",
"0.61461836",
"0.60928607",
"0.59702677",
"0.5946779",
"0.5925776",
"0.58808637",
"0.5868222",
"0.5837338",
"0.58271474",
"0.5774584",
"0.57127047",
"0.5673446",
"0.5643901",
"0.5637352",
"0.560735... | 0.6165304 | 6 |
Yield successive nsized chunks from a list. | def hXED(list, ztRo):
for YRbF in range(0, len(list), ztRo):
yield list[YRbF:YRbF + ztRo] | {
"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 AyNP(vC9B, exwG):\n for YRbF in range(0, len(vC9B), exwG):\n yield vC9B[YRbF:YRbF + exwG]",
"def eHxA(xpKR, fcYF):\n for YRbF in range(0, len(xpKR), fcYF):\n yield xpKR[YRbF:... | [
"0.80128753",
"0.7941934",
"0.7932596",
"0.79320854",
"0.791561",
"0.791561",
"0.79144424",
"0.791114",
"0.791114",
"0.7907752",
"0.78383857",
"0.7838351",
"0.7814962",
"0.7791491",
"0.77740216",
"0.77740216",
"0.77740216",
"0.77740216",
"0.77740216",
"0.7770947",
"0.7768256"... | 0.0 | -1 |
Calculates the distribution of the probabilities of each word in the population occurring after the previous words that have been generated. | def uX7y(CHNM, XMGp, JSOk):
q414 = {}
for DM04 in CHNM:
q414[DM04] = AWcd(DM04, XMGp, JSOk)
return q414 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def G03P(YKHO, GIN8, THkp):\n dnR4 = '{} {}'.format(THkp, GIN8)\n _Pxk = YKHO.model[GIN8] if GIN8 in YKHO.model else 1e-10\n hFRB = YKHO.bigrams[dnR4] if dnR4 in YKHO.bigrams else 1e-10\n XP5J = _Pxk * hFRB if THkp else _Pxk\n return XP5J",
"def Q7Be(YKHO, V22M):\n JxU2 = 1\n for yzQ0 in V22... | [
"0.6966408",
"0.6783748",
"0.6783748",
"0.6755222",
"0.6701354",
"0.6677489",
"0.65107155",
"0.6502526",
"0.6493202",
"0.6414597",
"0.6376017",
"0.62759507",
"0.62560374",
"0.6211251",
"0.62070835",
"0.61722654",
"0.6141359",
"0.613355",
"0.61139965",
"0.60976756",
"0.6097628... | 0.72292715 | 0 |
Calculate the distribution of probabilities of all the unique words found in the review_batch occurring after the previously generated words. | def flvi(XMGp, JSOk):
q414 = {}
QPxx = DWkG.get_words(JSOk)
Fbo_ = list(map(lambda WKvO: len(WKvO), QPxx))
UzTa = QPxx[oyIN.argsort(QPxx)]
for YRbF in range(0, len(UzTa) - 1):
if UzTa[YRbF + 1] == UzTa[YRbF]:
oyIN.delete(UzTa, YRbF)
else:
q414[UzTa[YRbF]] = AW... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uX7y(CHNM, XMGp, JSOk):\n q414 = {}\n for DM04 in CHNM:\n q414[DM04] = AWcd(DM04, XMGp, JSOk)\n return q414",
"def AWcd(bqsF, XMGp, JSOk):\n YEBB = oyIN.append(XMGp, bqsF)\n YxFh = oyIN.resize(JSOk, len(YEBB))\n UHFx = 0\n for A0cm in YxFh:\n if oyIN.array_equal(A0cm, YEBB)... | [
"0.6778919",
"0.66591436",
"0.6347305",
"0.6313462",
"0.6313462",
"0.6273247",
"0.6206041",
"0.61933684",
"0.60889083",
"0.6058977",
"0.60536927",
"0.60290223",
"0.59934425",
"0.5992751",
"0.5992305",
"0.59823066",
"0.59795415",
"0.5961064",
"0.5904356",
"0.58872366",
"0.5876... | 0.7084932 | 0 |
Get random substrings of size substring_size from the substring_array. | def SgqU(tRto, ERC3=round(len(U6j6))):
for DM04 in U6j6:
rs7x = tuKI.randint(0, len(U6j6) - Os4s)
_AKB = DM04[_9an + rs7x:Os4s + rs7x]
oyIN.append(tRto, _AKB)
tRto = oyIN.unique(tRto)
if len(tRto) < ERC3:
SgqU(tRto, ERC3) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MTyO(qw7D, UHFx):\n _0VL = oyIN.random.permutation(len(qw7D))[:UHFx]\n return qw7D[_0VL]",
"def Tmdx(jzdc, Fg_i, exwG):\n return []",
"def bZBg():\n assert KkY2.find_all_substrings(KCHu, 17, 5) == KkY2.find_all_substrings(KCHu, 17, 18)\n Nqp_ = ''.join([tuKI.choice(KCHu) for YRbF in range(10... | [
"0.62674284",
"0.61499566",
"0.60506034",
"0.59336424",
"0.59216213",
"0.58888245",
"0.5888029",
"0.58263934",
"0.5806061",
"0.57688844",
"0.5653793",
"0.5629096",
"0.56038404",
"0.556558",
"0.5549378",
"0.5535475",
"0.5526019",
"0.5520514",
"0.5515632",
"0.548048",
"0.546061... | 0.68094176 | 0 |
This method should be used when you want to no longer draw a trail and delete it | def BJ5_(YKHO):
YKHO.obj.make_trail = False
YKHO.obj.clear_trail()
YKHO.sum_ang = 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def X8X4(YKHO):\n pass",
"def g65A(YKHO):\n CzTN.remove('drawLineTask')\n if YKHO.line is not None:\n YKHO.line.reset()\n YKHO.line = None",
"def fccZ(YKHO):\n YKHO._fillitem = YKHO._fillpath = None\n for ZfUD in YKHO.items:\n YKHO.screen._delete(ZfUD)\n YKHO.currentLineI... | [
"0.66773003",
"0.6676018",
"0.6404421",
"0.637547",
"0.63584983",
"0.615592",
"0.6147445",
"0.60753715",
"0.6029106",
"0.6020249",
"0.5996174",
"0.59637123",
"0.59339553",
"0.5893738",
"0.58905107",
"0.5885422",
"0.5857549",
"0.57881665",
"0.57863754",
"0.5781967",
"0.5781916... | 0.7081529 | 0 |
A function to aid in the production of more a y axis which rises above the highest data value (increases readability) | def zYQo(FGW3, phJ9=0):
pSDG = 10 ** phJ9
return epAf.ceil(FGW3 * pSDG) / pSDG | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def clzQ(YKHO):\n if len(YKHO._statDict) == 0:\n return -10000000000.0\n Wa13 = YKHO._statDict.keys()\n dCLF = YKHO._statDict[Wa13[0]][3]\n for tMF9 in range(1, len(Wa13)):\n if YKHO._statDict[Wa13[tMF9]][3] > dCLF:\n dCLF = YKHO._statDict[Wa13[tMF9]][3]\n return dCLF",
"d... | [
"0.71137637",
"0.6881365",
"0.68346685",
"0.6779634",
"0.6689509",
"0.6633723",
"0.65836114",
"0.6529373",
"0.6529373",
"0.651268",
"0.649996",
"0.64752394",
"0.6452737",
"0.63294804",
"0.6289473",
"0.628551",
"0.6272038",
"0.6259104",
"0.6247522",
"0.624057",
"0.62030333",
... | 0.0 | -1 |
Binary search of the index of the last element not greater than a given target in the ascending sorted array. If not found, return 1. | def ItmZ(xYvp: List[int], pan_: int) -> int:
gqRb, ODP9 = (0, len(xYvp) - 1)
while gqRb <= ODP9:
x1fj = gqRb + (ODP9 - gqRb) // 2
if xYvp[x1fj] <= pan_:
gqRb = x1fj + 1
else:
ODP9 = x1fj - 1
if ODP9 >= 0 and xYvp[ODP9] <= pan_:
return ODP9
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SzQA(k0lF, pan_):\n if len(k0lF) == 0:\n return -1\n _9an = 0\n Os4s = len(k0lF) - 1\n while Os4s - _9an > 1:\n x1fj = _9an + (Os4s - _9an >> 1)\n if pan_ < k0lF[x1fj]:\n Os4s = x1fj\n else:\n _9an = x1fj\n if k0lF[Os4s] == pan_:\n return ... | [
"0.7624975",
"0.7468117",
"0.7464701",
"0.7410718",
"0.7409877",
"0.7327627",
"0.7323313",
"0.7304582",
"0.72164625",
"0.7214874",
"0.72084713",
"0.71855587",
"0.70754385",
"0.70535874",
"0.70356005",
"0.6986135",
"0.6983354",
"0.6978976",
"0.6892071",
"0.6885231",
"0.6814879... | 0.78546214 | 0 |
Compute the softmax of each element along an axis of X. | def N93T(EcVT, q7In=1.0, jDK_=None):
LVAh = oyIN.atleast_2d(EcVT)
if jDK_ is None:
jDK_ = next((r845[0] for r845 in enumerate(LVAh.shape) if r845[1] > 1))
LVAh = LVAh * float(q7In)
LVAh = LVAh - oyIN.expand_dims(oyIN.max(LVAh, axis=jDK_), jDK_)
LVAh = oyIN.exp(LVAh)
GM4D = oyIN.expand_di... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def N93T(YKHO, WKvO):\n yvT9 = oyIN.zeros(WKvO.shape)\n for YRbF in range(WKvO.shape[0]):\n IA3S = WKvO[YRbF] - oyIN.max(WKvO[YRbF])\n yvT9[YRbF] = oyIN.exp(IA3S) / oyIN.sum(oyIN.exp(IA3S), axis=0)\n return yvT9",
"def N93T(WKvO: npt.NDArray) -> eQHC.NDArray:\n Z5xZ = oyIN.max(WKvO, axi... | [
"0.8648168",
"0.8523443",
"0.8501356",
"0.845101",
"0.8424965",
"0.8401308",
"0.83822155",
"0.83788544",
"0.8372522",
"0.83631027",
"0.835532",
"0.8344603",
"0.8326291",
"0.8309666",
"0.82737535",
"0.8272703",
"0.82659155",
"0.824838",
"0.824838",
"0.8244414",
"0.82432497",
... | 0.0 | -1 |
convert a column from a select's "columns" clause. given a select() and a column element from its inner_columns collection, return a Label object if this column should be labeled in the columns clause. Otherwise, return None and the column will be used asis. The calling method will traverse the returned label to acquir... | def Ud_e(YKHO, EfUA, iVRZ):
if (YKHO.stack and YKHO.stack[-1].get('is_selected_from')) and isinstance(iVRZ, Pe9W._ColumnClause) and (not iVRZ.is_literal) and (iVRZ.table is not None) and (not isinstance(iVRZ.table, Pe9W.Select)):
return iVRZ.label(iVRZ.name)
else:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dBxG(YKHO, iVRZ):\n return iVRZ",
"def iBd8(YKHO, zYnp):\n Z9rn = zYnp\n if isinstance(Z9rn, g760.Hashable) and Z9rn in YKHO.column_labels:\n return YKHO[Z9rn]\n else:\n assert len(Z9rn) == YKHO.num_rows, 'column length mismatch'\n return Z9rn",
"def cPka(YKHO):\n return... | [
"0.6369459",
"0.63435656",
"0.61962634",
"0.61262125",
"0.60707486",
"0.5874573",
"0.5780787",
"0.5736922",
"0.5468321",
"0.5404369",
"0.5373967",
"0.5372436",
"0.5368333",
"0.5356151",
"0.52621865",
"0.5244867",
"0.52299285",
"0.5227409",
"0.5212175",
"0.5209841",
"0.51956",... | 0.8088063 | 0 |
Construct a new ``IdentifierPreparer`` object. initial_quote Character that begins a delimited identifier. final_quote Character that ends a delimited identifier. Defaults to `initial_quote`. omit_schema Prevent prepending schema name. Useful for databases that do not support schemae. | def FIMM(YKHO, pMVb, Xh1v='"', TQvC=None, KFRT=False):
YKHO.dialect = pMVb
YKHO.initial_quote = Xh1v
YKHO.final_quote = TQvC or YKHO.initial_quote
YKHO.omit_schema = KFRT
YKHO.__strings = {} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wvI2(KCHu, ZL2j, tX46=frozenset(), Bjnn=False, hhxB=False):\n KCHu = ePz1(scih(KCHu).strip('_'), tX46)\n if Bjnn:\n KCHu = '__' + KCHu\n elif hhxB:\n KCHu = '_' + KCHu\n return mvjn(KCHu, ZL2j)",
"def T1KB(Emd4, lO87: int, x0eS: int, jZ6p: int) -> 'Identifier':\n y0cW = f'{str(lO... | [
"0.52344036",
"0.48431653",
"0.47282967",
"0.46271473",
"0.45821825",
"0.4490583",
"0.4480203",
"0.43617234",
"0.4305039",
"0.42611578",
"0.42339948",
"0.42338768",
"0.42103657",
"0.4203634",
"0.41958946",
"0.418655",
"0.4172179",
"0.41227847",
"0.4100452",
"0.40884525",
"0.4... | 0.6530894 | 0 |
Escape an identifier. Subclasses should override this to provide databasedependent escaping behavior. | def eUEy(YKHO, BWXx):
return BWXx.replace('"', '""') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sK8h(Ilxn, **B2fa):\n if not isinstance(Ilxn, jUrF):\n raise TypeError(type(Ilxn).__name__)\n MnDN = J0Kl(**B2fa)\n return MnDN.encode_key(Ilxn)",
"def HitI(YKHO, BWXx):\n return YKHO.initial_quote + YKHO._escape_identifier(BWXx) + YKHO.final_quote",
"def IguF(YKHO):\n pass",
"def I... | [
"0.76901585",
"0.7171665",
"0.65619826",
"0.65088695",
"0.61848825",
"0.6037265",
"0.58837444",
"0.5860151",
"0.5817022",
"0.5760123",
"0.5731031",
"0.57090294",
"0.5649238",
"0.5634508",
"0.56285065",
"0.56276494",
"0.5619269",
"0.5584628",
"0.55839723",
"0.55744565",
"0.555... | 0.7771731 | 0 |
Canonicalize an escaped identifier. Subclasses should override this to provide databasedependent unescaping behavior that reverses _escape_identifier. | def hQoz(YKHO, BWXx):
return BWXx.replace('""', '"') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eUEy(YKHO, BWXx):\n return BWXx.replace('\"', '\"\"')",
"def sK8h(Ilxn, **B2fa):\n if not isinstance(Ilxn, jUrF):\n raise TypeError(type(Ilxn).__name__)\n MnDN = J0Kl(**B2fa)\n return MnDN.encode_key(Ilxn)",
"def eeND(Ilxn):\n l6D3 = gie1(Ilxn, '`')\n if l6D3 == Ilxn:\n l6D3... | [
"0.65034235",
"0.60171896",
"0.6013747",
"0.5867783",
"0.5840692",
"0.5691037",
"0.56629825",
"0.56344134",
"0.5533595",
"0.55119795",
"0.5463335",
"0.543442",
"0.53856874",
"0.5383206",
"0.53295106",
"0.529894",
"0.52880454",
"0.5247449",
"0.5217252",
"0.5204735",
"0.5202311... | 0.62047476 | 1 |
Quote an identifier. Subclasses should override this to provide databasedependent quoting behavior. | def HitI(YKHO, BWXx):
return YKHO.initial_quote + YKHO._escape_identifier(BWXx) + YKHO.final_quote | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eUEy(YKHO, BWXx):\n return BWXx.replace('\"', '\"\"')",
"def NCC9(*jzdc, **YSA3):\n return NCC9(*jzdc, **YSA3)",
"def BJ2A(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'quote_id')",
"def HDLy(YKHO, d7pR):\n d7pR = d7pR.replace('\\\\', '\\\\\\\\')\n d7pR = d7pR.replace('\"', '\\\\\"')\n r... | [
"0.6803792",
"0.62974304",
"0.62813836",
"0.6219816",
"0.62063813",
"0.6139694",
"0.6124852",
"0.59019285",
"0.5797045",
"0.57196015",
"0.56434613",
"0.558261",
"0.55634195",
"0.5561601",
"0.54825985",
"0.54253066",
"0.5424761",
"0.54112506",
"0.53987145",
"0.5398182",
"0.538... | 0.7929225 | 0 |
Prepare a quoted column name. | def _XKy(YKHO, iVRZ, Y3OR=False, mWFP=None, GTA_=None):
if mWFP is None:
mWFP = iVRZ.name
if not getattr(iVRZ, 'is_literal', False):
if Y3OR:
return YKHO.format_table(iVRZ.table, use_schema=False, name=GTA_) + '.' + YKHO.__generic_obj_format(iVRZ, mWFP)
else:
retu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WJqg(YKHO, iVRZ):\n return '\"{}\"'.format(iVRZ)",
"def GGqX(AAHb: str) -> str:\n if AAHb[0].isdigit():\n return f'\"{AAHb}\"'\n return AAHb",
"def dbVS(YKHO):\n YKHO.quoted_column_names_reading_template(specify_column_names=True)",
"def OcE8(YKHO, mWFP):\n if mWFP.startswith(YKHO.l... | [
"0.68267614",
"0.66763186",
"0.6517873",
"0.6474785",
"0.62641364",
"0.6239928",
"0.6202077",
"0.61548555",
"0.611496",
"0.611496",
"0.61074984",
"0.6096287",
"0.59523314",
"0.5924512",
"0.58921146",
"0.58921146",
"0.5803178",
"0.56872654",
"0.5643057",
"0.5600944",
"0.559376... | 0.54299146 | 26 |
Prepare a quoted column name with table name. | def OpQE(YKHO, iVRZ, z0q4=None, GTA_=None):
return YKHO.format_column(iVRZ, use_table=True, name=z0q4, table_name=GTA_) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WJqg(YKHO, iVRZ):\n return '\"{}\"'.format(iVRZ)",
"def OcE8(YKHO, mWFP):\n if mWFP.startswith(YKHO.left_sql_quote) and mWFP.endswith(YKHO.right_sql_quote):\n return mWFP\n return '%s%s%s' % (YKHO.left_sql_quote, mWFP, YKHO.right_sql_quote)",
"def GGqX(AAHb: str) -> str:\n if AAHb[0].isd... | [
"0.6520167",
"0.6256638",
"0.6161232",
"0.61592764",
"0.597003",
"0.59199286",
"0.59132075",
"0.58414966",
"0.58414966",
"0.5752311",
"0.5744427",
"0.5720532",
"0.5717292",
"0.570639",
"0.57049805",
"0.5697452",
"0.5692428",
"0.56815195",
"0.567449",
"0.56293607",
"0.56027627... | 0.5139979 | 45 |
Returns the filtered queryset based on the value provided in the query string and retrievable via `self.value()`. | def SR0I(YKHO, QePW, SR0I):
print('queryset: self.value() = {} with type = {}'.format(YKHO.value(), type(YKHO.value())))
asOs = []
for a70H in nj3W.objects.all():
if a70H.is_current_member() is True:
print('{} is_current_member(): {} | self.value(): {} | equals? {} | type(member): {} | t... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SR0I(YKHO, QePW, SR0I):\n if YKHO.value() is None:\n return SR0I.all()\n return SR0I.filter(firm__pk=YKHO.value())",
"def SR0I(YKHO, QePW, SR0I):\n if YKHO.value():\n return SR0I.filter(state_pol=YKHO.value())",
"def SR0I(YKHO, QePW, SR0I):\n if YKHO.value() is None:\n retu... | [
"0.75409806",
"0.7420932",
"0.7244926",
"0.7205369",
"0.70882255",
"0.7050192",
"0.697692",
"0.6783912",
"0.67630154",
"0.67344415",
"0.66827345",
"0.6655746",
"0.6471968",
"0.6416057",
"0.6402888",
"0.6383319",
"0.6367874",
"0.6348132",
"0.63470876",
"0.62772644",
"0.6268568... | 0.65900356 | 12 |
Returns the filtered queryset based on the value provided in the query string and retrievable via `self.value()`. | def SR0I(YKHO, QePW, SR0I):
print('queryset: self.value() = {} with type = {}'.format(YKHO.value(), type(YKHO.value())))
asOs = []
for a70H in nj3W.objects.all():
UpJD = a70H.get_latest_position()
if YKHO.value() is None:
asOs.append(a70H.id)
elif UpJD is not None and UpJ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SR0I(YKHO, QePW, SR0I):\n if YKHO.value() is None:\n return SR0I.all()\n return SR0I.filter(firm__pk=YKHO.value())",
"def SR0I(YKHO, QePW, SR0I):\n if YKHO.value():\n return SR0I.filter(state_pol=YKHO.value())",
"def SR0I(YKHO, QePW, SR0I):\n if YKHO.value() is None:\n retu... | [
"0.754024",
"0.7420306",
"0.7244771",
"0.72054714",
"0.7089471",
"0.70491016",
"0.69762397",
"0.6761089",
"0.67340565",
"0.66817456",
"0.6656211",
"0.65885806",
"0.64705604",
"0.64162385",
"0.64023226",
"0.63833594",
"0.63699883",
"0.63493246",
"0.6348757",
"0.62765163",
"0.6... | 0.6783078 | 7 |
Returns the filtered queryset based on the value provided in the query string and retrievable via `self.value()`. | def SR0I(YKHO, QePW, SR0I):
print('queryset: self.value() = {} with type = {}'.format(YKHO.value(), type(YKHO.value())))
y1UT = []
for cqqy in Ecua.objects.all():
if YKHO.value() is None:
y1UT.append(cqqy.id)
elif cqqy.pub_venue_type == YKHO.value():
y1UT.append(cqqy.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SR0I(YKHO, QePW, SR0I):\n if YKHO.value() is None:\n return SR0I.all()\n return SR0I.filter(firm__pk=YKHO.value())",
"def SR0I(YKHO, QePW, SR0I):\n if YKHO.value():\n return SR0I.filter(state_pol=YKHO.value())",
"def SR0I(YKHO, QePW, SR0I):\n if YKHO.value() is None:\n retu... | [
"0.75409806",
"0.7420932",
"0.7244926",
"0.7205369",
"0.70882255",
"0.7050192",
"0.697692",
"0.6783912",
"0.67630154",
"0.67344415",
"0.6655746",
"0.65900356",
"0.6471968",
"0.6416057",
"0.6402888",
"0.6383319",
"0.6367874",
"0.6348132",
"0.63470876",
"0.62772644",
"0.6268568... | 0.66827345 | 10 |
Returns the filtered queryset based on the value provided in the query string and retrievable via `self.value()`. | def SR0I(YKHO, QePW, SR0I):
print('queryset: self.value() = {} with type = {}'.format(YKHO.value(), type(YKHO.value())))
y1UT = []
for cqqy in Ecua.objects.all():
print('queryset: pub.book_title_short.lower() = {} self.value() = {}'.format(cqqy.book_title_short.lower(), YKHO.value()))
if YKH... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SR0I(YKHO, QePW, SR0I):\n if YKHO.value() is None:\n return SR0I.all()\n return SR0I.filter(firm__pk=YKHO.value())",
"def SR0I(YKHO, QePW, SR0I):\n if YKHO.value():\n return SR0I.filter(state_pol=YKHO.value())",
"def SR0I(YKHO, QePW, SR0I):\n if YKHO.value() is None:\n retu... | [
"0.754024",
"0.7420306",
"0.7244771",
"0.72054714",
"0.7089471",
"0.70491016",
"0.6783078",
"0.6761089",
"0.67340565",
"0.66817456",
"0.6656211",
"0.65885806",
"0.64705604",
"0.64162385",
"0.64023226",
"0.63833594",
"0.63699883",
"0.63493246",
"0.6348757",
"0.62765163",
"0.62... | 0.69762397 | 6 |
Validates if the provided username is a valid UNIX username | def rcSJ(NtEF):
return Uxfe.match(NtEF) is not None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def L5TJ(NtEF):\n if NtEF is None:\n return False\n if len(NtEF) > 32:\n return False\n if len(NtEF) < 1:\n return False\n for YRbF in NtEF:\n if YRbF not in GPtr.CHARSET:\n return False\n return True",
"def Gt2s(NtEF):\n import string\n if not (len(NtE... | [
"0.79573727",
"0.7757889",
"0.77010506",
"0.7651763",
"0.7626677",
"0.7536235",
"0.75265306",
"0.7501917",
"0.7479306",
"0.74507785",
"0.74310666",
"0.7419038",
"0.73955435",
"0.7392464",
"0.7320103",
"0.730303",
"0.72507656",
"0.7214872",
"0.7177691",
"0.71641016",
"0.715291... | 0.89550704 | 0 |
Return a view to use as the API root. | def vLmV(YKHO):
XSmL = {}
CXYT = YKHO.routes[0].name
for y0cW, DKfN, aPr_ in YKHO.registry:
XSmL[y0cW] = CXYT.format(basename=aPr_)
class APIRoot(RCd1.APIView):
whg9 = True
CGmx = (A8mL,)
def NMoC(YKHO, QePW, format=None):
U5bT = {}
for H5ew, nMl... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LIOs():\n return (TvZl('index.html'), 200)",
"def LIOs(YKHO, QePW, *qIxc, **B2fa):\n return YKHO._root_factory(QePW, *qIxc, **B2fa)",
"def vLmV(YKHO, DYCu=None):\n XSmL = U8Lr()\n CXYT = YKHO.routes[0].name\n for y0cW, DKfN, aPr_ in YKHO.registry:\n XSmL[y0cW] = CXYT.format(basename=a... | [
"0.7414068",
"0.7298024",
"0.724371",
"0.71469635",
"0.70345426",
"0.70345426",
"0.70345426",
"0.7007782",
"0.69690424",
"0.6904303",
"0.685838",
"0.6843567",
"0.68409103",
"0.68318844",
"0.67578167",
"0.6753709",
"0.67217803",
"0.66900116",
"0.6664957",
"0.6649356",
"0.66385... | 0.8156992 | 0 |
Since we have create the Topping(PizzaTopping) model with the dunder method of string(__str__). It will return the string representation of the "name" attribute. We will check if that is same as what we have set. | def kGDE(YKHO):
gXVd = qUa3.objects.create(name='Pepperoni')
YKHO.assertEquals(str(gXVd), gXVd.name) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.name)",
"def zAg0(YKHO):\n return str(YKHO.name)",
"def zAg0(YKHO):\n return str(YKHO.name)",
"def zAg0(YKHO):\n return str(YKHO.name)",
"def zAg0(YKHO):\n return str(YKHO.name)",
"def zAg0(YKHO):\n return str(YKHO.name)",
"def zAg0(YKHO):\n return... | [
"0.68611056",
"0.68611056",
"0.68611056",
"0.68611056",
"0.68611056",
"0.68611056",
"0.68611056",
"0.67949563",
"0.67949563",
"0.66880953",
"0.6681636",
"0.6678034",
"0.6678034",
"0.6678034",
"0.66753346",
"0.66753346",
"0.66753346",
"0.66753346",
"0.66753346",
"0.66753346",
... | 0.0 | -1 |
Helper function. Strips dollar sign and decimal from a curreny string. | def A03g(Z5kt):
if Z5kt[0] == '$':
Z5kt = Z5kt[1:]
if Z5kt.find('.') != -1:
return Z5kt.replace('.', '')
return Z5kt | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EURg(input, **B2fa):\n while input.startswith('$'):\n input = input[1:]\n while input.endswith('$'):\n input = input[0:-1]\n return input",
"def ABn9(WKvO: str):\n try:\n if isinstance(WKvO, str):\n if WKvO.startswith('$'):\n return WKvO.replace('$',... | [
"0.77671385",
"0.7447047",
"0.68365633",
"0.6818885",
"0.6807645",
"0.6742017",
"0.66203654",
"0.63368356",
"0.61783016",
"0.61313885",
"0.6120201",
"0.5976194",
"0.5899814",
"0.5766022",
"0.5743835",
"0.574222",
"0.56958205",
"0.56278116",
"0.5624136",
"0.55957615",
"0.55917... | 0.78178936 | 0 |