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 |
|---|---|---|---|---|---|---|
An upper bound on the number of invites sent in the last `days` days | def iIY8(oDj3: Collection[Realm], *, Sm0u: int) -> int:
ZFTI = V87t.objects.filter(realm__in=oDj3, property='invites_sent::day', end_time__gte=EnDd() - qcWV.timedelta(days=Sm0u)).aggregate(zphJ('value'))['value__sum']
if ZFTI is None:
return 0
return ZFTI | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rbgk(YKHO):\n try:\n return YKHO.count_days_from_now(YKHO.current_period_ends_at)\n except AttributeError:\n return 0",
"def QCNa(YKHO, Sm0u):\n return YKHO.security['Date', 'Close', 'FinalDecision'][-Sm0u:]",
"def RPYD(YKHO) -> int:\n if not YKHO.expiration:\n return 0\n ... | [
"0.60058075",
"0.59577036",
"0.58903176",
"0.58417714",
"0.5803342",
"0.5769002",
"0.57686865",
"0.57513726",
"0.5716907",
"0.567923",
"0.5666582",
"0.5571618",
"0.55624706",
"0.55615324",
"0.5542534",
"0.5520669",
"0.5501939",
"0.54907006",
"0.54841435",
"0.54222095",
"0.541... | 0.69755816 | 0 |
Test if changing a state to a zero value is possible. | async def test_api_state_change_to_zero_value(ajET: HomeAssistant, tWY2: TestClient) -> None:
_hkX = await tWY2.post('/api/states/test_entity.with_zero_state', json={'state': 0})
assert _hkX.status == qed_.CREATED
_hkX = await tWY2.post('/api/states/test_entity.with_zero_state', json={'state': 0.0})
ass... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Witr(YKHO) -> bool:\n return YKHO.field.zero == YKHO",
"def PNxx(YKHO):\n return YKHO.p.isZero() & (YKHO.q.isZero() == False)",
"def Witr(YKHO, jzdc):\n return not jzdc",
"def Witr(YKHO):\n return YKHO._num == 0",
"def Witr(YKHO):\n return YKHO._express.is_zero()",
"def Witr(YKHO):\n ... | [
"0.73544365",
"0.7302472",
"0.725837",
"0.72285306",
"0.71520877",
"0.71436054",
"0.7125217",
"0.70954514",
"0.708613",
"0.7013169",
"0.69824266",
"0.69645005",
"0.68737406",
"0.68569106",
"0.6801159",
"0.67818016",
"0.67705464",
"0.67519456",
"0.67096674",
"0.6701111",
"0.66... | 0.0 | -1 |
Test sending event requires admin. | async def test_post_event_admin(ajET: HomeAssistant, tWY2: TestClient, Dw23: MockUser) -> None:
Dw23.groups = []
_hkX = await tWY2.post('/api/events/state_changed')
assert _hkX.status == qed_.UNAUTHORIZED | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"async def test_event_stream_requires_admin(ajET: HomeAssistant, tWY2: TestClient, Dw23: MockUser) -> None:\n Dw23.groups = []\n _hkX = await tWY2.get('/api/stream')\n assert _hkX.status == qed_.UNAUTHORIZED",
"def Ee9T(YKHO):\n assert dp9S",
"def opFO(YKHO):\n YKHO.seed_static_data()\n NArs =... | [
"0.7089269",
"0.7011658",
"0.7003394",
"0.6900787",
"0.6857657",
"0.67954934",
"0.6772854",
"0.6598995",
"0.6379327",
"0.63549584",
"0.6346208",
"0.63351744",
"0.6331693",
"0.6264606",
"0.6248772",
"0.6238217",
"0.6237759",
"0.62180626",
"0.62119085",
"0.61435604",
"0.6128294... | 0.6823375 | 5 |
Test if the API fails 400 if unknown service. | async def test_api_call_service_not_found(ajET: HomeAssistant, tWY2: TestClient) -> None:
_hkX = await tWY2.post('/api/services/test_domain/test_service')
assert _hkX.status == qed_.BAD_REQUEST | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _ef9():\n return c1Bu(400)",
"def BOvV(YKHO):\n raise NotImplementedError",
"def e4S6(YKHO):\n YKHO._error_test(ODk9.HTTPBadRequest)",
"def VI_q(YKHO):\n raise NotImplementedError",
"def s6Fd(YKHO):\n YKHO.assertEqual(YKHO._request({}), 400)",
"def zCQT(YKHO):\n _hkX = YKHO.app.get(... | [
"0.68837065",
"0.6854463",
"0.6836647",
"0.6711121",
"0.6697271",
"0.6591661",
"0.6569441",
"0.65096295",
"0.64941186",
"0.647006",
"0.6430915",
"0.64174676",
"0.63917804",
"0.63644826",
"0.6330154",
"0.6326488",
"0.6315322",
"0.63026416",
"0.6300717",
"0.6293535",
"0.6292228... | 0.6843427 | 2 |
Test if the API fails 400 if unknown service. | async def test_api_call_service_bad_data(ajET: HomeAssistant, tWY2: TestClient) -> None:
Z7tR = []
@fUKV.callback
def DN9V(PSv_):
"""Record that our service got called."""
Z7tR.append(1)
ajET.services.async_register('test_domain', 'test_service', DN9V, schema=qjHC.Schema({'hello': str})... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _ef9():\n return c1Bu(400)",
"def BOvV(YKHO):\n raise NotImplementedError",
"async def test_api_call_service_not_found(ajET: HomeAssistant, tWY2: TestClient) -> None:\n _hkX = await tWY2.post('/api/services/test_domain/test_service')\n assert _hkX.status == qed_.BAD_REQUEST",
"def e4S6(YKHO):... | [
"0.68834925",
"0.68532723",
"0.68430823",
"0.68363065",
"0.6709689",
"0.6697629",
"0.65906274",
"0.65689635",
"0.6509782",
"0.6493042",
"0.646856",
"0.6431261",
"0.6414697",
"0.6390746",
"0.6363637",
"0.6331421",
"0.63235366",
"0.63149935",
"0.6302825",
"0.6298744",
"0.629187... | 0.0 | -1 |
test get method 400 | async def test_get_400():
rTT5 = V7ok.Queue()
await rTT5.put(eYaw.JOB_TEMPLATE_PAYLOAD_SINGLE_PAGE)
i4ai = ECmp.TowerApiWorker(eYaw.config, None, rTT5)
with L31z() as _xNI:
_xNI.get(eYaw.DEFAULT_JOB_TEMPLATES_LIST_URL, status=400, body='BAD DATA')
with trZe.raises(Exception) as zK6_:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SYLZ(YKHO):\n geh0 = YKHO.second_client.get(YKHO.url)\n YKHO.assertEquals(geh0.status_code, 400)",
"def ALFl(YKHO):\n Mkmy = G4JS.get(YKHO.address)\n YKHO.assertEqual(Mkmy.status_code, 400)",
"def PnJP(YKHO):\n _hkX, hGN5 = YKHO._two_legged('GET')\n YKHO.assertEqual(int(_hkX['status']), 2... | [
"0.8090046",
"0.80869406",
"0.7970418",
"0.79357815",
"0.79357815",
"0.7921583",
"0.78648674",
"0.786213",
"0.7799408",
"0.77980393",
"0.77980393",
"0.7777813",
"0.7613449",
"0.7579809",
"0.7579809",
"0.7561017",
"0.7495695",
"0.7489103",
"0.74041486",
"0.73891914",
"0.738870... | 0.0 | -1 |
Test Post Method 400 | async def test_post_400():
rTT5 = V7ok.Queue()
await rTT5.put(eYaw.JOB_TEMPLATE_POST_PAYLOAD)
i4ai = ECmp.TowerApiWorker(eYaw.config, None, rTT5)
with L31z() as _xNI:
_xNI.post(eYaw.JOB_TEMPLATE_POST_URL, status=400, body='BAD DATA')
with trZe.raises(Exception) as zK6_:
await... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gyfA(YKHO):\n pB3N = {'id': '222', 'make': 'Wolkswagen', 'model': 'Golf', 'year': 2011, 'price': 8600}\n Mkmy = G4JS.post(YKHO.address, json=pB3N)\n YKHO.assertEqual(Mkmy.status_code, 400)",
"def RXrc(YKHO):\n Jczo = Jczo()\n geh0 = YKHO.client.open('/error', method='POST', data=qQXR.dumps(Jcz... | [
"0.78783363",
"0.7701792",
"0.7605584",
"0.75895816",
"0.7517692",
"0.7479943",
"0.74356794",
"0.74356794",
"0.74164563",
"0.73962384",
"0.73636824",
"0.7326245",
"0.7314988",
"0.7270846",
"0.7253879",
"0.7253861",
"0.723646",
"0.72305346",
"0.7222394",
"0.7218809",
"0.721119... | 0.0 | -1 |
r"""Calculates centers, (x, y), of box (N, 4) | def hgjH(FlUN):
EARX = FlUN[:, 0] + (FlUN[:, 2] - FlUN[:, 0]) // 2
yRWF = FlUN[:, 1] + (FlUN[:, 3] - FlUN[:, 1]) // 2
return ht2j.stack((EARX, yRWF)).t().to(FlUN.device) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OWBH(oUSw):\n ENFq = V6IE.Concat(1)\n return ENFq(((oUSw[:, 2:] + oUSw[:, :2]) / 2, oUSw[:, 2:] - oUSw[:, :2]))",
"def FV53(oUSw):\n wBZN, KDmU = (oUSw[:, 0], oUSw[:, 1])\n re6M, rwK9 = (oUSw[:, 2], oUSw[:, 3])\n JPqE = (re6M + wBZN) / 2.0\n fXzF = (rwK9 + KDmU) / 2.0\n TVTK = re6M - wBZ... | [
"0.7844434",
"0.7580505",
"0.75150996",
"0.7374247",
"0.71713126",
"0.71421254",
"0.7123263",
"0.7022318",
"0.69268924",
"0.6919755",
"0.6817232",
"0.675503",
"0.66800183",
"0.6634561",
"0.6622195",
"0.6617297",
"0.6592415",
"0.6585464",
"0.65702504",
"0.65461254",
"0.6537031... | 0.7520257 | 2 |
r"""Returns boxes in onehot format that covers given keypoints | def bdGm(FlUN, JII9):
_COq = FlUN.unsqueeze(2).repeat(1, 1, len(JII9.t())).transpose(0, 1)
eoYI = JII9.unsqueeze(1).repeat(1, len(FlUN), 1)
BQGg = eoYI[0].ge(_COq[0])
h3cg = eoYI[1].ge(_COq[1])
bYzl = eoYI[0].le(_COq[2])
Z3uP = eoYI[1].le(_COq[3])
OZsy = ht2j.mul(ht2j.mul(BQGg, h3cg), ht2j.m... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def N9CW(WKvO, G1Hx, yDqo=oyIN.float32):\n return oyIN.array(WKvO[:, None] == oyIN.arange(G1Hx), yDqo)",
"def KLLm(WKvO, G1Hx, yDqo=oyIN.float32):\n return oyIN.array(WKvO[:, None] == oyIN.arange(G1Hx), yDqo)",
"def LL0V(ZHfW, BR8K):\n l0Pg = oyIN.zeros(ZHfW.shape) * 255\n for LVAh, WKvO in BR8K[0]... | [
"0.6023954",
"0.59734654",
"0.5906592",
"0.5894241",
"0.5691551",
"0.56882316",
"0.56732035",
"0.5670251",
"0.5649142",
"0.56303936",
"0.5620511",
"0.55627286",
"0.5522864",
"0.55192226",
"0.551634",
"0.5511373",
"0.5501042",
"0.54976946",
"0.54897213",
"0.5486914",
"0.548356... | 0.5936421 | 2 |
Sets handler to notify media information. | def DJrI(YKHO, DCgT):
YKHO.info_handler = DCgT | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aUFQ(YKHO, DCgT):\n YKHO._handler = DCgT",
"def t5y8(YKHO, DCgT):\n YKHO.alertNotificationHandler = DCgT",
"def Aby9(YKHO, DCgT):\n YKHO.handler = DCgT",
"def FIMM(YKHO, DCgT: mediaHandler):\n YKHO.handler = DCgT",
"def lYMr(YKHO, DCgT):\n YKHO.serverEventHandler = DCgT",
"def aUFQ(YKH... | [
"0.69296384",
"0.6656942",
"0.6458559",
"0.64305735",
"0.6423851",
"0.63559604",
"0.62055033",
"0.61443347",
"0.6069962",
"0.6003106",
"0.5912256",
"0.5867151",
"0.57176775",
"0.5670392",
"0.56581545",
"0.5640697",
"0.5590167",
"0.5568174",
"0.55603975",
"0.5541731",
"0.54989... | 0.6233584 | 6 |
Set streaming source URL. | def U2Rp(YKHO, F8A2):
if BfDw.validate_url(F8A2, 'rtsp'):
YKHO.url = F8A2
YKHO.set_state_null()
YKHO.setup_pipeline()
YKHO.play()
else:
print('Invalid URL') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xUuB(YKHO, JZXy):\n YKHO.data['source'] = JZXy",
"def Nkbt(YKHO, bD7m, U34r=None):\n Pt4f = pWDJ.ListItem(label='clip', path=bD7m)\n KHP_.setResolvedUrl(YKHO.handle, True, Pt4f)",
"def zZcM(YKHO, zZcM):\n YKHO._src = zZcM",
"def U2Rp(YKHO, bD7m):\n if bD7m is not None:\n YKHO.url = ... | [
"0.6712162",
"0.6592298",
"0.647681",
"0.6407756",
"0.6372209",
"0.635762",
"0.6356142",
"0.6350102",
"0.63494205",
"0.62204987",
"0.6213311",
"0.6206013",
"0.620283",
"0.620283",
"0.620283",
"0.620283",
"0.620283",
"0.620283",
"0.620283",
"0.61903834",
"0.6171611",
"0.6141... | 0.78246737 | 0 |
Insert a single component at index. | def VgSJ(YKHO, d6pt, icgJ=None, **LwG6):
if icgJ is None:
icgJ = YKHO.__class__(**LwG6)
if d6pt == 0:
A4zB = YKHO.__class__()
A4zB.SetRawData(YKHO.GetRawData())
YKHO.SetRawData(icgJ.GetRawData())
YKHO.last.nested_path = A4zB
else:
AOBR = YKHO[d6pt - 1]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JPHp(YKHO, d6pt, OCky):\n pass",
"def JPHp(YKHO, ZfUD: T, d6pt: int) -> None:\n pass",
"def JPHp(YKHO, d6pt: int, ZfUD: Any) -> None:\n YKHO.contents.insert(d6pt, ZfUD)\n return",
"def JPHp(YKHO, d6pt, ZfUD):\n if d6pt > len(YKHO):\n raise IndexError\n elif d6pt == 0:\n YK... | [
"0.75078076",
"0.7310345",
"0.7299112",
"0.7242185",
"0.724123",
"0.71909964",
"0.7151328",
"0.7115667",
"0.70852554",
"0.7084879",
"0.7059566",
"0.7035718",
"0.6994174",
"0.695882",
"0.6912395",
"0.6813797",
"0.6786568",
"0.67380273",
"0.6733274",
"0.67274284",
"0.6719816",
... | 0.6344632 | 37 |
Returns a list of unique values in preserved order. | def ONhe(OxJJ):
return list(dict.fromkeys(OxJJ)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kcwm(WKvO):\n return list(set(WKvO))",
"def pkjm(BWXx):\n qbsE = set(BWXx)\n S06t = list(qbsE)\n S06t.sort()\n return S06t",
"def ONhe(BDwY):\n return list(set(BDwY))",
"def kcwm(Q6uT):\n return list(set(Q6uT))",
"def UYlD(WKvO):\n return list(set(WKvO))",
"def QDGc(Q6uT):\n ... | [
"0.81129277",
"0.7803977",
"0.77864575",
"0.76509386",
"0.759385",
"0.7525359",
"0.738596",
"0.7371861",
"0.72834635",
"0.7258286",
"0.72512347",
"0.71951",
"0.7178567",
"0.71587765",
"0.7147433",
"0.7127199",
"0.7072416",
"0.7035133",
"0.7030887",
"0.7026637",
"0.70066077",
... | 0.7027201 | 19 |
Returns a list of GlobComponentExplanations with examples. | def SZDU(YKHO, dmf_: int, MqU2) -> bdIy[KikB]:
SQ3m = pd4Q.split(YKHO._value)
AdfU = []
for iPmC in SQ3m:
if not iPmC:
continue
UksD = KikB(glob_expression=iPmC)
if tdxm.match(iPmC):
_73Q = YKHO.InterpolateGrouping(iPmC)
elif RAeG.match(iPmC):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def X2wT():\n _73Q = Kf9k(dqLT).read()\n _73Q = ZbWC.sub('^#.*\\\\n?', '', _73Q.decode(), flags=ZbWC.MULTILINE)\n TDw3 = ZbWC.escape(bkIO)\n m2Ws = ZbWC.compile(TDw3 + '(.*?)' + TDw3, ZbWC.S)\n lpha = ZbWC.findall(m2Ws, _73Q)\n return [ZT_w(PU1l) for PU1l in lpha]",
"def _73Q(YKHO):\n return... | [
"0.67662424",
"0.66115737",
"0.6609532",
"0.6507707",
"0.64227337",
"0.63136464",
"0.62638426",
"0.6231608",
"0.6231608",
"0.61889976",
"0.61759686",
"0.61759686",
"0.6167018",
"0.6167018",
"0.6167018",
"0.6167018",
"0.6167018",
"0.61635184",
"0.6145044",
"0.61187345",
"0.610... | 0.59416443 | 44 |
Return train and validation data loaders. | def yjBr(qIxc):
if qIxc.dataset == 'heat':
GEud = BQAG.HeatDiffusionDataset
else:
raise ValueError(f'Unknown dataset {qIxc.dataset}')
EPL3 = GEud(GEud.get_train_path(qIxc.data_path), qIxc, train=True)
if qIxc.dist:
QIRx = ht2j.utils.data.distributed.DistributedSampler(EPL3)
e... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SELc(EPL3, IrSd, qby3, Ep8u=128):\n Pa1c = pVAc(EPL3, batch_size=Ep8u, num_workers=8, shuffle=True)\n o7Up = pVAc(IrSd, batch_size=Ep8u, num_workers=8, shuffle=False)\n Blhr = pVAc(qby3, batch_size=Ep8u, num_workers=8, shuffle=False)\n return (Pa1c, o7Up, Blhr)",
"def rSg_(Ep8u, EPL3, qBlx, qby3,... | [
"0.8474643",
"0.82500017",
"0.8021656",
"0.782781",
"0.78098774",
"0.7785202",
"0.7696616",
"0.7657214",
"0.7638478",
"0.75306267",
"0.74784565",
"0.7437562",
"0.7394582",
"0.73904926",
"0.73904926",
"0.73904926",
"0.73904926",
"0.73904926",
"0.73904926",
"0.73904926",
"0.739... | 0.6936148 | 41 |
Convert a value, as found in cherrypy parameters, into a list. | def YYDj(wEf2):
if isinstance(wEf2, exCv):
return [wEf2]
if hasattr(wEf2, '__iter__'):
return list(wEf2)
return [wEf2] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WOxh(YKHO, BWXx):\n if not BWXx:\n return []\n return BWXx.split(',')",
"def BvAu(BWXx):\n if not isinstance(BWXx, list):\n BWXx = [BWXx]\n return BWXx",
"def mFWN(BWXx):\n if hasattr(BWXx, '__iter__') and (not isinstance(BWXx, str)):\n return list(BWXx)\n return [BWX... | [
"0.73468643",
"0.72042423",
"0.7164559",
"0.67624813",
"0.67364633",
"0.67269695",
"0.669944",
"0.66236186",
"0.6555451",
"0.6509249",
"0.65055346",
"0.6492622",
"0.638558",
"0.6368018",
"0.6355396",
"0.6350103",
"0.6344648",
"0.63303983",
"0.6301572",
"0.6272887",
"0.6233129... | 0.6515767 | 9 |
Recursively merges dict2 into dict1 | def roQF(WbPA, S69B, jsTM=None):
if not isinstance(WbPA, dict) or not isinstance(S69B, dict):
return S69B
for G1Hx in S69B:
if G1Hx in WbPA:
Ylbp = None
if jsTM:
Ylbp = jsTM(G1Hx, WbPA[G1Hx], S69B[G1Hx], xWil)
WbPA[G1Hx] = roQF(WbPA[G1Hx], S69B... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W0j7(AjzU, _sQW):\n for H5ew, BWXx in _sQW.items():\n if H5ew in AjzU:\n if isinstance(AjzU[H5ew], dict) and isinstance(BWXx, dict):\n W0j7(AjzU[H5ew], BWXx)\n continue\n AjzU[H5ew] = BWXx",
"def W0j7(WbPA, S69B, pmON=None):\n if pmON is None:\n ... | [
"0.7955589",
"0.79223824",
"0.7905807",
"0.7891808",
"0.78137326",
"0.7750845",
"0.7599099",
"0.75727713",
"0.75088084",
"0.75088084",
"0.74713856",
"0.7467959",
"0.7399142",
"0.73555255",
"0.7351608",
"0.7299126",
"0.7270481",
"0.72687936",
"0.7255596",
"0.724556",
"0.720741... | 0.76131135 | 6 |
Fixture which allows to have an isolated inmemory configuration file instance which is not persisted after exiting the fixture. This override works only in tests which use config calls directly, not in the ones working via the API, as the server config is not changed. | def mA1e(QePW):
from unittest import mock
from rucio.common.config import Config, config_set, config_has_section, config_add_section
If3P = []
NArs = HFlU(QePW)
if NArs:
If3P = NArs.get('overrides', If3P)
wvEv = Config().parser
with mock.patch('rucio.common.config.get_config', side_e... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Mcdd():\n from .. import config\n SS8C = Hy7s.getenv('FREESURFER_HOME')\n if not SS8C:\n Hy7s.environ['FREESURFER_HOME'] = qf3c()\n Ux0P = GkAb(NJcM('fmriprep', 'data/tests/config.toml'))\n gCuF = _1kr(Ux0P.read_text())\n for nPMm, b32v in gCuF.items():\n if nPMm != 'environment... | [
"0.68572384",
"0.68024707",
"0.67448837",
"0.6708275",
"0.6573832",
"0.6493411",
"0.63244575",
"0.629747",
"0.6227993",
"0.6181613",
"0.6161833",
"0.61605275",
"0.6159928",
"0.6133413",
"0.6103953",
"0.6089158",
"0.6066062",
"0.60482967",
"0.60181063",
"0.60088384",
"0.600827... | 0.63549834 | 6 |
Create a symbolic representation of a neural network with `intput_dim` input nodes, `output_dim` output nodes and `num_hidden_units` per hidden layer. The training function of this model must have a minibatch size of `batch_size`. A theano expression which represents such a network is returned. | def C3ST(GhuM, EDoJ, A9eW, tMTA, feIC, QJWG, Ep8u=Pp2K):
ROpF = tuple([None] + list(GhuM[1:]))
print(ROpF)
DVQq = MTf8.layers.InputLayer(shape=ROpF)
print('Input shape: ', MTf8.layers.get_output_shape(DVQq))
wIf_ = 2800
DCc6 = MTf8.layers.Conv2DLayer(DVQq, num_filters=8, filter_size=QJWG, stride... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bKD6(epBp, uwTF):\n Norb = 15\n EhKz = Fz20.fully_connected(epBp, Norb, activation_fn=None)\n J0q5 = Fz20.fully_connected(EhKz, uwTF, activation_fn=ZylS.tanh)\n return J0q5",
"def CqzP(UJ7N, a6Jb, rrBf, hUTg, zNig, YDYE=ZylS.tanh, BKEM=None):\n LbJP = UJ7N\n with ZylS.variable_scope(rrBf):\... | [
"0.6677349",
"0.63641995",
"0.63397634",
"0.63344485",
"0.6310874",
"0.62955785",
"0.6284026",
"0.6240737",
"0.6230628",
"0.62106496",
"0.61926675",
"0.61831915",
"0.6096909",
"0.6028522",
"0.6002715",
"0.5981004",
"0.59762573",
"0.5971294",
"0.59666836",
"0.59464973",
"0.593... | 0.5844898 | 29 |
Gets the current height of the block chain. | def H2v2(YKHO):
return YKHO.client.call('GET', YKHO.name + 'height') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AWHj(YKHO) -> int:\n return YKHO.current_height",
"def xglF(YKHO):\n return YKHO.__height",
"def xglF(YKHO):\n return YKHO._height",
"def xglF(YKHO):\n return YKHO._height",
"def xglF(YKHO):\n return YKHO._height",
"def xglF(YKHO):\n return YKHO._height",
"def xglF(YKHO):\n ret... | [
"0.7698598",
"0.73720944",
"0.7370557",
"0.7370557",
"0.7370557",
"0.7370557",
"0.73291564",
"0.7296799",
"0.7296799",
"0.7296799",
"0.7274973",
"0.72705775",
"0.72258914",
"0.7222025",
"0.71950066",
"0.71939987",
"0.71939987",
"0.71939987",
"0.71939987",
"0.71939987",
"0.719... | 0.7160527 | 39 |
Gets a block from the chain that has the given height. If the block with the specified height cannot be found in the database, NIS will return a JSON error object. | def CRMI(YKHO, de0z):
return YKHO.client.call('POST', 'block/at/public', payload={'height': de0z}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rQDC(H2v2, MOPg):\n if H2v2 == 0:\n print('retrieving genesis block...')\n return SHMZ\n else:\n c42p = MOPg[0]['height']\n Aofo = MOPg[c42p + H2v2 - 2]\n assert H2v2 == Aofo['height']\n return Aofo",
"def QYf1(H2v2):\n return G4JS.get(V112 + f'/api/block-in... | [
"0.76337117",
"0.73324215",
"0.7283678",
"0.7279889",
"0.71485955",
"0.69237685",
"0.6770384",
"0.67582065",
"0.6742776",
"0.67281336",
"0.66896886",
"0.668445",
"0.656166",
"0.6470748",
"0.6397368",
"0.6264807",
"0.62340134",
"0.6229064",
"0.6226051",
"0.62204444",
"0.617060... | 0.52596045 | 70 |
Requests the chain height from every node in the active node list and returns the maximum height seen. In case the node has not been booted yet, NIS will return a JSON error object. | def l8qG(YKHO):
return YKHO.client.call('GET', YKHO.name + 'active-peers/max-chain-height') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def x8h4(YKHO, Q6kx):\n if Q6kx.value is not None and (not Q6kx.nodes):\n return Q6kx.height\n elif Q6kx.value is not None and Q6kx.nodes:\n return max(PWgb([Q6kx.height] + map(YKHO._height, Q6kx.nodes.values())))\n elif Q6kx.value is None and Q6kx.nodes:\n return max(PWgb(map(YKHO._h... | [
"0.68319684",
"0.6465309",
"0.6297922",
"0.6203093",
"0.614153",
"0.61317945",
"0.61278087",
"0.6122855",
"0.6043672",
"0.60223407",
"0.60080594",
"0.59487",
"0.59428215",
"0.5899491",
"0.58711404",
"0.57808805",
"0.57459044",
"0.57323635",
"0.57300353",
"0.57110506",
"0.5690... | 0.72689503 | 0 |
Gets the namespace with given id. | def _63S(YKHO, _63S):
return YKHO.client.call('GET', YKHO.name, params={'namespace': _63S}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pL94(YKHO, id: long) -> QMSQ:\n ...",
"def JcNk(YKHO, ZWU7, all=False):\n try:\n if all:\n return YKHO._namespaces[ZWU7]\n else:\n return YKHO._namespaces[ZWU7][0]\n except KeyError:\n tTpl = 'There is no namespace with id {0}.'.format(ZWU7)\n raise ... | [
"0.71565926",
"0.6610915",
"0.6161961",
"0.6130003",
"0.5918505",
"0.5895534",
"0.5827185",
"0.5736784",
"0.5669741",
"0.56681895",
"0.56561065",
"0.56506526",
"0.5591167",
"0.5573754",
"0.5567165",
"0.555966",
"0.5469768",
"0.5463284",
"0.54599905",
"0.5434206",
"0.53773785"... | 0.59006774 | 5 |
Gets an audit collection of outgoing calls. You can monitor the outstanding and recent outgoing requests with this information. | def zp4i(YKHO):
return YKHO.client.call('GET', YKHO.name + 'connections/outgoing') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def O1lB(YKHO):\n Ylbp = YKHO.get_object('/integrationServices/v3/auditlogs')\n return Ylbp.get('notifications', [])",
"def VIzB(YKHO):\n return VIzB.Calls(YKHO)",
"def JrvZ(YKHO):\n return YKHO._OutageHistory",
"def WfDe(YKHO):\n return mSrU.OutgoingCallerIds(YKHO)",
"def pyoM(YKHO):\n Q... | [
"0.5880125",
"0.5739649",
"0.5694943",
"0.56410474",
"0.55779296",
"0.552998",
"0.5406403",
"0.5326707",
"0.52545446",
"0.52218795",
"0.5213842",
"0.51800615",
"0.51409405",
"0.51348984",
"0.5015265",
"0.50151485",
"0.5012773",
"0.5002334",
"0.49872288",
"0.49606916",
"0.4957... | 0.58743024 | 1 |
Sets the address_txs of this AddressTxs. | def dkb2(YKHO, dkb2):
if dkb2 is None:
raise ValueError('Invalid value for `address_txs`, must not be `None`')
YKHO._address_txs = dkb2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dkb2(YKHO):\n return YKHO._address_txs",
"def KYrJ(YKHO, KYrJ: 'List[str]'):\n YKHO._attrs['addresses'] = KYrJ",
"def KYrJ(YKHO, KYrJ: 'List[str]'):\n YKHO._attrs['addresses'] = KYrJ",
"def KYrJ(YKHO, KYrJ: 'List[str]'):\n YKHO._attrs['addresses'] = KYrJ",
"def FIMM(YKHO, dkb2: List[Address... | [
"0.67103106",
"0.627279",
"0.627279",
"0.627279",
"0.58619",
"0.563561",
"0.56108737",
"0.55193025",
"0.53204703",
"0.52825093",
"0.5198595",
"0.5196371",
"0.5188511",
"0.5182996",
"0.5091491",
"0.50475854",
"0.50410074",
"0.5034687",
"0.4995494",
"0.4987398",
"0.4955234",
... | 0.8438663 | 0 |
Removes assigned IP block (as it only supports one for now) If force is False, blocks that have any addresses currently allocated will not be removed. Otherwise, if force is True, the indicated blocks will be removed regardless of whether any addresses have been allocated and any allocated addresses will no longer be s... | def zJ3i(YKHO, KOZ6: List[IPNetwork], DHvX: bool=False) -> x1iM[E6SK]:
if YKHO._assigned_ip_block not in KOZ6:
return []
if not DHvX:
pNv0 = YKHO._store.ipv6_state_map.get_allocated_ip_block_set()
if pNv0:
return []
asQz: x1iM[E6SK] = []
YKHO._store.allocated_iid.clea... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lpn5(YKHO, psuc, uJjO, DHvX=False):\n if not isinstance(psuc, __CE) or psuc.deprecated:\n raise AW0V(psuc)\n with YKHO.bulk_operations(psuc.course_key):\n zewB = YKHO._lookup_course(psuc.course_key).structure\n xL1Q = TgHQ.from_usage_key(psuc)\n if zewB['root'] == xL1Q:\n ... | [
"0.5939767",
"0.5938632",
"0.56954473",
"0.56054527",
"0.55543953",
"0.55501753",
"0.5495851",
"0.544292",
"0.5290664",
"0.52457166",
"0.52143854",
"0.5211263",
"0.5097896",
"0.5064577",
"0.50482243",
"0.50213253",
"0.49973372",
"0.49596322",
"0.49533314",
"0.49437845",
"0.49... | 0.7909288 | 0 |
Test simple authentication error. | def aL2q(YKHO):
x0hE = BEkn(YKHO.url)
x0hE.set_credentials('SIMPLE', ('cn=wrong', 'wronger'))
YKHO.assertRaises(tug4.AuthenticationError, x0hE.connect) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def u56H(YKHO):\n Aofo = YKHO.authenticator.authenticate(username=u'thruflo', password=u'wrong')\n YKHO.assertTrue(Aofo is None)",
"def _oVR(YKHO):\n pass",
"def JlK7(YKHO):\n NtEF, jTXt = ('new12312', '1231231231')\n geh0 = YKHO.api_client.login(NtEF, jTXt)\n assert geh0 == 'UNAUTHORIZED'",
... | [
"0.8160639",
"0.7902072",
"0.78756416",
"0.7854512",
"0.7853043",
"0.78114414",
"0.7806747",
"0.77066267",
"0.77066267",
"0.769299",
"0.76880956",
"0.7650529",
"0.7629429",
"0.76141727",
"0.75927913",
"0.7539589",
"0.75344485",
"0.75258625",
"0.74972916",
"0.7496218",
"0.7488... | 0.7740019 | 7 |
Convert magnitude to AB magnitude | def kIZM(BWXx, mWFP):
Thop = {'tmassJmag': 0.9, 'tmassHmag': 1.37, 'tmassKsMag': 1.85, 'SDSSuMag': 0.0, 'SDSSgMag': 0.0, 'SDSSrMag': 0.0, 'SDSSiMag': 0.0, 'SDSSzMag': 0.0, 'JpgMag': -0.055, 'FpgMag': 0.24, 'NpgMag': 0.48}
v8M0 = BWXx + Thop[mWFP]
return v8M0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YXbZ(jzdc):\n return uYbU(jzdc, jzdc) ** 0.5",
"def mDCN(OlCw, _eu6):\n return epAf.pow(10, -0.4 * (OlCw + zYlJ[_eu6] - 8.9))",
"def vj9W(YKHO):\n if YKHO.wavelength_unit is None:\n raise AttributeError('Needs wavelength units')\n lz9e = s_TI(YKHO.wavelength_unit).to('AA') ** 2 / Byma.c.... | [
"0.67562544",
"0.6364612",
"0.62620175",
"0.622684",
"0.5995404",
"0.59550416",
"0.5898912",
"0.58955497",
"0.588089",
"0.58797747",
"0.5833462",
"0.58331496",
"0.58265626",
"0.5806616",
"0.57999116",
"0.57599926",
"0.5759203",
"0.57434416",
"0.5739705",
"0.57364446",
"0.5704... | 0.6649778 | 1 |
Returns the given HTML with all tags stripped. | def t5Yq(BWXx):
return ZbWC.sub('<[^>]*?>', '', BWXx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zbe0(_R2e):\n import re\n l5Ny = _R2e\n c_NS = [{'>\\\\s+': u'>'}, {'\\\\s+': u' '}, {'\\\\s*<br\\\\s*/?>\\\\s*': u'\\n'}, {'<head>.*<\\\\s*(/head|body)[^>]*>': u''}, {'<a\\\\s+href=\"([^\"]+)\"[^>]*>.*</a>': u''}, {'[ \\\\t]*<[^<]*?/?>': u''}, {'^\\\\s+': u''}]\n for eD8c in c_NS:\n for G1H... | [
"0.8138946",
"0.8109891",
"0.810231",
"0.8100899",
"0.80280966",
"0.7989464",
"0.79603654",
"0.78888774",
"0.788333",
"0.78830826",
"0.78644603",
"0.7843869",
"0.7843869",
"0.7841764",
"0.78237224",
"0.7817937",
"0.77888054",
"0.7782822",
"0.7782822",
"0.77559096",
"0.7739701... | 0.67446905 | 69 |
Creates a matrix filled with zeros. | def fmpe(usx6, WfCS):
E3D9 = []
while len(E3D9) < usx6:
E3D9.append([])
while len(E3D9[-1]) < WfCS:
E3D9[-1].append(0.0)
return E3D9 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZnYu(H2v2, TVTK):\n Oa1e = [[0.0 for bGrB in range(TVTK)] for IaaG in range(H2v2)]\n return aLMY(Oa1e)",
"def GEcs(TVTK, H2v2):\n GyLV = aLMY()\n for YRbF in range(TVTK):\n yH_n = [0] * H2v2\n GyLV.addRow(*yH_n)\n return GyLV",
"def ZnYu(H2v2, TVTK):\n Oa1e = [[0.0 for bGrB ... | [
"0.83105844",
"0.82251585",
"0.8177624",
"0.814171",
"0.80738527",
"0.8053129",
"0.7960837",
"0.7792159",
"0.7705187",
"0.7678834",
"0.76101226",
"0.7580145",
"0.74690133",
"0.7464018",
"0.7462307",
"0.74617356",
"0.7240482",
"0.7231481",
"0.718796",
"0.71302176",
"0.70924646... | 0.7950135 | 8 |
Checks the equality of two matrices. | def MV7f(k0lF, tjUW, yJiH=None):
if len(k0lF) != len(tjUW) or len(k0lF[0]) != len(tjUW[0]):
return False
for YRbF in range(len(k0lF)):
for r845 in range(len(k0lF[0])):
if yJiH == None:
if abs(k0lF[YRbF][r845] - tjUW[YRbF][r845]) > 1e-10:
return Fal... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vTRD(*qIxc, **B2fa):\n return nAU3.GraphicsMatrix_IsEqual(*qIxc, **B2fa)",
"def k7E2(U6D_, pKgL):\n by6d = FCE9.N(FCE9.expand(U6D_) - FCE9.expand(pKgL))\n try:\n return oyIN.allclose(float(FCE9.re(by6d)) + 1j * float(FCE9.im(by6d)), 0)\n except TypeError:\n return False",
"def MV7... | [
"0.7714554",
"0.740203",
"0.7387387",
"0.73428464",
"0.73169017",
"0.7311009",
"0.7276583",
"0.7269618",
"0.7231773",
"0.71865493",
"0.7137955",
"0.71372896",
"0.7098439",
"0.7072754",
"0.7070013",
"0.7067749",
"0.70479655",
"0.69766957",
"0.69462913",
"0.6940412",
"0.693163"... | 0.7398573 | 2 |
L1norm of a vector. | def vsh_(Ty9i):
Ylbp = 0
for tTpl in Ty9i:
Ylbp += abs(tTpl)
return Ylbp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jtyf(he6J):\n return oyIN.linalg.norm(he6J, ord=1)",
"def vsh_(eHNT):\n return A0Tr(eHNT.rep, eHNT.lev, eHNT.dom)",
"def vsh_(he6J):\n Ylbp = sum((abs(float(WKvO)) for WKvO in he6J.values()))\n return Ylbp",
"def zPGF(yzQ0):\n return oyIN.linalg.norm(yzQ0, ord=1)",
"def JGX3(*iArr):\n ... | [
"0.9103843",
"0.8192758",
"0.810895",
"0.8001383",
"0.78128934",
"0.7798467",
"0.77959925",
"0.7714896",
"0.76301044",
"0.7540783",
"0.75042504",
"0.7388181",
"0.72909045",
"0.7280093",
"0.72323036",
"0.72279674",
"0.7182461",
"0.715058",
"0.71115243",
"0.70706004",
"0.706851... | 0.856022 | 1 |
L2norm of a vector. | def KtDG(Ty9i):
Ylbp = 0
for tTpl in Ty9i:
Ylbp += tTpl * tTpl
return epAf.sqrt(Ylbp) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def V70B(he6J):\n return oyIN.linalg.norm(he6J)",
"def KNe7(Ty9i):\n return oyIN.sqrt((Ty9i ** 2).sum())",
"def KNe7(P6bq):\n return aJJu.norm(P6bq.ravel())",
"def wsvu(EcVT):\n CkYf = oyIN.linalg.norm(EcVT, axis=1, keepdims=True)\n return 1.0 * EcVT / CkYf",
"def KtDG(SWiB):\n if len(SWi... | [
"0.8957043",
"0.8518496",
"0.8318099",
"0.82683444",
"0.8182556",
"0.8119852",
"0.8069992",
"0.8067408",
"0.800764",
"0.79987574",
"0.78410333",
"0.7818018",
"0.77782995",
"0.775152",
"0.77224255",
"0.77148014",
"0.7711236",
"0.7711236",
"0.7711236",
"0.76835793",
"0.7682921"... | 0.88052756 | 1 |
Tokenizes code into a list of CuBERT sentences. | def AR_6(Wxnj, XNlq, zRW4):
s2mk = XNlq.tokenize(Wxnj)[:-1]
G9jH.vlog(5, 'Code >>>%s<<< is tokenized into >>>%s<<<.', Wxnj, s2mk)
W79S = Hs6x.groupby(s2mk, key=lambda WKvO: WKvO == QWv5.NEWLINE)
wZeq = [list(Ty9i) for G1Hx, Ty9i in W79S if not G1Hx]
Rhv4 = [KCHu + [QWv5.NEWLINE] for KCHu in wZeq]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VixA(YKHO, Wxnj):\n Wxnj = ZbWC.sub('([^A-Za-z0-9_])', ' \\\\1 ', Wxnj)\n Wxnj = ZbWC.sub('([a-z])([A-Z])', '\\\\1 \\\\2', Wxnj)\n Wxnj = ZbWC.sub('\\\\s+', ' ', Wxnj)\n Wxnj = Wxnj.replace('\"', '`')\n Wxnj = Wxnj.replace(\"'\", '`')\n s2mk = [a1PO for a1PO in Wxnj.split(' ') if a1PO]\n r... | [
"0.6863243",
"0.67525357",
"0.67525357",
"0.669251",
"0.6580094",
"0.65743464",
"0.6467367",
"0.64577",
"0.63880205",
"0.6343771",
"0.62983996",
"0.62966585",
"0.6272456",
"0.6251971",
"0.62455213",
"0.6221313",
"0.61965567",
"0.6195651",
"0.61892426",
"0.61888105",
"0.616274... | 0.7083132 | 0 |
Convenience method to retrieve set of records as Spark DataFrame | def FEzq(ujem, rjee, L2Tk=False):
nPIK = qQXR.dumps({'$match': {'job_id': rjee}})
jGzX = ujem.read.format('com.mongodb.spark.sql.DefaultSource').option('uri', 'mongodb://%s' % gCuF.MONGO_HOST).option('database', 'combine').option('collection', 'record').option('partitioner', 'MongoSamplePartitioner').option('sp... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ObcF(tu9d, SLLj='object'):\n jQ3Z = rLdf.DataFrame(list(tu9d.values()), dtype=SLLj)\n return jQ3Z",
"def E9hE(jQ3Z):\n return [tuple(Mkmy) for Mkmy in jQ3Z.collect()]",
"def rLdf(YKHO, *qIxc, **B2fa):\n return rLdf.DataFrame.from_records(YKHO.aslist(), *qIxc, **B2fa)",
"def bOBl(YKHO):\n i... | [
"0.6874762",
"0.67645144",
"0.6537734",
"0.6515892",
"0.6470557",
"0.6428499",
"0.6179536",
"0.61614597",
"0.61406046",
"0.6136869",
"0.61283815",
"0.6064281",
"0.60510206",
"0.6005521",
"0.5992337",
"0.5990479",
"0.5971488",
"0.5949681",
"0.59414095",
"0.5937641",
"0.5907337... | 0.0 | -1 |
Shortcut to test "total population" field from the P1 (race) table since this table exists for both 2000 and 2010. | def wBjR(YKHO, YEnM, eT7O, qJSv):
i76k = qJSv - eT7O
hNCR = float(i76k) / float(eT7O)
YKHO.assertEqual(float(YEnM['data']['2000']['P1']['P001001']), eT7O)
YKHO.assertEqual(float(YEnM['data']['2010']['P1']['P001001']), qJSv)
YKHO.assertEqual(float(YEnM['data']['delta']['P1']['P001001']), i76k)
YK... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WjNN(YKHO):\n nDeK = YKHO.geographies.find({'geoid': '15009'})\n YKHO.assertEqual(nDeK.count(), 1)\n a5zo = nDeK[0]\n YKHO.assertEqual(a5zo['sumlev'], GPtr.SUMLEV_COUNTY)\n YKHO.assertEqual(a5zo['metadata']['NAME'], 'Maui County')\n YKHO.assertEqual(a5zo['metadata']['STATE'], '15')\n YKHO.... | [
"0.5652595",
"0.5537479",
"0.55229443",
"0.55086374",
"0.54755175",
"0.53278923",
"0.5322063",
"0.53090984",
"0.5220111",
"0.5202973",
"0.51130104",
"0.51096696",
"0.5104361",
"0.5068363",
"0.5034627",
"0.5024377",
"0.50120425",
"0.50120425",
"0.49283358",
"0.49250224",
"0.49... | 0.6115375 | 0 |
creates an instance according to dictionary | 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 eLpg(Emd4, cmPJ):\n return Emd4(**cmPJ)",
"def eLpg(Emd4, cmPJ):\n return Emd4(**cmPJ)",
"def jG8h(Emd4, cmPJ: Dict[str, Any]):\n return Emd4(**cmPJ)",
"def jG8h(Emd4, fK8P):\n return Emd4(**fK8P)",
"def CCiu(Emd4, tbx9):\n return Emd4.from_dict(tbx9)",
"def CCiu(Emd4, tbx9):\n retu... | [
"0.8319628",
"0.8319628",
"0.7552757",
"0.7533553",
"0.7414422",
"0.7414422",
"0.7414422",
"0.7414422",
"0.7414422",
"0.7414422",
"0.7414422",
"0.7414422",
"0.7414422",
"0.7414422",
"0.7414422",
"0.7414422",
"0.7414422",
"0.7414422",
"0.7414422",
"0.7414422",
"0.7414422",
"... | 0.0 | -1 |
Get the layer identifiers of the network layers. | def VDNa(YKHO, q7II=True):
fhcK = YKHO.net.blobs.keys()
if not q7II:
fhcK = fhcK[1:]
return fhcK | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fKMN(YKHO):\n return YKHO._layer_names",
"def xQJr(YKHO):\n return YKHO._fileSystem.getLayerNames()",
"def VDNa(YKHO):\n tIHR = {}\n for exwG, bGrB in YKHO.named_parameters():\n tIHR[exwG] = 0\n return tIHR",
"def VsZl(YKHO):\n Vxqs = []\n if YKHO.node_data is not []:\n ... | [
"0.7665354",
"0.7556004",
"0.73628604",
"0.7221689",
"0.70648915",
"0.69622135",
"0.6921894",
"0.68877995",
"0.6855709",
"0.68437696",
"0.68299043",
"0.6828836",
"0.6798301",
"0.6783592",
"0.6777249",
"0.67631555",
"0.67354053",
"0.67091215",
"0.6681927",
"0.6678638",
"0.6614... | 0.73892903 | 2 |
Get all marks for a student | def UVlI() -> uLKX[str, oGir]:
VWez = QePW.args.get('id')
Icli = _OuP.query.get(VWez)
return TvZl('marks.html', marks=Icli, id=VWez) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VLXD(YKHO):\n return YKHO.grade_set.all().distinct()",
"def D_5z(YKHO) -> x1iM['Student']:\n return YKHO.students.values()",
"def list(YKHO, QePW):\n Icli = _OuP.objects.all()\n x6OW = Icli.filter(name='Неявка')\n J2us = mS_x(QePW)\n VLXD = G2rF.objects.all()\n wj1T = []\n for g3Gt ... | [
"0.6977941",
"0.6782979",
"0.6760504",
"0.6710309",
"0.67101634",
"0.66821915",
"0.66705525",
"0.66550684",
"0.6632196",
"0.6598747",
"0.6597735",
"0.65887266",
"0.6547072",
"0.6538285",
"0.6516437",
"0.6514306",
"0.64951736",
"0.6415864",
"0.64110035",
"0.6409197",
"0.639799... | 0.6747031 | 3 |
apply sigmoid function on t. | def m1Hg(a1PO):
lsmZ = oyIN.empty(a1PO.shape)
lsmZ[a1PO > 0] = 1 / (1 + oyIN.exp(-a1PO[a1PO > 0]))
lsmZ[a1PO <= 0] = oyIN.exp(a1PO[a1PO <= 0]) / (1 + oyIN.exp(a1PO[a1PO <= 0]))
return lsmZ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m1Hg(a1PO):\n return oyIN.exp(a1PO) / (1 + oyIN.exp(a1PO))",
"def m1Hg(a1PO):\n wEsz = oyIN.exp(a1PO) / (1 + oyIN.exp(a1PO))\n return wEsz",
"def m1Hg(a1PO):\n return 1.0 / (1.0 + oyIN.exp(-a1PO))",
"def m1Hg(a1PO):\n return 1 / (1 + oyIN.exp(-a1PO))",
"def m1Hg(a1PO):\n kCB8 = 10\n ... | [
"0.9084493",
"0.9020642",
"0.9009438",
"0.89938635",
"0.87019694",
"0.84522074",
"0.82452095",
"0.8217517",
"0.8187859",
"0.8187859",
"0.8177547",
"0.816389",
"0.8141619",
"0.8141619",
"0.8141619",
"0.8141619",
"0.8141619",
"0.8141619",
"0.8134758",
"0.8129746",
"0.81269675",... | 0.83401215 | 6 |
Returns an integer codifying the actual day and time Because we only model a week, the effective maximum value is 90060 | def m6Me(YKHO):
return YKHO.day * 60 * 24 + YKHO.hour * 60 + YKHO.minute | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hfbv(YKHO):\n return YKHO.time_base * 60.0 * 24.0",
"def yV61():\n qtWj = ITS7.strptime('2013-02-21 11:30:00', '%Y-%m-%d %H:%M:%S')\n U4ka = ITS7.mktime(ITS7.gmtime()) - ITS7.mktime(qtWj)\n Euci = U4ka / bumR.hourScale\n CjKC = int(Euci / 24 % 7)\n ROt1 = int(Euci % 24)\n return (CjKC, R... | [
"0.6822729",
"0.6800442",
"0.671761",
"0.6645342",
"0.6588621",
"0.65614766",
"0.6522636",
"0.64839315",
"0.6381843",
"0.6367486",
"0.6346273",
"0.63235843",
"0.6287894",
"0.62772983",
"0.62772983",
"0.62371236",
"0.62271863",
"0.62144136",
"0.6200029",
"0.6178101",
"0.614856... | 0.5741346 | 37 |
Returns the equivalent timestamp of just the day | def _SLd(YKHO):
return YKHO.raw() // (60 * 24) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YnO1(YKHO):\n bo34.debug('Get a timestamp')\n return ITS7.mktime(qcWV.today().timetuple())",
"def ItX3(YKHO, Sm0u=1):\n vgXP = qcWV.datetime.utcnow().date() - qcWV.timedelta(days=Sm0u - 1)\n rIAI = '+02:00'\n yKcO = qcWV.datetime(vgXP.year, vgXP.month, vgXP.day)\n return yKcO.isoformat() + ... | [
"0.67507184",
"0.6686723",
"0.66458243",
"0.66195476",
"0.6554564",
"0.651344",
"0.6512791",
"0.6455556",
"0.6454444",
"0.6416096",
"0.64133775",
"0.6387338",
"0.6334385",
"0.63157105",
"0.63127744",
"0.6266428",
"0.6238006",
"0.6220144",
"0.6213184",
"0.61673725",
"0.6166025... | 0.76245064 | 0 |
Returns the full name of element being monitored by the active Monitor. | def JUfb(YKHO) -> str:
Aofo = gk2W.c_char_p(YKHO.dss_obj.MonitorsS(gk2W.c_int32(3), gk2W.c_int32(0)))
return Aofo.value.decode('ascii') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uLFj(YKHO):\n return _VfD.Event_getElementName(YKHO)",
"def uLFj(YKHO):\n return _VfD.Port_getElementName(YKHO)",
"def uLFj(YKHO):\n return _VfD.Compartment_getElementName(YKHO)",
"def uLFj(YKHO):\n return _VfD.SBase_getElementName(YKHO)",
"def uLFj(YKHO):\n return _VfD.Unit_getElementNa... | [
"0.7450548",
"0.7423249",
"0.7340012",
"0.73263264",
"0.7272811",
"0.72024053",
"0.7173537",
"0.71433705",
"0.7129742",
"0.7111007",
"0.70952076",
"0.70849293",
"0.70838827",
"0.70769614",
"0.701259",
"0.700048",
"0.6998356",
"0.6996207",
"0.69908535",
"0.6989184",
"0.6982886... | 0.66672796 | 53 |
Sets the full name of element being monitored by the active Monitor. | def Mesz(YKHO, wAVY) -> str:
Aofo = gk2W.c_char_p(YKHO.dss_obj.MonitorsS(gk2W.c_int32(4), wAVY.encode('ascii')))
return Aofo.value.decode('ascii') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oSgC(YKHO, mWFP):\n YKHO.name = str(mWFP)",
"def WZrJ(YKHO, mWFP):\n YKHO.name_ = mWFP",
"def oSgC(YKHO, mWFP):\n YKHO._name = mWFP",
"def oSgC(YKHO, mWFP):\n YKHO._name = mWFP",
"def WZrJ(YKHO, L15R=''):\n YKHO.name = L15R",
"def oSgC(YKHO, mWFP):\n YKHO._name = mWFP",
"def oSgC(... | [
"0.698972",
"0.69490653",
"0.6934929",
"0.6934929",
"0.69271183",
"0.69211125",
"0.6878148",
"0.6878148",
"0.6878148",
"0.6878148",
"0.6835848",
"0.68147045",
"0.68110657",
"0.6795679",
"0.678603",
"0.67782116",
"0.67782116",
"0.67782116",
"0.67782116",
"0.67782116",
"0.67709... | 0.0 | -1 |
Converts the rank to a ctrl_string for thresholding. | def b2EU(fdMZ, u54L):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BbWt(fdMZ: int) -> str:\n return str(fdMZ + 1)",
"def zAg0(YKHO):\n return str(YKHO.rank)",
"def Z2tL(YKHO, gwAu):\n if gwAu < 0 or gwAu > 1:\n raise vtwp('Argument threshold must satisfy 0 <= threshold <= 1.')\n q7In = 1 / oyIN.pi * oyIN.arccos(gwAu)\n return YKHO._qsve.to_binary_dec... | [
"0.6593619",
"0.6022002",
"0.56026626",
"0.5538748",
"0.53891945",
"0.5351683",
"0.5284331",
"0.52622",
"0.52310747",
"0.5225471",
"0.5217082",
"0.5201264",
"0.51567566",
"0.5155428",
"0.5123787",
"0.51021874",
"0.5084797",
"0.5050555",
"0.50300705",
"0.50247926",
"0.5008611"... | 0.8312594 | 0 |
Parsing a datetime into a pandas.Timestamp | def yAYR(YKHO):
LgH1 = FXGE.timezone('Europe/Brussels')
U2Vz = LgH1.localize(JRYC.datetime(2014, 11, 23, 1, 2, 3))
qtWj = FXGE.UTC.localize(JRYC.datetime(1970, 1, 1, 0, 0, 0))
BsiW = (U2Vz - qtWj).total_seconds()
y5bX = feVn(U2Vz)
YKHO.assertEqual(y5bX.value / 1000000000.0, BsiW) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cUyl(i8WE):\n return reci()._to_python(i8WE)",
"def cUyl(rdlD):\n X4eE = rLdf.Timestamp(rdlD['raw_timestamp_part_1'], unit='s')\n h5hN = rLdf.Timedelta(rdlD['raw_timestamp_part_2'], unit='microseconds')\n return X4eE + h5hN",
"def cXBI(yDqo, BWXx) -> umfa:\n if type(BWXx) in [oyIN.float64, o... | [
"0.66713554",
"0.66511303",
"0.64544904",
"0.64049304",
"0.6398411",
"0.63614136",
"0.6346307",
"0.6269649",
"0.6210043",
"0.6187754",
"0.61801153",
"0.61687887",
"0.6164123",
"0.6163249",
"0.6162522",
"0.6138763",
"0.6111186",
"0.60905814",
"0.60867035",
"0.607121",
"0.60709... | 0.0 | -1 |
Check the user is allowed to access the news index list | def UFlQ(YKHO):
YKHO.assertStatusCode(YKHO.url, 200) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def V2xZ(YKHO):\n YKHO.check_index_and_outline(YKHO.client)",
"def KKMP(YKHO, CBIr):\n return True",
"def td0_(YKHO):\n YKHO.assertStatusCode(YKHO.url, 403)",
"def nCBc():\n c5ow = Er1K.get_doc('User', Er1K.session.user)\n Tf5Y = set([LmAn.role for LmAn in c5ow.roles])\n return bool(Tf5Y & ... | [
"0.71869683",
"0.701034",
"0.6941104",
"0.6793444",
"0.67805856",
"0.67128044",
"0.66727525",
"0.66707075",
"0.66169983",
"0.6611218",
"0.65815014",
"0.65591043",
"0.6556533",
"0.6549251",
"0.6537417",
"0.6531668",
"0.65135354",
"0.65135354",
"0.65135354",
"0.64980245",
"0.64... | 0.72420925 | 0 |
Test user can not edit without permission | def gZZn(YKHO):
YKHO.assertStatusCode(YKHO.url, 403) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SOW0(YKHO):\n YKHO.assertStatusCode(YKHO.url, 403)",
"def VqzN(YKHO):\n b5K5 = mv1M('userid')\n dZPi = r2Kd('BRS', 'brs', 'brS')\n YKHO.db.retrieve.return_value = b5K5\n YKHO.db.query.return_value = [dZPi]\n with YKHO.app.app_context():\n YKHO.assertTupleEqual(YKHO.testcommand.handle... | [
"0.8186143",
"0.78191847",
"0.7762394",
"0.7759971",
"0.77389044",
"0.7626638",
"0.7610116",
"0.75772184",
"0.75056833",
"0.7469706",
"0.74189234",
"0.7386552",
"0.73486775",
"0.7288264",
"0.72760946",
"0.7274553",
"0.7251353",
"0.72066283",
"0.7193407",
"0.7173011",
"0.71517... | 0.0 | -1 |
Test users can unpublish NewsItems | def bsQE(YKHO):
YKHO.assertStatusCode(YKHO.url, 200) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T7Gh(YKHO):\n geh0 = YKHO.client.get(gxEw('wagtailnews:index', kwargs={'pk': YKHO.index.pk}))\n YKHO.assertContains(geh0, YKHO.url)",
"def RVyE(YKHO):\n geh0 = YKHO.client.get(gxEw('wagtailnews:index', kwargs={'pk': YKHO.index.pk}))\n YKHO.assertNotContains(geh0, YKHO.url)",
"def y6G9(YKHO):\n ... | [
"0.7390404",
"0.7325027",
"0.72067845",
"0.6946993",
"0.67321724",
"0.65183187",
"0.63950413",
"0.6372304",
"0.62763035",
"0.6249247",
"0.6227952",
"0.6131288",
"0.61038554",
"0.6050085",
"0.6009835",
"0.5970444",
"0.59577054",
"0.594893",
"0.594354",
"0.5930259",
"0.59085625... | 0.0 | -1 |
Test that the delete button appears on the index page | def z7ua(YKHO):
geh0 = YKHO.client.get(gxEw('wagtailnews:index', kwargs={'pk': YKHO.index.pk}))
YKHO.assertContains(geh0, YKHO.url) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nJyD(YKHO):\n pass",
"def vTdy(YKHO):\n geh0 = YKHO.client.get(gxEw('wagtailnews:edit', kwargs={'pk': YKHO.index.pk, 'newsitem_pk': YKHO.newsitem.pk}))\n YKHO.assertContains(geh0, YKHO.url)",
"def uh5h(YKHO):\n geh0 = YKHO.client.get(gxEw('wagtailnews:index', kwargs={'pk': YKHO.index.pk}))\n ... | [
"0.7964029",
"0.7892996",
"0.7400673",
"0.73430234",
"0.71478194",
"0.7119191",
"0.7053078",
"0.6989711",
"0.6853455",
"0.6781707",
"0.6727742",
"0.6702557",
"0.66956884",
"0.6683815",
"0.6649543",
"0.66001225",
"0.65985805",
"0.65659857",
"0.6558182",
"0.6522168",
"0.6506768... | 0.81418383 | 0 |
Test that the delete button appears on the edit page | def vTdy(YKHO):
geh0 = YKHO.client.get(gxEw('wagtailnews:edit', kwargs={'pk': YKHO.index.pk, 'newsitem_pk': YKHO.newsitem.pk}))
YKHO.assertContains(geh0, YKHO.url) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nJyD(YKHO):\n pass",
"def DrvG(YKHO):\n geh0 = YKHO.client.get(gxEw('wagtailnews:edit', kwargs={'pk': YKHO.index.pk, 'newsitem_pk': YKHO.newsitem.pk}))\n YKHO.assertNotContains(geh0, YKHO.url)",
"def DlFY(YKHO):\n VA7R = YKHO.client.get('/papers/commentary/1/delete')\n YKHO.assertEqual(VA7R.... | [
"0.8166414",
"0.7414952",
"0.723374",
"0.7127024",
"0.6995213",
"0.68870395",
"0.6840543",
"0.67911434",
"0.6724883",
"0.6652456",
"0.66225034",
"0.65894556",
"0.655768",
"0.6549066",
"0.6507977",
"0.6503928",
"0.6462864",
"0.6460414",
"0.64468193",
"0.64352983",
"0.637209",
... | 0.82615966 | 0 |
Quantify the rhythmicity of an oscillation using lagged coherence. | def f2v_(wEsz, E2_z, Vb5F, qCDO=3, fJ9b=1, J0YH=False):
J1c0 = oyIN.arange(E2_z[0], E2_z[1] + fJ9b, fJ9b)
z5la = oyIN.zeros(len(J1c0))
for QyVM, QTg7 in enumerate(J1c0):
z5la[QyVM] = wj0R(wEsz, QTg7, Vb5F, n_cycles=qCDO)
if J0YH:
return (z5la, J1c0)
else:
return oyIN.mean(z5l... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MBld(YKHO):\n YKHO.strehl = oyIN.exp(-1 * (2 * oyIN.pi / YKHO.science_wavelength * YKHO.high_order_wfe) ** 2)",
"def g2Wb(vexM):\n return 0.49 * vexM ** (2.0 / 3) / (0.6 * vexM ** (2.0 / 3) + RKD7(1 + vexM ** (1.0 / 3)))",
"def q7BE(ycBG, By5j):\n FxxR = mV9l(0, 1, ycBG, By5j)\n T_9n = mV9l(2, ... | [
"0.5506311",
"0.54322857",
"0.54039633",
"0.53244144",
"0.5197453",
"0.51922834",
"0.5187615",
"0.5161913",
"0.5131058",
"0.5111093",
"0.50948024",
"0.5079271",
"0.5075758",
"0.5067517",
"0.50656",
"0.5057913",
"0.5053487",
"0.5033692",
"0.5029003",
"0.50254285",
"0.5017855",... | 0.0 | -1 |
Terminate the connection between the specified analytic and the video source. Does not terminate the service, so the service will still accept new configuration requests. | def XnNM(OaeV, lrPn, FWbf):
x0hE = ua0a.ConfigClient(host=lrPn, port=FWbf)
x0hE.kill() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _JT6(YKHO):\n YKHO._periph.stop_advertising()",
"def fFx9(YKHO):\n try:\n YKHO.api.transport.session.close()\n except Exception as e:\n RKD7.debug(f'Failed to close VSO API connection with: {tTpl}')",
"def W4JM(YKHO):\n for pOv4 in YKHO._deathCandidates.itervalues():\n pOv4... | [
"0.605665",
"0.5903019",
"0.5880774",
"0.587189",
"0.5814706",
"0.56979114",
"0.5695248",
"0.56684774",
"0.56481856",
"0.56481856",
"0.56199515",
"0.55669135",
"0.5565821",
"0.5560698",
"0.55319697",
"0.54918116",
"0.5473794",
"0.5461876",
"0.5455388",
"0.54313624",
"0.542883... | 0.6198811 | 0 |
Here we have to return the item requested by `idx` The PyTorch DataLoader class will use this method to make an iterable for our training or validation loop. | def OP2O(YKHO, or8S):
VXjJ = YKHO.images[or8S]
UXqs = YKHO.labels[or8S].split(' ')[-1]
VXjJ = hnIv.open(VXjJ)
VXjJ = VXjJ.convert('RGB')
VXjJ = YKHO.transform(VXjJ)
return (VXjJ, UXqs[:-1]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OP2O(YKHO, d6pt):\n bS0K = YKHO.indexes[d6pt * YKHO.batch_size:(d6pt + 1) * YKHO.batch_size]\n MTZi = [YKHO.list_IDs[G1Hx] for G1Hx in bS0K]\n EcVT, LVAh = YKHO.__data_generation(MTZi)\n return (EcVT, LVAh)",
"def OP2O(YKHO, or8S):\n return YKHO.batches[or8S]",
"def OP2O(YKHO, d6pt):\n bS... | [
"0.74892426",
"0.73380893",
"0.7252037",
"0.7252037",
"0.7225515",
"0.7225515",
"0.72105503",
"0.7205475",
"0.71967584",
"0.7196699",
"0.7186608",
"0.7160526",
"0.70343167",
"0.70343167",
"0.69605625",
"0.695354",
"0.69118977",
"0.6877463",
"0.6862981",
"0.6838847",
"0.683674... | 0.0 | -1 |
Build a heap from any list | def QZno(YKHO, RXGZ, hF6h=False):
YKHO._heap = RXGZ[:]
Pc6G = len(YKHO._heap) // 2 - 1
while Pc6G >= 0:
YKHO._perc_down(Pc6G)
Pc6G = Pc6G - 1
if hF6h:
print(YKHO._heap) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def X6SM(YKHO, Oaw2):\n YKHO.heaplist = YKHO.heaplist + Oaw2\n YKHO.currentsize = len(Oaw2)\n d6pt = YKHO.currentsize // 2\n while d6pt > 0:\n YKHO.shift_item_down(d6pt)\n d6pt -= 1",
"def GUTP(YKHO, ybN4):\n YRbF = len(ybN4) // 2\n YKHO.currentSize = len(ybN4)\n YKHO.heapList ... | [
"0.76261926",
"0.7623257",
"0.76100385",
"0.75984156",
"0.7476745",
"0.7468826",
"0.7464773",
"0.74451417",
"0.7419377",
"0.7419377",
"0.73608005",
"0.7357161",
"0.72729564",
"0.7228793",
"0.7202468",
"0.71796215",
"0.7140627",
"0.700787",
"0.6988573",
"0.69858456",
"0.694692... | 0.0 | -1 |
Generates negative 2D bounding boxes. This is computed in a semibrute force fashion. For any given bounding box, we first try to calculate the desired shift based on the selected IoU. If this failes, we just randomly shift the centroid and generate new bounding boxes. If it lies within the desired IoU threshold bound, ... | def LJWD(dgiT, SIPI, S23d, u1Fq, gGnb, FJa7=False):
o4D3 = dgiT.x1
si3g = dgiT.y1
ajwV = dgiT.x2
skBL = dgiT.y2
TVTK = ajwV - o4D3
u54L = skBL - si3g
ES7K = TVTK / 2
tUBi = u54L / 2
P96j = False
Ls8o = 0
Diel = []
PXPZ = 0
while Ls8o < gGnb:
if not P96j and (n... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EQql(dgiT, oJrQ, S23d, u1Fq, gGnb):\n MSlT = SeSY.compute_box_corners_3d(dgiT)\n assert len(MSlT) > 0\n Wqlh = MSlT[:, 0]\n bskW = MSlT[:, 1]\n vWyn = MSlT[:, 3]\n Ls8o = 0\n Diel = []\n while Ls8o < gGnb:\n DLY2 = float(oyIN.random.uniform(Wqlh[0], vWyn[0], 1))\n R28v = f... | [
"0.69121605",
"0.6865389",
"0.6467625",
"0.6369781",
"0.62754124",
"0.6056862",
"0.6002797",
"0.5892907",
"0.5846243",
"0.5825292",
"0.5823235",
"0.580352",
"0.5802652",
"0.5774881",
"0.57701665",
"0.5769676",
"0.5751968",
"0.5746477",
"0.5703305",
"0.5696509",
"0.56963754",
... | 0.7597889 | 0 |
Generates negative 2D bounding boxes. This is computed in a brute force fashion. For any given bounding box, we randomly shift the centroid and generate new bounding boxes and if it lies within the desired IoU threshold bound, we will keep it. Otherwise it is thrown out and this is repeated until number of valid sample... | def kpZE(dgiT, SIPI, S23d, u1Fq, gGnb):
o4D3 = dgiT.x1
si3g = dgiT.y1
ajwV = dgiT.x2
skBL = dgiT.y2
q_cO = (ajwV - o4D3) / 2
Q_eH = (skBL - si3g) / 2
Ls8o = 0
Diel = []
while Ls8o < gGnb:
DLY2 = oyIN.random.uniform(o4D3, ajwV, 1)
UXLy = oyIN.random.uniform(si3g, skBL,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LJWD(dgiT, SIPI, S23d, u1Fq, gGnb, FJa7=False):\n o4D3 = dgiT.x1\n si3g = dgiT.y1\n ajwV = dgiT.x2\n skBL = dgiT.y2\n TVTK = ajwV - o4D3\n u54L = skBL - si3g\n ES7K = TVTK / 2\n tUBi = u54L / 2\n P96j = False\n Ls8o = 0\n Diel = []\n PXPZ = 0\n while Ls8o < gGnb:\n ... | [
"0.7722662",
"0.71809816",
"0.674753",
"0.64723235",
"0.6354109",
"0.6349555",
"0.634271",
"0.63150364",
"0.6310376",
"0.6043694",
"0.60284215",
"0.6015984",
"0.6009575",
"0.5999829",
"0.59859705",
"0.59692276",
"0.59401596",
"0.59201664",
"0.5919447",
"0.59148026",
"0.589876... | 0.7171472 | 2 |
Generates negative 3D bounding boxes. This is the 3D version of generate_negative_3d_bb. | def EQql(dgiT, oJrQ, S23d, u1Fq, gGnb):
MSlT = SeSY.compute_box_corners_3d(dgiT)
assert len(MSlT) > 0
Wqlh = MSlT[:, 0]
bskW = MSlT[:, 1]
vWyn = MSlT[:, 3]
Ls8o = 0
Diel = []
while Ls8o < gGnb:
DLY2 = float(oyIN.random.uniform(Wqlh[0], vWyn[0], 1))
R28v = float(oyIN.rando... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LJWD(dgiT, SIPI, S23d, u1Fq, gGnb, FJa7=False):\n o4D3 = dgiT.x1\n si3g = dgiT.y1\n ajwV = dgiT.x2\n skBL = dgiT.y2\n TVTK = ajwV - o4D3\n u54L = skBL - si3g\n ES7K = TVTK / 2\n tUBi = u54L / 2\n P96j = False\n Ls8o = 0\n Diel = []\n PXPZ = 0\n while Ls8o < gGnb:\n ... | [
"0.6293331",
"0.6009182",
"0.5801561",
"0.5799778",
"0.5769917",
"0.57271326",
"0.5657494",
"0.5643734",
"0.5588344",
"0.5588344",
"0.5566045",
"0.55655116",
"0.55625165",
"0.55415875",
"0.55285263",
"0.54892945",
"0.5468024",
"0.5447369",
"0.5443272",
"0.54351157",
"0.542643... | 0.7253786 | 0 |
Add the amount of Water to the reserve | def OEwK(YKHO, EmMj):
YKHO.amount = max(0, YKHO.amount + EmMj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Tum5(YKHO, XR14):\n YKHO.amount = max(0, YKHO.amount - XR14)",
"def mbp4(YKHO, Z9Gk):\n YKHO.ingredients.append(Z9Gk)\n return YKHO",
"def lQCX(YKHO, Z5kt):\n YKHO.water_level += Z5kt\n if YKHO.water_level < 0:\n YKHO.water_level = 0.0",
"def FcNP(YKHO, FcNP):\n YKHO._reserve = F... | [
"0.678656",
"0.64859027",
"0.64751625",
"0.636471",
"0.63474596",
"0.6072444",
"0.6055405",
"0.60548395",
"0.60482985",
"0.59617096",
"0.59285605",
"0.58456117",
"0.5789698",
"0.57580453",
"0.57145965",
"0.5689935",
"0.56603473",
"0.56373537",
"0.5628167",
"0.55672455",
"0.55... | 0.63367224 | 5 |
plots the graph for life expectancy vs income category for the years from 1960 to 2015 | def vDeZ(lGE9, n2Q1, SpII, WotO):
wbdQ = sorted(YYZG())
WotO.goto(-250, 2.5 * wbdQ[0] - 15)
WotO.rt(90)
for or8S in range(1, len(wbdQ)):
WotO.pd()
WotO.setpos(-250 + or8S * 8.8, 2.5 * wbdQ[or8S] - 25)
r4Uy = sorted(J8s3())
lGE9.goto(-250, 2.5 * r4Uy[0] - 15)
lGE9.rt(90)
f... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zPgn(eHU7, lO87):\n Rfaw = eHU7.loc[lO87]\n QrM1.figure(figsize=(10, 8))\n Rfaw.hist(bins=100, alpha=0.3, color='k')\n QrM1.title('Income Distribution of Year %s' % lO87)\n QrM1.xlabel('Income per person')\n QrM1.ylabel('Frequency')\n QrM1.savefig('Income distribution of year %s' % lO87)",... | [
"0.7102294",
"0.6791818",
"0.66974103",
"0.66413957",
"0.65676576",
"0.63302284",
"0.63299006",
"0.6252672",
"0.6244726",
"0.6215606",
"0.6192069",
"0.6141037",
"0.59000665",
"0.58274305",
"0.5784233",
"0.5737825",
"0.57364583",
"0.57241774",
"0.56863356",
"0.56375414",
"0.56... | 0.0 | -1 |
Checks if the user has money. | def Iug3(YKHO) -> bool:
return YKHO.money > 0.0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OUJd(cuiw, uJjO, Z5kt):\n spN7 = ksiw(cuiw, uJjO)\n if spN7 + Z5kt < 0:\n raise rgT_('Not enough money in your wallet!')",
"def Pd_p():\n print(L7GK)",
"def BKk1(CBIr):\n return _1D2(CBIr)",
"def R4xu(YKHO, uJjO, CCr2, **B2fa):\n CBIr = mv1M.objects(user_id=uJjO).first()\n if CCr... | [
"0.72290194",
"0.70000076",
"0.6976345",
"0.67223203",
"0.6660722",
"0.6602281",
"0.6554564",
"0.65110725",
"0.6492368",
"0.6469948",
"0.64189357",
"0.6256046",
"0.6249659",
"0.62413937",
"0.62168956",
"0.6193624",
"0.6191508",
"0.6180676",
"0.615271",
"0.6132183",
"0.6107606... | 0.784849 | 0 |
Validates the image_info dictionary has all required information. | def XdjK(YBcr, F5V2=None, **B2fa):
F5V2 = F5V2 or {}
Kj9y = False
WxGO = False
WSdE = False
for Jyyj in ['id', 'urls']:
if Jyyj not in F5V2:
tO9_ = "Image is missing '{}' field.".format(Jyyj)
raise UAju.InvalidCommandParamsError(tO9_)
if type(F5V2['urls']) != list... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eIa7(YKHO):\n YKHO.validate(None, None, N_image_shape=(3, 2, 8, 8), N_filter_shape=(4, 2, 5, 5))\n YKHO.validate((3, 2, None, None), None, N_image_shape=(3, 2, 8, 8), N_filter_shape=(4, 2, 5, 5))\n YKHO.validate((None, 2, None, None), (None, 2, 5, 5), N_image_shape=(3, 2, 8, 8), N_filter_shape=(4, 2, ... | [
"0.6829416",
"0.64101285",
"0.6372421",
"0.6283547",
"0.62626284",
"0.623681",
"0.61904836",
"0.6102994",
"0.6038631",
"0.6016138",
"0.5986248",
"0.59705144",
"0.59603906",
"0.59208983",
"0.589194",
"0.5877769",
"0.5828762",
"0.5828762",
"0.58162236",
"0.5749991",
"0.56880915... | 0.74150187 | 0 |
Map raw labels onto their numerical representation. | def Sct5(YKHO):
FRbL = mBkc(YKHO.raw_labels)
if 'oos' in FRbL:
FRbL.pop('oos')
OrFa, hCJH = zip(*sorted(FRbL.items()))
OrFa, hCJH = (list(OrFa), list(hCJH))
Truj = {UXqs: d6pt for d6pt, UXqs in enumerate(OrFa)}
EewL = [Truj.get(UXqs, -1) for UXqs in YKHO.raw_labels]
return (Truj, Eew... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lr5T(YKHO, Crrw):\n ewCu = 0\n YX0M = []\n for UXqs in Crrw:\n if UXqs not in YKHO.labelDict:\n YKHO.labelDict[UXqs] = ewCu\n YKHO.backwards_conversion[ewCu] = UXqs\n ewCu += 1\n YX0M += [YKHO.labelDict[UXqs]]\n return oyIN.array(YX0M)",
"def M7Cn(Cr... | [
"0.7552026",
"0.673033",
"0.65772784",
"0.65754217",
"0.6574145",
"0.652427",
"0.6432568",
"0.6432568",
"0.64288896",
"0.6390633",
"0.6351704",
"0.6344979",
"0.63178086",
"0.62096834",
"0.6207216",
"0.6198722",
"0.61695147",
"0.6168775",
"0.615346",
"0.6135756",
"0.6106407",
... | 0.56232923 | 60 |
Get train/dev/test split of the OOD dataset in the form suitable for transformer models. | def cIMh(nm_M, b0j5, ppcb=True):
gMbG = []
for vcn7 in uOPl:
__n6 = owt5(nm_M(subset=vcn7), b0j5.tokenize, ppcb)
__n6.vectorize_texts(b0j5)
gMbG.append(__n6)
return gMbG | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hVw6(YKHO):\n EcVT, LVAh, bGrB, bGrB = YKHO.get_subsets()\n return bHtP(EcVT, LVAh, test_size=0.3, random_state=42)",
"def jgLX(YKHO):\n return [{'split': X3eO.DatasetSplit.TRAIN, 'shards': 80}, {'split': X3eO.DatasetSplit.EVAL, 'shards': 2}]",
"def jgLX(YKHO):\n return [{'split': X3eO.DatasetS... | [
"0.73489857",
"0.7299666",
"0.7240295",
"0.6996687",
"0.69727206",
"0.6866645",
"0.6861226",
"0.68377197",
"0.68276453",
"0.6814517",
"0.680304",
"0.678786",
"0.6782424",
"0.6765372",
"0.67429614",
"0.67218626",
"0.6718416",
"0.6713332",
"0.67119724",
"0.67029387",
"0.6696772... | 0.0 | -1 |
Get loader class for a dataset. | def RuZU(j3aw, **B2fa):
if j3aw == 'rostd':
DWkG = ub97(O9Tb, data_root_dir='data/rostd', use_coarse_labels=False)
elif j3aw == 'rostd_coarse':
DWkG = ub97(O9Tb, data_root_dir='data/rostd', use_coarse_labels=True)
elif j3aw == 'snips_75':
DWkG = ub97(e6Tz, data_root_dir='data/snips',... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DWkG(YKHO):\n return YKHO.loader_class()",
"def DpRF(j3aw):\n return lQn7(j3aw)",
"def TOre(__n6):\n if __n6 == 'chaos':\n return nOUK()\n return None",
"def JWbQ(mWFP: str, **B2fa) -> zQKy.DataLoader:\n if mWFP == 'synthetic_images':\n G9jH.info('Creating synthetic image dat... | [
"0.746107",
"0.6963209",
"0.6959952",
"0.68778324",
"0.665751",
"0.66192013",
"0.6553479",
"0.6545444",
"0.65317357",
"0.6488149",
"0.6470945",
"0.6427437",
"0.63847756",
"0.63402325",
"0.6329773",
"0.6324222",
"0.63233507",
"0.62848765",
"0.6283929",
"0.6254267",
"0.625302",... | 0.7470058 | 0 |
Return the start time of the simulation. | def jSV8(gCuF: SimulationSettingsModel):
return gCuF.project.start_time | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SWox(YKHO) -> qe4Y.Output[h8nf[int]]:\n return qe4Y.get(YKHO, 'start_time')",
"def SWox(YKHO) -> float:\n return YKHO._start_time",
"def SWox(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'start_time')",
"def SWox(YKHO):\n return YKHO.__start",
"def SWox(YKHO) -> str:\n return qe4Y.... | [
"0.8377511",
"0.83447194",
"0.8335398",
"0.8305851",
"0.8246277",
"0.8246277",
"0.8148698",
"0.8148698",
"0.8148698",
"0.8148698",
"0.8148698",
"0.8148698",
"0.8148698",
"0.8148698",
"0.80517",
"0.80485797",
"0.80266994",
"0.7996719",
"0.7996719",
"0.79724574",
"0.79643977",
... | 0.77836007 | 30 |
Return a loadshape dataframe representing all available data. This assumes that a loadshape has been selected in OpenDSS. | def x8gy(gCuF: SimulationSettingsModel):
SWox = gCuF.project.loadshape_start_time
nPrm = _BOK.LoadShape.PMult()
VOlW = fCoM(seconds=_BOK.LoadShape.SInterval())
Xkrd = _BOK.LoadShape.Npts()
_0VL = []
fkZM = SWox
for bGrB in range(Xkrd):
_0VL.append(fkZM)
fkZM += VOlW
retur... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lkiT(YKHO) -> rLdf.DataFrame:\n if not YKHO.data_is_loaded:\n YKHO.load_data()\n return YKHO._available_to_lay",
"def bOBl(YKHO):\n if not YKHO.all_records:\n print('No rows cached.')\n return\n YDX_ = [rdlD.as_dict() for rdlD in YKHO.all_records]\n ZLJ_ = YKHO.all_records... | [
"0.6330568",
"0.6241007",
"0.623866",
"0.62355924",
"0.6206864",
"0.6149052",
"0.61322594",
"0.6111406",
"0.6104934",
"0.6099539",
"0.6048846",
"0.5989554",
"0.597556",
"0.5946196",
"0.59261596",
"0.5890683",
"0.5890246",
"0.58660966",
"0.5862521",
"0.58139795",
"0.5796813",
... | 0.6537646 | 0 |
Read filename into a pandas Dataframe and extract items in ids_df. It reads items (flights, positions or events) from filename into a pandas Dataframe and merges the items with ids_df on FLIGHT_ID as a UUID. It writes a copy of the Dataframe items WITHOUT mathing ids into a file called 'new_' + filename Returns a panda... | def ZvdT(Ux0P, heZg, B7W0=[]):
mggM = rLdf.DataFrame()
ayAN = rLdf.DataFrame()
try:
if B7W0:
ayAN = rLdf.read_csv(Ux0P, parse_dates=B7W0, converters={'FLIGHT_ID': lambda WKvO: S7kj(WKvO)}, memory_map=True)
else:
ayAN = rLdf.read_csv(Ux0P, converters={'FLIGHT_ID': lamb... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HPpg(Ux0P, heZg, *, B7W0=['TIME']):\n jQ3Z = rLdf.read_csv(Ux0P, parse_dates=B7W0, memory_map=True)\n return rLdf.merge(heZg, jQ3Z, left_index=True, right_on='FLIGHT_ID')",
"def KDT7(iumf):\n Q355 = iumf[0]\n YdyG = iumf[1]\n scDT = iumf[2]\n rSNx = iumf[3]\n IgoB = [''] * len(WKrv)\n ... | [
"0.7330701",
"0.5534461",
"0.54933244",
"0.5378836",
"0.52908814",
"0.52467626",
"0.5233091",
"0.52184945",
"0.5193366",
"0.5172495",
"0.51131463",
"0.51092166",
"0.50987095",
"0.509562",
"0.5085387",
"0.50284123",
"0.49850348",
"0.4975146",
"0.49732038",
"0.49651432",
"0.496... | 0.71169 | 1 |
The row principal coordinates. | def LZ6E(YKHO, EcVT):
BfDw.validation.check_is_fitted(YKHO, 's_')
return super().row_coordinates(X=rLdf.concat((EcVT.select_dtypes(exclude=YKHO.categorical_dtypes), YKHO.one_hot_.transform(EcVT.select_dtypes(include=YKHO.categorical_dtypes))), axis='columns')) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AQnM(YKHO):\n KCHu = [YKHO.voigt[YRbF] for YRbF in range(6)]\n MMaI = (KCHu[0] + KCHu[1]) / 2\n ZpHo = (KCHu[1] + KCHu[2]) / 2\n BY_0 = (KCHu[2] + KCHu[0]) / 2\n mcTd = ((KCHu[0] - KCHu[1]) ** 2 + (2 * KCHu[3]) ** 2) ** (1 / 2) / 2\n FnfU = ((KCHu[1] - KCHu[2]) ** 2 + (2 * KCHu[4]) ** 2) ** (... | [
"0.65612423",
"0.61977327",
"0.6183964",
"0.6094005",
"0.60902977",
"0.6071574",
"0.6052542",
"0.6049814",
"0.6042885",
"0.6027983",
"0.59492373",
"0.5946421",
"0.5932701",
"0.5921994",
"0.5921964",
"0.58941716",
"0.58855975",
"0.58855975",
"0.58805096",
"0.58790445",
"0.5876... | 0.0 | -1 |
Return all leaf nodes of the graph Note that this does not necessarily mean that they will all be paragraphs We're returning all the nodes that do not have predecessors in the direct graph | def WKa2(YKHO, nPrm=True):
WKa2 = [Q6kx for Q6kx in YKHO.graph.nodes() if YKHO.graph.in_degree(Q6kx) != 0 and YKHO.graph.out_degree(Q6kx) == 0]
for Q6kx in WKa2:
yield ((Q6kx, YKHO.graph.node[Q6kx]) if nPrm else Q6kx) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WKa2(YKHO):\n aeQa = set([ZfUD for XuXy in YKHO.edges.values() for ZfUD in XuXy])\n return (WKvO for WKvO in YKHO.nodes if WKvO not in aeQa)",
"def WKa2(YKHO):\n return YKHO.nodes.filter(lft=FYrf.F('rght') - 1)",
"def lju5(YKHO):\n pass",
"def iQ0M(YKHO):\n for Q6kx in YKHO.graph:\n ... | [
"0.775657",
"0.7487987",
"0.7303196",
"0.7146874",
"0.70538235",
"0.68833375",
"0.663359",
"0.65542793",
"0.6508919",
"0.6458122",
"0.64562976",
"0.6455231",
"0.6405333",
"0.64006096",
"0.63531864",
"0.63287926",
"0.6294102",
"0.6271516",
"0.62543935",
"0.62504905",
"0.621953... | 0.6968675 | 5 |
get maximum depth of the graph | def sX7H(YKHO):
qi10 = 0
for Q6kx, nPrm in YKHO.traverse():
qi10 = max(qi10, nPrm['level'])
return qi10 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qi10(YKHO) -> int:\n return qe4Y.get(YKHO, 'max_depth')",
"def rb7a(YKHO):\n return YKHO._max_depth",
"def tALi(YKHO):\n return YKHO.MAX_DEPTH",
"def qi10(YKHO) -> int:\n return 0",
"def rb7a(YKHO):\n return max((exwG.depth for exwG in YKHO.iternodes()))",
"def qi10(YKHO) -> h8nf[qe4Y.... | [
"0.82280046",
"0.82237023",
"0.8172066",
"0.81567633",
"0.8010133",
"0.79035956",
"0.7708579",
"0.7676142",
"0.75978315",
"0.7511025",
"0.75060564",
"0.7479909",
"0.7451953",
"0.742769",
"0.73627543",
"0.7344261",
"0.7339484",
"0.72891027",
"0.727792",
"0.7275108",
"0.7264026... | 0.81646323 | 3 |
Reads data from buffer or fileas pandas.DataFrame. Gets the same arguments like pandas.read_csv and pandas.read_xlsx.Uses proper function depending on file extension. | def ZAQi(gIsw: str, NRcB=None, **B2fa) -> rLdf.DataFrame:
gIsw = gIsw.strip()
Fst3 = gIsw.split('.')[-1].lower()
if Fst3 in PXla.keys():
if not NRcB:
if Hy7s.path.exists(Hy7s.path.dirname(gIsw)):
nPrm = PXla[Fst3](gIsw, **B2fa)
else:
raise IOEr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cO1h(**B2fa) -> hxoQ:\n cGGv.subscribe(R0S0)\n try:\n Jv7P = Zey3.read_csv_glob(**B2fa)\n except AttributeError:\n raise AttributeError('read_csv_glob() is only implemented for pandas on Ray.')\n if isinstance(Jv7P, CwDs.io.parsers.TextFileReader):\n N5Pj = Jv7P.read\n J... | [
"0.68633926",
"0.68517303",
"0.67032105",
"0.6589057",
"0.6454073",
"0.6440621",
"0.6402511",
"0.6398542",
"0.6308621",
"0.6294428",
"0.62939626",
"0.6235024",
"0.62328905",
"0.6164969",
"0.61351067",
"0.6109234",
"0.6075392",
"0.6034535",
"0.60162234",
"0.60016567",
"0.59829... | 0.8271098 | 0 |
Returns all 3x3 slices of the board corresponding to neighbors for all cells on the board. | def nkNO(YKHO):
r8hN, exwG = YKHO.board.shape
return Tb35(YKHO.expanded_board, shape=(r8hN, exwG, 3, 3), strides=YKHO.expanded_board.strides + YKHO.expanded_board.strides) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def A_IW(YRbF: int, r845: int) -> oyIN.array:\n G1Hx, vC9B = (YRbF // 3 * 3, r845 // 3 * 3)\n return oyIN.array([oyIN.r_[YRbF:YRbF:8j, 0:YRbF, YRbF + 1:9, oyIN.repeat(oyIN.r_[G1Hx:YRbF, YRbF + 1:G1Hx + 3], 2)], oyIN.r_[0:r845, r845 + 1:9, r845:r845:8j, oyIN.tile(oyIN.r_[vC9B:r845, r845 + 1:vC9B + 3], 2)]], d... | [
"0.6740089",
"0.66890025",
"0.66793936",
"0.6594341",
"0.65792316",
"0.6524311",
"0.6460481",
"0.63912827",
"0.6384827",
"0.6378845",
"0.63124657",
"0.6298454",
"0.62896365",
"0.62230825",
"0.61602503",
"0.6158862",
"0.6150496",
"0.6133123",
"0.61103034",
"0.6041652",
"0.6035... | 0.79104733 | 0 |
For a square matrix with shape (`dimension`, `dimension`), return a list of indices into a vector with `dimension dimension` elements that correspond to its upper triangular part after reshaping. | def U20y(e_2d):
assert e_2d > 0, 'tensor_utils.upper_triangular_indices: Dimension must be positive integer!'
for rdlD in range(e_2d):
for iVRZ in range(rdlD + 1, e_2d):
UV0b = e_2d * rdlD + iVRZ
yield UV0b | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Cwus(DbyF):\n ABDL = len(DbyF)\n if ABDL == 1:\n return range(DbyF[0])\n _0VL = [[]]\n while ABDL:\n o_gI = []\n for r845 in range(DbyF[ABDL - 1]):\n o_gI += [[r845] + YRbF for YRbF in _0VL]\n _0VL = o_gI\n ABDL -= 1\n try:\n return [tuple(YRb... | [
"0.61439174",
"0.6052947",
"0.6035017",
"0.60090554",
"0.5936174",
"0.58033603",
"0.57944226",
"0.57944226",
"0.5761883",
"0.5708514",
"0.56910044",
"0.5668839",
"0.5661304",
"0.5629464",
"0.5621799",
"0.5600451",
"0.5595236",
"0.555132",
"0.55404836",
"0.55397177",
"0.553816... | 0.7299493 | 0 |
Convert a datetime to a different format so it can be accessible in Jinja. | def ZTVA(BWXx, format='%b %d'):
return BWXx.strftime(format) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zb98(BWXx, format='datetime'):\n if format == 'datetime':\n K7dV = BWXx.strftime('%d/%m/%Y %H:%M')\n elif format == 'date':\n K7dV = BWXx.strftime('%d/%m/%Y')\n elif format == 'time':\n K7dV = BWXx.strftime('%H:%M')\n return K7dV",
"def Zb98(JRYC):\n return V8MO.format(Gfg... | [
"0.73895514",
"0.7053604",
"0.69976836",
"0.6970745",
"0.69488513",
"0.68443584",
"0.6805817",
"0.6787198",
"0.676419",
"0.6692726",
"0.66346955",
"0.6610277",
"0.6608763",
"0.6596385",
"0.65597314",
"0.6558347",
"0.6536109",
"0.65202",
"0.6515687",
"0.65024954",
"0.64961064"... | 0.6137935 | 47 |
Method to return a single user base on a given id | def JuUv(YKHO, id):
for CBIr in YKHO.users:
if CBIr['id'] == id:
return CBIr | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NMoC(id):\n return mv1M.query.filter_by(id=id).first()",
"def bt8D(YKHO, id):\n return YKHO.users.get(id)",
"def ggdo(Emd4, _eu6):\n CBIr = Emd4.query.filter_by(id=_eu6).first()\n return CBIr",
"def TKWP(id):\n pass",
"def UH_v(id: str) -> mv1M:\n return mv1M.query.get(int(id))",
"d... | [
"0.87406313",
"0.87194085",
"0.86879575",
"0.8629455",
"0.8574395",
"0.854622",
"0.84706885",
"0.84516245",
"0.8389576",
"0.8380215",
"0.83528787",
"0.8348613",
"0.82819223",
"0.8277447",
"0.82162476",
"0.82110035",
"0.82092386",
"0.81851685",
"0.8184536",
"0.8169312",
"0.816... | 0.8726376 | 1 |
Return a probability distribution over which page to visit next, given a current page. With probability `damping_factor`, choose a link at random linked to by `page`. With probability `1 damping_factor`, choose a link at random chosen from all pages in the corpus. | def IyYM(rrSk, B2Dn, S7ZO):
q414 = oRi_(float)
aHJR = len(rrSk)
if not rrSk[B2Dn]:
for Kn5o in rrSk:
q414[Kn5o] += 1 / aHJR
return q414
Ahzk = len(rrSk[B2Dn])
for EdRA in rrSk[B2Dn]:
q414[EdRA] += S7ZO * 1 / Ahzk
for Kn5o in rrSk:
q414[Kn5o] += (1 - S7... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IyYM(rrSk, B2Dn, S7ZO):\n IZxK = dict()\n t2p_ = []\n wPdp = list(rrSk[B2Dn])\n for P6bq in rrSk:\n t2p_.append(P6bq)\n if len(wPdp) == 0:\n print('Current Page does not have any links')\n Q7Be = 1.0 / len(t2p_)\n for PJtN in t2p_:\n IZxK[PJtN] = Q7Be\n ... | [
"0.7992964",
"0.77270436",
"0.764785",
"0.7500536",
"0.72686094",
"0.70465213",
"0.6915432",
"0.68950415",
"0.6844223",
"0.6782304",
"0.6755477",
"0.6724492",
"0.66375583",
"0.6618151",
"0.6553851",
"0.65046436",
"0.63941073",
"0.63314575",
"0.6278812",
"0.62436855",
"0.62332... | 0.7451512 | 4 |
update an existing categories | def QdZT(YKHO, KAOR, vGfb):
KAOR.cat_name = vGfb.get('cat_name', KAOR.cat_name)
KAOR.img = vGfb.get('img', KAOR.img)
KAOR.desc = vGfb.get('desc', KAOR.desc)
KAOR.save()
return KAOR | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QdZT(YKHO, QePW, *qIxc, **B2fa):\n geh0 = super(iGcA).update(YKHO, QePW, *qIxc, *B2fa)\n geh0.data['message'] = 'Categoria ha sido editada'",
"def QdZT(YKHO, QePW, _sei=None):\n if not QePW.auth.user.is_staff:\n return oGir({'message': 'You must be an admin to update categories.'}, status=jGR... | [
"0.7418198",
"0.7234741",
"0.72183055",
"0.7139743",
"0.7106988",
"0.69815934",
"0.6827737",
"0.68089455",
"0.67316884",
"0.67297924",
"0.6729216",
"0.67233735",
"0.66815853",
"0.6635296",
"0.6604073",
"0.65747875",
"0.6562277",
"0.65461564",
"0.6542109",
"0.6527648",
"0.6495... | 0.0 | -1 |
Strip braces enclosing string | def NSJ6(YKHO, wEf2):
bo34.debug('Strip braces')
wEf2 = wEf2.strip()
if wEf2.startswith('{') and wEf2.endswith('}') and YKHO._full_span(wEf2):
return wEf2[1:-1]
return wEf2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mlgG(YKHO, z8T_):\n vKja, P7FL = [z8T_.count(hcXw) for hcXw in '{}']\n if P7FL > vKja:\n QUx7 = z8T_[::-1].replace('}', '', P7FL - vKja)\n z8T_ = QUx7[::-1]\n elif vKja > P7FL:\n z8T_ = z8T_.replace('{', '', vKja - P7FL)\n return z8T_",
"def Hbkc(KCHu):\n Z9rn = Sqqn(KCHu,... | [
"0.7257907",
"0.6704662",
"0.663527",
"0.663437",
"0.65309894",
"0.65099",
"0.6454627",
"0.63949865",
"0.6302393",
"0.6281844",
"0.62191236",
"0.62042516",
"0.6161475",
"0.60913813",
"0.60668725",
"0.6063109",
"0.5937413",
"0.59302425",
"0.58825225",
"0.58386445",
"0.58217025... | 0.76519185 | 0 |
Provides an organization from its given ID. | def PI_r(YKHO, gZ75: Union[str, int], *, NArs: Optional[dict]=None) -> 'resource_types.Organization':
return USaL.Organization(YKHO.__requester).from_id(organization_id=gZ75, parameters=NArs) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PI_r(YKHO, id: str) -> dict[str, ImMB]:\n NArs = {}\n return YKHO.client.get(YKHO._url(id), params=NArs)",
"def wbiw(YKHO, gZ75):\n return mUrV.Organization(YKHO, gZ75)",
"def D1IT(YKHO):\n if YKHO.org_id is not None:\n TC9A.get_itop_class('Organization').find(YKHO.org_id)\n return No... | [
"0.7779527",
"0.7667834",
"0.72960305",
"0.7177982",
"0.6943155",
"0.6880863",
"0.6874825",
"0.6787914",
"0.6783364",
"0.6768005",
"0.6724089",
"0.67040336",
"0.6621863",
"0.65592504",
"0.653614",
"0.6531504",
"0.64872956",
"0.64778906",
"0.6453674",
"0.64502835",
"0.6436561"... | 0.79455 | 0 |
Samples quaternions of random rotations along the zaxis. | def hO0A(YKHO):
if YKHO.z_rotation:
EZ5P = oyIN.random.uniform(high=2 * oyIN.pi, low=0)
return [oyIN.cos(EZ5P / 2), 0, 0, oyIN.sin(EZ5P / 2)]
return [1, 0, 0, 0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Xr0K(UHFx=100):\n or1j = oyIN.random.rand(UHFx, 3)\n I4Qm = oyIN.sqrt(or1j[:, 0])\n TSOA = oyIN.sqrt(1 - or1j[:, 0])\n URBL = oyIN.pi * 2 * or1j[:, 1]\n IHT6 = oyIN.pi * 2 * or1j[:, 2]\n Ylbp = oyIN.zeros((UHFx, 4))\n Ylbp[:, 0] = TSOA * oyIN.sin(URBL)\n Ylbp[:, 1] = TSOA * oyIN.cos(URB... | [
"0.7073986",
"0.68722045",
"0.6529664",
"0.6503195",
"0.6345796",
"0.6336485",
"0.6277915",
"0.61840326",
"0.61288977",
"0.60825557",
"0.6078604",
"0.60223764",
"0.60217965",
"0.60030395",
"0.6001181",
"0.5951943",
"0.59054774",
"0.58579105",
"0.58181906",
"0.57951933",
"0.57... | 0.7299934 | 0 |
Return the lifetime exposure number. Returns | def BOtD(YKHO) -> int:
return YKHO.to_exposure_id() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vMGq(YKHO):\n ITaD = float(YKHO._driver.ExposureTime)\n return ITaD",
"def sTns(YKHO) -> str:\n return qe4Y.get(YKHO, 'lifetime')",
"def z6jr(YKHO):\n return YKHO.life",
"def NLZT(YKHO):\n bGrB, = YKHO.exposuretimes\n return bGrB",
"def z6jr(YKHO):\n if YKHO._life is not None:\n ... | [
"0.68661416",
"0.6797006",
"0.661743",
"0.6530258",
"0.64460176",
"0.6445488",
"0.6433524",
"0.63488317",
"0.6323735",
"0.6315333",
"0.63136095",
"0.6303788",
"0.6302292",
"0.6228902",
"0.6205906",
"0.6149555",
"0.61349577",
"0.6120186",
"0.60959166",
"0.6037626",
"0.5971728"... | 0.6145864 | 16 |
precision positive predictive value | def VvxU(t16z, r4kf):
rhd_ = t16z / (t16z + r4kf)
return rhd_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rhd_(Y8eF, aMgO):\n HRJ_ = wXuO(Y8eF, aMgO)\n ytgA = uBv5(Y8eF, aMgO)\n rhd_ = HRJ_ / (HRJ_ + ytgA)\n return rhd_",
"def rhd_(Y8eF, aMgO):\n COti = CdMZ.sum(CdMZ.round(CdMZ.clip(Y8eF * aMgO, 0, 1)))\n ftZB = CdMZ.sum(CdMZ.round(CdMZ.clip(aMgO, 0, 1)))\n rhd_ = COti / (ftZB + CdMZ.epsilon... | [
"0.7635932",
"0.7559498",
"0.7515403",
"0.7424766",
"0.74078333",
"0.74078333",
"0.74078333",
"0.74078333",
"0.74078333",
"0.74078333",
"0.7381328",
"0.73782855",
"0.73782855",
"0.73782855",
"0.73782855",
"0.73782855",
"0.73782855",
"0.73782855",
"0.73782855",
"0.73782855",
"... | 0.0 | -1 |
CHANGE NAME TO REFERENCE QRES | def IQV3(aaiQ, LC9z=None, zADc=None, _z_n=1):
wvrI, rzJK = FLBp(aaiQ, ibs=LC9z, gt_aids=zADc)
cMbK = (aaiQ.make_smaller_title() + '\n',)
return dHNU(wvrI, rzJK, cMbK, _z_n) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aC0l(YKHO, mWFP):\n pass",
"def mXGw(YKHO, mWFP):\n YKHO._ref_name = mWFP if YKHO._ref_name is None else YKHO._ref_name\n return YKHO",
"def Dokz(YKHO, Dokz):\n YKHO.name = Dokz",
"def VsGB(mWFP: str) -> str:\n return f'\\\\k<{mWFP}>'",
"def qa7e(YKHO, mWFP):\n YKHO.name = mWFP",
"d... | [
"0.6836514",
"0.68362606",
"0.6407378",
"0.6379306",
"0.6241517",
"0.6167758",
"0.6128833",
"0.61171496",
"0.61073583",
"0.60798806",
"0.6016807",
"0.60081804",
"0.5997102",
"0.5988722",
"0.59712064",
"0.59712064",
"0.5968742",
"0.5943854",
"0.5943854",
"0.5943854",
"0.594385... | 0.0 | -1 |
Gets the object_type of this AssetManagedDeviceStatus. The concrete type of this complex type. The ObjectType property must be set explicitly by API clients when the type is ambiguous. In all other cases, the ObjectType is optional. The type is ambiguous when a managed object contains an array of nested documents, and ... | def vcaS(YKHO):
return YKHO._object_type | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vcaS(YKHO):\n if not YKHO.Flags & i8Ys.ACE_OBJECT_TYPE_PRESENT:\n return None\n return YKHO.ObjectType",
"def vcaS(YKHO) -> str:\n return qe4Y.get(YKHO, 'object_type')",
"def vcaS(YKHO) -> str:\n return qe4Y.get(YKHO, 'object_type')",
"def vcaS(YKHO) -> str:\n return qe4Y.get(YKHO, ... | [
"0.67666554",
"0.6751302",
"0.6751302",
"0.6751302",
"0.6751302",
"0.6751302",
"0.6751302",
"0.6751302",
"0.6751302",
"0.6751302",
"0.6751302",
"0.6751302",
"0.6751302",
"0.6751302",
"0.6751302",
"0.6751302",
"0.6751302",
"0.6748769",
"0.670453",
"0.670453",
"0.64563984",
"... | 0.7034013 | 4 |
Sets the object_type of this AssetManagedDeviceStatus. The concrete type of this complex type. The ObjectType property must be set explicitly by API clients when the type is ambiguous. In all other cases, the ObjectType is optional. The type is ambiguous when a managed object contains an array of nested documents, and ... | def vcaS(YKHO, vcaS):
YKHO._object_type = vcaS | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vcaS(YKHO, vcaS: str):\n BbPm = ['actuator', 'sensor', 'human', 'service', 'skill', 'task', 'action', 'healthdata', 'humanrole', 'message', 'permission', 'preference', 'property']\n if vcaS not in BbPm:\n raise ValueError('Invalid value for `object_type` ({0}), must be one of {1}'.format(vcaS, BbP... | [
"0.755974",
"0.5921794",
"0.575162",
"0.56026995",
"0.56026995",
"0.56026995",
"0.56026995",
"0.56026995",
"0.55906165",
"0.5489738",
"0.54524934",
"0.544844",
"0.5446077",
"0.5446077",
"0.5446077",
"0.5446077",
"0.5446077",
"0.5446077",
"0.5446077",
"0.5446077",
"0.5446077",... | 0.7447152 | 5 |
Sets the cloud_port of this AssetManagedDeviceStatus. Port used for the connection to the Cloud by the Device Connector for the Managed Device. | def cve4(YKHO, cve4):
YKHO._cloud_port = cve4 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cve4(YKHO):\n return YKHO._cloud_port",
"def tH0x(YKHO, tH0x):\n YKHO._cloud = tH0x",
"def RZX2(YKHO, RZX2):\n YKHO._cloud_platform = RZX2",
"def bIwZ(YKHO, bIwZ):\n YKHO._port = bIwZ",
"def bIwZ(YKHO, bIwZ):\n YKHO._port = bIwZ",
"def bIwZ(YKHO, bIwZ):\n YKHO._port = bIwZ",
"def ... | [
"0.6861406",
"0.6428192",
"0.63073575",
"0.57456225",
"0.57456225",
"0.57456225",
"0.5698453",
"0.5344858",
"0.53202885",
"0.5274588",
"0.5266092",
"0.5238477",
"0.5181552",
"0.50226223",
"0.5014965",
"0.49952412",
"0.49680263",
"0.49337366",
"0.49337366",
"0.4925041",
"0.492... | 0.8312118 | 0 |
Gets the connection_status of this AssetManagedDeviceStatus. Maintains the status of the connection to the Device. | def uRKJ(YKHO):
return YKHO._connection_status | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jGRS(YKHO) -> 'outputs.ConnectionStatusResponse':\n return qe4Y.get(YKHO, 'status')",
"def b7tT(YKHO):\n if not YKHO._adb_port:\n return None\n return YKHO._device_information['adb_status']",
"def jGRS(YKHO) -> h8nf[qe4Y.Input[uLKX[str, 'ConnectionStatus']]]:\n return qe4Y.get(YKHO, 'sta... | [
"0.69990855",
"0.67396075",
"0.6585936",
"0.6561341",
"0.6351244",
"0.63025033",
"0.6184628",
"0.5918606",
"0.58362716",
"0.5818522",
"0.5818522",
"0.5785592",
"0.57839364",
"0.5760275",
"0.5753956",
"0.57480794",
"0.572511",
"0.56983143",
"0.5695774",
"0.5664015",
"0.5664015... | 0.73128605 | 0 |
Sets the connection_status of this AssetManagedDeviceStatus. Maintains the status of the connection to the Device. | def uRKJ(YKHO, uRKJ):
BbPm = ['Unknown', 'Success', 'Failure']
if uRKJ not in BbPm:
raise ValueError('Invalid value for `connection_status` ({0}), must be one of {1}'.format(uRKJ, BbPm))
YKHO._connection_status = uRKJ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zjI0(YKHO, uRKJ: Literal[ConnectionState]) -> None:\n YKHO.connection_status = uRKJ\n YKHO.publish(YKHO.key_gen('connection_status'), uRKJ)",
"def Ruq8(YKHO, uRKJ: Literal[ConnectionState]) -> None:\n YKHO.desired_connection_status = uRKJ\n YKHO.publish(YKHO.key_gen('desired_connection_status'), ... | [
"0.7622204",
"0.71229255",
"0.67075294",
"0.642478",
"0.6304812",
"0.57982844",
"0.5712975",
"0.5712975",
"0.5712975",
"0.5702602",
"0.56843436",
"0.56608224",
"0.5657329",
"0.56564194",
"0.5575543",
"0.5575543",
"0.5575543",
"0.5575543",
"0.5575543",
"0.5575543",
"0.5575543"... | 0.7380079 | 1 |
Sets the server_port of this AssetManagedDeviceStatus. Port used for receiving requests from Intersight Assist by the Device Connector for the Managed Device. | def D7Dj(YKHO, D7Dj):
YKHO._server_port = D7Dj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def B4Sa(YKHO, p_l7):\n YYBd.raiseOnError(r6CV.blpapi_SessionOptions_setServerPort(YKHO.__handle, p_l7))",
"def q8Rm(YKHO, N5z6, bIwZ):\n YKHO.hostname = N5z6\n YKHO.port = bIwZ",
"def D7Dj(YKHO):\n return YKHO._server_port",
"def D7Dj(YKHO):\n return YKHO._server_port",
"async def set_port(... | [
"0.70623255",
"0.65183854",
"0.64270973",
"0.64270973",
"0.6307212",
"0.6213667",
"0.61758465",
"0.60316",
"0.60316",
"0.60316",
"0.59650874",
"0.58534414",
"0.5831054",
"0.5787459",
"0.5720148",
"0.5708671",
"0.5708671",
"0.56616724",
"0.5628659",
"0.561165",
"0.5568586",
... | 0.77997637 | 0 |
Gets the state of this AssetManagedDeviceStatus. Maintains the state of the Managed Device, such as Start Success, Start Failure, etc. See ManagedDeviceState for device connection states. | def QTBn(YKHO):
return YKHO._state | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QTBn(YKHO) -> 'outputs.DeviceStateResponse':\n return qe4Y.get(YKHO, 'state')",
"def R1i3(YKHO):\n return YKHO._device.status",
"def QTBn(YKHO):\n return YKHO.coordinator.data[_Sej][YKHO.base_unique_id][K_Lm]",
"def QTBn(YKHO):\n return YKHO._device.value",
"def QTBn(YKHO):\n return YKHO... | [
"0.68895024",
"0.68079215",
"0.66896343",
"0.66657823",
"0.65847945",
"0.64756274",
"0.64477634",
"0.63459176",
"0.62486476",
"0.61321944",
"0.6100846",
"0.6098232",
"0.60503274",
"0.6047438",
"0.6041383",
"0.60354865",
"0.6020574",
"0.600182",
"0.59860885",
"0.5965785",
"0.5... | 0.0 | -1 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, JGRY):
return False
return YKHO.__dict__ == Elif.__dict__ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)",
"def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)",
... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748"
] | 0.0 | -1 |
Returns the rectangle occupied by the given menu item. It can be used with `mouseInView()` to determine if a mouse click has occurred on a given menu selection. | def eNGJ(YKHO, ZfUD):
Mkmy = rbZs(1, 0, 1, 1)
for XP5J in YKHO.menu.items:
Mkmy.topLeft.x = Mkmy.bottomRight.x
if XP5J.name:
Mkmy.bottomRight.x += cqE3(XP5J.name) + 2
if XP5J is ZfUD:
return Mkmy
return Mkmy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def w9cW(YKHO, ZfUD, FY1r=False):\n YRbF = ZfUD\n G7_p, SeRN = YKHO.GetViewStart()\n mawX = lnPd.Rect()\n mawX.x = YRbF.GetX() - G7_p * SOOs\n mawX.y = YRbF.GetY() - SeRN * SOOs\n mawX.width = YRbF.GetWidth()\n mawX.height = YKHO.GetLineHeight(YRbF)\n return mawX",
"def ll9s(YKHO):\n r... | [
"0.6840595",
"0.6723916",
"0.62039435",
"0.60061646",
"0.5800066",
"0.5797162",
"0.570646",
"0.5655264",
"0.56232053",
"0.5483383",
"0.54546165",
"0.5424792",
"0.5416514",
"0.54087716",
"0.53720254",
"0.53371376",
"0.53336966",
"0.5329836",
"0.5325443",
"0.5323548",
"0.529638... | 0.7746237 | 0 |
Corrects the position of self.x and self.y Only Applies if the screen width or height gets smaller | def Kva8(YKHO):
TVTK = YKHO.screen.get_width()
H2v2 = YKHO.screen.get_height()
if YKHO.last_screen_dimensions['width'] > TVTK:
YKHO.x -= YKHO.last_screen_dimensions['width'] - TVTK
if YKHO.last_screen_dimensions['height'] > H2v2:
YKHO.y -= YKHO.last_screen_dimensions['height'] - H2v2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rz5W(YKHO):\n Kaqb, JnpT = YKHO.screen.get_size()\n YKHO.pos.x = max(0, YKHO.pos.x)\n YKHO.pos.x = min(Kaqb, YKHO.pos.x)\n YKHO.pos.y = max(0, YKHO.pos.y)\n YKHO.pos.y = min(JnpT, YKHO.pos.y)",
"def QdZT(YKHO):\n super().update()\n if YKHO.center_x < uwaB.left_limit:\n YKHO.center... | [
"0.78119874",
"0.7653817",
"0.75469375",
"0.7439028",
"0.7326057",
"0.7271567",
"0.72375256",
"0.7131026",
"0.712786",
"0.7124782",
"0.71077716",
"0.7093469",
"0.7079267",
"0.7074412",
"0.70671827",
"0.70496273",
"0.70259625",
"0.69542825",
"0.69437736",
"0.6918284",
"0.69038... | 0.8278624 | 0 |
Sigmoid function. This function accepts any shape of np.ndarray object as input and perform sigmoid operation. | def m1Hg(WKvO):
return 1 / (1 + oyIN.exp(-WKvO)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m1Hg(WKvO: np.ndarray) -> oyIN.ndarray:\n return 1 / (1 + oyIN.exp(-WKvO))",
"def m1Hg(EcVT):\n if isinstance(EcVT, (list, tuple)):\n EcVT = oyIN.array(EcVT)\n return 1 / (1 + oyIN.exp(-EcVT))",
"def m1Hg(WKvO):\n return 1.0 / (1 + oyIN.exp(-WKvO))",
"def m1Hg(WKvO):\n return 1 / (1... | [
"0.82872546",
"0.77726996",
"0.75892836",
"0.75803345",
"0.75792193",
"0.75692123",
"0.75561017",
"0.7554079",
"0.7553817",
"0.75433666",
"0.7523711",
"0.7523711",
"0.7517644",
"0.74938184",
"0.7459675",
"0.7390222",
"0.7347192",
"0.7343358",
"0.7307995",
"0.72994894",
"0.729... | 0.75519615 | 14 |
First derivative of Sigmoid function. The input to this function should be the value that output from sigmoid function. | def dG6S(LVAh):
return LVAh * (1 - LVAh) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NZml(WKvO):\n return WKvO * (1 - WKvO)",
"def BV7B(WKvO):\n return WKvO * (1 - WKvO)",
"def BV7B(WKvO):\n return WKvO * (1 - WKvO)",
"def NZml(WKvO):\n return WKvO * (1.0 - WKvO)",
"def NZml(WKvO):\n return m1Hg(WKvO) * (1 - m1Hg(WKvO))",
"def NZml(WKvO):\n KCHu = m1Hg(WKvO)\n ox... | [
"0.87601984",
"0.87236494",
"0.87236494",
"0.87169576",
"0.8606332",
"0.84701663",
"0.8355083",
"0.7660587",
"0.76379246",
"0.76147074",
"0.75108695",
"0.7500872",
"0.74812835",
"0.7464008",
"0.74280185",
"0.7420573",
"0.7313185",
"0.7219959",
"0.72071964",
"0.71963114",
"0.7... | 0.7864624 | 7 |
Data visualization with ground truth and predicted data comparison. There are two plots for them and each of them use different colors to differentiate the data with different labels. | def ZJzi(nPrm, _Xkt, V1xi):
assert nPrm.shape[0] == _Xkt.shape[0]
assert nPrm.shape[0] == V1xi.shape[0]
QrM1.figure()
QrM1.subplot(1, 2, 1)
QrM1.title('Ground Truth', fontsize=18)
for or8S in range(nPrm.shape[0]):
if _Xkt[or8S] == 0:
QrM1.plot(nPrm[or8S][0], nPrm[or8S][1], 'r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HodY(YKHO):\n if YKHO.data_generated:\n c5aS = len(YKHO.true_data['targets'])\n iMGt = QrM1.get_cmap('gnuplot')\n Jw9H = [iMGt(YRbF) for YRbF in oyIN.linspace(0, 0.9, c5aS)]\n LZpg = QrM1.figure(figsize=(15, 5))\n QrM1.subplot(1, 3, 1)\n for G1Hx in YKHO.phd_filter[... | [
"0.72492915",
"0.69190305",
"0.6835955",
"0.66809905",
"0.667098",
"0.666655",
"0.66369617",
"0.6629329",
"0.65713775",
"0.6568579",
"0.6568099",
"0.65115273",
"0.65052915",
"0.6482675",
"0.645257",
"0.64101094",
"0.63752383",
"0.6353995",
"0.63376975",
"0.63136935",
"0.63063... | 0.761913 | 1 |
Implementation of the forward pass. It should accepts the inputs and passing them through the network and return results. | def KVH6(YKHO, g4y1):
Rtnc = oyIN.dot(g4y1, YKHO.w1)
YKHO.a1 = m1Hg(Rtnc)
mPai = oyIN.dot(YKHO.a1, YKHO.w2)
YKHO.a2 = m1Hg(mPai)
Exmq = oyIN.dot(YKHO.a2, YKHO.w3)
YKHO.y = m1Hg(Exmq)
return YKHO.y | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KVH6(YKHO, g4y1):\n yvT9 = YKHO.fc1(g4y1)\n yvT9 = YKHO.fc2(yvT9)\n YKHO.out = yvT9\n return yvT9",
"def KVH6(YKHO, g4y1):\n raise NotImplementedError",
"def KVH6(YKHO, *g4y1):\n raise NotImplementedError",
"def KVH6(YKHO, input):\n return YKHO.network(input)",
"def KVH6(YKHO, inpu... | [
"0.8330594",
"0.8141684",
"0.7926628",
"0.78035897",
"0.78035897",
"0.78035897",
"0.7752818",
"0.7752818",
"0.7738907",
"0.7679073",
"0.7660625",
"0.7643285",
"0.7581304",
"0.7569203",
"0.7479867",
"0.74048865",
"0.7394922",
"0.73774797",
"0.7364085",
"0.73442876",
"0.7337264... | 0.0 | -1 |
Implementation of the backward pass. It should utilize the saved loss to compute gradients and update the network all the way to the front. | def ZD5u(YKHO, YRbF):
m_1A = oyIN.zeros((2, 3))
T68t = oyIN.zeros((3, 3))
AXia = oyIN.zeros((3, 1))
QmPi = oyIN.zeros((1, 1))
kwKk = oyIN.zeros((1, 3))
for YRbF, yzQ0 in enumerate(AXia):
Tdyv = YKHO.a2[0][YRbF]
QmPi = YKHO.error * dG6S(YKHO.y)
AXia[YRbF] = Tdyv * QmPi
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fIbT(YKHO, N77f):\n YKHO.optimizer.zero_grad()\n YKHO.optimizer.backward(N77f)\n YKHO.optimizer.step()",
"def ZD5u(YKHO, N77f):\n bmnz.my_timer.start_profile('BWD')\n tFH4 = N_FN()\n tFH4.set_training_stage(gcez.BWD)\n for F9UE in YKHO.client.chunk_based_param_fp16:\n F9UE.ps_attr... | [
"0.8116909",
"0.788521",
"0.78546345",
"0.7807031",
"0.7777338",
"0.7689684",
"0.7631545",
"0.7611851",
"0.76023585",
"0.75521505",
"0.75045365",
"0.7501314",
"0.7501314",
"0.7485868",
"0.7481361",
"0.7481292",
"0.7444571",
"0.739935",
"0.73771346",
"0.73410493",
"0.7311101",... | 0.704288 | 47 |