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 |
|---|---|---|---|---|---|---|
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
if not isinstance(Elif, C5fI):
return True
return YKHO.to_dict() != Elif.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif: object):\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif):\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(... | [
"0.8392633",
"0.8354901",
"0.82950056",
"0.8132309",
"0.81149805",
"0.8099986",
"0.809911",
"0.8097883",
"0.8097883",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8066694",
"0.80594814",
"0.805757",
... | 0.0 | -1 |
returns id of this set (the primary key value). | def V_9M(YKHO):
H2x2 = YKHO.obj.primary_key_from_instance(YKHO.data)
return '_'.join([str(YRbF) for YRbF in H2x2]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def id(YKHO):\n if YKHO.pk is None:\n return None\n bGrB, Wswm = YKHO.pk\n return Wswm",
"def unpH(YKHO) -> int:\n return YKHO.id",
"def unpH(YKHO) -> int:\n return YKHO.id",
"def unpH(YKHO) -> int:\n return YKHO.id",
"def unpH(YKHO) -> int:\n return YKHO.id",
"def unpH(YKHO):... | [
"0.7784818",
"0.7558198",
"0.7558198",
"0.7558198",
"0.7558198",
"0.74973595",
"0.74973595",
"0.74973595",
"0.74973595",
"0.74942386",
"0.7479348",
"0.74675345",
"0.74573743",
"0.7437425",
"0.7433986",
"0.7429608",
"0.7429608",
"0.7429608",
"0.742671",
"0.742671",
"0.742671",... | 0.0 | -1 |
Returns the attributes of the sensor. | def R1i3(YKHO):
o8Kj = {}
o8Kj['arrivals'] = YKHO._arrivals
o8Kj['station_name'] = YKHO._station_name
o8Kj['station_direction_label'] = YKHO._station_direction_label
return o8Kj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LeFr(YKHO):\n return ['Body temperature', 'Systolic B.P', 'Diastolic B.P', 'Heart rate', 'Breath Rate']",
"def h6gc(YKHO):\n geh0 = G4JS.get(YKHO.get_url())\n return geh0.json().get('attributes')",
"def NnzV(Emd4):\n return Emd4._ATTRIBUTES",
"def h6gc(YKHO):\n yPGT = wuVb.get_attributes(Y... | [
"0.73325646",
"0.72415787",
"0.7170014",
"0.70888007",
"0.70601445",
"0.70505935",
"0.70378435",
"0.7028666",
"0.70262516",
"0.70261395",
"0.70237947",
"0.7006847",
"0.69552594",
"0.69105005",
"0.69063836",
"0.6884074",
"0.6882533",
"0.68630177",
"0.683349",
"0.6833342",
"0.6... | 0.0 | -1 |
Normalized the image to a range. | def NkkI(LNo8, gqRb=0.0, ODP9=1.0):
dOtj = (LNo8 - LNo8.min()) / (LNo8.max() - LNo8.min())
return dOtj * (ODP9 - gqRb) + gqRb | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NkkI(YKHO, VXjJ: torch.Tensor):\n return BtVk(VXjJ, YKHO.old_range, YKHO.new_range)",
"def jnV4(VXjJ, T8H5=None, Np5D=None):\n if T8H5 is None:\n T8H5 = VXjJ.min()\n if Np5D is None:\n Np5D = VXjJ.max()\n return (VXjJ - T8H5) / (Np5D - T8H5)",
"def NkkI(YKHO, LNo8):\n qzD7, Hqo... | [
"0.7809525",
"0.7797711",
"0.77907187",
"0.7731499",
"0.7727142",
"0.76096225",
"0.76037663",
"0.75104034",
"0.7479979",
"0.7402251",
"0.7399994",
"0.73625004",
"0.7344511",
"0.7300373",
"0.7238488",
"0.7217895",
"0.7217423",
"0.71733177",
"0.71353585",
"0.7123186",
"0.712123... | 0.71219003 | 20 |
Generate a PyTorch Tensor of uniform random noise. | def RoBV(Ep8u, tpio):
ARTs = ht2j.rand(Ep8u, tpio) * 2.0 - 1.0
return ARTs | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ARTs(zNig):\n exwG = iQnE(ht2j.randn(zNig, 100))\n return exwG",
"def L84Y(ARTs: float=0.1):\n return lambda WKvO: WKvO + ht2j.randn_like(WKvO) * ARTs",
"def L_fB(zNig, tpio, begE):\n return ht2j.randn(zNig, tpio, 1, 1).to(begE)",
"def VuY4(YKHO, ekHH: int) -> llWB:\n return ht2j.randn(ekH... | [
"0.7900109",
"0.7806133",
"0.7720631",
"0.7655017",
"0.759371",
"0.757348",
"0.7472941",
"0.74257106",
"0.7374879",
"0.7199929",
"0.7199929",
"0.7193614",
"0.7179941",
"0.7114062",
"0.69450366",
"0.6910178",
"0.6894911",
"0.6892687",
"0.68460846",
"0.6835153",
"0.68136173",
... | 0.7195674 | 11 |
Get all defined not abstract document classes. | def CV6b():
return Jkn0.copy() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HAat(Emd4, st34=False):\n ZWCE = []\n if not st34 and hasattr(Emd4, 'search_objects'):\n if not getattr(Emd4.search_objects.mapping, 'elastic_abstract', False):\n ZWCE.append(Emd4.search_objects.mapping.doc_type)\n for dm7U in Emd4.__subclasses__():\n ZWCE += dm7U.get_doc_type... | [
"0.7242952",
"0.6432494",
"0.639605",
"0.6266895",
"0.6110867",
"0.6065511",
"0.60415065",
"0.60132796",
"0.5992396",
"0.5978693",
"0.59763956",
"0.59625363",
"0.59562945",
"0.59372765",
"0.5911755",
"0.5907737",
"0.5901234",
"0.58962524",
"0.58916384",
"0.58916384",
"0.58916... | 0.73978806 | 0 |
the version of the aggregation described by this head bag (i.e. the value of the MultibagHeadVersion info tag). | def v4bS(YKHO):
return YKHO._get_required_info_item('Multibag-Head-Version') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DpZH(YKHO):\n return YKHO.v",
"def DpZH(YKHO):\n return YKHO.data_.get('version', 1)",
"def DpZH(YKHO):\n return YKHO.graph[okrt].get(bnvX)",
"def mxZ0(YKHO):\n try:\n return YKHO._get_required_info_item('Multibag-Version')\n except mYC3 as ex:\n return ROYr",
"def DpZH(YKH... | [
"0.736541",
"0.7238131",
"0.7235547",
"0.723094",
"0.7219458",
"0.7190694",
"0.71678126",
"0.70542324",
"0.70422703",
"0.70400226",
"0.70379823",
"0.7012347",
"0.7006322",
"0.7001201",
"0.69926685",
"0.6969054",
"0.6967949",
"0.696639",
"0.6943946",
"0.69418794",
"0.693845",
... | 0.8254827 | 0 |
return True if this bag is a designated as the head bag of a multibag aggregation. This implementation returns True if the 'MultibagHeadVersion' is set. | def ZsRA(Rt4f):
return 'Multibag-Head-Version' in sa5E(Rt4f).info | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AdNy(YKHO):\n return YKHO._is_multihead_enabled",
"def dpNX(YKHO):\n return YKHO.server_version >= L6MF[1]",
"def whdy(YKHO, xF_G):\n l478 = YKHO.cache_nerdm_rec()\n if not l478:\n YKHO.log.info('ID not published previously; will start afresh')\n return False\n TRcy = BfDw.read... | [
"0.65818685",
"0.61184347",
"0.5967387",
"0.5844722",
"0.57720584",
"0.5624504",
"0.56244135",
"0.5530601",
"0.55180556",
"0.54854316",
"0.5466654",
"0.5463987",
"0.54551315",
"0.54545027",
"0.54201525",
"0.54132277",
"0.54064214",
"0.5405944",
"0.53958386",
"0.53902626",
"0.... | 0.8230837 | 0 |
Returns the number of vhosts a domain has. | def gQXS(zrIJ):
return Oa1e.ispman.getVhostsCount(zrIJ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zxwu(YKHO):\n if HwRy.version_info[0] < 3:\n return YKHO.network_object.numhosts\n else:\n return 2 ** (128 - YKHO.network_object.prefixlen)",
"def zxwu(YKHO):\n if HwRy.version_info[0] < 3:\n return YKHO.network_object.numhosts\n else:\n return 2 ** (32 - YKHO.network... | [
"0.7186097",
"0.71727014",
"0.7066158",
"0.7066158",
"0.7020258",
"0.69064116",
"0.68200415",
"0.68163455",
"0.6773158",
"0.6718048",
"0.6591305",
"0.64072704",
"0.6383323",
"0.6383323",
"0.63570136",
"0.6256401",
"0.62165934",
"0.62123454",
"0.6157539",
"0.61351395",
"0.6113... | 0.9107455 | 0 |
A decorator indicating gRPC methods. | def kbUM(iVYu: F) -> vuvg:
E1tF = HJQb(iVYu)
@zaGL(iVYu)
def h3Xc(YKHO: Blueprint, OQoI: GeneratedProtocolMessageType, QpfX: Context):
return E1tF.handle_call(YKHO, OQoI, QpfX)
h3Xc.__grpcmethod__ = True
h3Xc.__rpc_method__ = E1tF
return YWvJ(vuvg, h3Xc) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def o87a(**B2fa):\n\n def mrMx(JfyU):\n JfyU.jsonrpc_method = True\n JfyU.kwargs = B2fa\n return JfyU\n return mrMx",
"def E1tF(JfyU):\n JfyU.rpc_callable = True\n return JfyU",
"def E1tF(JfyU):\n setattr(JfyU, 'rpc_method', True)\n return JfyU",
"def l26p(oj4z):\n M... | [
"0.6959161",
"0.6812728",
"0.6768685",
"0.6589448",
"0.63172054",
"0.63124627",
"0.63007444",
"0.6238089",
"0.6212781",
"0.6192534",
"0.61430115",
"0.6138617",
"0.60681987",
"0.6035079",
"0.60157436",
"0.59878886",
"0.59858316",
"0.59448993",
"0.59037507",
"0.59036136",
"0.58... | 0.7117701 | 0 |
Get the labels that are marked as 'prior'. | def s6xz(YKHO, QTBn, g3AQ=True):
UgZ0 = QTBn.get_priors()['record_id'].to_list()
if g3AQ:
return oyIN.array(UgZ0, dtype=int)
else:
return YKHO.df.index.values[UgZ0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PRj3(YKHO):\n cZjK = {}\n wDQo = 0\n for fq2D in YKHO.state_seq_dict['Ytrain']:\n for UXqs in fq2D:\n wDQo += 1\n if UXqs not in cZjK:\n cZjK[UXqs] = 0\n cZjK[UXqs] += 1\n Crrw = range(YKHO.n_states)\n f2rf = oyIN.array(TU9R(*Crrw)(cZjK)) / ... | [
"0.7933604",
"0.7443597",
"0.692752",
"0.67692834",
"0.6704186",
"0.67032814",
"0.67032814",
"0.6665883",
"0.6665883",
"0.6610667",
"0.65642816",
"0.65404284",
"0.65379715",
"0.6520043",
"0.65162784",
"0.65140814",
"0.6504253",
"0.6503299",
"0.6493865",
"0.64761645",
"0.64631... | 0.6801199 | 3 |
Return an SVG string displaying the collisions. | def YqgB(YKHO, SEaA, RuMF, JZKU=''):
PIkV = []
cviu = SEaA[0]['glyphbounds']
fvDH = ['green', 'red', 'purple', 'blue', 'yellow']
for p6S0, Oa1e in enumerate(SEaA):
cviu.extend(Oa1e['glyphbounds'])
for XP5J in Oa1e['paths']:
PIkV.append('<path d="%s" fill="%s"/>' % (XP5J.asSVG... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XtLK(YKHO):\n BQGg, h3cg, bYzl, Z3uP = YKHO.buffer(1).bounds\n Yjog = min([max([100.0, bYzl - BQGg]), 300])\n nnyg = min([max([100.0, Z3uP - h3cg]), 300])\n try:\n SnCn = max([bYzl - BQGg, Z3uP - h3cg]) / max([Yjog, nnyg])\n except ZeroDivisionError:\n SnCn = 1\n bW75 = '{0} {1}... | [
"0.6442487",
"0.63310575",
"0.6323501",
"0.6317823",
"0.63008374",
"0.62463593",
"0.62288857",
"0.61937374",
"0.6128556",
"0.611089",
"0.5946427",
"0.5935584",
"0.59342",
"0.59276915",
"0.5899126",
"0.58783525",
"0.58580863",
"0.58450234",
"0.58015245",
"0.5782968",
"0.577996... | 0.73979557 | 0 |
Returns whether we are running on Windows. | def gqPv():
return HwRy.platform.startswith('win') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TDyh():\n return True",
"def r5rD():\n return Z5O9().upper() == 'Windows'.upper()",
"def r5rD() -> bool:\n return Hy7s.name == UZbc",
"def r5rD():\n IOdl = a9EH.system()\n print(f'Current platform: {IOdl}')\n mWFP = IOdl.lower()\n return mWFP[0:3] == 'win'",
"def w_5H():\n retur... | [
"0.88845795",
"0.88609564",
"0.8845423",
"0.8841961",
"0.8794065",
"0.87808144",
"0.8778632",
"0.87600195",
"0.8741653",
"0.87285006",
"0.8726368",
"0.8683543",
"0.86734223",
"0.86320627",
"0.86082083",
"0.8570823",
"0.8531004",
"0.8433337",
"0.82521975",
"0.8229168",
"0.8194... | 0.8514174 | 17 |
Update instance. The configuration change, detach_replica and access change cannot be updated at the same time. | def QdZT(YKHO, KAOR, wOGa=None, mWFP=None, u0DB=False, ZqeZ=False, C76K=None, i_bi=None):
TBsA = {'instance': {}}
if wOGa and ZqeZ:
raise Exception('Cannot attach and detach configuration simultaneously.')
if ZqeZ:
TBsA['instance']['configuration'] = None
if wOGa is not None:
TBs... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QdZT(YKHO):\n nNXP = YKHO._client.instance_admin_api\n jImy = gLnR(name=YKHO.name, config=YKHO.configuration_name, display_name=YKHO.display_name, node_count=YKHO._node_count, processing_units=YKHO._processing_units, labels=YKHO.labels)\n cZSW = Jn06(paths=['config', 'display_name', 'processing_units'... | [
"0.7134619",
"0.71104914",
"0.69627285",
"0.6831759",
"0.6776723",
"0.67326576",
"0.6611746",
"0.66097313",
"0.6545331",
"0.6487917",
"0.64529055",
"0.63173133",
"0.6298543",
"0.6262661",
"0.6219721",
"0.61730784",
"0.6158326",
"0.61559844",
"0.61076677",
"0.6088262",
"0.6072... | 0.7478018 | 0 |
Get a list of all guest logs. | def llgB(YKHO, KAOR):
bD7m = '/instances/%s/log' % P8oC.getid(KAOR)
_hkX, TBsA = YKHO.api.client.get(bD7m)
BJsk.check_for_exceptions(_hkX, TBsA, bD7m)
return [nZJ7(YKHO, RKD7, loaded=True) for RKD7 in TBsA['logs']] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def list(YKHO):\n return YKHO._logmgr.list_logs_by_id()",
"def naMj(YKHO):\n nPrm, bGrB = YKHO._make_request('GET', '/logs')\n YEnM = qQXR.loads(nPrm)\n return [Mc9f(WKvO['name']) for WKvO in YEnM['results']]",
"def c8l_():\n nfqd = []\n for rdlD in eVLl.log.search():\n nfqd.append({'w... | [
"0.75845796",
"0.74797577",
"0.70681643",
"0.7052965",
"0.70051426",
"0.6956161",
"0.69479996",
"0.68414897",
"0.6824708",
"0.68024534",
"0.6791411",
"0.67822206",
"0.67614394",
"0.6745883",
"0.6696293",
"0.6685795",
"0.66152215",
"0.6561986",
"0.6524968",
"0.6509312",
"0.645... | 0.70306396 | 4 |
The starting terminal for the calculation of distances along the first branch of the mutual coupling. Normally MutualCoupling would only be used for terminals of AC line segments. The first and second terminals of a mutual coupling should point to different AC line segments. | def zSkg(YKHO):
return YKHO._First_Terminal | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kETg(YKHO):\n nB8p = [0]\n Jssk = [0]\n YKHO.x_step = nB8p[-1] * Jssk[-1]\n CuBA = [2]\n q6fc = [2]\n YKHO.y_step = CuBA[-1] * q6fc[-1]",
"def isTx(f9TP):\n f9TP.x = 0",
"def FIMM(YKHO, rdFD=0.0, fjDX=0.0, TRVV=0.0, eiiX=0.0, XQCD=0.0, YSnm=0.0, nJ9F=0.0, cjNe=0.0, kmaK=None, x004=None... | [
"0.6416422",
"0.6030893",
"0.5916251",
"0.55072725",
"0.54755116",
"0.5475002",
"0.53891635",
"0.5368812",
"0.53592145",
"0.5298503",
"0.52919173",
"0.52675",
"0.52542037",
"0.52542037",
"0.52542037",
"0.52542037",
"0.5245256",
"0.52245104",
"0.5211578",
"0.5204099",
"0.52033... | 0.6016326 | 2 |
was_published_recently() returns False for questions whose pub_date is in the future. | def GoiU(YKHO):
ITS7 = rIAI.now() + qcWV.timedelta(days=30)
vS5o = Y4Gy(pub_date=ITS7)
YKHO.assertIs(vS5o.was_published_recently(), False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WC1_(YKHO):\n wzkt = rIAI.now()\n return wzkt - qcWV.timedelta(days=1) <= YKHO.pub_date <= wzkt",
"def WC1_(YKHO):\n wzkt = rIAI.now()\n return wzkt - qcWV.timedelta(days=1) <= YKHO.pub_date <= wzkt",
"def WC1_(YKHO):\n wzkt = rIAI.now()\n return wzkt - qcWV.timedelta(days=1) <= YKHO.pub_... | [
"0.8770457",
"0.8770457",
"0.8770457",
"0.8770457",
"0.87196475",
"0.84526587",
"0.8440966",
"0.84398067",
"0.84327435",
"0.8420717",
"0.84160113",
"0.84118855",
"0.84117943",
"0.8408592",
"0.84074765",
"0.8395476",
"0.8391703",
"0.8391703",
"0.8391703",
"0.83896405",
"0.8383... | 0.8410251 | 13 |
was_published_recently() returns False for questions whose pub_date is older than 1 day. | def QPdK(YKHO):
ITS7 = rIAI.now() - qcWV.timedelta(days=1, seconds=1)
lPNG = Y4Gy(pub_date=ITS7)
YKHO.assertIs(lPNG.was_published_recently(), False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WC1_(YKHO):\n wzkt = rIAI.now()\n return wzkt - qcWV.timedelta(days=1) <= YKHO.pub_date <= wzkt",
"def WC1_(YKHO):\n wzkt = rIAI.now()\n return wzkt - qcWV.timedelta(days=1) <= YKHO.pub_date <= wzkt",
"def WC1_(YKHO):\n wzkt = rIAI.now()\n return wzkt - qcWV.timedelta(days=1) <= YKHO.pub_... | [
"0.8741497",
"0.8741497",
"0.8741497",
"0.8741497",
"0.8681268",
"0.82433194",
"0.8219166",
"0.8215317",
"0.8190133",
"0.817755",
"0.81692386",
"0.81692386",
"0.81692386",
"0.81692386",
"0.81692386",
"0.81692386",
"0.81692386",
"0.81692386",
"0.81692386",
"0.81692386",
"0.816... | 0.8107616 | 35 |
was_published_recently() returns True for questions whose pub_date is within the last day. | def eC1B(YKHO):
ITS7 = rIAI.now() - qcWV.timedelta(hours=23, minutes=59, seconds=59)
m5xt = Y4Gy(pub_date=ITS7)
YKHO.assertIs(m5xt.was_published_recently(), True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WC1_(YKHO):\n wzkt = rIAI.now()\n return wzkt - qcWV.timedelta(days=1) <= YKHO.pub_date <= wzkt",
"def WC1_(YKHO):\n wzkt = rIAI.now()\n return wzkt - qcWV.timedelta(days=1) <= YKHO.pub_date <= wzkt",
"def WC1_(YKHO):\n wzkt = rIAI.now()\n return wzkt - qcWV.timedelta(days=1) <= YKHO.pub_... | [
"0.87500256",
"0.87500256",
"0.87500256",
"0.87500256",
"0.86421126",
"0.8240479",
"0.8157581",
"0.814848",
"0.81437826",
"0.81424725",
"0.8136568",
"0.8129161",
"0.8119409",
"0.8107632",
"0.81020105",
"0.8095852",
"0.8083852",
"0.80817384",
"0.80680066",
"0.79930156",
"0.798... | 0.81409675 | 10 |
can_vote() returns True if voting is currently allowed for this question before the end date. | def rcJj(YKHO):
ITS7 = rIAI.now() + qcWV.timedelta(hours=23, minutes=59, seconds=59)
We7V = rIAI.now() - qcWV.timedelta(days=5)
m5xt = Y4Gy(pub_date=We7V, end_date=ITS7)
YKHO.assertIs(m5xt.can_vote(), True) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gDWO(YKHO):\n wzkt = rIAI.now()\n return YKHO.pub_date <= wzkt < YKHO.end_date",
"def gDWO(YKHO):\n return YKHO.is_published() and YKHO.end_date > rIAI.now()",
"def gDWO(YKHO):\n wzkt = rIAI.now()\n if YKHO.is_published() and wzkt < YKHO.end_date:\n return True\n return False",
"... | [
"0.7926298",
"0.78645134",
"0.7845632",
"0.7839564",
"0.78158146",
"0.77485037",
"0.7670389",
"0.76528656",
"0.76390266",
"0.7588385",
"0.74009466",
"0.72476166",
"0.7166787",
"0.71239334",
"0.7114945",
"0.7102813",
"0.70785195",
"0.6948581",
"0.6929836",
"0.6855596",
"0.6853... | 0.75661016 | 10 |
can_vote() returns False if voting is currently allowed for this question after the end date. | def wZuT(YKHO):
ITS7 = rIAI.now() - qcWV.timedelta(hours=23, minutes=59, seconds=59)
We7V = rIAI.now() - qcWV.timedelta(days=5)
m5xt = Y4Gy(pub_date=We7V, end_date=ITS7)
YKHO.assertIs(m5xt.can_vote(), False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def b_Aj(YKHO):\n bJNE = rIAI.now()\n KhBf = rIAI.now() - qcWV.timedelta(days=2)\n bAls = Y4Gy(pub_date=bJNE, end_date=KhBf)\n YKHO.assertIs(bAls.can_vote(), False)",
"def Ira9(YKHO):\n bJNE = rIAI.now() - qcWV.timedelta(days=30)\n KhBf = rIAI.now() - qcWV.timedelta(days=1)\n hUdZ = Y4Gy(pub... | [
"0.8236872",
"0.81376374",
"0.8074662",
"0.7970373",
"0.7937701",
"0.79374117",
"0.79045504",
"0.7882945",
"0.7608752",
"0.7455497",
"0.7423712",
"0.74093103",
"0.734946",
"0.724119",
"0.7147687",
"0.7143726",
"0.70888114",
"0.7083284",
"0.7069167",
"0.7065994",
"0.6914886",
... | 0.7877807 | 8 |
Plot the energy distribution for the both bound configuration given an array of motor angles and an initial displacement. | def CZKs(YKHO, AjzU, _sQW, oDkW, nKSJ, SGCt, MMVx, VF69, HcLL, CYM7):
LZpg = QrM1.figure(figsize=(10, 15))
hh7H = LZpg.add_subplot(1, 1, 1)
yhKL = hh7H.contourf(TtHO(YKHO.nma), TtHO(YKHO.fma), YKHO.prob_trailing / oyIN.nanmax(YKHO.prob_trailing), 100)
iLki = hh7H.contour(TtHO(YKHO.nma), TtHO(YKHO.fma), ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def h_5v(kMx8, bCaV=True, Ni9Y=[-5, 5], mqdV=[-5, 5], Cs6h=[21, 21], iMGt='inferno', OYQx=True):\n WKvO = oyIN.linspace(Ni9Y[0], Ni9Y[1], Cs6h[0])\n LVAh = oyIN.linspace(mqdV[0], mqdV[1], Cs6h[1])\n EcVT, fuBA = oyIN.meshgrid(WKvO, LVAh)\n Pa_0, Qa_3 = YVGJ(EcVT, fuBA, kMx8)\n E3D9 = oyIN.hypot(Pa_0... | [
"0.6446606",
"0.60176665",
"0.6009654",
"0.6009638",
"0.59245557",
"0.5871529",
"0.58484364",
"0.5798373",
"0.5758277",
"0.57452625",
"0.57398754",
"0.5715351",
"0.5712423",
"0.56908953",
"0.5686304",
"0.56782264",
"0.5658101",
"0.56573683",
"0.5647191",
"0.5640841",
"0.56013... | 0.5830337 | 7 |
Test failure if LegalEntityZIPLast4 is not provided and LegalEntityZIP5 is, LegalEntityCongressionalDistrict must be provided or domestic and nonaggregate and PIIredacted nonaggregate records (RecordType = 2 or 3) | def u56H(p9bx):
TWaN = GumM(legal_entity_zip5='12345', legal_entity_zip_last4='', legal_entity_congressional='', legal_entity_country_code='USA', record_type=2, correction_delete_indicatr='')
v9hQ = GumM(legal_entity_zip5='12345', legal_entity_zip_last4=None, legal_entity_congressional='', legal_entity_country_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def q7MD():\n V_D6 = ['DeletionFlag', 'AREA', 'POP1990', 'MALES', 'FEMALES', 'MOBILEHOME']\n with trZe.raises(ValueError):\n pbWr(fields=V_D6)",
"def NYd4(p9bx):\n FdlQ = WglC(zip_code='12345', state_code='AB')\n m5y5 = WglC(zip_code='23456', state_code='CD')\n YE9m = rOCz(state_code='AB', ... | [
"0.59591764",
"0.5863563",
"0.5827478",
"0.57822037",
"0.57507426",
"0.56939167",
"0.5660582",
"0.5651956",
"0.5489419",
"0.54639125",
"0.54389596",
"0.5400046",
"0.5382415",
"0.5371864",
"0.5319663",
"0.531857",
"0.5305061",
"0.53036296",
"0.52701384",
"0.5268071",
"0.526758... | 0.53925276 | 12 |
Check to see that the profiles aren't the same department Returns a boolean | def la4L(YKHO, eyXC, nAOv):
return eyXC.department != nAOv.department | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def URlX(YKHO):\n for AIu6 in YKHO:\n AIu6.same_dept = bool(AIu6.employee_id.search([('user_id', '=', AIu6.env.user.id)], limit=1).department_id.id == AIu6.dept_id.id)",
"def aV4M(YKHO, z39Z, uOe2):\n iYd6 = {}\n for Ppds in uOe2:\n if Ppds.department in iYd6:\n iYd6[Ppds.depart... | [
"0.71605086",
"0.6946897",
"0.6612906",
"0.64442194",
"0.6359809",
"0.6329562",
"0.63159895",
"0.6210243",
"0.61708236",
"0.6144196",
"0.6010307",
"0.5996505",
"0.59709907",
"0.5930959",
"0.5907844",
"0.5863398",
"0.5862764",
"0.58601654",
"0.58186185",
"0.5796057",
"0.578655... | 0.8406205 | 0 |
Check to see that the profile has not met more than one person of the group before Returns a boolean | def gwn4(YKHO, z39Z, uOe2):
mMbP = [Ppds.email for Ppds in uOe2]
kbxI = yrAb.objects.filter(profile=z39Z).exclude(matched_group_users=None)
CKIb = list(kbxI.values_list('matched_group_users', flat=True))
Y9lu = [ZfUD for XuXy in CKIb for ZfUD in qQXR.loads(XuXy)]
iQin = [BWXx for BWXx in mMbP if BWX... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def L7Xl(YKHO, OGqV: Tuple[int, ...]) -> bool:\n return len(OGqV) == YKHO.num_players and all(list(map(lambda WKvO: 0 <= WKvO[1] <= YKHO.num_strategies[WKvO[0]] - 1, enumerate(OGqV))))",
"def deVW(YKHO):\n assert len(YKHO.names) == len(set(YKHO.names)), 'InStrain profiles that have the same name cannot be ... | [
"0.66177183",
"0.6481445",
"0.6444799",
"0.6437322",
"0.64238286",
"0.638404",
"0.6338795",
"0.6273877",
"0.62096083",
"0.6207249",
"0.61890537",
"0.6184771",
"0.61733663",
"0.6150802",
"0.61367023",
"0.61361927",
"0.60998106",
"0.6080739",
"0.60741204",
"0.6073957",
"0.60637... | 0.5992628 | 27 |
Return device specific attributes. Implemented by platform classes. | def GWuV(YKHO):
return {'identifiers': {(Sugg, YKHO.unique_id)}, 'name': YKHO.name, 'model': YKHO.device.type, 'via_device': (Sugg, YKHO.device.parent_id), 'manufacturer': 'Somfy'} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GWuV(YKHO):\n return {'family': YKHO.family, 'platform': YKHO.platform, 'os_type': YKHO.os_type, 'os_version': YKHO.os_version, 'udi': YKHO.udi, 'driver_name': YKHO.driver.platform, 'mode': YKHO.mode, 'is_console': YKHO.is_console, 'is_target': YKHO.is_target, 'prompt': YKHO.driver.base_prompt(YKHO.prompt),... | [
"0.73391825",
"0.7218188",
"0.71963483",
"0.7171738",
"0.71552",
"0.71512485",
"0.7134675",
"0.70214325",
"0.7004089",
"0.7002036",
"0.69863814",
"0.6944948",
"0.69410616",
"0.694069",
"0.69267803",
"0.69243675",
"0.6921639",
"0.6917945",
"0.69163024",
"0.69054145",
"0.688807... | 0.6837636 | 26 |
Return if the device has an assumed state. | def DbRH(YKHO) -> bool:
return not bool(YKHO.device.states) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DbRH(YKHO) -> bool:\n return bool(YKHO._assumed)",
"def Debg(YKHO):\n return YKHO.device.state",
"def Debg(YKHO):\n return YKHO.device.state",
"def Debg(YKHO):\n return YKHO._device.state",
"def Debg(YKHO):\n return YKHO._device.state",
"def DbRH(YKHO) -> bool:\n return True",
"de... | [
"0.8048723",
"0.7803629",
"0.7803629",
"0.77691835",
"0.77691835",
"0.7724886",
"0.765394",
"0.765394",
"0.7624097",
"0.75957656",
"0.75957656",
"0.75957656",
"0.75957656",
"0.75957656",
"0.75957656",
"0.753087",
"0.747405",
"0.74667877",
"0.7384095",
"0.73681074",
"0.7347474... | 0.87344146 | 0 |
Change the password of the current user. | def faAE(YKHO, QePW):
ZMzz = H18S(data=QePW.data, context={'request': QePW})
ZMzz.is_valid(raise_exception=True)
CBIr = QePW.user
CBIr.set_password(ZMzz.data['new_password'])
CBIr.save()
if CBIr.is_active:
ned1 = g3g8.objects.filter(user=CBIr, type=g3g8.ACTION_RESET_PASSWORD).exists()
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YxCE(YKHO) -> None:\n rn8m = AOO4.getpass('Current password: ')\n uGpu = YKHO.enter_password('New password: ', confirm=True)\n YKHO.client.change_user_password(rn8m, uGpu)\n print(\"Password changed. Next, use 'avn user login' to log in again using your new password.\")",
"def RtSS(YKHO, NtEF, jT... | [
"0.8279008",
"0.82527804",
"0.8157679",
"0.8117914",
"0.80644876",
"0.7999447",
"0.79965574",
"0.7978697",
"0.79152477",
"0.7911913",
"0.7904026",
"0.78907967",
"0.7876469",
"0.7864168",
"0.78398174",
"0.7827066",
"0.7804403",
"0.77808124",
"0.77680904",
"0.7741556",
"0.77262... | 0.0 | -1 |
returns a string with no trailing zeros | def j_SC(mLGw):
return '{0:f}'.format(mLGw).rstrip('0').rstrip('.') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mBp9(QMGq):\n VULR = QMGq\n if '.' in QMGq:\n VfGE = QMGq.split('.')[0]\n mcPF = QMGq.split('.')[1].rstrip('0')\n VULR = VfGE + '.' + mcPF\n if mcPF == '':\n VULR = VfGE\n return VULR",
"def OLHW(FGW3):\n if len(FGW3) > 1 and FGW3[0] == '0':\n return ... | [
"0.78107107",
"0.7343773",
"0.730235",
"0.72686625",
"0.724087",
"0.7147278",
"0.70895404",
"0.69896126",
"0.6975671",
"0.68910784",
"0.68540865",
"0.68413705",
"0.68017524",
"0.67916936",
"0.6775634",
"0.6761551",
"0.67378545",
"0.6717598",
"0.6714489",
"0.66308814",
"0.6621... | 0.60725784 | 73 |
Convert list to tensors | def rB9n(YKHO):
assert len(YKHO.states) > 0
FGb_ = ht2j.from_numpy(oyIN.array(YKHO.states))
EE_g = ht2j.from_numpy(oyIN.array(YKHO.actions))
igg0 = ht2j.from_numpy(oyIN.array(YKHO.logprobs))
VtA5 = ht2j.from_numpy(oyIN.array(YKHO.rewards)).unsqueeze(-1)
G6dG = ht2j.from_numpy(oyIN.array(YKHO.noi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rx6v(vC9B):\n a1PO = ZylS.convert_to_tensor(vC9B)\n a1PO = ZylS.transpose(a1PO, [1, 0, 2])\n return a1PO",
"def Ijel(Yw_3: List[Any]) -> llWB:\n if not Yw_3:\n raise ValueError('Input list of numpy images is empty')\n if len(Yw_3[0].shape) != 3:\n raise ValueError('Input images m... | [
"0.80072826",
"0.78903943",
"0.74211854",
"0.7359034",
"0.7355272",
"0.71932584",
"0.71932584",
"0.71804285",
"0.7059799",
"0.703811",
"0.7033204",
"0.70048094",
"0.6989799",
"0.6979004",
"0.6979004",
"0.6902992",
"0.68656546",
"0.6843144",
"0.68285185",
"0.68285185",
"0.6821... | 0.0 | -1 |
Check if line contains invalid char. Returns bool | def kUBT(YKHO, q2Xo, Wxnj, zFiD, li6g):
assert isinstance(zFiD, str), 'Line has to be a string'
hHld = YKHO.regex.findall(zFiD)
return hHld | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KDH6(zFiD, Nb4T=['\\n', '', ' ', '#']):\n for ZfUD in Nb4T:\n if zFiD.startswith(ZfUD):\n return False\n return True",
"def O4ol(zFiD):\n if len(zFiD) != vWis:\n return (True, 'Length is not %d. Its %d' % (vWis, len(zFiD)))\n YRbF = 0\n for geyT in zFiD:\n if ge... | [
"0.76843446",
"0.75554603",
"0.75268966",
"0.73125476",
"0.71679085",
"0.71552014",
"0.71535826",
"0.7089852",
"0.68889654",
"0.68563807",
"0.67844373",
"0.67752314",
"0.66891646",
"0.66790354",
"0.65975875",
"0.65695286",
"0.6538025",
"0.65282524",
"0.6515152",
"0.6513287",
... | 0.0 | -1 |
Pad matrices to ensure that matrix_a has same number of columns as matrix_b | def Zk6O(V1Y9, MZo8):
V1Y9 = oyIN.array(V1Y9)
MZo8 = oyIN.array(MZo8)
Y4DW = V1Y9.shape[1]
DIe7 = MZo8.shape[1]
sdQZ = Y4DW - DIe7
hVLt = abs(sdQZ)
if sdQZ < 0:
V1Y9 = NVXi(V1Y9, hVLt)
elif sdQZ > 0:
MZo8 = NVXi(MZo8, hVLt)
return (V1Y9, MZo8) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jOci(SppC, _30P=None, _C3A=False, KHPh=None):\n if not _30P:\n _30P = max([len(WKvO) for WKvO in SppC])\n for vC9B in SppC:\n x3i3.pad_list_(vC9B, _30P, pad_left=_C3A, pad_value=KHPh)",
"def hVLt(vb7U, JQRQ, jFtg):\n assert JQRQ >= 0, jFtg >= 0\n usx6, WfCS = vb7U.shape\n return ... | [
"0.66609883",
"0.6322688",
"0.62636095",
"0.62604743",
"0.62570995",
"0.6211467",
"0.61375576",
"0.6121463",
"0.61159277",
"0.60933226",
"0.5994181",
"0.59608644",
"0.5920762",
"0.5882593",
"0.5730691",
"0.57269037",
"0.5723637",
"0.57232666",
"0.5678279",
"0.56492615",
"0.56... | 0.8430766 | 0 |
Pad the end of each row in matrix with dimensions_to_add number of zeros. | def NVXi(SppC, pjGW):
if pjGW < 0:
raise ValueError('Dimensions to add must be >= 0.')
elif pjGW == 0:
return oyIN.array(SppC)
else:
return oyIN.pad(SppC, [(0, 0), (0, pjGW)], 'constant') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qnsr(YKHO, SppC, KHPh=0):\n MSNb = 0\n snHQ = len(SppC)\n for rdlD in SppC:\n MSNb = max(MSNb, len(rdlD))\n snHQ = max(MSNb, snHQ)\n Q9wQ = []\n for rdlD in SppC:\n dIVP = len(rdlD)\n gAQa = rdlD[:]\n if snHQ > dIVP:\n gAQa += [0] * (snHQ - dIVP)\n ... | [
"0.7263411",
"0.698399",
"0.68252414",
"0.66314644",
"0.6591412",
"0.65495414",
"0.64793503",
"0.64374524",
"0.64325273",
"0.64265746",
"0.63844615",
"0.63415235",
"0.6328143",
"0.627487",
"0.627487",
"0.62513804",
"0.6241208",
"0.62375087",
"0.6231387",
"0.6178432",
"0.61733... | 0.79607254 | 0 |
Initialize the selenium webdriver | def FIMM(YKHO, g7QD, CJI1, D_e0, pokd):
YKHO.driver_name = g7QD
YKHO.driver_executable_path = CJI1
YKHO.driver_arguments = D_e0
YKHO.init_url = pokd
YKHO.webdriver_base_path = 'selenium.webdriver.{}'.format(g7QD) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hlk0(YKHO):\n YKHO.driver = cSpz.Chrome(YKHO.driver_path, chrome_options=YKHO.chop)",
"def DbxN():\n E_qD = cSpz.Firefox()\n return E_qD",
"def sGb7(YKHO):\n YKHO.getStopWords()\n YKHO._install_adblock()\n YKHO.driver = cSpz.Firefox(YKHO.profile)\n YKHO.mainWindowHandle = YKHO.driver.c... | [
"0.83315307",
"0.8223711",
"0.81372905",
"0.77887726",
"0.77549183",
"0.769423",
"0.7664437",
"0.7623975",
"0.7612981",
"0.7602926",
"0.75900924",
"0.7531016",
"0.74854773",
"0.7454735",
"0.74531156",
"0.74528617",
"0.74400914",
"0.7427147",
"0.7406892",
"0.7399518",
"0.73512... | 0.7327488 | 22 |
Generate a new webdriver. | def pQYT(YKHO):
knUS = tF99('{}.webdriver'.format(YKHO.webdriver_base_path))
kbVW = getattr(knUS, 'WebDriver')
JVht = tF99('{}.options'.format(YKHO.webdriver_base_path))
jIgT = getattr(JVht, 'Options')
DVsV = jIgT()
for wAVY in YKHO.driver_arguments:
DVsV.add_argument(wAVY)
MQAk = {'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E_qD(kED_) -> RpLl:\n return kED_()",
"def rCzY(YKHO):\n if YKHO.__config.getBrowser() == 'firefox':\n sPym = cSpz.FirefoxProfile()\n uwVP = cSpz.FirefoxOptions()\n sPym.set_preference('browser.privatebrowsing.autostart', YKHO.__config.getIncognitoMode())\n uwVP.headless = Y... | [
"0.7313592",
"0.7240408",
"0.71467984",
"0.7121016",
"0.7114674",
"0.7055058",
"0.696036",
"0.6920097",
"0.68190235",
"0.67766947",
"0.6732158",
"0.671654",
"0.665626",
"0.6654898",
"0.6623194",
"0.66062474",
"0.66056734",
"0.65188384",
"0.6483737",
"0.64710593",
"0.64668614"... | 0.7853636 | 0 |
Get release from the version.json file that is supposed to exists (and be formatted as expected) as we mock the open function | def hHgT(YKHO, *qIxc):
YKHO.assertEqual(PQNM(), '1.0.1') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def PQNM():\n try:\n with open('version.txt') as Ga6V:\n return Ga6V.read().strip()\n except Exception:\n return '__UNKNOWN__'",
"def jwTA(YKHO):\n return YKHO._read_release_file('VERSION.txt')",
"def yxJ1(nUeQ, Tuqy='r'):\n with open(nUeQ, Tuqy) as eHNT:\n nPrm = qQ... | [
"0.72289586",
"0.69446737",
"0.6673054",
"0.65438956",
"0.64652014",
"0.6435313",
"0.6433545",
"0.64080447",
"0.63929415",
"0.6392602",
"0.6369133",
"0.63683915",
"0.635171",
"0.63438547",
"0.6332194",
"0.63060224",
"0.62482464",
"0.62115365",
"0.62029046",
"0.6189227",
"0.61... | 0.7451763 | 0 |
Get release from the version.json file that is supposed to exists (and not be formatted as expected) as we mock the open function | def hvdX(YKHO, *qIxc):
with YKHO.assertRaises(KeyError):
PQNM() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hHgT(YKHO, *qIxc):\n YKHO.assertEqual(PQNM(), '1.0.1')",
"def PQNM():\n try:\n with open('version.txt') as Ga6V:\n return Ga6V.read().strip()\n except Exception:\n return '__UNKNOWN__'",
"def jwTA(YKHO):\n return YKHO._read_release_file('VERSION.txt')",
"def yxJ1(nUeQ... | [
"0.7414039",
"0.73331416",
"0.6926072",
"0.6625498",
"0.65518653",
"0.6500366",
"0.64803666",
"0.64536",
"0.6446151",
"0.64099276",
"0.6375931",
"0.6374593",
"0.6345034",
"0.6328221",
"0.6318576",
"0.6299109",
"0.6283001",
"0.6266799",
"0.6257183",
"0.6249243",
"0.6245249",
... | 0.63032764 | 15 |
Creates the internal vocabulary for the model and returns the Tokenizer object. | def SSvJ(nPrm, Vlym):
b0j5 = isxO(num_words=Vlym)
b0j5.fit_on_texts(nPrm)
return b0j5 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YqDX(Emd4, CtWL) -> isxO:\n b0j5 = isxO(CtWL)\n return b0j5",
"def z_7y(YKHO, C3ST):\n gNOS = hdMd.from_pretrained(C3ST)\n return gNOS",
"def YqDX(Emd4, CtWL, id: int=None, qsJ6: BaseWorker=None, zb3C: BaseWorker=None, dJ1p: List[str]=None, JBZA: str=None):\n b0j5 = isxO(CtWL, owner=qsJ6, cl... | [
"0.7679993",
"0.7622741",
"0.7477295",
"0.74140406",
"0.7374567",
"0.7233225",
"0.7135575",
"0.71274906",
"0.69066393",
"0.690316",
"0.6810787",
"0.68003404",
"0.674413",
"0.67367476",
"0.67296624",
"0.66745615",
"0.6642096",
"0.6575304",
"0.6554878",
"0.6552143",
"0.6550729"... | 0.5875893 | 83 |
Returns the sentiment of the parsed sentence. | def Cc7Y(ppBc, JPW2=False, lac1=False):
global corpus_vocabulary
Lcqa = ppBc['content']
VJv0 = ppBc['label']
jXxl = 10000
FDLl = wAkc.texts_to_sequences(Lcqa.values)
oHFW = bdPE.preprocessing.sequence.pad_sequences(FDLl, padding='post', maxlen=140)
C3ST = bdPE.Sequential()
C3ST.add(bdPE.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rYwZ(YKHO, yAmx):\n FUjE = gmS1(yAmx)\n El7S = ''\n TWpx = FUjE.sentiment.polarity\n if -0.2 <= TWpx <= 0.2:\n El7S = 'neutral'\n elif 0.2 < TWpx <= 0.6:\n El7S = 'somewhat positive'\n elif 0.6 < TWpx <= 1.0:\n El7S = 'very positive'\n elif -0.6 <= TWpx < -0.2:\n ... | [
"0.8389846",
"0.8069992",
"0.80251455",
"0.787838",
"0.787838",
"0.7870918",
"0.7819357",
"0.77961046",
"0.7724094",
"0.7723927",
"0.7709641",
"0.76613927",
"0.76346225",
"0.76334",
"0.76300806",
"0.76231635",
"0.76084113",
"0.75985956",
"0.75985956",
"0.75985956",
"0.7590620... | 0.0 | -1 |
Returns a sentiment score. | def YEmv(HDJ5, C3ST, wAkc):
pLOR = rLdf.DataFrame({'content': rLdf.Series(HDJ5)})
Z5wO = pLOR['content']
taVb = wAkc.texts_to_sequences(Z5wO.values)
Irvo = bdPE.preprocessing.sequence.pad_sequences(taVb, padding='post', maxlen=140)
TOQo = C3ST.predict(Irvo)
return TOQo[:, 0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Giki(YKHO):\n l5Ny = YKHO.processTweet()\n vxw0 = tX5x.polarity_scores(l5Ny)\n YKHO.sentiment = vxw0['compound']",
"def vF5e(YKHO, Mau6):\n p1kx = YKHO._sid.polarity_scores(Mau6)\n return p1kx['compound']",
"def lY5t(yAmx):\n Wswm = Gpii()\n bsvq = {'initiate': 1, 'initiatives': 1, 'en... | [
"0.8018331",
"0.7960517",
"0.7913609",
"0.78509164",
"0.78509164",
"0.7721384",
"0.7634875",
"0.7612526",
"0.75271374",
"0.74995875",
"0.7487444",
"0.74523664",
"0.7425197",
"0.7425197",
"0.7387816",
"0.73773175",
"0.73728514",
"0.7370091",
"0.73604566",
"0.7345263",
"0.73195... | 0.0 | -1 |
Plots the accuracy and loss of the validation and training. | def kj9G(C3ST):
AC8I = C3ST.history.history
AC8I.keys()
HasU = range(1, len(AC8I['acc']) + 1)
Orhh(HasU, AC8I['acc'], AC8I['val_acc'])
QrM1.clf()
mBbd(HasU, AC8I['loss'], AC8I['val_loss']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rzaM(YbcW, YSue, vjyh):\n LZpg, MPlV = QrM1.subplots(2)\n ta2H = MPlV[0].plot(YbcW, label=' Train Loss')\n qTVs = MPlV[0].plot(YSue, label=' Test Loss')\n YuU8 = MPlV[1].plot(vjyh, label=' Test Accuracy')\n QrM1.xlabel(' Training Epoch')\n MPlV[0].legend()\n MPlV[1].legend()\n QrM1.... | [
"0.84374034",
"0.8237846",
"0.81121767",
"0.80924785",
"0.80882335",
"0.7872201",
"0.7841578",
"0.7824835",
"0.7823572",
"0.780948",
"0.77596295",
"0.7758534",
"0.77581125",
"0.7705106",
"0.769618",
"0.76633793",
"0.76586366",
"0.7656767",
"0.7645385",
"0.76266426",
"0.762322... | 0.71125436 | 86 |
Generates a 'curried' version of a function. | def TL6v(JfyU, kcwm=True, GlRF=None):
def Oa1e(*VXYU, **u2ih):
def eHNT(*qIxc, **tCXi):
if qIxc or tCXi:
RW_2 = VXYU + qIxc
I8ot = dict.copy(u2ih)
if kcwm and (not tCXi.keys().isdisjoint(I8ot)):
raise ValueError('Repeated kw a... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BRRQ(JfyU):\n\n def iezF(*qIxc, **B2fa):\n return JfyU(qIxc, **B2fa)\n return iezF",
"def BRRQ(MCGS: 'function'):\n\n def iezF(*qIxc, **B2fa):\n if len(qIxc) + len(B2fa) >= MCGS.__code__.co_argcount:\n return MCGS(*qIxc, **B2fa)\n return lambda *Vsly, **Z23b: iezF(*qI... | [
"0.8018233",
"0.7695723",
"0.7431166",
"0.7230086",
"0.69354296",
"0.6849018",
"0.67354995",
"0.671204",
"0.66710967",
"0.6637852",
"0.6594461",
"0.6591129",
"0.6572751",
"0.6486773",
"0.6406547",
"0.63807535",
"0.63385516",
"0.6073813",
"0.60461646",
"0.5936208",
"0.5924661"... | 0.62111443 | 17 |
Calculates the intersection of two lists | def iQin(zznG: list, Wd5v: list) -> list:
V5Zh = [BWXx for BWXx in zznG if BWXx in Wd5v]
return V5Zh | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RIsH(jzdc, Fg_i):\n return list(set(jzdc) & set(Fg_i))",
"def W9Po(jzdc, Fg_i):\n return list(set(jzdc) & set(Fg_i))",
"def XMlP(jzdc, Fg_i):\n return list(set(jzdc) & set(Fg_i))",
"def zVQj(iHrl, X1zw):\n return list(set(iHrl) & set(X1zw))",
"def iQin(jzdc, Fg_i):\n return [geyT for gey... | [
"0.82173604",
"0.8036266",
"0.80074453",
"0.7981758",
"0.79757184",
"0.7956687",
"0.7949947",
"0.7926463",
"0.78892094",
"0.78790545",
"0.78790545",
"0.78790545",
"0.78790545",
"0.78790545",
"0.78367156",
"0.7830212",
"0.7830212",
"0.7798356",
"0.77812344",
"0.77752054",
"0.7... | 0.7423043 | 36 |
Converts Markdown text to "Telegram HTML", which supports only some of the tags. | def J5QQ(l5Ny: str) -> str:
l5Ny = l5Ny.replace('&', '&').replace('<', '<').replace('>', '>')
l5Ny = Ko9u.sub('<pre>\\1</pre>', l5Ny)
l5Ny = PeDb.sub('<code>\\1</code>', l5Ny)
return l5Ny | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vgwQ(l5Ny):\n return J87D.convert(l5Ny)",
"def mSjq(l5Ny):\n sdA6 = zPUN.EXT_STRIKETHROUGH | zPUN.EXT_SUPERSCRIPT | zPUN.EXT_AUTOLINK\n _R2e = zPUN.HTML_SKIP_STYLE | zPUN.HTML_SKIP_IMAGES | zPUN.HTML_SAFELINK\n im04 = zPUN.html(l5Ny, extensions=sdA6, render_flags=_R2e).rstrip('\\n')\n if not i... | [
"0.723553",
"0.69725716",
"0.6839669",
"0.6755865",
"0.6736549",
"0.6681544",
"0.66740924",
"0.66594225",
"0.65921205",
"0.65906775",
"0.6583196",
"0.6581217",
"0.65809005",
"0.6573472",
"0.6570188",
"0.6546895",
"0.6524247",
"0.6494049",
"0.64425427",
"0.6441763",
"0.6418785... | 0.586986 | 69 |
Initialize python List with size of 10 or user given input. Python List type is a dynamic array, so we have to restrict its dynamic nature to make it work like a static array. | def FIMM(YKHO, zNig=10):
mvQt.__init__(YKHO)
YKHO.array = [None] * zNig | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, sL7f):\n YKHO.size = sL7f // 31 + 1\n YKHO.array = [0] * YKHO.size",
"def AHvH(zNig, a4X8=0):\n return [a4X8] * zNig",
"def FIMM(YKHO, gJ7X: int):\n YKHO.alist = list(range(gJ7X))",
"def jXVX():\n vC9B = [0] * 10\n print(vC9B)",
"def FIMM(YKHO, zNig):\n YKHO.l = []\n ... | [
"0.75149864",
"0.6885043",
"0.6802947",
"0.67961985",
"0.6736955",
"0.67110527",
"0.6704367",
"0.66681427",
"0.6585253",
"0.65644616",
"0.65478",
"0.6529099",
"0.6520911",
"0.64392716",
"0.64252716",
"0.64252716",
"0.6419667",
"0.63960624",
"0.6390632",
"0.6382514",
"0.637712... | 0.5640272 | 99 |
UNTESTED Calculate 1/(the norm of (ab))^2. | def lghM(jzdc, Fg_i):
OhJL = 1e-09 * min(XTiz.linalg.norm(jzdc), XTiz.linalg.norm(Fg_i))
return 1.0 / (OhJL + XTiz.linalg.norm(jzdc - Fg_i) ** 2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CkYf(jzdc):\n return epAf.sqrt(cuIS(jzdc, jzdc))",
"def CkYf(jzdc):\n return oyIN.sqrt(oyIN.dot(jzdc, jzdc))",
"def CkYf(jzdc):\n return epAf.sqrt(cuIS(jzdc, jzdc))",
"def CkYf(jzdc):\n exwG = len(jzdc.X)\n Pwhd = 0.0\n for YRbF in range(exwG):\n Pwhd += jzdc.X[YRbF] * jzdc.X[YRb... | [
"0.7486501",
"0.7392181",
"0.73916066",
"0.71279496",
"0.70775133",
"0.706477",
"0.7023481",
"0.69956416",
"0.6994352",
"0.6955216",
"0.6954093",
"0.6953601",
"0.6920498",
"0.6917435",
"0.69011116",
"0.6896236",
"0.688889",
"0.6888573",
"0.68463445",
"0.6800059",
"0.6782131",... | 0.0 | -1 |
Performs database connection using database settings from settings.py. Returns sqlalchemy engine instance | def WyYT(ZrNc):
tFj2 = 'databases/rss_{}.db'.format(ZrNc)
return y2U9('sqlite:///{}'.format(tFj2)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WyYT():\n return y2U9(rOmR(**GPtr.DATABASE))",
"def WyYT():\n return y2U9(moDH)",
"def WyYT():\n return y2U9(KIPK().get('CONNECTION_STRING'))",
"def WyYT():\n return y2U9(KIPK().get('CONNECTION_STRING'))",
"def WyYT():\n return y2U9(KIPK().get('CONNECTION_STRING'))",
"def WyYT():\n ... | [
"0.82956547",
"0.8233084",
"0.8231434",
"0.8231434",
"0.8231434",
"0.82268506",
"0.8215186",
"0.8215186",
"0.8215186",
"0.81917554",
"0.8176266",
"0.80810624",
"0.80810624",
"0.80810624",
"0.80810624",
"0.80810624",
"0.80810624",
"0.80810624",
"0.80810624",
"0.80810624",
"0.8... | 0.7412255 | 41 |
converts a float timestamp into a string | def lByS(jw7K):
Aofo = '(none)'
if jw7K:
fHvY = ITS7.localtime(jw7K)
Aofo = ITS7.strftime('%c', fHvY)
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Yfrd(pqi0):\n try:\n pqi0 = pqi0 / 1000\n Csk6 = qcWV.datetime.fromtimestamp(pqi0)\n Y0Fj = Csk6.strftime('%Y-%m-%d %H:%M:%S.%f')\n print(Y0Fj)\n return Y0Fj\n except Exception as e:\n print(tTpl)\n return ''",
"def Zz5w(E3oo):\n cTyu = qcWV.datetime.... | [
"0.78723377",
"0.78029656",
"0.73173934",
"0.71702814",
"0.711251",
"0.7081868",
"0.7079437",
"0.6986035",
"0.69436526",
"0.69408333",
"0.69091654",
"0.6883",
"0.68745154",
"0.68589914",
"0.68417084",
"0.68098754",
"0.68001205",
"0.6791747",
"0.6729854",
"0.6724054",
"0.67098... | 0.82984364 | 0 |
sets up a new password | def uGpu():
tkR1()
MGnb = zUQL()
QmNh(True)
FAmJ('Changing password ...')
if MGnb:
EghX = yYBj(MGnb)
EghX.run()
g0Ak = CtBi(MGnb)
g0Ak.run()
jTXt = Tsqy()
if jTXt:
MGnb = zw_U()
MGnb.set_new_password(jTXt, False)
GPtr = i0pc()
H... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def G3s8(YKHO, jTXt):\n D2Lq(jTXt)",
"def zZft(YKHO, zN5h):\n YKHO.pwd = zN5h",
"def G3s8(YKHO, jTXt):\n D2Lq(jTXt)",
"def zZft(YKHO, zN5h):\n YKHO.pwd = zN5h",
"def G3s8(YKHO, uGpu):\n YKHO.salt = YKHO.__encrypt(str(qcWV.datetime.now()))\n YKHO.crypted_password = YKHO.__encrypt(uGpu, YKH... | [
"0.8282137",
"0.8170228",
"0.8075265",
"0.8027541",
"0.80187887",
"0.7945236",
"0.7863134",
"0.7848082",
"0.7753681",
"0.7700443",
"0.7686993",
"0.7686993",
"0.76799816",
"0.76615596",
"0.7617091",
"0.76158315",
"0.76030236",
"0.7602016",
"0.7595753",
"0.7595753",
"0.75946164... | 0.7478517 | 45 |
Initialize GPIO pins and machine itself. | def DbxN():
G9jH.info('initialize hal') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DbxN():\n xi8C.setwarnings(False)\n xi8C.setmode(Tuqy)\n for WKvO in o4Jx:\n xi8C.setup(WKvO, xi8C.OUT)\n for WKvO in g4y1:\n xi8C.setup(WKvO, xi8C.IN)",
"def ZLxM(YKHO):\n xi8C.setmode(xi8C.BCM)\n xi8C.setwarnings(False)\n swF1(YKHO.load_pins)\n swF1(YKHO.clock_pins)\n ... | [
"0.8246749",
"0.820619",
"0.8192314",
"0.8054543",
"0.7980919",
"0.79359585",
"0.7841231",
"0.77914584",
"0.76666504",
"0.7662312",
"0.76352406",
"0.75587326",
"0.74530846",
"0.73741543",
"0.737302",
"0.73334783",
"0.7328046",
"0.7306947",
"0.73015684",
"0.7296268",
"0.728157... | 0.0 | -1 |
Constructs a board object with the given width. | def FIMM(YKHO, TVTK=4, g4y1=None):
YKHO.width = TVTK
if g4y1 is not None and len(g4y1) != TVTK ** 2:
raise ValueError('number of input values must match a whole field')
YKHO.state = None
YKHO.__create_board(TVTK, g4y1)
YKHO.history = [] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GUba(H2v2, TVTK):\n Cs6h = []\n for rdlD in range(0, H2v2):\n Cs6h.append([])\n for fvDH in range(0, TVTK):\n Cs6h[rdlD].append(0)\n return Cs6h",
"def GUba(TVTK, H2v2):\n iBIi = []\n for begg in range(H2v2):\n rdlD = ['*'] * TVTK\n iBIi.append(rdlD)\n ... | [
"0.68114424",
"0.6811077",
"0.6749825",
"0.66927594",
"0.66393703",
"0.6626468",
"0.6612006",
"0.6548856",
"0.6526971",
"0.65262467",
"0.6497222",
"0.64628714",
"0.64338475",
"0.6410094",
"0.6407721",
"0.6407074",
"0.6390061",
"0.6369025",
"0.63157535",
"0.63106245",
"0.63070... | 0.66674006 | 4 |
Creates and initializes a board of the given width. Private method, do not call from the outside | def DPQb(YKHO, TVTK, g4y1=None):
if g4y1 is None:
YKHO.state = oyIN.arange(1, TVTK ** 2 + 1, dtype=oyIN.uint8).reshape((TVTK, TVTK))
YKHO.state.flat[-1] = 0
while not YKHO.solvable() or YKHO.solved():
oyIN.random.shuffle(YKHO.state.flat)
else:
YKHO.state = oyIN.asarra... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GUba(TVTK, H2v2):\n iBIi = []\n for begg in range(H2v2):\n rdlD = ['*'] * TVTK\n iBIi.append(rdlD)\n return iBIi",
"def GUba(H2v2, TVTK):\n Cs6h = []\n for rdlD in range(0, H2v2):\n Cs6h.append([])\n for fvDH in range(0, TVTK):\n Cs6h[rdlD].append(0)\n ... | [
"0.7379868",
"0.7295383",
"0.7174219",
"0.7133233",
"0.71267056",
"0.712431",
"0.7053747",
"0.7041698",
"0.70148987",
"0.7012568",
"0.69860977",
"0.6934653",
"0.6933617",
"0.6925723",
"0.69151586",
"0.6905776",
"0.690467",
"0.6885753",
"0.688457",
"0.6881559",
"0.6849949",
... | 0.71098596 | 6 |
Returns magnitude thresholded binary image of the S channel in HLS color space | def _4_4(YKHO, VXjJ):
knl1 = YKHO.s_magnitude_thresh
qJtC = XC5k.cvtColor(VXjJ, XC5k.COLOR_BGR2HLS)
ZZTP = qJtC[:, :, 2]
j1yT = oyIN.zeros_like(ZZTP)
j1yT[(ZZTP >= knl1[0]) & (ZZTP <= knl1[1])] = 1
return j1yT | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sizl(VXjJ, knl1=(0, 255)):\n qJtC = XC5k.cvtColor(VXjJ, XC5k.COLOR_RGB2HLS)\n KCHu = qJtC[:, :, 2]\n dbuB = oyIN.zeros_like(KCHu)\n dbuB[(KCHu > knl1[0]) & (KCHu <= knl1[1])] = 1\n return dbuB",
"def UtPY(YKHO, VXjJ, knl1=(0, 255)):\n qJtC = XC5k.cvtColor(VXjJ, YKHO.color_convert['2HLS'])\n... | [
"0.7305832",
"0.69999665",
"0.6916013",
"0.671562",
"0.6660235",
"0.6659419",
"0.6659419",
"0.66315126",
"0.6621599",
"0.66119784",
"0.6538013",
"0.6492686",
"0.6452724",
"0.64282334",
"0.6406003",
"0.63221145",
"0.63197947",
"0.63083065",
"0.63076407",
"0.6295923",
"0.621490... | 0.82104856 | 0 |
Apply sobel filter on L(HLS) channel and threshold, filter pixels direction inside self.d_thresh and filter pixels magnitude inside self.m_thresh | def dRZp(YKHO, VXjJ):
pg7l = YKHO.sobel_kernel
oKe8 = YKHO.m_thresh
B3F5 = YKHO.d_thresh
qJtC = XC5k.cvtColor(VXjJ, XC5k.COLOR_BGR2HLS)
yzxJ = qJtC[:, :, 1]
mS2J = XC5k.Sobel(yzxJ, XC5k.CV_64F, 1, 0, ksize=pg7l)
YdmJ = XC5k.Sobel(yzxJ, XC5k.CV_64F, 0, 1, ksize=pg7l)
YXbZ = oyIN.sqrt(oyIN... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ogvf(VXjJ, NJRn=5, DCtH=(50, 225), r9iZ=(50, 225)):\n VXjJ = oyIN.copy(VXjJ)\n qJtC = XC5k.cvtColor(VXjJ, XC5k.COLOR_RGB2HLS).astype(oyIN.float)\n yzxJ = qJtC[:, :, 1]\n ZZTP = qJtC[:, :, 2]\n W6IE = lU4L(yzxJ, 'x', NJRn, DCtH)\n QVeP = lU4L(yzxJ, 'y', NJRn, DCtH)\n Rerj = oyIN.copy(XC5k.b... | [
"0.7147895",
"0.7094144",
"0.69392884",
"0.6473194",
"0.6465271",
"0.64328253",
"0.6374123",
"0.63611764",
"0.63175976",
"0.63075346",
"0.62954515",
"0.62845206",
"0.6258951",
"0.6234415",
"0.6196887",
"0.6192373",
"0.6185837",
"0.61800605",
"0.6179419",
"0.6178472",
"0.61705... | 0.5848708 | 53 |
Return a dictionary where list1 provides the keys and list2 provides the values. | def TZaC(Kt9y, I_KI):
rqc3 = zip(Kt9y, I_KI)
_WSh = dict(rqc3)
return _WSh | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TZaC(Kt9y, I_KI):\n rqc3 = zip(Kt9y, I_KI)\n _WSh = dict(rqc3)\n return _WSh",
"def naEX(AtYR, trrW):\n Op6c = {}\n pZWG = {}\n for YRbF in range(len(AtYR)):\n Op6c[AtYR[YRbF]] = trrW[YRbF]\n pZWG[trrW[YRbF]] = AtYR[YRbF]\n return (Op6c, pZWG)",
"def TZaC(Kt9y, I_KI):\n ... | [
"0.7944197",
"0.79386276",
"0.78746486",
"0.78275037",
"0.74283135",
"0.737683",
"0.7357812",
"0.7268865",
"0.72622126",
"0.69926876",
"0.6906587",
"0.69043857",
"0.67196816",
"0.6700976",
"0.66865385",
"0.66666436",
"0.66203886",
"0.65987873",
"0.6569902",
"0.656807",
"0.650... | 0.8093647 | 0 |
Returns the data matrix in self filtered by projection_mask | def ruTK(YKHO, cAx9=None):
return YKHO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kbPQ(YKHO) -> f2Ho:\n return f2Ho(YKHO._output_struct['spatial_weights']).lazy_transpose()",
"def nICy(YKHO, nPrm, FDPT, QnmL, Yyc6, fA4l, ZHfW=None):\n YKHO.x, YKHO.y = YKHO.basemap(*mWKm(Yyc6, fA4l))\n Aofo = pTn1(nPrm, FDPT, QnmL, YKHO.x, YKHO.y)\n return NERJ(Aofo, mask=ZHfW)",
"def Eiem(YK... | [
"0.66794914",
"0.6271778",
"0.61788183",
"0.61364615",
"0.60071766",
"0.595787",
"0.59334326",
"0.5916117",
"0.58524543",
"0.58182245",
"0.58014524",
"0.5781387",
"0.5763624",
"0.5733418",
"0.5733418",
"0.5733418",
"0.5733418",
"0.5733418",
"0.57298774",
"0.5726951",
"0.57220... | 0.6979231 | 0 |
Draws enemies on the screen. | def JmFt(YKHO, ufJO):
YKHO.img = YKHO.imgs[YKHO.an_count]
ufJO.blit(YKHO.img, (YKHO.x - YKHO.img.get_width() / 2, YKHO.y - YKHO.img.get_height() / 2 - 35))
YKHO.draw_health_bar(ufJO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sahe(YKHO) -> None:\n for JjEH in YKHO.level.enemies.values():\n YKHO.draw_entity(JjEH)",
"def JmFt(YKHO):\n for JjEH in X3lK:\n JjEH.draw()",
"def qaho(YKHO):\n for JjEH in YKHO.enemies:\n YKHO.canvas.create_image(JjEH.x_pos - YKHO.player.x_pos + wZcb, JjEH.y_pos - YKHO.playe... | [
"0.8616353",
"0.8227357",
"0.7967988",
"0.731426",
"0.730595",
"0.71695435",
"0.7010943",
"0.7004442",
"0.6992698",
"0.69476354",
"0.68596923",
"0.685824",
"0.68515366",
"0.6838005",
"0.68059075",
"0.6801377",
"0.67451185",
"0.6712259",
"0.6668686",
"0.66518",
"0.66477686",
... | 0.0 | -1 |
_md5_ Get the md5 checksum of a particular file | def EXap(Ux0P, zNig=8192):
MKlR = HBct.md5()
eHNT = open(Ux0P, 'r')
while True:
HkJz = eHNT.read(zNig)
if len(HkJz) == 0:
break
MKlR.update(HkJz)
eHNT.close()
return MKlR.hexdigest() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uPUs(nUeQ):\n return HBct.md5(open(nUeQ, 'rb').read()).hexdigest()",
"def vkAf(Ux0P):\n return vFhS(Ux0P, 'md5')",
"def znmK(nUeQ):\n xORj = HBct.md5()\n KuP7 = 4096\n with open(nUeQ, 'rb') as PFCt:\n for yOAJ in iter(lambda: PFCt.read(KuP7), b''):\n xORj.update(yOAJ)\n ... | [
"0.8859401",
"0.8575489",
"0.8503993",
"0.84192175",
"0.8413913",
"0.8328325",
"0.83227134",
"0.830724",
"0.8304618",
"0.83022815",
"0.8294603",
"0.8252936",
"0.82472473",
"0.8246665",
"0.82008755",
"0.81776637",
"0.81702894",
"0.81674117",
"0.81652963",
"0.81381536",
"0.8128... | 0.7699685 | 73 |
Initializes plant name and health. | def FIMM(YKHO, VqRE, TP3m=0):
YKHO.plants = rLdf.read_csv(VqRE)
YKHO.current_HP = TP3m | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO):\n YKHO.level = 1\n YKHO.stats = {'str': 12, 'mag': 1, 'skill': 13, 'spd': 13, 'def': 15, 'lck': 12, 'res': 4}\n YKHO.growths = {'hp': 0.8, 'str': 0.6, 'mag': 0.2, 'skill': 0.7, 'spd': 0.7, 'def': 0.6, 'luk': 0.3, 'res': 0.3}\n YKHO.hp = 30\n YKHO.max_hp = 30\n YKHO.name = 'Hans'\n... | [
"0.6547792",
"0.6503042",
"0.6388726",
"0.6321103",
"0.6304183",
"0.63010573",
"0.6268072",
"0.62355155",
"0.613185",
"0.6129659",
"0.6122709",
"0.61138827",
"0.6089424",
"0.6048021",
"0.6047533",
"0.60154647",
"0.6011903",
"0.6007912",
"0.60010415",
"0.5963008",
"0.5951105",... | 0.0 | -1 |
Gets the common vertices of two connected faces. | def _uVr(YEe1, Zil5, knl1=0.1, PJWX=False):
y5bX = []
for YRbF in range(len(YEe1)):
for r845 in range(len(Zil5)):
if sum((YEe1[YRbF] - Zil5[r845]) ** 2) < knl1:
y5bX.append(YEe1[YRbF])
if len(y5bX) != 2:
if PJWX:
print('Two faces should only have two e... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _8w7(YKHO, Dyub, EmyI):\n return [yXSV for yXSV in YKHO.face_vertices(Dyub) if yXSV in YKHO.face_vertices(EmyI)]",
"def gAJd(cAR0, DMb4):\n Fw8z = cAR0.geometry()\n mC4V = set()\n for SLBp in cAR0.vertices():\n XvZN = SLBp.point()\n for gela in YwgK(XvZN):\n X3qZ, ZYCo = ... | [
"0.7172862",
"0.66457033",
"0.61137563",
"0.60858905",
"0.60276014",
"0.60246456",
"0.60199445",
"0.59979826",
"0.5993781",
"0.59932303",
"0.5971517",
"0.5971322",
"0.59705013",
"0.5938052",
"0.5871619",
"0.58693385",
"0.5810711",
"0.5770802",
"0.57551146",
"0.57414496",
"0.5... | 0.6776906 | 1 |
Get a ModelForm with our own `__init__` and `clean` methods. However, we need to allow ModelForm's metaclass_factory to run unimpeded, so dynamically override the methods rather than subclassing. | def ON6q(YKHO, *qIxc, **B2fa):
Hk5i = super(uJde, YKHO).get_form(*qIxc, **B2fa)
_d5p = Hk5i.__init__
def bagf(YKHO, *qIxc, **B2fa):
_d5p(YKHO, *qIxc, **B2fa)
Gzgm(YKHO.initial, YKHO.initial_data_keymap)
oFxz = Hk5i.clean
def uVcy(YKHO):
oFxz(YKHO)
OlGj(YKHO.cleaned_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NcQ7(YKHO, **B2fa):\n if 'fields' in B2fa:\n V_D6 = B2fa.pop('fields')\n else:\n V_D6 = YKHO.get_fields()\n DNHh = []\n if YKHO.form_class:\n if V_D6 or len(DNHh) > 0:\n if V_D6 == '__all__':\n V_D6 = PbwK(YKHO.form_class).fields\n V002 = dM... | [
"0.71698236",
"0.7095945",
"0.6855253",
"0.6754315",
"0.6731633",
"0.67193246",
"0.6692349",
"0.6580954",
"0.65312827",
"0.6442298",
"0.63837856",
"0.6291967",
"0.6281818",
"0.6274586",
"0.62443185",
"0.6222136",
"0.6198306",
"0.61836964",
"0.61790437",
"0.6163815",
"0.607012... | 0.7359488 | 0 |
Returns WKT for the given list of geometry fields. | def si15(V_D6, LRiP):
if not V_D6:
return ''
if len(V_D6) == 1:
return wcGw(V_D6[0], LRiP)
return 'GEOMETRYCOLLECTION(%s)' % ','.join((wcGw(Jyyj, LRiP) for Jyyj in V_D6)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EkJc(iAdx):\n return [iAdx, CstC.loads(iAdx), quUU.GeoSeries.from_wkt([iAdx]), quUU.GeoDataFrame(geometry=quUU.GeoSeries.from_wkt([iAdx]))]",
"def U4IS(NgpY):\n\n def A6jp(jNOo):\n PFAa = ' '.join(('%f',) * len(jNOo[0]))\n return ','.join([PFAa % tuple(Z9rn) for Z9rn in jNOo])\n jNOo =... | [
"0.61635286",
"0.5961581",
"0.5953677",
"0.5765577",
"0.5705928",
"0.56759876",
"0.563688",
"0.56283283",
"0.5543941",
"0.5538957",
"0.54886204",
"0.5488034",
"0.5486532",
"0.5479463",
"0.54650897",
"0.54199296",
"0.54120344",
"0.54077095",
"0.5400095",
"0.5396652",
"0.538122... | 0.6448624 | 0 |
Overrides the default save function for the MaterialCost model. After each MaterialCost is saved, the authorized_by field is filled with the current user. | def lac1(YKHO, QePW, YEnM, L03z, nZuS):
YEnM.authorized_by = QePW.user
YEnM.save() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xkzz(YKHO, *qIxc, **B2fa):\n if YKHO.pk:\n YKHO.update_at = rIAI.now()\n if not YKHO.pk:\n YKHO.current_cost = YKHO.klass.cost\n return super(lQBV, YKHO).save(*qIxc, **B2fa)",
"def xkzz(YKHO, wlo2=False, rVtO=False):\n YKHO._calculate_contribution_score()\n super(GaXD, YKHO).save... | [
"0.62937176",
"0.62304103",
"0.61486304",
"0.61153543",
"0.60959613",
"0.60875046",
"0.60822564",
"0.6051974",
"0.6050065",
"0.60428005",
"0.59968644",
"0.59816426",
"0.597588",
"0.59455687",
"0.59455687",
"0.5905075",
"0.5905075",
"0.5873401",
"0.58237326",
"0.5823683",
"0.5... | 0.665234 | 0 |
Overrides the default save function for the RepairCost model. After each RepairCost is saved, the authorized_by field is filled with the current user. | def lac1(YKHO, QePW, YEnM, L03z, nZuS):
YEnM.authorized_by = QePW.user
YEnM.save() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xkzz(YKHO, wlo2=False, rVtO=False):\n YKHO._calculate_contribution_score()\n super(GaXD, YKHO).save(force_insert=wlo2, force_update=rVtO)",
"def xkzz(YKHO, *qIxc, **B2fa):\n if YKHO.pk:\n YKHO.update_at = rIAI.now()\n if not YKHO.pk:\n YKHO.current_cost = YKHO.klass.cost\n return... | [
"0.65450037",
"0.6386294",
"0.62096685",
"0.6143957",
"0.60777926",
"0.6017719",
"0.5898877",
"0.58423424",
"0.5832313",
"0.57918316",
"0.57749474",
"0.5755721",
"0.57544047",
"0.57456887",
"0.5737115",
"0.57279354",
"0.57034236",
"0.5697724",
"0.5687594",
"0.5668653",
"0.566... | 0.6373146 | 3 |
Checks whether `url` is a valid URL. | def SGVO(bD7m):
U5Jc = KVWQ(bD7m)
return bool(U5Jc.netloc) and bool(U5Jc.scheme) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yaqE(bD7m):\n return True if f8eG.match(bD7m) else False",
"def SGVO(bD7m):\n aBkf = _FIc.URLValidator()\n try:\n aBkf(bD7m)\n except _FIc.ValidationError:\n return False\n else:\n return True",
"def Sxk4(bD7m):\n if not ZbWC.search('^(http|https|ftp)' + '\\\\://[a-z0... | [
"0.8939179",
"0.8780518",
"0.87553483",
"0.86886775",
"0.86520433",
"0.86460173",
"0.8619089",
"0.85934895",
"0.8589099",
"0.8505128",
"0.8439438",
"0.8439245",
"0.8436709",
"0.8436638",
"0.8415732",
"0.8406938",
"0.83978635",
"0.83957845",
"0.8382483",
"0.83688885",
"0.83594... | 0.83548236 | 23 |
Closes this client. See E4StreamingClient.close(). | def U4F2(YKHO, vEqo, UpHd, wVCK) -> None:
YKHO.close() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DDI8(YKHO):\n YKHO._client.close()",
"def DDI8(YKHO):\n YKHO._client.close()",
"def DDI8(YKHO):\n YKHO._client.close()",
"def DDI8(YKHO) -> None:\n YKHO._client.close()",
"def DDI8(YKHO) -> None:\n YKHO._client.close()",
"def DDI8(YKHO):\n YKHO.client_sock.close()\n YKHO.client_s... | [
"0.7810877",
"0.7810877",
"0.7810877",
"0.7757277",
"0.7757277",
"0.7722132",
"0.77193046",
"0.76479584",
"0.76479584",
"0.76372",
"0.76372",
"0.76372",
"0.76372",
"0.7603694",
"0.74128276",
"0.7405404",
"0.7391561",
"0.73579204",
"0.7323767",
"0.7313482",
"0.73124146",
"0.... | 0.0 | -1 |
Unique ID of the currently connected device. | def PObu(YKHO) -> str:
return YKHO._dev | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ShR8(YKHO):\n return YKHO.device.id",
"def ShR8(YKHO):\n return YKHO._device.device_id",
"def ShR8(YKHO):\n return YKHO._device.device_id",
"def ShR8(YKHO) -> str:\n return YKHO._device.device_id",
"def ShR8(YKHO):\n return YKHO._innogy_device.id",
"def jf3N(YKHO):\n return YKHO.uni... | [
"0.8937435",
"0.8919121",
"0.8919121",
"0.88393533",
"0.8821607",
"0.87903345",
"0.8757848",
"0.87559664",
"0.87093234",
"0.86990446",
"0.861828",
"0.8590731",
"0.8590731",
"0.8455433",
"0.8455433",
"0.84151334",
"0.83385634",
"0.8311224",
"0.8279675",
"0.826991",
"0.8227587"... | 0.0 | -1 |
This function allows to load a trained classifier. | def m28R(HNWp):
eHNT = open(HNWp)
iSJu = t2lc.load(eHNT)
eHNT.close()
return iSJu | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TSyB(YKHO):\n YKHO.classifier = MYoF.load(open(YKHO.classifier_path, 'rb'))",
"def j4ah(YKHO):\n if Hy7s.path.exists(YKHO.get_file_name()):\n with open(YKHO.get_file_name(), 'rb') as eHNT:\n YKHO.classifier = t2lc.load(eHNT)\n else:\n RKD7.warning('No classifier %s.' % YKHO.... | [
"0.8240599",
"0.8145445",
"0.8010094",
"0.75048167",
"0.7502745",
"0.747129",
"0.74456894",
"0.74201083",
"0.7368888",
"0.7322226",
"0.7206403",
"0.71876055",
"0.7179362",
"0.7123201",
"0.7103109",
"0.7058399",
"0.7056591",
"0.7047215",
"0.70456636",
"0.6999869",
"0.6995197",... | 0.8239354 | 1 |
Sets the bytes_encoded_total of this Statistics. Bytes encoded total. (required) | def AzNk(YKHO, AzNk):
if AzNk is not None:
if not isinstance(AzNk, int):
raise TypeError('Invalid type for `bytes_encoded_total`, type has to be `int`')
YKHO._bytes_encoded_total = AzNk | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ed9k(YKHO, ed9k):\n YKHO._total_bytes = ed9k",
"def AzNk(YKHO):\n return YKHO._bytes_encoded_total",
"def kCcs(YKHO, kCcs):\n if kCcs is not None:\n if not isinstance(kCcs, int):\n raise TypeError('Invalid type for `time_encoded_total`, type has to be `int`')\n YKHO._time_enco... | [
"0.7482128",
"0.7041599",
"0.64403874",
"0.63466203",
"0.6279336",
"0.62553245",
"0.6218508",
"0.6218508",
"0.6218508",
"0.6218508",
"0.6218508",
"0.6218508",
"0.6218508",
"0.61715883",
"0.60682154",
"0.60682154",
"0.60682154",
"0.60071814",
"0.5985446",
"0.5985446",
"0.59743... | 0.85666096 | 0 |
Returns the string representation of the model | def gTzM(YKHO):
return CgYo.pformat(YKHO.to_dict()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return YKHO.text",
"def zAg0(YKHO):\n oOUF = '-----------------------------------------------------------------------------------\\n'\n _2sc = YKHO.__class__.__name__\n oOUF += '\\t\\... | [
"0.86418265",
"0.85103965",
"0.7853324",
"0.77442306",
"0.7712258",
"0.76979405",
"0.765959",
"0.7637644",
"0.76218504",
"0.7607561",
"0.7606604",
"0.7606604",
"0.7606604",
"0.75990754",
"0.7585653",
"0.758149",
"0.7570811",
"0.7567585",
"0.75392604",
"0.75392604",
"0.7527967... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif: object):\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif):\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(... | [
"0.8392633",
"0.8354901",
"0.82950056",
"0.8132309",
"0.81149805",
"0.8099986",
"0.809911",
"0.8097883",
"0.8097883",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8066694",
"0.80594814",
"0.805757",
... | 0.0 | -1 |
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(REWQ, YKHO).__init__(*qIxc, **c_sp)
if YKHO.swarmID is None:
YKHO.swarmID = 0
if YKHO.taskName is None:
YKHO.taskName = ''
if YKHO.actorName is None:
YKHO.actorName = ''
if YKHO.robotID ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, Ol8d=None):\n if Ol8d is not None:\n YKHO.message = Ol8d",
"def FIMM(YKHO, Ol8d=None):\n YKHO.message = Ol8d",
"def FIMM(YKHO, Ol8d=None):\n YKHO.message = Ol8d",
"def FIMM(YKHO, Ol8d=None):\n super().__init__()\n YKHO.message = Ol8d",
"def FIMM(YKHO, *qIxc, **c_sp):\n ... | [
"0.8167091",
"0.7721305",
"0.7721305",
"0.7653387",
"0.75735575",
"0.7544938",
"0.7486126",
"0.74712706",
"0.7458634",
"0.7447028",
"0.74456894",
"0.74340963",
"0.741523",
"0.7408652",
"0.73922",
"0.7376216",
"0.7364397",
"0.73264366",
"0.7325022",
"0.7325022",
"0.7325022",
... | 0.69865507 | 71 |
Test that an external volume is successfully attached to a new agent. If the dcos_api_session has only one agent, the volume will be detached and reattached to the same agent. | def lzBo(CHtn: DcosApiSession) -> None:
RV9L = _OWb()
if not (RV9L['provider'] == 'aws' or RV9L.get('platform') == 'aws'):
trZe.skip('Must be run in an AWS environment!')
if RV9L.get('security') == 'strict':
trZe.skip('See: https://jira.mesosphere.com/browse/DCOS_OSS-4922')
Of0F = (CHtn.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sxZy(YKHO, BWXx):\n geh0 = YKHO.setupAccount(BWXx)\n YKHO.assertEqual(geh0[0], iFFG, geh0[1])\n XHf1 = YKHO.apiclient\n if BWXx == DS4n:\n XHf1 = YKHO.testClient.getUserApiClient(UserName=YKHO.account.name, DomainName=YKHO.account.domain)\n YKHO.assertNotEqual(XHf1, OlSW, 'Failure whi... | [
"0.7333364",
"0.7235962",
"0.7220113",
"0.71670437",
"0.7119759",
"0.70745707",
"0.70559204",
"0.7046723",
"0.6996135",
"0.68910974",
"0.68635577",
"0.6824112",
"0.6802346",
"0.6662528",
"0.6526503",
"0.6525123",
"0.64746773",
"0.6462321",
"0.6455071",
"0.6435972",
"0.6389698... | 0.7169875 | 3 |
Saves the new password. | def xkzz(YKHO, jSYO=True):
YKHO.user.set_password(YKHO.cleaned_data['password1'])
if jSYO:
YKHO.user.save()
return YKHO.user | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nCXD(YKHO, jTXt):\n YKHO._password = jTXt",
"def nCXD(YKHO):\n XDID.passwords.append(YKHO)",
"def xkzz(YKHO, *qIxc, **B2fa):\n YKHO.password = D2Lq(YKHO.password)\n super(mv1M, YKHO).save(*qIxc, **B2fa)",
"def xkzz(YKHO, *LFbw, **B2fa):\n YKHO.set_password(YKHO.password)\n super(mv1M, Y... | [
"0.7924277",
"0.7890919",
"0.76715326",
"0.7465345",
"0.72128814",
"0.71888673",
"0.716012",
"0.7144528",
"0.7119652",
"0.7083416",
"0.70829344",
"0.7062069",
"0.7039709",
"0.70303315",
"0.70152944",
"0.6989287",
"0.69857734",
"0.6960057",
"0.6938513",
"0.6913441",
"0.6909365... | 0.6824592 | 30 |
Build a simple vocabulary wrapper. | def ZFlL(l5Ny, gwAu):
EvQg = qQXR.load(open(l5Ny[0], 'r'))
deVW = qQXR.load(open(l5Ny[1], 'r'))
QOe9 = qQXR.load(open(l5Ny[2], 'r'))
ewCu = mBkc()
ZjgO(EvQg, ewCu)
ZjgO(deVW, ewCu)
ZjgO(QOe9, ewCu)
V22M = [GIN8 for GIN8, r9Hf in ewCu.items() if r9Hf >= gwAu]
CtWL = yH2p()
CtWL.ad... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZFlL():\n CtWL = yH2p()\n CtWL.add_word('<pad>')\n CtWL.add_word('<start>')\n CtWL.add_word('<end>')\n CtWL.add_word('<unk>')\n BHGE = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine']\n for yzQ0 in BHGE:\n CtWL.add_word(yzQ0)\n V22M = ['this', 'is'... | [
"0.7756604",
"0.7306368",
"0.6995895",
"0.695528",
"0.68046856",
"0.6750246",
"0.66967887",
"0.6639309",
"0.6631574",
"0.6631451",
"0.661886",
"0.6585043",
"0.64524925",
"0.6449931",
"0.64329624",
"0.6401368",
"0.63828623",
"0.6370929",
"0.634009",
"0.6338847",
"0.6336633",
... | 0.6308314 | 22 |
Method which subclasses should implement to create 'self.model', a Keras model. Method shouldn't return anything. | def Cc7Y(YKHO, *qIxc, **YSA3):
raise NotImplementedError | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fkCJ(YKHO) -> ZylS.keras.Model:\n pass",
"def cQkX(YKHO) -> tP8l:\n g4y1, o4Jx = YKHO._make_embedding_layers()\n Iq_3 = YKHO.config.model_assembler.make_hidden_layers(o4Jx)\n Iq_3 = YKHO.config.model_assembler.make_final_layer(Iq_3)\n C3ST = tP8l(inputs=g4y1, outputs=Iq_3)\n C3ST = YKHO.con... | [
"0.828738",
"0.78353906",
"0.77761245",
"0.7690181",
"0.7578153",
"0.7553898",
"0.7499744",
"0.7482052",
"0.7466101",
"0.7453763",
"0.7431652",
"0.74302214",
"0.74175274",
"0.74117655",
"0.7406541",
"0.74043584",
"0.7397121",
"0.7386989",
"0.7382231",
"0.73494655",
"0.7347719... | 0.0 | -1 |
Constructor. Creates an explosion. Takes in list of sprites, position and scale. | def FIMM(YKHO, zVWs, WKvO, LVAh, TVTK=100, H2v2=100):
super().__init__()
YKHO.explist = zVWs
YKHO.image = YKHO.explist[0]
YKHO.rect = YKHO.image.get_rect()
YKHO.width = TVTK
YKHO.height = H2v2
YKHO.rect.x = WKvO - YKHO.width // 2
YKHO.rect.y = LVAh - YKHO.height // 2
YKHO.nr = 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, qP20, NXpY, XCxf=0.1):\n YKHO.images = []\n for YRbF in qP20:\n LNo8 = a9eO.image.load(YRbF).convert_alpha()\n Yw_3 = a9eO.transform.scale(LNo8, (int(LNo8.get_rect().width * NXpY), int(LNo8.get_rect().height * NXpY)))\n YKHO.images.append(Yw_3)\n YKHO.animation_time = X... | [
"0.7328258",
"0.71130806",
"0.69535273",
"0.68305516",
"0.67463905",
"0.6722869",
"0.6563703",
"0.6470984",
"0.6399274",
"0.63465655",
"0.6330017",
"0.632507",
"0.6285142",
"0.6284466",
"0.6258835",
"0.621978",
"0.6165685",
"0.61237967",
"0.6114842",
"0.6110847",
"0.61007804"... | 0.7449617 | 0 |
Adds an integer feature to the tf Example. | def Wgnv(PU1l, BZ2A, kAne):
PU1l.features.feature[BZ2A].int64_list.value.append(kAne) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def v59i(EfZK):\n return ZylS.train.Feature(int64_list=ZylS.train.Int64List(value=EfZK))",
"def Oety(BWXx: int) -> ZylS.train.Feature:\n return ZylS.train.Feature(int64_list=ZylS.train.Int64List(value=[BWXx]))",
"def Oety(BWXx):\n BWXx = int(BWXx)\n return ZylS.train.Feature(int64_list=ZylS.train.I... | [
"0.74620193",
"0.74413997",
"0.74151427",
"0.73494476",
"0.732272",
"0.732272",
"0.732272",
"0.73098886",
"0.72957706",
"0.72947085",
"0.72947085",
"0.72947085",
"0.72947085",
"0.72947085",
"0.72947085",
"0.72947085",
"0.72947085",
"0.72947085",
"0.72947085",
"0.72947085",
"0... | 0.82934517 | 0 |
Adds an float feature to the tf Example. | def x6IO(PU1l, BZ2A, BWXx):
if isinstance(BWXx, float):
PU1l.features.feature[BZ2A].float_list.value.append(BWXx)
else:
PU1l.features.feature[BZ2A].float_list.value.extend(BWXx.flatten()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bPiq(BWXx: float) -> ZylS.train.Feature:\n return ZylS.train.Feature(float_list=ZylS.train.FloatList(value=[BWXx]))",
"def bPiq(BWXx):\n BWXx = float(BWXx)\n return ZylS.train.Feature(float_list=ZylS.train.FloatList(value=[BWXx]))",
"def bPiq(BWXx):\n return ZylS.train.Feature(float_list=ZylS.t... | [
"0.816868",
"0.8124033",
"0.8118526",
"0.8113159",
"0.81130683",
"0.81130683",
"0.80847865",
"0.8044889",
"0.8044889",
"0.8044889",
"0.8044889",
"0.8044889",
"0.8044889",
"0.8044889",
"0.8044889",
"0.8044889",
"0.8044889",
"0.8044889",
"0.8043768",
"0.8043768",
"0.8043768",
... | 0.80442023 | 18 |
Adds a bytes feature to the tf Example. | def mJtR(PU1l, BZ2A, I3mI):
PU1l.features.feature[BZ2A].bytes_list.value.append(I3mI) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NhGy(BWXx):\n return ZylS.train.Feature(bytes_list=ZylS.train.BytesList(value=[BWXx]))",
"def NhGy(BWXx):\n return ZylS.train.Feature(bytes_list=ZylS.train.BytesList(value=[BWXx]))",
"def r2_2(BWXx):\n return ZylS.train.Feature(bytes_list=ZylS.train.BytesList(value=[BWXx]))",
"def NhGy(BWXx):\n ... | [
"0.8030553",
"0.8008366",
"0.7983073",
"0.7978699",
"0.7978699",
"0.7978699",
"0.7978699",
"0.7978699",
"0.7978699",
"0.7978699",
"0.7978699",
"0.7978699",
"0.7978699",
"0.7978699",
"0.7978699",
"0.7978699",
"0.79775774",
"0.79775774",
"0.79775774",
"0.79775774",
"0.79775774"... | 0.8171634 | 0 |
Wraps hidden states in new Tensors, to detach them from their history. | def IOWm(MKlR):
if isinstance(MKlR, ht2j.Tensor):
return MKlR.detach()
else:
return tuple((IOWm(Ty9i) for Ty9i in MKlR)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YmeV(YKHO):\n YKHO.hidden = (ht2j.zeros(1, YKHO.batch_size, YKHO.hidden_size), ht2j.zeros(1, YKHO.batch_size, YKHO.hidden_size))",
"def eIRW(Zode):\n if isinstance(Zode, ht2j.Tensor):\n return Zode.detach()\n else:\n return tuple((eIRW(Ty9i) for Ty9i in Zode))",
"def MAw8(YKHO):\n ... | [
"0.6880629",
"0.64517695",
"0.6377572",
"0.63079625",
"0.62515086",
"0.6233768",
"0.62034684",
"0.61984754",
"0.61882585",
"0.61882585",
"0.6126888",
"0.61185306",
"0.60700804",
"0.6000492",
"0.5997249",
"0.5995625",
"0.5969928",
"0.59628063",
"0.59474343",
"0.5938205",
"0.59... | 0.5651715 | 46 |
Gets the maximum key of the nested dictionary for a given key Used to get the most likely following character based on the count of occurances of next characters | def lyzu(YKHO, pan_):
S4M2 = YKHO.char_set[pan_]
return max(S4M2, key=lambda G1Hx: S4M2[G1Hx]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dSMK(ciQU):\n if ciQU:\n LKcU = max(ciQU, key=lambda WKvO: len(ciQU[WKvO]))\n return LKcU\n else:\n return None",
"def F8Pe(YKHO):\n WKvO = sorted(YKHO.d.iteritems(), key=lambda WKvO: WKvO[1], reverse=True)\n if len(WKvO) > 0:\n return WKvO[0][0]\n else:\n re... | [
"0.73521227",
"0.7327705",
"0.71292555",
"0.70874965",
"0.68973917",
"0.68825984",
"0.6869541",
"0.67191124",
"0.66589904",
"0.6646473",
"0.664481",
"0.6614838",
"0.6611866",
"0.65730786",
"0.6559744",
"0.6517388",
"0.6516067",
"0.6515463",
"0.64796686",
"0.6478694",
"0.64726... | 0.6587325 | 13 |
Compute the parameter updates on a given batch of data. The `derive_updates` function should be called in conjunction with the next `apply_updates` function in order to finish one iteration of training. | def uVPa(YKHO, Wc9F):
if not YKHO.model:
raise RuntimeError('Please set self.model at setup or override this function for deriving gradient updates.')
C3ST = YKHO.model
if not YKHO.optimizer:
raise RuntimeError('Please set self.optimizer at setup or override this function for deriving gradie... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QdZT(YKHO, Vhxs):\n lJcP = oyIN.sum([P6bq[0] for P6bq in Vhxs])\n RHJb = YKHO.eta\n UqYS = YKHO.beta\n iB4I = [oyIN.zeros(oyIN.shape(Ty9i), dtype=float) for Ty9i in Vhxs[0][1]]\n for YRbF, QdZT in enumerate(Vhxs):\n for r845, Raii in enumerate(iB4I):\n iB4I[r845] = oyIN.add(Rai... | [
"0.7153155",
"0.70938176",
"0.69824314",
"0.68852943",
"0.68772876",
"0.6758393",
"0.6701452",
"0.6631027",
"0.661724",
"0.65821886",
"0.6578223",
"0.6554178",
"0.65170544",
"0.6514398",
"0.65026486",
"0.6495567",
"0.6483751",
"0.6466819",
"0.64587325",
"0.64546734",
"0.64386... | 0.7437021 | 0 |
Convert a torch GPU tensor to cupy tensor. Since now ray.util.collective natively support torch.Tensor, so we do nothing in this function. | def fQJo(RqAr):
if not isinstance(RqAr, ht2j.Tensor):
raise RuntimeError('Expected torch.Tensor, but got: {}. '.format(RqAr))
return RqAr | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pQUn(RqAr: torch.Tensor) -> cqkc.ndarray:\n with cqkc.cuda.Device(RqAr.device.index):\n IiyY = fjlu(I7av(RqAr))\n return IiyY",
"def IbQ5(IiyY: cupy.ndarray) -> ht2j.Tensor:\n return p_3g(nKyD(IiyY))",
"def DlVx(WKvO):\n if WKvO is None:\n return WKvO\n WKvO = WKvO.contiguo... | [
"0.7870666",
"0.765952",
"0.70649",
"0.70478594",
"0.68693143",
"0.68693143",
"0.6754961",
"0.6637234",
"0.65746903",
"0.65553474",
"0.6509635",
"0.6498466",
"0.6485505",
"0.64397323",
"0.64216846",
"0.6380115",
"0.6357326",
"0.63393474",
"0.6288124",
"0.62794465",
"0.6263938... | 0.763542 | 2 |
Get shape extent of shape_in. The shape must have only one geometry | def LmGW(sRJN):
E_qD = K40W.GetDriverByName('ESRI Shapefile')
cEGy = E_qD.Open(sRJN, 0)
gEmA = cEGy.GetLayer()
for _x49 in gEmA:
NgpY = _x49.GetGeometryRef()
sEAN = NgpY.GetEnvelope()
return (sEAN[0], sEAN[2], sEAN[1], sEAN[3]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pfA5(YKHO, ETfU):\n N8OZ = YKHO.feature_map_shapes(ETfU)\n return N8OZ[-1][1:]",
"def n4s1(YKHO):\n return YKHO._inshape",
"def Hhp6(pKvt):\n Csk6 = pKvt.dimensions\n return [0, Csk6[0] - 1, 0, Csk6[1] - 1, 0, Csk6[2] - 1]",
"def Hhp6(YKHO):\n return YKHO._extent",
"def aIUh(Oa1e, a1P... | [
"0.66549784",
"0.63968074",
"0.62912625",
"0.62722266",
"0.626338",
"0.6225144",
"0.6198732",
"0.6143776",
"0.6078624",
"0.6024094",
"0.59608066",
"0.59511375",
"0.59467566",
"0.5908716",
"0.58655375",
"0.5842603",
"0.58297354",
"0.5791025",
"0.5783569",
"0.5773149",
"0.57666... | 0.7950129 | 0 |
Accepts data frame, and aligns so that all enttries close to v0 are on the same row. Returns new dataframe with integer index (reprenting days after v0). | def JI8y(T8d8, jQ3Z):
Ylbp = rLdf.DataFrame()
for fvDH in jQ3Z.columns:
dy_H = qCaK(T8d8, jQ3Z[fvDH])
dy_H.name = fvDH
Ylbp = rLdf.merge(Ylbp, dy_H, how='outer', left_index=True, right_index=True)
return Ylbp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yGAc(rdlD):\n PtAV = 0\n kepv = rdlD.index[0]\n for ajHT, CjKC in zip(rdlD, rdlD.index):\n if ajHT < Y2Oq:\n PtAV += 1\n else:\n kepv = CjKC\n break\n rdlD = list(rdlD[PtAV:]) + [oyIN.nan] * PtAV + [kepv]\n return rLdf.Series(rdlD)",
"def DQkE(_lY... | [
"0.6294716",
"0.59955466",
"0.5864472",
"0.5633452",
"0.55974686",
"0.5586396",
"0.5569736",
"0.5494608",
"0.54704475",
"0.54563195",
"0.5439643",
"0.5422473",
"0.54165286",
"0.54161805",
"0.54057974",
"0.53481644",
"0.5347582",
"0.5325196",
"0.532384",
"0.5322757",
"0.527684... | 0.6818306 | 0 |
define vgg16 model, with modifications | def FGiJ(qU7g):
IBig = nMvt.applications.vgg16.VGG16(include_top=False, weights='imagenet', input_tensor=nMvt.Input((32, 32, 3)), classes=qU7g.shape[1], pooling='avg')
C3ST = nMvt.Sequential()
C3ST.add(IBig)
C3ST.add(nMvt.layers.Flatten())
C3ST.add(nMvt.layers.Dense(128, activation='relu', kernel_in... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def a7Lb(**B2fa):\n C3ST = s3br(AaDq(_Fei['D']), **B2fa)\n return C3ST",
"def a7Lb():\n return s3br(AaDq(_Fei['D']))",
"def a7Lb(jTqs=10):\n C3ST = s3br(_Fei['vgg16'], jTqs)\n return C3ST",
"def ZsU2():\n return s3br(AaDq(_Fei['B']))",
"def RgJ2():\n S1uA = HxRh(weights='imagenet', inc... | [
"0.80484545",
"0.7963523",
"0.7828341",
"0.77828956",
"0.77137625",
"0.7700469",
"0.7620245",
"0.7620245",
"0.76175076",
"0.75696766",
"0.7567835",
"0.7567835",
"0.7567835",
"0.75562996",
"0.7537512",
"0.75128955",
"0.7495363",
"0.74771565",
"0.7470964",
"0.7464421",
"0.74412... | 0.0 | -1 |
Sets the is_currency of this NumericVariableInfo. | def BEWx(YKHO, BEWx):
YKHO._is_currency = BEWx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c2fa(YKHO, VIXL):\n bIdP = None\n try:\n YKHO.logger.info('Start: set currency')\n YKHO._ixconnect_page.set_currency(VIXL)\n bIdP = True\n except FxK5 as exp:\n bIdP = False\n YKHO.logger.error(kLQb.msg)\n raise\n finally:\n YKHO.logger.info('End: se... | [
"0.61597705",
"0.59552675",
"0.5943739",
"0.5943739",
"0.5943739",
"0.5943739",
"0.5943739",
"0.5943739",
"0.5943739",
"0.5943739",
"0.5831295",
"0.5829609",
"0.5829609",
"0.58200306",
"0.5778658",
"0.5693335",
"0.55792904",
"0.5549715",
"0.5512296",
"0.548423",
"0.54009944",... | 0.78469104 | 0 |
Returns the string representation of the model | def gTzM(YKHO):
return CgYo.pformat(YKHO.to_dict()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return YKHO.text",
"def zAg0(YKHO):\n oOUF = '-----------------------------------------------------------------------------------\\n'\n _2sc = YKHO.__class__.__name__\n oOUF += '\\t\\... | [
"0.86418265",
"0.85103965",
"0.7853324",
"0.77442306",
"0.7712258",
"0.76979405",
"0.765959",
"0.7637644",
"0.76218504",
"0.7607561",
"0.7606604",
"0.7606604",
"0.7606604",
"0.75990754",
"0.7585653",
"0.758149",
"0.7570811",
"0.7567585",
"0.75392604",
"0.75392604",
"0.7527967... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
if not isinstance(Elif, gO10):
return True
return YKHO.to_dict() != Elif.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif: object):\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif):\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(... | [
"0.8392633",
"0.8354901",
"0.82950056",
"0.8132309",
"0.81149805",
"0.8099986",
"0.809911",
"0.8097883",
"0.8097883",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8092252",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8085141",
"0.8066694",
"0.80594814",
"0.805757",
... | 0.0 | -1 |
Determines how unlikely it is that given a total sample of N elements with K elements of a specific type, a random subsample of n elements contains k elements of the specific type. Returns a value between 0 and 1, where 1 indicates very unlikely and 0 very likely. If the subsample is truly drawn in a random way from th... | def mdew(ywwl, nMvt, exwG, G1Hx):
if exwG == 0 or nMvt == 0:
return XTiz.random.uniform()
yY4h = Bw2D(ywwl, nMvt, exwG)
X90y = RUdM(ywwl, nMvt, exwG)
IW3V = Zxt2.stats.hypergeom.pmf(G1Hx, ywwl, nMvt, exwG)
Aofo = IW3V * XTiz.random.uniform()
JxU2 = IW3V
if 2 * nMvt == ywwl:
f... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d_r6(j_9h, Hqul: np.random.Generator):\n j_9h = oyIN.asarray(j_9h)\n TP8q = oyIN.cumsum(j_9h)\n return oyIN.argmax(TP8q > Hqul.random())",
"def d_r6(j_9h, Hqul):\n j_9h = oyIN.asarray(j_9h)\n TP8q = oyIN.cumsum(j_9h)\n return (TP8q > Hqul.rand()).argmax()",
"def d_r6(j_9h, Hqul):\n j_9... | [
"0.6643834",
"0.64901054",
"0.64901054",
"0.64901054",
"0.646074",
"0.6417865",
"0.63114893",
"0.6235009",
"0.5866104",
"0.57693166",
"0.5767105",
"0.5764405",
"0.57453424",
"0.57285696",
"0.5719547",
"0.57184756",
"0.5713653",
"0.5713653",
"0.5706009",
"0.57039595",
"0.56758... | 0.6815444 | 0 |
Build tvm func, update self._func inplace. | def Cc7Y(YKHO, oLiS, H4RT, WzEX):
if YKHO._num_col_partitions > 1:
i_sX = YKHO._compute_func(*oLiS, YKHO._adj_s1_pos_placeholder, YKHO._adj_s1_idx_placeholder, YKHO._adj_vals_placeholder, YKHO._adj_d1_size, YKHO._adj_d2_size, **H4RT)
KCHu = YKHO._schedule_func(i_sX, **WzEX)
YKHO._func = fnfy... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Cc7Y(YKHO, JfyU):\n return eval('self.%s()' % JfyU)",
"def gJhe(YKHO):\n bo34.info('Update Target Func')\n h0Io._update_target_func(YKHO.target_v_func, YKHO.v_func)\n h0Io._update_target_func(YKHO.target_q_func, YKHO.q_func)\n h0Io._update_target_func(YKHO.target_p_func, YKHO.p_func)",
"def ... | [
"0.62498873",
"0.6072919",
"0.6044408",
"0.58255786",
"0.58199006",
"0.57005996",
"0.5686778",
"0.56643397",
"0.5565158",
"0.5544243",
"0.55257714",
"0.55085343",
"0.5499572",
"0.5479678",
"0.54780513",
"0.5476841",
"0.5469193",
"0.5458437",
"0.54483795",
"0.54264027",
"0.539... | 0.51852226 | 32 |
Randomly jitter points. jittering is per point. | def cnD_(J1hN, WTkW=0.005, vJPk=0.02, Wqqk=False):
tjUW, ywwl, Nq1b = J1hN.shape
assert vJPk > 0
Fpx_ = 2 if Wqqk else 3
WLXc = oyIN.clip(WTkW * oyIN.random.randn(tjUW, ywwl, Nq1b, dtype=J1hN.dtype), -vJPk, vJPk)
WLXc[:, :, Fpx_:] = 0
WLXc += J1hN
return WLXc | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bHg_(YKHO, aM8h=1.0):\n for YFMp in YKHO.stars:\n YFMp.x += tuKI.uniform(-0.1, 0.1) * aM8h\n YFMp.y += tuKI.uniform(-0.1, 0.1) * aM8h",
"def bHg_(WKvO, Mkmy=0.1):\n return WKvO + oyIN.random.rand(*WKvO.shape) * oyIN.std(WKvO)[None, :] * Mkmy",
"def bHg_(VOlW, aM8h):\n return VOlW + V... | [
"0.75472695",
"0.7410611",
"0.7287109",
"0.694834",
"0.6911661",
"0.68838114",
"0.68357635",
"0.6556249",
"0.6437521",
"0.63828707",
"0.63305485",
"0.6319276",
"0.6313966",
"0.6290827",
"0.61949134",
"0.61942804",
"0.619288",
"0.6158329",
"0.6111379",
"0.6110583",
"0.6109834"... | 0.0 | -1 |
Returns the URL that resulted in this response | def bD7m(YKHO) -> str:
return YKHO._internal_response.request.url | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bD7m(YKHO) -> str:\n return str(YKHO._response.url)",
"def hKhs(YKHO):\n return YKHO._current_response.url",
"def bD7m(YKHO) -> str:\n return YKHO._last_response.url",
"def bD7m(YKHO) -> str:\n return str(YKHO.response.url)",
"def bD7m(YKHO):\n return YKHO.response['links']['self']",
"... | [
"0.86364096",
"0.86214244",
"0.86151457",
"0.85615915",
"0.85099363",
"0.83529615",
"0.8339547",
"0.8339547",
"0.8303511",
"0.8291251",
"0.82823384",
"0.82823384",
"0.82823384",
"0.82823384",
"0.82823384",
"0.8276684",
"0.8264625",
"0.8249555",
"0.8247515",
"0.8221935",
"0.82... | 0.85541725 | 4 |
Iterate over the bytes in the response stream | def Ol8I(YKHO, ztRo: int=None) -> bDy6[bytes]:
try:
ztRo = len(YKHO._content) if ztRo is None else ztRo
for YRbF in range(0, len(YKHO._content), ztRo):
yield YKHO._content[YRbF:YRbF + ztRo]
except AttributeError:
for QCcJ in YKHO.iter_raw(chunk_size=ztRo):
yield Q... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xRBH(YKHO, **bGrB) -> bDy6[bytes]:\n YKHO._validate_streaming_access()\n B0VQ = YKHO._internal_response.stream_download(None)\n for QCcJ in B0VQ:\n YKHO._num_bytes_downloaded += len(QCcJ)\n yield QCcJ\n YKHO._close_stream()",
"async def iter_raw(YKHO, **bGrB) -> bDy6[bytes]:\n YK... | [
"0.77232677",
"0.757265",
"0.7422902",
"0.72791284",
"0.7214319",
"0.7167088",
"0.7064198",
"0.70464367",
"0.69828534",
"0.6897639",
"0.6811943",
"0.6795495",
"0.67742306",
"0.6751638",
"0.6738013",
"0.6737834",
"0.6692017",
"0.66869354",
"0.6544702",
"0.6523798",
"0.64710194... | 0.58924764 | 74 |
Iterate over the bytes in the response stream | async def iter_bytes(YKHO, ztRo: int=None) -> bDy6[bytes]:
try:
ztRo = len(YKHO._content) if ztRo is None else ztRo
for YRbF in range(0, len(YKHO._content), ztRo):
yield YKHO._content[YRbF:YRbF + ztRo]
except AttributeError:
async for QCcJ in YKHO.iter_raw(chunk_size=ztRo):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xRBH(YKHO, **bGrB) -> bDy6[bytes]:\n YKHO._validate_streaming_access()\n B0VQ = YKHO._internal_response.stream_download(None)\n for QCcJ in B0VQ:\n YKHO._num_bytes_downloaded += len(QCcJ)\n yield QCcJ\n YKHO._close_stream()",
"async def iter_raw(YKHO, **bGrB) -> bDy6[bytes]:\n YK... | [
"0.77232677",
"0.757265",
"0.7422902",
"0.72791284",
"0.7214319",
"0.7167088",
"0.7064198",
"0.70464367",
"0.69828534",
"0.6897639",
"0.6811943",
"0.6795495",
"0.67742306",
"0.6751638",
"0.6738013",
"0.6737834",
"0.6692017",
"0.66869354",
"0.6544702",
"0.6523798",
"0.64710194... | 0.60711604 | 55 |
Compute the intersection of two sorted lists. Returns a new sorted list containing only elements that are in both list1 and list2. This function can be iterative. tedious way list3 = [] | def XMlP(Kt9y, I_KI):
Aofo = []
for U6D_ in Kt9y:
if U6D_ in I_KI:
Aofo.append(U6D_)
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zVQj(Kt9y, I_KI):\n return sorted(list(set(Kt9y) & set(I_KI)))",
"def zVQj(Kt9y, I_KI):\n return sorted(list(set(Kt9y) & set(I_KI)))",
"def XMlP(Kt9y, I_KI):\n return [WKvO for WKvO in Kt9y if WKvO in I_KI]",
"def XMlP(Kt9y, I_KI):\n jVU_ = []\n for vASe in Kt9y:\n for OQAR in I_KI:... | [
"0.8599384",
"0.8498434",
"0.83025193",
"0.82919556",
"0.8267696",
"0.82605696",
"0.8248003",
"0.8229354",
"0.8120643",
"0.8103696",
"0.8093802",
"0.8086692",
"0.80745876",
"0.8040229",
"0.80337703",
"0.80266154",
"0.80203307",
"0.7998671",
"0.7985916",
"0.7966952",
"0.795319... | 0.8260459 | 6 |
3x3 convolution with padding | def Myly(UUZO, sYyA, _0fC=1):
return U78l.Conv2d(UUZO, sYyA, kernel_size=3, stride=_0fC, padding=1, bias=False) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sx6c(input, KUnM, FEri, dvgN, wH3T='NHWC', mJgj=1, mWFP=None):\n return o6Bz(**locals())",
"def Myly(UUZO, sYyA, _0fC=1, moMn=1, ivFb=1):\n return U78l.Conv2d(UUZO, sYyA, kernel_size=3, stride=_0fC, padding=0, groups=moMn, bias=False, dilation=ivFb)",
"def DO8L(WKvO, yzQ0, UP6E=[0, 0, 0], FEri=[1, 1,... | [
"0.78404945",
"0.7541354",
"0.753996",
"0.7491138",
"0.7434801",
"0.74207747",
"0.73415834",
"0.7320252",
"0.7299599",
"0.7287539",
"0.72799367",
"0.72799367",
"0.7257735",
"0.7226928",
"0.72204214",
"0.7214909",
"0.7214909",
"0.7210775",
"0.7198222",
"0.71639067",
"0.7161914... | 0.70801866 | 85 |
Get the docstring title out of a given story. | def T5Dk(A0Gq):
JBZA = A0Gq.__doc__
if JBZA:
return JBZA.strip().splitlines()[0]
return '' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EDnj(A97Q):\n Beie = A97Q.strip().split('\\n')\n leAC = Beie[0]\n return leAC",
"def ckOe(ReUu: Node) -> h8nf[str]:\n if ReUu:\n for leAC in ReUu.traverse(Ziit.title):\n return leAC.astext()\n return None",
"def Upwb(l3QS):\n return OfZp(l3QS.title)",
"def Upwb(A97Q):\... | [
"0.69688314",
"0.68630195",
"0.65335006",
"0.6483457",
"0.6326763",
"0.6290351",
"0.6287845",
"0.625118",
"0.61494505",
"0.6138838",
"0.61162174",
"0.60950845",
"0.6071458",
"0.6066024",
"0.606153",
"0.6052158",
"0.60499734",
"0.60147107",
"0.60032034",
"0.60027915",
"0.59991... | 0.7258007 | 0 |
Implements Python iterator interface. This should return an object implementing a `next` method which steps through a sequence returning one element at a time and raising `StopIteration` when at the end of the sequence. Here the object returned is the DataProvider itself. | def Vs4Q(YKHO):
return YKHO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UDAb(YKHO):\n if YKHO.itercount >= len(YKHO.data):\n raise StopIteration\n rKoN = list(YKHO.data)[YKHO.itercount]\n YKHO.itercount += 1\n return YKHO.data[rKoN]",
"def UDAb(YKHO):\n if YKHO._curr_iter is None:\n raise StopIteration\n CO4T = YKHO._curr_iter.data\n YKHO._curr... | [
"0.7515613",
"0.7323967",
"0.7263544",
"0.7029923",
"0.6956973",
"0.69161314",
"0.67824084",
"0.6764079",
"0.6764079",
"0.6764079",
"0.6764079",
"0.67501515",
"0.67351896",
"0.6725994",
"0.6725994",
"0.66810656",
"0.66439897",
"0.6634977",
"0.66261715",
"0.6616157",
"0.661557... | 0.0 | -1 |