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 |
|---|---|---|---|---|---|---|
Return the current estimated depth of this workers local queue. This should be considered immediately stale and may in fact be slightly wrong (+/ 1 element) w.r.t. to any real value of the queue depth. These limitations are to allow highperformance queue implementations that don't provide an atomic length operation. | def ZFin(YKHO):
return len(YKHO._queue) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Fl9T(YKHO):\n return YKHO.__max_queue_depth",
"def rU6a(YKHO):\n return YKHO.__max_queue_depth_bytes",
"def rU6a(YKHO):\n return YKHO.__max_queue_depth_bytes",
"def rU6a(YKHO):\n return YKHO.__max_queue_depth_bytes",
"def rU6a(YKHO):\n return YKHO.__max_queue_depth_bytes",
"def rU6a(YK... | [
"0.73070836",
"0.7189018",
"0.7189018",
"0.7189018",
"0.7189018",
"0.7189018",
"0.7189018",
"0.7176121",
"0.6784584",
"0.6784584",
"0.6784584",
"0.6784584",
"0.6784584",
"0.6784584",
"0.6609383",
"0.64046717",
"0.63306797",
"0.6307099",
"0.6252012",
"0.6252012",
"0.6252012",
... | 0.8087054 | 0 |
Adds an edge relationship from one node to some others. | def Vt3M(_nJc, SrYI, T6jA):
i8WE = str(int(ITS7.time() * 1000000.0))
fK8P = bej7.util.OrderedDict(((str(Q6kx), i8WE) for Q6kx in T6jA))
Wc9F = GaYQ.batch()
nBG3 = B8H4(_nJc, str(SrYI), True)
Wc9F.insert(nBG3, fK8P)
for O53q in T6jA:
S59R = B8H4(_nJc, str(O53q), False)
Wc9F.insert... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F1KG(YKHO, i4Va, rUTj):\n pass",
"def CfeV(YKHO, yKcO, Os4s, Qovt):\n YKHO._graph.edge(yKcO, Os4s, label=str(Qovt))",
"def rz7z(YKHO, mNRh, GgkF):\n YKHO.nodes[mNRh].add_edge(GgkF)\n YKHO.nodes[GgkF].add_edge(mNRh)",
"def CfeV(YKHO, yKcO, Os4s, Qovt):\n YKHO._graph.edge(yKcO, Os4s, label=s... | [
"0.7805299",
"0.7672646",
"0.7656794",
"0.76551414",
"0.74799323",
"0.7414847",
"0.7354828",
"0.7307006",
"0.7293714",
"0.72857517",
"0.72341806",
"0.720228",
"0.7191795",
"0.7160277",
"0.7138001",
"0.71314836",
"0.71157885",
"0.711508",
"0.7104472",
"0.70964503",
"0.7094404"... | 0.0 | -1 |
Return post upvote URL | def rp9n(Fi3q):
return f'{iLuo(Fi3q)}upvote/' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RzYw(Fi3q):\n Fi3q = int(Fi3q)\n pfOU = 1\n zrHt(Fi3q, c5ow, pfOU)\n return vKnz(LfXz())",
"def W27n(QePW, Fi3q):\n CBIr = QePW.user\n R91Y = lFQG.objects.filter(post_id=Fi3q).filter(user_id=CBIr.id)\n if R91Y:\n yEHD.success(QePW, 'You have already voted in this post', extra_tags... | [
"0.69746476",
"0.68554556",
"0.6723417",
"0.6690108",
"0.6650985",
"0.64202267",
"0.63766557",
"0.6373349",
"0.6351353",
"0.6329798",
"0.6287365",
"0.62024784",
"0.6194986",
"0.6165921",
"0.6162447",
"0.6128201",
"0.6103543",
"0.6030297",
"0.59784454",
"0.5976996",
"0.5959461... | 0.9046078 | 0 |
Test the count of post's comments | def aUMj(YKHO):
Vp_g = 3
m8z6 = mn66(author=YKHO.user)
for aM_I in range(Vp_g):
vYOx(author=YKHO.user, post=m8z6)
bD7m = iLuo(m8z6.id)
Ylbp = YKHO.client.get(bD7m)
YKHO.assertEqual(Ylbp.data['total_comments'], Vp_g) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FDVk(m8z6: dict) -> int:\n return 1",
"def FDVk(YKHO):\n return jY1u.objects.filter(post=YKHO).count()",
"def Iz6M(YKHO) -> int:\n return YKHO._get_counters('strong.comment-text')",
"def fUEV(YKHO):\n UHFx = 0\n for AIu6 in YKHO.values():\n if AIu6.comment:\n UHFx += 1\n ... | [
"0.8056745",
"0.75127864",
"0.73651904",
"0.7251777",
"0.71748203",
"0.7122359",
"0.71123385",
"0.70855826",
"0.7027272",
"0.7022565",
"0.6865566",
"0.6792326",
"0.676939",
"0.6722709",
"0.66968805",
"0.6630292",
"0.6570671",
"0.6568954",
"0.65530944",
"0.6547529",
"0.6503427... | 0.8876134 | 0 |
Test user comment the post created by another user | def vfIY(YKHO):
m8z6 = mn66(author=YKHO.user)
k5uE = egNl().objects.create_user('Another Test User', 'test123@testemail.com', 'testpass123')
vYOx(author=k5uE, post=m8z6)
bD7m = iLuo(m8z6.id)
Ylbp = YKHO.client.get(bD7m)
ZMzz = VoMc(m8z6)
YKHO.assertEqual(Ylbp.data['comments'][0]['author'], Z... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dmhZ(YKHO):\n CBIr, bGrB = mv1M.objects.get_or_create(username='r_d_james')\n YKHO.client.force_login(user=CBIr)\n geh0 = YKHO.client.post(gxEw('comment', kwargs={'pk': 1}), {'content': 'test_comment'}, follow=True)\n YKHO.assertEqual(geh0.status_code, 200)\n YKHO.assertEqual(geh0.context['comme... | [
"0.76592386",
"0.7514541",
"0.74774516",
"0.74139977",
"0.7311971",
"0.7095453",
"0.7076398",
"0.7076398",
"0.7034972",
"0.70266616",
"0.7024486",
"0.696474",
"0.6943568",
"0.69309056",
"0.6924789",
"0.69066066",
"0.6903476",
"0.6903476",
"0.6847159",
"0.6836291",
"0.68269885... | 0.8384893 | 0 |
3x3 convolution with padding | def Myly(g4y1, sYyA, FEri=1):
WKvO = yHwh(sYyA, kernel_size=3, strides=FEri, padding='same', use_bias=False, kernel_initializer='he_normal')(g4y1)
WKvO = GVKG()(WKvO)
WKvO = MroH('relu')(WKvO)
return WKvO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sx6c(input, KUnM, FEri, dvgN, wH3T='NHWC', mJgj=1, mWFP=None):\n return o6Bz(**locals())",
"def Myly(UUZO, sYyA, _0fC=1, moMn=1, ivFb=1):\n return U78l.Conv2d(UUZO, sYyA, kernel_size=3, stride=_0fC, padding=0, groups=moMn, bias=False, dilation=ivFb)",
"def DO8L(WKvO, yzQ0, UP6E=[0, 0, 0], FEri=[1, 1,... | [
"0.78404945",
"0.7541354",
"0.753996",
"0.7491138",
"0.7434801",
"0.74207747",
"0.73415834",
"0.7320252",
"0.7299599",
"0.7287539",
"0.72799367",
"0.72799367",
"0.7257735",
"0.7226928",
"0.72204214",
"0.7214909",
"0.7214909",
"0.7210775",
"0.7198222",
"0.71639067",
"0.7161914... | 0.0 | -1 |
Compute softmax values for each sets of scores in x. | def N93T(WKvO):
uw5A = oyIN.exp(WKvO - oyIN.max(WKvO))
return uw5A / uw5A.sum(axis=0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oSvh(WKvO):\n S2MS = []\n if oyIN.array(WKvO).ndim == 1:\n hrCc = oyIN.exp(WKvO)\n RmXN = oyIN.sum(hrCc)\n xzMv = hrCc / RmXN\n dzye = xzMv\n else:\n dzye = oyIN.exp(cCrA) / oyIN.sum(oyIN.exp(cCrA), axis=0)\n return dzye",
"def N93T(WKvO):\n j1LR = oyIN.exp(o... | [
"0.80113125",
"0.77607703",
"0.77607703",
"0.7687368",
"0.76707524",
"0.76605",
"0.76571554",
"0.76571554",
"0.76571554",
"0.76571554",
"0.76571554",
"0.76571554",
"0.76571554",
"0.76397043",
"0.762786",
"0.7551623",
"0.7532752",
"0.74565",
"0.73242354",
"0.73171765",
"0.7298... | 0.7061136 | 91 |
Construct a scalar field in 3D space for a physical quantity. The arguments of the constructor have the same role as the correspondent attributes of the class. See in the description of the class for more information. | def FIMM(YKHO, xqoZ, mWFP, dP7V, e_2d, knSl: bool=False):
KJau = ['nx', 'ny', 'nz', 'nh', 'neighbours']
YKHO.param = {G1Hx: xqoZ[G1Hx] for G1Hx in KJau}
YKHO.name = mWFP
YKHO.nickname = dP7V
YKHO.dimension = e_2d
YKHO.prognostic = knSl
bdGm = YKHO.param['neighbours']
XP5J = xqoZ
jHsn... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, WKvO, LVAh, epBp, P6bq, Ty9i, yzQ0, HHea=None, DbyF=None, hLRM=None):\n YKHO.x = WKvO\n YKHO.y = LVAh\n YKHO.z = epBp\n YKHO.u = P6bq\n YKHO.v = Ty9i\n YKHO.w = yzQ0\n YKHO.spacing = HHea\n YKHO.dimensions = DbyF\n YKHO.origin = hLRM\n YKHO.resolution = SoA4(len(oyIN.un... | [
"0.6482343",
"0.64816207",
"0.6424094",
"0.6404378",
"0.6345799",
"0.6339576",
"0.6300555",
"0.6265369",
"0.62431663",
"0.6217804",
"0.6202551",
"0.61848515",
"0.6120956",
"0.60686314",
"0.60611206",
"0.60452473",
"0.60230345",
"0.60096496",
"0.5992849",
"0.5985985",
"0.59671... | 0.0 | -1 |
Return a new empty Vector based on self. The new vector field has the same metainformation as self (param, name, nickname, dimension, prognostic, is_velocity). The data arrays of its components are initialized with zeros. | def LHwl(YKHO):
return lNLu(YKHO.param, YKHO.name, YKHO.nickname, YKHO.dimension, YKHO.prognostic, YKHO.is_velocity) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sbx9(Emd4) -> 'Vector':\n return lNLu(0.0, 0.0)",
"def oW_4(YKHO, iArr, oyg0=None):\n l_xx = YKHO.Get()\n l_xx.Reset()\n l_xx.vector.Set(iArr.Get())\n l_xx.player = oyg0\n return l_xx",
"def FIMM(YKHO):\n YKHO.properties = jpCc()",
"def FIMM(YKHO, Ty9i=None, yzQ0=1.0):\n if Ty9i i... | [
"0.6822067",
"0.6790818",
"0.6727813",
"0.6702857",
"0.65685225",
"0.6565337",
"0.6526238",
"0.65187436",
"0.6484741",
"0.6389909",
"0.6380935",
"0.6371585",
"0.63481086",
"0.6313568",
"0.62876606",
"0.6287493",
"0.6283852",
"0.6271162",
"0.6266877",
"0.62667763",
"0.6223916"... | 0.74939036 | 0 |
Create quickly an array to work with. This should not be used apart from debugging purposes. | def l_ic(xqoZ):
return sjOu(xqoZ, 'work', 'w', 'any', True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def S3W7(YKHO, *qIxc):\n return IOEi.tinfo_t_create_array(YKHO, *qIxc)",
"def l1ap(YKHO, wruD):\n return (wruD * gk2W.py_object)()",
"def S3W7(YKHO, CiwQ):\n pass",
"def tai5(jzdc):\n jzdc.size = jzdc.length * jzdc.base.size\n return jzdc",
"def KGm9(YKHO, Z9rn):\n return (Z9rn * gk2W.py_... | [
"0.6847601",
"0.6760554",
"0.6725712",
"0.672012",
"0.6696105",
"0.668627",
"0.66537905",
"0.66537905",
"0.6607276",
"0.6559751",
"0.65511686",
"0.65358835",
"0.65129316",
"0.65062034",
"0.6495451",
"0.64560527",
"0.64508647",
"0.64469093",
"0.64208883",
"0.6398098",
"0.63321... | 0.0 | -1 |
The ID for Microsoft Active Directory instance that the file system is join to. | def Gmcr(YKHO) -> str:
return qe4Y.get(YKHO, 'active_directory_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SweT(YKHO):\n hfKR = '%s%s%s' % (YKHO.user.username, YKHO.service.type, YKHO.num)\n return hfKR",
"def o_gm(YKHO) -> str:\n return qe4Y.get(YKHO, 'instance_id')",
"def o_gm(YKHO) -> str:\n return qe4Y.get(YKHO, 'instance_id')",
"def o_gm(YKHO) -> str:\n return qe4Y.get(YKHO, 'instance_id')... | [
"0.70329064",
"0.69538325",
"0.69538325",
"0.69538325",
"0.69538325",
"0.69538325",
"0.69538325",
"0.69538325",
"0.6939678",
"0.6896892",
"0.68953544",
"0.68953544",
"0.68953544",
"0.68953544",
"0.6888257",
"0.68544394",
"0.68544394",
"0.68544394",
"0.6845763",
"0.6832984",
"... | 0.6977731 | 1 |
An array DNS alias names associated with the Amazon FSx file system. | def LIAQ(YKHO) -> bdIy[str]:
return qe4Y.get(YKHO, 'aliases') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CBrI(YKHO):\n YKHO._chk_state()\n OQ7l = YKHO._dbh.cursor()\n OQ7l.execute('SELECT DISTINCT address FROM alias WHERE gid = %s ORDER BY address', (YKHO._gid,))\n KYrJ = OQ7l.fetchall()\n OQ7l.close()\n LIAQ = []\n if KYrJ:\n rRzo = '@'.join\n HzZc = YKHO._name\n LIAQ = ... | [
"0.699933",
"0.6935743",
"0.6916979",
"0.68681556",
"0.6860748",
"0.6860748",
"0.68167",
"0.67458683",
"0.6618092",
"0.6609756",
"0.6594914",
"0.6590354",
"0.6590354",
"0.6590354",
"0.6590354",
"0.65385884",
"0.65318245",
"0.65009755",
"0.64955395",
"0.64955395",
"0.6434958",... | 0.680484 | 7 |
The number of days to retain automatic backups. | def k36O(YKHO) -> int:
return qe4Y.get(YKHO, 'automatic_backup_retention_days') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k36O(YKHO) -> qe4Y.Output[h8nf[int]]:\n return qe4Y.get(YKHO, 'automatic_backup_retention_days')",
"def k36O(YKHO) -> h8nf[qe4Y.Input[int]]:\n return qe4Y.get(YKHO, 'automatic_backup_retention_days')",
"def k36O(YKHO) -> h8nf[qe4Y.Input[int]]:\n return qe4Y.get(YKHO, 'automatic_backup_retention_da... | [
"0.811896",
"0.80127805",
"0.80127805",
"0.7804518",
"0.76441205",
"0.75605994",
"0.75605994",
"0.75605994",
"0.75605994",
"0.72938716",
"0.72090155",
"0.71331024",
"0.71045023",
"0.70073944",
"0.70073944",
"0.70073944",
"0.694576",
"0.6898615",
"0.6898615",
"0.68601596",
"0.... | 0.84103966 | 0 |
Specifies the IDs of the subnets that the file system is accessible from. | def pAck(YKHO) -> bdIy[str]:
return qe4Y.get(YKHO, 'subnet_ids') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pAck(YKHO):\n if 'subnet_ids' in YKHO.conf['aws'] and YKHO.conf['aws']['subnet_ids'] is not None:\n return YKHO.conf['aws']['subnet_ids']\n else:\n return list()",
"def Npkd(YKHO) -> qe4Y.Input[bdIy[qe4Y.Input[str]]]:\n return qe4Y.get(YKHO, 'subnets')",
"def Npkd(YKHO) -> qe4Y.Input... | [
"0.7015367",
"0.69129425",
"0.69129425",
"0.6687319",
"0.6642277",
"0.66305923",
"0.66305923",
"0.66305923",
"0.66305923",
"0.66305923",
"0.66305923",
"0.65093535",
"0.65093535",
"0.65093535",
"0.64418423",
"0.64029384",
"0.6392712",
"0.6380403",
"0.63687074",
"0.6292844",
"0... | 0.66493803 | 4 |
The ID of the primary virtual private cloud (VPC) for the file system. | def xOeT(YKHO) -> str:
return qe4Y.get(YKHO, 'vpc_id') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xOeT(YKHO):\n return YKHO._vpc.id",
"def ouUl():\n return oUlR()['network']['interfaces']['macs'].values()[0]['vpc-id']",
"def xOeT(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'vpc_id')",
"def xOeT(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'vpc_id')",
"def xOeT(YKHO) -> qe4Y.Output[str]:\... | [
"0.73194164",
"0.7288519",
"0.72238284",
"0.72238284",
"0.7213107",
"0.7213107",
"0.7213107",
"0.7213107",
"0.7213107",
"0.7213107",
"0.7213107",
"0.7213107",
"0.7213107",
"0.7213107",
"0.7213107",
"0.7213107",
"0.71535814",
"0.7082371",
"0.7082371",
"0.7004701",
"0.6880216",... | 0.75712585 | 0 |
Forward pass of the model to get loss for a batch of data. | def Yorg(YKHO, Cptt, Y9ns=True):
Mekx, ON2u = pS9_(Cptt)
N6Z1 = YKHO.keras_model(Mekx, training=Y9ns)
N77f = YKHO.loss(ON2u, N6Z1)
return Erw2(loss=N77f) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Yorg(YKHO, Wc9F: Tuple[Tensor]) -> llWB:\n Wc9F = [ZfUD.to(YKHO.device) for ZfUD in Wc9F]\n [P57q, PkUH, l5Ny, whnh] = Wc9F\n aTLP, FqYY, ykQM = YKHO.model(P57q, PkUH, l5Ny, whnh)\n l5Ny, FqYY, ykQM = (l5Ny.int(), FqYY.int(), ykQM.int())\n N77f = YKHO.criterion(aTLP, FqYY, l5Ny, ykQM)\n retur... | [
"0.78264433",
"0.76332927",
"0.758449",
"0.75342214",
"0.751738",
"0.74342144",
"0.74328595",
"0.73942155",
"0.7390222",
"0.7387049",
"0.73458093",
"0.7319828",
"0.72997266",
"0.7298586",
"0.725847",
"0.7216696",
"0.72141117",
"0.7186788",
"0.7152683",
"0.7123368",
"0.7086896... | 0.72407097 | 15 |
Generate a random string of letters and digits | def Zfgd(FVpJ=6):
PdTY = vIwR.ascii_letters + vIwR.digits
return ''.join((tuKI.choice(PdTY) for YRbF in range(FVpJ))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zfgd():\n PdTY = vIwR.ascii_letters + vIwR.digits\n return ''.join((tuKI.choice(PdTY) for YRbF in range(50)))",
"def BWvy() -> str:\n return ''.join((Acvy(tcl1 + BHGE) for bGrB in range(ajWY(0, 1000))))",
"def a2Ud(u54L=10):\n SuXy = vIwR.ascii_letters + vIwR.digits\n dEzN = ''.join((tuKI.ch... | [
"0.8631943",
"0.8384434",
"0.8251372",
"0.8224575",
"0.81670165",
"0.8150145",
"0.8120966",
"0.81154776",
"0.81154776",
"0.81154776",
"0.8113952",
"0.80789375",
"0.8068197",
"0.8046413",
"0.8011193",
"0.8010706",
"0.8000312",
"0.7985171",
"0.79729855",
"0.7968244",
"0.7964276... | 0.76407766 | 74 |
Attach a text label above each bar in rects, displaying its height. xpos indicates which side to place the text w.r.t. the center of the bar. It can be one of the following {'center', 'right', 'left'}. | def siQ4(j8aQ, QzhK='center'):
QzhK = QzhK.lower()
fUKV = {'center': 'center', 'right': 'left', 'left': 'right'}
vgXP = {'center': 0.5, 'right': 0.57, 'left': 0.43}
for mawX in j8aQ:
H2v2 = mawX.get_height()
aNZO.text(mawX.get_x() + mawX.get_width() * vgXP[QzhK], 1.01 * H2v2, '{}'.format... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def siQ4(j8aQ, QzhK='center'):\n fUKV = {'center': 'center', 'right': 'left', 'left': 'right'}\n vgXP = {'center': 0, 'right': 1, 'left': -1}\n for mawX in j8aQ:\n H2v2 = mawX.get_height()",
"def siQ4(j8aQ, QzhK='center'):\n fUKV = {'center': 'center', 'right': 'left', 'left': 'right'}\n vg... | [
"0.7801442",
"0.7801442",
"0.77894604",
"0.7676818",
"0.76665604",
"0.76583266",
"0.7625375",
"0.7621403",
"0.76178944",
"0.7603082",
"0.76020473",
"0.7600974",
"0.75877035",
"0.7561492",
"0.75567585",
"0.7548479",
"0.7548479",
"0.7548479",
"0.748827",
"0.7476489",
"0.7448762... | 0.75887376 | 13 |
Attach a text label above each bar in rects, displaying its height. xpos indicates which side to place the text w.r.t. the center of the bar. It can be one of the following {'center', 'right', 'left'}. | def siQ4(j8aQ, QzhK='center'):
QzhK = QzhK.lower()
fUKV = {'center': 'center', 'right': 'left', 'left': 'right'}
vgXP = {'center': 0.5, 'right': 0.57, 'left': 0.43}
for mawX in j8aQ:
H2v2 = mawX.get_height()
aNZO.text(mawX.get_x() + mawX.get_width() * vgXP[QzhK], 1.01 * H2v2, '{}'.format... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def siQ4(j8aQ, QzhK='center'):\n fUKV = {'center': 'center', 'right': 'left', 'left': 'right'}\n vgXP = {'center': 0, 'right': 1, 'left': -1}\n for mawX in j8aQ:\n H2v2 = mawX.get_height()",
"def siQ4(j8aQ, QzhK='center'):\n fUKV = {'center': 'center', 'right': 'left', 'left': 'right'}\n vg... | [
"0.7801774",
"0.7801774",
"0.7789644",
"0.7676301",
"0.76677996",
"0.7657868",
"0.7626858",
"0.76231575",
"0.7617406",
"0.7602813",
"0.7601586",
"0.76008",
"0.7587709",
"0.7561158",
"0.75565064",
"0.75481933",
"0.75481933",
"0.75481933",
"0.748936",
"0.7477378",
"0.7448283",
... | 0.7588232 | 12 |
Property specifying if cnn part uses batch normalization. | def UruJ(YKHO):
return YKHO._config.get('cnn_batch_normalization') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uNRR(YKHO):\n return YKHO._config.get('batch_normalization')",
"def lS53():\n return _w_u(op_name='BatchNorm', transforms={'epsilon': 'eps'}, extras={'cudnn_off': 1}, ignores=['spatial', 'is_test', 'consumed_inputs'])",
"def yAoZ(YKHO, ZZcr, CLda):\n if isinstance(ZZcr, bool):\n YKHO.use_bn... | [
"0.71236396",
"0.69684535",
"0.65742683",
"0.64596015",
"0.6420276",
"0.6371453",
"0.6339141",
"0.63170296",
"0.63113576",
"0.63014424",
"0.6273888",
"0.62576807",
"0.6236932",
"0.62352765",
"0.6195813",
"0.6186121",
"0.6176015",
"0.61551577",
"0.6140351",
"0.6140221",
"0.613... | 0.7888598 | 0 |
Property specifying if input batch normalization is used. | def rL2h(YKHO):
return YKHO._config.get('input_normalization') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uNRR(YKHO):\n return YKHO._config.get('batch_normalization')",
"def UruJ(YKHO):\n return YKHO._config.get('cnn_batch_normalization')",
"def OjyF(YKHO):\n return YKHO._config.get('_is_normalized', False)",
"def dRji(YKHO):\n return YKHO.__batch",
"def yAoZ(YKHO, ZZcr, CLda):\n if isinstan... | [
"0.7280445",
"0.7087666",
"0.68783945",
"0.6541698",
"0.63340455",
"0.62943083",
"0.6262932",
"0.6262932",
"0.6262932",
"0.6262932",
"0.6262932",
"0.6262932",
"0.6159964",
"0.61374176",
"0.6102249",
"0.60651416",
"0.60303825",
"0.59850025",
"0.59792054",
"0.5976909",
"0.59446... | 0.6694552 | 3 |
Test that an nonexistent fid causes the right response to be sent. | def HY3y(YKHO):
nPrm = {UrCI: 10, EjAd: rIAI.datetime(2020, 1, 18, tzinfo=FXGE.timezone(gCuF.TIME_ZONE)), V8C7: rIAI.datetime(2020, 1, 18, tzinfo=FXGE.timezone(gCuF.TIME_ZONE)), oWf8: ['monkey'], AmDs: [], GAnC: 200, h6cG: 100, _g4R: 10}
Ylbp = R7IM(nPrm)
YKHO.assertEqual(Ylbp, (204, {})) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Oocg(a9b1):\n assert not a9b1.access('no_such_file')\n assert a9b1.lastError == 500\n trZe.raises(xqSS.error_perm, a9b1.openAddress, 'no_such_file')\n a9b1.finish()",
"def zZY5(YKHO):\n ypjv = YKHO.exporter.fileIDForFileName('nonexistent_file')\n YKHO.logger.log('file ids = {}'.format(ypjv)... | [
"0.6657602",
"0.6649701",
"0.6455636",
"0.6346954",
"0.6305426",
"0.6279652",
"0.62144965",
"0.61632055",
"0.6137493",
"0.6124392",
"0.61091554",
"0.60866857",
"0.60866857",
"0.6078374",
"0.60776323",
"0.6068708",
"0.60552084",
"0.6047708",
"0.60431933",
"0.6041143",
"0.60268... | 0.0 | -1 |
Remove duplicates from sentence >>> remove_duplicates("Python is great and Java is also great") 'Java Python also and great is' >>> remove_duplicates("Python is great and Java is also great") 'Java Python also and great is' | def dDv2(yAmx: str) -> str:
return ' '.join(sorted(set(yAmx.split()))) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yHZQ(F9WA):\n pFMR = False\n if ZbWC.match('.*[a-zA-Z]+.*', F9WA):\n pFMR = True\n o6Pt = ZbWC.sub('(.+?)\\\\1+', '\\\\1', HYUJ(F9WA))\n return (pFMR, o6Pt)",
"def ap07(z_aV):\n b1nX = sum(z_aV, [])\n o8oC = set((GIN8 for GIN8 in set(b1nX) if b1nX.count(GIN8) == 1))\n z_aV = [[GIN... | [
"0.7194963",
"0.67315936",
"0.672785",
"0.6671994",
"0.6656759",
"0.6596104",
"0.65791035",
"0.6557822",
"0.64687294",
"0.6429874",
"0.6368304",
"0.6338554",
"0.62863594",
"0.6285116",
"0.6275029",
"0.62670135",
"0.6265726",
"0.6257289",
"0.62018275",
"0.6166012",
"0.61503035... | 0.83508563 | 0 |
Returns the Json string representation of list_dictionaries | def IZ3T(F986):
if F986 is None:
F986 = []
return qQXR.dumps(F986) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IZ3T(F986):\n if F986 is None:\n F986 = []\n return qQXR.dumps(F986)",
"def IZ3T(F986):\n if not F986:\n return '[]'\n return qQXR.dumps(F986)",
"def IZ3T(F986):\n import json\n if not F986:\n return '[]'\n return json.dumps(F986)",
"def IZ3T(F986):\n if not F... | [
"0.85015345",
"0.8461124",
"0.84549755",
"0.8405418",
"0.83359677",
"0.83359677",
"0.8325578",
"0.83185977",
"0.8305932",
"0.8302991",
"0.82971776",
"0.82957965",
"0.8292494",
"0.8272266",
"0.82715935",
"0.82715935",
"0.82715935",
"0.82715935",
"0.8268131",
"0.8264798",
"0.82... | 0.848133 | 1 |
Returns an instance with all attributes already set | def eLpg(Emd4, **cmPJ):
if Emd4.__name__ == 'Rectangle':
Vo9x = Emd4(1, 1)
elif Emd4.__name__ == 'Square':
Vo9x = Emd4(1)
Vo9x.update(**cmPJ)
return Vo9x | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jth9(YKHO):\n return YKHO.__class__(YKHO.attributes)",
"def FIMM(YKHO, KAOR, azoT=None):\n YKHO.instance = KAOR\n YKHO.attributes = {}\n if azoT is not None:\n YKHO.attributes.update(azoT)",
"def FIMM(YKHO, **o8Kj):\n YKHO.attributes = {} if YKHO.attributes is None else YKHO.attribute... | [
"0.67917013",
"0.6598421",
"0.65671647",
"0.6563133",
"0.6515855",
"0.640693",
"0.63795066",
"0.63539314",
"0.6329953",
"0.62800246",
"0.62800246",
"0.6273849",
"0.6266627",
"0.6245445",
"0.6241148",
"0.6209358",
"0.61982405",
"0.6172068",
"0.6126612",
"0.6105204",
"0.6101388... | 0.0 | -1 |
Returns a list of instances | def J2u4(Emd4):
Ux0P = Emd4.__name__ + '.json'
KZjN = []
try:
with open(Ux0P, 'r', encoding='utf-8') as eHNT:
Nwr9 = eHNT.read()
DikD = Emd4.from_json_string(Nwr9)
for Op6c in DikD:
KZjN.append(Emd4.create(**Op6c))
return KZjN
excep... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lbzt(YKHO) -> x1iM[ec6H]:\n pass",
"def y5NJ(YKHO):\n return []",
"def y5NJ(YKHO):\n raise NotImplementedError()",
"def lbzt(YKHO):\n return YKHO.instances",
"def bUWH(YKHO) -> x1iM[Kt_s]:\n return YKHO._instances",
"def list(YKHO, **YSA3):\n return YKHO.get_instances(YSA3)",
"def... | [
"0.90422606",
"0.87674624",
"0.87344486",
"0.8413226",
"0.8401591",
"0.8346991",
"0.8340717",
"0.8201198",
"0.8156116",
"0.8144369",
"0.80579096",
"0.80564964",
"0.79390585",
"0.79177594",
"0.7874745",
"0.7867798",
"0.7861611",
"0.78435546",
"0.7832467",
"0.7823814",
"0.78215... | 0.0 | -1 |
Find and replace invalid json characters. | def byh3(KCHu):
try:
qQXR.loads(KCHu)
except qQXR.JSONDecodeError as e:
Lhg_ = KCHu
yKcO = tTpl.pos
Os4s = KCHu.find(']', yKcO) + 1
oPGO = KCHu[yKcO:Os4s - 3]
EtF8 = oPGO.replace('"', '\\"')
wXXG = EtF8.replace('\n', '')
GuB2 = Lhg_[:yKcO] + wXXG +... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KVKG(iUll):\n iUll = ZbWC.sub('{\\\\s*(\\\\w)', '{\"\\\\1', iUll)\n iUll = ZbWC.sub(',\\\\s*(\\\\w)', ',\"\\\\1', iUll)\n iUll = ZbWC.sub('([a-zA-Z]):', '\\\\1\":', iUll)\n return iUll",
"def meuR(YKHO, vIwR):\n if wv_C.search(vIwR):\n return None\n else:\n return vIwR",
"de... | [
"0.67674583",
"0.65242094",
"0.65176105",
"0.64726603",
"0.64469945",
"0.6048298",
"0.5963581",
"0.5885956",
"0.5885216",
"0.5874952",
"0.5853916",
"0.5852961",
"0.5843162",
"0.5841674",
"0.5841629",
"0.5839499",
"0.5813191",
"0.57605386",
"0.57317954",
"0.5716005",
"0.571046... | 0.6701699 | 1 |
Open price variance described in equation (8) | def Q7AG(zs3g: QFDataFrame) -> float:
z1Rg = jnDN._get_normalized_open(zs3g).iloc[1:]
exwG = zs3g.num_of_rows - 1
z7Mh = sum((z1Rg - z1Rg.mean()).pow(2)) / (exwG - 1)
return z7Mh | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vqJL(zs3g: QFDataFrame) -> float:\n Z9rn = jnDN._get_normalized_close(zs3g).iloc[1:]\n exwG = zs3g.num_of_rows - 1\n jIYp = sum((Z9rn - Z9rn.mean()).pow(2)) / (exwG - 1)\n return jIYp",
"def TfTB(YKHO, pZYi, zVcM, QWcs):\n vBtp = YKHO.get_data_fragment(pZYi, zVcM, QWcs)\n BWXx = oyIN.var(vB... | [
"0.67466986",
"0.65680486",
"0.6543142",
"0.6471268",
"0.64098907",
"0.6403222",
"0.6391882",
"0.6382528",
"0.6366322",
"0.6346815",
"0.63438976",
"0.6342619",
"0.6322985",
"0.6288588",
"0.62833315",
"0.62797534",
"0.6259498",
"0.6245356",
"0.62315387",
"0.6222462",
"0.619754... | 0.7479756 | 0 |
Tests that an email message is constructed | def Kev2(YKHO):
D3lj = 'test@email'
pB3N = u'This is a test payload'
tO9_ = KtDl.send_email(email_addr=D3lj, payload_plain=pB3N, payload_html=pB3N, email_template=vJfI)
YKHO.assertTrue(pB3N in tO9_.body)
YKHO.assertEqual(tO9_.subject, vJfI.subject) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pWSl(YKHO):\n D3lj = KFTI.objects.create(to=['to@example.com'], from_email='from@example.com', subject='Subject', message='Message', html_message='<p>HTML</p>')\n Ol8d = D3lj.email_message()\n YKHO.assertEqual(type(Ol8d), Zv80)\n YKHO.assertEqual(Ol8d.from_email, 'from@example.com')\n YKHO.asser... | [
"0.7586763",
"0.740818",
"0.72318155",
"0.7221026",
"0.71825856",
"0.71563864",
"0.71246266",
"0.710878",
"0.70500296",
"0.70146435",
"0.69647175",
"0.6936044",
"0.6909372",
"0.6896648",
"0.68776846",
"0.6861826",
"0.68440235",
"0.6842024",
"0.68393946",
"0.68050396",
"0.6795... | 0.6522708 | 45 |
Creates a user and checks it exists within the database | def cCBn(YKHO):
with YKHO.app.session_scope() as cuiw:
YKHO.user_view.create_user(absolute_uid=YKHO.stub_user_1.absolute_uid)
YKHO.user_view.create_user(absolute_uid=YKHO.stub_user_2.absolute_uid)
Aofo = cuiw.query(mv1M).filter(mv1M.absolute_uid == YKHO.stub_user_1.absolute_uid).all()
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def V7zm(YKHO):\n lYUQ(**YKHO.payload)\n Ylbp = YKHO.client.post(CKgv, YKHO.payload)\n YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_400_BAD_REQUEST)",
"def HO5O(YKHO):\n pB3N = {'email': 'isolasuarezsolatest@gmail.com', 'password': 'testpass'}\n lYUQ(**pB3N)\n Ylbp = YKHO.client.post(CKgv, pB3N... | [
"0.8497421",
"0.8190083",
"0.81787634",
"0.8143245",
"0.81351197",
"0.8109763",
"0.8092823",
"0.8067829",
"0.8047578",
"0.804478",
"0.8043039",
"0.8001611",
"0.7992572",
"0.7990683",
"0.799067",
"0.7976143",
"0.79716593",
"0.79494077",
"0.7937648",
"0.7856131",
"0.78487664",
... | 0.0 | -1 |
Tests that add_document_to_library() does not keep querying if bigquery returns empty responses during paging. | def SvXS(YKHO):
CBIr = mv1M(absolute_uid=YKHO.stub_user.absolute_uid)
with YKHO.app.session_scope() as cuiw:
cuiw.add(CBIr)
cuiw.commit()
xuBC = YEPB(name='MyLibrary', description='My library', public=True)
Uvf2 = BNML(permissions={'read': True, 'write': True, 'admin': False, 'ow... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mzQQ(YKHO):\n CBIr = mv1M(absolute_uid=YKHO.stub_user.absolute_uid)\n with YKHO.app.session_scope() as cuiw:\n cuiw.add(CBIr)\n cuiw.commit()\n xuBC = YEPB(name='MyLibrary', description='My library', public=True)\n Uvf2 = BNML(permissions={'read': True, 'write': True, 'admin':... | [
"0.71461016",
"0.6599386",
"0.6549389",
"0.64977604",
"0.6385921",
"0.6374827",
"0.61254156",
"0.58252645",
"0.5808209",
"0.5762492",
"0.56573486",
"0.5621112",
"0.5492444",
"0.54861826",
"0.54349124",
"0.5399253",
"0.5382417",
"0.5329948",
"0.532968",
"0.5319741",
"0.5291219... | 0.7324173 | 0 |
Tests that the permissions of the user are returned if the requesting user is an admin or owner | def fSB_(YKHO):
iE7x = mv1M(absolute_uid=YKHO.stub_user_1.absolute_uid)
jiA2 = mv1M(absolute_uid=YKHO.stub_user_2.absolute_uid)
with YKHO.app.session_scope() as cuiw:
cuiw.add_all([jiA2, iE7x])
cuiw.commit()
xuBC = YEPB(name='MyLibrary', description='My library', public=True, bibcode... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XFLq(QePW, qsJ6):\n return qsJ6 in E6ft(QePW) or not CyBR(QePW)",
"def b5K5(YKHO, CBIr):\n YKHO.object = YKHO.get_object()\n if CBIr.organization == YKHO.object and CBIr.user_type == mv1M.ADMIN:\n return True\n raise wPvU()",
"def VYJj(YKHO):\n qsJ6 = mv1M.objects.create_user('owner',... | [
"0.7748493",
"0.724619",
"0.7203021",
"0.7189668",
"0.71672624",
"0.7165747",
"0.715988",
"0.70998615",
"0.70863515",
"0.70862156",
"0.707186",
"0.7033436",
"0.7024503",
"0.70013493",
"0.69945437",
"0.6975007",
"0.6957133",
"0.69301283",
"0.6919971",
"0.6917057",
"0.68914455"... | 0.6928807 | 18 |
Loads the Django application's settings. You can override this method to provide your own loading mechanism. Simply return an instance of your settings module. | def TuHQ(YKHO):
mWFP = Hy7s.environ['DJANGO_SETTINGS_MODULE']
B5hb, VlDb = mWFP.rsplit('.', 1)
Gcbu, pmON, JBZA = PQrP.find_module(VlDb, [B5hb.replace('.', '/')])
try:
return PQrP.load_module(VlDb, Gcbu, pmON, JBZA)
finally:
if Gcbu:
Gcbu.close() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TuHQ(YKHO):\n mWFP = Hy7s.environ['DJANGO_SETTINGS_MODULE']\n B5hb, VlDb = mWFP.rsplit('.', 1)\n Gcbu, pmON, JBZA = PQrP.find_module(VlDb, [B5hb.replace('.', '/')])\n try:\n return PQrP.load_module(VlDb, Gcbu, pmON, JBZA)\n finally:\n if Gcbu:\n Gcbu.close()",
"def UaU... | [
"0.7941922",
"0.79110974",
"0.7825227",
"0.74986124",
"0.7232774",
"0.70507663",
"0.7026781",
"0.6922198",
"0.68865377",
"0.68032545",
"0.677175",
"0.6763952",
"0.66810143",
"0.66440606",
"0.6545531",
"0.6535193",
"0.65143317",
"0.65064573",
"0.6498281",
"0.64420074",
"0.6393... | 0.79510844 | 0 |
build k indices for kfold. | def a4rF(LVAh, sSDk, yokr):
gqUV = LVAh.shape[0]
VOlW = int(gqUV / sSDk)
oyIN.random.seed(yokr)
_0VL = oyIN.random.permutation(gqUV)
a_4G = [_0VL[G1Hx * VOlW:(G1Hx + 1) * VOlW] for G1Hx in range(sSDk)]
return oyIN.array(a_4G) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def a4rF(LVAh, sSDk, yokr):\n \"\"\"build k indices for k-fold.\"\"\"\n gqUV = LVAh.shape[0]\n VOlW = int(gqUV / sSDk)\n oyIN.random.seed(yokr)\n _0VL = oyIN.random.permutation(gqUV)\n a_4G = [_0VL[G1Hx * VOlW:(G1Hx + 1) * VOlW] for G1Hx in range(sSDk)]\n return oyIN.array(a_4G)",
"def a4rF(... | [
"0.8147923",
"0.7920322",
"0.7869487",
"0.7869487",
"0.7869487",
"0.7869487",
"0.7869487",
"0.7869487",
"0.7869487",
"0.7869487",
"0.7869487",
"0.7869487",
"0.7869487",
"0.7869487",
"0.7869487",
"0.7869487",
"0.7869487",
"0.7869487",
"0.78636",
"0.7852471",
"0.7851632",
"0.... | 0.78578305 | 20 |
Constructor of KMeans class X LIST input data K INT number of centroids options DICT dctionary with options | def FIMM(YKHO, EcVT, nMvt, xAU6=None):
YKHO._init_X(EcVT)
YKHO._init_options(xAU6)
YKHO._init_rest(nMvt) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, EcVT, nMvt=1, xAU6=None):\n YKHO.num_iter = 0\n YKHO.K = nMvt\n YKHO._init_X(EcVT)\n YKHO._init_options(xAU6)\n YKHO._init_centroids()",
"def GQhZ(inRC, G1Hx):\n lWsa = list(mrPm(inRC, k=G1Hx))\n return lWsa",
"def FIMM(YKHO, nPrm, G1Hx=5, XlAL=None, _hnO=None):\n YKHO._d... | [
"0.69948256",
"0.6900472",
"0.67861253",
"0.6743624",
"0.67386615",
"0.6701881",
"0.66951466",
"0.66580045",
"0.66540784",
"0.664641",
"0.65879494",
"0.6550365",
"0.654353",
"0.6531746",
"0.6527892",
"0.6524322",
"0.651431",
"0.6484506",
"0.6477393",
"0.64609295",
"0.6460356"... | 0.6322743 | 36 |
Initialization of centroids depends on self.options['km_init'] | def OkFN(YKHO):
"""
if self.options['km_init'].lower() == 'first':
self.centroids = np.zeros((self.K, self.X.shape[1]))
self.centroids[0] = self.X[0]
ind = 1
for i in range (1, self.K):
while (self.X[ind] == self.centroids).all(1).any():
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OkFN(YKHO):\n \"\"\"@brief Initialization of centroids\n depends on self.options['km_init']\n \"\"\"\n ZP6F = []\n ewCu = 0\n d6pt = 0\n if YKHO.options['km_init'].lower() == 'first':\n while ewCu != YKHO.K:\n EmMj = False\n e3Fk = YKHO.X[d6pt].tolist()... | [
"0.8260625",
"0.7768973",
"0.7733786",
"0.75623024",
"0.7531508",
"0.7519063",
"0.73592716",
"0.7282523",
"0.7244301",
"0.7215458",
"0.7127743",
"0.71187246",
"0.7102544",
"0.7080701",
"0.7057574",
"0.7053059",
"0.6987939",
"0.69579464",
"0.6951328",
"0.6941539",
"0.6908607",... | 0.8097757 | 1 |
Calculates the closest centroid of all points in X | def tR9U(YKHO):
YKHO.clusters = oyIN.argmin(Ayfi(YKHO.X, YKHO.centroids), axis=1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qHPv(EcVT):\n return EcVT.mean(axis=0)",
"def e6ux(EcVT):\n Nq1b = EcVT.mean(axis=0)\n return Nq1b",
"def qHPv(EcVT):\n return EcVT.mean(axis=0)",
"def e6ux(EcVT):\n Nq1b = EcVT.mean(axis=0)\n return Nq1b",
"def qHPv(EcVT):\n return oyIN.average(EcVT, axis=0)",
"def qHPv(EcVT):\n... | [
"0.8166365",
"0.81484747",
"0.812803",
"0.81011504",
"0.8085785",
"0.80249363",
"0.79840106",
"0.7982025",
"0.7840014",
"0.7811142",
"0.77934825",
"0.77902913",
"0.7766064",
"0.7741571",
"0.7693254",
"0.7587343",
"0.75816804",
"0.75782704",
"0.755183",
"0.74504524",
"0.744676... | 0.6758154 | 70 |
Calculates coordinates of centroids based on the coordinates of all the points assigned to the centroid | def OJod(YKHO):
YKHO.old_centroids = _qLf(YKHO.centroids)
YKHO.centroids = oyIN.array([YKHO.X[YKHO.clusters == G1Hx].mean(axis=0) for G1Hx in range(YKHO.K)]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yHxN(YKHO):\n YKHO.message('Generating centroids')\n return oyIN.divide(oyIN.sum(YKHO.element_coordinates(), axis=1), 3.0)",
"def e6ux(fUYa):\n wjRY = sum(fUYa)\n e6ux = wjRY / len(fUYa)\n return e6ux",
"def e6ux(nPrm, WKvO, LVAh):\n g0Hx = oyIN.dot(WKvO, oyIN.sum(nPrm, axis=1))\n dlau... | [
"0.84280926",
"0.83016294",
"0.80772704",
"0.80108565",
"0.79465693",
"0.794341",
"0.7923467",
"0.7920257",
"0.7894222",
"0.78477293",
"0.78440416",
"0.78423965",
"0.7821989",
"0.7810302",
"0.77974945",
"0.77914095",
"0.77889776",
"0.7773901",
"0.7735377",
"0.7732957",
"0.770... | 0.72429734 | 61 |
Gets the name of the variable. | def mWFP(YKHO) -> qe4Y.Output[str]:
return qe4Y.get(YKHO, 'name') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RZu0(YKHO):\n return YKHO.variable",
"def XuY2(YKHO):\n return YKHO._var_name",
"def W0tD(YKHO):\n return YKHO.variable",
"def RZu0(YRbF):\n KCHu = CaG2.get_variable(YRbF)\n mWFP = KCHu.name.decode('utf8')\n return mWFP",
"def Es0b(YKHO) -> str:\n return YKHO._variable",
"def mWF... | [
"0.8738581",
"0.8467592",
"0.84286785",
"0.80993485",
"0.7932712",
"0.7858643",
"0.78434265",
"0.76939315",
"0.7636401",
"0.74837905",
"0.7476346",
"0.7448201",
"0.7447567",
"0.74187607",
"0.7395251",
"0.7392136",
"0.7366175",
"0.7344852",
"0.7343656",
"0.7339005",
"0.7306980... | 0.0 | -1 |
Gets or sets the hybrid worker group that the scheduled job should run on. | def ehKR(YKHO) -> qe4Y.Output[h8nf[str]]:
return qe4Y.get(YKHO, 'run_on') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cWas(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'work_group')",
"def cWas(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'work_group')",
"def cWas(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'work_group')",
"def aiHR(YKHO) -> str:\n return YKHO.__group",
"def KJsL(YKHO) -> str:\n... | [
"0.6824356",
"0.6371294",
"0.6188766",
"0.5874729",
"0.5806669",
"0.57488525",
"0.5720158",
"0.5720158",
"0.55819136",
"0.5576105",
"0.5558226",
"0.55560416",
"0.5550511",
"0.5528625",
"0.5516641",
"0.5503188",
"0.54945356",
"0.54829097",
"0.54829097",
"0.54829097",
"0.548290... | 0.0 | -1 |
Convert a numbits into a list of numbers. | def sOZO(lir1):
xYvp = []
for ClvU, YB8B in enumerate(SiSY(lir1)):
for GuhE in range(8):
if YB8B & 1 << GuhE:
xYvp.append(ClvU * 8 + GuhE)
return xYvp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cuUZ(mLGw):\n qQiX = []\n mLGw = mLGw.split()\n for YRbF in mLGw:\n YRbF = int(YRbF)\n qQiX.append(YRbF)\n return qQiX",
"def Xe3P(WKvO: int) -> list:\n return [int(Fg_i) for Fg_i in '{:032b}'.format(WKvO)]",
"def lROa(mLGw, Zsg6=8):\n return [int(mLGw) >> WKvO & 1 for WKvO ... | [
"0.73134494",
"0.72843313",
"0.7201044",
"0.7117114",
"0.7110663",
"0.70825183",
"0.7076515",
"0.7063523",
"0.70067525",
"0.69239694",
"0.6916756",
"0.6880697",
"0.68658954",
"0.6859956",
"0.6851829",
"0.6851829",
"0.6851829",
"0.682836",
"0.6810174",
"0.6788577",
"0.67781645... | 0.82815045 | 0 |
Test that absolute path of input path does not cause RuntimeError. | def hc5R(G358, gEpS):
try:
gEpS.process(in_str='', fname=Hy7s.path.abspath('models/my_new_project/use_var.sql'), config=u5vU(configs=fnRL))
except Exception as e:
trZe.fail(f'Unexpected RuntimeError: {tTpl}') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yJvw(pmON):\n with trZe.raises(ValueError):\n WTcy(pmON)",
"def YN2y(bD7m: URL) -> None:\n with trZe.raises(ValueError):\n IP3y(bD7m)",
"def c0He(YKHO):\n YKHO.assertRaisesRegexp(I0ii, 'The filepath does not exist.', YKHO.setter, 'filepath', '/foo/bar')",
"def UULU(pmON):\n if I... | [
"0.75829786",
"0.7547226",
"0.74030036",
"0.7361893",
"0.73050225",
"0.73008645",
"0.71662426",
"0.7164417",
"0.71325654",
"0.7093071",
"0.70157945",
"0.7007166",
"0.6984888",
"0.6967538",
"0.6966501",
"0.695729",
"0.6943525",
"0.6923398",
"0.6916914",
"0.69161",
"0.6900002",... | 0.0 | -1 |
Sets the can_include_affiliate of this Notification. | def spiR(YKHO, spiR):
YKHO._can_include_affiliate = spiR | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tFgB(YKHO, tFgB):\n YKHO._include_affiliate = tFgB",
"def hhjM(YKHO, hhjM):\n YKHO._affiliate_email = hhjM",
"def pCSI(YKHO):\n\n def BBLH(Aofo):\n YKHO.assertEquals('feature-not-implemented', Aofo.condition)\n YKHO.assertEquals('unsupported', Aofo.appCondition.name)\n YKHO.as... | [
"0.7994644",
"0.5960775",
"0.5881326",
"0.5736374",
"0.5606046",
"0.5591342",
"0.5524508",
"0.5445473",
"0.5440271",
"0.54289556",
"0.54217315",
"0.53278357",
"0.5242737",
"0.5208423",
"0.5162403",
"0.512395",
"0.5095562",
"0.50719744",
"0.5066246",
"0.501752",
"0.4962059",
... | 0.87951136 | 0 |
Sets the include_affiliate of this Notification. | def tFgB(YKHO, tFgB):
YKHO._include_affiliate = tFgB | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def spiR(YKHO, spiR):\n YKHO._can_include_affiliate = spiR",
"def hhjM(YKHO, hhjM):\n YKHO._affiliate_email = hhjM",
"def baRb(YKHO, baRb):\n YKHO._affiliation = baRb",
"def d1K7(YKHO, d1K7):\n YKHO._affiliate_id = d1K7",
"def Z8xj(YKHO, Z8xj):\n YKHO._user_affiliation = Z8xj",
"def _FGW(Y... | [
"0.76900977",
"0.65630084",
"0.6427736",
"0.6304531",
"0.61723125",
"0.57713336",
"0.5763346",
"0.5763346",
"0.5746582",
"0.5666935",
"0.55642945",
"0.55155444",
"0.5404123",
"0.5394112",
"0.53249335",
"0.5290907",
"0.5272026",
"0.52299875",
"0.5229132",
"0.520573",
"0.508932... | 0.889325 | 0 |
Sets the notification_group of this Notification. | def QG71(YKHO, QG71):
YKHO._notification_group = QG71 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QYWb(YKHO, uOe2):\n YKHO._group = uOe2",
"def scR9(YKHO, uOe2: Optional[Any]) -> None:\n YKHO.group = uOe2",
"def uOe2(YKHO, uOe2):\n YKHO._group = uOe2",
"def uOe2(YKHO, uOe2):\n YKHO._group = uOe2",
"def uOe2(YKHO, uOe2):\n YKHO._group = uOe2",
"def uOe2(YKHO, uOe2):\n YKHO._group... | [
"0.74882406",
"0.72069365",
"0.7118284",
"0.7118284",
"0.7118284",
"0.7118284",
"0.7118284",
"0.7118284",
"0.7118284",
"0.7118284",
"0.7118284",
"0.7116733",
"0.6760192",
"0.6734547",
"0.6713398",
"0.6557801",
"0.64800936",
"0.6474506",
"0.6474506",
"0.6474506",
"0.6474506",
... | 0.8841407 | 0 |
Returns the string representation of the model | def gTzM(YKHO):
return CgYo.pformat(YKHO.to_dict()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return YKHO.text",
"def zAg0(YKHO):\n oOUF = '-----------------------------------------------------------------------------------\\n'\n _2sc = YKHO.__class__.__name__\n oOUF += '\\t\\... | [
"0.864179",
"0.85105866",
"0.7853924",
"0.77452",
"0.7712474",
"0.76976854",
"0.76601666",
"0.7638181",
"0.7621996",
"0.76074743",
"0.76074743",
"0.76074743",
"0.7607432",
"0.7599404",
"0.75858897",
"0.7582702",
"0.75715727",
"0.75683635",
"0.7539386",
"0.7539386",
"0.7528709... | 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 return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif: object):\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif):\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(... | [
"0.8392633",
"0.8354901",
"0.82950056",
"0.8132309",
"0.81149805",
"0.8099986",
"0.809911",
"0.8097883",
"0.8097883",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8066694",
"0.80594814",
"0.805757",
... | 0.0 | -1 |
Returns the player who is to play following the action sequence. | def yi3Q(Q6kx: extensive_game.ExtensiveGameNode):
return Q6kx.player | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nAM4(YKHO):\n return YKHO.player",
"def nAM4(YKHO):\n return YKHO.player",
"def GFCh(YKHO):\n return YKHO.player",
"def oyg0(YKHO):\n return YKHO._player",
"def oyg0(YKHO):\n return YKHO._state[1]",
"def nAM4(YKHO):\n return YKHO._player",
"def nAM4(YKHO):\n return YKHO._player... | [
"0.7500945",
"0.7500945",
"0.73416173",
"0.73270273",
"0.7268192",
"0.72590214",
"0.72590214",
"0.72590214",
"0.72590214",
"0.72590214",
"0.72068614",
"0.71963674",
"0.71863633",
"0.71758103",
"0.7155579",
"0.70739484",
"0.70739484",
"0.70357585",
"0.70073813",
"0.70001477",
... | 0.65746903 | 41 |
Returns the given list of Books sorted. | def uUEp(i8RB, oHiM=False, CkQX=False):
bL6M = str
if oHiM:
bL6M = lambda Fg_i: Fg_i.publication_date
return sorted(i8RB, key=bL6M, reverse=CkQX) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xKog():\n SoD9 = GD_A.getting_sorted_books()\n EVcG.sort_list(SoD9)",
"def EfMw(YKHO):\n return [jI4j for jI4j in JbF4]",
"def oSJH(i8RB: list) -> dict:\n grYH = {}\n for jI4j in i8RB:\n if OFbD(jI4j):\n o04_(jI4j, 'spell books', grYH)\n elif QhEx(jI4j):\n ... | [
"0.7267551",
"0.64345974",
"0.6415377",
"0.6292737",
"0.6228412",
"0.62277526",
"0.6205768",
"0.61461616",
"0.6135294",
"0.6086271",
"0.6086271",
"0.6056285",
"0.5967795",
"0.59009475",
"0.5895156",
"0.58860934",
"0.5858098",
"0.5777927",
"0.5754344",
"0.57465386",
"0.5721623... | 0.6688091 | 1 |
Add node `v` to graph with attributes `attrs`. | def g5gD(YKHO, Ty9i, o8Kj=None):
if o8Kj is None:
o8Kj = {}
if Ty9i in YKHO.nodes:
YKHO.nodes[Ty9i].update(o8Kj)
else:
YKHO.nodes[Ty9i] = o8Kj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rz7z(YKHO, P6bq, Ty9i, o8Kj=None):\n if o8Kj is None:\n o8Kj = {}\n if P6bq not in YKHO.nodes:\n YKHO.nodes[P6bq] = {}\n if Ty9i not in YKHO.nodes:\n YKHO.nodes[Ty9i] = {}\n YKHO.edges.setdefault(P6bq, {})\n YKHO.edges[P6bq].setdefault(Ty9i, [])\n YKHO.edges[P6bq][Ty9i].a... | [
"0.70885205",
"0.683592",
"0.6608135",
"0.65778273",
"0.65289545",
"0.6521491",
"0.64932305",
"0.6490172",
"0.6472364",
"0.64516073",
"0.64032656",
"0.6339303",
"0.6314897",
"0.6313189",
"0.63056105",
"0.6274024",
"0.62666583",
"0.6225756",
"0.62212956",
"0.6200987",
"0.61911... | 0.88039213 | 0 |
Add edge from `u` to `v` to graph with attributes `attrs`. | def rz7z(YKHO, P6bq, Ty9i, o8Kj=None):
if o8Kj is None:
o8Kj = {}
if P6bq not in YKHO.nodes:
YKHO.nodes[P6bq] = {}
if Ty9i not in YKHO.nodes:
YKHO.nodes[Ty9i] = {}
YKHO.edges.setdefault(P6bq, {})
YKHO.edges[P6bq].setdefault(Ty9i, [])
YKHO.edges[P6bq][Ty9i].append(o8Kj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rz7z(YKHO, P6bq, Ty9i, honC=None, **hkS8):\n YKHO.graph.add_edge(P6bq, Ty9i, honC, **hkS8)",
"def rz7z(YKHO, P6bq, Ty9i):\n YKHO.nodes_edges[P6bq].add(Ty9i)\n YKHO.nodes_edges[Ty9i].add(P6bq)",
"def rz7z(YKHO, P6bq, Ty9i):\n YKHO.adj[P6bq].append(Ty9i)\n YKHO.adj[Ty9i].append(P6bq)",
"def ... | [
"0.8347087",
"0.7997339",
"0.7929157",
"0.7858466",
"0.7852961",
"0.784769",
"0.7804152",
"0.7789681",
"0.77861565",
"0.778122",
"0.7712984",
"0.76758116",
"0.75585896",
"0.7510823",
"0.7502932",
"0.75027",
"0.7484697",
"0.7483334",
"0.7465551",
"0.7440723",
"0.73873687",
"... | 0.84878075 | 0 |
Returns `True` iff there is a path from the start node to an accept node. | def cmBw(YKHO):
try:
YKHO.shortest_path()
return True
except:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cmBw(YKHO, Os4s):\n if YKHO.from_.get(Os4s):\n return True\n return False",
"def rRcp(Q6kx):\n I1mm = False\n if Q6kx.module.project:\n c1Rn = Q6kx.module.project.start_nodes\n else:\n c1Rn = Q6kx.module.start_nodes\n for pu_z in c1Rn:\n pmON = Asu7(pu_z, Q6kx)\n... | [
"0.716679",
"0.7119557",
"0.66187125",
"0.6599297",
"0.6517804",
"0.64141446",
"0.6371993",
"0.6346151",
"0.63262254",
"0.6293079",
"0.6270951",
"0.62306464",
"0.6183117",
"0.6113563",
"0.6065811",
"0.6053693",
"0.60303444",
"0.6017149",
"0.6000455",
"0.5992292",
"0.59870356"... | 0.6271507 | 10 |
Writes a `Machine` or `Graph` to file named `filename` in GraphViz (DOT) format. | def grem(WKvO, Ux0P):
if isinstance(WKvO, eIXr.Machine):
WKvO = HHfS(WKvO)
if not isinstance(WKvO, Q1Kq):
raise TypeError('Only Machines and Graphs can be written as DOT files')
with open(Ux0P, 'w') as nUeQ:
nUeQ.write(WKvO._repr_dot_()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ehAV(gIsw, pNZh):\n with open(gIsw, 'w') as ytgA:\n pNZh.write_dot(ytgA)",
"def eyBU(YKHO, Ux0P):\n jHsn.write_dot(YKHO, Ux0P)",
"def t1vR(n0qt, pNZh):\n with open(n0qt, 'w') as _RR0:\n _RR0.write(pNZh.to_string())",
"def vi4W(pNZh, UUfo):\n l5Ny = ['digraph structs {', 'node [s... | [
"0.763859",
"0.73249716",
"0.72464114",
"0.7230869",
"0.7206496",
"0.7202194",
"0.7151765",
"0.7143088",
"0.71285444",
"0.7089394",
"0.70406216",
"0.70340675",
"0.7017922",
"0.69841886",
"0.6982112",
"0.6932425",
"0.688749",
"0.688633",
"0.6876612",
"0.6866526",
"0.68538445",... | 0.8039161 | 0 |
Compute KLdivergence between 2 distributions. | def dzAH(XP5J: np.ndarray, vexM: np.ndarray, SGf8: float=0.0) -> oyIN.ndarray:
xFCy = oyIN.sum(XP5J * (oyIN.log(XP5J + SGf8) - oyIN.log(vexM + SGf8)), axis=1)
return xFCy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dzAH(ZUyv: np.array, S_1T: np.array) -> float:\n qmLP.filterwarnings('ignore', category=RuntimeWarning)\n iArr = ZUyv * oyIN.log2(S_1T / ZUyv)\n qmLP.filterwarnings('default', category=RuntimeWarning)\n iArr = oyIN.nan_to_num(iArr)\n return -iArr.sum()",
"def dzAH(YKHO, Elif):\n raise NotIm... | [
"0.79923755",
"0.79785174",
"0.7973427",
"0.7902404",
"0.7851466",
"0.7828514",
"0.7803738",
"0.77389354",
"0.7641696",
"0.7616983",
"0.7578294",
"0.75258017",
"0.7489637",
"0.74374807",
"0.74167824",
"0.73735076",
"0.7272994",
"0.7257336",
"0.7251619",
"0.7159022",
"0.714505... | 0.71981865 | 19 |
Extract all the given images' feature. | def nII8(iXTm, Ep8u, feeS=False):
print('loading images...')
OQe7 = len(iXTm)
eGC5 = PRqg(total=OQe7)
lVNl = abpE(iXTm, Ep8u, shuffle=False, stop_exhausted=False, channel_first=True, num_channels=3)
gGnb = 0
jHAK = []
while gGnb < OQe7:
blt9 = lVNl.next()[0]
if gGnb + len(blt... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JDhM(YKHO, SN1w):\n n4JS = []\n for XVnG in SN1w:\n _x49 = YKHO.compute_features(XVnG)\n n4JS = n4JS + [_x49]\n return n4JS",
"def PSlE(YKHO, xkjI):\n return YKHO.student.extract_feat(xkjI)",
"def PSlE(YKHO, xkjI):\n return YKHO.model_t.extract_feat(xkjI)",
"def carQ(YKHO, xk... | [
"0.77897716",
"0.7616357",
"0.7584615",
"0.73258275",
"0.7315702",
"0.7299898",
"0.72677743",
"0.7253942",
"0.7233579",
"0.7221082",
"0.72139317",
"0.71900564",
"0.7162844",
"0.7120791",
"0.7037436",
"0.7026578",
"0.7025876",
"0.7003325",
"0.7000295",
"0.69574773",
"0.6932152... | 0.0 | -1 |
normalizes the mocap data array The data gets normalized by subtraction of the lower backs data from every bodysegment. That way the lowerback is in the origin. | def Q7gV(YKHO, qw7D: np.array) -> oyIN.array:
aKB0 = qw7D[:, 66:72]
for bGrB in range(21):
aKB0 = oyIN.hstack((aKB0, qw7D[:, 66:72]))
qw7D = oyIN.subtract(qw7D, aKB0)
return qw7D | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Q7gV(qw7D: np.array) -> oyIN.array:\n aKB0 = qw7D[:, 66:72]\n for bGrB in range(21):\n aKB0 = oyIN.hstack((aKB0, qw7D[:, 66:72]))\n qw7D = oyIN.subtract(qw7D, aKB0)\n return qw7D",
"def OEry(YKHO, Sxzb):\n DKP6 = oyIN.array(Sxzb, dtype=oyIN.float32)\n S8vG = oyIN.sum(DKP6, axis=1) / ... | [
"0.7416921",
"0.69638413",
"0.6926494",
"0.6795393",
"0.6770468",
"0.67047226",
"0.6701555",
"0.6684057",
"0.66718924",
"0.661557",
"0.6576097",
"0.65231353",
"0.65199196",
"0.64878446",
"0.6478399",
"0.64716125",
"0.64711857",
"0.6450764",
"0.64487165",
"0.643264",
"0.642466... | 0.75409263 | 0 |
Calculates the IoU between 2 intervals [a1,b1] and [a2,b2] | def rP5y(YKHO, XOOk, kYGz, pHXX, ftz7):
iQin = min(kYGz, ftz7) - max(XOOk, pHXX)
if iQin < 0:
return 0
b65I = max(kYGz, ftz7) - min(XOOk, pHXX)
return iQin / b65I | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _xWy(MErA: tuple, ZnGJ: tuple):\n iQin: int\n b65I: int\n fP3a, NJ_p = sorted([MErA, ZnGJ], key=lambda WKvO: WKvO[0])\n XPRt, cBgo = sorted([MErA, ZnGJ], key=lambda WKvO: WKvO[1])\n bzU2 = (MErA[2] - MErA[0]) * (MErA[3] - MErA[1])\n Eq1k = (ZnGJ[2] - ZnGJ[0]) * (ZnGJ[3] - ZnGJ[1])\n if fP3... | [
"0.7732882",
"0.75586075",
"0.75430757",
"0.7436326",
"0.7427659",
"0.73722047",
"0.7331298",
"0.73291475",
"0.7249858",
"0.7243081",
"0.7233391",
"0.72176796",
"0.71752757",
"0.71725494",
"0.7160698",
"0.7141106",
"0.7132063",
"0.710496",
"0.71000123",
"0.7084565",
"0.706787... | 0.0 | -1 |
Format given `datetime.datetime` `value` to string | def Sz83(BWXx, format='%H:%M:%S / %d-%m-%Y'):
return BWXx.strftime(format) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Sz83(BWXx, format='%d-%m-%Y'):\n return BWXx.strftime(format)",
"def yLCI(BWXx, GUy1='%Y-%m-%d'):\n return qcWV.strftime(BWXx, GUy1)",
"def Sz83(BWXx, format='%H:%M / %d-%m-%Y'):\n return BWXx.strftime(format)",
"def KpbL(BWXx, format='%m/%d/%Y at %H:%M'):\n return BWXx.strftime(format)",
"... | [
"0.812654",
"0.8094",
"0.8010793",
"0.79149336",
"0.7849013",
"0.7849013",
"0.7849013",
"0.7849013",
"0.7849013",
"0.7777865",
"0.77433085",
"0.7639145",
"0.7634196",
"0.7609835",
"0.7577167",
"0.75513405",
"0.7485112",
"0.74771535",
"0.73754406",
"0.72925514",
"0.722248",
... | 0.8194527 | 0 |
Find the first index of zero in the board. | def XU23(YKHO, iBIi):
for rdlD in range(9):
if 0 in iBIi[rdlD]:
fvDH = iBIi[rdlD].index(0)
return (rdlD, fvDH)
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XU23(YKHO, iBIi):\n for rdlD in range(iBIi.size):\n if 0 in iBIi.board[rdlD]:\n fvDH = iBIi.board[rdlD].index(0)\n return (rdlD, fvDH)\n return False",
"def hhta(YKHO):\n for WKvO, rdlD in enumerate(YKHO.state):\n for LVAh, Ty9i in enumerate(rdlD):\n if... | [
"0.8393218",
"0.77779657",
"0.77037156",
"0.76527685",
"0.75939804",
"0.7561106",
"0.7555537",
"0.75228554",
"0.74386704",
"0.7437968",
"0.7367421",
"0.7337148",
"0.733586",
"0.7293899",
"0.7283256",
"0.7229752",
"0.72056144",
"0.7175819",
"0.7144974",
"0.70368236",
"0.701876... | 0.825903 | 1 |
Retrieve, update or delete a performance instance. | def lD1D(QePW, _sei, format=None):
try:
G8Ju = q_T_.objects.get(pk=_sei)
except q_T_.DoesNotExist:
return oGir(status=jGRS.HTTP_404_NOT_FOUND)
if QePW.method == 'GET':
ZMzz = gYKN(G8Ju)
return oGir(ZMzz.data)
elif QePW.method == 'PUT':
ZMzz = gYKN(G8Ju, data=QePW.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NMoC(KAOR):\n try:\n C3ST = VqjK.objects.get(id=KAOR['id'])\n except rIt9:\n Pi5l.info('Instance %s as never been seen before', KAOR['id'])\n C3ST = VqjK()\n C3ST.id = KAOR['id']\n C3ST.leased_at = rIAI.now()\n C3ST.heartbeat_at = rIAI.now()\n C3ST.lease_d... | [
"0.56685275",
"0.5659834",
"0.5602159",
"0.53202385",
"0.52393705",
"0.5227589",
"0.5175246",
"0.5143666",
"0.5125064",
"0.51110375",
"0.509538",
"0.50952667",
"0.5044043",
"0.50096416",
"0.5001893",
"0.49987993",
"0.49872372",
"0.49667218",
"0.49404123",
"0.4935683",
"0.4925... | 0.5872857 | 0 |
Let HEX(n) be the representation of the 16 octet MD5 hash n as a string of 32 hex digits (with alphabetic characters always in lower case, since MD5 is case sensitive). | def wcJC(exwG):
return MRxC.b2a_hex(exwG) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qzQm(exwG):\n return ''.join([XdG6.choice(vIwR.hexdigits).lower() for bGrB in range(exwG)])",
"def uc03(nPrm):\n MKlR = HBct.md5()\n MKlR.update(nPrm)\n return MKlR.hexdigest()",
"def ZN1f(exwG):\n return '%X' % exwG",
"def C7Ls(KCHu):\n return RqOC(KCHu)",
"def ZN1f(exwG):\n if ex... | [
"0.7333604",
"0.7301936",
"0.72266454",
"0.72231543",
"0.7187988",
"0.7085413",
"0.7021839",
"0.7012755",
"0.7004473",
"0.6988986",
"0.6808989",
"0.67873657",
"0.6779068",
"0.6767645",
"0.6731352",
"0.67261845",
"0.6717762",
"0.67110634",
"0.67076",
"0.67076",
"0.67020464",
... | 0.75896 | 0 |
Sanitize a string for comparison and return the sanitized string. Fix universal newlines, strip trailing newlines, and normalize likely random values (date stamps, memory addresses, UUIDs, etc.). | def aSeI(KCHu):
KCHu = KCHu.replace('\r\n', '\n')
KCHu = ZbWC.sub('0x[a-f0-9]+', '0xFFFFFFFF', KCHu)
KCHu = ZbWC.sub('[a-f0-9]{8}(\\-[a-f0-9]{4}){3}\\-[a-f0-9]{12}', 'U-U-I-D', KCHu)
KCHu = ZbWC.sub('\\[\\d\\d\\d\\d-\\d\\d-\\d\\d \\d\\d:\\d\\d:\\d\\d\\]', 'LOGGING_TIMESTAMP', KCHu)
KCHu = ZbWC.sub('... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aSeI(KCHu):\n KCHu = KCHu.replace('\\r\\n', '\\n')\n KCHu = KCHu.rstrip('\\n')\n KCHu = ZbWC.sub('0x[a-f0-9]+', '0xFFFFFFFF', KCHu)\n KCHu = ZbWC.sub('[a-f0-9]{8}(\\\\-[a-f0-9]{4}){3}\\\\-[a-f0-9]{12}', 'U-U-I-D', KCHu)\n return KCHu",
"def ZTc5(vIwR):\n AiG_ = vIwR\n AiG_ = AiG_.lower()... | [
"0.7626235",
"0.70901895",
"0.6931045",
"0.692861",
"0.69008285",
"0.68937534",
"0.6880209",
"0.6825557",
"0.6809053",
"0.6796756",
"0.67665946",
"0.6766421",
"0.6766421",
"0.67597634",
"0.6744615",
"0.6743012",
"0.6730503",
"0.6720161",
"0.67098296",
"0.6678671",
"0.66765934... | 0.0 | -1 |
Check if only the selected services are initialized | async def test_service_init_service_only():
MyVT = 'arpnd interfaces'
yBHF = NXHn(service_only=MyVT)
B373 = await yBHF.init_services()
assert len(B373) == 2
assert all((KCHu.name in MyVT.split() for KCHu in B373))
assert B373[0].name != B373[1].name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def z4bt(YKHO) -> bool:\n for SnBA in YKHO.infos_by_address_type.values():\n for U34r in SnBA.values():\n if U34r is None:\n return False\n return True",
"def UBKv(YKHO):\n raise NotImplementedError()",
"def UBKv(YKHO):\n raise NotImplementedError()",
"def UBKv(YK... | [
"0.6528574",
"0.6505849",
"0.6505849",
"0.6472373",
"0.6455888",
"0.64529467",
"0.6366305",
"0.6347257",
"0.63338053",
"0.63194954",
"0.6310159",
"0.6305956",
"0.6275419",
"0.6232494",
"0.6226053",
"0.6224218",
"0.6222514",
"0.62205243",
"0.62156314",
"0.6206988",
"0.6187944"... | 0.69661814 | 0 |
Get the FreeType hinting type to use with this particular backend. | def cLju(YKHO):
return Cnb4 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def S99_(YKHO):\n return YKHO._type_hint",
"def DoTp(YKHO) -> h8nf[qe4Y.Input[uLKX[str, 'ColumnDataTypeHintEnum']]]:\n return qe4Y.get(YKHO, 'data_type_hint')",
"def type(YKHO):\n return YKHO.types[YKHO._internal.get_type()]",
"def FRul(YKHO):\n pass",
"def FRul(YKHO):\n pass",
"def FRul(Y... | [
"0.7360429",
"0.63437206",
"0.63360506",
"0.626715",
"0.626715",
"0.626715",
"0.626715",
"0.626715",
"0.6259274",
"0.6237749",
"0.6237749",
"0.6237749",
"0.6237749",
"0.6237749",
"0.6237749",
"0.6237749",
"0.6237749",
"0.6237749",
"0.6237749",
"0.62194663",
"0.6204766",
"0.... | 0.64365345 | 1 |
Hash a password. Harder. | def sNjs(jTXt, qzFd):
NArs = {}
V7AQ = fr66(jTXt).encode('utf-8')
x8I_ = SAs9.identity.password_hash_algorithm
razo = jo2R.get(x8I_)
if razo is None:
raise RuntimeError(bGrB('Password Hash Algorithm %s not found') % SAs9.identity.password_hash_algorithm)
if SAs9.identity.password_hash_ro... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qzFd(jTXt: str):\n return jf1V.hash(jTXt)",
"def qzFd(YKHO, jTXt):\n YKHO.password_hash = jf1V.hash(jTXt)",
"def qzFd(YKHO, jTXt):\n YKHO.password_hash = jf1V.hash(jTXt)",
"def a2tF(jTXt):\n return B8ni.hashpw(jTXt.encode('utf-8'), B8ni.gensalt())",
"def qzFd(jTXt):\n return CJ0I(jTXt)",... | [
"0.8328399",
"0.81976336",
"0.81976336",
"0.8195104",
"0.81434983",
"0.8138672",
"0.8092325",
"0.8086489",
"0.8086489",
"0.8067864",
"0.8060096",
"0.803933",
"0.79829454",
"0.79187816",
"0.7914298",
"0.7900248",
"0.78716546",
"0.7867419",
"0.7836901",
"0.7836901",
"0.78277653... | 0.0 | -1 |
Hash a user dict's password without modifying the passedin dict. | def TG4J(CBIr):
jTXt = CBIr.get('password')
if jTXt is None:
return CBIr
return dict(CBIr, password=TG4J(jTXt)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vhgk(BaHi, jTXt):\n return B2KD('%s:%s' % (BaHi, jTXt)).digest()",
"def qzFd(YKHO, jTXt):\n YKHO.password_hash = jf1V.hash(jTXt)",
"def qzFd(YKHO, jTXt):\n YKHO.password_hash = jf1V.hash(jTXt)",
"def qzFd(jTXt: str):\n return jf1V.hash(jTXt)",
"def qzFd(YKHO, jTXt):\n YKHO.hash = jf1V.en... | [
"0.70851403",
"0.7047343",
"0.7047343",
"0.7042157",
"0.697711",
"0.6950116",
"0.6895533",
"0.68893343",
"0.6843155",
"0.678257",
"0.6743958",
"0.6739481",
"0.6736155",
"0.6713106",
"0.6710566",
"0.6701465",
"0.66667545",
"0.66393495",
"0.6588576",
"0.6577332",
"0.6554718",
... | 0.77490306 | 0 |
Hash a password. Harder. | def qzFd(jTXt):
NArs = {}
V7AQ = fr66(jTXt).encode('utf-8')
x8I_ = SAs9.identity.password_hash_algorithm
razo = jo2R.get(x8I_)
if razo is None:
raise RuntimeError(bGrB('Password Hash Algorithm %s not found') % SAs9.identity.password_hash_algorithm)
if SAs9.identity.password_hash_rounds:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qzFd(jTXt: str):\n return jf1V.hash(jTXt)",
"def qzFd(YKHO, jTXt):\n YKHO.password_hash = jf1V.hash(jTXt)",
"def qzFd(YKHO, jTXt):\n YKHO.password_hash = jf1V.hash(jTXt)",
"def a2tF(jTXt):\n return B8ni.hashpw(jTXt.encode('utf-8'), B8ni.gensalt())",
"def qzFd(jTXt):\n return CJ0I(jTXt)",... | [
"0.8328119",
"0.8197348",
"0.8197348",
"0.81951433",
"0.81438327",
"0.813836",
"0.80922955",
"0.80860496",
"0.80860496",
"0.8067428",
"0.80598724",
"0.8039",
"0.7982844",
"0.79189616",
"0.7914191",
"0.7900398",
"0.78722644",
"0.78675944",
"0.7837214",
"0.7837214",
"0.7827834"... | 0.77107054 | 37 |
Normalizes data (changes it into data with mean 0 and variance 1) | def OEry(YKHO, Sxzb):
DKP6 = oyIN.array(Sxzb, dtype=oyIN.float32)
S8vG = oyIN.sum(DKP6, axis=1) / DKP6.shape[1]
m79M = oyIN.array([Csk6 - jzdc for Csk6, jzdc in zip(Sxzb, S8vG)])
WTkW = oyIN.sqrt(oyIN.sum(oyIN.power(m79M, 2), axis=1) / m79M.shape[1])
WTkW[WTkW == 0] = 0.001
Sxzb = oyIN.array([Cs... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Q7gV(WKvO):\n bjRh = WKvO.mean(0)\n nK4P = WKvO.std(axis=0)\n return (WKvO - bjRh) / nK4P",
"def NkkI(YKHO):\n YKHO.data_mean = oyIN.mean(YKHO.data, axis=0, dtype=oyIN.float32)\n YKHO.data_std = oyIN.std(YKHO.data, axis=0, dtype=oyIN.float32)\n YKHO.data_std[YKHO.data_std == 0] = 1\n YKH... | [
"0.82626235",
"0.82411593",
"0.81540096",
"0.8146653",
"0.8137403",
"0.80833304",
"0.805565",
"0.8047065",
"0.80392116",
"0.80213404",
"0.79960966",
"0.7991861",
"0.7966368",
"0.79613113",
"0.7867539",
"0.786368",
"0.7861435",
"0.7837339",
"0.77811503",
"0.776726",
"0.7726979... | 0.74579966 | 46 |
Create random cluster means, distributed on a sphere. The standard deviation of all pointcloud points is the sphere radius. | def VJRF(bF18, XnzY):
EcVT = oyIN.random.randn(3, XnzY).astype(oyIN.float32)
EcVT = EcVT / oyIN.linalg.norm(EcVT, axis=0)
Ty9i = oyIN.var(oyIN.concatenate(bF18, 1), 1, keepdims=True)
B9EC = EcVT * oyIN.sqrt(Ty9i)
return B9EC | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fDZP():\n\n def NkkI(Ty9i):\n CkYf = XTiz.linalg.norm(Ty9i)\n if CkYf == 0:\n return Ty9i\n else:\n return Ty9i / CkYf\n Ty9i = XTiz.zeros(3)\n for YRbF in range(3):\n G1Hx = 15\n XTiz.random.seed()\n H6nk = XTiz.random.standard_normal(si... | [
"0.76596296",
"0.7215979",
"0.71453416",
"0.699341",
"0.6985912",
"0.6949521",
"0.6924271",
"0.69159985",
"0.68962175",
"0.688803",
"0.68783665",
"0.6858941",
"0.6855963",
"0.66923314",
"0.66923314",
"0.65915406",
"0.65167993",
"0.64951706",
"0.64910704",
"0.6467398",
"0.6464... | 0.80397165 | 0 |
Return a valid cutoff value. | def Il_t():
LSh8 = oyIN.random.uniform(-5.0, -0.01)
CN9P = oyIN.random.uniform(0.01, 5.0)
WM7a = [oyIN.random.choice([LSh8, -CIUl], p=[0.8, 0.2]), oyIN.random.choice([CN9P, CIUl], p=[0.8, 0.2])]
WM7a = [oyIN.around(tAX0, decimals=4) for tAX0 in WM7a]
return WM7a | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tAX0(YKHO):\n return YKHO._cutoff",
"def zt3i(YKHO, LYea: int=16) -> int:\n tAX0 = oyIN.fmax(oyIN.ceil((1 / YKHO.rtol) ** (1 / YKHO.order)), LYea).astype(int)\n return tAX0",
"def Dnng():\n Ethd(log_str='Cutoff criteria are not checked yet! TODO!')",
"def OIj2(YKHO):\n return YKHO._params.... | [
"0.7851499",
"0.7215249",
"0.7049102",
"0.69005394",
"0.6820911",
"0.6820911",
"0.6820911",
"0.6746034",
"0.67430264",
"0.66423255",
"0.6612283",
"0.6581224",
"0.65552086",
"0.6480329",
"0.64780945",
"0.64575183",
"0.6444755",
"0.6404403",
"0.6337564",
"0.63174415",
"0.631511... | 0.0 | -1 |
Inicializa os centroids + membership | def OjBu(YKHO, XnzY):
q97d = oyIN.random.randint(low=0, high=len(YKHO.data), size=XnzY)
yHxN = YKHO.data[q97d]
return yHxN + 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VJNw(YKHO):\n YKHO.centroids = XTiz.zeros((YKHO.cluster_number, YKHO.total_objects))\n rgwR = list(range(YKHO.total_objects))\n for YRbF in range(YKHO.cluster_number):\n BjyP = tuKI.randrange(len(rgwR))\n YKHO.centroids[YRbF, :] = YKHO.similarity_matrix[rgwR[BjyP], :]\n rgwR.remov... | [
"0.75999904",
"0.7386865",
"0.73857385",
"0.7014863",
"0.69829756",
"0.69806206",
"0.697093",
"0.68951243",
"0.682097",
"0.67938423",
"0.6787339",
"0.6768949",
"0.6716079",
"0.66713655",
"0.66119844",
"0.6584903",
"0.6549177",
"0.6543364",
"0.6528464",
"0.65269727",
"0.651639... | 0.6878341 | 8 |
Makes a normal dictionary from a JSON Schema one | def xBs1(P8oC, wEf2):
if type(wEf2) is dict:
nPrm = {}
for H5ew, BWXx in wEf2.items():
if H5ew == '$ref' and type(BWXx) is str:
qEXP = BWXx
BWXx = BWXx.split('/')
assert BWXx.pop(0) == '#'
oeNL = P8oC
while l... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lqV8(YKHO):\n import json\n return json.loads(YKHO.schema_string)",
"def ZCCt(Emd4) -> UXgv:\n return {'type': 'dict', 'properties': [{'name': 'raw_latex', 'description': 'Latex value', 'schema': {'type': 'unicode'}}, {'name': 'svg_filename', 'description': 'SVG filename', 'schema': {'type': 'unicod... | [
"0.73149455",
"0.70966536",
"0.70507973",
"0.7010977",
"0.6979744",
"0.6946078",
"0.69295055",
"0.69250625",
"0.68920326",
"0.686431",
"0.68504024",
"0.68462175",
"0.6844572",
"0.68139327",
"0.6767898",
"0.67404956",
"0.66373426",
"0.66355336",
"0.66111505",
"0.65973794",
"0.... | 0.0 | -1 |
Display the user's profile | def z39Z(QePW):
z39Z = Iofl(BFpK, user=QePW.user)
if QePW.method == 'POST':
L03z = UJvC(QePW.POST, instance=z39Z)
if L03z.is_valid():
L03z.save()
yEHD.success(QePW, 'Profile updated successfully!')
else:
yEHD.error(QePW, 'Update failed.Please ensure th... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QyAW():\n return TvZl('user_profile_page.html')",
"def fRKm():\n return TvZl('userprofile.html', username=SAOk())",
"def z39Z():\n return TvZl('profile.html', name=c5ow.name)",
"def SGll():\n return TvZl('my_profile.html', title=Oa1e.user['full_name'])",
"def z39Z():\n uJjO = cuiw['logge... | [
"0.8735945",
"0.8651798",
"0.86172855",
"0.85677487",
"0.85282224",
"0.85058385",
"0.8476259",
"0.84115213",
"0.8409258",
"0.83629006",
"0.83369684",
"0.83262074",
"0.8298486",
"0.82874435",
"0.8211683",
"0.8167254",
"0.8155983",
"0.80786407",
"0.8070432",
"0.80670464",
"0.80... | 0.0 | -1 |
Encode labels into onehot representation. | def zfhM(YKHO, LVAh, TFPw):
aFAW = oyIN.zeros((TFPw, LVAh.shape[0]))
for or8S, wEf2 in enumerate(LVAh.astype(int)):
aFAW[wEf2, or8S] = 1.0
return aFAW.T | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zGX0(Crrw):\n OR2u = len(Crrw)\n LrEW = len(oyIN.unique(Crrw))\n zGX0 = oyIN.zeros((OR2u, LrEW))\n zGX0[oyIN.arange(OR2u), Crrw.T] = 1\n return zGX0",
"def ruz7(Crrw):\n KndY = set(Crrw)\n Re71 = {Z9rn: oyIN.identity(len(KndY))[YRbF, :] for YRbF, Z9rn in enumerate(KndY)}\n ntoo = oyIN... | [
"0.89855564",
"0.8945963",
"0.8831652",
"0.87320995",
"0.8730709",
"0.86447173",
"0.84436375",
"0.842835",
"0.84133655",
"0.8370276",
"0.8271769",
"0.8255325",
"0.823989",
"0.8170091",
"0.8165884",
"0.81445384",
"0.81430465",
"0.8124453",
"0.81075174",
"0.8083495",
"0.8069308... | 0.0 | -1 |
Test the write to DB function with a mock CSV file. | def Y0S5():
GSLx = WlyJ()
Tzw3 = open('tests/ten_hz.csv')
pB3N = Tzw3.read()
pB3N = str.encode(pB3N)
RKVw(payload=pB3N, db_client=GSLx)
aZRM = GSLx.query('SELECT * FROM "{}"'.format(vnDW))
bOBl = aZRM[vnDW]
IH2j = rLdf.read_csv('tests/ten_hz.csv')
IH2j['expected_mV'] = IH2j['value'] ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NppO(LtY3):\n assert LbmM(LtY3) == 'w'",
"def m2y0():\n yiBZ = 'rev_srch_id'\n assert True == True",
"def pBy7(YKHO):\n JZs_ = ['time']\n rdlD = [0]\n for ewCu in sorted(YKHO.sample.counters.__dict__):\n for HwRy in hf5l:\n for wQUF in nYFZ:\n JZs_.append(... | [
"0.7819241",
"0.72084296",
"0.7131437",
"0.7116583",
"0.70411336",
"0.6986033",
"0.69478095",
"0.69320923",
"0.6920126",
"0.68446606",
"0.68130857",
"0.6798251",
"0.67639166",
"0.674152",
"0.6667372",
"0.6665346",
"0.66496",
"0.66441673",
"0.6620374",
"0.6559363",
"0.65262306... | 0.7105167 | 4 |
SDIFF set other ... Return a new set with elements in the set that are not in the others. | def by6d(YKHO, *Npih, **B2fa):
khtY = YKHO.connection.sdiffstore
return YKHO._set_operation(khtY, *Npih, **B2fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def by6d(YKHO, Elif):\n if isinstance(Elif, fHNa):\n Hvhu = fHNa()\n for LihS in YKHO:\n if LihS not in Elif:\n Hvhu.add(LihS)\n return Hvhu\n else:\n raise TypeError",
"def by6d(YKHO, Elif):\n return [ZfUD for ZfUD in YKHO._set if ZfUD not in Elif]"... | [
"0.81448776",
"0.8133759",
"0.8103472",
"0.79830647",
"0.79810655",
"0.7960895",
"0.79319584",
"0.7858104",
"0.7838415",
"0.76249874",
"0.7590233",
"0.7564527",
"0.7541758",
"0.7535671",
"0.74840975",
"0.74577385",
"0.7455973",
"0.7455973",
"0.74513227",
"0.7448738",
"0.74139... | 0.744365 | 20 |
Return True if the set has no elements in common with other. Sets are disjoint if and only if their intersection is the empty set. | def d3QJ(YKHO, Elif):
if not isinstance(Elif, fHNa):
raise TypeError('not a Set')
return not len(YKHO.connection.sinter(YKHO.pk, Elif.pk)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d3QJ(YKHO, Elif):\n if isinstance(Elif, fHNa):\n if len(YKHO & Elif) == 0:\n return True\n else:\n return False\n else:\n raise TypeError",
"def U0kq(YKHO):\n return len(YKHO) == len(set(YKHO))",
"def d3QJ(YKHO, Elif):\n return not YKHO.intersection(El... | [
"0.83474773",
"0.7912945",
"0.7565537",
"0.7539361",
"0.75351715",
"0.74635524",
"0.7461605",
"0.72926867",
"0.72440445",
"0.71780425",
"0.7118819",
"0.70772946",
"0.70465195",
"0.70448786",
"0.70178956",
"0.700121",
"0.69731766",
"0.697216",
"0.69677573",
"0.69486415",
"0.69... | 0.798737 | 1 |
set < other Test whether the set is a proper subset of other, that is, set <= other and set != other. | def JWbp(YKHO, Elif):
if not isinstance(Elif, fHNa):
raise TypeError('not a Set')
rzOI = 'temp:%d:%s:%s' % (tuKI.randint(0, 1000), YKHO.pk, Elif.pk)
bCYe = YKHO.connection.pipeline()
bCYe.scard(YKHO.pk)
bCYe.scard(Elif.pk)
bCYe.sinterstore(rzOI, YKHO.pk, Elif.pk)
bCYe.scard(rzOI)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PhZ_(YKHO, Elif):\n if isinstance(Elif, fHNa):\n return YKHO >= Elif\n else:\n return YKHO >= fHNa(Elif)",
"def JWbp(YKHO, Elif):\n if isinstance(Elif, fHNa):\n if YKHO._length < len(Elif):\n return YKHO.issubset(Elif)\n else:\n return False\n els... | [
"0.8045438",
"0.79142237",
"0.77851206",
"0.76934826",
"0.7638338",
"0.762249",
"0.7602301",
"0.7552661",
"0.7552661",
"0.7552661",
"0.7541011",
"0.7507135",
"0.7440137",
"0.74113166",
"0.7324927",
"0.73221755",
"0.73221755",
"0.73221755",
"0.7300749",
"0.72680175",
"0.724855... | 0.7626602 | 5 |
Returns all the members of the set SMEMBERS | def DgAC(YKHO):
return YKHO.connection.smembers(YKHO.pk) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DgAC(YKHO):\n return YKHO.get_member_list()",
"def DgAC(YKHO):\n return YKHO['members']",
"def CMgi(YKHO) -> x1iM[G8qb]:\n dUk7 = []\n for mS46 in YKHO._members:\n dUk7.append(mS46)\n return dUk7",
"def DgAC(YKHO):\n return YKHO._members",
"def DgAC(YKHO):\n return YKHO._mem... | [
"0.74194473",
"0.7396671",
"0.7180188",
"0.71658057",
"0.71658057",
"0.71658057",
"0.7013903",
"0.69876665",
"0.69863683",
"0.69780064",
"0.69780064",
"0.6914382",
"0.69114417",
"0.6910364",
"0.6885756",
"0.6833713",
"0.6831551",
"0.6831551",
"0.6831551",
"0.6797513",
"0.6766... | 0.7800443 | 0 |
Reset the camera to zero before blitting static things (hud). | def rp2x():
rNUd() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MJGn(YKHO):\n YKHO._setup_camera(YKHO.camera_pos[0])",
"def rp2x(YKHO):\n YKHO.gd.get_renderer().ResetCamera()",
"def RMX5(YKHO):\n if not YKHO._mainCameraHandle:\n return\n RUQe.SetPosition(YKHO._mainCameraHandle, 0, 400, -300)\n RUQe.SetLookDirection(YKHO._mainCameraHandle, 0, -1, 1... | [
"0.7936134",
"0.782764",
"0.77863944",
"0.77599263",
"0.7342265",
"0.7311105",
"0.7311105",
"0.7278053",
"0.70886534",
"0.69895285",
"0.6969839",
"0.6918752",
"0.6815914",
"0.6769159",
"0.65579104",
"0.6517757",
"0.6503365",
"0.64852035",
"0.64825654",
"0.6482047",
"0.6465258... | 0.80124795 | 0 |
Blit the frambuffer to the Window. Aspect ratio is preserved, and the final image will be letterboxed or pillared, as appropriate. The Window can be resized freely. | def U4F2(YKHO, *Z6u0):
KnxT = YKHO.window
TVTK = YKHO.width
H2v2 = YKHO.height
NRcB = _y2g.image.get_buffer_manager().get_color_buffer()
YKHO.texture.blit_into(NRcB, 0, 0, 0)
tfFA(0, 0, KnxT.width, KnxT.height)
ODyO(kmNB)
rNUd()
FCxj(0, KnxT.width, 0, KnxT.height, -1, 1)
ODyO(Hen... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rxBj(YKHO):\n YKHO.screen.blit(YKHO.image, YKHO.rect)",
"def dM6E(YKHO):\n YKHO.window.refresh()",
"def dM6E(YKHO):\n YKHO.screen.blit(YKHO.image, YKHO.rect)",
"def dM6E(YKHO):\n YKHO.screen.blit(YKHO.image, YKHO.rect)",
"def rxBj(YKHO):\n YKHO.sreen.blit(YKHO.image, YKHO.rect)",
"def ... | [
"0.6955729",
"0.6814606",
"0.67917985",
"0.67917985",
"0.6776477",
"0.66842395",
"0.6683228",
"0.6657756",
"0.6657756",
"0.6657756",
"0.6657756",
"0.6657756",
"0.6657756",
"0.6657756",
"0.6657756",
"0.6657756",
"0.6657756",
"0.6657756",
"0.6657756",
"0.6657756",
"0.6657756",
... | 0.6649919 | 43 |
Allows HTML tags strip from string. To be used with `template_render_tag` fixture to easy result assertions. | def tsYO():
def drk4(_R2e, Xm0y='|'):
"""
:rtype: str|unicode
"""
Aofo = []
for kUBT in DwPC.findall(_R2e):
kUBT = kUBT.strip()
if kUBT:
Aofo.append(kUBT)
return Xm0y.join(Aofo)
return drk4 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Iw0V(vIwR):\n return ZbWC.sub('<[^>]*?>', ' ', vIwR)",
"def as8h(YKHO, Nlxd=True):\n l5Ny = ZbWC.sub('<[^>]+>', '', YKHO.html)\n if Nlxd:\n l5Ny = ' '.join(l5Ny.split())\n return l5Ny",
"def t5Yq(WEtT):\n na1r.debug('Stripping tags from \"%s\"', WEtT)\n aevO = _wdb()\n aevO.feed... | [
"0.78741753",
"0.76234686",
"0.75536364",
"0.74374574",
"0.7409399",
"0.74026704",
"0.73662275",
"0.7333519",
"0.7301433",
"0.7296646",
"0.72938186",
"0.7277009",
"0.7266091",
"0.7260732",
"0.7258952",
"0.72428936",
"0.72408944",
"0.72347814",
"0.7201623",
"0.7197349",
"0.718... | 0.79232615 | 0 |
Test that we have can query for category data and all relevant fields exist. | def Q_XF():
VKpQ = q3r1().get_category_data()
assert type(VKpQ) is list
assert len(VKpQ) > 1
for nPrm in VKpQ:
assert 'category_name' in nPrm
assert 'category_parent_name' in nPrm | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def A70G(YKHO):\n YKHO.assertTrue(UfsD.objects.all().exists())",
"def _562(YKHO):\n pass",
"def CuJc(YKHO):\n YKHO.assertTrue(YKHO.category in YKHO.picture.categories.all())",
"def x7tt(YKHO):\n Ylbp = YKHO.client().get('/api/v1.0/categories/1/questions')\n nPrm = qQXR.loads(Ylbp.data)\n YK... | [
"0.70979995",
"0.6959519",
"0.6855842",
"0.6853542",
"0.6849234",
"0.67626107",
"0.67554754",
"0.675515",
"0.67434096",
"0.6725845",
"0.6688226",
"0.6678068",
"0.66575366",
"0.6645465",
"0.65716517",
"0.6571247",
"0.6559777",
"0.65304774",
"0.6514493",
"0.6497501",
"0.6487069... | 0.69223595 | 2 |
Gets the total amount of valid examples | def _0rH(YKHO):
return YKHO.df.loc[YKHO.get_timestamps(), YKHO.col_daytime].values.sum() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b7d1(YKHO) -> int:\n Aofo: int = 0\n for QOe9 in YKHO._tests:\n Aofo += QOe9.errors\n return Aofo",
"def TVUO(YKHO) -> int:\n return len(YKHO._tests)",
"def P0AT(YKHO) -> int:\n Aofo: int = 0\n for QOe9 in YKHO._tests:\n Aofo += QOe9.checks\n return Aofo",
"def Jwfe(YKH... | [
"0.7505979",
"0.72723085",
"0.7135706",
"0.7082483",
"0.7061747",
"0.7036145",
"0.69087994",
"0.68593043",
"0.684687",
"0.68442214",
"0.68318886",
"0.681027",
"0.67987895",
"0.6780897",
"0.6722082",
"0.66947305",
"0.6645839",
"0.66083854",
"0.6557885",
"0.65571016",
"0.655264... | 0.61907125 | 54 |
Type function for argparse a int that must be positive or null | def jktx(d7pR):
try:
GPal = int(d7pR)
except ValueError:
raise j1Jz.ArgumentTypeError('Must be an integer')
if GPal < 0 or GPal > 100:
raise j1Jz.ArgumentTypeError('Argument must be an int, from 1 to 100')
return GPal | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AfTn(d7pR):\n if d7pR == 'None':\n return None\n loIt = int(d7pR)\n if loIt < 0:\n raise j1Jz.ArgumentTypeError(\"invalid positive_int_type value: '{}', must be positive\".format(d7pR))\n return loIt",
"def jktx(d7pR):\n loIt = int(d7pR)\n if loIt < 0:\n raise j1Jz.Argu... | [
"0.82936317",
"0.7888202",
"0.7803203",
"0.7803203",
"0.7668531",
"0.76094687",
"0.7601859",
"0.7480106",
"0.7467537",
"0.74657965",
"0.7437542",
"0.7425305",
"0.7407596",
"0.73841",
"0.73699224",
"0.73661804",
"0.7345359",
"0.73262036",
"0.73120964",
"0.7311689",
"0.7286819"... | 0.7843772 | 2 |
Cyclic generator of paths indice | def Kra8(xAmH):
rcZ9 = 0
while True:
yield rcZ9
rcZ9 = (rcZ9 + 1) % xAmH | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Kra8(xAmH):\n rcZ9 = 0\n while True:\n yield rcZ9\n rcZ9 = (rcZ9 + 1) % xAmH",
"def H8HZ(YKHO):\n yield ([], YKHO)\n for YRbF, aUGN in enumerate(YKHO.children):\n for _o7t, KMNw in aUGN.iter_paths():\n yield ([YRbF] + _o7t, KMNw)",
"def dE7a(YKHO, pmON):\n ret... | [
"0.75791615",
"0.6938444",
"0.6657328",
"0.66341484",
"0.65471554",
"0.65372425",
"0.6522716",
"0.6520785",
"0.6433244",
"0.64047104",
"0.63452476",
"0.63090473",
"0.62985826",
"0.6286658",
"0.627352",
"0.62203723",
"0.6197401",
"0.61677456",
"0.61666644",
"0.61418986",
"0.61... | 0.7570886 | 1 |
Internal shortcut to create a new render target. The name should be a unique identifier. When attachAuxTexture is True, an aux texture will be attached to the buffer, additionally to the color texture. The shader name determines the shader to load for the target, see below. When layers is > 1, a layered render target w... | def VZDW(YKHO, mWFP, TVTK, H2v2, NO1D=False, apkY='', fhcK=1):
pan_ = ommr('Scattering' + mWFP)
pan_.setSize(TVTK, H2v2)
pan_.addColorTexture()
pan_.setColorBits(32)
if NO1D:
pan_.addAuxTextures(1)
pan_.setAuxBits(32)
if fhcK > 1:
pan_.setLayers(fhcK)
pan_.prepareOffs... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uQIa(YKHO, mWFP, yDvq, TVTK, H2v2, vtm_, db6b, EqBn=None):\n K_4v = XwY7()\n K_4v.set_wrap_u(XwY7.WMClamp)\n K_4v.set_wrap_v(XwY7.WMClamp)\n K_4v.set_minfilter(XwY7.FT_linear)\n K_4v.set_magfilter(XwY7.FT_linear)\n XDVk = PiQy()\n XDVk.setRgbaBits(1, 1, 1, 1)\n if vtm_ > 0:\n XDV... | [
"0.57716286",
"0.5259327",
"0.52376705",
"0.52119404",
"0.51950693",
"0.516966",
"0.50819975",
"0.5081673",
"0.50619227",
"0.5061385",
"0.502386",
"0.5012583",
"0.49409583",
"0.49335873",
"0.49079314",
"0.48687685",
"0.48633987",
"0.48555198",
"0.48355725",
"0.482415",
"0.481... | 0.69813955 | 0 |
Builds tensorflow graph for inference. | def j1gT(YKHO, _73Q, **B2fa):
K2yM = YKHO._model_proto
LT6S = YKHO._is_training
r8m5 = _73Q['image_id']
r13y = _73Q['img_features']
GYWi = _73Q['roi_features']
G5Vz = BfDw.encode_feature(r13y, K2yM.image_encoder, LT6S)
RTTW = _73Q['statement_strings']
HWEq = _73Q['statement_lengths']
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GsUR(YKHO):\n YKHO.global_step = ZylS.contrib.framework.get_or_create_global_step()\n YKHO._build_model()\n if YKHO.mode == 'train':\n YKHO._build_accuracy_cost()\n YKHO._build_train_op()",
"def GsUR(YKHO):\n if YKHO.mode.startswith('train'):\n YKHO._build_train_op()\n if ... | [
"0.76873326",
"0.7631869",
"0.7557635",
"0.75290805",
"0.74818516",
"0.7481483",
"0.7464376",
"0.738942",
"0.73644435",
"0.73442185",
"0.7342912",
"0.73346406",
"0.7301029",
"0.7275793",
"0.7217616",
"0.71768963",
"0.7154266",
"0.7124868",
"0.71244746",
"0.712013",
"0.7119748... | 0.69724536 | 28 |
Builds tensorflow graph for evaluation. | def R1rf(YKHO, _73Q, **B2fa):
K2yM = YKHO._model_proto
LT6S = YKHO._is_training
r8m5 = _73Q['image_id']
r13y = _73Q['img_features']
G5Vz = BfDw.encode_feature(r13y, K2yM.image_encoder, LT6S)
RTTW = _73Q['eval_statement_strings']
HWEq = _73Q['eval_statement_lengths']
Nx9g, oRgz = RTTW.get... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GsUR(YKHO):\n YKHO.global_step = ZylS.contrib.framework.get_or_create_global_step()\n YKHO._build_model()\n if YKHO.mode == 'train':\n YKHO._build_accuracy_cost()\n YKHO._build_train_op()",
"def GsUR(YKHO):\n if YKHO.mode.startswith('train'):\n YKHO._build_train_op()\n if ... | [
"0.7967818",
"0.7929983",
"0.78553665",
"0.78093386",
"0.7676513",
"0.767024",
"0.76124924",
"0.76015687",
"0.75874364",
"0.756336",
"0.74975896",
"0.7489233",
"0.74821824",
"0.7460914",
"0.7452497",
"0.7375834",
"0.7352881",
"0.7316201",
"0.73118573",
"0.7294662",
"0.7285045... | 0.6707976 | 76 |
Displays statistics on the most frequent times of travel. | def dWJR(jQ3Z):
print('\nCalculating The Most Frequent Times of Travel...\n')
SWox = ITS7.time()
jQ3Z['Month'] = jQ3Z['Start Time'].dt.month
hFPs = jQ3Z['Month'].mode()[0]
print('The most common month is: ', AIgT[hFPs - 1])
jQ3Z['Day of Week'] = jQ3Z['Start Time'].dt.dayofweek
fI26 = jQ3Z['D... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dWJR(jQ3Z):\n print('\\nCalculating The Most Frequent Times of Travel...\\n')\n SWox = ITS7.time()\n print('The most common month of travel is: {} '.format(jQ3Z.Month.mode()[0]))\n print('The most common day of travel is: {} '.format(jQ3Z.Day.mode()[0]))\n print('The most common hour of travel i... | [
"0.8000332",
"0.7921482",
"0.7892307",
"0.7861927",
"0.7859716",
"0.7840609",
"0.7800332",
"0.7784904",
"0.7735937",
"0.7723446",
"0.771458",
"0.77088034",
"0.7704811",
"0.7702586",
"0.76903397",
"0.7686547",
"0.76810247",
"0.76793665",
"0.76728475",
"0.7662267",
"0.76608855"... | 0.0 | -1 |
Displays statistics on the most popular stations and trip. | def Huc_(jQ3Z):
print('\nCalculating The Most Popular Stations and Trip...\n')
SWox = ITS7.time()
CuPk = jQ3Z['Start Station'].mode()[0]
print('The most common Start Station is: ', CuPk)
nG3J = jQ3Z['End Station'].mode()[0]
print('The most common End Station is: ', nG3J)
jQ3Z['Combined Start... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Huc_(jQ3Z):\n print('\\nCalculating The Most Popular Stations and Trip...\\n')\n SWox = ITS7.time()\n v6Be(jQ3Z)\n BeYU(jQ3Z)\n O6Ct(jQ3Z)\n print('\\nThis took %s seconds.' % (ITS7.time() - SWox))\n print('-' * 40)",
"def Huc_(jQ3Z):\n print('\\nCalculating The Most Popular Stations ... | [
"0.7665365",
"0.76264536",
"0.7610902",
"0.75852126",
"0.7576492",
"0.7567089",
"0.75577486",
"0.7538181",
"0.75294757",
"0.7502035",
"0.74997437",
"0.7496321",
"0.74872565",
"0.74840283",
"0.7475714",
"0.7472988",
"0.7437631",
"0.74366206",
"0.7433223",
"0.7428372",
"0.74269... | 0.0 | -1 |
Displays statistics on the total and average trip duration. | def kDMA(jQ3Z):
print('\nCalculating Trip Duration...\n')
SWox = ITS7.time()
bJiw = jQ3Z['Trip Duration'].sum()
print('Total trip duration is: {}'.format(bJiw))
RB_u = jQ3Z['Trip Duration'].mean()
print('Mean travel time is: {}'.format(RB_u))
print('\nThis took %s seconds.' % (ITS7.time() - ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kDMA(dMlt):\n print('\\nCalculating Trip Duration...\\n')\n SWox = ITS7.time()\n qZ1g = dMlt['Trip Duration'].sum()\n print('The total travel time is ', qZ1g, ' seconds.')\n NPSF = dMlt['Trip Duration'].mean()\n print('The average travel time is ', NPSF, ' seconds.')\n print('\\nThis took ... | [
"0.8251978",
"0.81471264",
"0.80965656",
"0.80127156",
"0.7987783",
"0.79834235",
"0.7978646",
"0.79705906",
"0.7965226",
"0.79636025",
"0.79616374",
"0.79614663",
"0.79523134",
"0.7948989",
"0.79445267",
"0.7937707",
"0.7923821",
"0.792045",
"0.79198813",
"0.7918623",
"0.791... | 0.0 | -1 |
Return the signed magnitude sign bit for a given signed int | def _UNt(YKHO, BWXx):
if BWXx >= 0:
return 0
else:
return 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PTXZ(WKvO):\n assert type(WKvO) == type(1)\n return WKvO >> HwRy.getsizeof(WKvO) - 1",
"def Zihr(mLGw):\n if mLGw > 0:\n return 1\n elif mLGw < 0:\n return -1\n else:\n return 0",
"def CNOw(BWXx: int) -> int:\n if BWXx < 0:\n return -1\n elif BWXx == 0:\n ... | [
"0.71129036",
"0.6968318",
"0.69334066",
"0.6882692",
"0.6858385",
"0.6732391",
"0.67124027",
"0.6711017",
"0.66957843",
"0.66667795",
"0.6604248",
"0.66022545",
"0.65672344",
"0.6553159",
"0.65126574",
"0.6504874",
"0.6498915",
"0.6479174",
"0.6455862",
"0.6444963",
"0.64401... | 0.6985991 | 1 |
Uses `softmax_cross_entropy_with_logits` so the input should not have a softmax activation applied to it. | def sPco(YKHO, **B2fa):
YKHO.probs = ZylS.nn.softmax(YKHO.model)
sSN_ = ZylS.reduce_mean(ZylS.nn.softmax_cross_entropy_with_logits_v2(logits=YKHO.model, labels=YKHO.outputs))
ZylS.summary.scalar('loss', sSN_)
return sSN_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FD20(KeL5, Y8eF):\n nwEM = oyIN.exp(KeL5)\n N93T = nwEM / oyIN.sum(nwEM, axis=1)[:, oyIN.newaxis]\n jN_9 = oyIN.zeros_like(KeL5)\n jN_9[oyIN.arange(KeL5.shape[0]), Y8eF] = 1\n return -oyIN.sum(oyIN.log(N93T) * jN_9) / Y8eF.shape[0]",
"def X6YW(Crrw, KeL5, mWFP=None):\n return u4MP.softmax_c... | [
"0.7931656",
"0.77712834",
"0.7548851",
"0.7530878",
"0.7507787",
"0.7458785",
"0.7402094",
"0.7378122",
"0.73435706",
"0.7337128",
"0.73191416",
"0.7304428",
"0.7297757",
"0.7291943",
"0.7291943",
"0.72836965",
"0.7242408",
"0.7212161",
"0.720096",
"0.71899056",
"0.71729326"... | 0.0 | -1 |
Default all 0s bias, but `constant` can be used to specify other values. | def R9Vf(YKHO, tpio, mWFP, si3H=0.0):
with ZylS.name_scope(mWFP) as rrBf:
return ZylS.Variable(ZylS.constant(si3H, shape=[tpio]), name=mWFP) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HUIC(upAO: torch.Tensor, oug5: torch.Tensor, mb4J: float) -> None:\n U78l.init.xavier_uniform_(upAO, mb4J)\n U78l.init.constant_(oug5, 0)",
"def oug5(exwG, yDqo=oyIN.float32):\n return oyIN.zeros(exwG, yDqo)",
"def KR18(YKHO, ROpF):\n return ZylS.Variable(ZylS.constant(0.0, shape=ROpF, dtype=Zy... | [
"0.6928632",
"0.68136984",
"0.6805349",
"0.66586524",
"0.6586339",
"0.65130025",
"0.6493022",
"0.6445708",
"0.6417385",
"0.6380426",
"0.63633496",
"0.6331269",
"0.63013995",
"0.62715226",
"0.62715226",
"0.62715226",
"0.62382954",
"0.6209821",
"0.62066555",
"0.6202356",
"0.619... | 0.67387867 | 3 |
returns true/false if the user has a receipt to a given product(s) it also checks against elegibility start/end/empty dates on consumable products and subscriptions | def X800(YKHO, Ldyl):
return bool(YKHO.filter_products(Ldyl).count()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PjbC(YKHO):\n return YKHO.is_provisional()",
"def WMcy(YKHO, Ldyl):\n return bool(YKHO.receipts.filter(products__in=Ldyl, status__gte=eC1T.COMPLETE).first())",
"def E56J(Lx3t):\n if Lx3t['states_hierarchy'][1] == 'en:complete' and Lx3t['image_front_url'] != '' and (Lx3t['product_name'] != '') and ... | [
"0.67369056",
"0.6641756",
"0.6485355",
"0.6361572",
"0.63237613",
"0.63165474",
"0.6302004",
"0.62825245",
"0.61938024",
"0.6148463",
"0.61232543",
"0.61136657",
"0.6046263",
"0.59878254",
"0.59645903",
"0.59569603",
"0.59537715",
"0.59429765",
"0.5922144",
"0.58773273",
"0.... | 0.5623689 | 51 |
Get all products that the customer has purchased and returns True if it has. | def WMcy(YKHO, Ldyl):
return bool(YKHO.receipts.filter(products__in=Ldyl, status__gte=eC1T.COMPLETE).first()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CnKV():\n PdMZ = _aLO()\n return Ldyl.search(PdMZ.inventory_count > 0)",
"def bgiL(Mc9N: int) -> bool:\n pass",
"def Ldyl(YKHO):\n msfn = YrZb('catalogue', 'Product')\n if not YKHO.has_products:\n return msfn.objects.none()\n SR0I = YKHO.condition.range.all_products()\n return S... | [
"0.6621952",
"0.65356404",
"0.65352505",
"0.64648014",
"0.63681924",
"0.6300305",
"0.62740844",
"0.62353486",
"0.62122273",
"0.616832",
"0.61293465",
"0.6122914",
"0.59550345",
"0.5942589",
"0.5942589",
"0.59255564",
"0.58897686",
"0.588734",
"0.5880258",
"0.58291405",
"0.582... | 0.65761966 | 1 |
remove html style tags from some text | def as8h(l5Ny):
TKMu = ZbWC.sub('<[^>]+>', '', l5Ny)
return ZbWC.sub('\\s+', ' ', TKMu).strip() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eW6w(YKHO, hGN5):\n Wsm_ = ZbWC.sub(\"r'<style>.*</style>\", hGN5, '', ZbWC.DOTALL)\n assert len(hGN5) > len(Wsm_)\n return Wsm_",
"def DVW7(l5Ny):\n RBfQ = ZbWC.compile('<.*?>')\n return RBfQ.sub('', l5Ny)",
"def AqyV(l5Ny):\n lQ3t = ZbWC.compile('&')\n l5Ny = lQ3t.sub('&', l5Ny)\... | [
"0.7316586",
"0.7217545",
"0.70953554",
"0.7049319",
"0.703963",
"0.703318",
"0.6999381",
"0.6974037",
"0.6950815",
"0.6910089",
"0.6877385",
"0.6866725",
"0.6864147",
"0.6864147",
"0.68134564",
"0.6765131",
"0.6765131",
"0.6765131",
"0.6765131",
"0.6765131",
"0.6765131",
"... | 0.65299827 | 41 |
remove any character that is not in [az], [AZ], [09], , or a space also strips leading and trailing spaces | def F5TV(_dZy):
return ZbWC.sub('[^a-zA-Z0-9- ]', '', _dZy).strip() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wBLM(zCsx):\n return 'xyz'",
"def bU6V(YKHO, vIwR):\n vIwR = vIwR.upper().strip()\n vIwR = ZbWC.sub('[.,\\t]', ' ', vIwR)\n vIwR = ZbWC.sub('( +)', ' ', vIwR)\n vIwR = ZbWC.sub(' - ', '-', vIwR)\n return vIwR",
"def x0SS(GIN8):\n for UHpo in range(len(GIN8)):\n Npgh = GIN8[UHpo]... | [
"0.7192524",
"0.7190867",
"0.7141142",
"0.7079593",
"0.70148325",
"0.6995302",
"0.6975837",
"0.69693345",
"0.6951865",
"0.69453263",
"0.6944437",
"0.69431883",
"0.6921785",
"0.69200224",
"0.69054663",
"0.6833097",
"0.6830563",
"0.68252087",
"0.6802055",
"0.67890173",
"0.67839... | 0.0 | -1 |
Given a sentence (as a string or a list of words), return all ngrams of order n in a list of tuples [(w1, w2), (w2, w3), ... ] bounds=True includes and tags in the ngram list | def RisN(_dZy, exwG=2, X7zS=False, CZBi=False):
pCSA = []
V22M = _dZy.split()
if exwG == 1:
return V22M
if X7zS:
V22M = ['<start>'] + V22M + ['<end>']
ywwl = len(V22M)
for YRbF in range(exwG - 1, ywwl):
u8Mh = V22M[YRbF - exwG + 1:YRbF + 1]
if CZBi:
pC... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oT76(yAmx, exwG=3):\n bS0K = range(len(yAmx))\n gOBC = []\n for yKcO in range(len(yAmx)):\n for Os4s in filter(lambda WKvO: WKvO > yKcO, range(1, min(len(yAmx), exwG + yKcO) + 1)):\n gOBC.extend([yAmx[yKcO:Os4s]])\n return gOBC",
"def tbgJ(l5Ny, ywwl=None):\n s2mk = dFss(l5Ny... | [
"0.75213575",
"0.7481488",
"0.7413487",
"0.7393818",
"0.733377",
"0.73084617",
"0.71865726",
"0.71452856",
"0.71452856",
"0.71452856",
"0.7140185",
"0.71315706",
"0.71231735",
"0.71097547",
"0.70974135",
"0.7096466",
"0.7081871",
"0.70682836",
"0.7056935",
"0.7048739",
"0.702... | 0.77615917 | 0 |