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 |
|---|---|---|---|---|---|---|
Check if user has permission 'perm' on object instance. | def mv4D(YKHO, KAOR, IuXB, nX8z=False):
if YKHO.is_superuser:
return True
if not YKHO.is_active:
return False
m5r4 = DDS9.objects.get_for_model(KAOR)
ei4T = CXiN.objects.filter(user=YKHO, content_type__pk=m5r4.id, object_id=KAOR.id, name=IuXB)
if ei4T.count() > 0:
return True... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M1EP(YKHO, IuXB, YEnM=None):\n xc3U = super(mv1M, YKHO).has_perm(IuXB, YEnM)\n return xc3U",
"def M1EP(YKHO, IuXB, YEnM=None):\n return YKHO.is_admin",
"def M1EP(YKHO, IuXB, YEnM=None):\n return b94L(YKHO, IuXB, YEnM)",
"def M1EP(YKHO, IuXB, YEnM=None):\n return True",
"def M1EP(YKHO, Iu... | [
"0.8444985",
"0.84400445",
"0.8432496",
"0.8343204",
"0.8340416",
"0.8340416",
"0.83286923",
"0.8319635",
"0.8232154",
"0.8196609",
"0.8179878",
"0.81416357",
"0.8114219",
"0.80760866",
"0.8071934",
"0.8071934",
"0.8071934",
"0.8058188",
"0.79958284",
"0.7932387",
"0.788796",... | 0.7470414 | 81 |
Recursively convert a or object's inner elements to strings. | def ddrW(YEnM):
import collections
if YEnM is None:
return None
if isinstance(YEnM, str):
return YEnM
if isinstance(YEnM, QMSQ):
return YEnM.encode('utf-8')
if isinstance(YEnM, collections.MutableMapping):
return {ddrW(H5ew): ddrW(BWXx) for H5ew, BWXx in YEnM.iteritem... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SfMN(z1Rg):\n if ztQD(z1Rg):\n return [SfMN(tTpl) for tTpl in z1Rg]\n return str(z1Rg)",
"def sbLA(YKHO, YEnM, **B2fa):\n if isinstance(YEnM, exCv):\n return YEnM\n Aofo = ''\n for YRbF in YEnM:\n Aofo += YKHO.p_flatten(YRbF)\n return Aofo",
"def m6pA(YEnM):\n if i... | [
"0.77983195",
"0.6392151",
"0.6114118",
"0.6100651",
"0.6057847",
"0.6051917",
"0.59065443",
"0.5887241",
"0.5881337",
"0.58781123",
"0.586654",
"0.5832447",
"0.58047587",
"0.5797375",
"0.57932466",
"0.57833564",
"0.5773669",
"0.57707876",
"0.57126355",
"0.570361",
"0.5697523... | 0.538324 | 86 |
Accepts a dictionary of key/list pairs and converts it to a list of lists. | def hRhN(LEh1):
U34r = []
sjXb = LEh1.keys()
for H5ew in sjXb:
exwG = len(LEh1[H5ew])
for YRbF in range(exwG):
vC9B = [H5ew, LEh1[H5ew][YRbF]]
U34r.append(vC9B)
return U34r | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def em50(fGC9):\n bCES = []\n if not isinstance(fGC9, dict):\n return fGC9\n for H5ew, wEf2 in sorted(fGC9.items()):\n if isinstance(wEf2, dict):\n wEf2 = em50(wEf2)\n elif FDfP(wEf2):\n wEf2 = [em50(Ty9i) for Ty9i in wEf2]\n bCES.append([H5ew, wEf2])\n ... | [
"0.75520545",
"0.74975103",
"0.74632907",
"0.73764753",
"0.72998846",
"0.7265578",
"0.71989346",
"0.7196436",
"0.71842235",
"0.71409106",
"0.70884466",
"0.7063811",
"0.70537496",
"0.7003359",
"0.699793",
"0.69362587",
"0.6931334",
"0.68535125",
"0.67885584",
"0.6788219",
"0.6... | 0.71144634 | 10 |
retrieves all Review objects by place | def B3SJ(SsWt):
N0U_ = []
bbcv = S8SU.get('Place', str(SsWt))
if bbcv is None:
eTsH(404)
for YEnM in bbcv.reviews:
N0U_.append(YEnM.to_json())
return pz3A(N0U_) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Tb9C(SsWt):\n YEnM = S8SU.get(pRgP, SsWt)\n if YEnM is None:\n eTsH(404)\n N0U_ = []\n for Slbv in S8SU.all('Review').values():\n if Slbv.place_id == SsWt:\n N0U_.append(Slbv.to_dict())\n return pz3A(N0U_)",
"def Sqll(SsWt=None):\n C6id = S8SU.get('Place', SsWt)\n ... | [
"0.75927484",
"0.74700993",
"0.7448059",
"0.74224186",
"0.73863095",
"0.7270001",
"0.72665596",
"0.72604096",
"0.7255281",
"0.7167484",
"0.71533006",
"0.71239793",
"0.70928884",
"0.7091106",
"0.7045609",
"0.7034394",
"0.69673204",
"0.6938423",
"0.69343454",
"0.6900097",
"0.68... | 0.7313109 | 5 |
Test configured server id is not found. | async def test_server_not_found(ajET: HomeAssistant, ud61: MagicMock) -> None:
bTKY = Jaru(domain=Sugg, options={f0Sb: False, VOdH: 60})
bTKY.add_to_hass(ajET)
await ajET.config_entries.async_setup(bTKY.entry_id)
await ajET.async_block_till_done()
assert ajET.data[Sugg]
ud61.return_value.get_ser... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KVP2(YKHO):\n YKHO.assertRaises(xLBk.NotFound, YKHO.client.migrate_server, Nhuv.rand_uuid())",
"def Dh80(YKHO):\n pass",
"def M5dB(YKHO, E2VF, yK6F, QOGf):\n Ol8d = 'Server does not exist'\n FxVH = {'itemNotFound': {'message': Ol8d, 'code': 404}}\n qAYJ = ms6h([(E2VF, pQiA(dUn8(qQXR.dumps(Fx... | [
"0.7154322",
"0.6929465",
"0.6776121",
"0.6696187",
"0.6635473",
"0.6534211",
"0.6532624",
"0.648971",
"0.6457432",
"0.64554155",
"0.64451396",
"0.6437025",
"0.63914317",
"0.63869166",
"0.6378778",
"0.6355061",
"0.6342141",
"0.6340495",
"0.6340424",
"0.6335261",
"0.63299865",... | 0.63787305 | 15 |
Test configured server id is not found. | async def test_get_best_server_error(ajET: HomeAssistant, ud61: MagicMock) -> None:
bTKY = Jaru(domain=Sugg)
bTKY.add_to_hass(ajET)
await ajET.config_entries.async_setup(bTKY.entry_id)
await ajET.async_block_till_done()
assert ajET.data[Sugg]
ud61.return_value.get_best_server.side_effect = vXWD.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KVP2(YKHO):\n YKHO.assertRaises(xLBk.NotFound, YKHO.client.migrate_server, Nhuv.rand_uuid())",
"def Dh80(YKHO):\n pass",
"def M5dB(YKHO, E2VF, yK6F, QOGf):\n Ol8d = 'Server does not exist'\n FxVH = {'itemNotFound': {'message': Ol8d, 'code': 404}}\n qAYJ = ms6h([(E2VF, pQiA(dUn8(qQXR.dumps(Fx... | [
"0.7154672",
"0.69298536",
"0.67763764",
"0.6696993",
"0.66352093",
"0.65333897",
"0.6533346",
"0.6488664",
"0.64579755",
"0.64554393",
"0.6446737",
"0.6439229",
"0.6390913",
"0.63868713",
"0.63801503",
"0.63778466",
"0.63568854",
"0.6343777",
"0.6342555",
"0.6340435",
"0.633... | 0.0 | -1 |
Clean up file name (remove nonalphanumerics and space runs) | def YxX2(gIsw: str) -> str:
Dokz = ZbWC.sub(' +', ' ', ZbWC.sub('\\W', ' ', gIsw))
return Dokz | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UXnn(gIsw: str) -> str:\n gIsw = rmDg(gIsw, 1)\n gIsw = ZbWC.sub('__+', '_', gIsw.replace(' ', '_'))\n return gIsw",
"def NVCy(mWFP):\n return mWFP.translate('___________________________________________+_-._0123456789______@ABCDEFGHIJKLMNOPQRSTUVWXYZ______abcdefghijklmnopqrstuvwxyz_______________... | [
"0.8693377",
"0.85487974",
"0.8435042",
"0.8426644",
"0.8330724",
"0.82718354",
"0.81976503",
"0.81526744",
"0.8143087",
"0.80069125",
"0.7999923",
"0.799758",
"0.79331595",
"0.78612876",
"0.78464127",
"0.7840607",
"0.7840607",
"0.78393966",
"0.78243667",
"0.7792368",
"0.7789... | 0.7555283 | 36 |
Creates a sparse spatial weights matrix (SWM) based on polygon contiguity. | def SE0I(Jql2, m4Pc, xu8p, Kg5g='EUCLIDEAN', kjzA=0, p3XF=True, YQmT='ROOK'):
WsdM.SetProgressor('default', WsdM.GetIDMessage(84143))
MS9g = vbuL.SSDataObject(Jql2, templateFC=Jql2, useChordal=True)
r9Hf = mtIl.getCount(Jql2)
kQI7.errorNumberOfObs(r9Hf, minNumObs=2)
E76u = kQI7.checkField(MS9g.allFi... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BCA1(yzQ0):\n nPrm = []\n U4J6 = [0]\n _0VL = []\n for NZQz in yzQ0.id_order:\n nPrm.extend(yzQ0.weights[NZQz])\n U4J6.append(U4J6[-1] + len(yzQ0.weights[NZQz]))\n _0VL.extend(yzQ0.neighbors[NZQz])\n nPrm = oyIN.array(nPrm)\n _0VL = oyIN.array(_0VL)\n U4J6 = oyIN.array... | [
"0.6766473",
"0.66378695",
"0.62258136",
"0.61984843",
"0.6135766",
"0.6130356",
"0.61253816",
"0.612243",
"0.6121667",
"0.6005215",
"0.58925635",
"0.58871937",
"0.58776927",
"0.58668923",
"0.58314496",
"0.5825947",
"0.58175105",
"0.5771868",
"0.5746319",
"0.5725669",
"0.5710... | 0.61757535 | 4 |
An instance is an entire document, represented as a list of sentences. | def Aas9(YKHO, KAOR):
C3ST = YKHO._model
yGCl = C3ST._get_prediction_device()
try:
__n6 = Qqmr([KAOR])
__n6.index_instances(C3ST.vocab)
sLS8 = gnPz.move_to_device(__n6.as_tensor_dict(), yGCl)
o3Uj = C3ST.make_output_human_readable(C3ST(**sLS8)).to_json()
except RuntimeErr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, Rhv4):\n YKHO.sentences = Rhv4",
"def abVh(YKHO):\n bUWH = YKHO.getInstances()\n Eab6 = []\n for YRbF in bUWH:\n Eab6.append(YRbF.form)\n return Eab6",
"def Rhv4(YKHO):\n return RMs1([Csk6.sentences for Csk6 in YKHO.documents])",
"def Rhv4():\n return ZjMK(mYes())",... | [
"0.69905233",
"0.6675925",
"0.66382796",
"0.6522729",
"0.6432605",
"0.6399109",
"0.6273542",
"0.6206273",
"0.615886",
"0.6149534",
"0.61083883",
"0.61042964",
"0.61006486",
"0.607381",
"0.6057835",
"0.60453427",
"0.60345876",
"0.6020468",
"0.6008993",
"0.59645605",
"0.5962466... | 0.0 | -1 |
Returns the shortest first name (str). You can assume there is only one shortest name. | def zdTz(ZWCE):
ZWCE = uGrO(ZWCE)
fcCO = lambda LihS: LihS.split(' ', 1)[0]
N91j = [fcCO(mWFP) for mWFP in ZWCE]
print(N91j)
lXgg = N91j.sort(key=len)
print(lXgg)
return lXgg[0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zdTz(ZWCE):\n ZWCE = uGrO(ZWCE)\n KCHu = sorted(ZWCE, key=lambda WKvO: len(WKvO))\n print(KCHu[0].split(' ')[0])\n return KCHu[0].split(' ')[0]",
"def zdTz(ZWCE):\n return sorted(ZWCE, key=lambda WKvO: len(WKvO.split(' ')[0]))[0].split(' ')[0]",
"def zdTz(ZWCE):\n ZWCE = uGrO(ZWCE)\n Z... | [
"0.86344856",
"0.8493411",
"0.8488519",
"0.8010508",
"0.7808239",
"0.77832365",
"0.77644086",
"0.7526219",
"0.7464964",
"0.7444787",
"0.7410075",
"0.7410075",
"0.7410075",
"0.7410075",
"0.7410075",
"0.7410075",
"0.73808146",
"0.7292957",
"0.72853506",
"0.72853506",
"0.7285350... | 0.8161621 | 3 |
Returns the database record for the user provided. If user is not found in the database, will create it and return the new record. | def gXNO(YKHO, CBIr):
UcsS = CBIr.id
if UcsS not in YKHO._user_cache:
prZM, _EYN = YJv1.get_or_create(discord_user_id=UcsS)
if _EYN:
prZM.name = f'{CBIr.name}#{CBIr.discriminator}'
prZM.save()
YKHO._user_cache[UcsS] = prZM
return YKHO._user_cache[UcsS] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dXFT(dpuW):\n hlel = zCaB.find_one(dpuW)\n return hlel",
"def ysh1(_sei=0, NtEF=''):\n if mv1M.objects.filter(pk=_sei).exists():\n return mv1M.objects.get(pk=_sei)\n elif mv1M.objects.filter(username=NtEF).exists():\n return mv1M.objects.get(username=NtEF)\n else:\n raise ... | [
"0.7056702",
"0.6912074",
"0.6875176",
"0.6780002",
"0.67204076",
"0.6707524",
"0.6684594",
"0.66558146",
"0.66467464",
"0.6627403",
"0.6584207",
"0.6498771",
"0.64643043",
"0.6462332",
"0.6456473",
"0.64512116",
"0.64512116",
"0.64479107",
"0.64201665",
"0.6417121",
"0.64011... | 0.6183333 | 53 |
Inicializa os atributos restaurant_name e cuisine_type. | def FIMM(YKHO, zqv0, N4Ku):
YKHO.restaurant_name = zqv0
YKHO.cuisine_type = N4Ku
YKHO.number_served = 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, zqv0, N4Ku):\n YKHO.restaurant_name = zqv0\n YKHO.cuisine_type = N4Ku",
"def FIMM(YKHO, zqv0, N4Ku):\n YKHO.restaurant_name = zqv0\n YKHO.cuisine_type = N4Ku",
"def FIMM(YKHO, zqv0, N4Ku):\n YKHO.restaurant_name = zqv0\n YKHO.cuisine_type = N4Ku",
"def FIMM(YKHO, zqv0, N4Ku):... | [
"0.76419663",
"0.74036187",
"0.74036187",
"0.74036187",
"0.74036187",
"0.74036187",
"0.74036187",
"0.74036187",
"0.74036187",
"0.7324083",
"0.7298946",
"0.7267343",
"0.7240025",
"0.7172885",
"0.71366507",
"0.7028226",
"0.69590527",
"0.69511205",
"0.68322486",
"0.67948633",
"0... | 0.67530316 | 23 |
The task unique identifier | def j8eK(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _TKD(YKHO) -> str:\n return YKHO._task_id",
"def unpH(YKHO):\n return YKHO._task.id",
"def _TKD(YKHO):\n return YKHO._task_id",
"def n5zb():\n Fk5p = 'Task-' + kxTZ().hex[:16]\n return Fk5p",
"def id(YKHO):\n return YKHO._task_json['task_id']",
"def id(YKHO):\n return YKHO._task_... | [
"0.8587815",
"0.8526271",
"0.8348313",
"0.8307907",
"0.82484144",
"0.82484144",
"0.8129038",
"0.77932906",
"0.77616644",
"0.76443315",
"0.76443315",
"0.76409674",
"0.76358604",
"0.7565133",
"0.7557956",
"0.7509535",
"0.74483055",
"0.7419302",
"0.7400387",
"0.73693055",
"0.736... | 0.0 | -1 |
A list of the task parameter definitions. Each task parameter is a dictionary containing, but not | def SGPK(YKHO):
pass | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c1Y3(YKHO):\n raise NotImplementedError",
"def xqsW():\n return {'type': 'Batch', 'time': 3, 'memory': 64, 'checker': 'checker.cpp', 'graders': ['graders/grader.cpp'], 'headers': ['task.h'], 'managers': ['manager.cpp'], 'statements': [{'language': 'he', 'path': 'statement.pdf'}], 'attachments': ['attac... | [
"0.70033425",
"0.69013476",
"0.68414867",
"0.6677947",
"0.66250247",
"0.64493585",
"0.64240324",
"0.63502663",
"0.62941515",
"0.62666804",
"0.6255229",
"0.6247149",
"0.62364143",
"0.6183462",
"0.6175687",
"0.6162607",
"0.61609036",
"0.6148365",
"0.6148186",
"0.61466366",
"0.6... | 0.0 | -1 |
Returns the JSON string representation of list_dictionaries. | def IZ3T(F986):
if F986 is None or len(F986) == 0:
return '[]'
return qQXR.dumps(F986) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IZ3T(F986):\n if F986 is None:\n F986 = []\n return qQXR.dumps(F986)",
"def IZ3T(F986):\n if F986 is None:\n F986 = []\n return qQXR.dumps(F986)",
"def IZ3T(F986):\n if F986 is None:\n F986 = []\n return qQXR.dumps(F986)",
"def IZ3T(F986):\n if not F986:\n ... | [
"0.85389435",
"0.8519157",
"0.8519157",
"0.8502179",
"0.8500688",
"0.84679306",
"0.8344619",
"0.8335705",
"0.8335705",
"0.8307396",
"0.8301731",
"0.8298922",
"0.82957375",
"0.829023",
"0.8280563",
"0.828027",
"0.82528067",
"0.82519746",
"0.82335",
"0.82335",
"0.82335",
"0.8... | 0.8260276 | 18 |
Returns an instance with all attributes already set. | def eLpg(Emd4, **cmPJ):
if Emd4.__name__ == 'Rectangle':
BdN0 = Emd4(1, 1)
else:
BdN0 = Emd4(1)
BdN0.update(**cmPJ)
return BdN0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jth9(YKHO):\n return YKHO.__class__(YKHO.attributes)",
"def jth9(YKHO):\n Z9rn = type(YKHO)()\n Z9rn._attrs = YKHO._attrs.copy()\n return Z9rn",
"def jth9(YKHO, **c_sp):\n Aofo = YKHO.new(YKHO.__class__, __name__=YKHO.classname(), offset=YKHO.getoffset())\n c_sp.setdefault('value', YKHO.v... | [
"0.6902133",
"0.66873884",
"0.6568671",
"0.65193343",
"0.6438788",
"0.6403869",
"0.63566136",
"0.63482195",
"0.6336276",
"0.6321241",
"0.6277552",
"0.62747586",
"0.6258118",
"0.6256467",
"0.62279814",
"0.62081105",
"0.619441",
"0.6177347",
"0.6133949",
"0.6107485",
"0.6083092... | 0.0 | -1 |
Returns a list of instances. | def J2u4(Emd4):
try:
with open(Emd4.__name__ + '.json', 'r') as eHNT:
wM3v = i_Aq.from_json_string(eHNT.read())
return [Emd4.create(**fK8P) for fK8P in wM3v]
except IOError:
return [] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def lbzt(YKHO) -> x1iM[ec6H]:\n pass",
"def y5NJ(YKHO):\n raise NotImplementedError()",
"def y5NJ(YKHO):\n return []",
"def bUWH(YKHO) -> x1iM[Kt_s]:\n return YKHO._instances",
"def list(YKHO, **YSA3):\n return YKHO.get_instances(YSA3)",
"def lbzt(YKHO):\n return YKHO.instances",
"def... | [
"0.9090541",
"0.88311285",
"0.8801837",
"0.848732",
"0.843132",
"0.84200704",
"0.83854324",
"0.8357952",
"0.8275728",
"0.82279754",
"0.8164767",
"0.8093292",
"0.80715257",
"0.8051574",
"0.80346715",
"0.80154127",
"0.79753184",
"0.7917529",
"0.79032606",
"0.78845567",
"0.78661... | 0.0 | -1 |
Resend the validation email for the authenticated user. | def lO7Z(QePW):
Fkm1 = vDHT.objects.get(user=QePW.user)
try:
ksqG = m4cf.objects.get(user=QePW.user).resend()
geh0 = 'listo'
except m4cf.DoesNotExist:
geh0 = 'fallo'
Fkm1.email_activo = True
Fkm1.save()
return Yd7Q(gxEw('email_validation_reset_response', args=[geh... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m8z6(YKHO):\n CBIr = YKHO.request.user\n geh0 = YKHO.validate_email(CBIr)\n if geh0:\n return geh0\n Qdn1 = {'status': True, 'msg': YKHO.request._('We sent you email to activate your new email address', domain='pyramid_fullauth')}\n try:\n YKHO.request.registry.notify(wt6s(YKHO.req... | [
"0.717891",
"0.69989944",
"0.6952879",
"0.6827102",
"0.67824763",
"0.67731214",
"0.6692069",
"0.6626624",
"0.65993106",
"0.6591645",
"0.65870017",
"0.6522965",
"0.6514918",
"0.645062",
"0.6438122",
"0.6434647",
"0.6418718",
"0.6388134",
"0.63678735",
"0.63473487",
"0.6324136"... | 0.6457978 | 13 |
Return a value a with sign b. | def Zihr(jzdc, Fg_i):
if Fg_i >= 0:
return abs(jzdc)
else:
return -abs(jzdc) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vFpF(jzdc, Fg_i):\n if Fg_i < 0:\n khtY = finE\n else:\n khtY = H2v5\n return khtY(jzdc, Fg_i)",
"def vFpF(jzdc, Fg_i):\n if Fg_i < 0:\n khtY = finE\n else:\n khtY = H2v5\n return khtY(jzdc, Fg_i)",
"def vFpF(jzdc, Fg_i):\n if Fg_i < 0:\n eHNT = finE(... | [
"0.73168033",
"0.7240736",
"0.72030246",
"0.7091006",
"0.69494605",
"0.693637",
"0.67347664",
"0.67109174",
"0.658154",
"0.656597",
"0.65267944",
"0.65023315",
"0.64461267",
"0.64085865",
"0.6374049",
"0.6360204",
"0.63248634",
"0.62969166",
"0.6243427",
"0.62170947",
"0.6139... | 0.80596274 | 0 |
pol2cart convert N x 2 ndarray from polar to cartesian | def zrt4(F_On: np.array) -> oyIN.array:
q7In = F_On[:, 0]
Mkmy = F_On[:, 1]
WKvO = Mkmy * oyIN.cos(q7In)
LVAh = Mkmy * oyIN.sin(q7In)
return oyIN.stack([WKvO, LVAh], axis=-1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zrt4(FDPT, QnmL):\n WKvO = oyIN.cos(QnmL) * oyIN.cos(FDPT)\n LVAh = oyIN.cos(QnmL) * oyIN.sin(FDPT)\n epBp = oyIN.sin(QnmL)\n return oyIN.array([WKvO, LVAh, epBp])",
"def zrt4(*qIxc):\n if len(qIxc) == 1:\n Mkmy = qIxc[0][:, 0]\n q7In = qIxc[0][:, 1]\n else:\n assert le... | [
"0.74690205",
"0.7126045",
"0.71120024",
"0.70881885",
"0.706159",
"0.7038684",
"0.702049",
"0.7011699",
"0.6898551",
"0.689777",
"0.68950087",
"0.68587327",
"0.6826317",
"0.6799694",
"0.6798421",
"0.679221",
"0.6783372",
"0.67813677",
"0.674302",
"0.674302",
"0.6737344",
"... | 0.73795253 | 1 |
The timestamp after which certificate will expire | def uwdW(YKHO) -> qe4Y.Output[str]:
return qe4Y.get(YKHO, 'valid_end_time') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Xkiw(YKHO):\n yo7_ = qcWV.datetime.now()\n VULj = yo7_ + qcWV.timedelta(seconds=OsQU)\n pmON = Qhn2(YKHO.mktemp())\n pmON.makedirs()\n ZLSD = p4NJ.initialize(pmON, b'mycluster')\n LSCv = ZLSD.certificate.original\n TBfh = LSCv.get_notAfter()\n CwgM = qcWV.datetime.strptime(TBfh, '%Y%m%d... | [
"0.7258032",
"0.72579175",
"0.72316587",
"0.71972364",
"0.7193652",
"0.71474904",
"0.7113125",
"0.7071574",
"0.7046754",
"0.70457333",
"0.70457333",
"0.7019298",
"0.7004036",
"0.6998703",
"0.6965356",
"0.6927266",
"0.6925695",
"0.68772095",
"0.68623805",
"0.6858428",
"0.67564... | 0.0 | -1 |
Add a new experience to memory. | def H2v5(YKHO, QTBn, XeOP, e0o_, vOGg, rxHc, _ins):
tTpl = YKHO.experiences(QTBn, XeOP, e0o_, vOGg, rxHc, _ins)
YKHO.memory.append(tTpl) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ilp5(YKHO, GsKL):\n YKHO.memory.append(GsKL)",
"def H2v5(YKHO, GsKL):\n YKHO.memory.append(GsKL)",
"def GsKL(YKHO, GsKL: Experience[ActionType]) -> None:\n YKHO.memory.append(GsKL)",
"def H2v5(YKHO, QTBn, XeOP, vOGg, rxHc, _ins):\n YKHO.memory.append(XlZM(QTBn, XeOP, vOGg, rxHc, _ins))",
"d... | [
"0.8763217",
"0.8755159",
"0.8509186",
"0.79707366",
"0.7879077",
"0.7878838",
"0.7878838",
"0.7709677",
"0.7708713",
"0.7609456",
"0.74958277",
"0.7470479",
"0.74537706",
"0.737918",
"0.73555547",
"0.730577",
"0.7283659",
"0.7276514",
"0.72636735",
"0.7246649",
"0.72328925",... | 0.7052755 | 67 |
Clean the path, make sure catchall parameter at end of path and after it no trailing slashes exist. | def aJz1(pmON):
pmON, eJh7 = (wwzD(pmON), pmON)
YFMp = pmON.count('*')
if YFMp > 1:
raise ValueError('There should be at most one catch-all parameter in "{}"'.format(eJh7))
if YFMp == 1:
if pmON[-1] == '/':
pmON = pmON[:-1]
if pmON[pmON.rfind('/') + 1] != '*':
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def AWVE(YKHO, pmON):\n if pmON[0] != '/':\n pmON = '/' + pmON\n return pmON",
"def B5sD(YKHO, pmON):\n if pmON.startswith('/'):\n pmON = pmON[1:]\n return pmON",
"def yl89(YKHO, pmON):\n if pmON.endswith('/'):\n pmON = pmON.rstrip('/')\n return pmON",
"def bkQF(pmON):\... | [
"0.82489413",
"0.79105085",
"0.76466197",
"0.74609256",
"0.74460816",
"0.7384819",
"0.7379221",
"0.7342228",
"0.7221131",
"0.71671724",
"0.7151675",
"0.71189964",
"0.7108322",
"0.70911056",
"0.7048342",
"0.70411474",
"0.7039672",
"0.7036998",
"0.69778126",
"0.6970609",
"0.695... | 0.773216 | 2 |
Toggle trailing slash based on cleandd path | def ZnX0(pmON):
if len(pmON) < 2:
return pmON
return pmON[:-1] if pmON[-1] == '/' else '{}/'.format(pmON) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TXkm(pmON):\n return pmON if pmON.endswith('/') else pmON + '/'",
"def TXkm(pmON):\n if not pmON.endswith('/'):\n pmON += '/'\n return pmON",
"def yl89(YKHO, pmON):\n if pmON.endswith('/'):\n pmON = pmON.rstrip('/')\n return pmON",
"def bkQF(pmON):\n if pmON[-1] != '/':\n ... | [
"0.7930154",
"0.7764784",
"0.7566414",
"0.7537669",
"0.74048066",
"0.74042267",
"0.73994875",
"0.72695726",
"0.7193063",
"0.70789963",
"0.6993403",
"0.6987307",
"0.69843423",
"0.69415134",
"0.68938947",
"0.68849605",
"0.6870481",
"0.68359923",
"0.6833851",
"0.6833422",
"0.681... | 0.84458184 | 0 |
Normalize image by making its standard deviation = 1.0. | def Slgv(VXjJ, SGf8=1e-10):
with ZylS.name_scope('normalize'):
M1Jx = ZylS.sqrt(ZylS.reduce_mean(ZylS.square(VXjJ)))
return VXjJ / ZylS.maximum(M1Jx, SGf8) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NkkI(YKHO, VXjJ):\n return (VXjJ - oyIN.mean(VXjJ)) / oyIN.std(VXjJ)",
"def NkkI(VXjJ):\n Aofo = VXjJ.astype(oyIN.float64)\n Aofo -= oyIN.mean(Aofo)\n Aofo /= oyIN.std(Aofo)\n return Aofo",
"def NkkI(VXjJ, JBMS, M1Jx):\n return (VXjJ - JBMS) / M1Jx",
"def NkkI(YKHO, VXjJ):\n return (... | [
"0.8357313",
"0.8343261",
"0.8341011",
"0.8260674",
"0.8252964",
"0.8242881",
"0.81301725",
"0.8126198",
"0.806709",
"0.8060995",
"0.8001742",
"0.7961749",
"0.7913637",
"0.78769433",
"0.7814463",
"0.7808524",
"0.7779067",
"0.77265584",
"0.7717168",
"0.76449126",
"0.75943357",... | 0.7508177 | 24 |
Normalize the image range for visualization. | def Ekx3(LNo8, KCHu=0.1):
FHlE = LNo8 / 255
return (FHlE - FHlE.mean()) / max(FHlE.std(), 0.0001) * KCHu + 0.5 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jnV4(VXjJ, T8H5=None, Np5D=None):\n if T8H5 is None:\n T8H5 = VXjJ.min()\n if Np5D is None:\n Np5D = VXjJ.max()\n return (VXjJ - T8H5) / (Np5D - T8H5)",
"def NkkI(YKHO, LNo8):\n qzD7, Hqoa, hWlM, yeUC = jbYn.MinMaxLoc(LNo8)\n if Hqoa > 0:\n Y5YY = 255 / Hqoa\n jbYn.... | [
"0.80623496",
"0.8028308",
"0.786196",
"0.7803684",
"0.7776104",
"0.7742519",
"0.7727501",
"0.76750857",
"0.7653893",
"0.76065785",
"0.75842685",
"0.7580116",
"0.74473095",
"0.741273",
"0.7282307",
"0.7260041",
"0.72508925",
"0.7210865",
"0.72004616",
"0.7192358",
"0.7174443"... | 0.66013277 | 88 |
Find the direction changes for the given movement intervals. | def Cjlg(a1PO, y917, D7KI):
_0VL = []
WXkz = []
ce21 = oyIN.insert(oyIN.diff(oyIN.sign(y917)) != 0, 0, 0)
for zF0X, l4XF in D7KI.reshape(-1, 2):
ZHfW = oyIN.logical_and(a1PO > zF0X, a1PO < l4XF)
QyVM, = oyIN.where(oyIN.logical_and(ZHfW, ce21))
WXkz.append(a1PO[QyVM])
_0VL... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Fhmv(fC6h):\n qN8b = []\n n5nd = kGc1(fC6h)\n exwG = len(n5nd)\n for YRbF in range(1, exwG):\n wzkt = n5nd[YRbF]\n THkp = n5nd[YRbF - 1]\n fytP = qe_j(THkp, wzkt)\n qN8b.append(fytP)\n return qN8b",
"def poNg(Tm2h, aq_o, TaUL, dQgj, XSoh, FBNX, TUcM):\n TQVl = oy... | [
"0.57218885",
"0.56391835",
"0.56155634",
"0.56008744",
"0.5459614",
"0.5379474",
"0.535465",
"0.52952325",
"0.52952325",
"0.52952325",
"0.52952325",
"0.52387893",
"0.5232153",
"0.5222962",
"0.5201492",
"0.5193396",
"0.51671064",
"0.5163267",
"0.5155823",
"0.5105137",
"0.5097... | 0.74625325 | 0 |
r""" Checks whether ``self`` is indeed a linear extension of the underlying poset. | def GfdN(YKHO):
V6IE = YKHO.parent().poset()
if not V6IE.is_linear_extension(YKHO):
raise ValueError('%s is not a linear extension of %s' % (YKHO, V6IE)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nPMK(YKHO):\n return True",
"def nPMK(YKHO):\n pass",
"def JPkg(YKHO):\n return ZYgz.TFltV_IsExt(YKHO)",
"def caG1(YKHO):\n ONla = YKHO.expression.as_coefficients_dict()\n if all((len(H5ew.free_symbols) < 2 and (H5ew.is_Add or H5ew.is_Mul or H5ew.is_Atom) for H5ew in ONla.keys())):\n ... | [
"0.63196504",
"0.6157512",
"0.6098544",
"0.60836744",
"0.6081457",
"0.6058182",
"0.604524",
"0.5950515",
"0.59285986",
"0.59194136",
"0.5916778",
"0.58651525",
"0.5846971",
"0.5835686",
"0.5831752",
"0.582295",
"0.5809738",
"0.5808751",
"0.5782547",
"0.5782035",
"0.57815343",... | 0.8359249 | 0 |
r""" Returns the underlying original poset. | def mJJQ(YKHO):
return YKHO.parent().poset() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mJJQ(YKHO):\n return YKHO._poset",
"def IHvK(YKHO):\n V6IE = YKHO.parent().poset()\n gv2B = [V6IE.unwrap(WKvO) for WKvO in YKHO]\n BdN0 = [V6IE.unwrap(WKvO) for WKvO in V6IE]\n w8Y_ = dict(zip(gv2B, BdN0))\n return V6IE.relabel(w8Y_).with_linear_extension(BdN0)",
"def hgn5(YKHO):\n ret... | [
"0.77354234",
"0.70365995",
"0.62861544",
"0.62608993",
"0.62052405",
"0.6186634",
"0.6156079",
"0.6140972",
"0.6104255",
"0.6078911",
"0.6078911",
"0.6078911",
"0.6078911",
"0.6078911",
"0.6078911",
"0.6017471",
"0.5994023",
"0.59835714",
"0.59835714",
"0.59835714",
"0.59835... | 0.70188665 | 2 |
r""" Returns the latex string for ``self``. | def eMsG(YKHO):
return '\\mathtt{' + str(tuple(YKHO)) + '}' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eMsG(YKHO):\n return _svw(YKHO.__object)",
"def eMsG(YKHO):\n return 'Element of ' + _svw(YKHO.space)",
"def eMsG(YKHO):\n return '\\\\left(' + YKHO.latex_name + '\\\\right)'",
"def eMsG(YKHO):\n return '\\\\left(' + YKHO.latex_name + '\\\\right)'",
"def eMsG(YKHO):\n from sage.misc.late... | [
"0.87251455",
"0.8125461",
"0.80945355",
"0.80945355",
"0.8081422",
"0.80727804",
"0.802539",
"0.8025261",
"0.80071837",
"0.7911755",
"0.7903722",
"0.7859756",
"0.7817394",
"0.76477385",
"0.7599302",
"0.75915706",
"0.75633085",
"0.7541",
"0.75400335",
"0.7530875",
"0.74074847... | 0.7633817 | 14 |
r""" Returns the underlying original poset. | def mJJQ(YKHO):
return YKHO._poset | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IHvK(YKHO):\n V6IE = YKHO.parent().poset()\n gv2B = [V6IE.unwrap(WKvO) for WKvO in YKHO]\n BdN0 = [V6IE.unwrap(WKvO) for WKvO in V6IE]\n w8Y_ = dict(zip(gv2B, BdN0))\n return V6IE.relabel(w8Y_).with_linear_extension(BdN0)",
"def mJJQ(YKHO):\n return YKHO.parent().poset()",
"def hgn5(YKHO)... | [
"0.70365995",
"0.70188665",
"0.62861544",
"0.62608993",
"0.62052405",
"0.6186634",
"0.6156079",
"0.6140972",
"0.6104255",
"0.6078911",
"0.6078911",
"0.6078911",
"0.6078911",
"0.6078911",
"0.6078911",
"0.6017471",
"0.5994023",
"0.59835714",
"0.59835714",
"0.59835714",
"0.59835... | 0.77354234 | 0 |
r""" Constructor for elements of this class. | def Bofo(YKHO, yv6U, GfdN=True):
if isinstance(yv6U, WtSj):
yv6U = list(yv6U)
if not isinstance(yv6U, (list, tuple)):
raise TypeError('input should be a list or tuple')
yv6U = [YKHO._poset(bGrB) for bGrB in yv6U]
if YKHO._is_facade:
return yv6U
else:
return YKHO.eleme... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, azoT, U6D_=None):\n YKHO.attributes = azoT\n YKHO.element = U6D_",
"def FIMM(YKHO, U6D_):\n super(YKHO.__class__, YKHO).__init__()\n YKHO.element = U6D_",
"def FIMM(YKHO):\n YKHO.elements = []",
"def FIMM(YKHO, U6D_):\n YKHO._element = U6D_",
"def Bofo(YKHO, mghH, Mzf9):\n ... | [
"0.7835586",
"0.7696589",
"0.7678943",
"0.7619506",
"0.759928",
"0.7564157",
"0.7537841",
"0.75278443",
"0.74631697",
"0.74467725",
"0.7425215",
"0.7385618",
"0.7385618",
"0.737816",
"0.7370714",
"0.73631513",
"0.73195356",
"0.7212299",
"0.71466696",
"0.7113545",
"0.71004415"... | 0.0 | -1 |
This function determines the buckets for which the IAM policy is generated for. If you want tibanna to have access to more buckets, this is where to add them. | def ksMI(sEAN):
KIwv = [cuHu(sEAN, 'FileProcessed'), cuHu(sEAN, 'FileFastq'), cuHu(sEAN, 'system'), cuHu(sEAN, 'log'), cuHu(sEAN, 'cwl')]
if TNcF:
KIwv.append(TNcF)
return KIwv | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qKu2(YKHO) -> None:\n YKHO.buckets = dict()\n for WE7e in YKHO.resource.buckets.all():\n YKHO.buckets[str(WE7e.meta.data['Name'])] = WE7e",
"def gSR0(YKHO) -> list:\n wQ2N = [ptAi.get('Name') for ptAi in YKHO.s3_client.list_buckets()['Buckets']]\n G9jH.info(f'List of all buckets {wQ2N}')\n... | [
"0.68790513",
"0.6565127",
"0.65481365",
"0.6543395",
"0.6510984",
"0.6486557",
"0.6484427",
"0.6474856",
"0.64241457",
"0.63802135",
"0.63234884",
"0.63130814",
"0.62914205",
"0.6276384",
"0.62679625",
"0.6240797",
"0.62401575",
"0.6231598",
"0.6230828",
"0.6222737",
"0.6210... | 0.676017 | 1 |
Build a query that matches issues with ANY of the given field values. | def FvFW(YKHO, seET, FFmX, aqR5, C9uy):
if FFmX in aqR5:
fZOT = aqR5[FFmX][0]
hkxX = e2BC.constants.TERM_RE.findall(fZOT)
fNjO = '%s%s' % (seET, ','.join(hkxX))
C9uy.append(fNjO) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ffCw(YKHO, GTA_, Jyyj, hkxX):\n vexM = YKHO.format('SELECT * from {} where {} in %s', (GTA_, Jyyj), (tuple(hkxX),))\n return YKHO.query(vexM)",
"def xDcj(YKHO, **B2fa):\n YSA3 = B2fa.copy()\n try:\n del YSA3['any_']\n except KeyError:\n pass\n super(zj1o, YKHO).query(**YSA3)",... | [
"0.6485416",
"0.5847209",
"0.5791666",
"0.5542855",
"0.5513568",
"0.54753965",
"0.5268929",
"0.52412033",
"0.5233137",
"0.52179694",
"0.5213881",
"0.51935816",
"0.5184501",
"0.51586694",
"0.51274794",
"0.51264346",
"0.5125699",
"0.5106389",
"0.509781",
"0.5094108",
"0.5088302... | 0.0 | -1 |
Gets the local path for the custom workspace associated with this job | def M77F(YKHO):
Q6kx = YKHO._root.find('customWorkspace')
if Q6kx is None:
return ''
return Q6kx.text | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fDoZ(YKHO) -> str:\n return YKHO._workspace_path",
"def fDoZ(YKHO) -> oAb3.Path:\n return oAb3.Path(YKHO.root)",
"def rAod(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'local_path')",
"def _Rre(YKHO) -> GkAb:\n zGKt = next(iter(YKHO.masters))\n lc_3 = zGKt.labels[bszi]\n return Gk... | [
"0.786605",
"0.7630507",
"0.69941694",
"0.6993499",
"0.6956472",
"0.69094455",
"0.6830026",
"0.67647296",
"0.6750103",
"0.67375547",
"0.66965073",
"0.6696125",
"0.66870576",
"0.66793317",
"0.66084343",
"0.65732026",
"0.65732026",
"0.65732026",
"0.65732026",
"0.65732026",
"0.6... | 0.71717495 | 2 |
Gets the build agent label this job is associated with | def yGdR(YKHO):
Q6kx = YKHO._root.find('assignedNode')
if Q6kx is None:
return ''
return Q6kx.text | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def U9vx(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'job_label')",
"def nscJ(YKHO):\n return YKHO._get_info()[0]",
"def DeTJ(YKHO):\n return YKHO._label",
"def DeTJ(YKHO):\n return YKHO._label",
"def DeTJ(YKHO):\n return YKHO.label",
"def DeTJ(YKHO):\n return YKHO.label",
... | [
"0.7174664",
"0.691961",
"0.68934375",
"0.68934375",
"0.68121743",
"0.68121743",
"0.68121743",
"0.68121743",
"0.68121743",
"0.68121743",
"0.68121743",
"0.6798106",
"0.6798106",
"0.6798106",
"0.6798106",
"0.6798106",
"0.6798106",
"0.6798106",
"0.6798106",
"0.6798106",
"0.67981... | 0.0 | -1 |
Retrieves the appropriate plugin for the SCM portion of a job Detects which source code management tool is being used by this job, locates the appropriate plugin for that tool, and returns an instance of the wrapper for that plugin preconfigured with the settings found in the relevant XML subtree. | def ADsp(YKHO):
Q6kx = YKHO._root.find('scm')
t0qN = nXSl(Q6kx)
if t0qN is not None:
return t0qN
raise EXEc('Job XML plugin {0} not found'.format(p8Mn(Q6kx)), p8Mn(Q6kx)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TXal(YKHO, _n2l=False, QePW=None):\n Emd4 = RQcF.get(YKHO.plugin_uid)\n if not Emd4:\n return None\n t0qN = Emd4(YKHO.layout_uid, YKHO.placeholder_uid, workspace=YKHO.workspace, user=YKHO.user, position=YKHO.position)\n t0qN.request = QePW\n return t0qN.process(YKHO.plugin_data, fetch_rel... | [
"0.60227156",
"0.5967492",
"0.5766765",
"0.5734107",
"0.571612",
"0.5708925",
"0.56678355",
"0.5666515",
"0.56595767",
"0.5615653",
"0.55818796",
"0.5551083",
"0.5522276",
"0.55066454",
"0.549091",
"0.5473734",
"0.54437155",
"0.54362977",
"0.53898877",
"0.5368344",
"0.5364159... | 0.6472868 | 0 |
Load saved weights for a given model. | def uyMl(C3ST: Union[tf.keras.Model, torch.nn.Module], dC43: str, luwy: bool=False):
assert hasattr(C3ST, 'fe_compiled') and C3ST.fe_compiled, 'model must be built by fe.build'
if Hy7s.path.exists(dC43):
ValueError("Weights path doesn't exist: ", dC43)
if isinstance(C3ST, ZylS.keras.Model):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SUd8(YKHO, cuiw, eG0V):\n YKHO.weight_saver.restore(cuiw, eG0V)",
"def uyMl(YKHO):\n YKHO.network.load_weights(YKHO.weight_backup)",
"def uyMl(YKHO):\n YKHO.model = t2lc.load(open(YKHO.weights_file, 'rb'))",
"def wyMC(YKHO):\n bo34.info('Loading pre-trained model weights')\n if YKHO.model_... | [
"0.84207016",
"0.8187401",
"0.803836",
"0.7971076",
"0.7949389",
"0.79368395",
"0.79356307",
"0.7912565",
"0.787123",
"0.7850523",
"0.7847091",
"0.7820726",
"0.7820726",
"0.7820726",
"0.7808123",
"0.77995044",
"0.7788221",
"0.77701175",
"0.77355224",
"0.77206326",
"0.77206326... | 0.0 | -1 |
Converts a dictionary to a WHERE clause | def Bv3k(rPXJ, l3Wv=False, QoTA=False):
if rPXJ is None or rPXJ == {}:
Aofo = ('', None)
else:
NHn2, qIxc = ([], [])
if not l3Wv:
for G1Hx, Ty9i in rPXJ.items():
NHn2.append(' ' + G1Hx + '=%s ')
qIxc.append(Ty9i)
else:
for G... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SSDU(cmPJ, ZDAZ=' AND '):\n return R2qU.join([G1Hx + ' = ' + eFmM(Ty9i) for G1Hx, Ty9i in cmPJ.items()], ZDAZ)",
"def Hqgl(tyNF, XbYF, **hkxX):\n WNtM = ()\n for G1Hx in XbYF:\n if G1Hx in ['and', 'or']:\n IPme = ()\n for Ty9i in XbYF[G1Hx]:\n if isinstanc... | [
"0.812231",
"0.7397037",
"0.72704583",
"0.72033685",
"0.7029174",
"0.69073194",
"0.69037426",
"0.68460006",
"0.6817653",
"0.6815403",
"0.6777593",
"0.671093",
"0.66954315",
"0.66674954",
"0.66039604",
"0.65979075",
"0.65759605",
"0.65696603",
"0.6533027",
"0.64752513",
"0.642... | 0.0 | -1 |
Get serializer that can be used to validate a device's state update messages. See documentation for get_state_serializer_cls for information on args etc. | def bg5A(Lx3t):
Zo0k = IyFz.JSONField
if Lx3t:
qviK = Lx3t.state_serializer_name
if not qviK:
bo34.warning('Product passed with no explicit state_serializer_name - using JSONField which will match ANY data')
else:
try:
Zo0k = eOe2(qviK)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iqfr(Lx3t=None):\n Zo0k = bg5A(Lx3t)\n\n class InnerSerializer(IyFz.Serializer):\n \"\"\"Serializer representing a device reporting a state change.\n\n Other fields might be added in future, currently we just expect this key\n \"\"\"\n YQuC = Zo0k(required=True)\n\n class O... | [
"0.6837611",
"0.6786159",
"0.6386826",
"0.635461",
"0.62431777",
"0.6109802",
"0.6056806",
"0.6040443",
"0.6036413",
"0.6036413",
"0.60277146",
"0.5978657",
"0.59021634",
"0.5886924",
"0.5876343",
"0.581599",
"0.5778315",
"0.5731473",
"0.5720962",
"0.571508",
"0.571138",
"0... | 0.6553713 | 2 |
Given the 'actual' serializer for the state of a device (which will be based on the Product), return a serializer that can verify the whole state update object. This has to recreate it because the inner serializer is going to change based on the device/product. | def iqfr(Lx3t=None):
Zo0k = bg5A(Lx3t)
class InnerSerializer(IyFz.Serializer):
"""Serializer representing a device reporting a state change.
Other fields might be added in future, currently we just expect this key
"""
YQuC = Zo0k(required=True)
class OuterSerializer(IyFz.S... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bg5A(Lx3t):\n Zo0k = IyFz.JSONField\n if Lx3t:\n qviK = Lx3t.state_serializer_name\n if not qviK:\n bo34.warning('Product passed with no explicit state_serializer_name - using JSONField which will match ANY data')\n else:\n try:\n Zo0k = eOe2(qviK... | [
"0.64401597",
"0.5793838",
"0.57756567",
"0.57756567",
"0.56874263",
"0.5668141",
"0.56480074",
"0.56032085",
"0.5559575",
"0.5477557",
"0.54527295",
"0.5445284",
"0.54329014",
"0.5411917",
"0.5378598",
"0.53603774",
"0.53347796",
"0.53246796",
"0.5318206",
"0.53059155",
"0.5... | 0.69282466 | 0 |
Shift the camera by the given amount. | def DkWr(YKHO, Jw7X, eUWA):
YKHO.offset_x -= Jw7X / YKHO.scale
YKHO.offset_y -= eUWA / YKHO.scale | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DkWr(YKHO, Z5kt):\n YKHO.cursor += Z5kt",
"def DkWr(YKHO, iArr):\n YKHO.surface.shift(iArr)",
"def N0Pp(YKHO, Z5kt):\n YKHO.moveControl.setRotate(Z5kt)",
"def _ZyW(YKHO, GTZT):\n YKHO.dir += GTZT\n if YKHO.dir > 360:\n YKHO.dir = GTZT\n if YKHO.dir < 0:\n YKHO.dir = 360 - ... | [
"0.7332317",
"0.67607516",
"0.6472507",
"0.6443081",
"0.6368743",
"0.6313886",
"0.62036395",
"0.6178364",
"0.60941684",
"0.605161",
"0.6020494",
"0.6003083",
"0.5968496",
"0.59506243",
"0.59426993",
"0.59414977",
"0.59382784",
"0.5938267",
"0.5922534",
"0.5917994",
"0.5887912... | 0.5998971 | 12 |
If provided 'pk' is "me" then return the current user. | def GKJL(YKHO, QePW, _sei=None):
if QePW.user and _sei == 'me':
return oGir(hq_r(QePW.user).data)
return super(_wf5, YKHO).retrieve(QePW, _sei) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TKWP(Emd4, _sei):\n raise NotImplementedError('Implement in subclass')",
"def RuJL(YKHO):\n return YKHO.get_user(screen_name=YKHO.auth.get_username())",
"def CBIr(YKHO):\n P6bq = YKHO.user_info\n return YKHO.user_model.get_by_id(P6bq['user_id']) if P6bq else None",
"def CBIr(YKHO):\n P6bq ... | [
"0.7280847",
"0.72549355",
"0.7130825",
"0.7130825",
"0.7130825",
"0.7130825",
"0.7056293",
"0.7047368",
"0.6950361",
"0.6950361",
"0.6943284",
"0.6943284",
"0.6943284",
"0.69401395",
"0.6910293",
"0.6910293",
"0.69083333",
"0.68554413",
"0.68554413",
"0.68554413",
"0.6852457... | 0.67211753 | 51 |
With layer dimensions, randomizes coefficients and intercepts in NN | def W9X1(Emd4, fmAV, Ta4V: Tuple):
kPcD = list()
gXtX = list()
for YRbF in range(len(Ta4V) - 1):
kPcD.append(oyIN.random.rand(Ta4V[YRbF], Ta4V[YRbF + 1]))
gXtX.append(oyIN.random.rand(Ta4V[YRbF + 1]))
return Emd4(fmAV, kPcD, gXtX) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, zi3C, a6Jb, xhie):\n YKHO.layer_sizes = [zi3C] + xhie + [a6Jb]\n YKHO.weights = [oyIN.random.rand(i92A, UDEi) for i92A, UDEi in zip(YKHO.layer_sizes, YKHO.layer_sizes[1:])]",
"def FIMM(YKHO, fhcK):\n YKHO.num_layers = len(fhcK)\n YKHO.sizes = fhcK\n YKHO.biases = [oyIN.random.randn(... | [
"0.6337727",
"0.6305888",
"0.6154304",
"0.61500293",
"0.6106213",
"0.6083803",
"0.6047224",
"0.60451835",
"0.6023595",
"0.5993828",
"0.5986318",
"0.59838504",
"0.5982664",
"0.59679717",
"0.5943304",
"0.5936111",
"0.5918801",
"0.5915153",
"0.58976793",
"0.589345",
"0.58735484"... | 0.0 | -1 |
This validates that the dollar_bars() function does not error | def EvQL(bOBl):
IJuB = Jt6V.dollar_bars(bOBl, 'cum_dollar', 70000000.75)
if len(IJuB) > 0:
print('dollar_bars_test() pass')
else:
print('error with dollar_bars_test()') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jFgR(YKHO, BWXx):\n pass",
"def BKmt(YKHO):\n KZj3 = ['', '$5687', ' $59,803', '$ 5867', '5986', '$ 5986.00']\n for clgK in KZj3:\n YKHO.assertFalse(_YzB(clgK))",
"def iL7i(YKHO):\n HrAb = ['$ 5,687', '$ 5,978', '$ 4,057', '$ 3,798', '$ 7.980', '$ 7.364']\n for clgK in HrAb:\n ... | [
"0.71660113",
"0.65074027",
"0.62551713",
"0.59069186",
"0.5905797",
"0.5875639",
"0.5576116",
"0.55075645",
"0.54833007",
"0.548237",
"0.54563725",
"0.54200894",
"0.54006904",
"0.5392984",
"0.5371528",
"0.5333919",
"0.5314634",
"0.5309538",
"0.5309062",
"0.52917",
"0.5282876... | 0.698062 | 1 |
This validates that the dollar_bars_df() function returns a correct amount of columns | def yZcD(bOBl):
g1TI = Jt6V.dollar_bars_df(bOBl, 'cum_dollar', 0.05)
if len(g1TI) > 0:
print('dollar_bars_df_test() pass')
else:
print('error with dollar_bars_df_test()') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def EvQL(bOBl):\n IJuB = Jt6V.dollar_bars(bOBl, 'cum_dollar', 70000000.75)\n if len(IJuB) > 0:\n print('dollar_bars_test() pass')\n else:\n print('error with dollar_bars_test()')",
"def szHO(bOBl):\n jQ3Z = Jt6V.volume_bars_df(bOBl, 'close', 33)\n if len(jQ3Z.columns) > 0:\n p... | [
"0.7289388",
"0.6903739",
"0.67709374",
"0.6629871",
"0.6407698",
"0.61690176",
"0.61453545",
"0.5974335",
"0.58714426",
"0.5805828",
"0.5787016",
"0.57633704",
"0.574088",
"0.57394266",
"0.5694915",
"0.56860524",
"0.5678562",
"0.56625193",
"0.56574297",
"0.56378037",
"0.5630... | 0.700635 | 1 |
Get the version number of the given package | def zvqz(YKHO, B5hb):
DpZH = None
yvT9 = YKHO.shell(['dumpsys', 'package', B5hb, '|', 'grep', 'versionName'])
if yvT9 is not None:
for zFiD in yvT9.splitlines():
g8rx = zFiD.find('=')
if g8rx > -1:
fUpG = zFiD[g8rx + 1:].strip()
if len(fUpG):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DpZH(B5hb: str):\n yR_P = JEuV(B5hb)\n if yR_P is None:\n return None\n Ty9i = getattr(yR_P, '__version__', n9YZ)\n return Ty9i",
"def zvqz(B5hb):\n import pkg_resources\n try:\n pImw = pkg_resources.get_distribution(B5hb)\n return pImw.version\n except pkg_resources... | [
"0.8350647",
"0.806574",
"0.7979833",
"0.7908786",
"0.7873223",
"0.78213197",
"0.7790635",
"0.778682",
"0.7785157",
"0.775609",
"0.775609",
"0.775609",
"0.775609",
"0.775609",
"0.77335036",
"0.771446",
"0.77037",
"0.77037",
"0.76758015",
"0.7651418",
"0.7651343",
"0.7651343... | 0.81416214 | 1 |
Constructs a ResNet18 model. | def qUH4(mL4f=False, **B2fa):
C3ST = S1Vm(em1m, [2, 2, 2, 2], **B2fa)
if mL4f:
C3ST.load_state_dict(rA0C.load_url(mDCG['resnet18']))
return C3ST | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def v19q(mL4f=False, **B2fa):\n C3ST = S1Vm(em1m, [2, 2, 2, 2], **B2fa)\n if mL4f:\n C3ST.load_state_dict(rA0C.load_url(mDCG['resnet18']))\n return C3ST",
"def qUH4(mL4f=True, **B2fa):\n C3ST = S1Vm(em1m, [2, 2, 2, 2], **B2fa)\n if mL4f:\n C3ST.load_state_dict(rA0C.load_url(mDCG['res... | [
"0.78036934",
"0.73894507",
"0.7378036",
"0.73664284",
"0.7342958",
"0.73350024",
"0.7325735",
"0.7325735",
"0.729254",
"0.7252331",
"0.7196154",
"0.7196154",
"0.7196154",
"0.7196154",
"0.7122624",
"0.709443",
"0.70910895",
"0.709014",
"0.70882547",
"0.70037913",
"0.69680023"... | 0.7303929 | 8 |
Constructs a ResNet34 model. | def OwNx(mL4f=False, **B2fa):
C3ST = S1Vm(em1m, [3, 4, 6, 3], **B2fa)
if mL4f:
C3ST.load_state_dict(rA0C.load_url(mDCG['resnet34']))
return C3ST | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OwNx(nZt5=10):\n C3ST = S1Vm(em1m, [3, 4, 6, 3], 2 * nZt5)\n return C3ST",
"def OwNx(mL4f=False, **B2fa):\n C3ST = S1Vm(em1m, [3, 4, 6, 3], **B2fa)\n if mL4f:\n C3ST.load_state_dict(rA0C.load_url(mDCG['resnet34']))\n mLGw = C3ST.fc.in_features\n C3ST.fc = ht2j.nn.Linear(mLGw, _Fei.MO... | [
"0.7703386",
"0.74675333",
"0.74524",
"0.7427917",
"0.7424663",
"0.7424663",
"0.7407424",
"0.73827267",
"0.737552",
"0.73492414",
"0.73492414",
"0.73492414",
"0.73341715",
"0.72390974",
"0.7232337",
"0.7209522",
"0.72081745",
"0.7197311",
"0.70888406",
"0.7065439",
"0.7036283... | 0.7428298 | 4 |
Constructs a ResNet50 model. | def uwZX(mL4f=False, **B2fa):
C3ST = S1Vm(MF6R, [3, 4, 6, 3], **B2fa)
if mL4f:
C3ST.load_state_dict(rA0C.load_url(mDCG['resnet50']))
return C3ST | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def abVM():\n global ResNet50_model\n L9vW = uwZX.ResNet50(weights='imagenet')\n L9vW._make_predict_function()",
"def g4bj(YKHO):\n from tensorflow.keras.applications import ResNet50\n rvDU = ResNet50(input_shape=(uwaB.IMAGE_SIZE_EYES, uwaB.IMAGE_SIZE_EYES, 3), include_top=False, weights='imagenet... | [
"0.7942998",
"0.7562238",
"0.7498587",
"0.74903464",
"0.748225",
"0.74686694",
"0.7455879",
"0.7455879",
"0.7453793",
"0.7451919",
"0.74174935",
"0.7413509",
"0.7386383",
"0.7386383",
"0.7381297",
"0.73666435",
"0.73550534",
"0.73514414",
"0.7338738",
"0.73122096",
"0.7305518... | 0.7474884 | 6 |
Constructs a ResNet152 model. | def hVyu(mL4f=False, **B2fa):
C3ST = S1Vm(MF6R, [3, 8, 36, 3], **B2fa)
if mL4f:
C3ST.load_state_dict(rA0C.load_url(mDCG['resnet152']))
return C3ST | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hVyu(mL4f=False, **B2fa):\n C3ST = S1Vm(MF6R, [3, 8, 36, 3], c2s7, **B2fa)\n if mL4f:\n C3ST.load_state_dict(rA0C.load_url(mDCG['resnet152']))\n return C3ST",
"def hVyu(mL4f=False, **B2fa):\n C3ST = S1Vm(MF6R, [3, 8, 36, 3], **B2fa)\n if mL4f:\n C3ST.load_state_dict(rA0C.load_url... | [
"0.7557265",
"0.7420262",
"0.74164534",
"0.73906183",
"0.73906183",
"0.7366163",
"0.73595834",
"0.73568684",
"0.73468107",
"0.7324853",
"0.7317274",
"0.73095554",
"0.73095554",
"0.7244661",
"0.7239449",
"0.71767616",
"0.714074",
"0.71254396",
"0.7119152",
"0.7089005",
"0.7081... | 0.74026406 | 4 |
Returns True if the sum from the bottom of col i is BOTTOM[i] | def dQ0Q(iBIi, YRbF, kO5c=False):
L7qs = fvDH(iBIi, YRbF)
if 3 not in L7qs:
aUbK = 0
else:
aUbK = L7qs.index(3)
if 6 not in L7qs:
QuZk = 0
else:
QuZk = L7qs.index(6)
if 9 not in L7qs:
Z2VW = 0
else:
Z2VW = L7qs.index(9)
or8S = max(aUbK, QuZ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fL7y(YKHO):\n return oyIN.sum(YKHO.board[0, :]) > 0",
"def CVSN(YKHO):\n r845 = YKHO.generate_free_symbol(domain=Kx1f(0, YKHO.cols, right_open=True, integer=True))\n YRbF = r845.generate_free_symbol(domain=Kx1f(r845 + 1, YKHO.rows, right_open=True, integer=True))\n if YKHO[YRbF, r845].is_zero:\n ... | [
"0.71332",
"0.66081196",
"0.6540091",
"0.6441476",
"0.64035654",
"0.6244073",
"0.6220958",
"0.6028349",
"0.5993182",
"0.5984691",
"0.5983709",
"0.5974733",
"0.5963035",
"0.595777",
"0.59523034",
"0.5911904",
"0.59083635",
"0.58703077",
"0.5867699",
"0.5853902",
"0.5853902",
... | 0.75580466 | 0 |
Return the full path of the jupyter notebook. | def Yt2P():
p4AR = ZbWC.search('kernel-(.*).json', DOAK.connect.get_connection_file()).group(1)
HwSA = a29M()
for KG9w in HwSA:
geh0 = G4JS.get(TDhU(KG9w['url'], 'api/sessions'), params={'token': KG9w.get('token', '')})
for U78l in qQXR.loads(geh0.text):
if U78l['kernel']['id'] =... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TgG9():\n aHOg = Hy7s.path.basename(DOAK.get_connection_file())\n p4AR = aHOg.split('-', 1)[1].split('.')[0]\n for rS2x in geez.list_running_servers():\n try:\n if rS2x['token'] == '' and (not rS2x['password']):\n qv1X = uRlK.request.urlopen(rS2x['url'] + 'api/sessions... | [
"0.7901011",
"0.7838118",
"0.7599443",
"0.7458148",
"0.7417456",
"0.6992057",
"0.6992057",
"0.6992057",
"0.6564537",
"0.65373296",
"0.6479181",
"0.6425848",
"0.6343134",
"0.62865484",
"0.6097616",
"0.6092834",
"0.60874885",
"0.60859007",
"0.6065784",
"0.6046",
"0.60420775",
... | 0.751931 | 3 |
Test attach volume to kvm. | def mTtP(YKHO, auZl, i1c3, AnoG, QUpE, YhQo, OpHc, RRyD, NKSK, fdQt, nvfU, Mib2, DIdd):
auZl.return_value = ['1.1.1.1', '1.1.1.2', '1.1.1.3']
i1c3.return_value = False
YhQo.return_value = False
RRyD.result_value = False
Mib2.return_value = False
AnoG.return_value = {'host_id', 'address'}
QUp... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qYwE(YKHO):\n OaeV = QpfX.RequestContext('admin', 'fake', True)\n akib = NCls.volume_create(OaeV, {'status': 'available', 'host': 'test', 'provider_location': '', 'size': 1})\n SQvy = {'initiator': 'iqn.2012-07.org.fake:01'}\n TJdH = YKHO.start_service('volume', host='test')\n YKHO.volume_api.re... | [
"0.797694",
"0.78574187",
"0.7712839",
"0.7700155",
"0.7632369",
"0.76204526",
"0.75201046",
"0.75139534",
"0.74753237",
"0.73863864",
"0.73169965",
"0.72724247",
"0.7212498",
"0.7088897",
"0.7072678",
"0.70715594",
"0.69642955",
"0.69282407",
"0.68905044",
"0.6881008",
"0.68... | 0.0 | -1 |
Zero the gradient buffers. | def YP7j(YKHO):
YKHO.net.zero_grad() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RP8F(YKHO):\n assert YKHO._grad_buffers is not None, 'buffers are not initialized.'\n for bGrB, GsOy in YKHO._grad_buffers.items():\n GsOy.zero()",
"def vaxF(YKHO):\n YKHO.dw.zero_()\n YKHO.db.zero_()",
"def frhb(YKHO):\n YKHO.gradW = VNqG(YKHO.W.shape)\n YKHO.gradb = VNqG(YKHO.b.s... | [
"0.86332977",
"0.7800649",
"0.7567117",
"0.7420076",
"0.74056625",
"0.7310003",
"0.72885877",
"0.72882223",
"0.7280635",
"0.7280635",
"0.7271896",
"0.72656256",
"0.7254916",
"0.7248324",
"0.7241523",
"0.72139937",
"0.7205861",
"0.7184464",
"0.71841586",
"0.71841586",
"0.71841... | 0.6741131 | 51 |
checks if a string is a float | def j7Lt(l5Ny):
try:
float(l5Ny)
except ValueError:
return False
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def e5f3(vIwR):\n return A69P(vIwR)",
"def e5f3(YKHO, vIwR):\n try:\n float(vIwR)\n return True\n except ValueError:\n return False",
"def Xt5H(vIwR: str) -> bool:\n return ZbWC.match('^-?\\\\d+\\\\.\\\\d+$', vIwR) is not None",
"def e5f3(vIwR):\n try:\n float(vIwR)... | [
"0.9093611",
"0.89476454",
"0.8928918",
"0.888413",
"0.8881243",
"0.8881243",
"0.8839264",
"0.88273513",
"0.88122517",
"0.8777475",
"0.8776226",
"0.87621963",
"0.87326527",
"0.87321585",
"0.8717213",
"0.8683437",
"0.8683437",
"0.8683437",
"0.8683437",
"0.86772805",
"0.8625182... | 0.8585514 | 21 |
converts text into Bool (or None) | def n58L(l5Ny, U82J=True, AncG=True, wNk4=True):
if l5Ny == 'True':
return True
elif l5Ny == 'False':
return False
elif U82J and l5Ny == 'None':
return None
elif AncG:
return l5Ny
elif wNk4:
raise ValueError('text is not bool: text={}'.format(l5Ny))
else:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n58L(l5Ny):\n if l5Ny is None:\n return None\n if l5Ny.strip().lower() == 'true':\n return True\n if l5Ny.strip().lower() == 'false':\n return False\n return None",
"def Brwf(l5Ny):\n if l5Ny.title() in ('True', '1'):\n Aofo = True\n elif l5Ny.title() in ('False'... | [
"0.89094836",
"0.8302712",
"0.8043173",
"0.74803257",
"0.7416688",
"0.73786885",
"0.7376316",
"0.7293492",
"0.7285911",
"0.7283661",
"0.72790307",
"0.7278235",
"0.7204971",
"0.72044146",
"0.7176755",
"0.71764654",
"0.7167186",
"0.71650237",
"0.7164393",
"0.71591336",
"0.71387... | 0.8267053 | 2 |
conveniently apply conversion to args and kwargs into a combined string for use with utils.py | def RwH1(*qIxc, **B2fa):
return ' '.join([AGzf(*qIxc), c__z(**B2fa)]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c__z(**B2fa):\n return ' '.join(['--kwarg={}={}'.format(G1Hx, Ty9i) for G1Hx, Ty9i in B2fa.items()])",
"def CnLm(JfyU, *qIxc, **B2fa):\n return ',\\n\\t'.join(['='.join([str(LVAh) for LVAh in ZfUD]) for ZfUD in m3k5(JfyU, *qIxc, **B2fa).iteritems()])",
"def abWu(YKHO, *Jei1, **pj7m):\n if Jei1:\n ... | [
"0.7232319",
"0.7213047",
"0.71434826",
"0.7063902",
"0.7022606",
"0.6929462",
"0.6843483",
"0.6748662",
"0.6741931",
"0.65514714",
"0.6543387",
"0.654132",
"0.65378577",
"0.6459654",
"0.64581335",
"0.6445248",
"0.6440717",
"0.6400571",
"0.63850546",
"0.638457",
"0.6377175",
... | 0.78536963 | 0 |
The average roll on a dice is 3.5 because the lowest is 1, not zero. Hence the len addition. Unlike avg, it is not rounded down. | def JBMS(YKHO):
return (sum(YKHO.num_faces) + len(YKHO)) / 2 + YKHO.bonus | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FQCL(PT8m):\n return PT8m / 2 + 0.5",
"def eyjh(gwV4, BQNq, ACtJ):\n rtVy = []\n for beOw in range(ACtJ):\n AB0m = []\n for mHzO in range(BQNq):\n AB0m.append(gwV4.roll())\n rtVy.append(AB0m)\n AB0m = []\n Papz = []\n for tZuJ in rtVy:\n Papz.append(Hz... | [
"0.81806564",
"0.6969952",
"0.66979796",
"0.659419",
"0.6492037",
"0.6471447",
"0.64611846",
"0.64283425",
"0.64278",
"0.63048714",
"0.63028485",
"0.63008416",
"0.629794",
"0.6288565",
"0.62696505",
"0.6237597",
"0.6224279",
"0.62145",
"0.61678493",
"0.6149866",
"0.6126762",
... | 0.0 | -1 |
Update the navigation property messages in users | async def patch(YKHO, TBsA: Optional[Message]=None, tuhp: Optional[MessageItemRequestBuilderPatchRequestConfiguration]=None) -> h8nf[Message]:
if not TBsA:
raise TypeError('body cannot be null.')
aOzm = YKHO.to_patch_request_information(TBsA, tuhp)
from .........models.o_data_errors.o_data_error imp... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def V0Ud(YKHO):\n return",
"def V0Ud(YKHO):\n return",
"def V0Ud(YKHO):\n return",
"def RfZx():\n A07C = QePW.form.getlist('ids[]')\n for id in A07C:\n tO9_ = LuKW.query.get(id)\n tO9_.unread = False\n NCls.session.add(tO9_)\n NCls.session.commit()\n return {'success... | [
"0.6297356",
"0.62416446",
"0.62416446",
"0.61452067",
"0.58753717",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",... | 0.0 | -1 |
Update the navigation property messages in users | def h1Is(YKHO, TBsA: Optional[Message]=None, tuhp: Optional[MessageItemRequestBuilderPatchRequestConfiguration]=None) -> mprA:
if not TBsA:
raise TypeError('body cannot be null.')
aOzm = mprA()
aOzm.url_template = YKHO.url_template
aOzm.path_parameters = YKHO.path_parameters
aOzm.http_method... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def V0Ud(YKHO):\n return",
"def V0Ud(YKHO):\n return",
"def V0Ud(YKHO):\n return",
"def RfZx():\n A07C = QePW.form.getlist('ids[]')\n for id in A07C:\n tO9_ = LuKW.query.get(id)\n tO9_.unread = False\n NCls.session.add(tO9_)\n NCls.session.commit()\n return {'success... | [
"0.6297356",
"0.62416446",
"0.62416446",
"0.61452067",
"0.58753717",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",
"0.5874355",... | 0.0 | -1 |
Returns the integer epoch timestamp for the date time described by dt. | def sOgR(YKHO, JRYC, F2VZ='%Y-%m-%dT%H:%M:%SZ'):
try:
return int(qcWV.datetime.strptime(JRYC, F2VZ).timestamp())
except Exception as e:
sU9C = HwRy.exc_info()[2]
QP4x = sU9C.tb_lineno
IznC = sU9C.tb_frame.f_code.co_name
U4TF = type(tTpl).__name__
tO9_ = f'{U4TF} E... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MpkV(JRYC):\n try:\n qtWj = JRYC.timestamp()\n except AttributeError:\n qtWj = (JRYC - qcWV(1970, 1, 1)).total_seconds()\n return qtWj",
"def qtWj(JRYC):\n return GRk0.timegm(JRYC.astimezone(FXGE.utc).timetuple())",
"def BZyY(JRYC):\n return ITS7.mktime(JRYC.timetuple())",
"d... | [
"0.85981387",
"0.83413947",
"0.8307686",
"0.8180226",
"0.8007568",
"0.78481025",
"0.7840135",
"0.7789455",
"0.7738416",
"0.7689708",
"0.7629459",
"0.7566902",
"0.7553526",
"0.7547419",
"0.75183374",
"0.747923",
"0.7469266",
"0.7404018",
"0.74036294",
"0.7359319",
"0.73408365"... | 0.61973435 | 85 |
Guess the name of the Nth NIC for this platform. Note that this counts from 1, not from 0! | def G9XO(Emd4, x8jM):
return 'Ethernet' + str(x8jM) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UeW0(YKHO):\n return YKHO._att_data['nic_index']",
"def aCvS(YKHO):\n YKHO.assertEqual(YKHO.ins.guess_nic_name(1), 'GigabitEthernet0/0')\n YKHO.assertEqual(YKHO.ins.guess_nic_name(2), 'GigabitEthernet0/1')\n YKHO.assertEqual(YKHO.ins.guess_nic_name(3), 'GigabitEthernet0/2')\n YKHO.assertEqual(... | [
"0.6792869",
"0.66740143",
"0.6672665",
"0.6493679",
"0.6440892",
"0.6269561",
"0.62468094",
"0.6196601",
"0.6195392",
"0.6174856",
"0.6047851",
"0.6046762",
"0.59884626",
"0.59009385",
"0.5853774",
"0.57416993",
"0.5718438",
"0.5716239",
"0.56888056",
"0.5682121",
"0.5671425... | 0.708771 | 0 |
Throw an error if the NIC type string is not supported. | def BMqt(Emd4, ksf8):
Emd4.valid_list_only('NIC type', ksf8.upper(), ['E1000', 'VIRTIO', 'VMXNET3']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YD6G(YKHO):\n YKHO.assertRaises(e1Lq, YKHO.ins.validate_nic_type, 'E1000e')\n YKHO.ins.validate_nic_type('E1000')\n YKHO.assertRaises(e1Lq, YKHO.ins.validate_nic_type, 'PCNet32')\n YKHO.assertRaises(e1Lq, YKHO.ins.validate_nic_type, 'virtio')\n YKHO.assertRaises(e1Lq, YKHO.ins.validate_nic_type,... | [
"0.7354783",
"0.6165652",
"0.6138528",
"0.60880274",
"0.5923719",
"0.5919812",
"0.58218026",
"0.5762118",
"0.57557374",
"0.5753076",
"0.571688",
"0.5714345",
"0.5685619",
"0.5662257",
"0.5607231",
"0.5589565",
"0.555801",
"0.55277455",
"0.5521536",
"0.55124277",
"0.5463701",
... | 0.7612756 | 0 |
Yield successive nsized chunks from a list. >>> from pprint import pprint as pp >>> long_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] >>> pp(list(chunks(long_list, n=5))) [[1, 2, 3, 4, 5], [6, 7, 8, 9, 10], [11, 12, 13, 14, 15], [16, 17, 18, 19, 20]] >>> pp(list(chunks(long_list, n=10)... | def eHxA(list, exwG=20):
for YRbF in Ni9Y(0, len(list), exwG):
yield list[YRbF:YRbF + exwG] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def I7IE(BmST, exwG):\n for YRbF in range(0, len(BmST), exwG):\n yield BmST[YRbF:YRbF + exwG]",
"def AyNP(vC9B, exwG):\n for YRbF in range(0, len(vC9B), exwG):\n yield vC9B[YRbF:YRbF + exwG]",
"def AyNP(yv6U, exwG):\n for YRbF in range(0, len(yv6U), exwG):\n yield yv6U[YRbF:YRbF +... | [
"0.87168056",
"0.8709324",
"0.86679584",
"0.86639214",
"0.8631138",
"0.8628954",
"0.8621142",
"0.8614744",
"0.8614225",
"0.8595459",
"0.85838395",
"0.8582747",
"0.85808283",
"0.85729367",
"0.85721856",
"0.8555894",
"0.8546457",
"0.8544512",
"0.8536847",
"0.8536847",
"0.853255... | 0.8452081 | 87 |
Given a binary string (returned by bin()), pad it to a full byte length. | def zsYL(L96l, Enaz=8):
L96l = L96l[2:]
return max(0, Enaz - len(L96l)) * '0' + L96l | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ayn5(KCHu):\n if len(KCHu) >= 8:\n return KCHu\n else:\n return ayn5('0' + KCHu)",
"def GeBt(NPoT, Lx0h, BFUW):\n NNyr = NPoT\n while len(NNyr) < Lx0h:\n NNyr += BFUW\n return NNyr",
"def hVLt(KCHu):\n return KCHu + b'\\x00' * (K3pX.block_size - len(KCHu) % K3pX.block... | [
"0.7664273",
"0.76462305",
"0.7048582",
"0.69234484",
"0.69191396",
"0.6892332",
"0.6832044",
"0.68148077",
"0.6780913",
"0.6759238",
"0.67164993",
"0.6671889",
"0.6662003",
"0.6651288",
"0.66229284",
"0.66203505",
"0.65982616",
"0.65762734",
"0.6570338",
"0.6565567",
"0.6517... | 0.8603714 | 0 |
Given a Python bytestring, returns a string representing those bytes in unicode form. | def rj1U(X9sb):
nKIH = map(bin, X9sb)
eBL1 = map(zsYL, nKIH)
ebso = ''.join(eBL1)
return ebso | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def P6qO(vIwR):\n if isinstance(vIwR, jKi7.binary_type):\n return vIwR.decode('utf8')\n return vIwR",
"def qSz5(vIwR):\n if isinstance(vIwR, jKi7.text_type):\n return vIwR.encode('utf8')\n return vIwR",
"def IUz3(Fg_i):\n return Fg_i.encode('utf8')",
"def lAtV(bytes):\n KCHu =... | [
"0.7980466",
"0.77601",
"0.77522963",
"0.768821",
"0.7633561",
"0.7627254",
"0.76019484",
"0.7556527",
"0.7552276",
"0.7550305",
"0.74668723",
"0.74567795",
"0.7375017",
"0.7338119",
"0.7287374",
"0.7276038",
"0.7259159",
"0.7252087",
"0.72266823",
"0.7222521",
"0.72089255",
... | 0.0 | -1 |
Inserts a Huffman code point into the tree. | def MHMs(YKHO, TKad, szdb, sZqf):
TKad = zsYL(bin(TKad), szdb)
_9jN = YKHO.root
for Ko6S in TKad:
if Ko6S not in _9jN.mapping:
_9jN.mapping[Ko6S] = YKHO._Node(None)
_9jN = _9jN.mapping[Ko6S]
_9jN.data = sZqf | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Hx32(DGJu, tk5Y, opan):\n if tk5Y is None:\n return\n if tk5Y.char is not None:\n DGJu[tk5Y.char] = opan\n Hx32(DGJu, tk5Y.left, opan + '0')\n Hx32(DGJu, tk5Y.right, opan + '1')",
"def zS9g(J_Es, Wxnj):\n WKvO = Wxnj\n Wxnj = ''\n if not J_Es:\n return None\n if J... | [
"0.6589569",
"0.6108399",
"0.5815388",
"0.57805616",
"0.5752119",
"0.5740447",
"0.5690337",
"0.5680421",
"0.56759953",
"0.5668774",
"0.5650463",
"0.56473505",
"0.56392527",
"0.56048995",
"0.55860084",
"0.55731",
"0.55543524",
"0.5551197",
"0.5549426",
"0.55192584",
"0.5511106... | 0.5920399 | 2 |
No other H1/titles, and no heading level skipping. Extra titles break tables of contents, and heading level skipping causes Sphinx/reStructuredText warnings. | def plyw(JnVq):
NlHk = 1
w0E9 = None
UAju = []
for VmPb in JnVq[1:]:
if not isinstance(VmPb, zJvu):
continue
for LihS, aPFp in VmPb.ast.walker():
if not HenV(LihS) or not aPFp:
continue
if BeBt(LihS):
UAju.append(hti2(Vm... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def axYf(YKHO):\n YKHO.check_markdown('##Header', '<p>##Header</p>')",
"def YWw4(K_hV: Notebook) -> bool:\n lw9Z = '\\n'.join([VmPb.cell_source for VmPb in K_hV.initial_cells if VmPb.cell_type == XuVg.MARKDOWN])\n mXDZ = ZbWC.compile('^\\\\s*#\\\\s*[^#\\\\n]*$')\n return not any([mXDZ.match(zFiD) for... | [
"0.66955864",
"0.6536279",
"0.61948484",
"0.60436",
"0.60178024",
"0.6016811",
"0.5978112",
"0.59303766",
"0.5881589",
"0.5850363",
"0.58454454",
"0.5834908",
"0.5809279",
"0.5794726",
"0.5764947",
"0.5758661",
"0.57583815",
"0.5740326",
"0.57346696",
"0.5710599",
"0.5697805"... | 0.5924848 | 8 |
Return `real_name` or `name` if there is no `real_name`. | def qQNS(YKHO):
return YKHO.real_name or YKHO.name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W0tD(YKHO):\n return YKHO.get_alias() or YKHO.get_real_name()",
"def AGAJ(YKHO):\n return None",
"def wGWt(Emd4, mWFP):\n if mWFP is None:\n return Emd4.default_name\n return mWFP",
"def W0tD(mWFP: str) -> str:\n return mWFP",
"def W0tD(YKHO) -> str:\n if YKHO.alias:\n r... | [
"0.7245349",
"0.72112167",
"0.7197701",
"0.71539503",
"0.7004206",
"0.69857085",
"0.69456303",
"0.68676716",
"0.6825539",
"0.68254495",
"0.68183905",
"0.68167496",
"0.6801953",
"0.6782427",
"0.6764507",
"0.6753454",
"0.6753454",
"0.6753454",
"0.6753454",
"0.6753454",
"0.67534... | 0.71034884 | 4 |
Transform int series into a list of ints. | def CRK3(dy_H):
PVOR = []
for eQSh in dy_H.iteritems():
PVOR.append(int(eQSh[1]))
return PVOR | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gXtX(fUYa: Iterable) -> list[int]:\n return XqC_(int, fUYa)",
"def gXtX(fUYa: Iterable) -> list[int]:\n return XqC_(int, fUYa)",
"def LOJD():\n return list(range(100))",
"def GvlY(YKHO) -> x1iM[int]:\n ...",
"def bGuH(YKHO) -> x1iM[int]:\n return [int(Q1bM) for Q1bM in YKHO.lines if Q1bM... | [
"0.7884563",
"0.7884563",
"0.7255371",
"0.7233345",
"0.70552963",
"0.69965065",
"0.69134176",
"0.682781",
"0.6802921",
"0.67919165",
"0.67635584",
"0.66651857",
"0.66559017",
"0.6655129",
"0.66488844",
"0.6516067",
"0.6480669",
"0.6468619",
"0.64277166",
"0.6383949",
"0.63237... | 0.7944251 | 0 |
This function returns the path to the UCI dataset | def fjlo(pmON):
nPrm = oyIN.genfromtxt(pmON, delimiter=',')
usx6, WfCS = nPrm.shape
fuBA = nPrm[:, 0]
EcVT = nPrm[:, 1:usx6]
return (EcVT, fuBA) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _OEM():\n pmON = 'uci-datasets'\n return pmON",
"def i0XC():\n i0XC = IvYx(gzes('data', 'miri_data.fits'))\n return i0XC",
"def c1ta(YKHO) -> str:\n pass",
"def KHwQ(YKHO):\n if YKHO.smell is not None:\n sWmO = Hy7s.getcwd()\n uRP3 = YKHO.smell.getDatasetFileName()\n ... | [
"0.82314956",
"0.73473495",
"0.73052967",
"0.71293914",
"0.70720047",
"0.7036846",
"0.7017284",
"0.6898519",
"0.6859475",
"0.6830944",
"0.68078107",
"0.68019974",
"0.6769947",
"0.6760815",
"0.66430664",
"0.65924156",
"0.6591438",
"0.65379024",
"0.65197337",
"0.651916",
"0.650... | 0.59542 | 99 |
Error where the message is JSON an the output type is JSON. | def qhtl(YKHO):
raise ValueError(qQXR.dumps({'foo': 'bar'})) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sVBQ(Ol8d):\n return GtGV(isError=True, message=Ol8d)",
"def rOP8(YKHO):\n raise ValueError('This is a string')",
"def D6JL(YKHO):\n raise ValueError(qQXR.dumps({'foo': 'bar'}))",
"def qQXR(YKHO):\n Wxnj = YKHO.__class__.__name__[:-9]\n return {'status': 'ERROR', 'message': YKHO.message, '... | [
"0.7696506",
"0.7689799",
"0.7316694",
"0.70425725",
"0.70320266",
"0.70295364",
"0.701168",
"0.6900032",
"0.688383",
"0.68376255",
"0.67934465",
"0.672307",
"0.66862",
"0.6685335",
"0.66838205",
"0.6611118",
"0.6577461",
"0.65512717",
"0.65512717",
"0.65512717",
"0.6545962",... | 0.82128835 | 0 |
Convert String representation to python boolean | def ovrE(BWXx):
return True if BWXx.lower() == 'true' else False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M0mR(YKHO, str):\n if str.lower() == 'true':\n return True\n elif str.lower() == 'false':\n return False\n else:\n raise ValueError",
"def M0mR(KCHu):\n if KCHu == 'True':\n return True\n elif KCHu == 'False':\n return False",
"def j_4z(KCHu):\n return b... | [
"0.86026204",
"0.856714",
"0.85612994",
"0.84829056",
"0.8477651",
"0.8477243",
"0.8465087",
"0.84635544",
"0.8370858",
"0.83641064",
"0.829957",
"0.829781",
"0.82851815",
"0.8280355",
"0.82796896",
"0.82592833",
"0.8233062",
"0.82262975",
"0.82262975",
"0.82262975",
"0.82262... | 0.0 | -1 |
Convert String representation to python boolean | def UW7m(BWXx):
return None if BWXx.lower() == 'null' else BWXx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M0mR(YKHO, str):\n if str.lower() == 'true':\n return True\n elif str.lower() == 'false':\n return False\n else:\n raise ValueError",
"def M0mR(KCHu):\n if KCHu == 'True':\n return True\n elif KCHu == 'False':\n return False",
"def j_4z(KCHu):\n return b... | [
"0.86026204",
"0.856714",
"0.85612994",
"0.84829056",
"0.8477651",
"0.8477243",
"0.8465087",
"0.84635544",
"0.8370858",
"0.83641064",
"0.829957",
"0.829781",
"0.82851815",
"0.8280355",
"0.82796896",
"0.82592833",
"0.8233062",
"0.82262975",
"0.82262975",
"0.82262975",
"0.82262... | 0.0 | -1 |
Returns the url to access a detailed record for this article. | def hlzF(YKHO):
return gxEw('article-detail', args=[str(YKHO.eid)]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bD7m(YKHO):\n bD7m = dDl6 + UtR2['detailed_notes'].format(version=vp8q, investor_id=YKHO._investor_id)\n return bD7m",
"def iLuo(YKHO):\n raise NotImplementedError('Please define a detail_url fixture')",
"def IxeK(YKHO):\n return gxEw(YKHO._meta.db_table + '-detail', args=[YKHO.pk])",
"def hK... | [
"0.741842",
"0.7228934",
"0.70731884",
"0.6929183",
"0.67698354",
"0.67155814",
"0.6524817",
"0.65204734",
"0.6511781",
"0.64913875",
"0.64913875",
"0.64736855",
"0.646738",
"0.64569485",
"0.6449349",
"0.63867664",
"0.637815",
"0.6377972",
"0.637601",
"0.63690287",
"0.6340194... | 0.67375314 | 5 |
Get an existing ServerCertificate resource's state with the given name, id, and optional extra properties used to qualify the lookup. | def NMoC(kFeU: str, id: pulumi.Input[str], VKhi: Optional[pulumi.ResourceOptions]=None) -> 'ServerCertificate':
VKhi = qe4Y.ResourceOptions.merge(VKhi, qe4Y.ResourceOptions(id=id))
r6DL = ODVK.__new__(ODVK)
r6DL.__dict__['arn'] = None
r6DL.__dict__['certificate_body'] = None
r6DL.__dict__['certifica... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NMoC(kFeU: str, id: pulumi.Input[str], VKhi: Optional[pulumi.ResourceOptions]=None, Viyi: Optional[pulumi.Input[str]]=None, MSpN: Optional[pulumi.Input[str]]=None, jGRS: Optional[pulumi.Input[str]]=None, BaHi: Optional[pulumi.Input[str]]=None) -> 'SigningCertificate':\n VKhi = qe4Y.ResourceOptions.merge(VKh... | [
"0.6052851",
"0.59472835",
"0.5911128",
"0.5845596",
"0.5821788",
"0.5787545",
"0.5569199",
"0.5488104",
"0.5482053",
"0.54229724",
"0.5404158",
"0.5331332",
"0.53033584",
"0.5267888",
"0.52262336",
"0.52247524",
"0.5200448",
"0.5139293",
"0.5097858",
"0.50661504",
"0.5038994... | 0.6484734 | 0 |
Amazon Resource Name (ARN) of the server certificate | def hMqs(YKHO) -> qe4Y.Output[str]:
return qe4Y.get(YKHO, 'arn') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tZ3A(YKHO) -> str:\n return qe4Y.get(YKHO, 'certificate_arn')",
"def tZ3A(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'certificate_arn')",
"def tZ3A(YKHO) -> qe4Y.Output[h8nf[str]]:\n return qe4Y.get(YKHO, 'certificate_arn')",
"def tZ3A(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get... | [
"0.7874943",
"0.7563639",
"0.7406033",
"0.7153143",
"0.7153143",
"0.7153143",
"0.7153143",
"0.6794777",
"0.6558095",
"0.64979637",
"0.63397",
"0.63273597",
"0.63273597",
"0.63273597",
"0.63273597",
"0.6284935",
"0.6271541",
"0.6271541",
"0.6251895",
"0.6086229",
"0.6083213",
... | 0.0 | -1 |
Returns a tensor initialized with random integers. | def zH6g(YKHO, gqRb, ODP9, MPlV, yDqo=oyIN.int8):
return YKHO.rng.random_integers(gqRb, ODP9, SMR4.make_axes(MPlV).lengths).astype(yDqo) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kM13():\n M4N3 = tuKI.choice(YfpN)\n ROpF = tuKI.choice((1, (2, 3), (4, 5, 6), (7, 8, 9, 10)))\n a1PO = ht2j.rand(ROpF).to(M4N3)\n nonlocal expected\n aEqx += a1PO.numel()\n return a1PO",
"def SpGD(exwG, r8hN):\n return ht2j.tensor(oyIN.random.rand(exwG, r8hN))",
"def zH6g(gqRb, ODP9=N... | [
"0.72320473",
"0.7147817",
"0.69167143",
"0.6912682",
"0.6890359",
"0.68299276",
"0.6795031",
"0.6721597",
"0.6686373",
"0.6605868",
"0.6515695",
"0.65011483",
"0.6422103",
"0.64078075",
"0.63667065",
"0.6362052",
"0.6356978",
"0.6348104",
"0.6318075",
"0.6313269",
"0.6236276... | 0.0 | -1 |
Add 2 integers Arguments op1 Operand 1 op2 Operand 2 Returns op1+op2 | def H2v5(Emd4, j9Y_, EkqX):
return j9Y_ + EkqX | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H2v5(YKHO, J8Hj: float, ol_Q: float) -> float:\n YKHO.last_result = J8Hj + ol_Q\n return YKHO.last_result",
"def B7NR(WKvO, LVAh):\n return WKvO + LVAh",
"def H2v5(gaYL, StMt):\n return gaYL + StMt",
"def H2v5(gaYL, StMt):\n return gaYL + StMt",
"def H2v5(oMDt, mTG8):\n return oMDt + ... | [
"0.8138036",
"0.7967058",
"0.79427403",
"0.79090893",
"0.77429825",
"0.76775885",
"0.7663965",
"0.7663965",
"0.7663965",
"0.7649298",
"0.76266265",
"0.76266253",
"0.76253027",
"0.7609575",
"0.7603526",
"0.7593131",
"0.7589691",
"0.7575094",
"0.7572081",
"0.75549823",
"0.75547... | 0.8804696 | 0 |
Return the display name of this Gateway. | def mWFP(YKHO):
return YKHO._name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def y0hN(YKHO) -> str:\n return YKHO.get_hardware_state()['display_name']",
"def y0hN(YKHO):\n return YKHO.display_name",
"def qQNS(YKHO) -> str:\n return YKHO._display_name",
"def qQNS(YKHO) -> str:\n return YKHO._display_name",
"def y0hN(YKHO):\n return YKHO.__display_name",
"def y0hN(YK... | [
"0.81621647",
"0.8139246",
"0.8138206",
"0.8138206",
"0.80951333",
"0.8094908",
"0.809059",
"0.809059",
"0.809059",
"0.809059",
"0.809059",
"0.809059",
"0.809059",
"0.809059",
"0.809059",
"0.809059",
"0.809059",
"0.809059",
"0.809059",
"0.809059",
"0.809059",
"0.809059",
... | 0.0 | -1 |
Return _state variable, containing the appropriate constant. | def QTBn(YKHO):
return YKHO._state | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bGIA(YKHO):\n return YKHO.__state",
"def bGIA(YKHO):\n return YKHO.__state",
"def bGIA(YKHO):\n return YKHO.__state",
"def bGIA(YKHO):\n return YKHO.__state",
"def bGIA(YKHO):\n return YKHO.__state",
"def bGIA(YKHO):\n return YKHO.__state",
"def bGIA(YKHO):\n return YKHO.__stat... | [
"0.7543758",
"0.7543758",
"0.7543758",
"0.7543758",
"0.7543758",
"0.7543758",
"0.7543758",
"0.7543758",
"0.7543758",
"0.7543758",
"0.7543758",
"0.7543758",
"0.7543758",
"0.7543758",
"0.7543758",
"0.7543758",
"0.7543758",
"0.7543758",
"0.7543758",
"0.7543758",
"0.7543758",
"... | 0.0 | -1 |
Boolean if volume is currently muted. | def qHHI(YKHO):
return YKHO._muted | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qHHI(YKHO):\n return YKHO.device.get_muted()",
"def qHHI(YKHO):\n return YKHO._volume.muted",
"def qHHI(YKHO):\n return YKHO._muted",
"def qHHI(YKHO):\n return YKHO._player_variables.get('muted', '0') == '1'",
"def qHHI(YKHO):\n return YKHO._volume_muted",
"def qHHI(YKHO):\n return ... | [
"0.89479625",
"0.8912609",
"0.88687724",
"0.8857336",
"0.88423115",
"0.8840626",
"0.8806076",
"0.88016236",
"0.87876433",
"0.8767073",
"0.8750962",
"0.8665265",
"0.8185604",
"0.806479",
"0.7917085",
"0.77053595",
"0.72996104",
"0.71457285",
"0.7016041",
"0.69064784",
"0.68272... | 0.8876313 | 4 |
Fetch state from Gateway. | async def async_update(YKHO):
from miio import DeviceException
try:
QTBn = await YKHO.hass.async_add_job(YKHO._device.send, 'get_prop_fm', '')
vzeF.info('Got new state: %s', QTBn)
akib = QTBn.pop('current_volume')
QTBn = QTBn.pop('current_status')
vzeF.debug('Got new stat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def GBfH(YKHO):\n rUT2 = 'hfp_facade.GetState'\n ZTKB = {}\n APmz = YKHO.build_id(YKHO.test_counter)\n YKHO.test_counter += 1\n return YKHO.send_command(APmz, rUT2, ZTKB)",
"def NMoC(YKHO):\n return YKHO.state",
"def nrOS(YKHO):\n return YKHO.get_state()",
"def bGIA(YKHO):\n return YK... | [
"0.7257181",
"0.6844469",
"0.67799836",
"0.677015",
"0.677015",
"0.677015",
"0.677015",
"0.677015",
"0.677015",
"0.677015",
"0.677015",
"0.677015",
"0.677015",
"0.677015",
"0.677015",
"0.677015",
"0.677015",
"0.677015",
"0.677015",
"0.677015",
"0.677015",
"0.677015",
"0.6... | 0.0 | -1 |
Swaps two randomly selected students of a randomly selected course, returning the new schedule. | def _YFR(b6Gq, sDlr, aia2):
stj8 = list(sDlr)
v8j8 = []
while not v8j8:
GQfX = tuKI.choice(stj8)
if GQfX.seminars or GQfX.practicals:
if GQfX.get_group_count('seminar') > 1:
v8j8.append('seminar')
elif GQfX.get_group_count('practical') > 1:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CdDT(b6Gq, sDlr, aia2):\n n0Ph = ZZSa.flatten_schedule(b6Gq)\n Upaa = len(aia2)\n Hi7w = len(n0Ph)\n YRbF = tuKI.randrange(Hi7w)\n r845 = tuKI.randrange(Hi7w)\n while YRbF == r845:\n r845 = tuKI.randrange(Hi7w)\n N1CJ = n0Ph[YRbF]\n mXYD = n0Ph[r845]\n if mXYD:\n DeLF =... | [
"0.74785805",
"0.593448",
"0.5905982",
"0.5882648",
"0.56299937",
"0.55841625",
"0.55825126",
"0.55676633",
"0.55127686",
"0.5469514",
"0.53964144",
"0.5293354",
"0.52631646",
"0.52596694",
"0.52229327",
"0.5201208",
"0.51932085",
"0.5138949",
"0.5135602",
"0.51300216",
"0.51... | 0.8046169 | 0 |
Returns the reward for the last step based on self.events. For the counting of occured events to work, this should be called with count=True exactly once after every round. Relies on self.rewards for the rewards of specific actions. | def xyVK(YKHO, UHFx=True):
YTVa = oyIN.asarray(YKHO.events)
BWz1 = oyIN.append(oyIN.count_nonzero([YTVa == YRbF for YRbF in range(17)], axis=1), [YKHO.game_state['step']])
vOGg = oyIN.dot(BWz1, YKHO.rewards)
if UHFx:
YKHO.count_events[:18] += oyIN.append(BWz1[:17], [vOGg])
return (vOGg, BWz1... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nFcm(YKHO):\n uGmR = YKHO.lastreward\n YKHO.lastreward = YKHO.env.data[-1]['throughput'] - 1000 * YKHO.env.data[-1]['latency']\n YKHO.allrewards.append(uGmR)\n return uGmR",
"def xyVK(YKHO):\n YKHO.new_reward_event.wait()\n YKHO.new_reward_event.clear()\n return YKHO.reward",
"def jKPo... | [
"0.73616767",
"0.71917915",
"0.71333086",
"0.70651907",
"0.6875737",
"0.686555",
"0.6864871",
"0.6840174",
"0.6832952",
"0.68284947",
"0.6806529",
"0.67781633",
"0.67746323",
"0.67549855",
"0.67538065",
"0.6736041",
"0.67294556",
"0.672469",
"0.67201763",
"0.67169195",
"0.670... | 0.7386935 | 0 |
Update the target model weights with the model weights. | def hx0A(YKHO):
YKHO.target_model.set_weights(YKHO.model.get_weights()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def hx0A(YKHO):\n YKHO.target_model.set_weights(YKHO.model.get_weights())",
"def hx0A(YKHO):\n YKHO.target_model.set_weights(YKHO.model.get_weights())",
"def hx0A(YKHO):\n YKHO.target_model.set_weights(YKHO.model.get_weights())",
"def hx0A(YKHO):\n YKHO.target_model.set_weights(YKHO.model.get_wei... | [
"0.8846242",
"0.8846242",
"0.8846242",
"0.8846242",
"0.87849116",
"0.8753498",
"0.87045157",
"0.8587854",
"0.831767",
"0.82247496",
"0.80766356",
"0.8049873",
"0.8041962",
"0.80323946",
"0.8007829",
"0.800775",
"0.7932697",
"0.7880532",
"0.78437656",
"0.78399545",
"0.78399545... | 0.8856077 | 0 |
Returns which actions are possible from this state (batch of states). Excludes actions the game deems impossible, along with walking into explosions since they guarantee death. The state is projected into the future, i.e. explosions fade and bombs explode, to determine this. | def hn4p(YKHO, Wc9F, aR7T=True):
if YKHO.noimpossible:
if YKHO.state_version == 'ALLOH':
oeNL = oyIN.asarray(oyIN.where(Wc9F[:, 3:4, :, :] == 1))
DkWr = oyIN.asarray([[0, 0, -1, 0], [0, 0, 1, 0], [0, 0, 0, -1], [0, 0, 0, 1]])
if aR7T:
QyVM = oyIN.repeat(oy... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xASv(YKHO, QTBn):\n return [XeOP for XeOP in YKHO.possible_actions if YKHO.legal(QTBn, XeOP)]",
"def REUT(YKHO, QTBn):\n return YKHO.actions",
"def WLEh(YKHO, QTBn):\n if not QTBn in YKHO.states.keys():\n return []\n return YKHO.states[QTBn].getLegalActions(0)",
"def xASv(YKHO, QTBn):\... | [
"0.78739315",
"0.78481513",
"0.7759207",
"0.768561",
"0.75011253",
"0.7475447",
"0.74674016",
"0.7433979",
"0.74207324",
"0.73724794",
"0.73645175",
"0.7257585",
"0.7225604",
"0.7190676",
"0.7143387",
"0.7095692",
"0.70728827",
"0.70726097",
"0.7064381",
"0.7039985",
"0.70310... | 0.6559923 | 80 |
Compares whether the proximity of the agent is the same for both states. | def sEwS(YKHO, AJEJ, Xsoz, EICu=True):
if EICu:
if YKHO.state_version == 'ALLOH':
oeNL = oyIN.asarray(oyIN.where(AJEJ[:, 3:4, :, :] == 1))
HHsV = oyIN.asarray(oyIN.where(Xsoz[:, 3:4, :, :] == 1))
elif YKHO.state_version == 'ALLOHL':
oeNL = oyIN.asarray(oyIN.where(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IzcV(YKHO, lUtN, BmXa):\n return False",
"def LcXL(YKHO, lUtN, BmXa):\n for YRbF, r845 in YKHO.all_cells():\n if lUtN[YRbF][r845] != BmXa[YRbF][r845]:\n return False\n return True",
"def IzcV(YKHO, lUtN, BmXa):\n return lUtN == BmXa",
"def mFKJ(YKHO, lUtN, BmXa):\n gnPz.r... | [
"0.6813338",
"0.6472666",
"0.6450825",
"0.64149505",
"0.63905793",
"0.6329418",
"0.63121253",
"0.6289284",
"0.6173492",
"0.616307",
"0.60685945",
"0.60586256",
"0.5984932",
"0.59283453",
"0.58971184",
"0.58819413",
"0.5878065",
"0.58567405",
"0.5853725",
"0.5840792",
"0.58307... | 0.64209735 | 3 |
Checks whether agent is in the explosion range of a bomb. | def tJLH(YKHO, Wc9F):
if YKHO.state_version == 'ALLOH':
oeNL = oyIN.asarray(oyIN.where(Wc9F[:, 3:4, :, :] == 1))
elif YKHO.state_version == 'ALLOHL':
oeNL = oyIN.asarray(oyIN.where(Wc9F[:, 3:4, :, :] == 1))
elif YKHO.state_version == 'ALL':
oeNL = oyIN.asarray(oyIN.where(Wc9F[:, 1:2,... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IqMX(DghZ, oyg0):\n Yk5v = BUZF(DghZ.game, oyg0.position)\n if Yk5v[0]:\n oyg0.protection -= 1\n if DghZ.game.player_min.bomb and Yk5v[1] == DghZ.game.player_min.bomb.position:\n DghZ.game.player_min.bomb = None\n else:\n DghZ.game.player_max.bomb = None\n ... | [
"0.67958385",
"0.63945127",
"0.6204606",
"0.6177096",
"0.61487985",
"0.6033647",
"0.6017943",
"0.5993569",
"0.597484",
"0.59737253",
"0.5950577",
"0.5950313",
"0.5902107",
"0.58828586",
"0.5873375",
"0.58690387",
"0.5817278",
"0.5815662",
"0.58147144",
"0.58065295",
"0.578967... | 0.0 | -1 |
Get the total priority of the tree. | def qUx6(YKHO):
return YKHO.tree[0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qUx6(YKHO):\n return YKHO.__tree[0]",
"def qUx6(YKHO):\n return YKHO._tree[0]",
"def Ey19(YKHO) -> qe4Y.Output[float]:\n return qe4Y.get(YKHO, 'priority')",
"def FN7K(YKHO) -> int:\n ...",
"def FN7K(YKHO) -> int:\n ...",
"def Ey19(YKHO) -> h8nf[float]:\n return qe4Y.get(YKHO, 'prior... | [
"0.88899446",
"0.88222975",
"0.7092193",
"0.6966924",
"0.6966924",
"0.6935507",
"0.6894163",
"0.68885285",
"0.68885285",
"0.68885285",
"0.68319404",
"0.68319404",
"0.68319404",
"0.68319404",
"0.68319404",
"0.68319404",
"0.68319404",
"0.68319404",
"0.6815066",
"0.6805507",
"0.... | 0.8950693 | 0 |
This function returns the string representation of the list | def zAg0(YKHO):
Aofo = '{'
for ZfUD in YKHO.array:
if ZfUD != None:
H5ew, BWXx = ZfUD
Aofo = Aofo + '' + str(H5ew) + ':' + ' ' + str(BWXx) + ',' + ' '
Aofo += '}'
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n if len(YKHO.myList) == 0:\n return '<>'\n U5bT = '<'\n for ZfUD in YKHO.myList:\n U5bT += str(ZfUD) + ', '\n U5bT = U5bT[:-2] + '>'\n return U5bT",
"def ucRX(YKHO, list):\n return ' ; '.join(list)",
"def Iimo(x29X):\n return '[' + ' '.join([str(WKvO) for WKv... | [
"0.79527485",
"0.7890938",
"0.78755224",
"0.78442824",
"0.7814696",
"0.7813245",
"0.7799733",
"0.7790897",
"0.76953137",
"0.76382136",
"0.7623673",
"0.7616172",
"0.7610918",
"0.75882155",
"0.75520974",
"0.7542483",
"0.75297326",
"0.75284976",
"0.752832",
"0.7503995",
"0.74991... | 0.0 | -1 |
Convert a string to a boolean. | def sV7J(ANfV):
jzdc = ANfV.lower()
if any((yzQ0.startswith(jzdc) for yzQ0 in ('yes', 'true', '1'))):
return True
elif any((yzQ0.startswith(jzdc) for yzQ0 in ('no', 'false', '0'))):
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def M0mR(YKHO, str):\n if str.lower() == 'true':\n return True\n elif str.lower() == 'false':\n return False\n else:\n raise ValueError",
"def M0mR(YKHO, str):\n try:\n if str.lower() == 'true':\n return True\n elif str.lower() == 'false':\n re... | [
"0.88839364",
"0.8839046",
"0.87093806",
"0.8704254",
"0.8696882",
"0.8694276",
"0.8649081",
"0.8590015",
"0.8533174",
"0.84883606",
"0.8476471",
"0.8463439",
"0.8460529",
"0.8455518",
"0.8445224",
"0.8439695",
"0.84371316",
"0.8428571",
"0.84049445",
"0.83833456",
"0.8382153... | 0.0 | -1 |
Return the type a pointer points to. | def HqOs(g8x2, mS46):
if len(mS46) > 1:
bGrB, HRJ_ = AZCY(SnBA, [g8x2, mS46[0]])
if HRJ_ == 'array':
return SnBA[g8x2][1][mS46[0]][1][2][1]
else:
return HqOs(HRJ_, mS46[1:])
else:
return SnBA[g8x2][1][mS46[0]][1][1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def I5IV(YKHO):\n return YKHO.get_c_type() + ' *'",
"def TNg2(YKHO):\n h_UO = YKHO.field_type.get_c_type()\n if YKHO.is_dynamically_allocated():\n p_Ww = h_UO + '*'\n else:\n p_Ww = h_UO\n return p_Ww",
"def type(YKHO):\n return YKHO.types[YKHO._internal.get_type()]",
"def FRu... | [
"0.8147374",
"0.6892176",
"0.68215513",
"0.68138367",
"0.66998494",
"0.65724957",
"0.65688413",
"0.65688413",
"0.65688413",
"0.65688413",
"0.65688413",
"0.65688413",
"0.65688413",
"0.65688413",
"0.65688413",
"0.65688413",
"0.65688413",
"0.65688413",
"0.65688413",
"0.65688413",
... | 0.692451 | 1 |
Get the size of this object. | def zNig(YKHO):
if YKHO.name in OSz_:
return OSz_[YKHO.name][0]
else:
return SnBA[YKHO.name][0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jiw9(YKHO):\n return YKHO.__size",
"def zNig(YKHO):\n return YKHO.__size",
"def zNig(YKHO):\n return YKHO.__size",
"def zNig(YKHO):\n return YKHO.__size",
"def zNig(YKHO):\n return YKHO.__size",
"def zNig(YKHO):\n return YKHO.__size",
"def zNig(YKHO):\n return YKHO.__size",
"... | [
"0.8948916",
"0.88137907",
"0.88137907",
"0.88137907",
"0.88137907",
"0.88137907",
"0.88137907",
"0.88137907",
"0.88137907",
"0.88137907",
"0.88137907",
"0.88137907",
"0.88137907",
"0.88137907",
"0.88137907",
"0.88137907",
"0.88137907",
"0.88137907",
"0.88137907",
"0.88137907",... | 0.0 | -1 |
Return the radar speed from dry snow density density can be in g/cm3 or kg/m3 form can be 'Ulaby','Hallikainen','Tiuri' string can be 'speed', 'factor' or 'wrongfactor' | def iBLD(InLe, L03z):
Z9rn = 300000000.0
if InLe > 10:
InLe = InLe / 1000
AJlP = {'Ulaby': Z9rn * (1 + 0.51 * InLe) ** (-1.5), 'Hallikainen': Z9rn * (1 + 1.91 * InLe) ** (-0.5), 'Tiuri': Z9rn * (1 + 1.7 * InLe + 0.7 * InLe ** 2) ** (-0.5)}
return AJlP[L03z] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bpxA(YKHO):\n return YKHO.velocity * YUNn(YKHO.orientation)",
"def iBLD(YKHO):\n return YKHO.named.data.sensordata['torso_subtreelinvel'][0]",
"def M6Ck(a1PO, KMvS=KMvS, A3Vt=A3Vt):\n return oyIN.sqrt(KMvS * A3Vt * a1PO)",
"def M478(oxOY, ab82, wb15, pp_t, nkgu=150, HGCR=0.5):\n import numpy ... | [
"0.62466276",
"0.6179332",
"0.60055673",
"0.59282804",
"0.5918604",
"0.59111255",
"0.591052",
"0.58526236",
"0.58242583",
"0.5817101",
"0.58156484",
"0.58029646",
"0.5796154",
"0.5796154",
"0.57665944",
"0.56957346",
"0.56745017",
"0.56659573",
"0.5663818",
"0.5663347",
"0.56... | 0.5746067 | 15 |
In the constructor we instantiate nn.Linear module | def FIMM(YKHO, vwEp):
super(T8WO, YKHO).__init__()
YKHO.linear = ht2j.nn.Linear(vwEp, 1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO):\n super(wOed, YKHO).__init__()\n YKHO.linear = ht2j.nn.Linear(1, 1)",
"def FIMM(YKHO):\n super(wOed, YKHO).__init__()\n YKHO.linear = ht2j.nn.Linear(1, 1)",
"def FIMM(YKHO):\n super(wOed, YKHO).__init__()\n YKHO.linear = ht2j.nn.Linear(1, 1)",
"def FIMM(YKHO):\n super(wOe... | [
"0.82966393",
"0.8168393",
"0.8119339",
"0.7932665",
"0.7902927",
"0.7795999",
"0.77735466",
"0.77735466",
"0.7734436",
"0.7662425",
"0.75809723",
"0.7540663",
"0.74910474",
"0.7471288",
"0.74252933",
"0.7359681",
"0.73573744",
"0.73566186",
"0.7342114",
"0.7338439",
"0.73108... | 0.74784166 | 13 |
Returns 'num_keywords' words with the highest posterior probabilities For Part 3 | def NDEx(JGUO, StbQ, TSye):
xGCj = sorted(JGUO.items(), key=seET.itemgetter(1), reverse=True)
CjpG = sorted(StbQ.items(), key=seET.itemgetter(1), reverse=True)
FGpB = []
nlYj = []
for YRbF in range(TSye):
FGpB.append(xGCj[YRbF])
nlYj.append(CjpG[YRbF])
return (FGpB, nlYj) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WmLo(pThy, Tb66, yEcJ, CtWL):\n RBFf = oyIN.log(oyIN.sum(yEcJ, 0) / oyIN.float(oyIN.sum(yEcJ)))\n s5Qz = {}\n for UXqs in Tb66.keys():\n cJtt = pThy[UXqs] + Tb66[UXqs] - RBFf\n Mzur = sorted(range(len(cJtt)), key=lambda WKvO: cJtt[WKvO], reverse=True)[:5]\n s5Qz[UXqs] = [CtWL[d6pt... | [
"0.6751723",
"0.6517855",
"0.65033793",
"0.64864653",
"0.64098215",
"0.63226235",
"0.62929165",
"0.6231479",
"0.62312967",
"0.6223101",
"0.62059104",
"0.6189303",
"0.6176208",
"0.6162132",
"0.611741",
"0.60983616",
"0.6086372",
"0.6076947",
"0.6068328",
"0.6067718",
"0.605142... | 0.57751244 | 60 |
Returns the absolute path to the directory containing this script. | def kn2R():
return Hy7s.path.dirname(Hy7s.path.abspath(xAKo)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TCZx(YKHO):\n pmON = Hy7s.path.realpath(HwRy.argv[0])\n if Hy7s.path.isdir(pmON):\n return pmON\n else:\n return Hy7s.path.dirname(pmON)",
"def TCZx():\n return Hy7s.path.dirname(Hy7s.path.realpath(xAKo))",
"def rlTN(YKHO):\n return Hy7s.path.dirname(Hy7s.path.realpath(xAKo))",... | [
"0.8635309",
"0.8491578",
"0.84789276",
"0.84765756",
"0.84690225",
"0.8401513",
"0.8401513",
"0.82945544",
"0.82026243",
"0.8152214",
"0.8152214",
"0.8118978",
"0.81158876",
"0.8111532",
"0.80602944",
"0.8054851",
"0.7993229",
"0.7989311",
"0.7949107",
"0.79465884",
"0.78004... | 0.86033607 | 1 |
Looks for a file with a specific name closest to a project path. This is similar to the logic used by a versioncontrol system (like git) to find its configuration directory (.git) based on the current directory when a command is invoked. | def NSXm(pan_, pmON, KfMH):
SkC9 = Hy7s.path.join(pmON, pan_)
if Hy7s.path.isfile(SkC9):
return SkC9
if pmON == KfMH:
return None
_AKB = Hy7s.path.dirname(pmON)
if _AKB == pmON:
return None
return NSXm(pan_, _AKB, KfMH) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bjyF(gIsw):\n TRqw = Hy7s.path.abspath(Hy7s.path.join(Hy7s.getcwd(), '..'))\n for tk5Y, AQSv, RRlC in Hy7s.walk(TRqw):\n if gIsw in RRlC:\n return Hy7s.path.join(tk5Y, gIsw)\n raise RuntimeError(\"File '%s' not found\" % gIsw)",
"def kWlQ(Ux0P):\n for xtX7 in HwRy.path:\n ... | [
"0.73871624",
"0.7377472",
"0.736178",
"0.735532",
"0.734939",
"0.7217538",
"0.70893496",
"0.70311326",
"0.70251256",
"0.6987306",
"0.68647933",
"0.6826672",
"0.6803966",
"0.6803279",
"0.6773432",
"0.6732578",
"0.6732533",
"0.6724158",
"0.6713382",
"0.6699728",
"0.66869855",
... | 0.63215697 | 64 |