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 |
|---|---|---|---|---|---|---|
Whether the MLC kiss or leaf was within the action tolerance. | def WgeC(YKHO) -> bdIy[bool] | None:
return [abs(P1dF) < YKHO._action_tolerance for P1dF in YKHO.error] if YKHO._action_tolerance is not None else [True, True] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BG5Q(BWXx, D1sU):\n return ZylS.norm(tensor=BWXx, ord=oyIN.inf) <= D1sU",
"def yK_J(YKHO):\n YKHO.failIf(hEBN.speed_of_light / aHmO.speed_of_light != 100)",
"def AuW2(YKHO):\n if YKHO.vars['ema_trace'][YKHO.vars['step']] <= YKHO.settings['emaSpeedTol']:\n return True\n else:\n ret... | [
"0.599993",
"0.59770584",
"0.5826378",
"0.5764174",
"0.5745309",
"0.5721654",
"0.5715853",
"0.5693261",
"0.5648559",
"0.5624089",
"0.56200594",
"0.56022257",
"0.559757",
"0.55726653",
"0.55663204",
"0.55658275",
"0.55565643",
"0.55435985",
"0.55417293",
"0.55231345",
"0.55116... | 0.57128626 | 7 |
The color of the measurement when the PF image is plotted, based on pass/fail status. | def _TAj(YKHO) -> bdIy[str]:
Jw9H = []
for or8S, flI0 in enumerate(YKHO.passed):
if not flI0:
Jw9H.append('r')
elif YKHO._action_tolerance is not None:
Jw9H.append('b' if YKHO.passed_action[or8S] else 'm')
else:
Jw9H.append('b')
return Jw9H | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oGzn(YKHO, HSpE):\n return '#60f979' if HSpE.passes else '#f96c60'",
"def og44(ycBG, Kiih, mSEH):\n if ycBG == qEJV.MISSING_VAL or Kiih == qEJV.MISSING_VAL or mSEH == qEJV.MISSING_VAL:\n jGRS = 'grey'\n rdwf = 0\n elif ycBG - Kiih < LK2A or mSEH >= FoTx:\n jGRS = 'red'\n ... | [
"0.6999983",
"0.66403234",
"0.6491453",
"0.63503504",
"0.63288516",
"0.62895894",
"0.62804717",
"0.624412",
"0.6233284",
"0.6228217",
"0.6169255",
"0.61688036",
"0.6158413",
"0.61556077",
"0.61527073",
"0.61318594",
"0.61192286",
"0.61166966",
"0.6103516",
"0.6070495",
"0.605... | 0.57587945 | 91 |
The maximum absolute error | def KSbM(YKHO) -> float:
return oyIN.max(oyIN.abs([YKHO.error])) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WS2L(YKHO) -> float:\n return float(oyIN.max(oyIN.abs(YKHO._flattened_errors())))",
"def _x7k():\n I3V1 = max(Swcs)\n eSWn = max(dFu8)\n eZVp = abs(I3V1 - eSWn) / (eSWn + I3V1)\n return eZVp",
"def zMcq(YKHO):\n raise NotImplementedError",
"def WS2L(YKHO):\n print('Maximum residual e... | [
"0.81715286",
"0.73436207",
"0.7337153",
"0.7277897",
"0.72558767",
"0.70459545",
"0.69274753",
"0.68522155",
"0.6809412",
"0.6791413",
"0.67229855",
"0.66728926",
"0.66246414",
"0.6618412",
"0.6604788",
"0.65991706",
"0.6594345",
"0.65608907",
"0.6539218",
"0.6533751",
"0.65... | 0.8654193 | 0 |
Initialize and instance of Hero. | def FIMM(YKHO, gCuF, Vjhr):
YKHO.screen = Vjhr
YKHO.settings = gCuF
YKHO.image = a9eO.image.load('images/Aaing2.bmp')
YKHO.rect = YKHO.image.get_rect()
YKHO.screen_rect = Vjhr.get_rect()
YKHO.rect.center = YKHO.screen_rect.center
YKHO.centerx = float(YKHO.rect.centerx)
YKHO.centery = flo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JlGO(YKHO):\n YKHO.hero = zBLS(YKHO.frame_width / 2, YKHO.frame_height / 2, 0, 0, 15, 1, (0, 255, 0))",
"def FIMM(YKHO) -> None:\n YKHO.heroes: x1iM[zBLS] = []",
"def z0Vs(YKHO, zBLS):\n YKHO.heroes.append(zBLS)",
"def LmOT(YKHO, mWFP: str, A90d: int, g2zq: int) -> None:\n A90d = A90d if A90d... | [
"0.7560989",
"0.70737356",
"0.6304138",
"0.628163",
"0.5886278",
"0.5812815",
"0.5641673",
"0.56165683",
"0.5563993",
"0.5517137",
"0.5509454",
"0.5471082",
"0.5463943",
"0.5445688",
"0.5443265",
"0.5413882",
"0.5408704",
"0.5408621",
"0.540844",
"0.540844",
"0.54046845",
"... | 0.6224794 | 4 |
Decay learning rate by a factor of 0.1 every lr_decay_epoch epochs. | def hc6Z(K0do, qtWj, DJmW=0.1, jnHZ=100):
if qtWj % jnHZ == 0 and qtWj > 1:
for Lwm5 in K0do.param_groups:
Lwm5['lr'] = Lwm5['lr'] * 0.1
return K0do | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def biVQ(qtWj):\n tspZ = b0Ix\n if qtWj >= 60:\n tspZ *= 0.1\n print('Learning rate: ', tspZ)\n return tspZ",
"def biVQ(qtWj):\n oLNr = 0.1\n ReNU = 0.5\n Gn2V = 10.0\n fqnS = oLNr * epAf.pow(ReNU, epAf.floor((1 + qtWj) / Gn2V))\n return fqnS",
"def Qh2O(YPaw):\n return Cwt... | [
"0.8267355",
"0.817801",
"0.7811282",
"0.7761358",
"0.77191705",
"0.7691683",
"0.7691683",
"0.7604844",
"0.7585767",
"0.75532204",
"0.75233716",
"0.74977565",
"0.7488197",
"0.74663943",
"0.7409523",
"0.7392131",
"0.7390558",
"0.7389717",
"0.73854584",
"0.7382199",
"0.7374641"... | 0.0 | -1 |
Provide the Celery queue name as a string. | def CqEO(YKHO, RZML, WGkl):
if callable(YKHO.queue):
return str(YKHO.queue(YKHO, RZML, WGkl))
return str(YKHO.queue) or gCuF.CELERY_DEFAULT_QUEUE | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Q64Y(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'queue_name')",
"def Q64Y(T5Za):\n return D6AN[int(bool(T5Za))]",
"def L0lo(YKHO):\n return YKHO._graph_executor.get_queue_name()",
"def KKcq(Emd4):\n if 'long_queue_name' in Emd4.global_settings:\n return Emd4.global_setting... | [
"0.8129115",
"0.7726936",
"0.74620956",
"0.7188101",
"0.7154515",
"0.7141062",
"0.701317",
"0.69697696",
"0.6963009",
"0.67845607",
"0.6517226",
"0.64798194",
"0.63388366",
"0.62759286",
"0.61870426",
"0.6077965",
"0.6077965",
"0.6032207",
"0.6032207",
"0.6010448",
"0.5993389... | 0.6920307 | 9 |
Return a Tensor for a batch of image input | def crfW(lNai):
ROpF = (None, lNai[0], lNai[1], lNai[2])
WKvO = ZylS.placeholder(ZylS.float32, ROpF, name='x')
return WKvO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def j15L():\n return oyIN.zeros((2, 1, 4, 4))",
"def knuZ(YKHO, Cptt):\n FpdP = ZylS.transpose(Cptt, perm=[2, 0, 1])\n WKvO = ZylS.transpose(FpdP)\n return WKvO",
"def aTLP(YKHO, j9VG):\n L39K = YKHO._create_network(ZylS.cast(j9VG, ZylS.float32), dropout=YKHO.dropout, is_training=YKHO.is_trainin... | [
"0.6982396",
"0.697684",
"0.69677955",
"0.69143456",
"0.67242986",
"0.67011863",
"0.6678814",
"0.6667556",
"0.66644204",
"0.66474915",
"0.65924495",
"0.6586891",
"0.65809345",
"0.65522945",
"0.6539906",
"0.64710915",
"0.647023",
"0.64531785",
"0.6436162",
"0.64322406",
"0.640... | 0.6337969 | 32 |
Flatten x_tensor to (Batch Size, Flattened Image Size) | def PWgb(k3l6):
ROpF = k3l6.get_shape().as_list()
q3V_ = ZylS.reshape(k3l6, (-1, ROpF[1] * ROpF[2] * ROpF[3]))
return q3V_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PWgb(k3l6):\n Fg_i, yzQ0, MKlR, Csk6 = k3l6.get_shape().as_list()\n Ylkb = yzQ0 * MKlR * Csk6\n return ZylS.reshape(k3l6, [-1, Ylkb])",
"def PWgb(YKHO, k3l6):\n ROpF = k3l6.get_shape().as_list()\n assert len(ROpF) >= 4, 'shape of image is not correct'\n A9qY = ROpF[1] * ROpF[2] * ROpF[3]\n ... | [
"0.8306523",
"0.81393874",
"0.7994936",
"0.7953008",
"0.7898106",
"0.7661622",
"0.7661622",
"0.76227397",
"0.76207435",
"0.76207435",
"0.76103663",
"0.7570651",
"0.7138425",
"0.6951441",
"0.6934111",
"0.69291353",
"0.6927618",
"0.6910582",
"0.68756753",
"0.67927945",
"0.66872... | 0.76849484 | 5 |
Apply a output layer to x_tensor using weight and bias | def hlel(k3l6, I07O):
LVAh = ZylS.layers.dense(k3l6, I07O)
return LVAh | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Kmxe(WKvO):\n return WKvO",
"def hlel(k3l6, I07O):\n ROpF = k3l6.get_shape().as_list()\n upAO = ZylS.Variable(ZylS.truncated_normal([ROpF[-1], I07O], stddev=0.1))\n oug5 = ZylS.Variable(ZylS.zeros(I07O))\n return ZylS.add(ZylS.matmul(k3l6, upAO), oug5)",
"def TORX(k3l6, I07O):\n _mSQ = Zy... | [
"0.73880553",
"0.7379001",
"0.73780525",
"0.6867772",
"0.6791421",
"0.67592424",
"0.6727423",
"0.6698643",
"0.6686149",
"0.66421616",
"0.66083896",
"0.66023237",
"0.65648735",
"0.6524778",
"0.6484271",
"0.6477665",
"0.64373136",
"0.64364195",
"0.6411001",
"0.6399274",
"0.6375... | 0.67101616 | 7 |
Create a convolutional neural network model | def Hf6V(WKvO, sMyr):
j2cC = tCUu(WKvO, 32, [5, 5], [1, 1], [2, 2], [2, 2])
I7zk = tCUu(j2cC, 64, [3, 3], [1, 1], [2, 2], [2, 2])
PFCt = PWgb(I7zk)
EJ2N = R6zb(PFCt, 256)
ReNU = ZylS.layers.dropout(EJ2N, sMyr)
yvT9 = hlel(ReNU, 10)
return yvT9 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dRuS():\n C3ST = ileL()\n C3ST.add(fhcK.Conv2D(1, (2, 2), strides=(1, 1), activation='sigmoid', padding='same', input_shape=(256, 256, 3)))\n C3ST.compile(optimizer='adam', loss='mse', metrics=['accuracy'])\n C3ST.summary()\n return C3ST",
"def biJ_() -> ZylS.keras.Sequential:\n C3ST = ileL... | [
"0.75773156",
"0.7567404",
"0.75622874",
"0.75140065",
"0.74852747",
"0.7301987",
"0.72218347",
"0.72133356",
"0.7211507",
"0.70942575",
"0.70884156",
"0.7073757",
"0.70734185",
"0.7007771",
"0.6986",
"0.69768095",
"0.6970537",
"0.69632465",
"0.6934773",
"0.6929505",
"0.69213... | 0.0 | -1 |
Return a dictionary that holds all the "edges" that connected from this node, each edge is represented using a pair (key, edge weight). | def _Qp0(YKHO) -> dict:
return YKHO.__ni_out | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mC4V(YKHO):\n return [(G1Hx, wEf2) for G1Hx, Ty9i in YKHO.dict.iteritems() for wEf2 in Ty9i]",
"def kl7v(YKHO):\n mC4V = []\n for SLBp in YKHO.__graph_dict:\n for _Wdu in YKHO.__graph_dict[SLBp]:\n mC4V.append({SLBp, _Wdu})\n return mC4V",
"def WR1E(YKHO):\n Ziit = {}\n ... | [
"0.7494759",
"0.74656856",
"0.74132395",
"0.74018794",
"0.73976076",
"0.7396767",
"0.7384819",
"0.7376244",
"0.73582506",
"0.73430485",
"0.731381",
"0.7276895",
"0.72707134",
"0.7248501",
"0.72362185",
"0.71549207",
"0.715016",
"0.7092057",
"0.70646775",
"0.70553654",
"0.7029... | 0.0 | -1 |
Return a dictionary that holds all the "edges" that connected to this node, each edge is represented using a pair (key, edge weight). | def _S3G(YKHO) -> dict:
return YKHO.__ni_in | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mC4V(YKHO):\n return [(G1Hx, wEf2) for G1Hx, Ty9i in YKHO.dict.iteritems() for wEf2 in Ty9i]",
"def WR1E(YKHO):\n Ziit = {}\n exwG = 0\n for Q6kx in YKHO.__nodes:\n Ziit[exwG] = tuple(Q6kx.get_data())\n exwG += 1\n mC4V = set()\n for D70y in YKHO.__edges:\n cnOs = (D70y... | [
"0.7498321",
"0.747965",
"0.7465022",
"0.74236894",
"0.74005044",
"0.7371986",
"0.7367763",
"0.73498714",
"0.7346512",
"0.7343881",
"0.7295427",
"0.72401905",
"0.72192204",
"0.72166675",
"0.72004956",
"0.7165379",
"0.71198124",
"0.7065798",
"0.70637155",
"0.70608985",
"0.7002... | 0.0 | -1 |
Return this node key. | def mexE(YKHO) -> int:
return YKHO.__key | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H5ew(YKHO) -> str:\n return YKHO.__key",
"def H5ew(YKHO) -> str:\n return YKHO._key",
"def mexE(YKHO):\n return YKHO.key",
"def mexE(YKHO):\n return YKHO.key",
"def H5ew(YKHO) -> pe5E:\n return YKHO._key",
"def H5ew(YKHO):\n return VDN9(YKHO.name)",
"def H5ew(YKHO) -> str:\n re... | [
"0.8228227",
"0.82279736",
"0.81963325",
"0.81963325",
"0.81818503",
"0.8180789",
"0.8152228",
"0.8117105",
"0.810925",
"0.810925",
"0.810925",
"0.810925",
"0.80827564",
"0.80775774",
"0.807395",
"0.8067931",
"0.8021243",
"0.8014959",
"0.8014959",
"0.8014959",
"0.8014959",
... | 0.80628055 | 16 |
Return this node location as a 3DPoint (x, y, z). | def hbd3(YKHO) -> tuple:
return YKHO.__location | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YHy4(YKHO) -> zMVZ:\n return zMVZ.from_proto(YKHO.proto.pos)",
"def AU8u(YKHO):\n return (YKHO.x, YKHO.y, YKHO.z)",
"def AeUd(Q6kx):\n return zMVZ(float(Q6kx.getAttribute('x')), float(Q6kx.getAttribute('y')), float(Q6kx.getAttribute('z')))",
"def AU8u(YKHO) -> M1rV:\n return YKHO._point.copy(... | [
"0.7921555",
"0.7792765",
"0.7428888",
"0.736966",
"0.71432513",
"0.70529634",
"0.7000371",
"0.7000371",
"0.6991376",
"0.6920194",
"0.6871631",
"0.6823903",
"0.67951953",
"0.6781226",
"0.6710987",
"0.66407794",
"0.66310436",
"0.6629564",
"0.66293484",
"0.6620904",
"0.6614884"... | 0.0 | -1 |
Constructor for the Donkey object.Assigns the donkey at the given left,bottom position.Ensures that the donkey does motions whithin the specified boundary. | def FIMM(YKHO, LFlW, es2x, aPiQ, MEo1):
super(fKlH, YKHO).__init__(0, 0, 69, 71, 'p1_duck.png')
YKHO.rect.left = LFlW
YKHO.rect.bottom = es2x
YKHO.left_boundary = aPiQ
YKHO.right_boundary = MEo1
YKHO.move_right()
YKHO.__steps = 0
YKHO.__threshold_steps = tuKI.randint(25, 50)
YKHO.dir... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, oeNL, XSoh, _tIi):\n YKHO.position = oeNL\n YKHO.direction = XSoh\n YKHO.right = _tIi",
"def FIMM(YKHO, H5ew, LFlW, _tIi):\n YKHO._key = H5ew\n YKHO._left = LFlW\n YKHO._right = _tIi",
"def FIMM(YKHO, hlI4, CqPL, Rp5L, open):\n YKHO.room_number = hlI4\n YKHO.x_left_door =... | [
"0.6039424",
"0.59601015",
"0.58931935",
"0.5882831",
"0.5872673",
"0.57396173",
"0.56455666",
"0.56289726",
"0.55579424",
"0.5533562",
"0.55232173",
"0.5492462",
"0.54686123",
"0.54392135",
"0.54232097",
"0.5387212",
"0.53773636",
"0.5369674",
"0.5366423",
"0.53505486",
"0.5... | 0.76331025 | 0 |
Create a function which computes the Mahalanobis distance to the centroid of `X`. | def rrLw(EcVT):
qqgr = xXBC(EcVT)
zmOP = oyIN.cov(EcVT, rowvar=False)
ninb = oyIN.linalg.pinv(zmOP)
def mVO0(WKvO):
Csk6 = fK9g(WKvO, v=qqgr, VI=ninb)
return Csk6
return mVO0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kDQa(AU8u, e6ux, ifkm, e_2d):\n WKvO = 0\n for YRbF in range(e_2d):\n WKvO += ((AU8u[YRbF] - e6ux[YRbF]) / ifkm[YRbF]) ** 2\n return WKvO ** 0.5",
"def mVO0(YKHO, WKvO: np.ndarray) -> float:\n P1dF = WKvO - YKHO.mean\n mVO0 = P1dF.T @ P7XM.solve(YKHO.cov, P1dF)\n return mVO0",
"def... | [
"0.80062526",
"0.76956147",
"0.74504286",
"0.6931805",
"0.6917119",
"0.6716946",
"0.65251684",
"0.6396617",
"0.63804144",
"0.6375465",
"0.6283751",
"0.625268",
"0.61924225",
"0.6163279",
"0.60419476",
"0.6009397",
"0.572834",
"0.5692503",
"0.5658761",
"0.56504315",
"0.5622229... | 0.85946 | 0 |
Cycling values for CUDA_VISIBLE_DEVICES environment variable Examples >>> cuda_visible_devices(0, range(4)) '0,1,2,3' >>> cuda_visible_devices(3, range(8)) '3,4,5,6,7,0,1,2' | def npj4(YRbF, oWb2=None):
if oWb2 is None:
try:
oWb2 = list(map(int, Hy7s.environ['CUDA_VISIBLE_DEVICES'].split(',')))
except KeyError:
oWb2 = list(range(W_O6()))
aPd6 = oWb2[YRbF:] + oWb2[:YRbF]
return ','.join(map(str, aPd6)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bdjI(YKHO):\n return YKHO._CUDA_VISIBLE_DEVICES",
"def pFjf():\n aPnd = Yn3K.run('nvidia-smi --query-gpu=gpu_uuid,gpu_name,compute_mode --format=csv', shell=True, capture_output=True, text=True)\n if aPnd.returncode == 0:\n AXha = [bTKY for bTKY in aPnd.stdout.splitlines()]\n bo34.deb... | [
"0.71483153",
"0.67880553",
"0.6231721",
"0.6147401",
"0.6147401",
"0.6117387",
"0.6032154",
"0.59766114",
"0.5964383",
"0.5944328",
"0.59030193",
"0.58976525",
"0.58821213",
"0.58509773",
"0.584881",
"0.58349365",
"0.58263767",
"0.58263767",
"0.58176845",
"0.5815118",
"0.580... | 0.7361588 | 0 |
Attempts to find a known provider that provides this backend. | def Nz7s(DDLl):
dvol = {'BasicAerProvider': 'qiskit.BasicAer', 'AerProvider': 'qiskit.Aer', 'IBMQProvider': 'qiskit.IBMQ'}
if isinstance(DDLl, cF0t):
kT1P = DDLl.provider()
if kT1P is None:
raise ImportError("Backend object '{}' has no provider".format(DDLl.name()))
return dv... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MFBN(YKHO) -> h8nf[uBwj]:\n if not YKHO.provider:\n return None\n return uBwj.objects.get_subclass(pk=YKHO.provider.pk)",
"def kT1P(YKHO):\n try:\n return YKHO._db.providers[YKHO._dbattr('provider')]\n except KeyError:\n return tuple(YKHO._db.providers.values())[0]",
"def M... | [
"0.7383723",
"0.724896",
"0.7118434",
"0.70988643",
"0.7047297",
"0.6991946",
"0.69118774",
"0.68692195",
"0.6869072",
"0.682666",
"0.6823176",
"0.6770754",
"0.66557777",
"0.665497",
"0.6636448",
"0.66183615",
"0.6565929",
"0.6486393",
"0.6447731",
"0.6438282",
"0.64285177",
... | 0.8040166 | 0 |
Ensure that both objects are in the same coordinate frame. | def Cird(JfyU):
def mrMx(YKHO, *qIxc, **B2fa):
if len(qIxc) == 0 and len(B2fa) == 0:
RL4V = None
elif len(qIxc) == 0:
RL4V = next(iter(B2fa.values()))
else:
RL4V = qIxc[0]
if not hasattr(RL4V, '_frame') or (YKHO._frame is None or RL4V._frame is No... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rEwH(YKHO, Elif) -> bool:\n return YKHO.x == Elif.x and YKHO.y == Elif.y",
"def vNbM(gOf7, QvKD):\n for hkS8 in ('naxes', 'axes_type', 'axes_order', 'unit', 'axes_names'):\n assert getattr(gOf7, hkS8) == getattr(QvKD, hkS8)",
"def xa14(YKHO, Elif):\n return oyIN.all(YKHO.grid == Elif.grid) ... | [
"0.6764435",
"0.633246",
"0.6327639",
"0.6315239",
"0.6270404",
"0.6213408",
"0.61932087",
"0.6148152",
"0.6135621",
"0.6124898",
"0.612064",
"0.612064",
"0.61115456",
"0.6110232",
"0.60880756",
"0.60876024",
"0.60464627",
"0.60064185",
"0.59905815",
"0.59845847",
"0.597935",... | 0.5745466 | 49 |
Load the pretrained ResNet152 and replace top fc layer. | def FIMM(YKHO, Agjb):
super(UYOu, YKHO).__init__()
WWYJ = FYrf.resnet152(pretrained=True)
KZ52 = list(WWYJ.children())[:-1]
YKHO.resnet = U78l.Sequential(*KZ52)
YKHO.linear = U78l.Linear(WWYJ.fc.in_features, Agjb)
YKHO.bn = U78l.BatchNorm1d(Agjb, momentum=0.01) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hVyu(mL4f=False, **B2fa):\n C3ST = S1Vm(MF6R, [3, 8, 36, 3], **B2fa)\n if mL4f:\n C3ST.load_state_dict(rA0C.load_url(mDCG['resnet152']))\n FBfN = JpOW(C3ST.fc)\n C3ST.fc = FBfN\n return C3ST",
"def hVyu(mL4f=False):\n C3ST = S1Vm(MF6R, [3, 8, 36, 3])\n if mL4f:\n C3ST.load_... | [
"0.7173052",
"0.6806408",
"0.67975897",
"0.67849594",
"0.67489475",
"0.67489475",
"0.67489475",
"0.67489475",
"0.67324644",
"0.6507087",
"0.6507087",
"0.64752775",
"0.63904417",
"0.62846625",
"0.62234324",
"0.61872536",
"0.6139846",
"0.61031175",
"0.6084447",
"0.60670197",
"0... | 0.0 | -1 |
Create the initial hidden and cell states for the decoder's LSTM based on the encoded images. | def vCdu(YKHO, E9hj):
Mzw3 = E9hj.mean(dim=1)
MKlR = YKHO.init_h(Mzw3)
Z9rn = YKHO.init_c(Mzw3)
return (MKlR, Z9rn) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ibvu(UXHt: Dict[str, torch.Tensor], _Pky: SequenceReducer, CLda: int) -> AzJI[ht2j.Tensor, ht2j.Tensor]:\n if 'encoder_output_state' not in UXHt:\n ZDDV = UXHt[azhC]\n xW7i = ht2j.clone(ZDDV)\n else:\n RhFm = UXHt[ZTMI]\n if not isinstance(RhFm, tuple):\n ZDDV = RhF... | [
"0.69797754",
"0.6908568",
"0.68752253",
"0.67930186",
"0.67352873",
"0.6725381",
"0.67085093",
"0.65640026",
"0.65566957",
"0.6542631",
"0.6542631",
"0.6542631",
"0.6448912",
"0.63782275",
"0.63424253",
"0.6337343",
"0.632744",
"0.6317356",
"0.6301102",
"0.6256171",
"0.62549... | 0.64179176 | 13 |
Initialize a new FabricWireless object with the provided RestSession. | def FIMM(YKHO, cuiw, N9z1, vdpX):
TSw_(cuiw, jtXB)
super(TnXP, YKHO).__init__()
YKHO._session = cuiw
YKHO._object_factory = N9z1
YKHO._request_validator = vdpX | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, cuiw, N9z1, vdpX):\n TSw_(cuiw, jtXB)\n super(CaoT, YKHO).__init__()\n YKHO._session = cuiw\n YKHO._object_factory = N9z1\n YKHO._request_validator = vdpX",
"def FIMM(YKHO, wOmD=dBhF(fF2Y())):\n YKHO._rest = wOmD",
"def BdN0(KcEq: str='localhost', bIwZ: int=4110, CBIr: str='pys... | [
"0.6339938",
"0.62236387",
"0.5970704",
"0.5928398",
"0.5800701",
"0.5761",
"0.5702965",
"0.5572579",
"0.55697143",
"0.5569302",
"0.55562943",
"0.5543459",
"0.55183643",
"0.54799944",
"0.5459695",
"0.54456615",
"0.54389364",
"0.54276127",
"0.5404118",
"0.5396407",
"0.5332134"... | 0.7724003 | 0 |
Filter the dataset and return data for the specified day | def yX0l(YKHO, CjKC):
"""First check it the data has any mising values"""
__n6 = Hy7s.path.abspath('./dataset/train_revised.csv')
if not YKHO.check_for_missing_values(__n6):
YKHO.df['travel_date'] = rLdf.to_datetime(YKHO.df['travel_date'])
YKHO.df['day_of_week'] = YKHO.df['travel_date'].dt.d... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def P6IV(j5sA, owkZ, Pd0P, SVZk):\n AGPF = 'C:/Users/The Presence/Documents/Personal Document/Personal Development/Data Science and Analytics/Udacity (Python Course)/Labs Tasks-20200924T221854Z-001/Lab Results/Capstone Project/bikeshare-2/' + j5sA\n jQ3Z = rLdf.read_csv(AGPF)\n p0EN = jQ3Z.copy()\n jQ3... | [
"0.6815661",
"0.6812926",
"0.66410613",
"0.6532257",
"0.64852613",
"0.64530045",
"0.644367",
"0.64383453",
"0.6364097",
"0.63367534",
"0.62975246",
"0.6239565",
"0.6219231",
"0.6196815",
"0.61913604",
"0.6114854",
"0.6091944",
"0.6055895",
"0.6051388",
"0.60365444",
"0.603325... | 0.74232054 | 0 |
Return image data from a raw PGM file as numpy array. | def Xp6P(Ux0P, abwh='>'):
with open(Ux0P, 'rb') as eHNT:
NRcB = eHNT.read()
try:
WBPg, TVTK, H2v2, uBsB = ZbWC.search(b'(^P5\\s(?:\\s*#.*[\r\n])*(\\d+)\\s(?:\\s*#.*[\r\n])*(\\d+)\\s(?:\\s*#.*[\r\n])*(\\d+)\\s(?:\\s*#.*[\r\n]\\s)*)', NRcB).groups()
except AttributeError:
raise ValueEr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Xp6P(Ux0P, abwh='>'):\n with open(Ux0P, 'rb') as eHNT:\n NRcB = eHNT.read()\n try:\n WBPg, TVTK, H2v2, uBsB = ZbWC.search(b'(^P5\\\\s(?:\\\\s*#.*[\\r\\n])*(\\\\d+)\\\\s(?:\\\\s*#.*[\\r\\n])*(\\\\d+)\\\\s(?:\\\\s*#.*[\\r\\n])*(\\\\d+)\\\\s(?:\\\\s*#.*[\\r\\n]\\\\s)*)', NRcB).groups()\n ex... | [
"0.7749053",
"0.7730209",
"0.7712785",
"0.7545392",
"0.7438314",
"0.69341975",
"0.6734124",
"0.6438227",
"0.6428955",
"0.6366676",
"0.6233822",
"0.62268645",
"0.62166804",
"0.62110674",
"0.61484826",
"0.61406547",
"0.6133888",
"0.6133888",
"0.61317486",
"0.6106871",
"0.608439... | 0.7727764 | 2 |
Find date from provided timestamp | def IZXl(YKHO):
print('\nGuessing Date from Timestamp: ' + HwRy.argv[2] + '\r')
print('Outputs which do not result in a date/time value are not displayed.\r')
print('\x1b[1;31mMost likely results (results within +/- 5 years) are highlighted.\n\x1b[1;m'.format())
YKHO.from_unix_sec()
YKHO.from_unix_m... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ljfJ(E3oo):\n return qcWV.fromtimestamp(E3oo)",
"def Cxh3(Emd4, E3oo):\n return _c1T()",
"def KGYW(i8WE):\n qcWV = JRYC.datetime.fromtimestamp(i8WE, tz=JRYC.timezone.utc)\n _c1T = qcWV.date()\n if qcWV.hour < 10:\n _c1T -= JRYC.timedelta(1)\n return _c1T",
"def n4Du(E3oo, FMLJ='%... | [
"0.7385107",
"0.6896689",
"0.67935044",
"0.6544174",
"0.6387441",
"0.61780596",
"0.6106755",
"0.6055911",
"0.6044258",
"0.6043295",
"0.6010523",
"0.59412974",
"0.5918496",
"0.58604383",
"0.5839041",
"0.58285046",
"0.5814404",
"0.58119684",
"0.5768278",
"0.5704741",
"0.5700379... | 0.0 | -1 |
Convert date to a Unix Millisecond value | def wAg2(YKHO):
try:
WgTK = kJUT.parse(E3oo)
YKHO.out_unix_milli = str(int((WgTK - YKHO.epoch_1970).total_seconds() * 1000))
except Exception as e:
if not qIxc.log:
pass
else:
G9jH.error(str(type(tTpl)) + ',' + str(tTpl))
YKHO.out_unix_milli = Fals... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jO12(_c1T):\n return Ir3V(_c1T, float=True) * 1000.0",
"def ffVq(_c1T):\n return int(ITS7.mktime(_c1T.timetuple()) * 1000)",
"def KDBR(_c1T):\n return int(ITS7.mktime(_c1T.timetuple()))",
"def QGdl(E3oo):\n return E3oo / 1000000.0",
"def vlu4(YVPx):\n YVPx = YVPx + qcWV.timedelta(hours=n... | [
"0.8280864",
"0.7759105",
"0.7531209",
"0.71843815",
"0.7148199",
"0.70802647",
"0.70420897",
"0.7022228",
"0.6888493",
"0.68401295",
"0.68169695",
"0.6815644",
"0.6813733",
"0.6754109",
"0.66760653",
"0.6658181",
"0.66414756",
"0.6638612",
"0.66038525",
"0.657088",
"0.656244... | 0.701064 | 8 |
Convert a Mac Absolute timestamp to a date Also used for Safari plist timestamps | def dDjK(YKHO):
try:
WgTK = YKHO.epoch_2001 + fCoM(seconds=int(Pp4r))
YKHO.in_mac = WgTK.strftime('%Y-%m-%d %H:%M:%S.%f')
except Exception as e:
if not qIxc.log:
pass
else:
G9jH.error(str(type(tTpl)) + ',' + str(tTpl))
YKHO.in_mac = False
retur... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Errs(nPrm):\n return str(ITS7.mktime(nPrm.timetuple()))",
"def E3oo(YKHO, a1PO):\n if isinstance(a1PO, qcWV):\n a1PO = ITS7.mktime(a1PO.timetuple())\n return a1PO - 631065600",
"def xOBw(BWXx) -> int:\n assert isinstance(BWXx, str)\n JRYC = qcWV.strptime(BWXx, '%Y-%m-%dT%H:%M:%SZ')\n ... | [
"0.6957061",
"0.67166257",
"0.6635387",
"0.6629763",
"0.6615539",
"0.6569701",
"0.65391505",
"0.6509989",
"0.65003264",
"0.64808965",
"0.6455768",
"0.6420866",
"0.63824975",
"0.6335044",
"0.63162863",
"0.62875044",
"0.62746406",
"0.6263174",
"0.62613475",
"0.6261011",
"0.6249... | 0.0 | -1 |
Convert a Microsoft 128 bit SYSTEMTIME timestamp to a date | def jY_h(YKHO):
try:
HsxL = str(jry1(pNrF(fIAV)[::-1])).strip("b'").strip("'")
DwRD = [HsxL[YRbF:YRbF + 4] for YRbF in range(0, len(HsxL), 4)][::-1]
VwNh = []
for YRbF in DwRD:
iSjc = int(YRbF, 16)
VwNh.append(iSjc)
WgTK = JRYC(VwNh[0], VwNh[1], VwNh[3... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nJzU(E3oo: float):\n from datetime import datetime, timedelta\n return datetime(1601, 1, 1) + timedelta(E3oo / 10000000)",
"def F0Fn(nPrm):\n try:\n return qcWV.datetime.fromtimestamp(float(nPrm))\n except ValueError:\n return qcWV.datetime.fromisoformat(nPrm.decode('utf-8'))",
"d... | [
"0.66577643",
"0.6596023",
"0.6540892",
"0.65250826",
"0.6524062",
"0.65179926",
"0.64881873",
"0.6435791",
"0.64049625",
"0.63893646",
"0.6365323",
"0.6330325",
"0.6260079",
"0.62502205",
"0.6247519",
"0.6205827",
"0.61929625",
"0.6184619",
"0.6165707",
"0.6165265",
"0.61460... | 0.601181 | 37 |
Convert a date to a Microsoft 128 bit SYSTEMTIME timestamp | def o3Am(YKHO):
try:
WgTK = kJUT.parse(E3oo)
KrIv = int(WgTK.microsecond / 1000)
NAgb = WgTK.strftime('%Y, %m, %w, %d, %H, %M, %S, ' + str(KrIv))
VwNh = []
if HwRy.version_info >= (3, 0):
for BWXx in NAgb.split(','):
VwNh.append(jry1(BlNT.pack('<H'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _uaQ(_c1T):\n return int(GRk0.timegm(_c1T.utctimetuple()))",
"def O7z2(_c1T):\n return _c1T + ZyYF",
"def E3oo(YKHO, a1PO):\n if isinstance(a1PO, qcWV):\n a1PO = ITS7.mktime(a1PO.timetuple())\n return a1PO - 631065600",
"def n99j(YKHO, JRYC):\n return ITS7.mktime(JRYC.timetuple())",... | [
"0.6894483",
"0.6668733",
"0.65802664",
"0.65694404",
"0.6506593",
"0.6502286",
"0.6486623",
"0.648158",
"0.6450348",
"0.6443139",
"0.6324786",
"0.632053",
"0.63054234",
"0.6258919",
"0.6201119",
"0.6150786",
"0.6142224",
"0.61408305",
"0.613929",
"0.6095592",
"0.6077106",
... | 0.60715127 | 21 |
Convert a Microsoft FILETIME/LDAP timestamp to a date | def OSzj(YKHO):
try:
WgTK = JRYC.utcfromtimestamp((float(ai9l) - YKHO.epoch_as_filetime) / YKHO.hundreds_nano)
YKHO.in_filetime = WgTK.strftime('%Y-%m-%d %H:%M:%S.%f')
except Exception as e:
if not qIxc.log:
pass
else:
G9jH.error(str(type(tTpl)) + ',' + st... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nJzU(E3oo: float):\n from datetime import datetime, timedelta\n return datetime(1601, 1, 1) + timedelta(E3oo / 10000000)",
"def JQc6(YADT):\n try:\n g75m, i8WE = str(BlNT.unpack('<d', YADT)[0]).split('.')\n JRYC = qcWV.datetime(1899, 12, 30, 0, 0, 0) + qcWV.timedelta(days=int(g75m), se... | [
"0.7521619",
"0.6723393",
"0.66237974",
"0.6582824",
"0.6581104",
"0.65597296",
"0.6548048",
"0.6525962",
"0.65127486",
"0.64833313",
"0.64430183",
"0.6411698",
"0.6411056",
"0.63988113",
"0.6351106",
"0.6339823",
"0.63081187",
"0.6267478",
"0.62551963",
"0.6239316",
"0.62338... | 0.0 | -1 |
Convert an iOS 11 timestamp to a date | def WfdH(YKHO):
try:
WgTK = int(A9Qd) / int(YKHO.nano_2001) + 978307200
YKHO.in_iostime = JRYC.utcfromtimestamp(WgTK).strftime('%Y-%m-%d %H:%M:%S.%f')
except Exception as e:
if not qIxc.log:
pass
else:
G9jH.error(str(type(tTpl)) + ',' + str(tTpl))
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Cxh3(Emd4, E3oo):\n return _c1T()",
"def Elj9(E3oo):\n iLV1 = ZbWC.match('(.*?\\\\+\\\\d{2}):(.*)', E3oo)\n p7fT = qcWV.strptime('{}{}'.format(iLV1.group(1), iLV1.group(2)), '%Y-%m-%dT%H:%M:%S%z').strftime('%Y-%m-%dT%H:%M:%S%z')\n return p7fT",
"def p0rV(E3oo):\n Igxa = I8kJ.dates.date2num(q... | [
"0.716403",
"0.68267757",
"0.68258494",
"0.6821402",
"0.68055016",
"0.677414",
"0.67386466",
"0.6690118",
"0.66589516",
"0.6658844",
"0.66268545",
"0.6602538",
"0.65678626",
"0.6557426",
"0.6552822",
"0.64536494",
"0.64246416",
"0.6412377",
"0.63869846",
"0.63568366",
"0.6352... | 0.0 | -1 |
Pad setences during training or prediction | def CDVN(Rhv4, zxGv='<PAD/>', Pzjg=None):
if Pzjg is None:
NXmX = max((len(WKvO) for WKvO in Rhv4))
else:
G9jH.critical('This is prediction, reading the trained sequence length')
NXmX = Pzjg
G9jH.critical('The maximum length is {}'.format(NXmX))
JCJ1 = []
for YRbF in range(le... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def el_E(__n6, dvgN=0):\n bW4_ = max((len(WKvO) for WKvO in __n6['input_ids']))\n for mWFP in Kzkc:\n __n6[mWFP] = [WKvO + [dvgN if mWFP != 'lm_labels' else -100] * (bW4_ - len(WKvO)) for WKvO in __n6[mWFP]]\n return __n6",
"def ViKf(Lcqa, Z5wO, _NR1=30):\n Lcqa = S5Za(Lcqa, _NR1, padding='pos... | [
"0.6810606",
"0.6755292",
"0.6332891",
"0.62951875",
"0.6234442",
"0.6204185",
"0.615709",
"0.6151445",
"0.6062087",
"0.6028578",
"0.6023542",
"0.6007432",
"0.5987225",
"0.598166",
"0.59643656",
"0.5959602",
"0.5931776",
"0.5906455",
"0.5895524",
"0.5885358",
"0.5873079",
"... | 0.5514172 | 45 |
Assert empty dict is returned, from Get request. | def NaNP(fiHr):
from learning_journal.views.default import login_view
assert login_view(fiHr) == {} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Axzg(YKHO):\n CVZi = uxxD({})\n YKHO.assertFalse(CVZi)\n YKHO.assertEqual(CVZi, {})",
"def wwUK(YKHO):\n _hkX = YKHO.app.get('/trucks?food=asfdasdf')\n YKHO.assertEqual(_hkX.status_code, 200)\n aEqx = '{ \"resp\": [] }'\n YKHO.assertEqual(aEqx.split(), _hkX.data.split())",
"def Sm4J(YK... | [
"0.6586842",
"0.65291643",
"0.6474818",
"0.6464325",
"0.64516366",
"0.6350558",
"0.632255",
"0.6316733",
"0.62955374",
"0.62821835",
"0.6276742",
"0.62717545",
"0.62418705",
"0.62272745",
"0.6219723",
"0.62144274",
"0.6212847",
"0.62110513",
"0.6199541",
"0.6194575",
"0.61612... | 0.6411408 | 5 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, nkxu):
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.8457179",
"0.8393067",
"0.81457263",
"0.8140635",
"0.8133462",
"0.8094992",
"0.8093376",
"0.8093376",
"0.8093376",
"0.80863357",
"0.80863357",
"0.8077303",
"0.8077303",
"0.8066831"
] | 0.0 | -1 |
Returns an initial state of the RNN all zeros | def y9Yv(YKHO):
return {'h_rec': iQnE(oyIN.zeros((1, YKHO.n_hidden), dtype=oyIN.float32)), 'c_rec': iQnE(oyIN.zeros((1, YKHO.n_hidden), dtype=oyIN.float32)), 'h_gen': iQnE(oyIN.zeros((1, YKHO.n_hidden), dtype=oyIN.float32)), 'c_gen': iQnE(oyIN.zeros((1, YKHO.n_hidden), dtype=oyIN.float32))} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MAw8(YKHO):\n MuED = ZylS.keras.initializers.Zeros()\n oCR3 = MuED(shape=(YKHO.batch, YKHO.units))\n return oCR3",
"def W9gz(YKHO, SGPK=None):\n if SGPK is not None:\n raise NotImplementedError('Dynamically specifying RNN weights is currently not supported.')\n EyxZ = YKHO._rnn_cell.get... | [
"0.7525748",
"0.74903667",
"0.71165377",
"0.70784265",
"0.7029868",
"0.69894075",
"0.69888306",
"0.6987151",
"0.68254983",
"0.6807929",
"0.6807929",
"0.6722552",
"0.6702969",
"0.66924655",
"0.6683905",
"0.66791815",
"0.6678694",
"0.66681474",
"0.66342866",
"0.66288906",
"0.65... | 0.0 | -1 |
Return the name of the BloomSky device and this sensor. | def mWFP(YKHO):
return YKHO._name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mWFP(YKHO):\n return YKHO._sensor.name",
"def mWFP(YKHO) -> str:\n return f'{YKHO.platform_name} {YKHO._sensor_name}'",
"def mWFP(YKHO):\n return YKHO.device.device_data[YKHO.device_id]['name'] + f' {YKHO._sensor_type}'",
"def mWFP(YKHO):\n return f'{YKHO.sensor_type['name']} ({YKHO._mac[-5:]... | [
"0.738719",
"0.7373163",
"0.7337761",
"0.7295362",
"0.72284335",
"0.7199388",
"0.709583",
"0.70807475",
"0.70807475",
"0.70807475",
"0.70103264",
"0.69815964",
"0.69559777",
"0.6939741",
"0.69265395",
"0.69127023",
"0.68736386",
"0.6871922",
"0.68709695",
"0.68358546",
"0.678... | 0.0 | -1 |
Return the sensor units. | def b82i(YKHO):
return U6Th.get(YKHO._sensor_name, None) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rYO3(YKHO):\n return YKHO._units",
"def rYO3(YKHO):\n return YKHO._units",
"def b82i(YKHO):\n return YKHO.sensor_type['unit']",
"def b82i(YKHO):\n return YKHO._units",
"def N4Vi(YKHO):\n YKHO.serial_connection.write('UNI' + YKHO.CR + YKHO.LF)\n mePw = YKHO.serial_connection.readline()... | [
"0.8183791",
"0.8183791",
"0.8125538",
"0.81162256",
"0.80243766",
"0.7990112",
"0.79814714",
"0.7968463",
"0.7949393",
"0.79344296",
"0.79256827",
"0.79248387",
"0.79200816",
"0.79200816",
"0.7916174",
"0.7916174",
"0.7904311",
"0.7894594",
"0.78914607",
"0.78555286",
"0.785... | 0.82949847 | 1 |
Get top left coordinate information of patches from original image. | def xJrk(yOrK, zi3C, a6Jb):
y80O = zi3C - a6Jb
dCu6 = oyIN.floor((yOrK - y80O) / a6Jb) + 1
JKj0 = y80O // 2 + dCu6 * a6Jb
KUCN = oyIN.arange(y80O[0] // 2, JKj0[0], a6Jb[0], dtype=oyIN.int32)
YKvn = oyIN.arange(y80O[1] // 2, JKj0[1], a6Jb[1], dtype=oyIN.int32)
KUCN, YKvn = oyIN.meshgrid(KUCN, YKv... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R5Ot(H2v2, TVTK, FTrt):\n jOu6 = epAf.ceil(H2v2 / FTrt)\n GKv7 = epAf.ceil(TVTK / FTrt)\n qPJi = oyIN.linspace(0, H2v2 - FTrt, jOu6, dtype=int)\n w_Ya = oyIN.linspace(0, TVTK - FTrt, GKv7, dtype=int)\n return Lx3t(qPJi, w_Ya)",
"def AMuk(YKHO):\n YKHO._updateExtents()\n return (YKHO._mMi... | [
"0.74993706",
"0.6426762",
"0.6220696",
"0.6110853",
"0.6075238",
"0.6055196",
"0.6011379",
"0.6000418",
"0.5960915",
"0.5904197",
"0.5904197",
"0.5892315",
"0.58771145",
"0.58740354",
"0.58325875",
"0.58195746",
"0.58085096",
"0.5779697",
"0.5767549",
"0.5767549",
"0.5726579... | 0.7982845 | 0 |
Evaluate Gaussian model at a given ``y`` position. | def uuln(YKHO, LVAh, K5WD):
return Czcu.evaluate(LVAh, **K5WD) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fy0J(YKHO, WKvO):\n WKvO = oyIN.asanyarray(WKvO, dtype=float)\n vkcq = YKHO.parvals(WKvO)\n return Czcu(**vkcq)",
"def uL4k(YKHO, LVAh):\n CKZf = (LVAh - YKHO.beta.get_value(borrow=True)) * oyIN.exp(-YKHO.log_gamma.get_value(borrow=True))\n WKvO = oyIN.sqrt(YKHO.bv.get_value(borrow=True)) * CK... | [
"0.6420815",
"0.6100982",
"0.5866464",
"0.5855536",
"0.58145005",
"0.57746893",
"0.5736197",
"0.5703807",
"0.5690165",
"0.56057906",
"0.56052727",
"0.5579858",
"0.55702215",
"0.55416375",
"0.5526467",
"0.5514051",
"0.55105793",
"0.54939246",
"0.54939246",
"0.54889137",
"0.548... | 0.7420885 | 0 |
Create model at a given ``x`` position. | def fy0J(YKHO, WKvO):
WKvO = oyIN.asanyarray(WKvO, dtype=float)
vkcq = YKHO.parvals(WKvO)
return Czcu(**vkcq) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nrOS(YKHO, WKvO, **B2fa):\n return YKHO.model(WKvO)",
"def l_xx(YKHO, LVAh, WKvO):\n raise NotImplementedError()",
"def tNYh(YKHO, WKvO):\n raise NotImplementedError",
"def C3ST(YKHO, WKvO):\n h1oh.module('decoder', YKHO.decoder)\n with h1oh.plate('data', WKvO.shape[0]):\n jeti = WK... | [
"0.58288854",
"0.58076024",
"0.5785077",
"0.57364976",
"0.5700326",
"0.5656319",
"0.557494",
"0.5518077",
"0.55146194",
"0.54919815",
"0.54678744",
"0.5414503",
"0.54130846",
"0.5408341",
"0.53989804",
"0.53989804",
"0.5392206",
"0.5383618",
"0.5381531",
"0.5381298",
"0.53768... | 0.0 | -1 |
Create `EnergyOffsetBackgroundModel` from `~astropy.table.Table`. | def zDGD(Emd4, tyNF):
GAzA = fyLx(tyNF['THETA_LO'].squeeze(), tyNF['THETA_HI'].squeeze())
GAzA = CEWs(GAzA, tyNF['THETA_LO'].unit)
QpQ9 = fyLx(tyNF['ENERG_LO'].squeeze(), tyNF['ENERG_HI'].squeeze())
QpQ9 = KgdB(QpQ9, tyNF['ENERG_LO'].unit)
BWz1 = f9X8(tyNF['counts'].squeeze(), tyNF['counts'].unit)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zDGD(Emd4, tyNF):\n AJhu = tyNF['THETA_LO'].quantity[0]\n spVh = tyNF['THETA_HI'].quantity[0]\n vgXP = (spVh + AJhu) / 2\n vgXP = CEWs(vgXP, unit=tyNF['THETA_LO'].unit)\n cGhH = tyNF['ENERG_LO'].quantity[0]\n ukyH = tyNF['ENERG_HI'].quantity[0]\n wvik = tyNF['RAD_LO'].quantity[0]\n oaci... | [
"0.612502",
"0.5769339",
"0.56298745",
"0.5528021",
"0.5247027",
"0.5232389",
"0.5166305",
"0.51234365",
"0.50915533",
"0.5052797",
"0.50513947",
"0.49745876",
"0.49739397",
"0.49359122",
"0.48861483",
"0.48749655",
"0.48749655",
"0.4866256",
"0.48651654",
"0.4850702",
"0.484... | 0.70645463 | 0 |
Check if the graph has any cycles. | def DYWB(YKHO, SLBp, azXi, _AKB):
azXi[SLBp] = True
for YRbF in YKHO.graph[SLBp]:
if not azXi[YRbF]:
if YKHO.hasCycle(YRbF, azXi, SLBp):
return True
elif _AKB != YRbF:
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XqHT(YKHO, pNZh):\n if list(jHsn.simple_cycles(pNZh)):\n raise NUe0('Cycles in graph')",
"def CU9c(pNZh):\n pmON = set()\n\n def TClq(Q6kx):\n pmON.add(Q6kx)\n for _Wdu in pNZh.edges[Q6kx]:\n if _Wdu in pmON or TClq(_Wdu):\n return True\n pmON.re... | [
"0.8277688",
"0.8112336",
"0.7991218",
"0.744913",
"0.7403725",
"0.73323137",
"0.7322986",
"0.73166233",
"0.7172144",
"0.71607846",
"0.714058",
"0.7051733",
"0.6994611",
"0.69436145",
"0.6902383",
"0.6853606",
"0.6845814",
"0.6751294",
"0.674111",
"0.67003477",
"0.66949975",
... | 0.663254 | 22 |
Compute the euclidean distance of coords[my_index] and all other members. Returns the index of the element with the shortest distance to my_index. | def nPs7(YKHO, jNOo, iuTC, ynSc):
ZSml, Tm2h = (0, 999999999)
hidT, vW94 = jNOo[iuTC]
for YRbF, (fvDH, rdlD) in enumerate(jNOo):
if YRbF in ynSc:
continue
Ayfi = epAf.sqrt((hidT - fvDH) ** 2 + (vW94 - rdlD) ** 2)
if Ayfi < Tm2h:
ZSml, Tm2h = (YRbF, Ayfi)
r... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VaHZ(YKHO, d6pt):\n if d6pt < 0:\n return (-1, -1)\n LVAh = YKHO._weights.shape[1]\n jNOo = YKHO.convert_map_to_euclidean((d6pt % LVAh, int(d6pt / LVAh)))\n return jNOo",
"def BZ_9(YKHO, d6pt, W0Eb):\n if d6pt != 0 and d6pt != len(W0Eb):\n jQrT = W0Eb[d6pt, :] - W0Eb[:d6pt, :]\n ... | [
"0.70474946",
"0.5616283",
"0.55508554",
"0.5509439",
"0.5440937",
"0.5437399",
"0.5424878",
"0.540946",
"0.5405059",
"0.53996086",
"0.5396037",
"0.5364426",
"0.53588015",
"0.53488976",
"0.53012383",
"0.5258454",
"0.5258454",
"0.5248285",
"0.5244714",
"0.52325785",
"0.5229146... | 0.663401 | 1 |
The transparent option makes all zeros transparent, and all ones red (expects image with only 1s and 0s) | def FHzR(VsCo, S8Eq, B5M9, ZHfW=None, lhUb='?', BkHD='?'):
S8Eq = VsCo.shape
WKvO = oyIN.arange(0.0, (S8Eq[1] + 1) * B5M9[0], B5M9[0])
LVAh = oyIN.arange(0.0, (S8Eq[0] + 1) * B5M9[1], B5M9[1])
if ZHfW is not None:
LpTI = oyIN.ma.masked_array(VsCo, ZHfW)
MynD = oyIN.min(VsCo)
n4wC = oyIN.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Jaq6(VXjJ):\n assert VXjJ.shape[-1] == 4\n Spna = oyIN.all(VXjJ == [255, 255, 255, 255], axis=-1)\n VXjJ[Spna, -1] = 0",
"def H2jU(VXjJ):\n iF0M = open(Hy7s.path.join(gCuF.BASE_DIR, 'static', 'mask_undistorted.npy'), 'r')\n khHY = oyIN.load(iF0M)\n Cwt5 = 200 * khHY\n VXjJ = Zxt2.misc.im... | [
"0.7990784",
"0.6845133",
"0.6769595",
"0.6594898",
"0.6480677",
"0.64602685",
"0.63998324",
"0.6337914",
"0.6187336",
"0.6172233",
"0.6038508",
"0.60338336",
"0.60233325",
"0.6011373",
"0.60059357",
"0.59093106",
"0.58834046",
"0.587682",
"0.5853227",
"0.58483946",
"0.584428... | 0.0 | -1 |
The transparent option makes all zeros transparent, and all ones red (expects image with only 1s and 0s) | def ffMc(VsCo, yELM, aWfZ, NZ9S, S8Eq, B5M9, ZHfW=None):
WKvO = oyIN.arange(0.0, (S8Eq[0] + 1) * B5M9[0], B5M9[0])
LVAh = oyIN.arange(0.0, (S8Eq[1] + 1) * B5M9[1], B5M9[1])
epBp = oyIN.arange(0.0, (S8Eq[2] + 1) * B5M9[2], B5M9[2])
if ZHfW is not None:
VsCo = oyIN.ma.masked_array(VsCo, ZHfW)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Jaq6(VXjJ):\n assert VXjJ.shape[-1] == 4\n Spna = oyIN.all(VXjJ == [255, 255, 255, 255], axis=-1)\n VXjJ[Spna, -1] = 0",
"def H2jU(VXjJ):\n iF0M = open(Hy7s.path.join(gCuF.BASE_DIR, 'static', 'mask_undistorted.npy'), 'r')\n khHY = oyIN.load(iF0M)\n Cwt5 = 200 * khHY\n VXjJ = Zxt2.misc.im... | [
"0.7991519",
"0.6845003",
"0.6769248",
"0.65958136",
"0.64802855",
"0.6460187",
"0.6399936",
"0.63370085",
"0.6186221",
"0.6171474",
"0.6037121",
"0.603348",
"0.6021914",
"0.60108435",
"0.60055166",
"0.59093386",
"0.58830273",
"0.587606",
"0.58547205",
"0.58485574",
"0.584535... | 0.0 | -1 |
previous_encoded_c of shape (batch_size, max_words, 1024) sim_weights os shape (batch_size, max_words) | def KVH6(YKHO, d6P9, KlEX, nwKK=False):
if not nwKK:
mTW8 = KlEX.detach()
BWXx, eBed = ht2j.max(mTW8, 1)
BWXx = BWXx.unsqueeze(1)
ZHfW = ht2j.zeros_like(mTW8)
ZHfW.scatter_(1, eBed.unsqueeze(1), 1)
fq8L = ZHfW.clone()
jDei = BWXx.squeeze(1)
fq8L[fq8L =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c2Ky(GIN8, cuAv):\n MSZA = YKHO.weights_ie[:, GIN8]\n daI8 = Kt_s.nnet.hard_sigmoid(YKHO.weights_eh[0].dot(MSZA) + YKHO.weights_hh[0].dot(cuAv) + YKHO.bias[0])\n iPBU = Kt_s.nnet.hard_sigmoid(YKHO.weights_eh[1].dot(MSZA) + YKHO.weights_hh[1].dot(cuAv) + YKHO.bias[1])\n W3ev = Kt_s.tanh(YKHO.weights... | [
"0.5821994",
"0.5635608",
"0.5623582",
"0.5613903",
"0.555712",
"0.5554827",
"0.5521184",
"0.5468302",
"0.54641026",
"0.54074866",
"0.53863704",
"0.5376703",
"0.5374853",
"0.53443676",
"0.53334093",
"0.5321952",
"0.53100747",
"0.5305468",
"0.5249059",
"0.52398026",
"0.5211004... | 0.7011647 | 0 |
Sets user.is_active to True | def RRlm(YKHO):
NWpQ(YKHO.user, YKHO.request)
YKHO.assertEqual(YKHO.user.is_active, True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NWpQ(YKHO, CBIr):\n if not CBIr.active:\n CBIr.active = True\n return True\n return False",
"def WEow(YKHO, CBIr):\n CBIr.active = not CBIr.active\n return True",
"def WEow(YKHO, CBIr):\n CBIr.active = not CBIr.active\n YKHO.save(CBIr)\n return True",
"def NWpQ(YKHO, CB... | [
"0.8371676",
"0.82205725",
"0.8142238",
"0.80616146",
"0.7826943",
"0.7773412",
"0.75890183",
"0.7485442",
"0.7311586",
"0.72669524",
"0.7244611",
"0.72345626",
"0.7108176",
"0.7108176",
"0.7108176",
"0.7108176",
"0.70847315",
"0.6994057",
"0.6974592",
"0.69696516",
"0.692485... | 0.744445 | 8 |
Constructor. Any message fields that are implicitly/explicitly set to None will be assigned a default value. The recommend use is keyword arguments as this is more robust to future message changes. You cannot mix inorder arguments and keyword arguments. | def FIMM(YKHO, *qIxc, **c_sp):
if qIxc or c_sp:
super(TlUX, YKHO).__init__(*qIxc, **c_sp)
if YKHO.name is None:
YKHO.name = ''
if YKHO.type_name is None:
YKHO.type_name = ''
if YKHO.home is None:
YKHO.home = V06A.msg.Coordinate()
if YKHO.mo... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, *qIxc, **c_sp):\n if qIxc or c_sp:\n super(JwGr, YKHO).__init__(*qIxc, **c_sp)\n if YKHO.header is None:\n YKHO.header = kKAJ.msg.Header()\n if YKHO.cmd is None:\n YKHO.cmd = ''\n if YKHO.cat is None:\n YKHO.cat = ''\n else:\n ... | [
"0.7794532",
"0.771984",
"0.771984",
"0.7685841",
"0.76261926",
"0.7563172",
"0.7439402",
"0.7416625",
"0.73522186",
"0.73088753",
"0.7280711",
"0.7237753",
"0.722683",
"0.7223247",
"0.7223247",
"0.7219359",
"0.7211174",
"0.7211174",
"0.7211174",
"0.7211174",
"0.7211174",
"... | 0.0 | -1 |
Tests that when both the lower and upper bound of the routing function have the same sign, then the output is either 0 (when positive) and 1 (when negative). | def LZ1b():
assert _UxV(lambda_2=2, lambda_1_1=1, lambda_1_2=1, mu_1=2, mu_2=2, num_of_servers_1=3, num_of_servers_2=3, threshold_1=3, threshold_2=3, system_capacity_1=5, system_capacity_2=5, buffer_capacity_1=4, buffer_capacity_2=4, lower_bound=0.1, upper_bound=0.2) == 1
assert _UxV(lambda_2=2, lambda_1_1=1, l... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zihr(jzdc):\n return (jzdc > 0) - (jzdc < 0)",
"def Zihr(WKvO):\n if WKvO >= 0:\n return 1\n else:\n return -1",
"def Zihr(WKvO):\n if WKvO >= 0:\n return 1\n return -1",
"def Zihr(jzdc):\n return (jzdc > 0) - (jzdc < 0)",
"def zLMb(jzdc, Fg_i):\n return 0 < jz... | [
"0.6642891",
"0.6541612",
"0.65165484",
"0.6497186",
"0.63950735",
"0.6290676",
"0.62638414",
"0.619625",
"0.6172515",
"0.6075034",
"0.5956528",
"0.59431463",
"0.5921977",
"0.5863811",
"0.5853832",
"0.5845314",
"0.58412176",
"0.58142364",
"0.57892156",
"0.5778994",
"0.5747570... | 0.0 | -1 |
Verifies that the user isn't trying to test Windows containers under Windows 10 when in Linux container mode (or vice versa) | def N6LC(YKHO, bo34, sfwE):
y0cW = YKHO.getPrefix()
aO6a = KG0j.info()
YflV = aO6a['OSType'].lower()
if sfwE == 'windows' and YflV == 'linux':
bo34.error('[{}] Error: attempting to test Windows containers while Docker Desktop is in Linux container mode.'.format(y0cW), False)
bo34.error('... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cVHB(YKHO):\n pass",
"def tpMG(YKHO):\n pass",
"def uw8Z(YKHO):\n YKHO.check_guest_os()",
"def uw8Z(YKHO):\n YKHO.check_guest_os()",
"def uw8Z(YKHO):\n YKHO.check_guest_os()",
"def uw8Z(YKHO):\n YKHO.check_guest_os()",
"def uw8Z(YKHO):\n YKHO.check_guest_os()",
"def uw8Z(YKHO... | [
"0.7166059",
"0.7139077",
"0.68346125",
"0.68346125",
"0.68346125",
"0.68346125",
"0.68346125",
"0.68346125",
"0.68346125",
"0.68346125",
"0.68346125",
"0.68346125",
"0.68346125",
"0.68346125",
"0.68346125",
"0.68346125",
"0.68346125",
"0.68346125",
"0.66991925",
"0.6648137",
... | 0.65342283 | 21 |
Get or update the item record of a project by project_id and item name. | def CYo7(bNKA, ZfUD):
p4sf = WsL5.request.db_api
AIu6 = {}
if WsL5.request.method == 'GET':
try:
J2us = p4sf.get_project_item_record_by_name(project_id=bNKA, item_name=ZfUD)
AIu6 = J2us[0]
except AJ5d.ProjectItemRecordNotFound:
raise ZrWc.exc.HTTPNotFound(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Er2v(ekCf, zDRZ, AaTp=False, cuiw=None):\n cuiw = cuiw or KfiN()\n if not q4hN(zDRZ, session=cuiw):\n ZFWY(zDRZ, session=cuiw)\n ZfUD = q4hN(zDRZ, session=cuiw)\n Aofo = cuiw.query(FYrf.ProjectItemRecord).filter_by(project_id=ekCf).filter_by(item_id=ZfUD.id).filter_by(deleted=AaTp).all()\n ... | [
"0.75429827",
"0.7015521",
"0.6821756",
"0.68016136",
"0.63736606",
"0.62258315",
"0.61081773",
"0.60852194",
"0.60791063",
"0.6067687",
"0.5962019",
"0.59535795",
"0.5949411",
"0.5902678",
"0.58968616",
"0.5840588",
"0.5837466",
"0.58345145",
"0.5825177",
"0.5762052",
"0.573... | 0.71817136 | 1 |
Encode entity labels into integers. Convert characters in a text to integers according to the entity labels provided and label_to_int dictionary where the dictionary gives a mapping between an entity label and an integer. | def lfRF(cSG5: int, MMe4: List[Entity], lkr7: Dict[str, int]) -> x1iM[int]:
Wxnj = [0] * cSG5
for uvMl in MMe4:
M9Mk = uvMl.entity_type
try:
SYx2 = lkr7[M9Mk]
except KeyError as err:
raise Exception(f"Missing label {str(XObx)} in 'label_to_int' mapping.")
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def z7z1(YKHO, Crrw):\n vIwR = []\n for YRbF in Crrw:\n vIwR.append(YKHO.index_map[YRbF])\n return ''.join(vIwR).replace('', ' ')",
"def CRNq(Crrw):\n if not len(Crrw):\n raise ValueError('Nothing to convert!')\n if isinstance(Crrw[0], exCv) or isinstance(Crrw[0], int):\n _lDj... | [
"0.63895965",
"0.6194113",
"0.60456085",
"0.59288",
"0.58300567",
"0.568179",
"0.565656",
"0.5641569",
"0.55291486",
"0.54936796",
"0.5492864",
"0.54545414",
"0.5388275",
"0.5353546",
"0.5348476",
"0.53424805",
"0.53339297",
"0.53163546",
"0.5281264",
"0.5274489",
"0.52669984... | 0.75274545 | 0 |
Compute precision for every entity in prediction. | def uBvW(cSG5: int, fNKS: List[Entity], eCeT: List[Entity], knyY: Dict) -> x1iM[kl7E]:
p1n0: x1iM[int] = lfRF(cSG5, fNKS, knyY)
gCUM = []
for ilF8 in eCeT:
yv1q: int = knyY[ilF8.entity_type]
if yv1q == 0:
continue
Ecql: x1iM[int] = lfRF(cSG5, [ilF8], knyY)
rhd_ = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"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())\n return rhd_",
"def VvxU(YKHO, Y8eF, aMgO):\n gBRp = (aMgO != 3).astype('int')\n C6ZX = (aMgO[oyIN.where(gBRp)] == Y8eF... | [
"0.7430163",
"0.7419302",
"0.7371651",
"0.73427016",
"0.7301947",
"0.7288655",
"0.72535414",
"0.72535414",
"0.72535414",
"0.72535414",
"0.72535414",
"0.72535414",
"0.72234374",
"0.72234374",
"0.72234374",
"0.72234374",
"0.72234374",
"0.72234374",
"0.72234374",
"0.72234374",
"... | 0.7439835 | 0 |
Compute recall for every entity in ground truth. | def gVFZ(cSG5: int, fNKS: List[Entity], eCeT: List[Entity], knyY: Dict) -> x1iM[rY0E]:
MDQY: x1iM[int] = lfRF(cSG5, eCeT, knyY)
dYrk = []
for oBML in fNKS:
yv1q: int = knyY[oBML.entity_type]
if yv1q == 0:
continue
n00L: x1iM[int] = lfRF(cSG5, [oBML], knyY)
AOzf = ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AOzf(Y8eF, aMgO):\n COti = DDLl.sum(DDLl.round(DDLl.clip(Y8eF * aMgO, 0, 1)))\n z5jX = DDLl.sum(DDLl.round(DDLl.clip(Y8eF, 0, 1)))\n AOzf = COti / (z5jX + DDLl.epsilon())\n return AOzf",
"def AOzf(Y8eF, aMgO):\n COti = CdMZ.sum(CdMZ.round(CdMZ.clip(Y8eF * aMgO, 0, 1)))\n z5jX = CdMZ.sum(CdM... | [
"0.71589637",
"0.70962185",
"0.6991758",
"0.6938774",
"0.6894228",
"0.68659854",
"0.68659854",
"0.68659854",
"0.68659854",
"0.68659854",
"0.68659854",
"0.6864705",
"0.684957",
"0.684957",
"0.684957",
"0.684957",
"0.684957",
"0.684957",
"0.684957",
"0.684957",
"0.684957",
"0... | 0.6304296 | 55 |
Converts any Windows cp1252 or unicode characters in a string to ASCII equivalents | def HN13(YKHO, o9EA):
o9EA = YKHO.kill_gremlins(o9EA)
if isinstance(o9EA, str):
o9EA = XKrx(o9EA)
return o9EA | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pTAa(vIwR):\n for H5ew in iwQq:\n vIwR = vIwR.replace(H5ew, iwQq[H5ew])\n return vIwR",
"def ZRf4(vIwR):\n if vIwR is None:\n return\n if isinstance(vIwR, str):\n vIwR = vIwR.decode('utf-8')\n return NkkI('NFKD', vIwR).encode('ASCII', 'ignore')",
"def GXoZ(KCHu):\n U5... | [
"0.7610534",
"0.7411552",
"0.7275117",
"0.72164524",
"0.7192002",
"0.71763045",
"0.70898664",
"0.7036634",
"0.7009581",
"0.6873844",
"0.683578",
"0.6817368",
"0.6786621",
"0.6762332",
"0.6722891",
"0.66941625",
"0.66534585",
"0.6568905",
"0.6460054",
"0.6330581",
"0.6319588",... | 0.0 | -1 |
Creates a plane from 3 points, expects the points as a np arrays For intersertion detection, it assumes plane is normal to one of x, y or z axis | def FIMM(YKHO, jzdc, Fg_i, Z9rn):
YKHO.normal = oyIN.cross(jzdc - Fg_i, Z9rn - Fg_i)
YKHO.offset = oyIN.sum(Fg_i * YKHO.normal)
YKHO.xbounds = sorted(list(set([jzdc[0], Fg_i[0], Z9rn[0]])))
YKHO.ybounds = sorted(list(set([jzdc[1], Fg_i[1], Z9rn[1]])))
YKHO.zbounds = sorted(list(set([jzdc[2], Fg_i[2]... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SKlf(LTIa, EBgd, HpuQ, Lq8X, pid0):\n EBgd = oyIN.asarray(EBgd)\n HpuQ = oyIN.asarray(HpuQ)\n Lq8X = oyIN.asarray(Lq8X)\n hQHm = Lq8X - EBgd\n jlSq = HpuQ - EBgd\n U7YL = oyIN.cross(hQHm, jlSq)\n jzdc, Fg_i, Z9rn = U7YL\n Csk6 = oyIN.dot(U7YL, Lq8X)\n kEC0 = YU_E.vtkPlane()\n hLRM... | [
"0.77498144",
"0.7309693",
"0.7158128",
"0.70206904",
"0.70206904",
"0.6922515",
"0.6871519",
"0.6864326",
"0.6797485",
"0.6759645",
"0.675029",
"0.6708802",
"0.6656291",
"0.6656291",
"0.66499865",
"0.66351587",
"0.65763927",
"0.65413296",
"0.6529056",
"0.6476305",
"0.6454881... | 0.0 | -1 |
Pad setences during training or prediction | def CDVN(Rhv4, zxGv='<PAD/>', Pzjg=None):
if Pzjg is None:
NXmX = max((len(WKvO) for WKvO in Rhv4))
else:
G9jH.critical('This is prediction, reading the trained sequence length')
NXmX = Pzjg
G9jH.critical('The maximum length is {}'.format(NXmX))
JCJ1 = []
for YRbF in range(le... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def el_E(__n6, dvgN=0):\n bW4_ = max((len(WKvO) for WKvO in __n6['input_ids']))\n for mWFP in Kzkc:\n __n6[mWFP] = [WKvO + [dvgN if mWFP != 'lm_labels' else -100] * (bW4_ - len(WKvO)) for WKvO in __n6[mWFP]]\n return __n6",
"def ViKf(Lcqa, Z5wO, _NR1=30):\n Lcqa = S5Za(Lcqa, _NR1, padding='pos... | [
"0.6811813",
"0.6756918",
"0.6333849",
"0.6296382",
"0.62359804",
"0.62053674",
"0.61575395",
"0.61532676",
"0.60639745",
"0.6027797",
"0.60237944",
"0.6009327",
"0.5988328",
"0.5981693",
"0.59657866",
"0.59606075",
"0.59334004",
"0.5905888",
"0.58960974",
"0.58863276",
"0.58... | 0.55173486 | 43 |
Test fail launch with a wrong argument for JSON topology file. | def snPh(YKHO):
qIxc = YKHO.args.copy()
qIxc['lipid_jsons'] = str(Jaex / 'Berger_POPC.json')
with trZe.raises(TypeError) as XObx:
XSNG.launch(**qIxc)
assert "a list is expected for argument 'lipid_jsons'" in str(XObx.value) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qOVQ(YKHO):\n qIxc = YKHO.args.copy()\n R2UH = x8Ll.read_lipids_topH([x8Ll.PATH_JSON / 'CHARMM36_POPC.json'])\n jtxi = R2UH['CHARMM36_POPC']\n qIxc['dic_lipid'] = jtxi\n with trZe.raises(SX9y) as XObx:\n XSNG.main(**qIxc)\n assert 'The topology chosen (json file) does not match the str... | [
"0.70512414",
"0.67797405",
"0.66755354",
"0.64805764",
"0.639918",
"0.6380258",
"0.6358397",
"0.6348924",
"0.633285",
"0.6318311",
"0.63104254",
"0.6287557",
"0.627666",
"0.62352645",
"0.61781204",
"0.6178037",
"0.6101389",
"0.60435796",
"0.60431653",
"0.6006253",
"0.5995346... | 0.72606194 | 0 |
Select a checkpoint to load to resume training. | def zR7y(N_e1: Path) -> AzJI[BooM.Epoch, iS6_.Checkpoint]:
vl4k = -1
for pmON in (N_e1 / 'epochs').iterdir():
if pmON.name.endswith('.EpochList.pbtxt'):
qtWj = ah5x.FromFile(pmON, BooM.EpochList())
if not qtWj.epoch[0].train_results.graph_count:
continue
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kvfq(YKHO, vauY):\n BJY9 = CbyH.load(vauY)\n YKHO.model.set_state_dict(BJY9)",
"def UN7N(YKHO, sPrH):\n sPrH = str(sPrH)\n YKHO.logger.info('Loading checkpoint: {} ...'.format(sPrH))\n vauY = ht2j.load(sPrH)\n YKHO.start_epoch = vauY['epoch'] + 1\n if vauY['config']['model'] != YKHO.conf... | [
"0.75206304",
"0.73607624",
"0.7334925",
"0.7325896",
"0.726916",
"0.7222227",
"0.7120622",
"0.7034583",
"0.70133954",
"0.6964548",
"0.67128015",
"0.66309077",
"0.6566428",
"0.6492816",
"0.64233214",
"0.6418433",
"0.63720304",
"0.6333217",
"0.62915045",
"0.6195033",
"0.618666... | 0.5909408 | 33 |
The name of the command policy. | def I0TF(YKHO, m5SZ):
YKHO.options['policyname'] = m5SZ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CX3n(YKHO):\n return YKHO._policy_name",
"def CX3n(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'policy_name')",
"def CX3n(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'policy_name')",
"def CX3n(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'policy_name')",
"def CX3n(YKHO) -> ... | [
"0.8321798",
"0.8139905",
"0.8139905",
"0.8139905",
"0.8139905",
"0.8139905",
"0.8139905",
"0.8139905",
"0.80340105",
"0.80318177",
"0.7909626",
"0.7909626",
"0.7352069",
"0.7352069",
"0.734428",
"0.7296127",
"0.7296127",
"0.7296127",
"0.7227456",
"0.70231503",
"0.70231503",
... | 0.61629903 | 44 |
The name of the command policy. | def hmAl(YKHO):
return YKHO.options['policyname'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CX3n(YKHO):\n return YKHO._policy_name",
"def CX3n(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'policy_name')",
"def CX3n(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'policy_name')",
"def CX3n(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'policy_name')",
"def CX3n(YKHO) -> ... | [
"0.8321798",
"0.8139905",
"0.8139905",
"0.8139905",
"0.8139905",
"0.8139905",
"0.8139905",
"0.8139905",
"0.80318177",
"0.7909626",
"0.7909626",
"0.7352069",
"0.7352069",
"0.734428",
"0.7296127",
"0.7296127",
"0.7296127",
"0.7227456",
"0.70231503",
"0.70231503",
"0.70231503",
... | 0.80340105 | 8 |
Get the current status of AIMP. The return value is one of the strings 'playing', 'paused' or 'stopped'. | def SW6e(YKHO):
_lBP = YKHO.SendCommand(m0no, 0, 104)
if _lBP == 1:
return 'playing'
elif _lBP == 3:
return 'paused'
else:
return 'stopped' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DaKo(YKHO):\n return YKHO.get(J1jo, 'GetPlayStatus')",
"def jGRS(YKHO):\n tO9_ = None\n if YKHO.is_playing():\n tO9_ = '[Playing]'\n else:\n tO9_ = '[Paused]'\n yIVm = YKHO._call_player_proxy('GetMetadata', None).unpack()[0]\n return tO9_ + ' \"%s\" by \"%s\" from \"%s\"' % (y... | [
"0.75403047",
"0.7337679",
"0.6807965",
"0.67946386",
"0.6544834",
"0.64080316",
"0.6404097",
"0.6377517",
"0.6377517",
"0.6377517",
"0.6377517",
"0.6377517",
"0.6377517",
"0.6377517",
"0.6377517",
"0.6377517",
"0.6377517",
"0.6377517",
"0.6377517",
"0.6377517",
"0.6377517",
... | 0.7558147 | 0 |
Given a Coord object, calculates distance from lat, lng | def g7Ac(YKHO, QnmL, jz6R, Oz1B='imperial'):
if YKHO.lat and YKHO.lng:
igSk = Y_1E(YKHO.lat)
iT5T = Y_1E(YKHO.lng)
TGuP = Y_1E(QnmL)
JSDM = Y_1E(jz6R)
H91H = JSDM - iT5T
n_9K = TGuP - igSk
jzdc = YUNn(n_9K / 2) ** 2 + YhSR(igSk) * YhSR(TGuP) * YUNn(H91H / 2) *... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zG70(YKHO, jNOo):\n return Ayfi.distance(jNOo, (YKHO.lat, YKHO.long)).m",
"def Ayfi(YKHO, QnmL: float, FDPT: float) -> float:\n return Ayfi((YKHO.lat, YKHO.lon), (QnmL, FDPT))",
"def Ayfi(YKHO, mAYH, pks6):\n ZRC8 = mAYH.lat.sin() * pks6.lat.sin()\n k3bc = mAYH.lat.cos() * pks6.lat.cos()\n g... | [
"0.74048144",
"0.72016567",
"0.71007895",
"0.7042798",
"0.69678915",
"0.694673",
"0.6923824",
"0.6919646",
"0.68787616",
"0.68759567",
"0.6871707",
"0.68310785",
"0.681889",
"0.6736902",
"0.67287374",
"0.66907966",
"0.6665959",
"0.66597515",
"0.65909797",
"0.6578634",
"0.6578... | 0.72495896 | 1 |
Helper to generate a random name of n characters. | def _PbD(exwG=10):
return ''.join([tuKI.choice(buZr)] + tuKI.choices(Rb4E, k=exwG - 1)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Gje8(zNig=8, gLiZ=vIwR.ascii_uppercase + vIwR.digits):\n return ''.join((tuKI.choice(gLiZ) for bGrB in range(zNig)))",
"def TweX(zNig=6):\n gLiZ = vIwR.ascii_uppercase + vIwR.digits\n return 'test-' + ''.join((tuKI.choice(gLiZ) for WKvO in range(zNig)))",
"def hcjz(exwG):\n return ''.join((tuKI... | [
"0.85553813",
"0.8530234",
"0.84940225",
"0.8315678",
"0.81517273",
"0.8070606",
"0.7974023",
"0.7950569",
"0.7928394",
"0.7839016",
"0.7826571",
"0.7799704",
"0.7798972",
"0.7782455",
"0.77347004",
"0.7664048",
"0.7655837",
"0.76246434",
"0.7621716",
"0.75852",
"0.758013",
... | 0.90884703 | 0 |
Detect if a type of object (e.g. inverter) is present. Returns True if the object_type is found, False otherwise. | def qIoX(YKHO, vcaS):
if not isinstance(vcaS, str):
raise TypeError('object_type must be a string.')
return vcaS in YKHO.model_map['object'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def e8zD(YKHO, YEnM):\n return isinstance(YEnM, YKHO.type_)",
"def osAN(YKHO, hgiF):\n return hgiF in VLRj.Object.Get()",
"def WUsn(YEnM):\n return type(YEnM) is type or type(YEnM) is SnBA.ClassType",
"def WUsn(YEnM: Any) -> bool:\n return type(YEnM).__name__ == 'type'",
"def Xwjr(YKHO):\n r... | [
"0.7200224",
"0.71671087",
"0.712769",
"0.6975016",
"0.6948754",
"0.69310874",
"0.68714213",
"0.6785887",
"0.6708049",
"0.6685954",
"0.66145986",
"0.6553815",
"0.65352017",
"0.6447252",
"0.6426626",
"0.63977593",
"0.6388211",
"0.63703996",
"0.63603544",
"0.63396895",
"0.63264... | 0.84510404 | 0 |
Retrieve current input buffer in string form. | def sV4a(YKHO):
return YKHO.edit.toPlainText()[YKHO._prompt_pos:] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qTDM(YKHO):\n return '\\n'.join(YKHO.buf) + '\\n'",
"def YX9K(YKHO):\n return PSdN._get_input_buffer(YKHO)",
"def Nc2D(YKHO):\n Aofo = HwRy.stdin.readline().rstrip('\\n')\n return Aofo",
"def Nc2D():\n Aofo = HwRy.stdin.readline().rstrip('\\n')\n return Aofo",
"def j7NA(YKHO):\n re... | [
"0.73088473",
"0.7050501",
"0.67882276",
"0.6700045",
"0.66555655",
"0.6644165",
"0.6530334",
"0.6483679",
"0.6420547",
"0.64198655",
"0.6347521",
"0.63406336",
"0.63236254",
"0.629889",
"0.6286403",
"0.6204645",
"0.620429",
"0.6192095",
"0.61520296",
"0.61247635",
"0.6124763... | 0.6876911 | 2 |
Restores the model and optimizer to their initial states. | def SiRx(YKHO):
vauY = ht2j.load('model_lr_finder.pth.tar', map_location=YKHO.device)
YKHO.model.load_state_dict(vauY['state_dict'])
YKHO.optimizer.load_state_dict(vauY['optimizer'])
YKHO.model.to(YKHO.device)
YKHO.model.train() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SiRx(YKHO):\n YKHO.best_model = None\n YKHO.best_res = -1",
"def SiRx(YKHO):\n KCHu = YKHO\n KCHu.step_counter = 0\n IPme = []\n for SRYB in YKHO.model.trainable_vars:\n if YKHO.needs_correction(SRYB):\n w0S9 = KCHu[SRYB].A.svd\n KsRd = KCHu[SRYB].B2.svd\n ... | [
"0.7462873",
"0.7441567",
"0.7349743",
"0.7252147",
"0.7214998",
"0.7075496",
"0.70064104",
"0.69066596",
"0.69057864",
"0.68438566",
"0.6827934",
"0.6749382",
"0.6722334",
"0.6715925",
"0.67096066",
"0.66950375",
"0.66920483",
"0.6690903",
"0.6673025",
"0.6657675",
"0.665767... | 0.80304915 | 0 |
Build a layer of the model. p(h_layer | h_above) = Bernoulli(h_layer; sigmoid(w^T h_above + b)) | def CzWW(YKHO, exwG, lQj7):
_Fei = YKHO.config
cDK5 = lQj7.get_shape().as_list()[0]
lQj7 = ZylS.reshape(lQj7, [cDK5 * _Fei['batch_size'], _Fei['p/h_dim']])
KeL5 = Fz20.fully_connected(lQj7, _Fei['p/h_dim'], activation_fn=None, scope='fc%d' % exwG)
KeL5 = ZylS.reshape(KeL5, [cDK5, _Fei['batch_size'],... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def e4Qc(YKHO):\n Pq1o = YKHO.input_count + 1\n YKHO.weights = oyIN.random.rand(Pq1o, YKHO.node_count)\n YKHO.weights_and_activations = (YKHO.weights, YKHO.activations)",
"def Cc7Y(em7r, jTqs):\n CGJJ = em7r.output\n CGJJ = Pf_s()(CGJJ)\n CGJJ = l6ZH(1024, activation='relu')(CGJJ)\n CGJJ = l... | [
"0.6723083",
"0.6511757",
"0.6477188",
"0.63526386",
"0.63361466",
"0.6325239",
"0.63211584",
"0.63102317",
"0.6286605",
"0.62595195",
"0.6253439",
"0.62318915",
"0.62102175",
"0.61897993",
"0.61770236",
"0.61598736",
"0.6152707",
"0.61441886",
"0.6090675",
"0.60889035",
"0.6... | 0.68266386 | 0 |
Get all operation classes. | def sfcF():
return Qqdm().get_all_classes() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ylai(YKHO):\n return YKHO._classes",
"def ylai(YKHO):\n return",
"def AMa7(YKHO):\n return YKHO.cur_config['ops']",
"def ylai(YKHO):\n xDcj = oOLZ('structure exploration/classes')\n geh0 = YKHO._submit_query(xDcj)\n return [LihS['c']['value'].split('/')[-1] for LihS in geh0]",
"def kx... | [
"0.6762586",
"0.6722294",
"0.6478772",
"0.64290303",
"0.6405854",
"0.63941467",
"0.63941467",
"0.63941467",
"0.63941467",
"0.63941467",
"0.63941467",
"0.63941467",
"0.63941467",
"0.63941467",
"0.63941467",
"0.63941467",
"0.63941467",
"0.63941467",
"0.63941467",
"0.63941467",
... | 0.8915402 | 0 |
Copy TensorFlow batch normalization params weights to Chainer model. | def rgc7(cb_Q, Scas, gEmA):
KMvS = cb_Q.graph.get_tensor_by_name('{}/gamma:0'.format(Scas)).eval()
UqYS = cb_Q.graph.get_tensor_by_name('{}/beta:0'.format(Scas)).eval()
zD69 = cb_Q.graph.get_tensor_by_name('{}/moving_mean:0'.format(Scas)).eval()
_qMg = cb_Q.graph.get_tensor_by_name('{}/moving_variance:0... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kPey(YKHO):\n YKHO.entity_embeddings.weight.data = NkkI(YKHO.entity_embeddings.weight.data, p=YKHO.norm_type, dim=1)",
"def kPey(YKHO):\n YKHO.entity_embeddings.weight.data = NkkI(YKHO.entity_embeddings.weight.data, p=YKHO.norm_type, dim=1)\n YKHO.normal_vectors.data = NkkI(YKHO.normal_vectors, p=2,... | [
"0.723366",
"0.6802309",
"0.67202914",
"0.6649555",
"0.6378509",
"0.6378509",
"0.6378509",
"0.62932724",
"0.62921965",
"0.6206307",
"0.60904115",
"0.60893893",
"0.6062609",
"0.6050533",
"0.60472804",
"0.6035019",
"0.6035019",
"0.59659564",
"0.5957332",
"0.5942991",
"0.5914373... | 0.0 | -1 |
Copy weights and params from the graph in the given TensorFlow session to the Chainer chain. | def cIww(cb_Q, C3ST):
print('Copying first layers ...')
ddRk(cb_Q, 'conv', C3ST.conv)
rgc7(cb_Q, 'conv/batchnorm', C3ST.bn_conv)
ddRk(cb_Q, 'conv_1', C3ST.conv_1)
rgc7(cb_Q, 'conv_1/batchnorm', C3ST.bn_conv_1)
ddRk(cb_Q, 'conv_2', C3ST.conv_2)
rgc7(cb_Q, 'conv_2/batchnorm', C3ST.bn_conv_2)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Mi0o(YKHO):\n ZylS.get_default_session().run(YKHO.copy_ops)",
"def K4Sp(cb_Q):\n Fzlc = [a1PO for a1PO in ZylS.trainable_variables() if a1PO.name.startswith('q_network')]\n Fzlc = sorted(Fzlc, key=lambda Ty9i: Ty9i.name)\n hanX = [a1PO for a1PO in ZylS.trainable_variables() if a1PO.name.startswit... | [
"0.6457076",
"0.59719586",
"0.5878138",
"0.5803329",
"0.5782668",
"0.5750543",
"0.57143885",
"0.5628671",
"0.56185555",
"0.56156",
"0.558618",
"0.5563755",
"0.5537649",
"0.5509412",
"0.5468578",
"0.54683",
"0.5466813",
"0.5466675",
"0.5459883",
"0.5456898",
"0.5432675",
"0.... | 0.0 | -1 |
Recursively apply a formatting dict to all strings in a configuration. Note that it skips applying the formatting if the string appears to contain latex (specifically, if it contains an "$"), since the formatting fails on nested brackets. | def jSMq(YEnM: Any, Hmkb: Dict[str, Any]) -> ImMB:
_yOu = YEnM
if isinstance(YEnM, str):
if '$' not in YEnM:
_yOu = vIwR.Formatter().vformat(YEnM, (), smrv(**Hmkb))
elif isinstance(YEnM, dict):
_yOu = {}
for G1Hx, Ty9i in YEnM.items():
_yOu[G1Hx] = jSMq(Ty9i, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kCYD(GPtr, EHfX):\n for G1Hx in AznI(GPtr):\n Ty9i = GPtr[G1Hx]\n if isinstance(Ty9i, dict) or isinstance(Ty9i, list):\n kCYD(Ty9i, EHfX)\n elif dh09(Ty9i, EHfX):\n GPtr[G1Hx] = Ty9i.format(**EHfX)",
"def format(YKHO, BWXx, H5ew=None, **B2fa):\n if not isinsta... | [
"0.72879493",
"0.6207643",
"0.56822747",
"0.55818796",
"0.54392344",
"0.5394973",
"0.53865546",
"0.5284291",
"0.5234413",
"0.5201787",
"0.5177622",
"0.5173156",
"0.5119361",
"0.51155764",
"0.5091752",
"0.5082112",
"0.5064434",
"0.5042223",
"0.49967426",
"0.49924043",
"0.49768... | 0.5996255 | 2 |
Centers the surface, making the center of surface stay in the same place regardless of size | def Mb0H(J20S: pygame.Surface, oeNL: tuple, r8hN):
KG9w = J20S.get_size()
ceKN = KG9w[0] / 2
yhPP = KG9w[1] / 2
DG4V = (oeNL[0] - ceKN, oeNL[1] - yhPP)
ySNz(J20S, DG4V, r8hN) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hgjH(YKHO):\n if YKHO.pos != 0.0:\n YKHO.pos = 0.0",
"def bI3s(Vjhr, L892, cizC, Ydjp):\n Vjhr.blit(L892, (cizC - L892.get_width() / 2, Ydjp - L892.get_height() / 2))",
"def NL_S(YKHO):\n YKHO.grfx[0].center = YKHO.center\n YKHO.update_bbox()",
"def PwZr(YKHO, *qIxc):\n return ujPI.... | [
"0.7148227",
"0.7049959",
"0.70094866",
"0.68771684",
"0.6737539",
"0.66818374",
"0.66727215",
"0.6649626",
"0.64498496",
"0.6449143",
"0.64100146",
"0.64066976",
"0.6340279",
"0.63358927",
"0.63358927",
"0.6319994",
"0.631114",
"0.6297253",
"0.6293939",
"0.62549764",
"0.6254... | 0.69673914 | 3 |
This returns just one np.array with +{halite} for friendly ships and {halite} for enemy ships. | def rGWH(YKHO, W061, tRnr):
YaXR = oyIN.zeros((YKHO.MAP_SIZE, YKHO.MAP_SIZE))
for oyg0, (bGrB, BhJz, _pRX) in enumerate(W061.players):
for C7MP in _pRX.values():
VxH7, Ppew = (C7MP[0], C7MP[1])
rdlD = VxH7 // YKHO.MAP_SIZE
fvDH = VxH7 % YKHO.MAP_SIZE
if oy... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BcjG(BH3N, C7MP, qIxc=None):\n if qIxc is None:\n qIxc = {}\n BZN_ = 'o'\n if Ke5A & O2K9:\n G9jH.info('Nav - ship {} is getting a density based move'.format(C7MP.id))\n oLdq = []\n for rmyT in BH3N.game_map.get_cell_blocks(C7MP.position, 3, 3):\n YUV1 = rmyT[0]\n XkN... | [
"0.55672044",
"0.554706",
"0.5381262",
"0.53400916",
"0.51238316",
"0.5106726",
"0.5094532",
"0.5066407",
"0.5038184",
"0.50207096",
"0.50010455",
"0.49866703",
"0.4986063",
"0.4950139",
"0.49409392",
"0.49194115",
"0.4911748",
"0.48821753",
"0.48678878",
"0.48657033",
"0.486... | 0.46344095 | 51 |
Gets acceleration data and calculates angles for X and Y | def CEUV(YKHO):
[dSHK, lC3L, bGrB] = YKHO.get_accelXYZ()
zbxI = sjir(dSHK, lC3L, IPI3)
lR5V = bNew(dSHK, lC3L, IPI3)
return [zbxI, lR5V] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LDyh(YKHO, WKvO, LVAh):\n PiiY = yvY1 * YKHO.m / (WKvO * WKvO + LVAh * LVAh) * -WKvO / oyIN.sqrt(WKvO * WKvO + LVAh * LVAh)\n JwzZ = yvY1 * YKHO.m / (WKvO * WKvO + LVAh * LVAh) * -LVAh / oyIN.sqrt(WKvO * WKvO + LVAh * LVAh)\n return oyIN.array([PiiY, JwzZ])",
"def vvh4(YKHO):\n WKvO = YKHO.read_i... | [
"0.7310501",
"0.6987066",
"0.68521965",
"0.678724",
"0.6650465",
"0.66330063",
"0.65935165",
"0.6428553",
"0.6387257",
"0.62658757",
"0.6263087",
"0.62563705",
"0.6253415",
"0.6253413",
"0.6246678",
"0.62452394",
"0.6241185",
"0.61460674",
"0.6091013",
"0.60710657",
"0.604123... | 0.67524683 | 4 |
list_of_arrays is a nonempty list of numpy arrays (with arbitrary number of dimensions) with the SAME shape | def ENFq(Cmjf):
ROpF = oyIN.shape(Cmjf)
Dlai = [ROpF[0] * ROpF[1]]
if len(ROpF) > 2:
for YRbF in range(2, len(ROpF)):
Dlai.append(ROpF[YRbF])
UBEs = oyIN.zeros(Dlai)
KCHu = 0
tTpl = ROpF[1]
for YRbF in range(0, ROpF[0]):
UBEs[KCHu:tTpl] = Cmjf[YRbF]
KCHu =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def y2Ao(YKHO, mGsV, qC1Y=1, yDqo=None, VNqG=True):\n for qw7D in mGsV:\n YKHO._create_array(qw7D, qC1Y, yDqo, VNqG)",
"def eiFe(BAGh):\n if len(BAGh) < 1:\n return None\n jHsn = 0\n for WKvO in BAGh:\n jHsn += len(WKvO)\n Vo9x = BAGh[0]\n ROpF = list(Vo9x.shape)\n ROpF[... | [
"0.70547235",
"0.6826023",
"0.676612",
"0.6544973",
"0.63776475",
"0.6242667",
"0.62184113",
"0.61642694",
"0.61642176",
"0.6107972",
"0.59678614",
"0.59547114",
"0.5950986",
"0.59383535",
"0.59221053",
"0.58658034",
"0.5856752",
"0.5854151",
"0.5828483",
"0.58279985",
"0.579... | 0.7216473 | 0 |
Split the message into up to length char lines | def lpha(OwIn, u54L):
Nqlg = []
V22M = OwIn.split(' ')
zFiD = ''
while len(V22M) != 0:
if zFiD == '':
zFiD = V22M.pop(0)
elif len(zFiD) + len(V22M[0]) + 1 < u54L:
zFiD += ' ' + V22M.pop(0)
else:
Nqlg.append(zFiD)
zFiD = ''
Nqlg.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LkGZ(Emd4, l5Ny):\n SQ3m = []\n jvSB = []\n for zFiD in l5Ny.splitlines():\n zNig = sum((len(Q7me) + 1 for Q7me in jvSB))\n dDGN = len(zFiD)\n if zNig + dDGN >= 2000:\n if jvSB:\n SQ3m.append('\\n'.join(jvSB))\n jvSB.clear()\n if... | [
"0.7255442",
"0.7190964",
"0.68198085",
"0.67212665",
"0.65531075",
"0.64914316",
"0.6482892",
"0.64518684",
"0.63417435",
"0.6232623",
"0.62295634",
"0.6222435",
"0.6190231",
"0.61692125",
"0.61521065",
"0.61156744",
"0.6069069",
"0.5970497",
"0.5964947",
"0.5926623",
"0.591... | 0.6600637 | 4 |
Constructor, new node is indirectly created by Op object __call__ method. Instance variables | def FIMM(YKHO):
YKHO.inputs = []
YKHO.op = None
YKHO.const_attr = None
YKHO.name = ''
YKHO.dtype = None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nrOS(YKHO):\n Esd_ = o7DN()\n Esd_.op = YKHO\n return Esd_",
"def nrOS(YKHO):\n Esd_ = o7DN()\n Esd_.op = YKHO\n return Esd_",
"def FIMM(YKHO, bXc0, khtY, Ol8d, APFA):\n ...",
"def nrOS(YKHO):\n Esd_ = dz6B.__call__(YKHO)\n return Esd_",
"def FIMM(YKHO, Oa1e: 'graph.Graph', L... | [
"0.8296807",
"0.8252858",
"0.7778686",
"0.7766668",
"0.76373076",
"0.7632972",
"0.7154859",
"0.69841194",
"0.69637954",
"0.69582844",
"0.69400877",
"0.69353133",
"0.6918601",
"0.69141066",
"0.6905606",
"0.6902581",
"0.688759",
"0.68815005",
"0.6875365",
"0.68752134",
"0.68646... | 0.6564638 | 47 |
Creates a node that represents a np.zeros array of same shape as node_A. | def nrOS(YKHO, HEP1):
Esd_ = dz6B.__call__(YKHO)
Esd_.inputs = [HEP1]
Esd_.name = 'Zeroslike(%s)' % HEP1.name
return Esd_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nrOS(YKHO, HEP1):\n Esd_ = dz6B.__call__(YKHO)\n Esd_.inputs = [HEP1]\n Esd_.name = 'Zeroslike(%s)' % HEP1.name\n return Esd_",
"def VNqG(*ROpF, **B2fa):\n return llWB(oyIN.zeros(ROpF), **B2fa)",
"def sbx9(YKHO):\n return oyIN.zeros([YKHO.nx])",
"def VNqG(ROpF, yDqo=oyIN.float32, si3H=F... | [
"0.7663554",
"0.65630096",
"0.6548745",
"0.6521809",
"0.6474439",
"0.6428771",
"0.63982576",
"0.6385404",
"0.63762736",
"0.6373774",
"0.6308839",
"0.62520796",
"0.6243805",
"0.62234515",
"0.622252",
"0.62024605",
"0.6142172",
"0.6116945",
"0.60908544",
"0.6047405",
"0.6046895... | 0.7654026 | 1 |
Returns zeros_like of the same shape as input. | def GvK6(YKHO, Q6kx, bJMc):
return oyIN.zeros(bJMc[0].shape) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PIEQ(nPrm):\n return sfxH.zeros_like(nPrm)",
"def PIEQ(jzdc):\n if isinstance(jzdc, oyIN.ndarray):\n return oyIN.zeros_like(jzdc)\n else:\n return nMvt.zeros_like(jzdc)",
"def VNqG(ROpF, yDqo=None):\n return vBWh(ROpF, 0, yDqo)",
"def PIEQ(vhpA):\n raise NotImplementedError",... | [
"0.8106684",
"0.8017027",
"0.7727477",
"0.74738044",
"0.7434409",
"0.73835105",
"0.7344697",
"0.7255019",
"0.7235715",
"0.7172771",
"0.7172771",
"0.7126236",
"0.7115438",
"0.6981785",
"0.69669735",
"0.6935935",
"0.68780476",
"0.68646675",
"0.6861637",
"0.6861637",
"0.68542683... | 0.0 | -1 |
Returns ones_like of the same shape as input. | def GvK6(YKHO, Q6kx, bJMc):
bJMc[0] = oyIN.array(bJMc[0])
return oyIN.ones(bJMc[0].shape) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pSfY(ROpF, yDqo=None):\n return vBWh(ROpF, 1, yDqo)",
"def PMWp(WKvO):\n if WKvO.get_shape().is_fully_defined():\n return _WqI.ones(WKvO.get_shape().as_list(), dtype=WKvO.dtype)\n return _WqI.ones_like(WKvO)",
"def pSfY(ROpF, yDqo=None):\n raise NotImplementedError",
"def EwqT(nPrm):\n... | [
"0.7908135",
"0.78526306",
"0.77506083",
"0.7741227",
"0.76042706",
"0.7337113",
"0.7287019",
"0.7176025",
"0.7176025",
"0.69863707",
"0.6896035",
"0.6854805",
"0.68481356",
"0.6842902",
"0.68413734",
"0.6791106",
"0.6742559",
"0.67410547",
"0.6679051",
"0.6673973",
"0.664221... | 0.0 | -1 |
Creates an instance of `SubstructureAssemblyLine`. | def FIMM(YKHO, VCKW, cH7k, typV, pan_, mLGw):
super().__init__(f'Substation Assembly Line {mLGw}')
YKHO.assigned = VCKW
YKHO.takt_time = cH7k
YKHO.attach_time = typV
YKHO.target = pan_ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C1Uq(YKHO, **B2fa) -> 'SubAssembly':\n return d_5e(YKHO, B2fa)",
"def HPKN(Emd4, zFiD, **B2fa):\n YylR = zFiD.angle\n WKvO, LVAh = Emd4.cartesian([1, YylR])\n return Emd4(WKvO, LVAh, **B2fa)",
"def egFI(YKHO):\n return _VfD.Layout_createLineSegment(YKHO)",
"def DBQY(YKHO, zFiD):\n V_D6 ... | [
"0.5864888",
"0.57998246",
"0.57969165",
"0.5732586",
"0.5583929",
"0.5567263",
"0.5526695",
"0.5503149",
"0.5466095",
"0.54406",
"0.5433178",
"0.5431386",
"0.54162234",
"0.5342237",
"0.53214014",
"0.5316644",
"0.52741295",
"0.52399886",
"0.52399296",
"0.5214961",
"0.5214926"... | 0.5430077 | 12 |
Creates an instance of `Substructure`. | def FIMM(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NfLl(YKHO, *qIxc: Any, **B2fa: Any) -> B90g:\n return B90g.add(YKHO, *qIxc, **B2fa)",
"def eLpg(YKHO):\n kERt = []\n for KCHu in YKHO.substructures:\n if KCHu.type.lower() == 'mysql':\n iF5H = e3F5(**KCHu)\n if KCHu.type.lower() == 'hbase':\n iF5H = j5m7(**KCHu)\n... | [
"0.60775167",
"0.5939752",
"0.58945906",
"0.5698878",
"0.5694465",
"0.56767756",
"0.5522687",
"0.539407",
"0.53774405",
"0.53463525",
"0.5247658",
"0.52233547",
"0.52117044",
"0.5210099",
"0.5161309",
"0.51427543",
"0.5123247",
"0.5119758",
"0.51143163",
"0.51024264",
"0.5102... | 0.0 | -1 |
Model admin root does not have a view per se so we redirect to admin root. | def ELNB(QpfX, QePW):
return MEVA(QePW.resource_url(QpfX.__parent__)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NMoC(YKHO):\n YKHO.redirect('/admin')",
"def NMoC(YKHO):\n YKHO.redirect('/admin')",
"def m8z6(YKHO):\n YKHO.redirect('/admin')",
"def YXpO(QePW):\n rPXJ = '../admin'\n return Yd7Q(rPXJ)",
"def dp9S():\n return vKnz(nKyW('user', name='Admin!'))",
"def d6pt(YKHO):\n if not c5ow.is... | [
"0.7985887",
"0.7985887",
"0.7709704",
"0.7472954",
"0.7389496",
"0.7202746",
"0.709773",
"0.7065975",
"0.70108604",
"0.6891129",
"0.6838579",
"0.67827296",
"0.6764646",
"0.6735883",
"0.6557917",
"0.6461977",
"0.6459943",
"0.6394069",
"0.6392595",
"0.63877046",
"0.63827956",
... | 0.76466686 | 3 |
Return the API Version for this implementation | def DpZH(YKHO):
return tHde | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kaPv(YKHO):\n return YKHO.api_version",
"def clva(YKHO):\n return YKHO._api_version",
"def clva(YKHO):\n return YKHO._api_version",
"def clva(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'api_version')",
"def clva(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'api_version')",
"def clva(YK... | [
"0.9099211",
"0.88299054",
"0.88193214",
"0.87111694",
"0.87111694",
"0.87111694",
"0.87111694",
"0.87111694",
"0.87111694",
"0.87111694",
"0.87111694",
"0.87111694",
"0.87111694",
"0.87111694",
"0.87111694",
"0.87111694",
"0.87111694",
"0.87111694",
"0.87111694",
"0.87111694",... | 0.0 | -1 |
This test confirms that the Archeologist's view of the historic annotations is consistent with CMFEdition's APIs. | def Rnbg(YKHO):
YKHO.login(YKHO.regular_user)
YKHO.create_version(YKHO.document)
pmvF = nNXP.portal.get_tool('portal_repository')
UBu7 = pmvF.getHistoryMetadata(YKHO.document)
YKHO.assertEquals(2, len(UBu7))
for pNGv in range(len(UBu7)):
eSda = NSKq(YKHO.document, pmvF.retrieve(YKHO.docu... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SfIJ(CJre, VLbG, qwcg, mDsu, TyFj):\n jhZX = qwcg('fake_exac.vcf.gz')\n dadx = VLbG(CJre, source=jhZX)\n azju = mDsu(chrom='chr1', pos=10, stop=10, ref='C', alleles=('C', 'G'), alts=('G',))\n aEqx = {'nontcga_ExAC_AF': 40 / float(70), 'nontcga_ExAC_AF_Adj': 10 / float(200), 'nontcga_ExAC_AF_AFR': 1... | [
"0.6208681",
"0.6098832",
"0.6094248",
"0.6092599",
"0.5733991",
"0.57122",
"0.57119906",
"0.5632859",
"0.5603229",
"0.5546937",
"0.55375457",
"0.55329263",
"0.55167747",
"0.55129784",
"0.5508894",
"0.5505907",
"0.5505544",
"0.5479057",
"0.5463353",
"0.5462395",
"0.54427904",... | 0.5574416 | 9 |
Prepares a mock for Salesforce instance | def MNUw():
with TMAJ.patch('salesforce_bulk_api.Salesforce') as zX97:
zX97.return_value.session_id = 'the-session-id'
zX97.return_value.sf_version = '34.0'
zX97.return_value.base_url = 'https://salesforce/services/data/v34.0/'
zX97.return_value.describe.return_value = {'sobjects': [... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FCbF(YKHO):\n super(zu0m, YKHO).setUp()\n YKHO.api = TPy7(use_ggrcq_service_account=True)\n YKHO.objgen = RCbD()",
"def cM5c(Emd4):\n Emd4.mock_get_patcher = Po4F('project.services.requests.get')\n Emd4.mock_get = Emd4.mock_get_patcher.start()",
"def FCbF(YKHO):\n super(fkE4, YKHO).setUp(... | [
"0.6621294",
"0.6619728",
"0.65941167",
"0.65616304",
"0.6558193",
"0.6558193",
"0.6558193",
"0.6558193",
"0.6558193",
"0.6558193",
"0.6551103",
"0.6544787",
"0.6495975",
"0.64642566",
"0.64467937",
"0.63625747",
"0.6333644",
"0.6258872",
"0.6221287",
"0.6210627",
"0.6196746"... | 0.72931445 | 0 |
Read image using its path. Default value is grayscale, and image is read by YCbCr format as the paper said. | def cE34(pmON, E4ec=True):
if E4ec:
return Zxt2.misc.imread(pmON, flatten=True, mode='YCbCr').astype(oyIN.float)
else:
return Zxt2.misc.imread(pmON, mode='YCbCr').astype(oyIN.float) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cE34(pmON, E4ec=True):\n if E4ec:\n return Zxt2.misc.imread(pmON, flatten=True, mode='YCbCr').astype(oyIN.float)\n else:\n return Zxt2.misc.imread(pmON, mode='YCbCr').astype(oyIN.float)",
"def cE34(pmON, E4ec=True):\n if E4ec:\n return Zxt2.misc.imread(pmON, flatten=True, mode='... | [
"0.77684826",
"0.77258337",
"0.7639162",
"0.7520595",
"0.7467305",
"0.7457439",
"0.73671496",
"0.72278494",
"0.7214487",
"0.72123486",
"0.7200269",
"0.7183444",
"0.70766175",
"0.7058211",
"0.7026866",
"0.70162314",
"0.6943889",
"0.69430184",
"0.69332045",
"0.6900042",
"0.6891... | 0.77840906 | 0 |
Helper function for generating a random string | def tEgU():
return kxTZ().hex[:6].upper() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KpEQ():\n return ''.join(QMfv(rU7A(32)).decode('utf-8'))",
"def e7Tf():\n return ''.join((tuKI.choice(vIwR.ascii_lowercase + vIwR.digits) for bGrB in range(16)))",
"def r4k0(OaeV, wuRi=''):\n bo34.info('DeprecationWarning: randomstr is deprecated. Use random:str instead')\n tuKI(OaeV, 'str', wu... | [
"0.85894465",
"0.85492206",
"0.8190487",
"0.8147589",
"0.8116277",
"0.8027642",
"0.79199487",
"0.788436",
"0.78808117",
"0.7870456",
"0.78343445",
"0.78186613",
"0.78159225",
"0.779071",
"0.77800965",
"0.7778551",
"0.77776915",
"0.777435",
"0.7768781",
"0.7766585",
"0.7759173... | 0.8280882 | 2 |
Deactivates the option of dual TTS depending on internet connection | def oVRt(YKHO):
YKHO.isActiveDualTTS = False
YKHO.change_TTS_engine() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def x9Ft(YKHO):\n if YKHO.isActiveDualTTS:\n WJHQ = '/var/lib/snips/skills/snips_app_pilldispenser/settings/dual_TTS.sh'\n Yn3K.call([WJHQ])\n print('Dual TTS is enabled. Using Amazon Polly TTS in case of internet connection, else use offline Picotts TTS.')\n else:\n WJHQ = '/var/... | [
"0.6985197",
"0.65773094",
"0.6142466",
"0.6048877",
"0.5781478",
"0.5762552",
"0.5547855",
"0.54477835",
"0.5440111",
"0.54377174",
"0.53925616",
"0.53925616",
"0.5301444",
"0.5267295",
"0.52324533",
"0.52055764",
"0.5161625",
"0.514115",
"0.5136032",
"0.5130612",
"0.5106833... | 0.7121904 | 0 |
Tests that an oauth client is loaded correctly by ID | def NOig(YKHO):
x0hE = mD7q(YKHO.client, '2737bf16b39ab5d7b4a1', {})
YKHO.assertEqual(x0hE.id, '2737bf16b39ab5d7b4a1')
YKHO.assertEqual(x0hE.label, 'Test_Client_1')
YKHO.assertFalse(x0hE.public)
YKHO.assertEqual(x0hE.redirect_uri, 'https://example.org/oauth/callback')
YKHO.assertEqual(x0hE.secre... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wZz4(BZlZ, geh0):\n geh0.get(f'https://api.mollie.com/v2/clients/{TafS}', 'client_single')\n x0hE = BZlZ.clients.get(TafS)\n assert isinstance(x0hE, i9zE)\n assert x0hE.id == TafS\n assert x0hE.resource == 'client'\n assert x0hE.organisation_created_at == '2018-03-21T13:13:37+00:00'",
"def ... | [
"0.7168287",
"0.68318075",
"0.6824498",
"0.67315394",
"0.6657325",
"0.66558766",
"0.6626583",
"0.66247857",
"0.65802926",
"0.65705293",
"0.6532619",
"0.6523901",
"0.6478303",
"0.64468914",
"0.643962",
"0.64096385",
"0.64008284",
"0.63845205",
"0.6333631",
"0.6327334",
"0.6311... | 0.79279506 | 0 |
Return the next value from the Trie. | def UDAb(YKHO):
YKHO._iteration_index += 1
if YKHO._iteration_index < YKHO._length:
return YKHO._child_values[YKHO._iteration_index]
raise StopIteration | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def next(YKHO) -> int:\n Q6kx = YKHO.list.pop()\n a1PO = Q6kx.right\n while a1PO:\n YKHO.list.append(a1PO)\n a1PO = a1PO.left\n return Q6kx.val",
"def UDAb(YKHO):\n NlZ_ = next(YKHO.tree)\n if NlZ_ is not None:\n return NlZ_.key",
"def OPHn(YKHO):\n try:\n retur... | [
"0.71009237",
"0.68747216",
"0.6785338",
"0.67089003",
"0.6682583",
"0.664996",
"0.6600616",
"0.65859354",
"0.6582357",
"0.6558696",
"0.6537711",
"0.65320635",
"0.65152586",
"0.65075475",
"0.6473029",
"0.6473029",
"0.64635473",
"0.64578986",
"0.64560354",
"0.645346",
"0.64507... | 0.5938572 | 80 |
Adds crud_template_name to default template names. | def Q6po(YKHO):
ZWCE = super(ue5C, YKHO).get_template_names()
if YKHO.crud_template_name:
ZWCE.append(YKHO.crud_template_name)
return ZWCE | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hS0L(mWFP):\n rPXJ = GSRe(TLHx)\n tO9_ = rPXJ.render(name=mWFP)\n return tO9_",
"def OGJY():\n return N2Y1",
"def qm1k(YKHO):\n raise NotImplementedError('template_name must be defined')",
"def Z4MM(YKHO, rPXJ):\n FJDa = rPXJ.rsplit('/', 1)\n mWFP = 'custom_' + FJDa[-1]\n U5bT = [... | [
"0.6442361",
"0.5885462",
"0.5721086",
"0.5702185",
"0.5622897",
"0.5622897",
"0.55930513",
"0.55642444",
"0.55222213",
"0.5442309",
"0.5402841",
"0.5323866",
"0.5315627",
"0.5269766",
"0.5258141",
"0.5254774",
"0.5250271",
"0.5164065",
"0.51328415",
"0.51317126",
"0.5129803"... | 0.65259725 | 0 |
Opens a JSON file | def cHUw(YKHO, pmON):
with open(pmON) as eHNT:
return qQXR.load(eHNT) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GvL1(pmON):\n with open(pmON, 'r') as _qOE:\n nPrm = qQXR.load(_qOE)\n return nPrm",
"def NC4D(YKHO):\n wM3v = open(YKHO.file, 'r')\n zgjV = wM3v.read()\n Aofo = qQXR.loads(zgjV)\n return Aofo",
"def lc9H(gIsw):\n return qQXR.load(open(gIsw))",
"def GvL1(RsFk):\n with o... | [
"0.7764946",
"0.74575746",
"0.72270334",
"0.7089345",
"0.70492184",
"0.69865084",
"0.695505",
"0.6951792",
"0.69328076",
"0.69049406",
"0.6880673",
"0.6848421",
"0.6845763",
"0.6832441",
"0.68209547",
"0.68209547",
"0.6789817",
"0.6777519",
"0.6762135",
"0.6757298",
"0.675700... | 0.764135 | 1 |
GET and POST routes for searching and adding an individual stock | def fmRO(QePW):
if QePW.method == 'GET':
try:
o61b = QePW.GET['symbol']
except KeyError:
return {}
try:
geh0 = G4JS.get(l4ys + '/stock/{}/company'.format(o61b))
nPrm = geh0.json()
return {'company': nPrm}
except ValueError:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ATyv():\n print('<add_stock()>')\n TBsA = QePW.get_json()\n FL53 = okPj(**TBsA).save()\n return pz3A(FL53)",
"def LpID(QePW, Ns3P):\n assert isinstance(QePW, eu5F)\n try:\n FL53 = OsEW.objects.filter(stock_id=Ns3P).get()\n L64_ = FL53.stock_id\n HjoL = FL53.symbol\n ... | [
"0.67846984",
"0.6500751",
"0.6418376",
"0.62548095",
"0.62410027",
"0.62189937",
"0.6182033",
"0.607406",
"0.60599333",
"0.60283244",
"0.60126793",
"0.5995253",
"0.59755194",
"0.59723",
"0.5970819",
"0.59525305",
"0.59521157",
"0.593805",
"0.5936667",
"0.5936113",
"0.5933646... | 0.7430679 | 0 |
Total amount of posts loaded. | def Off7(YKHO):
with YKHO._c_lock:
return YKHO._total_count | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n1rJ(YKHO):\n return Gcr8.query.filter_by(started_id=YKHO.id).count() + xMym.query.filter_by(user_id=YKHO.id).count()",
"def iOS9(YKHO):\n return T97t.objects.filter(user__username=YKHO.user.username).count()",
"async def _set_total_posts_in_domain(YKHO) -> None:\n bo34.info('Getting total posts i... | [
"0.7457904",
"0.73846537",
"0.69664824",
"0.6819613",
"0.6797854",
"0.67948675",
"0.6775799",
"0.6681046",
"0.66759866",
"0.6626322",
"0.66191894",
"0.65930974",
"0.6592763",
"0.65409946",
"0.65301406",
"0.65273756",
"0.64973515",
"0.6465976",
"0.6465976",
"0.6465976",
"0.646... | 0.60689 | 91 |
Gets the next element in the list. Returns Null on timeout, or raises Empty when finished. | def xn5b(YKHO):
try:
U5bT = YKHO._queue.get(block=True, timeout=0.5)
YKHO._queue.task_done()
return U5bT
except gGq6.Empty:
if not YKHO.is_running():
raise
else:
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xn5b(YKHO):\n try:\n U5bT = YKHO._queue.get(block=True, timeout=0.5)\n YKHO._queue.task_done()\n return U5bT\n except gGq6.Empty:\n if not YKHO.isAlive():\n raise\n else:\n return None",
"def a3Tc(YKHO, vYBr=None):\n if YKHO.current_item is no... | [
"0.8091959",
"0.7184955",
"0.7161255",
"0.6977266",
"0.67948735",
"0.67310977",
"0.6637295",
"0.66078466",
"0.65023255",
"0.64671266",
"0.64244825",
"0.63978547",
"0.6389176",
"0.6373475",
"0.6369736",
"0.63513553",
"0.6347818",
"0.63171256",
"0.62923235",
"0.62816614",
"0.62... | 0.80532634 | 1 |
Function that calculates the shortest distance between two houses. | def gJUm(E9Rn, JY2t):
nAQX = E9Rn.x1
NuJI = JY2t.x1
rAB3 = E9Rn.x2
Miz7 = JY2t.x2
YQna = E9Rn.y1
RBoY = JY2t.y1
EZQF = E9Rn.y2
mmXi = JY2t.y2
if nAQX <= NuJI <= rAB3 or nAQX <= Miz7 <= rAB3 or NuJI <= nAQX <= Miz7 or (NuJI <= rAB3 <= Miz7):
if YQna <= RBoY <= EZQF or YQna <= ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gJUm(YKHO, UrE_, MP_r):\n jzdc, Fg_i = (YKHO.d[UrE_], YKHO.d[MP_r])\n r8hN, exwG, YRbF, r845, Ylbp = (len(jzdc), len(Fg_i), 0, 0, float('inf'))\n while YRbF < r8hN and r845 < exwG:\n Ylbp = min(Ylbp, abs(jzdc[YRbF] - Fg_i[r845]))\n if jzdc[YRbF] > Fg_i[r845]:\n r845 += 1\n ... | [
"0.7146799",
"0.68874836",
"0.6805211",
"0.67185205",
"0.671614",
"0.6668262",
"0.66314065",
"0.66271657",
"0.6588853",
"0.658055",
"0.6492303",
"0.6492303",
"0.64920735",
"0.6487057",
"0.64616334",
"0.6440952",
"0.64372396",
"0.6428301",
"0.6419579",
"0.6387855",
"0.6385743"... | 0.7729523 | 0 |
Trim test name. Trailing underscore and digits are removed | def BIIl(mWFP):
while mWFP[-1].isdigit():
mWFP = mWFP[:-1]
if mWFP[-1] == '_':
mWFP = mWFP[:-1]
return mWFP | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DpZT(mWFP):\n return ZbWC.sub('[^0-9a-zA-Z\\\\-\\\\_]+', '_', mWFP)",
"def aqYU(vIwR):\n return ZbWC.sub('[^_0-9a-zA-Z]+', '__', vIwR)",
"def aSeI(mWFP):\n return ZbWC.sub('\\\\W|^(?=\\\\d)', '_', mWFP)",
"def SREd(mWFP: str) -> str:\n if not ZbWC.match('[a-zA-Z_]', mWFP[0]):\n mWFP = ... | [
"0.71240914",
"0.7014796",
"0.6977775",
"0.69493306",
"0.6906782",
"0.68239003",
"0.6814305",
"0.67782086",
"0.6774865",
"0.6748891",
"0.6720217",
"0.6686653",
"0.66298926",
"0.66074145",
"0.6594536",
"0.658955",
"0.6579875",
"0.65704846",
"0.65164113",
"0.6481974",
"0.647058... | 0.81550294 | 0 |