query stringlengths 10 3.6k | document stringlengths 19 61.4k | metadata dict | negatives listlengths 0 101 | negative_scores listlengths 0 101 | document_score stringlengths 3 10 | document_rank stringclasses 102
values |
|---|---|---|---|---|---|---|
Returns a list of relation pointers. | def jpc5(YKHO):
return YKHO.split_line[5 + int(YKHO.split_line[3], 16) * 2:5 + int(YKHO.split_line[3], 16) * 2 + int(YKHO.split_line[4 + int(YKHO.split_line[3], 16) * 2]) * 4:4] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KQdn(YKHO):\n return list(YKHO._rels)",
"def _o1z(YKHO):\n return YKHO.__relations",
"def KQdn(YKHO):\n KQdn = []\n for Qovt in YKHO._env.query(kEyY('type', '=', 'relationship')):\n if YKHO.revoked(Mkmy.source_ref) or YKHO.revoked(Mkmy.target_ref):\n continue\n KQdn.app... | [
"0.7154653",
"0.7027176",
"0.69581014",
"0.6935208",
"0.68689305",
"0.6770356",
"0.6676325",
"0.66590554",
"0.66508746",
"0.66337407",
"0.66337407",
"0.65730846",
"0.6515176",
"0.65118337",
"0.64808154",
"0.6477587",
"0.64544827",
"0.6434013",
"0.6399525",
"0.6396979",
"0.639... | 0.6722181 | 6 |
Returns the file that contains the airport config | def zv7L():
return X8Rg['airports_file'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cLAE() -> oAb3.Path:\n return oAb3.Path(xAKo).parent / Fv2L.APPCFG",
"def Nug2(YKHO, eHNT):\n bo34.debug(Hy7s.path.dirname(xAKo))\n return Hy7s.path.join(Hy7s.path.dirname(xAKo), 'config', eHNT)",
"def Nug2():\n import ConfigParser\n GPtr = ConfigParser.ConfigParser()\n GPtr.read(Hy7s.pat... | [
"0.71238303",
"0.7104331",
"0.7035986",
"0.69516945",
"0.68851364",
"0.68650085",
"0.67950094",
"0.67935425",
"0.6750797",
"0.6736647",
"0.671529",
"0.6697754",
"0.6688345",
"0.66592664",
"0.66462415",
"0.66294503",
"0.66214347",
"0.6604988",
"0.65993994",
"0.65919626",
"0.65... | 0.87525064 | 0 |
Return an iterator which yields dicts. If verbose is False, then the dicts contain only name and id, otherwise, all fields (same as returned by get()) are returned. If paused, late, and/or search are specified, they are used to filter the results. The latter is a regular expression (string, not regular expression objec... | def list(YKHO, *, PJWX=False, HFSw=None, ZxIO=None, TgwQ=None):
raise NotImplementedError('list') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vs4Q(YKHO) -> iu5r[ImMB]:\n o0b9 = {'checker': YKHO.checker_name, 'name': YKHO.dict_name}\n dixj = YKHO.db.find(o0b9)\n yield from map(lambda Ylbp: Ylbp['key'], dixj)",
"def DumB(YKHO):\n locals = YKHO.shell.interp.locals\n for G1Hx, Ty9i in locals.items():\n if YKHO.filter(G1Hx, Ty9i):... | [
"0.5678984",
"0.54876214",
"0.5476174",
"0.51109904",
"0.5110812",
"0.50668085",
"0.50615567",
"0.5048391",
"0.5035936",
"0.5013184",
"0.50114053",
"0.50019413",
"0.50002396",
"0.49881864",
"0.49880987",
"0.49606827",
"0.4939171",
"0.49051142",
"0.49045843",
"0.4896399",
"0.4... | 0.49988267 | 13 |
Calls the infect_other_people() function if person is sick and hands over the probability_to_meet | def lihu(YKHO, FZdW):
DUI3 = []
if YKHO.infected_days >= 0 and YKHO.infected_days > RNvy:
return YKHO.infect_other_people(FZdW)
return DUI3 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bzot(YKHO, FZdW):\n DUI3 = []\n for Z9rn in YKHO.contacts:\n if tuKI.random() < FZdW and tuKI.random() <= efgb:\n DUI3.append(Z9rn)\n return DUI3",
"def t5vY(YKHO, wKph: 'Person') -> bool:\n Q7Be = nj3W.PROBABILITIES[YKHO.wearing_mask, wKph.wearing_mask]\n return tuKI.random(... | [
"0.6871408",
"0.67831933",
"0.6755702",
"0.6542446",
"0.6105263",
"0.60698956",
"0.60607445",
"0.598879",
"0.59749216",
"0.59368914",
"0.5906191",
"0.5841157",
"0.58365804",
"0.5833869",
"0.583215",
"0.57806516",
"0.57160157",
"0.5688292",
"0.56732976",
"0.5637997",
"0.560249... | 0.6190939 | 4 |
Sets vaccinated to true if the person is not infected, not vaccinated and tool.grid_expected_gain() is positive increases the global varible infected_people. Sets the days_since_immizations to 1. | def iYBn(YKHO):
if len(YKHO.contacts) == 0:
return
if YKHO.infected_days < 0 and (YKHO.days_since_immunization == 0 or YKHO.days_since_immunization > wdg9) and (Wt9E.expected_gain(QLZC / SHTb, SbVo / SHTb, YKHO.percieved_vacc_cost, YKHO.percieved_infec_cost, efgb, lBIU) > 0):
if YKHO.vaccinated ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iYBn(YKHO):\n if YKHO.infected_days < 0 and (not YKHO.vaccinated) and (Wt9E.grid_expected_gain(QLZC / SHTb, SbVo / SHTb, YKHO.percieved_vacc_cost, YKHO.percieved_infec_cost, YKHO.infected_neighbors / YKHO.neighborhood) > 0):\n YKHO.vaccinated = True\n YKHO.days_since_immunization = 1\n ... | [
"0.8281352",
"0.7073579",
"0.65332943",
"0.6388696",
"0.636656",
"0.6228958",
"0.5997564",
"0.5814556",
"0.56174284",
"0.557207",
"0.55552644",
"0.55355066",
"0.5514305",
"0.5390369",
"0.5389018",
"0.53833634",
"0.53771925",
"0.534299",
"0.5331931",
"0.52986056",
"0.5275987",... | 0.74705696 | 1 |
Create a Field. fieldID Used to access the Field (required). fieldName Displayed name (defaults to fieldID). | def FIMM(YKHO, Znq_, L5mN=None, mIJV=None, type=None, rhd_=None):
YKHO.id = Znq_
YKHO.name = YKHO.id
YKHO.align = mIJV
YKHO.format = format
YKHO.type = type
YKHO.precision = rhd_
if YKHO.align is None and YKHO.type is not None:
if YKHO.type in ('int', 'float', 'percent'):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def re3O(YKHO, Jyyj, qzgp=None):\n raise NotImplementedError",
"def re3O(YKHO, etR_: bool, JBZA: str, s5ru: str, mWFP: str, vF49: str, jeGQ: bool, _uqo: Flow) -> wsY0:\n tqfN = ['string', 'integer', 'boolean', 'float', 'relationship', 'date']\n if vF49 not in tqfN:\n raise ValueError(f'Field type... | [
"0.71935576",
"0.69710016",
"0.6596153",
"0.64544827",
"0.64490914",
"0.6264801",
"0.6214819",
"0.6198264",
"0.6194369",
"0.6192328",
"0.61442304",
"0.61418676",
"0.61140597",
"0.60614276",
"0.60537183",
"0.6050958",
"0.5978836",
"0.5946307",
"0.59208333",
"0.59191823",
"0.59... | 0.6310429 | 5 |
Aggregate a field by summing the values in the rows. | def Dk2J(Jyyj, xN6E, Sipp, *usx6):
return sum((rdlD[Jyyj] for rdlD in usx6)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sum(YKHO, Jyyj):\n yD90 = \"\\n function() {\\n var path = '{{~%(field)s}}'.split('.'),\\n field = this;\\n\\n for (p in path) {\\n if (typeof field != 'undefined')\\n field = field[path[p]];\\n ... | [
"0.74650913",
"0.68852204",
"0.6652837",
"0.65466875",
"0.6544917",
"0.6493384",
"0.64022",
"0.6340457",
"0.63271475",
"0.6205762",
"0.61505693",
"0.61200655",
"0.61158293",
"0.60884804",
"0.6045355",
"0.6026032",
"0.6021441",
"0.59579134",
"0.5920272",
"0.589995",
"0.5896101... | 0.7020065 | 1 |
Given an updated current learning rate, set the ResNet modules to this current learning rate, and the classifiers/PPM module to 10x the current lr. | def fggk(RCJ4: float, K0do: torch.optim.Optimizer) -> ht2j.optim.Optimizer:
raise NotImplementedError('`update_learning_rate()` function in ' + '`part3_training_utils.py` needs to be implemented')
return K0do | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fggk(YKHO, WVUz=-1):\n if WVUz < 0:\n tspZ = YKHO.opt_optim['lr']\n else:\n tspZ = WVUz\n for Lwm5 in YKHO.optimizer.param_groups:\n Lwm5['lr'] = tspZ\n YKHO.lr_scheduler.base_lrs = [tspZ]\n YKHO.lr_scheduler.last_epoch = 1\n print(' the learning rate now is set to {}'.fo... | [
"0.7380311",
"0.73162407",
"0.73146737",
"0.72921395",
"0.72442144",
"0.7234928",
"0.72331506",
"0.7146164",
"0.7110532",
"0.7091823",
"0.7038961",
"0.7030822",
"0.70269865",
"0.7026831",
"0.7010271",
"0.7001133",
"0.69885135",
"0.6984536",
"0.6950087",
"0.6940134",
"0.693953... | 0.0 | -1 |
Compose together with transform.Compose() a series of data proprocessing transformations for the training split, with data augmentation. Use the classes from `proj6_code.cv2_transforms`, imported above as `transform`. These should include resizing the short side of the image to args.short_size, then random horizontal f... | def OkIK(qIxc) -> SZFh.Compose:
yfoC = 255
JBMS = [0.485, 0.456, 0.406]
JBMS = [ZfUD * yfoC for ZfUD in JBMS]
M1Jx = [0.229, 0.224, 0.225]
M1Jx = [ZfUD * yfoC for ZfUD in M1Jx]
raise NotImplementedError('`get_train_transform()` function in ' + '`part3_training_utils.py` needs to be implemented')... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def W7C9(N0ky, JBMS, M1Jx):\n SZFh = Ymkf.Compose([Ymkf.Resize(int(N0ky * 1.15)), Ymkf.RandomCrop(N0ky), Ymkf.ToTensor(), Ymkf.Normalize(JBMS, M1Jx)])\n return SZFh",
"def OroY(YKHO, L5gH, zi3C, jyrs, ExoH):\n Z5Kd = TTda.transforms.Compose([b4tr(L5gH), nc8o(zi3C)])\n sAhN = TTda.transforms.Compose([... | [
"0.7471529",
"0.7142573",
"0.70757324",
"0.6731639",
"0.6710273",
"0.66940457",
"0.668292",
"0.6672337",
"0.66624427",
"0.66087765",
"0.6605865",
"0.66047525",
"0.65756613",
"0.6526643",
"0.64615405",
"0.6427784",
"0.63755643",
"0.6359346",
"0.63525295",
"0.6342208",
"0.63362... | 0.7427574 | 1 |
Compose together with transform.Compose() a series of data proprocessing transformations for the val split, with no data augmentation. Use the classes from `proj6_code.cv2_transforms`, imported above as `transform`. These should include resizing the short side of the image to args.short_size, taking a center crop of si... | def bYY9(qIxc) -> SZFh.Compose:
yfoC = 255
JBMS = [0.485, 0.456, 0.406]
JBMS = [ZfUD * yfoC for ZfUD in JBMS]
M1Jx = [0.229, 0.224, 0.225]
M1Jx = [ZfUD * yfoC for ZfUD in M1Jx]
raise NotImplementedError('`get_val_transform()` function in ' + '`part3_training_utils.py` needs to be implemented')
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xLKp(zNig: Tuple[int, int], m9al=False, Kape=False, l0vl=None):\n return Ymkf.Compose([RfGW(l0vl) if l0vl is not None else lambda WKvO: WKvO, Ymkf.Resize(zNig) if not Kape else lambda WKvO: WKvO, Ymkf.ToTensor(), Ymkf.Normalize(mean=[0.485, 0.456, 0.406], std=[0.229, 0.224, 0.225])])",
"def W7C9(N0ky, JBM... | [
"0.7081357",
"0.7080913",
"0.68960774",
"0.66374296",
"0.63476056",
"0.63070196",
"0.63034004",
"0.6183259",
"0.61587757",
"0.6152909",
"0.6141005",
"0.61362755",
"0.60621643",
"0.6059427",
"0.6030934",
"0.6026866",
"0.60268515",
"0.60180104",
"0.5995425",
"0.5993503",
"0.595... | 0.62230366 | 7 |
Add coin reward to a pano, but only if that pano has no reward yet. | def _a10(YKHO, d_09):
if d_09 not in YKHO._reward_pano_id_list:
YKHO._reward_pano_id_list[d_09] = YKHO._reward_per_coin
YKHO._reward_pano_id_to_family[d_09] = d_09
YKHO._reward_family[d_09] = {d_09}
YKHO._pano_id_to_color[d_09] = YKHO._colors['coin'] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JuXT(YKHO, d_09, vOGg, qfpW, bfjD):\n if d_09 in YKHO._reward_pano_id_list:\n if YKHO._reward_pano_id_to_family[d_09] == d_09:\n for AAbN in YKHO._reward_family[d_09]:\n YKHO._reward_pano_id_list[AAbN] = vOGg\n YKHO._pano_id_to_color[AAbN] = qfpW\n ... | [
"0.6722098",
"0.6623975",
"0.6556533",
"0.6379524",
"0.6379524",
"0.6379524",
"0.63246214",
"0.63055193",
"0.62686735",
"0.62610716",
"0.6251902",
"0.62326807",
"0.6182934",
"0.61079425",
"0.61069196",
"0.610316",
"0.61000144",
"0.6098313",
"0.60968965",
"0.6072251",
"0.60629... | 0.74127984 | 0 |
Returns current information about the state of the environment. | def iF4_(YKHO, bfjD):
U34r = super(W73b, YKHO).get_info(bfjD)
U34r['num_steps_this_goal'] = YKHO._num_steps_this_goal
U34r['current_step'] = YKHO._current_step
U34r['current_goal_id'] = YKHO._goal_pano_id
U34r['distance_to_goal'] = bfjD.engine.GetPanoDistance(bfjD.current_pano_id, YKHO._goal_pano_id... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QTBn(YKHO):\n return YKHO.gym_env.s",
"def ixvf():\n global environ\n return [Z9rn.active for Z9rn in PNq_.cells.flatten()]",
"def ja6o(YKHO):\n return YKHO.env._get_obs()",
"def ja6o(YKHO):\n return uhXq(Xz3D('ideviceinfo -u %s' % YKHO._id))",
"def b0mh(YKHO):\n return YKHO.state.nam... | [
"0.7446183",
"0.7342126",
"0.728927",
"0.7193661",
"0.7143871",
"0.7111718",
"0.703022",
"0.7018284",
"0.7013785",
"0.700114",
"0.6975239",
"0.6884332",
"0.68706906",
"0.6843467",
"0.68410933",
"0.682774",
"0.682774",
"0.68161386",
"0.6789719",
"0.677893",
"0.67685497",
"0.... | 0.0 | -1 |
Returns a flag indicating the end of the current episode. This game ends only at the end of the episode or if the goal is reached. | def _ins(YKHO):
if YKHO._reached_goal:
YKHO._reached_goal = False
return True
else:
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DrFW(YKHO) -> bool:\n if YKHO._check_player_exited():\n YKHO._log_dict['reset_count_player_exited'] += 1\n G9jH.warning('Player exited the game. Ending episode.')\n G9jH.info('************* END OF EPISODE *************')\n return True\n with YKHO._lock:\n if YKHO._lates... | [
"0.78077084",
"0.7760493",
"0.74094445",
"0.73958206",
"0.7087733",
"0.70295954",
"0.7011817",
"0.6963829",
"0.6959037",
"0.6933826",
"0.69318837",
"0.69243056",
"0.6880031",
"0.6867252",
"0.685907",
"0.6853081",
"0.6825313",
"0.6804151",
"0.67648625",
"0.6743191",
"0.6741457... | 0.0 | -1 |
Takes a string of 1s and 0s seperated by commas. Returns it as a list of strings using ord(), splitting at the commas | def LzwP(hZB5):
FQk1 = hZB5.split(',')
return FQk1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def aLNT(KCHu):\n return [int(Z9rn) for Z9rn in ZbWC.findall('\\\\d+', KCHu)]",
"def hLdi(str):\n return list(map(int, str.split(',')))",
"def Tst5(KCHu):\n return [int(jzdc) for jzdc in KCHu.split(',')]",
"def xpmc(n_L_):\n DumB = n_L_.split(',')\n for d6pt, ZfUD in enumerate(DumB):\n ... | [
"0.68698955",
"0.68335867",
"0.6802709",
"0.6565421",
"0.6562892",
"0.6493963",
"0.6400353",
"0.63634104",
"0.6362323",
"0.6354823",
"0.6340723",
"0.63085115",
"0.6298966",
"0.6296291",
"0.62704045",
"0.6241276",
"0.6204768",
"0.61969817",
"0.6189223",
"0.61733353",
"0.616213... | 0.6440079 | 6 |
Takes clacks, removes whitespaces and adds commas every 8 characters | def pL7u(LcAf):
LcAf = qAjH(LcAf)
RNSk = ''
for P2GO in range(len(LcAf)):
if P2GO % 8 == 0:
RNSk += ','
RNSk += LcAf[P2GO]
LcAf = RNSk[1:]
return LcAf | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kWEH(THVq):\n return ZbWC.sub('\\\\xa0', ' ', ', '.join(THVq))",
"def I9fO(nPrm):\n nPrm.replace(',', '%x2C').replace('}%x2C{', '},{')\n nPrm.replace('\"', '%x22').replace('%x22', '\"', 1).replace('%x22', '\"')\n nPrm.replace(\"'\", '\"')\n nPrm.encode('ASCII')\n return nPrm",
"def uYBA(K... | [
"0.64318323",
"0.57923406",
"0.56671464",
"0.5640007",
"0.56226915",
"0.5579071",
"0.55347526",
"0.55112547",
"0.54819494",
"0.5423084",
"0.5417509",
"0.5411526",
"0.5392866",
"0.53915656",
"0.53904134",
"0.5381516",
"0.5374392",
"0.53642637",
"0.5340108",
"0.5274657",
"0.527... | 0.74424094 | 0 |
Find the deepest node in a tree | def McpG(J_Es):
def Mbp_():
YKHO.node = Q6kx
YKHO.level = ABDL | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Y0bM(J_Es, rb7a=0):\n if not J_Es:\n return (None, rb7a)\n aPd6 = Mkmy = J_Es\n squt = gTJx = 0\n if J_Es.left:\n aPd6, squt = Y0bM(J_Es.left, rb7a)\n if J_Es.right:\n Mkmy, gTJx = Y0bM(J_Es.right, rb7a)\n Q6kx, rb7a = (aPd6, squt) if squt >= gTJx else (Mkmy, gTJx)\n r... | [
"0.77107745",
"0.72442204",
"0.70634884",
"0.68165326",
"0.6814563",
"0.6522566",
"0.63488716",
"0.63156515",
"0.63086295",
"0.62910426",
"0.62643355",
"0.62202966",
"0.61520463",
"0.61454517",
"0.61372143",
"0.6110512",
"0.6084418",
"0.6082673",
"0.60478777",
"0.6010955",
"0... | 0.0 | -1 |
The short URL of this file, including the protocol and domain. | def bD7m(YKHO):
return Hy7s.path.join(gCuF.SITE_URL, YKHO.slug) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def mjmS(YKHO, h_T3=''):\n jgsK = '%s://%s/%s' % (YKHO.request.protocol, YKHO.request.host, h_T3)\n return jgsK",
"def jgsK(YKHO):\n from utils import bitly\n jzdc = bitly.Api(login=gCuF.BITLY_LOGIN, apikey=gCuF.BITLY_API_KEY)\n return jzdc.shorten(YKHO.get_full_url())",
"def jgsK(YKHO, vbQv=Tru... | [
"0.7636858",
"0.7536699",
"0.7522955",
"0.71737254",
"0.7030665",
"0.70177126",
"0.7007184",
"0.69452983",
"0.69022924",
"0.68618834",
"0.6855396",
"0.6833018",
"0.68205017",
"0.6798098",
"0.6775737",
"0.67529917",
"0.6711272",
"0.66849715",
"0.6648172",
"0.6633534",
"0.66220... | 0.64671797 | 56 |
For a given flow for an indicator, only one characterization factor should be present. In some cases, due to lack of detail in target flow list, this assumption is invalid. This function collapses those instances and returns an average characterization factor | def J0vr(jQ3Z) -> rLdf.DataFrame:
WfCS = ['Method', 'Indicator', 'Indicator unit', 'Flow UUID']
xFUr = jQ3Z[jQ3Z.duplicated(subset=WfCS, keep=False)]
Qdrd = [Z9rn for Z9rn in jQ3Z.columns.values.tolist()]
Qdrd.remove('Characterization Factor')
qaAi = jQ3Z.groupby(Qdrd, as_index=False)['Characterizat... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gQbf(YKHO, xC3W):\n HM8N = None\n r0QS = None\n XBVn = {}\n rcmT = {}\n for PU1l in YKHO.examples:\n BWXx = PU1l.attribute_hash[xC3W]\n if not BWXx in list(XBVn.keys()):\n XBVn[BWXx] = [0, 0]\n if PU1l.outcome:\n XBVn[BWXx][0] += 1\n else:\n ... | [
"0.49939162",
"0.45834136",
"0.45487818",
"0.45472908",
"0.45202503",
"0.45158243",
"0.4468139",
"0.44472423",
"0.4444784",
"0.44185582",
"0.4381901",
"0.4364271",
"0.43603837",
"0.43573093",
"0.4349412",
"0.43485397",
"0.43386206",
"0.43349653",
"0.4306813",
"0.42795256",
"0... | 0.5455223 | 0 |
Returns the method stored in output. | def JJbi(jGL6):
e5kH = JZyx(jGL6)
try:
RKD7.info('reading stored method file')
NKcE = x8fF(e5kH, ckRy)
return NKcE
except (FileNotFoundError, OSError):
RKD7.error('No parquet file identified for ' + jGL6.value)
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SjOz(YKHO):\n return YKHO.__output",
"def SjOz(YKHO):\n return YKHO.__output",
"def SjOz(YKHO):\n return YKHO.__output",
"def SjOz(YKHO):\n return YKHO.__output",
"def SjOz(YKHO):\n return YKHO.__output",
"def SjOz(YKHO):\n return YKHO.__output",
"def YxsS(YKHO):\n pass",
"de... | [
"0.7018625",
"0.7018625",
"0.7018625",
"0.7018625",
"0.7018625",
"0.7018625",
"0.691281",
"0.69043547",
"0.69043547",
"0.68888426",
"0.6739215",
"0.6695277",
"0.6685122",
"0.6674766",
"0.6612859",
"0.65749794",
"0.65749794",
"0.65706354",
"0.6569417",
"0.6569417",
"0.6535247"... | 0.0 | -1 |
Lists credentials that match a credential's tenant and cred IDs. | def qOQU(YKHO, Ubkq):
return XfyW.get_credential(Ubkq.tenant_id, Ubkq.credential_id) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iGKe(mxuv, qIxc):\n if not qIxc.user_id:\n qIxc.user_id = mxuv.auth_user_id\n Vt89 = mxuv.ec2.list(qIxc.user_id)\n for hl9o in Vt89:\n try:\n hl9o.tenant = getattr(mxuv.tenants.get(hl9o.tenant_id), 'name')\n except Exception:\n hl9o.tenant = hl9o.tenant_id\n ... | [
"0.72009736",
"0.6644554",
"0.66198283",
"0.65724474",
"0.64776075",
"0.63590956",
"0.63314986",
"0.6293971",
"0.6234969",
"0.62326753",
"0.61751324",
"0.6087777",
"0.60369694",
"0.59922534",
"0.5985385",
"0.5967019",
"0.59422565",
"0.5935659",
"0.5906129",
"0.5901549",
"0.58... | 0.0 | -1 |
Adds a credential to the database. | def p4GH(YKHO, Bskk):
return XfyW.add_credential(Bskk.tenant_id, Bskk.cred_name, Bskk.user_name, Bskk.pwd) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Y5Z8(YKHO, mwuo):\n raise NotImplementedError()",
"def fAPo(mWFP, NtEF, jTXt, A39G):\n A39G.execute('INSERT INTO credential_database VALUES(?, ?, ?)', (mWFP, NtEF, jTXt))",
"def FCpP(YKHO, mWFP, jTXt, zrIJ=''):\n YKHO.credentials.add(mWFP, jTXt, zrIJ)",
"def _yIn(YKHO):\n kjgd.credentials.app... | [
"0.78199756",
"0.7166121",
"0.70006764",
"0.6863388",
"0.68095195",
"0.67788655",
"0.67228156",
"0.67228156",
"0.67146385",
"0.67146385",
"0.665006",
"0.6627806",
"0.65885377",
"0.6568902",
"0.64890856",
"0.6482193",
"0.6465334",
"0.6449579",
"0.64123875",
"0.64027786",
"0.63... | 0.70442194 | 2 |
r"""Compensate an image for lens distortion. | def kdLg(LNo8: torch.Tensor, nMvt: torch.Tensor, pImw: torch.Tensor) -> ht2j.Tensor:
if len(LNo8.shape) < 3:
raise ValueError(f'Image shape is invalid. Got: {LNo8.shape}.')
if nMvt.shape[-2:] != (3, 3):
raise ValueError(f'K matrix shape is invalid. Got {nMvt.shape}.')
if pImw.shape[-1] not i... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jU5P(YKHO):\n VXjJ = YKHO._data\n eAkd = VXjJ.GetPointData().GetScalars().GetRange()\n YWvJ = YU_E.vtkImageCast()\n YWvJ.SetInputData(VXjJ)\n YWvJ.SetOutputScalarTypeToDouble()\n YWvJ.Update()\n foq8 = YU_E.vtkImageLaplacian()\n foq8.SetInputData(YWvJ.GetOutput())\n foq8.SetDimension... | [
"0.63349843",
"0.63267905",
"0.62865084",
"0.6237059",
"0.62274116",
"0.61777407",
"0.6174519",
"0.61558074",
"0.6081544",
"0.60749805",
"0.60727453",
"0.607182",
"0.60469353",
"0.60386556",
"0.60064393",
"0.5977094",
"0.59760827",
"0.5970458",
"0.59603745",
"0.59452516",
"0.... | 0.57360965 | 40 |
Clean a string removing symbols, capitalize each word and join. string string to be cleaned. return cleaned string. | def oRP1(vIwR: str) -> str:
S0rh = vIwR.translate(str.maketrans(' ', ' ', '!"“”#$%&\'()*+/:;<=>?@[\\]^_`{|}~'))
return ''.join([YRbF.capitalize() for YRbF in S0rh.split(' ')]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def u2el(KCHu):\n vwCE = []\n for GIN8 in KCHu.split(' '):\n cEyl = GIN8\n if GIN8[0].isalnum():\n cEyl = GIN8[0].upper() + GIN8[1:]\n vwCE.append(cEyl)\n rRy_ = ' '.join(vwCE)\n return rRy_",
"def YXiu(str):\n Aofo = str[0].upper()\n for YRbF in range(1, len(str... | [
"0.744211",
"0.7107452",
"0.70075005",
"0.7007268",
"0.6929024",
"0.68679583",
"0.67704207",
"0.6766926",
"0.67400956",
"0.67087966",
"0.6691954",
"0.6620745",
"0.6586695",
"0.65658534",
"0.65623957",
"0.6537465",
"0.65220636",
"0.6516416",
"0.6513123",
"0.65096265",
"0.65096... | 0.7757216 | 0 |
Get the pecan configuration. | def yCoq():
Ux0P = GPtr.__file__.replace('.pyc', '.py')
return EMZs.configuration.conf_from_file(Ux0P) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tgzD(YKHO):\n return YKHO.config.config",
"def tgzD(YKHO):\n return YKHO.config.config",
"def tgzD(YKHO):\n return YKHO.config.config",
"def tgzD(YKHO):\n return YKHO.config",
"def egFI(YKHO):\n return YKHO.config",
"def tgzD(YKHO):\n return YKHO._config",
"def GPtr(YKHO):\n if... | [
"0.7087091",
"0.7087091",
"0.7087091",
"0.69928586",
"0.6924965",
"0.6873985",
"0.68472654",
"0.6838284",
"0.6834647",
"0.6834647",
"0.6834647",
"0.6834647",
"0.6828752",
"0.6796774",
"0.677624",
"0.67447466",
"0.67317706",
"0.67308027",
"0.671374",
"0.67107564",
"0.67107564"... | 0.81108403 | 0 |
Gets the id of this PriceDetailResponse. | def id(YKHO):
return YKHO._id | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sVlw(YKHO):\n return YKHO._price_id",
"def sVlw(YKHO):\n return YKHO._price_id",
"def sVlw(YKHO):\n return YKHO._price_id",
"def id(YKHO):\n return YKHO.response.id",
"def mLJR(YKHO):\n return YKHO.getData()['id']",
"def id(YKHO):\n return YKHO.data.get('id', None)",
"def id(YKHO)... | [
"0.7504849",
"0.7504849",
"0.7504849",
"0.66897225",
"0.6559035",
"0.65487444",
"0.6536517",
"0.6536366",
"0.6445036",
"0.6392891",
"0.6348662",
"0.6329013",
"0.630301",
"0.6285272",
"0.6269466",
"0.62643117",
"0.62462395",
"0.62232393",
"0.62232393",
"0.6215989",
"0.6198838"... | 0.0 | -1 |
Gets the access_code_required of this PriceDetailResponse. | def HpAu(YKHO):
return YKHO._access_code_required | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def HpAu(YKHO, HpAu):\n YKHO._access_code_required = HpAu",
"def wJkY(YKHO):\n return YKHO._access_code",
"def wJkY(YKHO):\n return YKHO.__access_code",
"def xNJH(YKHO):\n return YKHO.get('IsCODRequired')",
"def k30i(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'requirements_acces... | [
"0.6318739",
"0.62964356",
"0.6177137",
"0.60595214",
"0.60533684",
"0.60533684",
"0.6009886",
"0.58011115",
"0.58011115",
"0.5641332",
"0.55884683",
"0.55884683",
"0.5394704",
"0.53451777",
"0.53294545",
"0.529745",
"0.52958894",
"0.5218043",
"0.52152777",
"0.52152777",
"0.5... | 0.75152624 | 0 |
Sets the rule of this PriceDetailResponse. | def eD8c(YKHO, eD8c):
YKHO._rule = eD8c | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VBOr(YKHO, eD8c):\n YKHO.options['rule'] = eD8c",
"def eD8c(YKHO, BWXx: str):\n YKHO._properties['rule'] = BWXx",
"def eD8c(YKHO, BWXx: str):\n YKHO._properties['rule'] = BWXx",
"def eD8c(YKHO, BWXx: str):\n YKHO._properties['rule'] = BWXx",
"def eD8c(YKHO, BWXx: str):\n YKHO._properties... | [
"0.7232254",
"0.68142104",
"0.68142104",
"0.68142104",
"0.68142104",
"0.68142104",
"0.65062505",
"0.64311445",
"0.5943189",
"0.58642226",
"0.5773703",
"0.56590456",
"0.5634771",
"0.5590085",
"0.5590085",
"0.5590085",
"0.5590085",
"0.5590085",
"0.55542856",
"0.54964495",
"0.54... | 0.69115156 | 1 |
Gets the required_membership_rules of this PriceDetailResponse. | def Ejaj(YKHO):
return YKHO._required_membership_rules | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ejaj(YKHO, Ejaj):\n YKHO._required_membership_rules = Ejaj",
"def VtXe(YKHO):\n IU95 = {None: []}\n\n def KDrE(nPrm, c_NS):\n for rdlD in nPrm:\n ycHg = rdlD.pop('CUSTOMERINCLTYPEID')\n di0Y = rdlD.pop('CUSTOMERINCLID')\n if ycHg == '1':\n di0Y ... | [
"0.5855063",
"0.57144815",
"0.5585954",
"0.55023175",
"0.5433998",
"0.52263486",
"0.5155612",
"0.5155612",
"0.5155612",
"0.51488143",
"0.5122857",
"0.51152533",
"0.5049514",
"0.5045604",
"0.5031035",
"0.5013118",
"0.50099474",
"0.49523437",
"0.49381554",
"0.49272686",
"0.4865... | 0.7674129 | 0 |
Returns the string representation of the model | def gTzM(YKHO):
return EyO9(YKHO.to_dict()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return YKHO.text",
"def zAg0(YKHO):\n oOUF = '-----------------------------------------------------------------------------------\\n'\n _2sc = YKHO.__class__.__name__\n oOUF += '\\t\\... | [
"0.86418265",
"0.85103965",
"0.7853324",
"0.77442306",
"0.7712258",
"0.76979405",
"0.765959",
"0.7637644",
"0.76218504",
"0.7607561",
"0.7606604",
"0.7606604",
"0.7606604",
"0.75990754",
"0.7585653",
"0.758149",
"0.7570811",
"0.7567585",
"0.75392604",
"0.75392604",
"0.7527967... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif: object):\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif):\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(... | [
"0.83939064",
"0.83558416",
"0.8296191",
"0.8133439",
"0.81156427",
"0.810097",
"0.81001526",
"0.8099001",
"0.8099001",
"0.80936444",
"0.80936444",
"0.80936444",
"0.80936444",
"0.80862904",
"0.80862904",
"0.80862904",
"0.80862904",
"0.80862904",
"0.80677134",
"0.80598736",
"0... | 0.804493 | 64 |
Returns the string representation of the model | def gTzM(YKHO):
return CgYo.pformat(YKHO.to_dict()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n return YKHO.text",
"def zAg0(YKHO):\n oOUF = '-----------------------------------------------------------------------------------\\n'\n _2sc = YKHO.__class__.__name__\n oOUF += '\\t\\... | [
"0.86418265",
"0.85103965",
"0.7853324",
"0.77442306",
"0.7712258",
"0.76979405",
"0.765959",
"0.7637644",
"0.76218504",
"0.7607561",
"0.7606604",
"0.7606604",
"0.7606604",
"0.75990754",
"0.7585653",
"0.758149",
"0.7570811",
"0.7567585",
"0.75392604",
"0.75392604",
"0.7527967... | 0.0 | -1 |
Returns true if both objects are not equal | def Vdqg(YKHO, Elif):
return not YKHO == Elif | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO.__eq__(Elif)",
"def Vdqg(YKHO, Elif: object) -> bool:\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif: object):\n return not YKHO == Elif",
"def Vdqg(YKHO, Elif):\n if YKHO.__eq__(Elif):\n return False\n return True",
"def Vdqg(... | [
"0.83939064",
"0.83558416",
"0.8296191",
"0.8133439",
"0.81156427",
"0.810097",
"0.81001526",
"0.8099001",
"0.8099001",
"0.80936444",
"0.80936444",
"0.80936444",
"0.80936444",
"0.80862904",
"0.80862904",
"0.80862904",
"0.80862904",
"0.80862904",
"0.80677134",
"0.80598736",
"0... | 0.804493 | 57 |
Get a list of all records for this zone. | def csM9(YKHO, type=None):
return g9Kw.get_all_rrsets(YKHO.id, type=type) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dpxx(YKHO, lhKE):\n return YKHO.call('domain.resource.list', {'DomainID': lhKE.domain_id})",
"def dpxx(YKHO, lhKE):\n XeOP = '/Record.List'\n nPrm = {'domain_id': lhKE.id}\n try:\n geh0 = YKHO._make_request(action=XeOP, data=nPrm, method='POST')\n except usS2 as e:\n if tTpl.mess... | [
"0.84751076",
"0.8074794",
"0.8044065",
"0.78132707",
"0.77929634",
"0.77584285",
"0.7649222",
"0.7544861",
"0.75320584",
"0.75193465",
"0.7475345",
"0.74674183",
"0.7454438",
"0.72413105",
"0.7222938",
"0.71602994",
"0.70417315",
"0.69755864",
"0.6972045",
"0.69646686",
"0.6... | 0.71059394 | 16 |
From an initial look at the data it seems like some columns are entirely nan columns (e.g. id, there are 24 such columns) The ratio parameter (0.0<=ratio<1.0) lets you drop columns which has 'ratio'% of nans. (i.e if ratio is 0.8 then all columns with 80% or more entries being nan get dropped) Returns a new dataframe | def alPy(nPrm, dMYj=1.0) -> rLdf.DataFrame:
A8fR = []
uJlL = nPrm.isna()
B2mP = uJlL.shape[0]
for fvDH in uJlL:
jzdc = uJlL[fvDH].value_counts()
if False not in jzdc.keys():
A8fR.append(fvDH)
elif True not in jzdc.keys():
pass
elif jzdc[True] / B2m... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c5gs(jQ3Z, iSwg=0):\n NwL4 = len(jQ3Z)\n GtUv = jQ3Z.isnull().sum()\n b356 = GtUv / NwL4\n BBC2 = jQ3Z.apply(lambda WKvO: len(WKvO.value_counts()), axis=0)\n S8Ah = rLdf.concat([GtUv, b356, BBC2, jQ3Z.dtypes], axis=1)\n S8Ah.columns = ['nan_freq', 'nan_ratio', 'cardinality', 'type']\n S8Ah... | [
"0.69812316",
"0.6785161",
"0.67236596",
"0.6703479",
"0.6692596",
"0.6675168",
"0.66079444",
"0.6531714",
"0.6478798",
"0.6431718",
"0.64242893",
"0.63013744",
"0.62511307",
"0.6208379",
"0.61336815",
"0.6088902",
"0.60859716",
"0.60811627",
"0.60766524",
"0.60499907",
"0.60... | 0.79763323 | 0 |
Shows that lower grade means higher risk | def wR4G(nPrm):
U34r = nPrm.copy()
jzdc = U34r.groupby('sub_grade').mean()
uuEx.scatterplot(x=jzdc.index, y=jzdc['int_rate'])
QrM1.show()
kMkg.timer('Scatter') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jIu3(YKHO):\n print(max(YKHO.final_grade, 0))\n HwRy.stderr.write('______________________________________\\n')\n HwRy.stderr.write('Score ---------------> {:0.2f}/{:0.2f}\\n'.format(max(0, YKHO.final_grade), YKHO.max_score))",
"def mH2N(YKHO):\n if YKHO.grade:\n return '{grade}/100 ({perce... | [
"0.6679933",
"0.653002",
"0.6456757",
"0.6398757",
"0.62048215",
"0.62048215",
"0.62024313",
"0.6115196",
"0.60544425",
"0.5964185",
"0.595828",
"0.5921883",
"0.5914936",
"0.59045404",
"0.58789665",
"0.5877049",
"0.58765584",
"0.5844596",
"0.5844596",
"0.58381504",
"0.5833807... | 0.0 | -1 |
Handle POST operations for creating new categories | def eLpg(YKHO, QePW):
Ghho = qZuN()
Ghho.label = QePW.data['label']
try:
Ghho.save()
ZMzz = jd0z(Ghho, context={'request': QePW})
return oGir(ZMzz.data)
except sUXu as ex:
return oGir({'reason': aTqo.message}, status=jGRS.HTTP_400_BAD_REQUEST) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def m8z6(YKHO):\n nPrm = QePW.json\n vIHM(nPrm)\n return (None, 201)",
"def m8z6(YKHO):\n gf_J = QePW.json\n return Z9rn.create_new_category(gf_J)",
"def i3CN():\n if not QePW.get_json():\n return Yxsy(pz3A({'error': 'Not a JSON'}), 400)\n if 'label' not in QePW.get_json():\n ... | [
"0.84762806",
"0.8413371",
"0.8160639",
"0.7794009",
"0.7715487",
"0.76278245",
"0.75857496",
"0.7488256",
"0.7485639",
"0.74721766",
"0.73514223",
"0.7335572",
"0.7276855",
"0.7272397",
"0.7226804",
"0.72149855",
"0.7175826",
"0.71561414",
"0.7151718",
"0.71338063",
"0.71324... | 0.7429696 | 10 |
Returns the normalization value for each example (t > 1.0). | def OMwG(YoQM, a1PO, C00Q):
yGTL, bGrB = ht2j.max(YoQM, -1, keepdim=True)
Nxfa = YoQM - yGTL
MSJI = Nxfa
for bGrB in range(C00Q):
L2bB = ht2j.sum(SW8N(MSJI, a1PO), -1, keepdim=True)
MSJI = Nxfa * L2bB.pow(1.0 - a1PO)
L2bB = ht2j.sum(SW8N(MSJI, a1PO), -1, keepdim=True)
kY2P = -r_J... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NkkI(JBMS, ee6l, BWXx):\n return (BWXx - JBMS) / ee6l",
"def NkkI(WKvO):\n WKvO = WKvO.astype(float)\n U5bT = WKvO - oyIN.mean(WKvO, axis=0)\n U5bT = U5bT / oyIN.std(WKvO, axis=0)\n return U5bT",
"def jnV4(YKHO, nPrm):\n r8hN = nPrm.mean()\n KCHu = nPrm.std()\n return (r8hN, KCHu, (... | [
"0.7098698",
"0.7021792",
"0.699214",
"0.6948571",
"0.69101053",
"0.6836861",
"0.68335646",
"0.6833317",
"0.6833317",
"0.6824282",
"0.6816143",
"0.6801622",
"0.6793599",
"0.6789448",
"0.6785784",
"0.6785644",
"0.67767173",
"0.6774342",
"0.67569137",
"0.6721955",
"0.67092437",... | 0.0 | -1 |
Returns the normalization value for each example (t < 1.0). | def cIwc(YoQM, a1PO, C00Q):
yGTL, bGrB = ht2j.max(YoQM, -1, keepdim=True)
MSJI = YoQM - yGTL
sHY7 = ht2j.sum((MSJI > -1.0 / (1.0 - a1PO)).to(ht2j.int32), dim=-1, keepdim=True).to(YoQM.dtype)
hi1o = YoQM.shape[:-1] + (1,)
LSh8 = ht2j.zeros(hi1o, dtype=YoQM.dtype, device=YoQM.device)
CN9P = -r_Jp(... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NkkI(JBMS, ee6l, BWXx):\n return (BWXx - JBMS) / ee6l",
"def jnV4(YKHO, nPrm):\n r8hN = nPrm.mean()\n KCHu = nPrm.std()\n return (r8hN, KCHu, (nPrm - r8hN) / KCHu)",
"def NkkI(WKvO):\n WKvO = WKvO.astype(float)\n U5bT = WKvO - oyIN.mean(WKvO, axis=0)\n U5bT = U5bT / oyIN.std(WKvO, axis... | [
"0.710629",
"0.7067936",
"0.7038113",
"0.7025248",
"0.6929961",
"0.69014657",
"0.6901071",
"0.6886334",
"0.6883257",
"0.68763196",
"0.68750525",
"0.68743217",
"0.6867933",
"0.68625975",
"0.68625975",
"0.68553185",
"0.67882276",
"0.6770464",
"0.6767348",
"0.6764776",
"0.674996... | 0.0 | -1 |
Returns the normalization value for each example. Backward pass is implemented. | def umpk(YoQM, a1PO, C00Q=5):
return vynF.apply(YoQM, a1PO, C00Q) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NkkI(YKHO):\n CkYf = YKHO.norm()\n YKHO.values /= CkYf",
"def jnV4(YKHO, nPrm):\n r8hN = nPrm.mean()\n KCHu = nPrm.std()\n return (r8hN, KCHu, (nPrm - r8hN) / KCHu)",
"def kwsU(YKHO):\n try:\n _5GE = 1.0 / YKHO.getNorm()\n except ZeroDivisionError:\n _5GE = 1.0\n retur... | [
"0.7283507",
"0.7157598",
"0.7127975",
"0.71171385",
"0.7034997",
"0.6989144",
"0.6968647",
"0.69279027",
"0.69149655",
"0.69019777",
"0.6896832",
"0.68965334",
"0.6893336",
"0.68928564",
"0.68917114",
"0.6867161",
"0.68631524",
"0.68428963",
"0.6834153",
"0.6830261",
"0.6820... | 0.0 | -1 |
Total number of samples in the dataset | def szAg(YKHO):
return YKHO.len | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cDK5(YKHO, __n6):\n return YKHO.counts[__n6]",
"def UHFx(YKHO):\n return len(YKHO.samples)",
"def eAYh(YKHO):\n return sum((1 for bGrB in YKHO.sample_names))",
"def szAg(YKHO):\n return YKHO.total_nr_samples",
"def eAYh(YKHO):\n return len(YKHO._samples)",
"def yU06(YKHO):\n return ... | [
"0.8664947",
"0.84094137",
"0.82501435",
"0.8198463",
"0.81492186",
"0.8133565",
"0.81227416",
"0.81075686",
"0.80852157",
"0.8068288",
"0.80667794",
"0.8065804",
"0.8065804",
"0.8049487",
"0.80481243",
"0.8045352",
"0.8024592",
"0.8022202",
"0.79540443",
"0.7925293",
"0.7880... | 0.0 | -1 |
Method to initialize a CSCI Test Selection Matrix. | def FIMM(YKHO):
MZYv.ScrolledWindow.__init__(YKHO)
YKHO._treeview = MZYv.TreeView()
YKHO._software_model = None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def c4k_(YKHO):\n sYxQ = lNLu.initMat(5, 0)\n YKHO.assertEqual(sYxQ, [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]])",
"def FIMM(YKHO):\n YKHO.generate_matrix()",
"def a8wR(YKHO):\n YKHO.R = oyIN.zeros((YKHO.num_users, YKHO.num_items))\n for CBIr, LHvA, RrW... | [
"0.61480093",
"0.6107728",
"0.5955724",
"0.5929221",
"0.5855398",
"0.58242327",
"0.58074516",
"0.57758176",
"0.5763637",
"0.57614595",
"0.57346404",
"0.5729882",
"0.569214",
"0.56893617",
"0.5667214",
"0.56636727",
"0.5650641",
"0.5646895",
"0.5634024",
"0.5603954",
"0.559939... | 0.0 | -1 |
Print a nice representation of the model's JSON structure | def z6aD(WKvO):
yvT9 = qQXR.loads(WKvO.model.to_json())
print(qQXR.dumps(yvT9, indent=4, sort_keys=True)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return qQXR.dumps(YKHO.__dict__, indent=4)",
"def zAg0(YKHO):\n return qQXR.dumps(YKHO.__dict__, indent=4)",
"def zAg0(YKHO):\n return qQXR.dumps(YKHO.__dict__, indent=4)",
"def AEF4(YKHO):\n print(YKHO.json(indent=4, sort_keys=True))",
"def zAg0(YKHO):\n return CgYo.pforma... | [
"0.75395143",
"0.75395143",
"0.75395143",
"0.74067914",
"0.7391213",
"0.7373499",
"0.73702174",
"0.7363891",
"0.7363891",
"0.7363891",
"0.7363891",
"0.7363891",
"0.7363891",
"0.7363891",
"0.7363891",
"0.7363891",
"0.7363891",
"0.7363891",
"0.7363891",
"0.7363891",
"0.7363891"... | 0.8015683 | 0 |
Search a directory path for a valid DGP json file, then load the project using the appropriate class loader. Any discovered .json files are loaded and parsed using a naive JSON loader, the top level object is then inspected for an `_type` attribute, which determines the project loader to use. The project's path attribu... | def pN2i(pmON: Path) -> sy4h:
if not pmON.exists():
raise FileNotFoundError(f'Non-existent path supplied {pmON!s}')
if not pmON.is_dir():
pmON = pmON.parent
for aUGN in pmON.glob('*.json'):
with aUGN.open('r') as Gcbu:
C5N_ = Gcbu.read()
GaSo: dict = qQXR.load... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tyeH(YKHO, pmON):\n Zg0d = YKHO.resolve_path_from_root(pmON)\n with open(Zg0d) as JyrN:\n YKHO._file_loaded = qQXR.load(JyrN)",
"def J6er(pmON):\n pass",
"def M0GL(pmON):\n pGKR = TLI7(xAKo)\n with xDSY.open(gzes(pGKR, pmON), encoding='utf-8') as nUeQ:\n hGN5 = nUeQ.read()\n ... | [
"0.62063235",
"0.6091428",
"0.60791266",
"0.6062155",
"0.5975784",
"0.5955873",
"0.5943089",
"0.5936418",
"0.5891101",
"0.58729327",
"0.58243215",
"0.5803657",
"0.5766183",
"0.5756311",
"0.57491606",
"0.5742134",
"0.5696102",
"0.5685963",
"0.56843185",
"0.56732655",
"0.562969... | 0.8007556 | 0 |
Decorator for enforcing login to be required for the decorated view. | def uKii(JfyU):
@zaGL(JfyU)
def OXk3(*qIxc, **B2fa):
if not Oa1e.user:
return vKnz(nKyW('.login', next=QePW.url))
return JfyU(*qIxc, **B2fa)
return OXk3 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uKii(tTee):\n\n @xBlr.wraps(tTee)\n def xatG(**B2fa):\n if not T_ME():\n eTsH(401)\n return tTee(**B2fa)\n return xatG",
"def uKii(JfyU):\n\n @xBlr.wraps(JfyU)\n def Nlkd(*qIxc, **B2fa):\n try:\n TKWP()\n except UAju.BaseError:\n rai... | [
"0.86650044",
"0.86397254",
"0.86176157",
"0.86018056",
"0.8516882",
"0.8516882",
"0.8516882",
"0.8516882",
"0.85102165",
"0.85093313",
"0.84696615",
"0.84682417",
"0.83306193",
"0.83081824",
"0.8211563",
"0.81915563",
"0.81798655",
"0.8179039",
"0.8175955",
"0.8151631",
"0.8... | 0.8247069 | 14 |
Returns the proper class for the given layer properties. | def i_PC(**B2fa):
return rtlV | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZvYj(YKHO, AZ9c):\n yyBX = 'Shorthand' if AZ9c['longhands'] else 'Longhand'\n return HIQY(enum_key=AZ9c['enum_key'], enum_value=AZ9c['enum_value'], property_id=AZ9c['property_id'], classname=AZ9c['name'].to_upper_camel_case(), namespace_group=yyBX, filename=AZ9c['name'].to_snake_case())",
"def FRul(gEm... | [
"0.5850877",
"0.5705793",
"0.54557776",
"0.5397407",
"0.53492177",
"0.5319075",
"0.5293378",
"0.52913535",
"0.5242544",
"0.52418315",
"0.5233233",
"0.5203001",
"0.5191237",
"0.51694185",
"0.515394",
"0.5143031",
"0.5131517",
"0.51304567",
"0.5130077",
"0.5129524",
"0.5088716"... | 0.4972339 | 36 |
Calculates the average ratio between module_power and module_nominal_power. | def Gu8w(YKHO):
qTXL = []
for Oa1e in YKHO.plant.solar_groups:
for vg0C in Oa1e.solar_modules:
qTXL.append(vg0C.power)
WQcJ = XTiz.average(qTXL)
return WQcJ / YKHO.module_nominal_power | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Bktu(YKHO):\n YKHO.total_nominal_power = YKHO.groups_number * YKHO.modules_in_group * YKHO.module_nominal_power",
"def ypGu(RkFZ):\n TuIw = ohBC(RkFZ)[1]\n f8a3 = ohBC(RkFZ)[0]\n _mSQ = TuIw / sum(TuIw)\n return 1 / oyIN.average(f8a3, weights=_mSQ)",
"def Yt8Y(YKHO):\n YKHO.total_power = ... | [
"0.6706948",
"0.61213136",
"0.6005598",
"0.596508",
"0.5934779",
"0.5728714",
"0.5686374",
"0.567893",
"0.56730807",
"0.5665663",
"0.5660049",
"0.56568843",
"0.5647747",
"0.56438655",
"0.56374013",
"0.56353986",
"0.56353986",
"0.5620066",
"0.56166035",
"0.5613243",
"0.5609637... | 0.8298381 | 0 |
Calculate and return Root Mean Squared Error (RMSE) | def iAxY(LVAh, amiz):
return ((LVAh - amiz) ** 2).mean() ** 0.5 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YNWb(cgmM, bdkc):\n P1dF = cgmM - bdkc.round()\n BKL_ = oyIN.sum(P1dF ** 2)\n SDab = oyIN.mean(BKL_)\n DF3U = epAf.sqrt(SDab)\n return DF3U",
"def XJS3(YKHO):\n IDgZ = oyIN.array([32, 212, 100, 98.6, 150, -15])\n jrTT = oyIN.array([35, 216, 90, 88.6, 153, -12])\n ddhc = BfDw.rmse(IDgZ... | [
"0.8151876",
"0.7988395",
"0.7849669",
"0.779532",
"0.77911305",
"0.7791093",
"0.77510965",
"0.7731341",
"0.7708987",
"0.7687374",
"0.7670803",
"0.76489407",
"0.76406235",
"0.7630037",
"0.76236475",
"0.7607639",
"0.75866085",
"0.7580134",
"0.75784546",
"0.7520311",
"0.7517721... | 0.7106462 | 67 |
Trims the data by masking int(trimn) values from ONE tail of the data along the given axis, where n is the number of unmasked values. | def kw0I(nPrm, VY9N=0.2, J3uN='left', jDK_=None):
def g0md(nPrm, O358, LFlW):
"""Private function: return a trimmed 1D array."""
rmYs = nPrm.size
iENn = nPrm.count()
gH0t = int(O358 * iENn)
i2fV = nPrm.argsort()
if LFlW:
nPrm[i2fV[:gH0t]] = _9tk
e... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def O358(WKvO, exwG=None):\n if exwG is None:\n exwG = oyIN.floor(oyIN.log2(WKvO.size))\n uYDe = int(WKvO.size / 2 - 2 ** (exwG - 1))\n D1zF = int(WKvO.size / 2 + 2 ** (exwG - 1))\n return WKvO[uYDe:D1zF]",
"def _inl(nPrm):\n LP5v = oyIN.diff(nPrm)\n for YRbF, yk4i in reversed(list(enume... | [
"0.7056772",
"0.6422224",
"0.6198328",
"0.61740434",
"0.6064278",
"0.60384583",
"0.5945295",
"0.59435713",
"0.5917286",
"0.58867437",
"0.5884373",
"0.58744806",
"0.58499974",
"0.5848086",
"0.5839085",
"0.5822742",
"0.5782606",
"0.57778674",
"0.5757556",
"0.5716188",
"0.571449... | 0.56405693 | 24 |
Returns the median of data along the given axis. Missing data are discarded. | def mB0v(nPrm, jDK_=None):
def BrLx(nPrm):
WKvO = XTiz.sort(nPrm.compressed())
if WKvO.size == 0:
return _9tk
return XTiz.median(WKvO)
nPrm = PCkh(nPrm, subok=True, copy=True)
if jDK_ is None:
return BrLx(nPrm)
else:
return v3T1(BrLx, jDK_, nPrm) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BjRM(YKHO, jDK_=None):\n return YKHO._stats_return_type(jDK_)._from_apply('median', YKHO, jDK_)",
"def BjRM(YKHO, jDK_=None):\n return YKHO.__reduce(tF9S.nanmedian, axis=jDK_)",
"def qPfM(hkxX, jDK_=None):\n return oyIN.median(hkxX, jDK_)",
"def PW3S(qw7D, jDK_=None):\n if isinstance(jDK_, tu... | [
"0.86001545",
"0.85722494",
"0.8336841",
"0.8016927",
"0.7993805",
"0.7840425",
"0.7551869",
"0.7540849",
"0.7538101",
"0.7527785",
"0.75059277",
"0.74985135",
"0.7465391",
"0.7315615",
"0.7263594",
"0.7226594",
"0.71774596",
"0.7124532",
"0.7110057",
"0.70920175",
"0.7067661... | 0.83333164 | 3 |
Validates path. The output path of profiler only supports alphabets(azAZ), digit(09) or {'', '_', '.', '/'}. | def pFPP(qaEx):
FnRI = '^[/\\\\_a-zA-Z0-9-_.@]+$'
A9qt = ZbWC.fullmatch(FnRI, qaEx)
if not A9qt:
tO9_ = "The output path of profiler only supports alphabets(a-zA-Z), digit(0-9) or {'-', '_', '.', '/', '@'}, but got the absolute path= " + qaEx
raise RuntimeError(tO9_) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YYOZ(pmON):\n return str",
"def o3nm(wEf2):\n wEf2 = pmON.abspath(pmON.expanduser(wEf2))\n if wEf2 and (not pmON.exists(wEf2)):\n raise W66h('{0}Path does not exist: {1}{2}'.format(Na_G.red.value, wEf2, Na_G.reset.value))\n return wEf2",
"def JK0O(YKHO, pmON: str) -> bool:\n pass",
... | [
"0.71544504",
"0.6678042",
"0.65770143",
"0.6509814",
"0.63671255",
"0.6345802",
"0.62945986",
"0.626558",
"0.62228227",
"0.621782",
"0.61902934",
"0.6178788",
"0.6171026",
"0.6165207",
"0.6165207",
"0.6164377",
"0.6141665",
"0.61010146",
"0.60995114",
"0.6090605",
"0.6087013... | 0.8091188 | 0 |
Validates path and returns its normalized form. If path has a valid scheme, treat path as url, otherwise consider path a unix local path. | def zNZt(pmON, XxBb=False, EOPB=True):
if not pmON:
raise RuntimeError('The path is invalid!')
XltJ = str(pmON)
if not EOPB:
n_2s = XltJ.split('/')
if '..' in n_2s:
raise RuntimeError('The parent path is not allowed!')
if XxBb:
if not XltJ.startswith('/'):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bTPP(pmON):\n return pmON and pmON.strip('/') or '/'",
"def s5sT(pmON):\n while Hy7s.path.islink(pmON):\n TLI7 = Hy7s.path.dirname(pmON)\n pmON = Hy7s.path.join(TLI7, Hy7s.readlink(pmON))\n return Hy7s.path.normpath(pmON)",
"def G0bE(pmON):\n if pmON == '':\n pmON = '/'\n ... | [
"0.70915425",
"0.7022762",
"0.7018638",
"0.69380724",
"0.6834087",
"0.68327063",
"0.6825048",
"0.6794284",
"0.67676187",
"0.6760407",
"0.6757484",
"0.67525065",
"0.6735884",
"0.6686676",
"0.6638802",
"0.66263497",
"0.6623305",
"0.6605761",
"0.6596631",
"0.6590445",
"0.6565481... | 0.7306725 | 0 |
Return the last dimension of the optional shape extension of a given path. | def IoDr(pmON):
bGrB, zNig = n4oB(pmON)
if zNig is None:
return 1
else:
return zNig[-1] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def KwkG(YKHO, ROpF=None, mZ1z=None):\n if ROpF is None:\n return ()\n if mZ1z is None:\n QbGF = YKHO.out_shape\n else:\n QbGF = YKHO.model.base_shapes[mZ1z]\n if not QbGF:\n return ROpF\n assert ROpF[-len(QbGF):] == QbGF\n return ROpF[:-len(QbGF)]",
"def CBTI(YKHO):... | [
"0.6567219",
"0.62882185",
"0.6264382",
"0.61483115",
"0.6125773",
"0.60253274",
"0.5919121",
"0.58772767",
"0.5848777",
"0.57548094",
"0.5749376",
"0.5749376",
"0.57161105",
"0.56829184",
"0.5675991",
"0.5671938",
"0.56592196",
"0.565263",
"0.5632507",
"0.56129706",
"0.56113... | 0.82725465 | 0 |
Compute the Root Mean Square Error (RMSE), assuming the prediction is always zero (i.e. worst predictor RMSE). This is the true RMSE of the data in Y_val (not the mean of subRMSEs). | def kK8m(IM7m):
if isinstance(IM7m, list):
UWHw = 0.0
tUv4 = 0
for G1Hx in Ni9Y(len(IM7m)):
UWHw += oyIN.sum(IM7m[G1Hx] ** 2)
tUv4 += IM7m[G1Hx].size
UWHw /= tUv4
UWHw = oyIN.sqrt(UWHw)
else:
UWHw = oyIN.sqrt(oyIN.mean(IM7m ** 2))
retur... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YNWb(cgmM, bdkc):\n P1dF = cgmM - bdkc.round()\n BKL_ = oyIN.sum(P1dF ** 2)\n SDab = oyIN.mean(BKL_)\n DF3U = epAf.sqrt(SDab)\n return DF3U",
"def kmMN(YKHO, k8N0, NVe0):\n return (sum((NVe0 - YKHO.predict(k8N0)) ** 2) / len(oyIN.array(NVe0).flatten())) ** 0.5",
"def kmMN(Y8eF, aMgO):\n ... | [
"0.8165083",
"0.79569894",
"0.7881703",
"0.78628",
"0.77746916",
"0.776642",
"0.77397346",
"0.77136046",
"0.7708594",
"0.7616502",
"0.7572545",
"0.7572545",
"0.7560944",
"0.7551759",
"0.7551722",
"0.75388753",
"0.751704",
"0.75083274",
"0.74848396",
"0.7418369",
"0.7418369",
... | 0.7172562 | 36 |
Compute the RMSE between prediction from Xs and ground truth values Y_val. | def N2oW(VlDb, sIOC, IM7m, SPYz=True):
sSN_ = 0.0
if isinstance(sIOC[0], list):
tUv4 = 0
for Y7fn in Ni9Y(len(sIOC[0])):
mgFW = []
for pKvt in sIOC:
mgFW.append(oyIN.reshape(pKvt[Y7fn], [1] + [KCHu for KCHu in pKvt[Y7fn].shape]))
WDHD = VlDb.pr... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kmMN(Y8eF, aMgO):\n return oyIN.sqrt(ny2L(Y8eF, aMgO))",
"def kmMN(YKHO, k8N0, NVe0):\n return (sum((NVe0 - YKHO.predict(k8N0)) ** 2) / len(oyIN.array(NVe0).flatten())) ** 0.5",
"def kmMN(Y8eF, aMgO):\n return PZyS(ny2L(Y8eF, aMgO))",
"def kmMN(Y8eF, aMgO):\n return PZyS(SDab(Y8eF, aMgO))",
... | [
"0.7782616",
"0.77254933",
"0.7665594",
"0.7629644",
"0.745937",
"0.7452645",
"0.7448796",
"0.74331313",
"0.7423445",
"0.7423445",
"0.7415299",
"0.73761016",
"0.73157644",
"0.7233061",
"0.7215576",
"0.7210036",
"0.71546906",
"0.7153114",
"0.7144749",
"0.7144749",
"0.7139546",... | 0.0 | -1 |
Return RMS of the predicted values (used for verification purposes) | def VCDV(VlDb, sIOC):
Ju2U = 0.0
if isinstance(sIOC[0], list):
tUv4 = 0
for Y7fn in Ni9Y(len(sIOC[0])):
mgFW = []
for pKvt in sIOC:
mgFW.append(oyIN.reshape(pKvt[Y7fn], [1] + [KCHu for KCHu in pKvt[Y7fn].shape]))
WDHD = VlDb.predict(*mgFW)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def CTjy(PjQx, aJu6):\n return ((PjQx - aJu6) ** 2).mean() ** 0.5",
"def TsBx(tHO6, jP9s):\n ltr1 = 0.0\n rfzf = len(tHO6)\n for YRbF in Ni9Y(0, rfzf):\n P1dF = jP9s[YRbF] - tHO6[YRbF]\n ltr1 += pow(P1dF, 2)\n iAxY = ltr1 / float(rfzf)\n return iAxY",
"def Zgul(n5sN, PjQx):\n ... | [
"0.7418183",
"0.73721236",
"0.7310108",
"0.715389",
"0.71099526",
"0.71065736",
"0.71065736",
"0.71034205",
"0.70835656",
"0.7083228",
"0.7060255",
"0.70512193",
"0.70378554",
"0.7008172",
"0.7003544",
"0.70004815",
"0.69816744",
"0.6972737",
"0.6959465",
"0.6959465",
"0.6955... | 0.67818266 | 30 |
Tests that an invalid doc_id throws an exception | def t9I5(YKHO):
with YKHO.assertRaises(ZdWE):
BDwY.get_license({'a': 'b'}) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def E1hG(YKHO):\n d6pt = tTFA(YKHO.db, ['ddoc001'], 'index001', fields=['name', 'age'])\n with YKHO.assertRaises(TeSx) as Bcwd:\n d6pt.create()\n XObx = Bcwd.exception\n YKHO.assertEqual(str(XObx), \"The design document id: ['ddoc001'] is not a string.\")",
"def RTfW():\n Qjbs = 'tokens'\n ... | [
"0.74985796",
"0.7245446",
"0.7235789",
"0.7235789",
"0.7048473",
"0.69992805",
"0.6959896",
"0.67804193",
"0.675741",
"0.67399246",
"0.6732191",
"0.67297494",
"0.67111754",
"0.6707103",
"0.6695923",
"0.6675938",
"0.6664375",
"0.66447204",
"0.66277945",
"0.6619301",
"0.661757... | 0.7955452 | 0 |
Returns details for a single license | def GkVn(YKHO):
geh0 = BDwY.get_license('015020')
YKHO.assertEqual(type(geh0['results']), dict)
YKHO.assertTrue('license_number' in geh0['results'].keys()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def license(YKHO):\n return YKHO._get('/showlicenseinfo')",
"def license():\n return print(e5kH.license)",
"def voYm(YKHO):\n bD7m = YKHO.base_url + '/license'\n geh0 = YKHO.session.get(bD7m)\n try:\n return geh0.json()['response']\n except:\n return {}",
"def FKUO(YKHO):\n ... | [
"0.8436578",
"0.79477376",
"0.7906117",
"0.7846269",
"0.77911794",
"0.76174253",
"0.76174253",
"0.7592559",
"0.7570643",
"0.75298864",
"0.745851",
"0.7442457",
"0.7412293",
"0.74067247",
"0.7293654",
"0.7293654",
"0.72698385",
"0.7237654",
"0.7235045",
"0.71735966",
"0.714823... | 0.74634993 | 10 |
Tests adding three values | def i9kc(YKHO):
map(YKHO.stats.add, [1, 2, 3])
YKHO.assertEquals(YKHO.stats.numbervalues(), 3)
YKHO.assertEquals(YKHO.stats.getmin(), 1)
YKHO.assertEquals(YKHO.stats.getmax(), 3)
YKHO.assertEquals(YKHO.stats.getmean(), 2)
YKHO.assertEquals(YKHO.stats.variance(), float(2) / float(3)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n6Ya(YKHO):\n BWXx = YKHO.calculate.add('1, 2, 3')\n YKHO.assertNotEqual(3, BWXx)\n YKHO.assertEqual(6, BWXx)",
"def LCld(YKHO):\n YKHO.assertEqual(bNKA.addition(10, 5), 15)\n YKHO.assertEqual(bNKA.addition(-7, -5), -12)\n YKHO.assertEqual(bNKA.addition(28, 0), 28)\n YKHO.assertEqual(bNK... | [
"0.80250245",
"0.7759547",
"0.77141106",
"0.76786876",
"0.76786876",
"0.76775914",
"0.7562599",
"0.75085515",
"0.74773514",
"0.7434057",
"0.74226296",
"0.740235",
"0.7396327",
"0.7389302",
"0.73401374",
"0.73072463",
"0.73037964",
"0.7283624",
"0.7282989",
"0.7270532",
"0.726... | 0.7275693 | 19 |
Stop down everything that was started. | def tBIc(YKHO):
YKHO.hass.stop() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JCyR(YKHO):\n YKHO.shutdown = True",
"def hqgk(YKHO):\n YKHO.stop()",
"def hqgk(YKHO):\n YKHO.stop()",
"def JCyR(YKHO):\n YKHO._shutdown = True",
"def JCyR(YKHO):\n pass",
"def JCyR(YKHO):\n YKHO.shutdown()\n YKHO.wait_for_shutdown()",
"def kcUV(YKHO):\n YKHO.dut.kill_all()"... | [
"0.78965145",
"0.7877939",
"0.7877939",
"0.778414",
"0.77244043",
"0.7684758",
"0.76461685",
"0.76346314",
"0.7536318",
"0.75130606",
"0.75008345",
"0.749591",
"0.749591",
"0.74701905",
"0.7460746",
"0.74527156",
"0.7420151",
"0.7420151",
"0.7420151",
"0.74175054",
"0.7392789... | 0.0 | -1 |
Test if no config is passed in we still get the home zone. | def SgT4(YKHO):
assert OHct.setup_component(YKHO.hass, lhKE.DOMAIN, {'zone': None})
assert len(YKHO.hass.states.entity_ids('zone')) == 1
QTBn = YKHO.hass.states.get('zone.home')
assert YKHO.hass.config.location_name == QTBn.name
assert YKHO.hass.config.latitude == QTBn.attributes['latitude']
ass... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def H0V3():\n return cnCo('--get-default-zone')",
"def QTOS(YKHO):\n return YKHO.__default_zone_access",
"def IyRE(YKHO, lIcf=True):\n LLag.function_tracepoint(na1r, __name__, LLag.TRACE_DEBUG, 'Enter')\n YKHO.refresh(lIcf)\n return YKHO.host",
"def RPdS(YKHO) -> bool:\n if YKHO.__zone_numb... | [
"0.5660612",
"0.54898113",
"0.54714984",
"0.5436915",
"0.5428569",
"0.5398018",
"0.5358756",
"0.5350793",
"0.53263265",
"0.5322401",
"0.53121465",
"0.53117085",
"0.52516335",
"0.5239767",
"0.5238799",
"0.52346075",
"0.52045417",
"0.5170062",
"0.5170062",
"0.516048",
"0.514200... | 0.6787728 | 0 |
Compiles a CREATE INDEX statement for a given index. | def fCc8(YKHO, d6pt):
BigE = 'CREATE '
if d6pt.unique:
BigE += 'UNIQUE '
BigE += 'INDEX {} ON {} ({});'.format(bGrB(d6pt.name), bGrB(d6pt.table.name), ', '.join((bGrB(iVRZ.name) for iVRZ in d6pt.expressions)))
return BigE | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Kdz3(d6pt, QLNA):\n from .compare import _get_index_column_names\n l5Ny = \"%(prefix)screate_index(%(name)r, '%(table)s', %(columns)s, unique=%(unique)r%(schema)s%(kwargs)s)\" % {'prefix': YC2r(QLNA), 'name': yzec(QLNA, d6pt.name), 'table': d6pt.table.name, 'columns': _get_index_column_names(d6pt), 'uniq... | [
"0.7563793",
"0.755641",
"0.73188746",
"0.7241707",
"0.70430803",
"0.6886791",
"0.68580174",
"0.6779826",
"0.6732987",
"0.6727149",
"0.67235744",
"0.67205167",
"0.6710976",
"0.6671545",
"0.6663566",
"0.6635084",
"0.6600955",
"0.649419",
"0.6482664",
"0.6480978",
"0.64665824",... | 0.8413966 | 0 |
Compiles the CREATE INDEX statements for a given table. | def NCFs(YKHO, tyNF):
return '\n'.join((YKHO.createIndex(d6pt) for d6pt in tyNF._sorted_indexes)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VfRt(YKHO):\n wXzk = []\n for or8S, hAVj in YKHO.table_index.items():\n wXzk.append(f'alter table {YKHO.table_name} add index if not exists {or8S} ({hAVj}); \\n')\n if not CRMe:\n print('Create Index statements:')\n print(wXzk)\n return wXzk",
"def hqHT(YKHO, tyNF, uPxI, BigE... | [
"0.71833473",
"0.7080843",
"0.69066113",
"0.68868846",
"0.6878636",
"0.6862198",
"0.68242353",
"0.68157834",
"0.6790587",
"0.6643979",
"0.6640096",
"0.6622688",
"0.6590023",
"0.6557694",
"0.64959276",
"0.64904886",
"0.64673084",
"0.64631486",
"0.64403534",
"0.64156705",
"0.63... | 0.6941603 | 2 |
Route the incoming request based on type (LaunchRequest, IntentRequest, etc.) The JSON body of the request is provided in the event parameter. | def cfQO(tvqc, QpfX):
print('event.session.application.applicationId=' + tvqc['session']['application']['applicationId'])
if tvqc['session']['application']['applicationId'] != 'amzn1.echo-sdk-ams.app.8b6d1a64-da37-4e3f-ac18-be4f7da53e24':
raise ValueError('Invalid Application ID')
if tvqc['session']... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cfQO(tvqc, QpfX):\n print('Incoming request...')\n if tvqc['session']['new']:\n pass\n if tvqc['request']['type'] == 'LaunchRequest':\n return sjFK(tvqc['request'], tvqc['session'])\n if tvqc['request']['type'] == 'IntentRequest':\n return E97p(tvqc['request'], tvqc['session'])... | [
"0.69192326",
"0.676213",
"0.6582403",
"0.6490016",
"0.64569616",
"0.63767046",
"0.6285941",
"0.62703556",
"0.62693536",
"0.6245401",
"0.621825",
"0.6214885",
"0.6194103",
"0.61791164",
"0.61522686",
"0.61429083",
"0.6132936",
"0.6130986",
"0.6052",
"0.60088503",
"0.59823227"... | 0.581954 | 26 |
Layer repeating Residual Blocks | def N9wW(WKvO, KUnM, rmyT, _0fC):
WKvO = b1Or(WKvO, KUnM, _0fC)
for YRbF in range(1, rmyT):
WKvO = b1Or(WKvO, KUnM, 1)
return WKvO | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QufS(oubr, KUnM):\n Csk6 = yHwh(KUnM, kernel_size=3, strides=1, padding='same')(oubr)\n Csk6 = MroH('relu')(Csk6)\n Csk6 = GVKG(momentum=0.8)(Csk6)\n Csk6 = yHwh(KUnM, kernel_size=3, strides=1, padding='same')(Csk6)\n Csk6 = GVKG(momentum=0.8)(Csk6)\n Csk6 = XVRe()([Csk6, oubr])\n return C... | [
"0.7388465",
"0.7310589",
"0.72972155",
"0.7292981",
"0.7266116",
"0.7266116",
"0.70627433",
"0.7016166",
"0.6824243",
"0.6768323",
"0.67676806",
"0.67560554",
"0.6713099",
"0.6692689",
"0.6686191",
"0.66814035",
"0.6664739",
"0.66429585",
"0.6640905",
"0.6634555",
"0.66005",... | 0.68346226 | 8 |
Residual Network with ShakeShake regularization modeled after ResNet32 | def zgsN(TFPw, fOZ4=[3, 4, 6, 3], YDYE='softmax'):
dqxq = bdPE.layers.Input(shape=(224, 224, 3))
WKvO = bdPE.layers.Conv2D(64, kernel_size=7, strides=2, padding='same', kernel_initializer='he_normal', kernel_regularizer=V70B, use_bias=False)(dqxq)
WKvO = bdPE.layers.BatchNormalization()(WKvO)
WKvO = bdP... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pyd8(GhuM, crg_, zBu_, ik2X=10, LMWo=False):\n amza = 16\n g4y1 = bdPE.layers.Input(shape=GhuM)\n WKvO = zUti(inputs=g4y1, train_size=zBu_, bayesian=LMWo)\n for E5BI in range(3):\n for DFIV in range(crg_):\n FEri = 1\n if E5BI > 0 and DFIV == 0:\n FEri = ... | [
"0.67069006",
"0.65768933",
"0.6572239",
"0.6540339",
"0.6535242",
"0.6532887",
"0.647099",
"0.64419144",
"0.64301",
"0.6425808",
"0.6424602",
"0.64145267",
"0.6406991",
"0.6352255",
"0.6343126",
"0.6322944",
"0.6316974",
"0.6312968",
"0.63096523",
"0.6285315",
"0.6265981",
... | 0.0 | -1 |
Create a new survey Creates a new survey under your user and returns its data | def eLpg(YKHO, *qIxc: Any, **B2fa: Any) -> oGir:
return super().create(*qIxc, **B2fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eLpg(YKHO, vGfb):\n _aOK = YKHO.context['request'].user\n vGfb['created_by'] = _aOK\n GEXA = vGfb.pop('question') if 'question' in vGfb else []\n zEXA = jcBk.objects.create(**vGfb)\n print(zEXA)\n for ZfUD in GEXA:\n ZfUD.pop('asked_by') if 'asked_by' in ZfUD else []\n if ZfUD['... | [
"0.75047797",
"0.7493434",
"0.7039615",
"0.68045014",
"0.6454234",
"0.6437228",
"0.63985217",
"0.6379244",
"0.62615234",
"0.62582564",
"0.62193954",
"0.6182531",
"0.61749804",
"0.6146939",
"0.6137497",
"0.6130354",
"0.6116741",
"0.61126155",
"0.6111224",
"0.61097914",
"0.6108... | 0.0 | -1 |
Get details from a survey Returns data from a single survey that belongs to the user. | def GKJL(YKHO, *qIxc: Any, **B2fa: Any) -> oGir:
return super().retrieve(*qIxc, **B2fa) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def q_EH(WcAK: str, NCls: Session=JHvC(GGod)):\n MxjE = jcBk.objects(NCls).filter_by(slug=WcAK, status=df0C.Published.value).first()\n if not MxjE:\n raise pgG1(detail='No survey found.', status_code=jGRS.HTTP_404_NOT_FOUND)\n return MxjE",
"def dRh_(YKHO, uJjO, YoOB):\n _5c0 = 'survey_{}'.for... | [
"0.6978425",
"0.67494434",
"0.66586703",
"0.6534491",
"0.6322385",
"0.61195654",
"0.5953347",
"0.5945726",
"0.5903876",
"0.587218",
"0.5859867",
"0.58404994",
"0.5831465",
"0.57895935",
"0.5774225",
"0.5740005",
"0.5728388",
"0.5674527",
"0.5657104",
"0.56554264",
"0.5654662"... | 0.0 | -1 |
Return True if solution is found end position is reached | def IO6_(pmON):
if pmON == '':
return False
else:
return pMrv(pmON) == FRMp | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def neBz(YKHO) -> bool:\n I1mm = True\n while I1mm:\n YKHO._searchAlgo.move()\n if tuple(YKHO._searchAlgo._position) == YKHO._end_bounds and (not YKHO._searchAlgo._goal_found):\n YKHO._position = tuple(YKHO._searchAlgo._position)\n return False\n elif YKHO._searchAl... | [
"0.77217853",
"0.7080339",
"0.6933156",
"0.68688875",
"0.67706585",
"0.6760252",
"0.67533606",
"0.67289555",
"0.6647479",
"0.6636056",
"0.66128737",
"0.6594041",
"0.6591956",
"0.6591786",
"0.65785867",
"0.65537506",
"0.6537762",
"0.6537048",
"0.6530578",
"0.65248805",
"0.6496... | 0.0 | -1 |
Returns a mahalanobis distance for current probability. | def hVAT(Cwt5):
return -2 * oyIN.log(1 - Cwt5) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n5le(YKHO, Po4F):\n assert not YKHO._var is None and (not YKHO._mean is None), 'You need to load a model before computing a Mahalanobis distance'\n RDhP = Po4F['features']\n assert RDhP.shape == YKHO._var.shape == YKHO._mean.shape, \"Shapes don't match (x: %s, μ: %s, σ²: %s)\" % (RDhP.shape, YKHO._mea... | [
"0.7337925",
"0.71576023",
"0.6916747",
"0.6682507",
"0.6667229",
"0.6373004",
"0.6326137",
"0.6271622",
"0.6269701",
"0.62219834",
"0.6211442",
"0.60719055",
"0.59005326",
"0.58982325",
"0.5877106",
"0.5859731",
"0.58564985",
"0.58533144",
"0.5843383",
"0.5708411",
"0.568869... | 0.7969436 | 0 |
Returns a mahalanobis distance for point pt and gaussian with. | def PNaa(Xf84, r8hN, kbaf):
Ty9i = Xf84 - r8hN
return oyIN.dot(oyIN.dot(Ty9i, kbaf), Ty9i.transpose()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n5le(YKHO, Po4F):\n assert not YKHO._var is None and (not YKHO._mean is None), 'You need to load a model before computing a Mahalanobis distance'\n RDhP = Po4F['features']\n assert RDhP.shape == YKHO._var.shape == YKHO._mean.shape, \"Shapes don't match (x: %s, μ: %s, σ²: %s)\" % (RDhP.shape, YKHO._mea... | [
"0.69049597",
"0.6884168",
"0.67035407",
"0.63769054",
"0.6366082",
"0.6324924",
"0.6120877",
"0.6000972",
"0.58523273",
"0.58214927",
"0.57783663",
"0.5769472",
"0.5719143",
"0.5705812",
"0.5703228",
"0.5695348",
"0.562392",
"0.5579198",
"0.5541462",
"0.5532199",
"0.5517024"... | 0.68239826 | 2 |
Computes the VAE loss function. KL(N(\mu, \sigma), N(0, 1)) = \log \frac{1}{\sigma} + \frac{\sigma^2 + \mu^2}{2} \frac{1}{2} | def KsZl(YKHO, *qIxc, **B2fa) -> dict:
fuBA = qIxc[0]
EcVT = qIxc[1]
yGTL = qIxc[2]
IR53 = qIxc[3]
ny2L = vuvg.mse_loss(fuBA, EcVT)
WdPx = -0.5 * ht2j.sum(1 + IR53 - yGTL ** 2 - IR53.exp())
return ny2L + WdPx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dMiA(yGTL, XO02):\n return -0.5 * ht2j.sum(1 + XO02 - yGTL.pow(2) - XO02.exp())",
"def fDxD(Y8eF, aMgO):\n V9Qw = nMvt.sum(nMvt.binary_crossentropy(aMgO, Y8eF), axis=1)\n bISY = 0.5 * nMvt.sum(nMvt.exp(SgQ6) + nMvt.square(yGTL) - 1.0 - SgQ6, axis=1)\n return V9Qw + bISY",
"def fDxD(Y8eF, aMgO):... | [
"0.7989763",
"0.75143254",
"0.7484504",
"0.7474877",
"0.7465601",
"0.7400283",
"0.73981375",
"0.72621214",
"0.7191693",
"0.713684",
"0.71282196",
"0.71282196",
"0.710848",
"0.70538837",
"0.6937616",
"0.6933623",
"0.6928705",
"0.6903163",
"0.68817466",
"0.685436",
"0.67969024"... | 0.71928674 | 8 |
Function to clean text of websites, email addresess and any punctuation We also lower case the text | def Jnxk(l5Ny):
l5Ny = ZbWC.sub('((\\S+)?(http(s)?)(\\S+))|((\\S+)?(www)(\\S+))|((\\S+)?(\\@)(\\S+)?)', ' ', l5Ny)
l5Ny = ZbWC.sub('[^a-zA-Z ]', '', l5Ny)
l5Ny = l5Ny.lower()
l5Ny = Dhdw.word_tokenize(l5Ny)
return l5Ny | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QrZ9(l5Ny):\n pC3l = ['\"']\n l5Ny = str(l5Ny)\n d_Go = ZbWC.sub('http\\\\S+', '', l5Ny)\n d_Go = d_Go.lower()\n d_Go = d_Go.replace(' ', '')\n d_Go = d_Go.replace('\\n', '')\n d_Go = d_Go.replace('\\t', '')\n for h97n in pC3l:\n d_Go = d_Go.replace(h97n, '')\n return d_Go",
... | [
"0.8213702",
"0.8003594",
"0.79400665",
"0.7889179",
"0.78829557",
"0.7761649",
"0.77447534",
"0.7689018",
"0.7686221",
"0.76845926",
"0.7683552",
"0.7683552",
"0.76709896",
"0.7613079",
"0.74812776",
"0.7474589",
"0.7473552",
"0.7467861",
"0.7424559",
"0.74043995",
"0.739793... | 0.76771134 | 12 |
Function to lemmatize words, for now, only lemmatize verbs,noun, adjective, adverbs | def ydeT(l5Ny):
try:
l5Ny = [P_zh.lemmatize(GIN8, pos='v') for GIN8 in l5Ny]
l5Ny = [P_zh.lemmatize(GIN8, pos='n') for GIN8 in l5Ny]
l5Ny = [P_zh.lemmatize(GIN8, pos='a') for GIN8 in l5Ny]
l5Ny = [GIN8 for GIN8 in l5Ny if len(GIN8) > 1]
except IndexError:
pass
return ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def sAwM(V22M):\n LkXt = GFnk()\n V22M = V22M.split()\n gnaf = ' '.join([LkXt.lemmatize(yzQ0) for yzQ0 in V22M])\n return gnaf",
"def ydeT(V22M, lGi5=[], PJWX=False):\n LkXt = GFnk()\n A1xJ = []\n for GIN8 in V22M:\n if GIN8 in lGi5:\n dhx_ = GIN8\n else:\n ... | [
"0.8416542",
"0.8201742",
"0.81373584",
"0.8063957",
"0.7995518",
"0.79792905",
"0.79792905",
"0.79792905",
"0.79703176",
"0.7912445",
"0.7912445",
"0.7912445",
"0.7912445",
"0.7912445",
"0.7912445",
"0.7905618",
"0.79046726",
"0.78961176",
"0.78820205",
"0.7864665",
"0.78541... | 0.8314906 | 1 |
get train vocab of gpt data. return the mask | def QNzJ(AeXe):
KYmZ = Hy7s.path.join(AeXe, 'original_data', 'train.summary')
VLpz = Hy7s.path.join(AeXe, 'original_data', 'train.box')
webl = Hy7s.path.join(AeXe, 'processed_data', 'vocab_local.txt')
CtWL = []
mktQ = MnDN.get_encoder('117M')
with open(KYmZ) as eHNT:
for zFiD in eHNT:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def qTBf(YKHO, CtWL):\n ZHfW = oyIN.zeros(YKHO._out_shape[:2])\n for UXqs, Fg_i in zip(YKHO.char_labels, YKHO.char_bboxes):\n ZHfW[Fg_i.ymin:Fg_i.ymax, Fg_i.xmin:Fg_i.xmax] = CtWL.char_to_id(UXqs)\n ZHfW = oyIN.expand_dims(ZHfW, 2)\n return ZHfW.astype(dtype=oyIN.float32)",
"def bdJp(YKHO):\n ... | [
"0.6317267",
"0.6206176",
"0.6206176",
"0.5997239",
"0.5768416",
"0.57500064",
"0.5707594",
"0.56676143",
"0.56606686",
"0.56162643",
"0.5597387",
"0.5574466",
"0.55729645",
"0.5553675",
"0.55440915",
"0.5531466",
"0.5519957",
"0.55179846",
"0.55102503",
"0.5490294",
"0.54785... | 0.60175323 | 3 |
all links that don't start with a scheme (e.g. https) are relative | def wrVH(YKHO) -> bool:
return not YKHO.is_absolute | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def V1Iu(YKHO) -> None:\n K37S = []\n for YRbF in YKHO.links:\n if ZbWC.match('http', YRbF):\n K37S.append(YRbF)\n YKHO.links = K37S",
"def sKBU(NKRf, ayw4):\n ayw4 = [vC9B for vC9B in ayw4 if vC9B is not None]\n ZoIc = [vC9B if vC9B.startswith('http') else TDhU(NKRf, vC9B) for v... | [
"0.73378265",
"0.72981215",
"0.6865906",
"0.68287826",
"0.6823924",
"0.66621464",
"0.6661168",
"0.6618756",
"0.65838665",
"0.6583687",
"0.65817",
"0.6572565",
"0.655922",
"0.65449756",
"0.65323055",
"0.65302896",
"0.6525687",
"0.64554644",
"0.644515",
"0.6415084",
"0.6415007"... | 0.0 | -1 |
Given a filename, walk its ast and determine if it is declaring a namespace package. Intended only for __init__.py files though it will work for any .py. | def NyQs(Emd4, Ux0P):
with open(Ux0P) as ytgA:
Eosz = jZ4I.parse(ytgA.read(), Ux0P)
VIzB = [Q6kx for Q6kx in jZ4I.walk(Eosz) if isinstance(Q6kx, jZ4I.Call)]
for pOv4 in VIzB:
if len(pOv4.args) != 1:
continue
if isinstance(pOv4.func, jZ4I.Attribute) and pOv4.func.attr != '... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def yHeX(r8hN):\n try:\n mWFP = r8hN.__file__\n except AttributeError:\n return 0\n return ZbWC.match('.*__init__.py[co]?$', mWFP)",
"def AH1a(qaEx):\n return Hy7s.path.isdir(qaEx) and Hy7s.path.isfile(Hy7s.path.join(qaEx, '__init__.py'))",
"def bYKW(pmON):\n for bGrB in SC2F.iglob... | [
"0.69335705",
"0.6835272",
"0.61930776",
"0.61806285",
"0.6164314",
"0.61633325",
"0.61183673",
"0.61142886",
"0.61064696",
"0.6044499",
"0.60401934",
"0.6023249",
"0.5974939",
"0.5972035",
"0.596297",
"0.5950824",
"0.5946591",
"0.5915243",
"0.5905003",
"0.5894926",
"0.584983... | 0.7550853 | 0 |
Calculate first number in the row | def iUss(exwG: int) -> int:
return exwG * (exwG - 1) + 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rvPk(YKHO) -> int:\n ...",
"def BDYS(YKHO) -> int:\n auMB = (YKHO.current_page - 1) * YKHO.rows_per_page\n return auMB + 1",
"def v8zw(YKHO):\n fvDH = min(4, len(YKHO.columns) - 1)\n YRbF = -1\n for YRbF in range(len(YKHO.index)):\n if not oyIN.isnan(YKHO.iat[YRbF, fvDH]):\n ... | [
"0.69508123",
"0.6764984",
"0.6656614",
"0.66514224",
"0.66454035",
"0.6566661",
"0.653646",
"0.6530479",
"0.65179753",
"0.64567804",
"0.6397882",
"0.6386706",
"0.6358334",
"0.6354219",
"0.6342526",
"0.6322108",
"0.6311261",
"0.6307723",
"0.6275206",
"0.62662524",
"0.6197733"... | 0.64583653 | 9 |
Test User is Creating and token is valid | def cDXr(YKHO):
nPrm = {'username': 'myuser', 'email': 'myuser@example.com', 'password': 'mypassword'}
geh0 = YKHO.client.post(YKHO.signup_url, data=nPrm)
YKHO.assertEqual(geh0.status_code, jGRS.HTTP_201_CREATED)
YKHO.assertEqual(mv1M.objects.count(), 2)
YKHO.assertEqual(geh0.data['username'], geh0.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def BbPO(YKHO):\n pB3N = {'email': 'k@gmail.com', 'password': 'pass1232321PASS', 'name': 'khaled osman'}\n lYUQ(**pB3N)\n Ylbp = YKHO.client.post(pz0m, pB3N)\n YKHO.assertIn('token', Ylbp.data)\n YKHO.assertEqual(Ylbp.status_code, jGRS.HTTP_200_OK)\n print('T-----> success test_create token for ... | [
"0.86018044",
"0.8563642",
"0.85351586",
"0.8471402",
"0.84620035",
"0.8460593",
"0.84594536",
"0.8442278",
"0.84199834",
"0.83956003",
"0.838954",
"0.83706343",
"0.8345904",
"0.83435506",
"0.8303706",
"0.82971007",
"0.82872844",
"0.8261546",
"0.82282853",
"0.8216901",
"0.818... | 0.0 | -1 |
Return the next line of input. | def zFiD(YKHO):
Aofo = ''
while YKHO.current_char is not None and (not YKHO.current_char == '\n'):
Aofo += YKHO.current_char
YKHO.advance()
YKHO.advance()
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kSRL(Mkmy):\n return Mkmy.readline().rstrip()",
"def RqT4(YKHO):\n if YKHO._peek_line_buffer is not None:\n zFiD = YKHO._peek_line_buffer\n YKHO._peek_line_buffer = None\n return zFiD\n return next(YKHO.source)",
"def next(YKHO):\n zFiD = YKHO.readline()\n if not zFiD:\n... | [
"0.7968742",
"0.77280945",
"0.76055473",
"0.7545151",
"0.7404622",
"0.7404622",
"0.7384945",
"0.73562664",
"0.7296402",
"0.7137951",
"0.7105654",
"0.70997244",
"0.7096963",
"0.7068547",
"0.70101035",
"0.70081043",
"0.6997032",
"0.6929107",
"0.68922853",
"0.6886417",
"0.688058... | 0.6254127 | 66 |
Read and preprocess tfrecords into a tf.data.Dataset | def eis1(n9sf, Ep8u, zi3C=1024, TFPw=1, hXNa=False, zmbF=False):
def oPa6(xKOQ):
""" Parse tfrecords into tf.Feature, to be made into a dataset """
ztIo = {'signal/id': ZylS.io.FixedLenFeature([], ZylS.string), 'segment/start': ZylS.io.FixedLenFeature([], ZylS.int64), 'segment/end': ZylS.io.FixedLe... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def _3yi(FJvp, Ep8u=128):\n __n6 = ZylS.data.TFRecordDataset([FJvp])\n __n6 = __n6.map(E_6x.example_parse, num_parallel_calls=5)\n __n6 = __n6.shuffle(buffer_size=10000)\n __n6 = __n6.padded_batch(Ep8u, padded_shapes={'pair_id': [], 'label': [], 'q_tokens': ZylS.TensorShape([None]), 'd_tokens': ZylS.Te... | [
"0.7887925",
"0.7716449",
"0.76178783",
"0.76164204",
"0.75545174",
"0.7504146",
"0.74350053",
"0.7416788",
"0.7401113",
"0.7357289",
"0.7333039",
"0.732728",
"0.72972",
"0.7236622",
"0.7155925",
"0.71351707",
"0.70897615",
"0.70188004",
"0.70155454",
"0.70047545",
"0.6965703... | 0.72429776 | 13 |
Parse tfrecords into tf.Feature, to be made into a dataset | def oPa6(xKOQ):
ztIo = {'signal/id': ZylS.io.FixedLenFeature([], ZylS.string), 'segment/start': ZylS.io.FixedLenFeature([], ZylS.int64), 'segment/end': ZylS.io.FixedLenFeature([], ZylS.int64), 'subsegment/id': ZylS.io.FixedLenFeature([], ZylS.int64), 'subsegment/length': ZylS.io.FixedLenFeature([], ZylS.int64), 'su... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ps5P(YKHO, kmL7):\n bySB = ZylS.parse_single_example(kmL7, features={'data': ZylS.FixedLenFeature([], ZylS.string), 'dataShape': ZylS.FixedLenFeature([YKHO.__tfrecord_shape_lens['data']], ZylS.int64), 'label': ZylS.FixedLenFeature([], ZylS.string), 'labelShape': ZylS.FixedLenFeature([YKHO.__tfrecord_shape_l... | [
"0.8145922",
"0.7810821",
"0.7644239",
"0.7468995",
"0.7455939",
"0.73785967",
"0.7331066",
"0.72616684",
"0.72551936",
"0.72469765",
"0.7215094",
"0.71890485",
"0.7184465",
"0.7169947",
"0.71488947",
"0.71488947",
"0.71488947",
"0.7146496",
"0.7140896",
"0.71366704",
"0.7135... | 0.0 | -1 |
Saves player dictionary to a JSON file | def fpMt(qMX7, Cihy):
hlu_ = {mWFP: cdKq.to_dict() for mWFP, cdKq in qMX7.items()}
qQXR.dump(hlu_, open(Cihy, 'wb'), indent=0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xkzz(YKHO):\n YGFP = YKHO.to_dict()\n with open(YKHO.filename, 'w', encoding='utf8') as wM3v:\n qQXR.dump(YGFP, wM3v, indent=4)",
"def BYCN(Csk6: MY_DICT) -> None:\n with open('player_sheet.json', 'w') as nUeQ:\n nUeQ.write(qQXR.dumps(Csk6))",
"def M8gv(YKHO):\n with open(k0DF, 'w... | [
"0.7567393",
"0.7539061",
"0.7457795",
"0.73099595",
"0.73038286",
"0.7276207",
"0.7264649",
"0.7235905",
"0.7227001",
"0.72259766",
"0.7225415",
"0.7186768",
"0.71847916",
"0.7169092",
"0.7165921",
"0.7139985",
"0.71320367",
"0.7084185",
"0.70783764",
"0.7077737",
"0.7071802... | 0.8402069 | 0 |
Calculates the optimal long term reward (or value) when the player has a hand of the form yy | def icIK(LVAh, kfMn, XTKJ, BT2A, r_E8=False):
if LVAh == 'A':
return sAiw(kfMn, XTKJ, BT2A, r_E8)
ROpo = RfNH(2 * LVAh, kfMn, XTKJ)
UZ_k = 0
if 2 * LVAh + 10 > 21:
UZ_k += HIev * -XTKJ
else:
UZ_k += HIev * BT2A[str(2 * LVAh + 10), kfMn, False] * XTKJ
for WKvO in range(2, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def v5Xw(YKHO, iBIi):\n if iBIi.game_result == 0:\n vOGg = ugba\n elif iBIi.game_result == YKHO.side:\n vOGg = uX1l\n else:\n vOGg = NJE4\n YKHO.history_states.reverse()\n d7mp = -1.0\n for QzFq in YKHO.history_states:\n QTBn, BZN_ = QzFq\n vexM = YKHO.Q(QTBn)\n... | [
"0.63965064",
"0.6337745",
"0.62425566",
"0.6190899",
"0.6130696",
"0.60294276",
"0.59990674",
"0.5993698",
"0.59858346",
"0.59730446",
"0.59645987",
"0.5961245",
"0.59581065",
"0.5957805",
"0.59568644",
"0.59500325",
"0.5946282",
"0.5908261",
"0.58946633",
"0.588067",
"0.587... | 0.0 | -1 |
compute the 2's complement of int value val | def h7al(wEf2, UOVU):
if wEf2 & 1 << UOVU - 1 != 0:
wEf2 = wEf2 - (1 << UOVU)
return wEf2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def X1Vv(BWXx: int) -> int:\n assert BWXx.bit_length() <= 16, 'Value too large!'\n assert BWXx > 0, 'Value is negative!'\n return 2 ** 16 - BWXx",
"def vGDI(YKHO, mLGw):\n Csk6 = bin(mLGw)[2:]\n if mLGw >= 0:\n return int('1' * len(Csk6), 2) - mLGw",
"def pAWV(WKvO):\n assert type(WKvO... | [
"0.7631956",
"0.7355158",
"0.72981936",
"0.7169025",
"0.7107903",
"0.69499755",
"0.6924448",
"0.6816031",
"0.6761521",
"0.67599815",
"0.67399",
"0.66093016",
"0.65710974",
"0.65677685",
"0.65496564",
"0.6534571",
"0.6503414",
"0.6438741",
"0.6436792",
"0.6415961",
"0.63983244... | 0.6330918 | 26 |
beta given lorentz factor | def SSwp(KMvS):
return XTiz.sqrt(1 - (1.0 / KMvS) ** 2) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UqYS(epBp, elmQ, qGor):\n return elmQ - 2 * qGor * epBp + (1 + qGor ** 2) / elmQ * epBp ** 2",
"def UqYS(YKHO, NCls=0):\n return YKHO.grating.blaze - YKHO.gamma + NCls",
"def UqYS(YKHO):\n return 1.0 / YKHO.kT",
"def UqYS(YKHO) -> float:\n return YKHO._params[1]",
"def UqYS(KCHu):\n retu... | [
"0.82560897",
"0.76543033",
"0.75223356",
"0.73958546",
"0.7381938",
"0.72490245",
"0.72305703",
"0.72018814",
"0.7196237",
"0.7101415",
"0.7088736",
"0.7082323",
"0.70739156",
"0.69938105",
"0.69875836",
"0.6955507",
"0.6938141",
"0.6934705",
"0.6934705",
"0.6934705",
"0.693... | 0.6352621 | 92 |
Return a workspace object from an existing Azure Machine Learning Workspace. Reads workspace configuration from a file. Throws an exception if the config file can't be found. The method provides a simple way to reuse the same workspace across multiple Python notebooks or projects. | def MSOc(Emd4, mwuo: ChainedTokenCredential, pmON: Union[PathLike, str]=None, Kq0u=None, **B2fa) -> 'MLClient':
pmON = GkAb('.') if pmON is None else GkAb(pmON)
if pmON.is_file():
zcvW = pmON
else:
BoIQ = ['.azureml', 'aml_config', None]
if Kq0u:
OPS7 = [Kq0u]
els... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def w7bG(GPtr: MoveModelConfig) -> lnpD:\n return lnpD.get(name=GPtr.workspace_name, subscription_id=GPtr.subscription_id, resource_group=GPtr.resource_group)",
"def BlFP(JZXy: Union[str, PathLike, IO[AnyStr]], *, L2s0: Optional[str]=None, **B2fa) -> lnpD:\n return cAFu(lnpD, JZXy, L2s0, **B2fa)",
"def j... | [
"0.6553608",
"0.6307084",
"0.60997003",
"0.60844475",
"0.6029224",
"0.598772",
"0.59843224",
"0.59455043",
"0.58537674",
"0.57998866",
"0.5783006",
"0.5693406",
"0.5672118",
"0.5612692",
"0.5580975",
"0.5542658",
"0.5536413",
"0.5526905",
"0.5378203",
"0.5365448",
"0.53589267... | 0.5677971 | 12 |
Convert latlon to use the datum target_datum. | def FhXJ(bYVt, S1kv):
assert 'WGS84' == S1kv
SZFh = GEmI[bYVt.datum].transform
tjFQ = O1a5(bYVt)
tjFQ = MKYr(tjFQ, SZFh)
ygnx = O7DP(tjFQ, S1kv)
return ygnx | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def YsCL(YKHO, QnmL, FDPT):\n return YKHO.converter(FDPT, QnmL)",
"def wvEr(FDPT, QnmL):\n from affine import Affine\n QnmL = oyIN.asarray(QnmL)\n FDPT = oyIN.asarray(FDPT)\n A4fg = FDPT[1] - FDPT[0]\n gMt4 = QnmL[1] - QnmL[0]\n uPnQ = Affine.translation(FDPT[0] - A4fg / 2, QnmL[0] - gMt4 / ... | [
"0.6234664",
"0.6102965",
"0.6031076",
"0.6031076",
"0.6022616",
"0.5948022",
"0.5868552",
"0.58533525",
"0.58086514",
"0.5798173",
"0.57956505",
"0.57950157",
"0.5767036",
"0.57444227",
"0.573247",
"0.5727064",
"0.56957227",
"0.5690569",
"0.56746924",
"0.56623197",
"0.564507... | 0.834844 | 0 |
Returns element once it's located on the DOM. Before interacting with an element we want to make sure it's in the DOM. | def jifF(uG8F, vYBr=ITS7() + 30, VOlW=2):
KWOs = None
U6D_ = None
while ITS7() < vYBr:
try:
U6D_ = SYsl.wait_for(uG8F, Q71O.XPATH)
except (XWYQ.NoSuchElementException, XWYQ.StaleElementReferenceException, XWYQ.ElementNotVisibleException) as e:
KWOs = tTpl
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def U6D_(YKHO):\n E_qD = YKHO.driver\n U6D_ = R3wq(E_qD, 8).until(i1TH.presence_of_element_located(YKHO.locator))\n return U6D_",
"def VZnN(YKHO):\n GDUz = YKHO._find_element_list()\n if not GDUz:\n return None\n return GDUz[0]",
"def _9uU(YKHO):\n try:\n return YKHO.driver.f... | [
"0.70308363",
"0.6805585",
"0.6698908",
"0.65965116",
"0.6584713",
"0.65523845",
"0.64874864",
"0.63844126",
"0.6355379",
"0.6305881",
"0.6263669",
"0.62547874",
"0.62110513",
"0.61899126",
"0.61897683",
"0.6184705",
"0.6126074",
"0.6126074",
"0.6126074",
"0.61236805",
"0.612... | 0.6063099 | 31 |
Truncates the testcase name if longer than the given maximum length | def lmFN(YKHO, wzH_, hEAh=''):
def sBi8(LihS, Fyc7, NPuY):
mWFP = LihS.get('name')
if len(mWFP) <= Fyc7:
return False
Dokz = mWFP[:Fyc7 - len(NPuY)] + NPuY
LihS.set('name', Dokz)
return True
YKHO.__process(action_func=sBi8, _max_len=wzH_, _postfix=hEAh) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DUr7(mWFP: str, wzH_: int=12) -> str:\n mWFP = str(mWFP)\n if len(mWFP) <= wzH_:\n return mWFP\n return f'{mWFP[:wzH_]}...'",
"def OqiF(mWFP, _NR1):\n if _NR1 == None or len(mWFP) <= _NR1:\n return mWFP\n return mWFP[:_NR1] + '...'",
"def LLEV(Mqf_, KLk8=20):\n Mqf_ = str(Mq... | [
"0.7773016",
"0.7488567",
"0.6942354",
"0.68348396",
"0.682557",
"0.6815518",
"0.67771405",
"0.6770781",
"0.6741381",
"0.66593254",
"0.664797",
"0.6606679",
"0.6603438",
"0.6603438",
"0.65881455",
"0.6587872",
"0.6578698",
"0.65677065",
"0.6565237",
"0.6550365",
"0.6543826",
... | 0.82188165 | 0 |
Symmetrically normalize adjacency matrix. | def ujN0(eQUr):
eQUr += H4yH.eye(eQUr.shape[0])
eQUr = H4yH.coo_matrix(eQUr)
mJjf = oyIN.array(eQUr.sum(1))
tvzN = oyIN.power(mJjf, -0.5).flatten()
tvzN[oyIN.isinf(tvzN)] = 0.0
hEeC = H4yH.diags(tvzN)
return eQUr.dot(hEeC).transpose().dot(hEeC).tocoo() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ujN0(eQUr):\n mJjf = oyIN.array(eQUr.sum(1))\n tvzN = oyIN.power(mJjf, -0.5).flatten()\n tvzN[oyIN.isinf(tvzN)] = 0.0\n hEeC = H4yH.diags(tvzN)\n return eQUr.dot(hEeC).transpose().dot(hEeC).tocoo()",
"def ujN0(eQUr):\n mJjf = oyIN.array(eQUr.sum(1))\n tvzN = oyIN.power(mJjf, -0.5).flatte... | [
"0.79748905",
"0.78841347",
"0.78669816",
"0.78669816",
"0.78590506",
"0.7824809",
"0.7818386",
"0.7787256",
"0.77343863",
"0.77149534",
"0.77057743",
"0.7697704",
"0.7697704",
"0.7697704",
"0.7697704",
"0.7697704",
"0.7697704",
"0.7697704",
"0.7697704",
"0.7697704",
"0.76977... | 0.77217567 | 9 |
Save an instance of the model to the database. | def xkzz(YKHO):
try:
NCls.session.add(YKHO)
NCls.session.commit()
return True
except cQ7A:
NCls.session.rollback()
return False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xkzz(Emd4, KAOR=None):\n if KAOR:\n NCls().add(KAOR)\n NCls().commit()",
"def xkzz(YKHO):\n NCls.session.add(YKHO)\n NCls.session.commit()",
"def _TTP(YKHO):\n NCls.session.add(YKHO)\n NCls.session.commit()",
"def xkzz(YKHO) -> None:\n NCls.session.add(YKHO)\n NCls.session.... | [
"0.813031",
"0.7871988",
"0.7868394",
"0.7860743",
"0.78587526",
"0.78587526",
"0.78587526",
"0.78587526",
"0.78587526",
"0.78587526",
"0.78587526",
"0.78587526",
"0.78587526",
"0.78587526",
"0.78587526",
"0.78587526",
"0.78587526",
"0.78587526",
"0.78587526",
"0.78587526",
"... | 0.0 | -1 |
REPL representation of model instance. | def wHJl(YKHO):
qCYn = YKHO.__str__().replace('{', '(').replace('}', ')').replace(':', '=')
return f'{type(YKHO).__name__}{qCYn}' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wHJl(YKHO: BaseModel) -> str:\n sgKs = [f'{H5ew}={repr(BWXx)}' for H5ew, BWXx in YKHO.to_dict().items()]\n return f'{type(YKHO).__name__}({sgKs})'",
"def zAg0(YKHO):\n oOUF = '-----------------------------------------------------------------------------------\\n'\n _2sc = YKHO.__class__.__name__\... | [
"0.77225864",
"0.7552236",
"0.7329594",
"0.73215765",
"0.73038757",
"0.727198",
"0.72227895",
"0.720361",
"0.7195908",
"0.7195908",
"0.715243",
"0.7148774",
"0.7116073",
"0.71116",
"0.71056265",
"0.70698845",
"0.70308685",
"0.7022738",
"0.7022738",
"0.7017515",
"0.7013712",
... | 0.0 | -1 |
String representation of model. | def zAg0(YKHO):
return str(YKHO.serialize()) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zAg0(YKHO):\n return str(YKHO.__model)",
"def zAg0(YKHO):\n return str(YKHO.model)",
"def zAg0(YKHO):\n oOUF = '-----------------------------------------------------------------------------------\\n'\n _2sc = YKHO.__class__.__name__\n oOUF += '\\t\\t' + _2sc + ' instance\\n'\n oOUF += '--... | [
"0.8425197",
"0.8413551",
"0.79872996",
"0.790603",
"0.779675",
"0.7768631",
"0.7729165",
"0.77244353",
"0.75757647",
"0.75757647",
"0.75480616",
"0.7522922",
"0.7521524",
"0.7511643",
"0.7511643",
"0.7509584",
"0.7509584",
"0.7509584",
"0.74970776",
"0.7486751",
"0.74803114"... | 0.7516297 | 13 |
Query and filter the data of a model, returning the first result. | def huPo(Emd4, **B2fa):
return Emd4.query.filter_by(**B2fa).first() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cntZ(YKHO, **B2fa):\n [KAOR] = YKHO.filter(**B2fa).order_by('pk')[:1] or [None]\n return KAOR",
"def neBz(YKHO, **B2fa):\n return YKHO.filter(first=True, **B2fa)",
"def A3Na(YKHO, cntZ=True, *qIxc, **B2fa):\n try:\n return YKHO.get(*qIxc, **B2fa)\n except YKHO.model.DoesNotExist:\n ... | [
"0.725065",
"0.70983136",
"0.69736785",
"0.6879262",
"0.6850057",
"0.6811129",
"0.67795324",
"0.6767656",
"0.6752254",
"0.6732779",
"0.6652716",
"0.6630408",
"0.6630408",
"0.6620246",
"0.6616681",
"0.6600588",
"0.65212965",
"0.6457466",
"0.64505607",
"0.64505607",
"0.6441344"... | 0.70349544 | 2 |
email must be unique | def a4p5(L03z, Jyyj):
OSYx = YJv1.objects(T8ck(email=Jyyj.data)).count()
if OSYx >= 1 and (not L03z.id):
raise ffF6.ValidationError('Email deja utilise par un autre utilisateur') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Bt7w(YKHO, D3lj):\n D3lj = mv1M.query.filter_by(email=D3lj.data).first()\n if D3lj:\n raise sUXu('The email is used already')",
"def a4p5(L03z, Jyyj):\n D3lj = Jyyj.data.lower()\n cuiw = gte4()\n if cuiw.query(mv1M).filter(mv1M.email == D3lj).first():\n raise sUXu('Пользователь с... | [
"0.8150161",
"0.8104938",
"0.79807705",
"0.79675126",
"0.79239",
"0.79075927",
"0.78959686",
"0.7894359",
"0.78852475",
"0.78592306",
"0.78206325",
"0.77933866",
"0.77884626",
"0.7739296",
"0.7724543",
"0.7715831",
"0.7709205",
"0.76897216",
"0.76850677",
"0.76843303",
"0.765... | 0.77964646 | 11 |
Return the state attributes. | def R1i3(YKHO) -> cuzp[str, ImMB]:
return {'last_run_success': YKHO._last_run_success, 'battery': YKHO._battery, 'light': YKHO._light} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def upgy(YKHO):\n return YKHO._state_attrs",
"def upgy(YKHO):\n nPrm = {}\n return nPrm",
"def upgy(YKHO):\n azoT = {}\n for H5ew in YKHO._attributes.keys():\n azoT[H5ew] = YKHO._item[YKHO._attributes[H5ew]]\n return azoT",
"def R1i3(YKHO):\n return YKHO.attr\n 'Return the stat... | [
"0.9143806",
"0.8802095",
"0.8796065",
"0.85617536",
"0.84979665",
"0.84979665",
"0.84034306",
"0.838496",
"0.8384177",
"0.836618",
"0.836618",
"0.836618",
"0.836618",
"0.836618",
"0.8365354",
"0.8365354",
"0.8365354",
"0.83578205",
"0.8335189",
"0.8335189",
"0.8335189",
"0... | 0.76995134 | 99 |
Return the class of this device. | def rM2U(YKHO) -> str:
return oC6Y | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rM2U(YKHO):\n return YKHO._class",
"def rM2U(YKHO):\n return YKHO._handle('device_class')",
"def rM2U(YKHO):\n return YKHO._device_class",
"def rM2U(YKHO):\n return YKHO._device_class",
"def rM2U(YKHO):\n return YKHO._device_class",
"def rM2U(YKHO):\n return YKHO._device_class",
"... | [
"0.90902424",
"0.8930935",
"0.8928157",
"0.8928157",
"0.8928157",
"0.8928157",
"0.8928157",
"0.8928157",
"0.8928157",
"0.8928157",
"0.8928157",
"0.8928157",
"0.8928157",
"0.8928157",
"0.8928157",
"0.8928157",
"0.8928157",
"0.8928157",
"0.8915375",
"0.8846071",
"0.88394916",
... | 0.8438283 | 38 |
Return if the cover is closed. | def SEEh(YKHO):
return YKHO.current_cover_position <= 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SEEh(YKHO) -> bool:\n return YKHO.get_cover_state() == ovfH.CLOSED",
"def SEEh(YKHO):\n if YKHO.current_cover_position is None:\n return None\n if YKHO.current_cover_position > 0:\n return False\n return True",
"def SEEh(YKHO) -> bool | None:\n if YKHO.current_cover_position is... | [
"0.8674357",
"0.8581903",
"0.8514324",
"0.83912706",
"0.8091718",
"0.78868335",
"0.7867775",
"0.77911067",
"0.77088606",
"0.76900125",
"0.762978",
"0.76188684",
"0.75890225",
"0.7524626",
"0.7510817",
"0.75064564",
"0.7499444",
"0.7487342",
"0.7457982",
"0.7421807",
"0.742115... | 0.85929483 | 1 |
Stop the moving of this device. | def S0np(YKHO, **B2fa) -> None:
vzeF.info('Switchbot to stop %s...', YKHO._mac)
'Stop curtain'
if YKHO._device.stop():
YKHO._last_run_success = True
else:
YKHO._last_run_success = False | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JCyR(YKHO):\n YKHO.moveControl.stopMovement()",
"def hmNt(YKHO):\n YKHO.surface_move_motor.stop()\n return True",
"def JCyR(YKHO):\n YKHO.moving = False",
"def JCyR(YKHO):\n YKHO.moving = False",
"def AwU4(YKHO):\n YKHO.__move = False\n YKHO.__moveHorizontal = None\n YKHO.__move... | [
"0.8514435",
"0.82389104",
"0.82094955",
"0.82029104",
"0.80303663",
"0.8030122",
"0.79023373",
"0.7881904",
"0.7845299",
"0.7815272",
"0.7786754",
"0.773324",
"0.7690105",
"0.7662369",
"0.76091594",
"0.75982034",
"0.75619364",
"0.7559508",
"0.753385",
"0.74783516",
"0.738564... | 0.0 | -1 |
Convert masked values in data to NaNs. | def UrRt(SRYB, a1PO, k0GY):
if oyIN.ma.is_masked(SRYB):
SRYB = oyIN.NaN
if k0GY == 0:
print()
k0GY += 1
print('detect masked value at ' + str(a1PO) + ', convert to NaN')
return (SRYB, k0GY) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Civ8(nPrm: ArrayLike) -> oyIN.ndarray:\n if oyIN.ma.isMaskedArray(nPrm):\n if nPrm.dtype.char not in oyIN.typecodes['Float']:\n nPrm = fHeP.asanyarray(nPrm, dtype=float)\n nPrm = nPrm.filled(oyIN.nan)\n return nPrm",
"def rBQx(nPrm):\n WKvO = oyIN.arange(nPrm.size)\n AYLA... | [
"0.8082927",
"0.74290794",
"0.7211262",
"0.71906567",
"0.7165305",
"0.70745647",
"0.70372736",
"0.6994898",
"0.69828916",
"0.69696605",
"0.6937058",
"0.6927832",
"0.6834736",
"0.680116",
"0.67873204",
"0.6775866",
"0.6767167",
"0.6752439",
"0.67502606",
"0.6733241",
"0.673171... | 0.67205083 | 22 |