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 |
|---|---|---|---|---|---|---|
Perform a single decoder step (1 word) prev_embed (batch_size x 1 x hidden_size) is the forward hidden state of the previous time step encoder_hidden (batch_size x seq_len x num_directionshidden_size) is the output of the encoder | def RHoK(YKHO, BQas, r5GU, xZIv, CJhb, Zode):
xDcj = Zode[0][-1].unsqueeze(1)
QpfX, wNsH = YKHO.attention(query=xDcj, proj_key=CJhb, value=r5GU, mask=xZIv)
WLXo = ht2j.cat([BQas, QpfX], dim=2)
hlel, Zode = YKHO.rnn(WLXo, Zode)
V_vq = ht2j.cat([BQas, hlel, QpfX], dim=2)
V_vq = YKHO.dropout_layer(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Zqfm(A83q, DQ_M, zFZ6, Vp66, Sy8o, RLZ8, sMyr):\n Vuv8 = ZylS.contrib.seq2seq.TrainingHelper(zFZ6, Vp66)\n fe9x = ZylS.contrib.seq2seq.BasicDecoder(DQ_M, Vuv8, A83q, RLZ8)\n a78i, bGrB, bGrB = ZylS.contrib.seq2seq.dynamic_decode(fe9x, maximum_iterations=Sy8o)\n return a78i",
"def KVH6(YKHO, Lb6x,... | [
"0.6969199",
"0.6780015",
"0.6675828",
"0.6631871",
"0.6631257",
"0.6518986",
"0.6500232",
"0.64466816",
"0.6433351",
"0.6405943",
"0.6390436",
"0.633874",
"0.6307271",
"0.6290631",
"0.62883985",
"0.62649786",
"0.62553316",
"0.6223786",
"0.61469346",
"0.6134336",
"0.60945153"... | 0.73808 | 0 |
Unroll the decoder one step at a time. trg_embed is (batch_len x trg_max_seq_len x hidden_layer_size) encoder_hidden is (batch_len x src_max_seq_len x num_directionshidden_layer_size) encoder_final is a tuple of final hidden and final cell state. each state is (num_layers x batch x num_directionshidden_layer_size) src_... | def KVH6(YKHO, Lb6x, r5GU, uYRw, xZIv, pU63, Zode=None, wzH_=None):
if wzH_ is None:
wzH_ = Lb6x.size(1)
if Zode is None:
Zode = YKHO.init_hidden(uYRw)
CJhb = YKHO.attention.key_layer(r5GU)
JfYO = []
v1aI = []
for YRbF in range(wzH_):
BQas = Lb6x[:, YRbF].unsqueeze(1)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def x8I_(YKHO):\n Fu9e = X6a0(shape=YKHO.input_decoder_shape, batch_shape=YKHO.input_batch_decoder_shape)\n GFjh = X6a0(shape=YKHO.input_ppg_shape, batch_shape=YKHO.input_batch_ppg_shape)\n if YKHO.hparams.Masking is True:\n lIew = NUkC(mask_value=0)(Fu9e)\n vIxY = NUkC(mask_value=0)(GFjh)\n... | [
"0.70889604",
"0.6934026",
"0.67979854",
"0.6792283",
"0.67251056",
"0.66641283",
"0.66246325",
"0.65491724",
"0.6515589",
"0.6503188",
"0.6498985",
"0.6467742",
"0.6402877",
"0.63937545",
"0.634613",
"0.63212204",
"0.6301298",
"0.62883705",
"0.6271386",
"0.62639296",
"0.6234... | 0.8374908 | 0 |
Sets the host_name of this ServiceStatus. | def GT6L(YKHO, GT6L):
YKHO._host_name = GT6L | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ayrW(YKHO, ayrW):\n YKHO._hostname = ayrW",
"def ayrW(YKHO, ayrW):\n YKHO._hostname = ayrW",
"def aNy3(YKHO, ayrW):\n raise NotImplementedError()",
"def KcEq(YKHO, KcEq: str):\n YKHO._host = KcEq",
"def ayrW(YKHO, ayrW):\n YKHO._hostname = ayrW\n return YKHO",
"def KcEq(YKHO, KcEq):... | [
"0.67096794",
"0.67096794",
"0.66622794",
"0.65415365",
"0.6456235",
"0.6440934",
"0.6440934",
"0.6440934",
"0.6440934",
"0.64354765",
"0.63991666",
"0.6360109",
"0.6351895",
"0.63264483",
"0.63041633",
"0.62698",
"0.6248818",
"0.6149412",
"0.61444885",
"0.6125043",
"0.596784... | 0.78330445 | 1 |
Sets the request_count of this ServiceStatus. | def T5kv(YKHO, T5kv):
YKHO._request_count = T5kv | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def i2VU(YKHO, UHFx):\n YKHO._count = UHFx",
"def ZF4Q(YKHO, mLGw):\n YKHO.count = mLGw",
"def oB1h(YKHO, type):\n if type not in YKHO._requests_count:\n YKHO._requests_count[type] = 0\n YKHO._requests_count[type] += 1",
"def Rodg(YKHO, Rodg):\n YKHO._processor_count = Rodg",
"def i2V... | [
"0.61143875",
"0.6090169",
"0.60757643",
"0.5920229",
"0.580981",
"0.57419944",
"0.56955624",
"0.56955624",
"0.56955624",
"0.56955624",
"0.5691956",
"0.5671192",
"0.5636765",
"0.56350935",
"0.56350935",
"0.5632811",
"0.562519",
"0.5617782",
"0.5617782",
"0.55696195",
"0.55079... | 0.81824696 | 0 |
Sets the max_memory_mb of this ServiceStatus. | def PH89(YKHO, PH89):
YKHO._max_memory_mb = PH89 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Xu0u(YKHO, poLx: int) -> None:\n YKHO.set_db_conf('maxmemory', poLx)",
"def vJrH(YKHO, Z3sz):\n gTEQ('PrlDispCfg_SetMaxVmMem', YKHO.handle, Z3sz)",
"def MnAp(YKHO, MnAp):\n YKHO._max_mb_ram_per_machine = MnAp",
"def y_yk(YKHO, y_yk):\n YKHO._maximum_size = y_yk",
"def guDs(YKHO, zYFS):\n ... | [
"0.7073272",
"0.7004983",
"0.6462245",
"0.6370692",
"0.63446045",
"0.63059026",
"0.6232075",
"0.617325",
"0.6105947",
"0.6081569",
"0.60103244",
"0.59372926",
"0.59331614",
"0.5927879",
"0.5899012",
"0.5885115",
"0.5861812",
"0.5763049",
"0.57599",
"0.57453775",
"0.5719504",
... | 0.81979513 | 0 |
Sets the max_concurrent_requests of this ServiceStatus. | def f8s7(YKHO, f8s7):
YKHO._max_concurrent_requests = f8s7 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GgFO(YKHO, hCYT):\n r6CV.blpapi_SessionOptions_setMaxPendingRequests(YKHO.__handle, hCYT)",
"def ZRWI(YKHO, ZRWI):\n YKHO._concurrent_requests = ZRWI",
"def HtKx(YKHO, dMgr):\n YKHO.max_eval_concurrency = dMgr",
"def _bVc(YKHO, _bVc):\n YKHO._limit_num_clients = _bVc",
"def IVSx(YKHO, ekCf,... | [
"0.67567164",
"0.6361955",
"0.59952843",
"0.57208276",
"0.56680435",
"0.56667686",
"0.5640322",
"0.55707616",
"0.5503928",
"0.5464154",
"0.5450268",
"0.54443735",
"0.54264",
"0.5422357",
"0.5411949",
"0.5378406",
"0.5376556",
"0.5368424",
"0.5341753",
"0.5307853",
"0.5299601"... | 0.8375866 | 0 |
Sets the total_rejected_requests of this ServiceStatus. | def mGOf(YKHO, mGOf):
YKHO._total_rejected_requests = mGOf | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UT6f(YKHO, UT6f):\n YKHO._total_blocked_requests = UT6f",
"def g6LB(YKHO, g6LB):\n YKHO._total_failed_per_group = g6LB",
"def w0O5(YKHO, xsiM):\n return YKHO.get_unaccepted_event_requests(xsiM).__len__()",
"def L1lt(YKHO, L1lt):\n YKHO._total_damage_taken = L1lt",
"def GgFO(YKHO, hCYT):\n ... | [
"0.7080497",
"0.5535078",
"0.55186355",
"0.5461105",
"0.53644174",
"0.5330559",
"0.5257207",
"0.5160343",
"0.5119552",
"0.5104305",
"0.50554967",
"0.5015153",
"0.49821526",
"0.49313498",
"0.48860386",
"0.48786807",
"0.4848378",
"0.47964743",
"0.4773091",
"0.47444278",
"0.4735... | 0.8934723 | 0 |
Sets the total_blocked_requests of this ServiceStatus. | def UT6f(YKHO, UT6f):
YKHO._total_blocked_requests = UT6f | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mGOf(YKHO, mGOf):\n YKHO._total_rejected_requests = mGOf",
"def Aps6(YKHO, BWXx: int=None):\n if BWXx == 0:\n raise ValueError('You really want to increment of 0?')\n if BWXx is None:\n YKHO.test_run.actual += 1\n YKHO.test_run.blocked += 1\n else:\n YKHO.test_run.actu... | [
"0.6566967",
"0.5396077",
"0.5297246",
"0.52390385",
"0.51381385",
"0.51212424",
"0.5116383",
"0.5092819",
"0.50399786",
"0.49869522",
"0.4946165",
"0.49331447",
"0.4909148",
"0.48940417",
"0.48823512",
"0.4861306",
"0.48602244",
"0.48420015",
"0.48412412",
"0.48167238",
"0.4... | 0.8625694 | 0 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, YRgt):
return False
return YKHO.to_dict() == Elif.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
if not isinstance(Elif, YRgt):
return True
return YKHO.to_dict() != Elif.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)",
"def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)",
... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
... | 0.0 | -1 |
'''SQL column builder. from functools import wraps A helper for building column list in SQL syntax from python dict. | def sLny(nPrm=None):
jbXL = []
for H5ew, BWXx in nPrm.iteritems():
if isinstance(BWXx, exCv):
jbXL.append("{key}='{value}'".format(key=H5ew, value=BWXx))
else:
jbXL.append('{key}={value}'.format(key=H5ew, value=BWXx))
EWwv = ', '.join(jbXL)
return EWwv | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YfzM(YKHO, JTgH):\n Aofo = ''\n Had7 = 0\n for LihS in JTgH:\n if Had7 == 0:\n Aofo += '%s' % LihS\n else:\n Aofo += ', %s' % LihS\n Had7 += 1\n return Aofo",
"def W8Kq(zEW0):\n gjyy = ' \"%s\"' % zEW0['name']\n if zEW0['extra'] == 'auto_increment'... | [
"0.67807853",
"0.66856354",
"0.65132517",
"0.64714044",
"0.6190388",
"0.6172441",
"0.61274326",
"0.6062334",
"0.5939377",
"0.5905875",
"0.58950096",
"0.58154285",
"0.581016",
"0.58065414",
"0.580445",
"0.5800673",
"0.57771593",
"0.57626414",
"0.5741479",
"0.57309246",
"0.5730... | 0.8546293 | 0 |
Check if two Region instances are equal. | def xa14(YKHO, Elif):
return YKHO._region == Elif._region | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n if not isinstance(Elif, kPqw):\n return False\n return YKHO.__dict__ == Elif.__dict__",
"def vTRD(*qIxc, **B2fa):\n return nAU3.Region_IsEqual(*qIxc, **B2fa)",
"def xa14(YKHO, Elif):\n if isinstance(Elif, WG0D):\n return YKHO.country_code == Elif.country_code a... | [
"0.7864402",
"0.7787087",
"0.75920194",
"0.74086547",
"0.7237488",
"0.66368544",
"0.6634616",
"0.65976477",
"0.659385",
"0.658856",
"0.65766656",
"0.65721995",
"0.65358686",
"0.65358686",
"0.6526185",
"0.64969856",
"0.6484689",
"0.64641416",
"0.64622414",
"0.64618933",
"0.644... | 0.825039 | 0 |
Check if two Gene instances are equal. | def xa14(YKHO, Elif):
return YKHO._dna == Elif._dna and YKHO._exons == Elif._exons | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n for Oa1e in range(len(YKHO.genes)):\n if YKHO.genes[Oa1e].value != Elif.genes[Oa1e].value:\n return False\n return True",
"def xa14(YKHO, Elif):\n if YKHO.environment != Elif.environment:\n return False\n for YRbF in range(0, len(YKHO.genes)):\n ... | [
"0.7819744",
"0.75125605",
"0.69709164",
"0.69576013",
"0.6909625",
"0.6874633",
"0.6785772",
"0.6766592",
"0.6696838",
"0.66950536",
"0.66942203",
"0.66814595",
"0.66709864",
"0.66570055",
"0.66462976",
"0.6591731",
"0.6591731",
"0.6591731",
"0.6591483",
"0.65827036",
"0.657... | 0.7268082 | 2 |
Constructs and returns a test suite of cases from all test modules defined in this module's __all__ variable. | def NxB3():
i8WE = DuvM.TestSuite()
for Niws in Q1nc:
r8hN = ANWz.import_module('pyroclast.test.' + Niws)
for exwG in dir(r8hN):
Z9rn = getattr(r8hN, exwG)
if SV4_(Z9rn):
KCHu = DuvM.TestLoader().loadTestsFromTestCase(Z9rn)
i8WE.addTests(KC... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NxB3():\n RRlC = SC2F.glob(Hy7s.path.join(Hy7s.path.dirname(Hy7s.path.abspath(tq_1.getfile(tq_1.currentframe()))), 'test*.py'))\n RRlC = [Hy7s.path.splitext(Hy7s.path.basename(WFmf))[0] for WFmf in RRlC]\n KZ52 = []\n for yR_P in RRlC:\n try:\n yR_P = __import__(yR_P, globals(), l... | [
"0.78410727",
"0.7657286",
"0.7657286",
"0.7582346",
"0.75773495",
"0.7544948",
"0.74069035",
"0.74026066",
"0.73379177",
"0.7321415",
"0.73033285",
"0.726702",
"0.7266676",
"0.7262271",
"0.7256015",
"0.7245873",
"0.7235659",
"0.72243345",
"0.72036093",
"0.7196796",
"0.717564... | 0.85730284 | 0 |
Loads image from meta.img_path. Assigns the image to the field img of the same meta instance. | def BVZ5(AdfU):
kx9H = open(AdfU[0], 'rb').read()
if not kx9H:
raise Exception('image not read, path=%s' % AdfU[0])
ezWE = oyIN.fromstring(kx9H, oyIN.uint8)
VXjJ = XC5k.imdecode(ezWE, XC5k.IMREAD_COLOR)
AdfU[1], AdfU[2] = VXjJ.shape[:2]
AdfU[10] = VXjJ
return AdfU | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YlVO(YKHO, VXjJ):\n YKHO.img = VXjJ",
"def DZ0a(YKHO, **B2fa):\n ...",
"def kbTQ(YKHO, UXMV):\n YKHO.p2_label_img.configure(image=UXMV)\n YKHO.p2_label_img.image = UXMV",
"def KIFJ(YKHO, pmON):\n LNo8 = YKHO._load_image(pmON)\n YKHO.image_raw = LNo8\n YKHO.image = MqIY.PhotoImage(LNo... | [
"0.65896696",
"0.65654665",
"0.6556515",
"0.65114117",
"0.6465773",
"0.64174324",
"0.64172107",
"0.63148886",
"0.6219367",
"0.6163937",
"0.6163144",
"0.6103026",
"0.60713416",
"0.6067176",
"0.60460585",
"0.6040969",
"0.6030812",
"0.6013024",
"0.60048234",
"0.59502465",
"0.591... | 0.0 | -1 |
Helper function to create a stack of scaled down mask. | def ePFd(ZHfW, mLGw, _0fC):
SnCn = 1.0 / _0fC
nHh9 = XC5k.resize(ZHfW, (0, 0), fx=SnCn, fy=SnCn, interpolation=XC5k.INTER_CUBIC)
nHh9 = nHh9[:, :, oyIN.newaxis]
return oyIN.repeat(nHh9, mLGw, axis=2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Qkhw(Xn71, KS95, ZHfW, oUSw, KndY, NXpY):\n MKlR, yzQ0, Z9rn = Xn71.shape\n if NXpY > 1:\n ''\n C_tw = (NXpY - 1.0) * yzQ0\n d1KI = (NXpY - 1.0) * MKlR\n ai_K = int(oyIN.random.uniform() * C_tw)\n hmgX = int(oyIN.random.uniform() * d1KI)\n Xn71 = XC5k.resize(Xn71... | [
"0.6273027",
"0.594023",
"0.59224164",
"0.58978224",
"0.5841739",
"0.58046967",
"0.57616365",
"0.5736646",
"0.56548226",
"0.5598127",
"0.55944496",
"0.55847204",
"0.5582744",
"0.55684257",
"0.5530907",
"0.5479517",
"0.54603654",
"0.54520875",
"0.5434665",
"0.54328823",
"0.543... | 0.6056436 | 1 |
Saves the game, agents, and optimizer states to the checkpointing path under `.tar` name | def IRyE(YKHO, mWFP=''):
YKHO.checkpoint_path.mkdir(exist_ok=True)
if mWFP:
pmON = YKHO.checkpoint_path / f'{mWFP}_{YKHO.epoch}.tar'
else:
pmON = YKHO.checkpoint_path / f'{YKHO.epoch}.tar'
ht2j.save(YKHO.get_state(), pmON) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IRyE(qIxc, QTBn, xWf0, Ux0P='checkpoint.pth.tar'):\n AGPF = 'runs/%s-net/' % qIxc.name\n if not Hy7s.path.exists(AGPF):\n Hy7s.makedirs(AGPF)\n qtWj = QTBn['epoch']\n Ux0P = AGPF + Ux0P\n ht2j.save(QTBn, Ux0P)\n if xWf0:\n RDuA.copyfile(Ux0P, 'runs/%s-net/' % qIxc.name + 'model_... | [
"0.7547621",
"0.75138193",
"0.74672616",
"0.74232984",
"0.74192643",
"0.740148",
"0.7398397",
"0.7343494",
"0.7317097",
"0.73160833",
"0.72893983",
"0.71876013",
"0.7154306",
"0.714963",
"0.71022433",
"0.70916885",
"0.7041963",
"0.7019319",
"0.7006334",
"0.7002361",
"0.697886... | 0.737383 | 7 |
Compute the origin of a shot. | def yCgu(YCSJ) -> oyIN.ndarray:
shtX = bQDx.Pose([YCSJ.rx, YCSJ.ry, YCSJ.rz], [YCSJ.tx, YCSJ.ty, YCSJ.tz])
return shtX.get_origin() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Wkq0(YKHO):\n return YKHO.coord_cls(x=0, y=0, system=YKHO)",
"def Wkq0(YKHO):\n return YKHO.coord_cls(x=0, y=0, z=0, system=YKHO)",
"def hLRM(YKHO):\n return (YKHO.ox, YKHO.oy, YKHO.oz)",
"def Wkq0(YKHO):\n return YKHO.zero",
"def LO3q(YKHO, WKvO, LVAh):\n return DhiK(YKHO.x - WKvO, YKHO... | [
"0.74015635",
"0.7379656",
"0.7343961",
"0.711925",
"0.69956106",
"0.68915874",
"0.682126",
"0.6772908",
"0.6751326",
"0.66870844",
"0.6634526",
"0.6619875",
"0.65981114",
"0.6572752",
"0.6499958",
"0.6499958",
"0.6499958",
"0.6374626",
"0.6367334",
"0.6319005",
"0.6284699",
... | 0.77475744 | 0 |
Fetch all files for a sample from a version that are tagged with any of the sample tags. | def Rswt(YKHO, Uh1n: Version, B85K: str) -> iu5r[GkAb]:
o1P6: fnT7
for o1P6 in Uh1n.files:
if not YKHO.include_file_sample(o1P6, sample_id=B85K):
continue
yield GkAb(o1P6.full_path) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gGRV(YKHO, TZ9E, iumf):\n nPrm = YKHO.get_tags_batch([TZ9E], iumf)\n Aofo = []\n for Csk6 in nPrm:\n Csk6.pop('SourceFile')\n Aofo.append(next(iter(Csk6.values()), None))\n return Aofo",
"def u80r(YKHO, boHx, g7pl, dir):\n loAy = []\n OT6c = []\n for ii0O in un40.reversed_u... | [
"0.59716314",
"0.59647614",
"0.5958345",
"0.5894525",
"0.5866366",
"0.57679766",
"0.5709461",
"0.55495083",
"0.55262893",
"0.5504375",
"0.5458664",
"0.54581875",
"0.540898",
"0.53510624",
"0.5348459",
"0.5347458",
"0.5322054",
"0.53116226",
"0.52435493",
"0.5232899",
"0.52006... | 0.62420756 | 0 |
Set the customer_id for this upload | def KvXk(YKHO, J8Aq: Family) -> None:
YKHO._set_customer_id(J8Aq.customer.internal_id) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def di0Y(YKHO, di0Y: str):\n YKHO._customer_id = di0Y",
"def di0Y(YKHO, di0Y):\n YKHO._customer_id = di0Y",
"def di0Y(YKHO, di0Y):\n YKHO._customer_id = di0Y",
"def di0Y(YKHO, di0Y):\n YKHO._customer_id = di0Y",
"def di0Y(YKHO, di0Y):\n YKHO._customer_id = di0Y",
"def uPN9(YKHO, uPN9):\n ... | [
"0.8187232",
"0.8090406",
"0.8090406",
"0.8090406",
"0.8090406",
"0.7372197",
"0.7100708",
"0.7050809",
"0.7050809",
"0.694933",
"0.694933",
"0.67336524",
"0.66792417",
"0.66611135",
"0.66329956",
"0.65690595",
"0.6565796",
"0.640496",
"0.6262492",
"0.6232912",
"0.6080381",
... | 0.7468703 | 5 |
A basic tokenizer to tokenize text into tokens | def yjEo(zFiD, ocBH=False):
wB2T = ZbWC.compile('\\d+')
V22M = []
s2mk = list(Hwkv.cut(zFiD.strip().lower()))
if ocBH:
for eOtH in s2mk:
r8hN = wB2T.search(eOtH)
if r8hN is None:
V22M.append(eOtH)
else:
V22M.append('_数字_')
e... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wr3U(l5Ny):\n yAmx = W66f(l5Ny)\n return yAmx.tokens()",
"def NfQC(l5Ny):\n return l5Ny",
"def EwIn(l5Ny):\n return N3rN(l5Ny)",
"def wr3U(l5Ny):\n ug3y = Dhdw.RegexpTokenizer(pattern='\\\\s+', gaps=True)\n s2mk = ug3y.tokenize(l5Ny)\n return s2mk",
"def wr3U(l5Ny):\n return l5N... | [
"0.80268854",
"0.7995472",
"0.7860666",
"0.78192043",
"0.77828735",
"0.77602094",
"0.7742723",
"0.7720027",
"0.76858824",
"0.76781535",
"0.7674793",
"0.76304036",
"0.7626671",
"0.7615727",
"0.7601826",
"0.7597635",
"0.75913364",
"0.75721973",
"0.75626993",
"0.7546677",
"0.752... | 0.0 | -1 |
Returns torch.utils.data.DataLoader for custom coco dataset. | def RuZU(tk5Y, pmON, w4ja, SZFh, Ep8u, hXNa, I7Gy):
mkHn = YSC3(root=tk5Y, csv=pmON, vocab_concept=w4ja, transform=SZFh)
zQKy = ht2j.utils.data.DataLoader(dataset=mkHn, batch_size=Ep8u, shuffle=hXNa, num_workers=I7Gy, collate_fn=QxcP)
return zQKy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def v30Z(YKHO) -> pVAc:\n hxDW = pVAc(YKHO.dataset, batch_size=1)\n return hxDW",
"def K1Op(YKHO) -> pVAc:\n return YKHO._custom_data_loader()",
"def TOre(__n6):\n if __n6 == 'chaos':\n return nOUK()\n return None",
"def RuZU(nPrm, qQXR, Ep8u, hXNa, I7Gy):\n __n6 = uUr5(nPrm, qQXR)\n... | [
"0.7068867",
"0.6700325",
"0.6609198",
"0.6598869",
"0.6422404",
"0.63506544",
"0.63122624",
"0.63081515",
"0.6259346",
"0.62435836",
"0.6241007",
"0.61782414",
"0.6158319",
"0.61521894",
"0.6139885",
"0.6126699",
"0.6124809",
"0.6089955",
"0.6081112",
"0.60792625",
"0.601715... | 0.67355895 | 1 |
A simple linear feedforward (affine) | def Fav1(WKvO, yzQ0, Fg_i):
ywwl = WKvO.shape[0]
hlel = WKvO.reshape([ywwl, -1]).dot(yzQ0) + Fg_i
wyyA = (WKvO, yzQ0, Fg_i)
return (hlel, wyyA) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Fav1(EcVT, XcU5, Fg_i):\n return oyIN.dot(EcVT, XcU5) + Fg_i",
"def Fav1(WKvO, yzQ0, Fg_i):\n yvT9 = oyIN.dot(WKvO, yzQ0) + Fg_i\n wyyA = (WKvO, yzQ0, Fg_i)\n return (yvT9, wyyA)",
"def Fav1(WKvO, XcU5, Fg_i):\n qn2n = oyIN.reshape(WKvO, (WKvO.shape[0], -1))\n yvT9 = oyIN.dot(qn2n, XcU5) ... | [
"0.73111427",
"0.7268895",
"0.70415723",
"0.7010928",
"0.69653493",
"0.69330513",
"0.68651676",
"0.6861124",
"0.6861066",
"0.6854439",
"0.6844228",
"0.68302107",
"0.67133963",
"0.67133963",
"0.67133963",
"0.67133963",
"0.6567666",
"0.64814675",
"0.6460504",
"0.64277875",
"0.6... | 0.6930279 | 6 |
Return the output tensor name for inference (transform). | def Dg0q(YKHO):
FmYO = 'output'
if len(YKHO['inference_output'].get_shape().as_list()) > 0:
FmYO = 'inference_output'
return FmYO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mWFP(YKHO):\n return YKHO._tf.name",
"def W0kj(vhpA):\n return TjL9(KuYZ(vhpA))",
"def KlOO(YKHO):\n TZ9E = ZbWC.sub('\\\\W+', '', YKHO.tag)\n if TZ9E:\n TZ9E = '_' + TZ9E\n return '%s_%s%s' % (YKHO.dtype, '_'.join((str(WKvO) for WKvO in YKHO.shape)), TZ9E)",
"def JUlY(RCEU, rDxt):\... | [
"0.71943957",
"0.6838516",
"0.6792948",
"0.67437446",
"0.6703312",
"0.66152024",
"0.6613341",
"0.65301657",
"0.64931595",
"0.6359819",
"0.63123155",
"0.62659276",
"0.6231458",
"0.62231416",
"0.6192364",
"0.61825097",
"0.6157697",
"0.61337495",
"0.6102408",
"0.6102408",
"0.610... | 0.8008316 | 0 |
Returns whether or not we can load. | def t_r3(YKHO, YPaw: 'TensorflowV1ModelStep', QpfX: 'ExecutionContext'):
KZDC = Hy7s.path.exists(Hy7s.path.join(QpfX.get_path(), '{0}.ckpt.meta'.format(YPaw.get_name())))
riSZ = Hy7s.path.exists(Hy7s.path.join(QpfX.get_path(), '{0}.ckpt.index'.format(YPaw.get_name())))
return KZDC and riSZ | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def t_r3(Emd4, Ux0P):\n return False",
"def uLvE(YKHO):\n return 'load' in YKHO.__class__.__dict__",
"def t_r3(YKHO):\n try:\n return YKHO._get_nearest_entry_with_artifact() is not None\n except LWf3 as e:\n YKHO._raise_state_error_with_explanation(tTpl)",
"def t_r3():\n return h... | [
"0.81307876",
"0.7544025",
"0.754182",
"0.723258",
"0.71941495",
"0.7036526",
"0.6990482",
"0.6806889",
"0.6790433",
"0.66640794",
"0.65187746",
"0.65032345",
"0.6498021",
"0.6454086",
"0.6445891",
"0.6427192",
"0.6412058",
"0.6366171",
"0.6277149",
"0.62423056",
"0.6232357",... | 0.6032092 | 25 |
Returns the face of the mesh triangles which which will be facing outwards, either ``GL_CCW`` or ``GL_CW``. This will differ depending on the meshtodisplay transformation matrix. This method is only used in 3D rendering. | def t6vl(YKHO):
if not YKHO.threedee:
return Fd7m.GL_CCW
qQTo = YKHO.opts.getTransform('mesh', 'display')
if TuJO.det(qQTo) > 0:
return Fd7m.GL_CCW
else:
return Fd7m.GL_CW | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def y_PJ(YKHO):\n if YKHO._faces is None:\n if YKHO._vertices is None:\n return None\n YKHO.triangulate()\n return YKHO._faces",
"def RpU_(YKHO):\n return YKHO.faceup",
"def z9iq(YKHO, rR8k):\n y_PJ = MTG0(YKHO.facesAround, rR8k.preFace)\n p3P3 = duMp(y_PJ[-1])\n kXkq... | [
"0.6344681",
"0.6338219",
"0.6013597",
"0.5952125",
"0.5836936",
"0.57727253",
"0.5719348",
"0.5600704",
"0.5571279",
"0.5497146",
"0.54584366",
"0.5386774",
"0.53693545",
"0.5314351",
"0.5294819",
"0.5275278",
"0.5243907",
"0.5239935",
"0.5221624",
"0.5220163",
"0.521938",
... | 0.7187213 | 0 |
Generates a batch of images from Diffusion from a list of prompts. | def CUpP(YKHO, tJhH: List[str]):
from flax.training.common_utils import shard
import jax
import time
import numpy as oyIN
xlLU = jax.random.PRNGKey(0)
xlLU = jax.random.split(xlLU, jax.device_count())
assert tJhH, 'prompt parameter cannot be empty'
print('Prompts: ', tJhH)
tafD = YKH... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bAen(YKHO, idDS, TVTK=512, H2v2=512, ImkY=7.5, tWzb=1, oa6m=50, c2Yh=None, **B2fa):\n bCYe = YKHO.get_pipe('generate')\n Yw_3 = bCYe(prompt=idDS, width=TVTK, height=H2v2, guidance_scale=ImkY, num_images_per_prompt=tWzb, num_inference_steps=oa6m, generator=c2Yh, **B2fa).images\n return Yw_3",
"async ... | [
"0.6863782",
"0.6578029",
"0.5754029",
"0.57111746",
"0.566734",
"0.56322396",
"0.5625035",
"0.5585756",
"0.55282676",
"0.5526209",
"0.5523417",
"0.540099",
"0.5390461",
"0.5390461",
"0.53881466",
"0.5383595",
"0.5379922",
"0.53760517",
"0.53645545",
"0.5320725",
"0.5320141",... | 0.65636754 | 2 |
Verifies whether the current test role equals the admin role. | def _Kb1():
return SAs9.patrole.rbac_test_role == SAs9.identity.admin_role | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _Kb1(YKHO):\n return FxgQ.query.get(2) in YKHO.roles",
"def Ee9T(YKHO):\n YKHO.assertEqual(False, YKHO.user.isAdmin)",
"def _Kb1(YKHO) -> bool:\n return wk5E.config['AUTH_ROLE_ADMIN'] in [LmAn.name for LmAn in YKHO.get_user_roles()]",
"def AF1G(YKHO):\n HFS3 = False\n if YKHO.user.role.rol... | [
"0.72475004",
"0.70728326",
"0.699523",
"0.68984133",
"0.6852451",
"0.676047",
"0.67451644",
"0.6695397",
"0.6632829",
"0.6613536",
"0.66063076",
"0.6585458",
"0.6563243",
"0.6547598",
"0.6528736",
"0.6518195",
"0.6513885",
"0.64934456",
"0.64929634",
"0.6479242",
"0.64621687... | 0.7829923 | 0 |
function is_kind_of_class Checks if an object is an instance of, or if the object is an instance of a class that inherited from, the specified class. | def Bk6c(YEnM, J9Xy):
if isinstance(YEnM, J9Xy) is True:
return True
else:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Bk6c(YEnM, J9Xy):\n return isinstance(YEnM, J9Xy)",
"def Bk6c(YEnM, J9Xy):\n return isinstance(YEnM, J9Xy)",
"def Bk6c(YEnM, J9Xy):\n return isinstance(YEnM, J9Xy)",
"def Bk6c(YEnM, J9Xy):\n return isinstance(YEnM, J9Xy)",
"def Bk6c(YEnM, J9Xy):\n return isinstance(YEnM, J9Xy)",
"def B... | [
"0.8564378",
"0.8564378",
"0.8564378",
"0.8564378",
"0.8564378",
"0.8564378",
"0.8557369",
"0.8549485",
"0.8549485",
"0.8546138",
"0.85379946",
"0.849904",
"0.849504",
"0.84919655",
"0.7630834",
"0.75058615",
"0.7478233",
"0.7474689",
"0.74709916",
"0.74454826",
"0.74367934",... | 0.84293073 | 14 |
This provides information on the World Manufacturer Identifier for a specific WMI code. | def QIT4(YKHO, qeUG):
return YKHO.get('vehicles/DecodeWMI/{}'.format(qeUG)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fm08(YKHO):\n return YKHO._manufacturer",
"def qQ8Q(YKHO, HXjy):\n XmcM = ''\n ERQm = HXjy[0:6]\n if ERQm in YKHO.oui:\n XmcM = YKHO.oui[ERQm]\n return XmcM",
"def XmcM(YKHO) -> int:\n return YKHO.__manufacturer",
"def XmcM(YKHO):\n return YKHO._device.manufacturer",
"def Xm... | [
"0.6960894",
"0.68602335",
"0.6815984",
"0.6689108",
"0.6623454",
"0.6557198",
"0.6490838",
"0.6448918",
"0.63880366",
"0.61879325",
"0.6118435",
"0.6054914",
"0.6000768",
"0.59323746",
"0.59044856",
"0.57410955",
"0.5668272",
"0.56207013",
"0.55891824",
"0.5578701",
"0.55621... | 0.5233363 | 47 |
This returns all the Makes in the vPIC dataset for a specified vehicle type whose name is LIKE the vehicle type name in vPIC Dataset. Vehicle Type name can be a partial name, or a full name for more specificity (e.g., "Vehicle", "Moto", "Low Speed Vehicle", etc.) | def tNff(YKHO, U1Lp='car'):
return YKHO.get('vehicles/GetMakesForVehicleType/{}'.format(U1Lp)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SZ5g(YKHO, PEX4):\n return YKHO.get('vehicles/GetVehicleTypesForMake/{}'.format(PEX4))",
"def kP3B(type):\n w2B8 = GGod()\n try:\n DpUl = w2B8.cursor()\n try:\n type = type.replace('@', '@@')\n type = type.replace('%', '@%')\n type = type.replace('_', '... | [
"0.65482736",
"0.5844169",
"0.54995334",
"0.535191",
"0.5306488",
"0.5282756",
"0.5259599",
"0.52595747",
"0.5253013",
"0.5251376",
"0.52321184",
"0.5226248",
"0.51903707",
"0.5042028",
"0.503804",
"0.48731795",
"0.4849342",
"0.483773",
"0.47962976",
"0.47726777",
"0.4757014"... | 0.69205314 | 0 |
Patch elasticsearch class and create client object. | def FCbF(YKHO):
YKHO.patcher = Po4F('esis.es.Elasticsearch')
YKHO.elasticsearch_cls = YKHO.patcher.start()
YKHO.client = i9zE(host='localhost', port=9200) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RIsT(Fv2L):\n return kZJV(Fv2L)",
"def mdlt() -> LyP8:\n global _instance\n if _1IC is None:\n WzOq = wxaU(hosts=gCuF.elasticsearch)\n _1IC = LyP8(WzOq)\n return _1IC",
"def ik60(Twi1, p7ih, leu4, _2sc):\n QAyq = jth9.copy(Twi1)\n QAyq.es_index = p7ih\n QAyq.doc_type = le... | [
"0.6657839",
"0.6403895",
"0.62187284",
"0.6212",
"0.6198701",
"0.6093606",
"0.6083465",
"0.6078236",
"0.6054726",
"0.60475117",
"0.6013452",
"0.59203243",
"0.589203",
"0.58807987",
"0.58381015",
"0.5822817",
"0.57842386",
"0.57437044",
"0.5736904",
"0.5665591",
"0.5631253",
... | 0.7405969 | 0 |
Returns set of TypeTerm's are used in known Product Types of this dict. This is useful for filter out terms that cannot be used for types lookup anyway. | def iCAx(YKHO):
IPQM = YKHO._term_set
if IPQM is None:
IPQM = set()
PiI2 = YKHO.get_type_tuples()
for SfI4 in PiI2:
IPQM.update(SfI4)
YKHO._term_set = IPQM
return IPQM | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nxgV(YKHO):\n return YKHO._product_types",
"def nxgV(YKHO):\n return list(YKHO._product_type_plugins.keys())",
"def r3q6(YKHO) -> fHNa[str]:\n M2C2 = {YKHO.type}\n for KCHu in YKHO.segments:\n M2C2 |= KCHu.type_set()\n return M2C2",
"def YwLH(YKHO, NHn2):\n return [YRbF for YRbF ... | [
"0.6861626",
"0.6640805",
"0.65320474",
"0.652012",
"0.6244081",
"0.6085966",
"0.6075513",
"0.5994219",
"0.5984916",
"0.5928692",
"0.5907441",
"0.5889537",
"0.58626306",
"0.5835914",
"0.58352953",
"0.581579",
"0.5774917",
"0.57439816",
"0.5734383",
"0.5726964",
"0.5717317",
... | 0.74778223 | 0 |
>>> replace_re_group("nothing","(?P","groupvalue") 'nothing' >>> replace_re_group("the (?Psimple) test","(?P","groupvalue") 'the groupvalue test' >>> replace_re_group("the (?P nested (test)>)","(?P","groupvalue") 'the groupvalue' | def jbm1(VN2L, uOe2, mXDZ):
Mkmy = ''
ESjr = len(uOe2)
while VN2L:
or8S = VN2L.find(uOe2)
if or8S == -1:
return Mkmy + VN2L
Mkmy += VN2L[:or8S]
VN2L = VN2L[or8S + ESjr:]
ABDL = 1
while VN2L:
Z9rn = VN2L[0]
VN2L = VN2L[1:]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def utRX(l5Ny: AnsibleUnsafeText, NBgX: str, uOe2=0) -> str:\n o0RV = ''\n try:\n o0RV = ZbWC.search(NBgX, str(l5Ny)).group(uOe2)\n except AttributeError as ae:\n print(type(HTlg).__name__)\n wVCK.print_stack()\n return _1DY(o0RV)",
"def FTu0(mXDZ):\n mxDd = [r8hN.start(0) for... | [
"0.6593277",
"0.6489525",
"0.6396811",
"0.6387711",
"0.6321706",
"0.60989994",
"0.5958348",
"0.5743117",
"0.5735624",
"0.5734024",
"0.5698079",
"0.5568889",
"0.5562935",
"0.5538265",
"0.5537848",
"0.55067766",
"0.544808",
"0.54361475",
"0.5404344",
"0.53924847",
"0.5362473",
... | 0.71829563 | 0 |
Convert string value to seconds. Available acronyms are h, d, w, m, y | def bQkZ(Ty9i):
r8hN = 1
if Ty9i.endswith('h'):
Ty9i = Ty9i[:-1]
r8hN = 3600
elif Ty9i.endswith('d'):
Ty9i = Ty9i[:-1]
r8hN = 24 * 3600
elif Ty9i.endswith('w'):
Ty9i = Ty9i[:-1]
r8hN = 7 * 24 * 3600
elif Ty9i.endswith('m'):
Ty9i = Ty9i[:-1]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Tm89(YKHO, KCHu):\n WbTE = 0\n for YRbF in KCHu.split('-'):\n if 'h' in YRbF:\n WbTE = WbTE + int(YRbF.split('h')[0]) * 3600\n if 'm' in YRbF:\n WbTE = WbTE + int(YRbF.split('m')[0]) * 60\n if 's' in YRbF:\n WbTE = WbTE + int(YRbF.split('s')[0])\n ... | [
"0.7481081",
"0.73768425",
"0.7375146",
"0.73248255",
"0.7315954",
"0.7225096",
"0.71773547",
"0.7078408",
"0.70449007",
"0.6982861",
"0.6982393",
"0.6944802",
"0.6926858",
"0.6926858",
"0.69196755",
"0.6901901",
"0.6871831",
"0.68634576",
"0.68211997",
"0.678375",
"0.6781553... | 0.7504235 | 0 |
Construct a Ray from a direction and a position from the origin. The direction will be forced normal. | def FIMM(YKHO, XSoh, dQgj):
YKHO.direction = NkkI(XSoh)
YKHO.position = oyIN.array(dQgj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MicQ(YKHO, spHt):\n mhAC = YKHO.normal(spHt.position)\n if mhAC.dot(spHt.direction) > 0:\n mhAC = -mhAC\n return m1mO(spHt.direction - 2 * BJ1H(spHt.direction, mhAC) * mhAC, spHt.position)",
"def FIMM(YKHO, uxwT, Dgo4, xErL=None, bHg_=None):\n if bHg_ is not None:\n uxwT = NkkI(uxwT... | [
"0.6094331",
"0.6072586",
"0.5836509",
"0.5808292",
"0.5669642",
"0.56333095",
"0.55816907",
"0.55351573",
"0.55220306",
"0.54981846",
"0.5494609",
"0.5490973",
"0.5414771",
"0.5083932",
"0.5082023",
"0.5044048",
"0.5037309",
"0.50122684",
"0.5010806",
"0.49667916",
"0.493328... | 0.56025743 | 6 |
Return True if the surface is reflective. Otherwise, return False. | def Zdgo(YKHO):
return YKHO._reflective | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tbZK(YKHO):\n return bool(YKHO.isSquare() and YKHO.determinant())",
"def rVDy(YKHO):\n return YKHO.real > 0",
"def Auqn(YKHO):\n return len(YKHO.coeffs.shape[YKHO.sdim:]) == 1",
"def ThI8(YKHO):\n if YKHO.dip and (not YKHO.deleted) and (not YKHO.replica) and (not YKHO.aip) and (not YKHO.sip):... | [
"0.5975583",
"0.5958553",
"0.593509",
"0.59215015",
"0.5842063",
"0.5780237",
"0.5759116",
"0.5748275",
"0.56818694",
"0.5663717",
"0.56506705",
"0.5635382",
"0.5600092",
"0.55912817",
"0.5591185",
"0.55707014",
"0.5544581",
"0.5533953",
"0.5533953",
"0.5533891",
"0.5525742",... | 0.68020517 | 0 |
Construct a plane from a normal vector and the position to a point on the plane. | def FIMM(YKHO, mhAC, dQgj, mWFP=None, up12=False):
Qk3u.__init__(YKHO, mWFP, up12)
YKHO._normal = NkkI(mhAC)
YKHO._position = oyIN.array(dQgj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def o_i3(Emd4, iArr) -> 'Plane':\n Ty9i = lNLu(iArr)\n return GmBz(Ty9i.normalize(), Ty9i.magnitude)",
"def BS9d(AU8u, kEC0):\n P8oC, mhAC = kEC0\n mhAC = u1KP(mhAC)\n iArr = f4Oi(AU8u, P8oC)\n Ifga = HvgP(mhAC, s2vS(iArr, mhAC))\n return f4Oi(AU8u, Ifga)",
"def fwU2(Emd4, AU8u: array_like... | [
"0.73509693",
"0.7324766",
"0.69126976",
"0.67388016",
"0.6710477",
"0.6689925",
"0.6630524",
"0.66234905",
"0.6538876",
"0.65205795",
"0.6479206",
"0.6419508",
"0.6409488",
"0.6409488",
"0.6386841",
"0.6385874",
"0.6317552",
"0.6284574",
"0.6277295",
"0.6247903",
"0.62441146... | 0.57828563 | 49 |
Translate the surface by the displacement with fixed orientation. | def hBUG(YKHO, ZJUk):
YKHO._position = YKHO._position + oyIN.array(ZJUk) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hBUG(YKHO, ZJUk):\n YKHO._center = YKHO._center + oyIN.array(ZJUk)\n YKHO._position = YKHO._position + oyIN.array(ZJUk)",
"def hBUG(YKHO, ZJUk):\n YKHO.center = (YKHO.center[0] + ZJUk[0], YKHO.center[1] + ZJUk[1])",
"def BZN_(YKHO, J20S):\n YKHO.position = SzXQ(YKHO.position + YKHO.velocity, J2... | [
"0.706072",
"0.69921255",
"0.6790597",
"0.6546623",
"0.6503694",
"0.64819634",
"0.6434932",
"0.6248682",
"0.6246855",
"0.6092307",
"0.5986529",
"0.5949149",
"0.59347296",
"0.5893499",
"0.58854103",
"0.5804666",
"0.57444006",
"0.574371",
"0.57372546",
"0.5703373",
"0.5683703",... | 0.64265233 | 7 |
Return the normal vector. | def mhAC(YKHO, dQgj):
return YKHO._normal | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mhAC(YKHO) -> lNLu:\n return YKHO._normal",
"def WGTe(YKHO):\n return lNLu(YKHO.normal)",
"def P6aR(YKHO):\n iArr = YKHO.unit_vector\n iArr.rotate(epAf.pi / 2)\n return iArr",
"def mhAC(YKHO) -> lNLu:\n return NkkI(WHx2(YKHO.d1, YKHO.d2))",
"def mhAC(YKHO) -> Cd5b:\n fJfP = YKHO.pl... | [
"0.89155966",
"0.8721422",
"0.8546165",
"0.8448357",
"0.8303889",
"0.8216004",
"0.81904435",
"0.7936671",
"0.7916474",
"0.79132324",
"0.78811854",
"0.7842582",
"0.7682277",
"0.76702005",
"0.7590145",
"0.7583683",
"0.7582449",
"0.7524974",
"0.7523906",
"0.7491076",
"0.74849105... | 0.7856742 | 11 |
Return true if the position is below the surface w.r.t. the normal. | def sjXf(YKHO, dQgj):
return (dQgj - YKHO._position).dot(YKHO.normal(dQgj)) < 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CVSN(YKHO):\n return YKHO.z < 0",
"def YOP4(YKHO):\n oQ1P = oyIN.array(YKHO.prey.position)\n VDwk = oyIN.array(YKHO.previous_data[-1])\n MpPF = oyIN.array(YKHO.previous_data[-2])\n sajX = oyIN.linalg.norm(oQ1P - VDwk)\n Qxye = oyIN.linalg.norm(oQ1P - MpPF)\n if sajX < Qxye:\n retu... | [
"0.648721",
"0.64868283",
"0.61766976",
"0.6155492",
"0.6095029",
"0.6042511",
"0.6020704",
"0.59912974",
"0.5977119",
"0.59096",
"0.5896698",
"0.58637303",
"0.58486336",
"0.5827253",
"0.58237433",
"0.58047825",
"0.5784277",
"0.57801455",
"0.57412136",
"0.573523",
"0.5730213"... | 0.64155066 | 2 |
Return true if the position is inside the volume of the sphere. | def sjXf(YKHO, dQgj):
return oyIN.linalg.norm(dQgj - YKHO._center) < YKHO._radius | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def p4_Z(YKHO, dQgj, sllT):\n tpio = len(dQgj)\n a1kB = [0] * tpio\n D8d7 = 0\n for YRbF in range(0, tpio):\n a1kB[YRbF] = epAf.fabs(dQgj[YRbF] - YKHO.mSample[YRbF])\n if epAf.fabs(sllT[YRbF] - a1kB[YRbF]) < a1kB[YRbF]:\n a1kB[YRbF] = epAf.fabs(sllT[YRbF] - a1kB[YRbF])\n ... | [
"0.6791304",
"0.6772017",
"0.67717576",
"0.66854215",
"0.66486347",
"0.6569301",
"0.6551375",
"0.6481873",
"0.64661866",
"0.63763255",
"0.63541865",
"0.63310975",
"0.63143206",
"0.62849367",
"0.62598807",
"0.6236428",
"0.62132627",
"0.62098604",
"0.6189123",
"0.6181488",
"0.6... | 0.7594988 | 0 |
Translate the surface by the displacement with fixed orientation. | def hBUG(YKHO, ZJUk):
YKHO._center = YKHO._center + oyIN.array(ZJUk)
YKHO._position = YKHO._position + oyIN.array(ZJUk) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hBUG(YKHO, ZJUk):\n YKHO.center = (YKHO.center[0] + ZJUk[0], YKHO.center[1] + ZJUk[1])",
"def BZN_(YKHO, J20S):\n YKHO.position = SzXQ(YKHO.position + YKHO.velocity, J20S)",
"def hBUG(YKHO, Jw7X, eUWA, aUJK):\n YKHO.x = YKHO.x + Jw7X\n YKHO.y = YKHO.y + eUWA\n YKHO.z = YKHO.z + aUJK\n YKH... | [
"0.69921255",
"0.6790597",
"0.6546623",
"0.6503694",
"0.64819634",
"0.6434932",
"0.64265233",
"0.6248682",
"0.6246855",
"0.6092307",
"0.5986529",
"0.5949149",
"0.59347296",
"0.5893499",
"0.58854103",
"0.5804666",
"0.57444006",
"0.574371",
"0.57372546",
"0.5703373",
"0.5683703... | 0.706072 | 0 |
Return the normal at the point on the surface. | def mhAC(YKHO, AU8u):
AU8u = YKHO._center - oyIN.array(AU8u)
return NkkI(AU8u / YKHO._radius) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mhAC(YKHO, AU8u):\n return YKHO._normal.dup()",
"def ba8L(YKHO, Xf84):\n return YKHO.normal.normalize()",
"def mhAC(YKHO) -> Cd5b:\n fJfP = YKHO.planes[1] - YKHO.planes[0]\n hWOy = YKHO.planes[2] - YKHO.planes[1]\n return Cd5b.cross(fJfP, hWOy).norm()",
"def qvqi(YKHO, RCOG: Point) -> lNLu... | [
"0.79712397",
"0.7914931",
"0.7724645",
"0.75636697",
"0.7543766",
"0.75437653",
"0.7505781",
"0.74931777",
"0.73829144",
"0.72767013",
"0.7120286",
"0.70970136",
"0.709",
"0.7061142",
"0.7041461",
"0.70261645",
"0.6999432",
"0.6990783",
"0.6901572",
"0.6883833",
"0.68721473"... | 0.7954546 | 1 |
Return the timetillboundary and boundary of the next intersection. | def HCtK(YKHO, spHt):
PEju = [(YRbF.time_to_bound(spHt), YRbF) for YRbF in YKHO._bounds]
try:
return sorted([(ITS7, J20S) for ITS7, J20S in PEju if ITS7 is not None and ITS7 > 1e-09 and all([Fg_i.contains(spHt.propagate(ITS7).position) for Fg_i in YKHO._bounds if Fg_i is not J20S])])[0]
except Index... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H3u5(ETqx, oaYx, X68O, EUtE):\n ETqx = ETqx\n X68O = X68O\n oaYx = oaYx\n EUtE = EUtE\n return min(oaYx, EUtE) - max(ETqx, X68O)",
"def gyco(YKHO):\n izFS = YKHO.get_value(YKHO.current_point)\n jocv = YKHO.get_value(YKHO.end_point)\n gHhP = YKHO.current_point\n if jocv - izFS > YKH... | [
"0.64409894",
"0.60239434",
"0.5994862",
"0.5825851",
"0.57350826",
"0.56367064",
"0.56018925",
"0.5597462",
"0.55608046",
"0.5495273",
"0.5462936",
"0.54623806",
"0.545466",
"0.545466",
"0.5436905",
"0.54272056",
"0.5408006",
"0.5398319",
"0.53973675",
"0.5369602",
"0.536444... | 0.5581006 | 8 |
Return the beam segment ray. | def spHt(YKHO):
return YKHO._ray | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TFfM(YKHO, spHt):\n vC9B = -spHt.mDirection\n F4_u = spHt.mOrigin\n exwG = YKHO.mNormal\n y4fz = YKHO.mDistance * exwG\n if vC9B.dot(exwG) > 0:\n Ty9i = y4fz - F4_u\n a1PO = -(Ty9i.dot(exwG) / vC9B.dot(exwG))\n return a1PO\n else:\n return None",
"def Cawp(YKHO):... | [
"0.6191178",
"0.6171554",
"0.6156284",
"0.60893786",
"0.5974034",
"0.5947297",
"0.5877041",
"0.5869074",
"0.5855643",
"0.58341885",
"0.57774925",
"0.57609934",
"0.57491297",
"0.5718796",
"0.5703341",
"0.5601157",
"0.55530953",
"0.5526175",
"0.5515779",
"0.54727244",
"0.544434... | 0.72490925 | 0 |
Push single item to iterator at current point in iteration. Calling next() on iterator will return item in the next iterator. | def _jXH(YKHO, ZfUD):
YKHO._cursor_stack.append(ZfUD) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _jXH(YKHO, ZfUD):\n YKHO._tail_iters.append(iter([ZfUD]))",
"def _jXH(YKHO, ZfUD):\n if hasattr(ZfUD, '__iter__'):\n YKHO.items.extend(ZfUD)\n else:\n YKHO.items.append(ZfUD)",
"def Ia9d(YKHO, ZfUD, d6pt):\n if d6pt in YKHO.d_buffer.keys():\n return\n if len(YKHO) == YKH... | [
"0.74171233",
"0.70699495",
"0.6910868",
"0.6678504",
"0.667791",
"0.6500593",
"0.6442878",
"0.6442878",
"0.6442878",
"0.6442878",
"0.6442878",
"0.64124095",
"0.64100504",
"0.63595873",
"0.6352962",
"0.63435537",
"0.63379693",
"0.63334715",
"0.6329619",
"0.6324044",
"0.630437... | 0.6503116 | 5 |
Peek next element without consuming iterator. Pass the number of steps to check how many steps forward it will peek. It raises StopIteration or return the default value if iterator is already consumed. | def T7C_(YKHO, paSp=0, *, WmM4=Xelj):
if paSp == 0:
try:
BWXx = YKHO._next()
except StopIteration:
if WmM4 is Xelj:
raise
return WmM4
else:
YKHO._cursor_stack.append(BWXx)
return BWXx
else:
hkxX = []
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ee70(iter: Iterable, d6pt: int) -> h8nf[any]:\n if d6pt < len(iter):\n return iter[d6pt]\n return None",
"def T7C_(YKHO):\n if YKHO.peek_num is None:\n YKHO.peek_num = YKHO.iterator.next()\n return YKHO.peek_num\n return YKHO.peek_num",
"def E_nZ(oHE7, exwG=None, next=next,... | [
"0.6565379",
"0.61074543",
"0.6033162",
"0.6032214",
"0.6028781",
"0.5986056",
"0.5975407",
"0.5895364",
"0.5856415",
"0.5851012",
"0.5779738",
"0.57535213",
"0.57516485",
"0.57281566",
"0.569198",
"0.569198",
"0.569198",
"0.5681788",
"0.5626081",
"0.5608215",
"0.5578372",
... | 0.7366466 | 0 |
Push single item to iterator at current point in iteration. Calling next() on iterator will return item in the next iterator. | def _jXH(YKHO, ZfUD):
YKHO._tail_iters.append(iter([ZfUD])) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _jXH(YKHO, ZfUD):\n if hasattr(ZfUD, '__iter__'):\n YKHO.items.extend(ZfUD)\n else:\n YKHO.items.append(ZfUD)",
"def Ia9d(YKHO, ZfUD, d6pt):\n if d6pt in YKHO.d_buffer.keys():\n return\n if len(YKHO) == YKHO.size:\n YKHO.pop_first()\n YKHO.add_item(ZfUD, d6pt)",
"... | [
"0.70685345",
"0.6910672",
"0.667531",
"0.6675184",
"0.6501217",
"0.6498237",
"0.6440441",
"0.6440441",
"0.6440441",
"0.6440441",
"0.6440441",
"0.64101857",
"0.6407327",
"0.63624144",
"0.6350007",
"0.6341936",
"0.63360375",
"0.6332655",
"0.6330578",
"0.63215184",
"0.63025403"... | 0.7415915 | 0 |
Computes the accuracy over the k top predictions for the specified values of k | def vjyh(hlel, pan_, hz5a=(1,)):
with ht2j.no_grad():
Gq8e = max(hz5a)
Ep8u = pan_.size(0)
bGrB, nvEb = hlel.topk(Gq8e, 1, True, True)
nvEb = nvEb.t()
gXXc = nvEb.eq(pan_.view(1, -1).expand_as(nvEb))
Ylbp = []
for G1Hx in hz5a:
R2Dg = gXXc[:G1Hx].v... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Z7qO(LVAh, aMgO, G1Hx=2):\n nvEb = []\n for YRbF in range(len(LVAh)):\n if LVAh[YRbF] in aMgO[YRbF][:G1Hx]:\n nvEb.append(1)\n else:\n nvEb.append(0)\n return sum(nvEb) / len(nvEb)",
"def vjyh(aMgO, ibJh, hz5a=(1,)):\n Gq8e = max(hz5a)\n Ep8u = ibJh.size(0)\... | [
"0.8331214",
"0.8284662",
"0.82381004",
"0.8229767",
"0.82202226",
"0.81864446",
"0.81847763",
"0.8175173",
"0.8171541",
"0.81699467",
"0.81664646",
"0.81645083",
"0.81637454",
"0.81622064",
"0.81622064",
"0.81622064",
"0.81622064",
"0.81622064",
"0.81622064",
"0.81622064",
"... | 0.7893114 | 60 |
Overloads the parameters iterator function so only variable 'requires_grad' set to True are iterated over. | def SGPK(YKHO, gvRW=True):
hvS1 = lambda xqoZ: xqoZ.requires_grad if gvRW else True
return (xqoZ for xqoZ in super().parameters() if hvS1(xqoZ)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F41H(YKHO, _6Ge):\n for k78t in YKHO.parameters():\n k78t.requires_grad = _6Ge",
"def F41H(YKHO, _6Ge):\n for k78t in YKHO.parameters():\n k78t.requires_grad = _6Ge",
"def u1Ug(YKHO) -> x1iM[XDS4]:\n return [XP5J for XP5J in YKHO.parameters() if XP5J.grad is not None]",
"def u1Ug(Y... | [
"0.7065462",
"0.7065462",
"0.6981177",
"0.68589026",
"0.6773993",
"0.660333",
"0.64560425",
"0.6452415",
"0.64516294",
"0.64108855",
"0.63925046",
"0.6380659",
"0.63576025",
"0.63520265",
"0.63169414",
"0.62741923",
"0.62708586",
"0.6261778",
"0.62184954",
"0.6180963",
"0.615... | 0.6626576 | 5 |
Overloads the parameters iterator function so only variable 'requires_grad' set to True are iterated over. | def P2ha(YKHO, i_PE=None, y0cW='', gvRW=True):
hvS1 = lambda xqoZ: xqoZ.requires_grad if gvRW else True
return ((mWFP, xqoZ) for mWFP, xqoZ in super().named_parameters() if hvS1(xqoZ)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def F41H(YKHO, _6Ge):\n for k78t in YKHO.parameters():\n k78t.requires_grad = _6Ge",
"def F41H(YKHO, _6Ge):\n for k78t in YKHO.parameters():\n k78t.requires_grad = _6Ge",
"def u1Ug(YKHO) -> x1iM[XDS4]:\n return [XP5J for XP5J in YKHO.parameters() if XP5J.grad is not None]",
"def u1Ug(Y... | [
"0.70659053",
"0.70659053",
"0.69814664",
"0.6859007",
"0.67740387",
"0.66261065",
"0.66049397",
"0.6456732",
"0.6453299",
"0.6449511",
"0.640885",
"0.6391922",
"0.63791955",
"0.63564926",
"0.63514733",
"0.63181025",
"0.6276157",
"0.6271183",
"0.62635595",
"0.6219102",
"0.617... | 0.6103122 | 25 |
Get the front element. | def T7C_(YKHO):
if YKHO.mystack2:
return YKHO.mystack2[-1]
else:
while YKHO.mystack1:
YKHO.mystack2.append(YKHO.mystack1.pop())
return YKHO.mystack2[-1] if YKHO.mystack2 else None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uW34(YKHO):\n VnzS = YKHO.queue[YKHO.front]\n return VnzS\n pass",
"def uW34(YKHO):\n if not YKHO.isEmpty():\n return YKHO._data[0]\n else:\n return -1",
"def VnzS(YKHO):\n return YKHO.queue[0] if not YKHO.empty() else None",
"def vYJ5(YKHO):\n if YKHO.items:\n r... | [
"0.82009244",
"0.79261875",
"0.7852642",
"0.7791182",
"0.77886623",
"0.75723046",
"0.752337",
"0.7510604",
"0.7478953",
"0.7379256",
"0.7379256",
"0.734284",
"0.7323573",
"0.7320296",
"0.7291721",
"0.72772557",
"0.7269801",
"0.72657627",
"0.7253295",
"0.72355044",
"0.72213495... | 0.0 | -1 |
Returns whether the queue is empty. | def lsmZ(YKHO):
return not YKHO.mystack1 and (not YKHO.mystack2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FBfn(YKHO):\n return len(YKHO.the_queue) == 0",
"def FBfn(YKHO):\n return len(YKHO.__queue) > 0",
"def FBfn(YKHO):\n return len(YKHO.queue) == 0",
"def FBfn(YKHO):\n return len(YKHO.queue) == 0",
"def FBfn(YKHO):\n return YKHO.queue == []",
"def FBfn(YKHO):\n return not YKHO._queue"... | [
"0.9270249",
"0.92506766",
"0.923635",
"0.923635",
"0.9155843",
"0.9098441",
"0.9095006",
"0.90922606",
"0.90731245",
"0.9053733",
"0.89205354",
"0.89137155",
"0.8877591",
"0.88436323",
"0.88436323",
"0.8835949",
"0.88038146",
"0.8758203",
"0.87577534",
"0.87310195",
"0.86462... | 0.0 | -1 |
Returns whether the stack is empty. | def lsmZ(YKHO) -> 'bool':
if not YKHO.que_one and (not YKHO.que_two):
return True
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FBfn(YKHO):\n return len(YKHO.the_stack) == 0",
"def FBfn(YKHO):\n return len(YKHO.stack) == 0",
"def lsmZ(YKHO) -> bool:\n return len(YKHO.stack) == 0",
"def A4KR(YKHO):\n return len(YKHO.stack) == 0",
"def lsmZ(YKHO):\n return len(YKHO.stack) == 0",
"def lsmZ(YKHO):\n return len(Y... | [
"0.9207258",
"0.91276956",
"0.90185934",
"0.9000551",
"0.89481044",
"0.89481044",
"0.8914844",
"0.8904091",
"0.8881541",
"0.88791907",
"0.8867761",
"0.87955654",
"0.8768181",
"0.8748518",
"0.87393755",
"0.8728073",
"0.8719241",
"0.87090814",
"0.87090814",
"0.85431594",
"0.850... | 0.0 | -1 |
Returns whether the stack is empty. | def lsmZ(YKHO) -> bool:
return YKHO.que == [] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FBfn(YKHO):\n return len(YKHO.the_stack) == 0",
"def FBfn(YKHO):\n return len(YKHO.stack) == 0",
"def lsmZ(YKHO) -> bool:\n return len(YKHO.stack) == 0",
"def A4KR(YKHO):\n return len(YKHO.stack) == 0",
"def lsmZ(YKHO):\n return len(YKHO.stack) == 0",
"def lsmZ(YKHO):\n return len(Y... | [
"0.9207258",
"0.91276956",
"0.90185934",
"0.9000551",
"0.89481044",
"0.89481044",
"0.8914844",
"0.8904091",
"0.8881541",
"0.88791907",
"0.8867761",
"0.87955654",
"0.8768181",
"0.8748518",
"0.87393755",
"0.8728073",
"0.8719241",
"0.87090814",
"0.87090814",
"0.85431594",
"0.850... | 0.0 | -1 |
numpy Vector/matrix friendly sigmoid function | def m1Hg(YKHO, WKvO, jzdc=1.0, Fg_i=1.0, Z9rn=0.0, Csk6=0.0, tTpl=1.0):
return jzdc / (Fg_i + oyIN.exp(-tTpl * (WKvO - Z9rn))) + Csk6 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m1Hg(WKvO: np.ndarray) -> oyIN.ndarray:\n return 1 / (1 + oyIN.exp(-WKvO))",
"def m1Hg(WKvO):\n return 1 / (1 + oyIN.exp(-WKvO))",
"def m1Hg(WKvO):\n return 1 / (1 + oyIN.exp(-WKvO))",
"def m1Hg(WKvO):\n return 1 / (1 + oyIN.exp(-WKvO))",
"def m1Hg(WKvO):\n return 1 / (1 + oyIN.exp(-WKvO... | [
"0.81339896",
"0.7982278",
"0.7920161",
"0.7920161",
"0.7920161",
"0.7920161",
"0.7920161",
"0.7920161",
"0.79157984",
"0.79130244",
"0.79046243",
"0.79027396",
"0.78831655",
"0.78809214",
"0.7873999",
"0.7861118",
"0.7861118",
"0.7854806",
"0.78468496",
"0.7821382",
"0.78072... | 0.0 | -1 |
Test mapping when one container is missing a required group. | def WC_Y(YKHO):
YkG8 = i2Ac('my_bar1', list(range(10)), 'value1', 10)
tO9_ = "Bar 'my_bar1' is missing required value for attribute 'foo'."
with YKHO.assertWarnsWith(CZ75, tO9_):
mBtZ = YKHO.mapper.build(YkG8, YKHO.manager)
aEqx = xo9i(name='my_bar1')
YKHO.assertBuilderEqual(aEqx, mBtZ) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kNRb(YKHO):\n with YKHO.assertRaises(TypeError):\n YKHO.map_digis(None)",
"def Phz1(YKHO):\n with YKHO.assertRaises(yAFV):\n YKHO._storage.get_group('group1')",
"def MWoO(YKHO):\n YKHO.mapper.map_spec('attr3', YKHO.mapper.spec.get_group('empty').get_attribute('attr3'))\n YkG8 = i2... | [
"0.6901956",
"0.63897735",
"0.6258039",
"0.62422234",
"0.615087",
"0.6130689",
"0.58748657",
"0.58745253",
"0.5866679",
"0.5851542",
"0.5819196",
"0.58082134",
"0.580506",
"0.58015233",
"0.57863396",
"0.5748334",
"0.57234603",
"0.5704771",
"0.5684365",
"0.5659706",
"0.5656621... | 0.61017394 | 6 |
Critical density of the Universe at an input `redshift` in units of solar masses. For simplicity, PyAutoLens internally uses only certain units to perform lensing cosmology calculations. This function therefore returns only the value of the astropy function it wraps, omitting the units instance. | def pWSU(YKHO, lfmz: float) -> float:
iYsj = YKHO.critical_density(z=lfmz).to('solMass / kpc^3').value
ShwZ = YKHO.kpc_per_arcsec_from(redshift=lfmz)
return iYsj * ShwZ ** 3.0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EozG(YKHO, lfmz: float) -> float:\n iYsj = YKHO.critical_density(z=lfmz).to('solMass / kpc^3').value\n return iYsj",
"def LcM3(YKHO, JXAV: float, bRAh: float, tRSD: float) -> float:\n PtXs = uwaB.c.to('kpc / s')\n aW6F = YKHO.angular_diameter_distance_to_earth_in_kpc_from(redshift=bRAh)\n RD2E... | [
"0.5736522",
"0.5468514",
"0.5261506",
"0.5197402",
"0.5194858",
"0.5136482",
"0.510527",
"0.5055507",
"0.50442594",
"0.50073904",
"0.49917948",
"0.49832353",
"0.4973439",
"0.49464872",
"0.49387696",
"0.49341616",
"0.4932079",
"0.49188194",
"0.4904719",
"0.48829317",
"0.48655... | 0.63098997 | 0 |
Critical density of the Universe at an input `redshift` in units of solar masses per kiloparsecs3. For simplicity, PyAutoLens internally uses only certain units to perform lensing cosmology calculations. This function therefore returns only the value of the astropy function it wraps, omitting the units instance. | def EozG(YKHO, lfmz: float) -> float:
iYsj = YKHO.critical_density(z=lfmz).to('solMass / kpc^3').value
return iYsj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pWSU(YKHO, lfmz: float) -> float:\n iYsj = YKHO.critical_density(z=lfmz).to('solMass / kpc^3').value\n ShwZ = YKHO.kpc_per_arcsec_from(redshift=lfmz)\n return iYsj * ShwZ ** 3.0",
"def LcM3(YKHO, JXAV: float, bRAh: float, tRSD: float) -> float:\n PtXs = uwaB.c.to('kpc / s')\n aW6F = YKHO.angul... | [
"0.64371884",
"0.53388387",
"0.529253",
"0.52564305",
"0.52206063",
"0.52093744",
"0.51663804",
"0.51166064",
"0.5063379",
"0.5059959",
"0.5028908",
"0.5023926",
"0.49665996",
"0.49444568",
"0.49265274",
"0.49237964",
"0.49156985",
"0.49134538",
"0.48927638",
"0.48891136",
"0... | 0.6215723 | 1 |
sets the id of the news entry | def V_9M(YKHO, id):
YKHO.data['id'] = id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def V_9M(YKHO, hbFX=None):\n if hbFX is None:\n YKHO.id = id(YKHO)\n else:\n YKHO.id = hbFX",
"def f6Qh(YKHO, BWXx):\n pass",
"def V_9M(YKHO, id):\n YKHO.__id = id",
"def ekm0(YKHO, quXY):\n YKHO.id = quXY",
"def ekm0(YKHO, eEzR):\n YKHO._id = eEzR",
"def id(YKHO, _eu6):\n... | [
"0.6828751",
"0.6761383",
"0.67586935",
"0.67472947",
"0.6734875",
"0.6717437",
"0.67069846",
"0.67035455",
"0.6681602",
"0.6681589",
"0.6681589",
"0.6681589",
"0.6681589",
"0.6681589",
"0.6681589",
"0.6681589",
"0.6681589",
"0.6681589",
"0.6681589",
"0.6681589",
"0.6681589",... | 0.6995008 | 0 |
Adds the title and uppercase version of all words to STOP_WORDS. | def yieG():
with open(befr, 'r', encoding='utf-8') as MZf5:
for GIN8 in MZf5.read().splitlines():
jMRN.add(GIN8)
with open(adk6, 'r', encoding='utf-8') as MZf5:
for GIN8 in MZf5.read().splitlines():
jMRN.add(GIN8)
VQTW = list()
for GIN8 in jMRN:
VQTW.appen... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lLdH():\n zzmi = ['uk', 'ceo', 'apple', 'wal', 'st', 'q1', 'q2', 'q3', 'q4', 'bp', 'wednesday', 'tuesday', 'monday', 'thursday', 'friday', 'sept', 'johnson', 'inc', 'david', 'amazon.com']\n for V22M in zzmi:\n jMRN.add(V22M)\n return jMRN",
"def aUcs(l5Ny):\n l5Ny = ' ' + l5Ny\n l5Ny = ... | [
"0.707975",
"0.70270795",
"0.6941437",
"0.68861854",
"0.681929",
"0.679386",
"0.67089653",
"0.668478",
"0.668478",
"0.668478",
"0.6642815",
"0.6623371",
"0.6576504",
"0.6553525",
"0.6529611",
"0.650215",
"0.6486574",
"0.64779896",
"0.64553416",
"0.64553416",
"0.64553416",
"... | 0.7616774 | 0 |
Return a fresh copy graph with the same data structure. A fresh copy has no nodes, edges or graph attributes. It is the same data structure as the current graph. This method is typically used to create an empty version of the graph. | def DPa6(YKHO):
return c8mm() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jth9(YKHO):\n Emd4 = YKHO.__class__\n pIsY = Emd4.__new__(Emd4)\n pIsY._nodes = YKHO._nodes[:]\n pIsY._node_wip = YKHO._node_wip[:]\n pIsY._edges = YKHO._edges[:]\n if YKHO._sorted_nodes:\n pIsY._sorted_nodes = YKHO._sorted_nodes[:]\n else:\n pIsY._sorted_nodes = None\n pI... | [
"0.84219307",
"0.83663255",
"0.83062893",
"0.8250601",
"0.8203087",
"0.8103278",
"0.79537326",
"0.79145586",
"0.79142976",
"0.79041946",
"0.7901522",
"0.77018166",
"0.76641226",
"0.7524745",
"0.75172186",
"0.75008947",
"0.7400445",
"0.73858595",
"0.7326366",
"0.72857517",
"0.... | 0.8160918 | 5 |
Return a fresh copy graph with the same data structure. A fresh copy has no nodes, edges or graph attributes. It is the same data structure as the current graph. This method is typically used to create an empty version of the graph. | def DPa6(YKHO):
return wVBs() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jth9(YKHO):\n Emd4 = YKHO.__class__\n pIsY = Emd4.__new__(Emd4)\n pIsY._nodes = YKHO._nodes[:]\n pIsY._node_wip = YKHO._node_wip[:]\n pIsY._edges = YKHO._edges[:]\n if YKHO._sorted_nodes:\n pIsY._sorted_nodes = YKHO._sorted_nodes[:]\n else:\n pIsY._sorted_nodes = None\n pI... | [
"0.8420824",
"0.8365685",
"0.83049476",
"0.82497627",
"0.8202765",
"0.8159696",
"0.81026006",
"0.79131204",
"0.79130584",
"0.7903769",
"0.78999126",
"0.77008337",
"0.7663082",
"0.7524527",
"0.7516381",
"0.7499562",
"0.73998064",
"0.73850435",
"0.7325789",
"0.728422",
"0.71828... | 0.7952445 | 7 |
Return a fresh copy graph with the same data structure. A fresh copy has no nodes, edges or graph attributes. It is the same data structure as the current graph. This method is typically used to create an empty version of the graph. | def DPa6(YKHO):
return fcLA() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jth9(YKHO):\n Emd4 = YKHO.__class__\n pIsY = Emd4.__new__(Emd4)\n pIsY._nodes = YKHO._nodes[:]\n pIsY._node_wip = YKHO._node_wip[:]\n pIsY._edges = YKHO._edges[:]\n if YKHO._sorted_nodes:\n pIsY._sorted_nodes = YKHO._sorted_nodes[:]\n else:\n pIsY._sorted_nodes = None\n pI... | [
"0.84214675",
"0.83658355",
"0.8306031",
"0.8249845",
"0.8202703",
"0.81601024",
"0.81031305",
"0.7952771",
"0.79137266",
"0.7913162",
"0.79040235",
"0.7701961",
"0.76640254",
"0.7524447",
"0.751674",
"0.750044",
"0.7399624",
"0.73853135",
"0.73256195",
"0.72850287",
"0.71834... | 0.7900664 | 11 |
Return a fresh copy graph with the same data structure. A fresh copy has no nodes, edges or graph attributes. It is the same data structure as the current graph. This method is typically used to create an empty version of the graph. | def DPa6(YKHO):
return HTg3() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jth9(YKHO):\n Emd4 = YKHO.__class__\n pIsY = Emd4.__new__(Emd4)\n pIsY._nodes = YKHO._nodes[:]\n pIsY._node_wip = YKHO._node_wip[:]\n pIsY._edges = YKHO._edges[:]\n if YKHO._sorted_nodes:\n pIsY._sorted_nodes = YKHO._sorted_nodes[:]\n else:\n pIsY._sorted_nodes = None\n pI... | [
"0.84212935",
"0.8365541",
"0.8305631",
"0.8250085",
"0.82028264",
"0.816014",
"0.81027246",
"0.7952815",
"0.7913063",
"0.79037225",
"0.79009056",
"0.7701285",
"0.76630205",
"0.7523658",
"0.75167346",
"0.750041",
"0.7399628",
"0.7385654",
"0.7326312",
"0.7285566",
"0.71832746... | 0.7913884 | 8 |
Set the center on the view to the senter of the flowsheet The center of the flowsheet is determined from extreme locations of the nodes. | def hgjH(YKHO):
U7YL = YKHO.dat.flowsheet.getCenter()
YKHO.centerOn(U7YL[0], U7YL[1]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rRi1(YKHO):\n PdxY = oyIN.array([YKHO.sl_list[G1Hx].mean_pos for G1Hx in range(YKHO.nb_sl)])\n do93 = oyIN.array([YKHO.sl_list[G1Hx].nb_points for G1Hx in range(YKHO.nb_sl)])\n l1jB = [PdxY[G1Hx] * do93[G1Hx] for G1Hx in range(YKHO.nb_sl)]\n YKHO.center = oyIN.sum(l1jB, axis=0) / oyIN.sum(do93)",
... | [
"0.69523156",
"0.68890136",
"0.68816787",
"0.68740904",
"0.6835087",
"0.67948747",
"0.67948747",
"0.67784035",
"0.6750598",
"0.6750598",
"0.6750598",
"0.67261076",
"0.66637397",
"0.6605356",
"0.6603063",
"0.65918773",
"0.65791875",
"0.6560546",
"0.65551025",
"0.653111",
"0.64... | 0.8061834 | 0 |
Plots the cumulative quantiles along with a scatter plot of observations. | def _LeI(gGnb, sbqU=960, Gxd2=480, jtEq=True):
kj9G = vI3f.figure(plot_width=960, plot_height=480)
ZWCE = gGnb.columns.levels[0]
bLOI = {mWFP: qfpW for mWFP, qfpW in zip(ZWCE, Jw9H.colors(len(ZWCE)))}
def JmFt(uOe2):
mWFP = uOe2.columns[0][0]
qfpW = bLOI[mWFP]
uOe2.columns = uOe... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sB_C(YKHO, **xAU6):\n QrM1.plot(YKHO.xs, YKHO.ps, **xAU6)",
"def kj9G(YKHO, aNZO=None, IICq='CDF(x)', VoLU='y', ZDDw=0.25, KKKg=0.75, rxOD=False, nUHY=False, q5GV=None, qfpW='C2', NOTm=False):\n \"\"\"If data set is empty, return without plotting\"\"\"\n if YKHO.samples_x == []:\n return\n ... | [
"0.6480232",
"0.6239808",
"0.6182467",
"0.61039776",
"0.6094828",
"0.5893651",
"0.5855495",
"0.5839857",
"0.58190364",
"0.58065814",
"0.57932925",
"0.5782105",
"0.5743036",
"0.5734393",
"0.57228744",
"0.5700729",
"0.5695588",
"0.5687981",
"0.5663579",
"0.56196505",
"0.5613191... | 0.7104273 | 0 |
Create a plotly graph locally as an HTML document or string. | def kj9G(cV4S, kWqu=True, AN55='Export to plot.ly', xzCw=True, nSMW='file', WUE2=True, Ux0P='temp-plot.html', J2PB=True, LNo8=None, s9Nk='plot_image', Kmi0=800, l5eN=600):
if nSMW not in ['div', 'file']:
raise ValueError("`output_type` argument must be 'div' or 'file'. You supplied `" + nSMW + '``')
if ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xkzz(YKHO, bGrB=None, Ux0P='SME.html', **B2fa):\n if Ux0P.endswith('.html'):\n YKHO.fig.layout.dragmode = 'zoom'\n LZpg = YKHO.fig.to_plotly_json()\n for YRbF in range(len(LZpg['data'])):\n for aNZO in ['x', 'y']:\n nPrm = oyIN.asarray(LZpg['data'][YRbF][aNZO])... | [
"0.679223",
"0.67849326",
"0.66687316",
"0.6390206",
"0.63864034",
"0.6373333",
"0.6360069",
"0.6243555",
"0.6032301",
"0.6000186",
"0.5980495",
"0.5906017",
"0.5902987",
"0.58614886",
"0.58324695",
"0.5827365",
"0.5819732",
"0.58169335",
"0.5796467",
"0.5795816",
"0.5780062"... | 0.6640358 | 3 |
Returns the string representation of the proxy used. | def eWlL(YKHO):
return YKHO._proxy | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Gg7S(YKHO):\n return YKHO.proxyName",
"def kMyc(YKHO):\n return YKHO.get('proxy', None)",
"def pZDx(YKHO) -> w4ot:\n return YKHO._proxy_host",
"def govX(YKHO):\n return YKHO.__proxysockname",
"def xgM5():\n geh0 = G4JS.get('http://127.0.0.1:5010/get/')\n GtGV = geh0.json()\n kMyc =... | [
"0.7139966",
"0.6801072",
"0.6794877",
"0.6779459",
"0.6777351",
"0.67767555",
"0.67767555",
"0.6754784",
"0.66551405",
"0.6607475",
"0.6555551",
"0.6486769",
"0.64747715",
"0.64695466",
"0.64648116",
"0.64499325",
"0.6388234",
"0.63070273",
"0.62525475",
"0.616892",
"0.61523... | 0.6161361 | 20 |
Returns the string representing the Domain URL which is required to retrieve the information being investigated. | def rOmR(YKHO):
return YKHO._sourceurl | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zrIJ(YKHO):\n return oJd6(YKHO.url, fail_silently=True)",
"def zrIJ(YKHO):\n return YKHO._get('domain', '/domain/', YKHO.DOMAIN_DATA)",
"def zrIJ(YKHO):\n return YKHO['domain']",
"def zrIJ(YKHO) -> str:\n return qe4Y.get(YKHO, 'domain')",
"def zrIJ(YKHO) -> str:\n return qe4Y.get(YKHO, '... | [
"0.79086447",
"0.7720846",
"0.74773824",
"0.7447763",
"0.7447763",
"0.74225754",
"0.73539925",
"0.73244125",
"0.7322398",
"0.7322398",
"0.7242937",
"0.7186858",
"0.7169622",
"0.7150315",
"0.70917654",
"0.70605576",
"0.70549375",
"0.7045601",
"0.7045601",
"0.70344806",
"0.7015... | 0.0 | -1 |
Returns the string representing the Error Message. | def Xwgg(YKHO):
return YKHO._errormessage | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rhwM(YKHO) -> str:\n return YKHO._error_message",
"def rhwM(YKHO):\n return YKHO._error_message",
"def rhwM(YKHO) -> str:\n return qe4Y.get(YKHO, 'error_message')",
"def rhwM(YKHO) -> str:\n return qe4Y.get(YKHO, 'error_message')",
"def rhwM(YKHO) -> str:\n return qe4Y.get(YKHO, 'error_m... | [
"0.8715514",
"0.86882985",
"0.8610572",
"0.8610572",
"0.8610572",
"0.8506367",
"0.8466283",
"0.84255916",
"0.8367896",
"0.8318581",
"0.8238673",
"0.81212854",
"0.80014986",
"0.7999241",
"0.79918236",
"0.7987822",
"0.79599774",
"0.78860587",
"0.78704005",
"0.78704005",
"0.7870... | 0.7587303 | 35 |
Determines if PostData was set for this specific site. Returns the dict representing the PostHeaders using the _postdata instance variable or returns None if the instance variable is empty or not set. | def a6VO(YKHO):
if YKHO._postdata is None:
return None
if len(YKHO._postdata) == 0:
return None
return YKHO._postdata | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aqR5(QePW):\n if juaD(QePW):\n return QePW.POST\n return None",
"def BZEE(YKHO, m8z6, TR0X):\n B2Dn = {'entity': 'question' if TR0X else 'answer'}\n try:\n B2Dn['title'] = uL_v(m8z6.find('div', 'lia-message-subject').h1.renderContents())\n except:\n RKD7.info(YKHO.log_msg(... | [
"0.5305585",
"0.52151334",
"0.51798886",
"0.5088963",
"0.5038492",
"0.50245345",
"0.49905387",
"0.497489",
"0.48960695",
"0.4741161",
"0.468527",
"0.46661943",
"0.46616688",
"0.46216428",
"0.4614731",
"0.4614731",
"0.4563082",
"0.45551315",
"0.45462132",
"0.4533801",
"0.45312... | 0.6618721 | 0 |
Determines if post data was required for this specific site. If postdata is set, this ensures %TARGET% is stripped if necessary. | def a6VO(YKHO, QhPB):
if len(QhPB) > 0:
for H5ew in QhPB:
if QhPB[H5ew] == '%TARGET%':
QhPB[H5ew] = YKHO._target
YKHO._postdata = QhPB
else:
YKHO._postdata = None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SGVO(YKHO):\n return YKHO.post_processor in ll6t.valid_list()",
"def aIlr(m8z6):\n return True",
"def TOFb(YKHO):\n if YKHO.as_source:\n return True\n if YKHO.allow_source_from_get and YKHO.request.GET.get('src', False):\n return True\n if YKHO.allow_source_from_post and YKHO.r... | [
"0.5359993",
"0.5346201",
"0.53065115",
"0.5280513",
"0.5230612",
"0.52005696",
"0.5187851",
"0.51838547",
"0.504217",
"0.5031495",
"0.4922698",
"0.49035954",
"0.48535368",
"0.48302683",
"0.48148128",
"0.48025036",
"0.4801166",
"0.48001438",
"0.47760928",
"0.47676784",
"0.471... | 0.62356067 | 0 |
Determines if a method (GET or POST) was established for this specific site. Defaults to GET | def _W0Q(YKHO):
if YKHO._method is None:
return 'GET'
if len(YKHO._method) == 0:
return 'GET'
return YKHO._method | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _W0Q(YKHO, NKcE):\n if not YKHO.PostData:\n YKHO._method = 'GET'\n return\n if len(NKcE) > 0:\n if NKcE.upper() == 'GET' or NKcE.upper() == 'POST':\n YKHO._method = NKcE.upper()\n return\n YKHO._method = 'GET'",
"def jZqH(YKHO):\n return YKHO._environ['R... | [
"0.75635976",
"0.7357781",
"0.726872",
"0.72525144",
"0.7188877",
"0.71883714",
"0.7163842",
"0.71323234",
"0.69945306",
"0.6738737",
"0.6635378",
"0.66118854",
"0.65660936",
"0.642897",
"0.6399314",
"0.6391906",
"0.6367677",
"0.6315911",
"0.62245566",
"0.6220642",
"0.6200616... | 0.7398864 | 1 |
Ensures the method type is set to either GET or POST. By default GET is assigned | def _W0Q(YKHO, NKcE):
if not YKHO.PostData:
YKHO._method = 'GET'
return
if len(NKcE) > 0:
if NKcE.upper() == 'GET' or NKcE.upper() == 'POST':
YKHO._method = NKcE.upper()
return
YKHO._method = 'GET' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def luoN(YKHO, NKcE):\n NKcE = NKcE.upper()\n if NKcE not in ['GET', 'POST']:\n NKcE = 'POST'\n return NKcE",
"def YxsS(YKHO):\n WW0A = 'POST' if YKHO.data is not None else 'GET'\n return getattr(YKHO, 'method', WW0A)",
"def NKcE(Emd4, QePW):\n Ylbp = Emd4.METHOD_MAP[QePW.method]\n ... | [
"0.74105114",
"0.7407985",
"0.71566236",
"0.69178337",
"0.6908245",
"0.67906976",
"0.6734323",
"0.6590922",
"0.6429892",
"0.6397371",
"0.6217319",
"0.6213421",
"0.61995846",
"0.6152464",
"0.6150256",
"0.6146974",
"0.6144766",
"0.61141807",
"0.6092046",
"0.6075735",
"0.5996569... | 0.81574565 | 0 |
Get or create a new logger. This newly created logger will have the handler and level that was passed, but if it already exists it's not changed. We also wrap the logger in an adapter so we can easily extend its functionality. | def zbtT(YKHO, mWFP, ABDL, DCgT=None):
if DCgT and (not YKHO._log_exists(mWFP)):
bo34 = G9jH.getLogger(mWFP)
bo34.addHandler(DCgT)
YKHO._set_logger_level(bo34, ABDL)
else:
bo34 = G9jH.getLogger(mWFP)
YKHO._all_names.add(mWFP)
I5L_ = fjkp(bo34, None)
I5L_.set_json_enab... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NhPg(bo34: logging.Logger, **OaeV) -> af69:\n return af69(bo34, dict(ctx=OaeV))",
"def fZx2(*, E70h):\n bo34 = G9jH.getLogger(E70h)\n bo34.setLevel(G9jH.INFO)\n bo34.addHandler(In9A())\n bo34.addHandler(oAuJ())\n bo34.propagate = False\n return bo34",
"def fZx2():\n global logger\n ... | [
"0.7133684",
"0.7032485",
"0.70108587",
"0.69675606",
"0.69428074",
"0.6914743",
"0.69070345",
"0.6897019",
"0.6893938",
"0.6893086",
"0.686731",
"0.68576175",
"0.681974",
"0.6818613",
"0.6807231",
"0.6797505",
"0.67921656",
"0.6783108",
"0.67599016",
"0.6741625",
"0.6718331"... | 0.8102379 | 0 |
Split list or generator by chunks with fixed maximum size. | def sehz(OxJJ: Iterable[T], zNig: int) -> iu5r[x1iM[Kt_s]]:
OxJJ = iter(OxJJ)
ZfUD = list(Hs6x.islice(OxJJ, zNig))
while ZfUD:
yield ZfUD
ZfUD = list(Hs6x.islice(OxJJ, zNig)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hXED(list, ztRo):\n for YRbF in range(0, len(list), ztRo):\n yield list[YRbF:YRbF + ztRo]",
"def _Qd3(a7r8, ztRo):\n assert a7r8 is not None\n for YRbF in range(0, len(a7r8), ztRo):\n yield a7r8[YRbF:YRbF + ztRo]",
"def eHxA(yv6U, ztRo):\n for YRbF in range(0, len(yv6U), ztRo):\n ... | [
"0.8029146",
"0.7866675",
"0.7706884",
"0.7705638",
"0.7693641",
"0.7636561",
"0.759437",
"0.7518479",
"0.74862957",
"0.74771607",
"0.74649835",
"0.74636126",
"0.74614024",
"0.742523",
"0.7384342",
"0.7381355",
"0.7377896",
"0.7340886",
"0.73281103",
"0.7326142",
"0.73247826"... | 0.0 | -1 |
Draw detected bounding boxes. | def _1rj(Xn71, _2sc, l40E, knl1=0.8):
global num
noZV = oyIN.where(l40E[:, -1] >= knl1)[0]
if len(noZV) == 0:
return
f4IJ = Xn71
Xn71 = Xn71[:, :, (2, 1, 0)]
for YRbF in noZV:
cviu = l40E[YRbF, :4]
p1kx = l40E[YRbF, -1]
XC5k.rectangle(f4IJ, (cviu[0], cviu[1]), (cv... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sGG5(YKHO, NncF, hlel):\n for YRbF, edvT in enumerate(NncF):\n if edvT[2] > hlel.shape[1] or edvT[3] > hlel.shape[0] or edvT[0] < 0 or (edvT[1] < 0):\n continue\n XC5k.rectangle(oyIN.asarray(hlel), (edvT[0], edvT[1]), (edvT[2], edvT[3]), YKHO.colors[YRbF % len(YKHO.colors)], thickne... | [
"0.77598673",
"0.7638101",
"0.7510348",
"0.72977304",
"0.7150563",
"0.7103931",
"0.7101873",
"0.7083905",
"0.7020769",
"0.6993739",
"0.6974172",
"0.69637305",
"0.6859061",
"0.68521667",
"0.68319523",
"0.6830371",
"0.6809837",
"0.6805064",
"0.67750585",
"0.6774759",
"0.6742592... | 0.0 | -1 |
return spin operators for the spin at position. with only = "", a dictionary with entries Ix, Iy, Iz, Ip, Im is returned. if only is a key of that dictionary, only the matrix representation of the specified operator is returned. | def UxCP(SxVy, dQgj, ZN4Y=''):
L8b2 = oyIN.diag([Fg_i.Iz(dQgj) for Fg_i in SxVy])
return L8b2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OfrP(H5ew):\n if H5ew.startswith('re_'):\n seET = oyIN.real\n aRpU = H5ew[3:]\n elif H5ew.startswith('im_'):\n seET = oyIN.imag\n aRpU = H5ew[3:]\n elif H5ew.startswith('abs_'):\n seET = oyIN.abs\n aRpU = H5ew[4:]\n else:\n seET = None\n aRpU ... | [
"0.6678933",
"0.55626637",
"0.5474227",
"0.54608226",
"0.54563135",
"0.5422534",
"0.5388054",
"0.537671",
"0.53572994",
"0.5349381",
"0.53020555",
"0.53020555",
"0.53020555",
"0.529534",
"0.5279458",
"0.52203685",
"0.5192929",
"0.5138817",
"0.51284856",
"0.511319",
"0.5109030... | 0.69203335 | 0 |
Returns a LinearOperator using eigenvalues and eigenvectors as given by sparse.linalg.eigen. This LinearOperator can be seen as an approximation of the operator on which the eigen function has been run. Inputs | def D5fh(ROpF, tTpl, Ty9i, **PECO):
def U14a(WKvO):
G1Hx = [oyIN.dot(WKvO.T, RJv6) for RJv6 in Ty9i]
return oyIN.sum([BOse * iLlx * RJv6 for BOse, iLlx, RJv6 in zip(G1Hx, tTpl, Ty9i)], axis=0)
return qlPq(ROpF, matvec=U14a, rmatvec=U14a, **PECO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def um7R(YKHO, k0lF, E3D9, mLGw, tKA5, rGHn, Nygx, yJiH, h3Np, WfOk):\n from slepc4py import SLEPc\n ut5U = SLEPc.EPS()\n ut5U.create()\n ut5U.setOperators(k0lF, E3D9)\n ut5U.setProblemType(getattr(SLEPc.EPS.ProblemType, tKA5))\n ut5U.setType(getattr(SLEPc.EPS.Type, rGHn))\n ut5U.setWhichEigen... | [
"0.6471827",
"0.63047266",
"0.6207193",
"0.60965955",
"0.60938126",
"0.60121226",
"0.59789973",
"0.5941303",
"0.5834583",
"0.56577486",
"0.5643125",
"0.56209755",
"0.56108844",
"0.5596537",
"0.55823183",
"0.55808496",
"0.556371",
"0.5560485",
"0.5551935",
"0.55268985",
"0.550... | 0.722874 | 0 |
Returns a 3D gaussian function with the given parameters | def BKOX(l592, JPqE, fXzF, H2v2, Pj8R, bF5a, Fk0k):
bF5a = float(bF5a)
Fk0k = float(Fk0k)
Pj8R = float(Pj8R)
return lambda epBp, WKvO, LVAh: H2v2 * oyIN.exp(-(((l592 - epBp) / Pj8R) ** 2 + ((JPqE - WKvO) / bF5a) ** 2 + ((fXzF - LVAh) / Fk0k) ** 2) / 2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _b_Y(WKvO, XOOk, dg7v, s1k6, pHXX, iYf1, xMw6, MgfK, NsEr, RZeI):\n return IAWS(WKvO, XOOk, dg7v, s1k6) + IAWS(WKvO, pHXX, iYf1, xMw6) + IAWS(WKvO, MgfK, NsEr, RZeI)",
"def BKOX(vC9B, WTkW=1.0):\n aNZO = oyIN.arange(-vC9B // 2 + 1.0, vC9B // 2 + 1.0)\n CAzz, Jd40, Ud7_ = oyIN.meshgrid(aNZO, aNZO, aN... | [
"0.73642",
"0.7021302",
"0.68343",
"0.6534918",
"0.64060897",
"0.6329809",
"0.61930066",
"0.61684626",
"0.61375004",
"0.61375004",
"0.61375004",
"0.60913557",
"0.60905373",
"0.60829175",
"0.6072532",
"0.6052405",
"0.6048814",
"0.6014103",
"0.5983202",
"0.59682137",
"0.5943405... | 0.78389746 | 0 |
Closes the conenction to the server. | async def close(YKHO) -> None:
assert YKHO._client is not None
await YKHO._client.close()
YKHO._client = None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EKNI(YKHO):\n x0hE.close()",
"def DOtz(YKHO):\n YKHO.socket.close()",
"def DDI8(YKHO):\n YKHO.control_conn.sendall('CLOSE'.encode())",
"def ngVb(YKHO):\n YKHO._connection.close()\n print('Closed connection....')",
"def DDI8(YKHO):\n YKHO._server.shutdown()\n YKHO._server = None",
... | [
"0.8058159",
"0.7863372",
"0.7856422",
"0.77991384",
"0.7746718",
"0.7709212",
"0.7700577",
"0.7692921",
"0.7692519",
"0.76925087",
"0.7680899",
"0.7651755",
"0.76077545",
"0.76054543",
"0.76054543",
"0.76054543",
"0.76054543",
"0.76054543",
"0.76054543",
"0.75987077",
"0.759... | 0.0 | -1 |
Receives a player's color and returns their General | def ahH8(YKHO, qfpW):
for mrj1 in YKHO._active_pieces[qfpW]:
if type(mrj1) is x7Qt:
return mrj1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oyg0(YKHO):\n return YKHO._color",
"def OfFN(YKHO, JGOR):\n if JGOR == Zt2U.BLACK:\n return Zt2U.WHITE\n elif JGOR == Zt2U.WHITE:\n return Zt2U.BLACK\n else:\n raise NotImplementedError()",
"def JNmk():\n return input('What color do you want the petals to be?')",
"def ... | [
"0.72289145",
"0.686527",
"0.669872",
"0.66786665",
"0.6642646",
"0.66236687",
"0.66029984",
"0.65610754",
"0.6542995",
"0.64548784",
"0.6379941",
"0.6379941",
"0.6379941",
"0.6379941",
"0.6336708",
"0.6333549",
"0.6319794",
"0.63022846",
"0.6290927",
"0.6285306",
"0.62555426... | 0.61507404 | 28 |
Initiates the Piece object for the designated player at the designated location on the game board. | def FIMM(YKHO, qfpW, Rci7):
YKHO._color = qfpW
YKHO._piece_type = None
YKHO._location = Rci7 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, iBIi, dQgj, oyg0, Oa6J):\n YKHO.board = iBIi\n YKHO.position = dQgj\n YKHO.player = oyg0\n YKHO.piece_behavior = Oa6J",
"def FIMM(YKHO, oyg0):\n YKHO._piece_type = 'pawn'\n YKHO._value = 2 if oyg0 == 'white' else -2\n YKHO._summary = 'W-Pw' if oyg0 == 'white' else 'B-Pw'\n ... | [
"0.7369072",
"0.6755652",
"0.64940494",
"0.64635086",
"0.6440044",
"0.63020295",
"0.6297643",
"0.62879086",
"0.6278679",
"0.6266741",
"0.62431675",
"0.6222203",
"0.62182754",
"0.6205422",
"0.6190671",
"0.61836106",
"0.6157939",
"0.6155256",
"0.61341935",
"0.6118258",
"0.60878... | 0.0 | -1 |
Returns _color data member value. | def PICn(YKHO):
return YKHO._color | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mvpM(YKHO):\n return YKHO.__color",
"def mvpM(YKHO):\n return YKHO.__color",
"def mvpM(YKHO):\n return YKHO.__color",
"def mvpM(YKHO):\n return YKHO.__color",
"def PICn(YKHO):\n return YKHO.__color",
"def PICn(YKHO):\n return YKHO._color",
"def qfpW(YKHO):\n return YKHO['color'... | [
"0.8376114",
"0.8376114",
"0.8376114",
"0.8376114",
"0.83480686",
"0.8335768",
"0.8198367",
"0.81914383",
"0.81914383",
"0.8164497",
"0.8097534",
"0.80700284",
"0.804404",
"0.804404",
"0.80084455",
"0.80084455",
"0.80084455",
"0.79912156",
"0.7982103",
"0.7914775",
"0.7887134... | 0.79757 | 19 |
Check if hash of passwords are equal hash(self.password)=hash(password) | def e3F7(YKHO, jTXt):
return axsU().check_password_hash(YKHO.password, jTXt) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def O5SI(YKHO):\n Ntj0 = mv1M()\n Ntj0._password = YKHO.test_hash\n YKHO.assertTrue(Ntj0._password == YKHO.test_hash, 'Setting should have hash')\n YKHO.assertTrue(Ntj0.password == YKHO.test_hash, 'Getting should have hash')\n YKHO.assertTrue(Ntj0.validate_password(YKHO.test_password), 'The password... | [
"0.77653253",
"0.7730096",
"0.75776136",
"0.74381065",
"0.7389964",
"0.7245792",
"0.7238476",
"0.72016066",
"0.71889377",
"0.7167593",
"0.71634805",
"0.7163377",
"0.715206",
"0.71175146",
"0.71130484",
"0.7101497",
"0.70774394",
"0.7023976",
"0.70046425",
"0.6996388",
"0.6984... | 0.69659066 | 24 |
Returns a representation of a activity instance | def wHJl(YKHO):
return '<Activities: {}>'.format(YKHO.name) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rxHD():\n return {'type': 'class', 'base': None, 'is_abstract': True, 'is_document': True, 'pstr': ('{}', ('canonical_name',)), 'properties': [('alternative_names', 'str', '0.N', 'List of names by which the activity is also known.'), ('canonical_name', 'str', '0.1', 'Community defined identifier or name.'),... | [
"0.74904555",
"0.7374664",
"0.7041148",
"0.68767494",
"0.6654494",
"0.63959736",
"0.63094676",
"0.6303493",
"0.627519",
"0.62664264",
"0.6261078",
"0.5980647",
"0.59064794",
"0.5896446",
"0.58883405",
"0.5884998",
"0.58688504",
"0.5849311",
"0.58141786",
"0.57516664",
"0.5736... | 0.74235255 | 1 |
Sets the type of this AuthenticityCheckResultItem. | def type(YKHO, type):
if YKHO.local_vars_configuration.client_side_validation and type is None:
raise ValueError('Invalid value for `type`, must not be `None`')
YKHO._type = type | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TG_K(YKHO, type):\n YKHO.type = type",
"def TG_K(YKHO, type):\n YKHO.type = type",
"def TG_K(YKHO, type):\n YKHO._type = type",
"def DyBY(YKHO, zkAN):\n pass",
"def TG_K(YKHO, type: int):\n YKHO.type = type\n YKHO.canvas.itemconfig(YKHO.item, image=YKHO._get_image())",
"def type(YKH... | [
"0.6594546",
"0.6594546",
"0.6442677",
"0.63364863",
"0.6222679",
"0.62077117",
"0.62077117",
"0.6201682",
"0.6176816",
"0.61493254",
"0.6144453",
"0.6144453",
"0.6144453",
"0.6144453",
"0.6144453",
"0.6144453",
"0.6144453",
"0.6144453",
"0.6144453",
"0.6144453",
"0.6144453",... | 0.5675595 | 77 |
Returns true if both objects are equal | def xa14(YKHO, Elif):
if not isinstance(Elif, Mrdq):
return False
return YKHO.to_dict() == Elif.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n return p6XU(YKHO, Elif)",
"def xa14(YKHO, Elif):\n try:\n return YKHO.object == Elif.object and isinstance(YKHO, type(Elif))\n except:\n return False",
"def xa14(YKHO, Elif):\n if isinstance(YKHO, Elif.__c... | [
"0.8088132",
"0.8088132",
"0.8054589",
"0.7982687",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
"0.79670393",
... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
if not isinstance(Elif, Mrdq):
return True
return YKHO.to_dict() != Elif.to_dict() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif) -> bool:\n return not YKHO.__eq__(Elif)",
"def xa14(YKHO, Elif):\n return not YKHO.__ne__(Elif)",
... | [
"0.845611",
"0.8391477",
"0.8144138",
"0.81410587",
"0.8132492",
"0.8093973",
"0.80920255",
"0.80920255",
"0.80920255",
"0.8085325",
"0.8085325",
"0.8076365",
"0.8076365",
"0.8065748",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
"0.8042487",
... | 0.0 | -1 |
mute the sound. status is just a override. | def KkzS(YKHO, jGRS=None):
if jGRS is not None:
aevO = jGRS
else:
aevO = not jGRS.volume_muted
YKHO._socket_client.receiver_controller.set_volume_muted(aevO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KkzS(YKHO, jGRS=None):\n if jGRS is None:\n jGRS = not YKHO.status.volume_muted\n YKHO._socket_client.receiver_controller.set_volume_muted(jGRS)",
"def KkzS(YKHO, BWXx: bool) -> None:\n YKHO.audio_mixer.setmute(BWXx)\n YKHO.update_status()",
"def KkzS():\n pyJd(tv_command=Lle2.mute)",... | [
"0.79011047",
"0.77795583",
"0.75733083",
"0.75358844",
"0.73930043",
"0.72407174",
"0.716834",
"0.7087595",
"0.706618",
"0.70261353",
"0.69888914",
"0.6970083",
"0.68739045",
"0.6839842",
"0.6749241",
"0.6728343",
"0.6677621",
"0.6664756",
"0.66239315",
"0.6607038",
"0.65938... | 0.80609 | 0 |
Initialises the current and the max val fields for this display bar. | def _GMr(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, kpLf, JCoA):\n YKHO.values = (kpLf, JCoA)",
"def FIMM(YKHO, kpLf, JCoA):\n YKHO.values = (kpLf, JCoA)",
"def FIMM(YKHO, kpLf, JCoA):\n YKHO.values = (kpLf, JCoA)",
"def FIMM(YKHO, kpLf, JCoA):\n YKHO.values = (kpLf, JCoA)",
"def FIMM(YKHO, uBsB=100, XNgG=False, e1vZ=HwRy.stderr):... | [
"0.6614599",
"0.6614599",
"0.6614599",
"0.6614599",
"0.62974113",
"0.6202602",
"0.6170325",
"0.61686224",
"0.61104923",
"0.60626036",
"0.6053629",
"0.60061437",
"0.5998231",
"0.59694487",
"0.5918838",
"0.5909775",
"0.5883775",
"0.5883775",
"0.5878681",
"0.58129126",
"0.581193... | 0.0 | -1 |
Add a vertex to the graph. | def ohmD(YKHO, oqUi):
YKHO.vertices[oqUi] = set() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ohmD(YKHO, SLBp):\n raise NotImplementedError",
"def ohmD(YKHO, SLBp):\n if isinstance(SLBp, Yegm):\n YKHO.vertices.append(SLBp)\n return\n raise TypeError('Is not vertex instance!')",
"def ohmD(YKHO, niHF: n):\n rJkO = Yegm(niHF)\n YKHO._graph[rJkO.name] = rJkO",
"def ohmD(Y... | [
"0.87015903",
"0.84329987",
"0.8422056",
"0.840923",
"0.83646226",
"0.8317027",
"0.825337",
"0.808519",
"0.8081489",
"0.8038682",
"0.8035422",
"0.78834563",
"0.78711975",
"0.7838118",
"0.7838118",
"0.77608305",
"0.7757061",
"0.77158874",
"0.7711681",
"0.76663774",
"0.76616603... | 0.73652923 | 31 |
Add a directed edge to the graph. | def rz7z(YKHO, hQHm, jlSq):
if hQHm in YKHO.vertices and jlSq in YKHO.vertices:
YKHO.vertices[hQHm].add(jlSq) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rz7z(YKHO, D70y):\n zZcM = D70y.get_source()\n e1vZ = D70y.get_destination()\n if not (zZcM in YKHO.edges and e1vZ in YKHO.edges):\n raise ValueError('Node not in graph')\n YKHO.edges[zZcM].append(e1vZ)",
"def WYRu(YKHO, hQHm, jlSq):\n if hQHm in YKHO.vertices:\n YKHO.vertices[hQ... | [
"0.78169996",
"0.77789694",
"0.7618847",
"0.761851",
"0.75694674",
"0.7547367",
"0.7483565",
"0.7437083",
"0.74284625",
"0.7422367",
"0.741715",
"0.7337182",
"0.73281914",
"0.7266331",
"0.7227267",
"0.7212267",
"0.71977764",
"0.7194343",
"0.71735585",
"0.7168542",
"0.7152955"... | 0.6677459 | 53 |
Get all neighbors (edges) of a vertex. | def BTfj(YKHO, oqUi):
return YKHO.vertices[oqUi] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def o3gy(YKHO, SLBp):\n return list(YKHO.neighbor_in_iterator(SLBp))",
"def YHRb(YKHO, SLBp):\n return list(YKHO.neighbor_out_iterator(SLBp))",
"def qIRx(YKHO, SLBp):\n hlel = []\n if SLBp in YKHO.adjacency_list:\n for _Wdu in YKHO.adjacency_list[SLBp]:\n hlel.append([_Wdu.vertex.... | [
"0.8146008",
"0.78266084",
"0.78112674",
"0.7634123",
"0.76183206",
"0.7559868",
"0.7391218",
"0.73310196",
"0.729323",
"0.729323",
"0.729323",
"0.729323",
"0.729323",
"0.729323",
"0.7279731",
"0.71649474",
"0.7128683",
"0.7083494",
"0.7077735",
"0.7033856",
"0.69887614",
"... | 0.73596346 | 7 |
A function to return the calculated "brightness" of a color. | def asva(Mkmy, Oa1e, Fg_i):
return PZyS(pow(Mkmy, 2) * 0.241 + pow(Oa1e, 2) * 0.691 + pow(Fg_i, 2) * 0.068) / 255 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QlQ7(YKHO, qfpW):\n pKiF, bGrB, bGrB = YKHO._get_color_dominance_indices(qfpW)\n return qfpW[pKiF] / GLcw",
"def asva(d7Eb):\n return OtQZ(d7Eb)[1] * 255",
"def l4TC(YKHO, qfpW):\n asva = YKHO._get_color_brightness(qfpW)\n if asva == 0:\n return tuple(map(lambda WKvO: -WKvO, qfpW))\n ... | [
"0.87519854",
"0.78865486",
"0.76600325",
"0.76410246",
"0.7552168",
"0.7489598",
"0.74625653",
"0.7305102",
"0.7246516",
"0.72328055",
"0.72298247",
"0.72019804",
"0.718939",
"0.716885",
"0.7130277",
"0.70961905",
"0.70601827",
"0.70310134",
"0.70298374",
"0.700138",
"0.6981... | 0.75901306 | 4 |
Get the dominant colors of an image. | def x2kM(QzFq, yHxN, XQi3=False):
Jw9H = []
for DuZT, qfpW in zip(QzFq, yHxN):
d7Eb = []
wjRY = 0
for Z9rn in qfpW:
Z9rn = round(float(Z9rn))
wjRY += Z9rn
d7Eb.append(Z9rn)
if XQi3:
if wjRY > 15 and wjRY < 750:
Jw9H.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _ktY(LNo8):\n LNo8 = LNo8.convert('RGBA')\n LNo8.thumbnail((200, 200))\n jB5X = 0.0\n nz6e = None\n for UHFx, (Mkmy, Oa1e, Fg_i, jzdc) in LNo8.getcolors(LNo8.size[0] * LNo8.size[1]):\n if jzdc == 0:\n continue\n dU3c = h478.rgb_to_hsv(Mkmy / 255.0, Oa1e / 255.0, Fg_i / 2... | [
"0.79686916",
"0.7367852",
"0.7304908",
"0.71927786",
"0.71834433",
"0.7108218",
"0.66008735",
"0.6480664",
"0.6372689",
"0.6372689",
"0.6207156",
"0.6143511",
"0.6007459",
"0.59870464",
"0.5914479",
"0.5819323",
"0.5805314",
"0.579411",
"0.5755989",
"0.5694166",
"0.56892407"... | 0.51782346 | 66 |
Get the dominant colors of an image. | def PW9O(QzFq, yHxN):
S6Fl = oyIN.zeros((50, 300, 3), dtype='uint8')
G7_p = 0
for DuZT, qfpW in zip(QzFq, yHxN):
n63J = G7_p + DuZT * 300
XC5k.rectangle(S6Fl, (int(G7_p), 0), (int(n63J), 50), qfpW.astype('uint8').tolist(), -1)
G7_p = n63J
return S6Fl | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _ktY(LNo8):\n LNo8 = LNo8.convert('RGBA')\n LNo8.thumbnail((200, 200))\n jB5X = 0.0\n nz6e = None\n for UHFx, (Mkmy, Oa1e, Fg_i, jzdc) in LNo8.getcolors(LNo8.size[0] * LNo8.size[1]):\n if jzdc == 0:\n continue\n dU3c = h478.rgb_to_hsv(Mkmy / 255.0, Oa1e / 255.0, Fg_i / 2... | [
"0.79686916",
"0.7367852",
"0.7304908",
"0.71927786",
"0.71834433",
"0.7108218",
"0.66008735",
"0.6480664",
"0.6372689",
"0.6372689",
"0.6207156",
"0.6143511",
"0.6007459",
"0.59870464",
"0.5914479",
"0.5819323",
"0.5805314",
"0.579411",
"0.5755989",
"0.5694166",
"0.56892407"... | 0.0 | -1 |
Get the dominant colors of an image. | def nLtH(VXjJ, gXgy=None, exwG=3):
if isinstance(VXjJ, str):
if Hy7s.path.isfile(VXjJ):
VXjJ = XC5k.imread(VXjJ)
VXjJ = XC5k.cvtColor(VXjJ, XC5k.COLOR_BGR2RGB)
else:
print('Error: image path not valid')
VXjJ = VXjJ.reshape((VXjJ.shape[0] * VXjJ.shape[1], 3))
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _ktY(LNo8):\n LNo8 = LNo8.convert('RGBA')\n LNo8.thumbnail((200, 200))\n jB5X = 0.0\n nz6e = None\n for UHFx, (Mkmy, Oa1e, Fg_i, jzdc) in LNo8.getcolors(LNo8.size[0] * LNo8.size[1]):\n if jzdc == 0:\n continue\n dU3c = h478.rgb_to_hsv(Mkmy / 255.0, Oa1e / 255.0, Fg_i / 2... | [
"0.79686916",
"0.7367852",
"0.7304908",
"0.71927786",
"0.71834433",
"0.66008735",
"0.6480664",
"0.6372689",
"0.6372689",
"0.6207156",
"0.6143511",
"0.6007459",
"0.59870464",
"0.5914479",
"0.5819323",
"0.5805314",
"0.579411",
"0.5755989",
"0.5694166",
"0.56892407",
"0.5673699"... | 0.7108218 | 5 |