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 the northernmost latitude (y) value of this box | def GsVy(YKHO):
return YKHO.north_west.ns | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DgzE(YKHO):\n WKvO, LVAh = YKHO.lonlat2xy(YKHO.longitude, YKHO.latitude)\n return LVAh",
"def MTfP(YKHO):\n return YKHO.position.get_y()",
"def fFeI(YKHO):\n return YKHO.B",
"def p5ad(YKHO):\n WKvO, LVAh = YKHO.lonlat2xy(YKHO.longitude, YKHO.latitude)\n return WKvO",
"def nJJg(YKHO):\... | [
"0.8173037",
"0.7091199",
"0.706884",
"0.7043943",
"0.70298046",
"0.68950087",
"0.67898667",
"0.67452896",
"0.6715541",
"0.66612226",
"0.6626793",
"0.6618318",
"0.6563036",
"0.6499221",
"0.6489857",
"0.64711374",
"0.6422164",
"0.642039",
"0.64178944",
"0.63988525",
"0.6396692... | 0.0 | -1 |
Returns the southernmost latitude (y) value of this box | def b5if(YKHO):
return YKHO.south_east.ns | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DgzE(YKHO):\n WKvO, LVAh = YKHO.lonlat2xy(YKHO.longitude, YKHO.latitude)\n return LVAh",
"def p5ad(YKHO):\n WKvO, LVAh = YKHO.lonlat2xy(YKHO.longitude, YKHO.latitude)\n return WKvO",
"def LVAh(YKHO):\n return YKHO.coords[1]",
"def LVAh(YKHO):\n return YKHO._coords[1]",
"def yDCK(YKHO)... | [
"0.7226008",
"0.71624655",
"0.70173377",
"0.69554937",
"0.69368523",
"0.6747194",
"0.6746168",
"0.67419887",
"0.672914",
"0.6726784",
"0.667575",
"0.66624534",
"0.66440904",
"0.6623553",
"0.65987766",
"0.65948105",
"0.65867144",
"0.65790206",
"0.6526591",
"0.64819723",
"0.642... | 0.5992402 | 83 |
Shows your profile if it exists | async def fix_bws_rank(OaeV):
CBIr = WxZ7(OaeV.author.id)
if CBIr is None:
await OaeV.send(f'You are not registered as someone.')
return
else:
bGrB, SSfI, fdMZ, LpXX, vxW9, mn17, O_Lh = CBIr
Q1PJ = ZOrr.Embed(description=f'**▸Rank:** {fdMZ}\n**▸BWS Rank:** {LpXX}\n**▸Badges:*... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def z39Z():\n gFsc = lyxB(c5ow.id, c5ow)\n if gFsc is not None:\n CBIr, yKDG, Pw3N = gFsc\n return n_ch('profile.html', profile=CBIr, followers=yKDG, following=Pw3N, os_projects=[])\n return eTsH(404)",
"def SGll():\n if tQkc in cuiw:\n return TvZl('/profile/detail.html')\n el... | [
"0.7245018",
"0.723895",
"0.7061014",
"0.7036423",
"0.6982154",
"0.6870462",
"0.6833645",
"0.67211664",
"0.66525596",
"0.6636437",
"0.659003",
"0.6581685",
"0.6580831",
"0.65781265",
"0.65669817",
"0.65452135",
"0.65230167",
"0.64990133",
"0.64835083",
"0.64659387",
"0.646411... | 0.0 | -1 |
Calculate the at risk group of all patients. For every patient i, this function returns the index of the first patient who died after i, after sorting the patients w.r.t. time of death. Refer to the definition of Cox proportional hazards log likelihood for | def Dx61(Kt_s, LTX_, EcVT=None):
jbXL = list(Kt_s)
Kt_s = oyIN.asarray(jbXL).astype('float64')
T4Wy = oyIN.argsort(Kt_s)
c440 = Kt_s[T4Wy]
JTj5 = oyIN.asarray([list(c440).index(WKvO) for WKvO in c440]).astype('int32')
Kt_s = oyIN.asarray(c440)
LTX_ = LTX_[T4Wy]
if EcVT is not None:
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zmnR(hAVj) -> rLdf.DataFrame:\n aLCD = oiW5(hAVj)\n return aLCD[aLCD['surgical'] == 1]",
"def v35Q(qKgy):\n LinX = []\n fGdZ = []\n GOKj = None\n for QyVM, J9Sm in qKgy.iterrows():\n vsK8 = False\n if J9Sm.asexual_density > 0:\n vsK8 = True\n elif J9Sm.gameto... | [
"0.501897",
"0.50003844",
"0.49462783",
"0.49183226",
"0.48094335",
"0.48047066",
"0.47480386",
"0.47249696",
"0.471031",
"0.468966",
"0.46893495",
"0.46668226",
"0.46274948",
"0.45957595",
"0.45942608",
"0.45904917",
"0.45726103",
"0.45618743",
"0.4560369",
"0.4558646",
"0.4... | 0.0 | -1 |
Checks if the request comes from a user that is admin. | def flSK():
try:
D3lj = yXnH(QePW.headers.get('Authorization')[7:])['identity']
VEQJ = JQkC.query.filter_by(email=D3lj).first()
except IndexError:
return _ef9('User is not an admin')
if VEQJ is None:
return _ef9('User is not an admin') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QPh5(YKHO, QePW):\n rJDA = QePW.params.get(YKHO.api_field, None)\n if QePW.user is None:\n CBIr = YKHO.user_fetcher(api_key=rJDA)\n else:\n CBIr = QePW.user\n if CBIr is not None and CBIr.is_admin:\n QePW.user = CBIr\n return True",
"def MtA2(YKHO, YEnM):\n try:\n ... | [
"0.8841757",
"0.8219326",
"0.8134677",
"0.8120395",
"0.81087875",
"0.81007725",
"0.81007725",
"0.8096001",
"0.80904895",
"0.8083905",
"0.8027866",
"0.8027228",
"0.7900616",
"0.789331",
"0.78927815",
"0.78804296",
"0.78788596",
"0.78722423",
"0.78449744",
"0.7796504",
"0.77827... | 0.6944349 | 81 |
Return the maximum ADC value, used for scaling. | def aohu(YKHO):
return YKHO.MAX_VALUE | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ZfiU(YKHO):\n return YKHO['cmax']",
"def ZfiU(YKHO):\n return YKHO['cmax']",
"def X4Qf(YKHO) -> float:\n return l_wm",
"def BfFQ(YKHO):\n bQ6z = max(YKHO.values)\n return bQ6z",
"def bQ6z(YKHO) -> float:\n return _4fj",
"def bQ6z(YKHO) -> int:\n return YKHO.__max_value",
"def q... | [
"0.75562584",
"0.7553085",
"0.7552735",
"0.74330145",
"0.741477",
"0.73668665",
"0.7273102",
"0.7244153",
"0.72127336",
"0.72092843",
"0.7173466",
"0.7155371",
"0.7136926",
"0.71156573",
"0.70434994",
"0.7037464",
"0.7036463",
"0.7012468",
"0.7000745",
"0.69960725",
"0.696182... | 0.6983538 | 20 |
Return the minimum ADC value, used for scaling. | def XaWZ(YKHO):
return YKHO.MIN_VALUE | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Kx2j(YKHO) -> float:\n return aXpi",
"def dgIT(YKHO) -> float:\n return znFd",
"def _iNt(YKHO) -> float:\n return YKHO._config[qkZB]",
"def min(YKHO) -> float:\n return eQSh.min(YKHO)",
"def HUxX(YKHO):\n try:\n vELP = min(YKHO.clr_sample) - 0.01\n except:\n vELP = 0\n ... | [
"0.74220705",
"0.7348584",
"0.7188209",
"0.70937306",
"0.7077449",
"0.707502",
"0.70294356",
"0.7028129",
"0.70190513",
"0.7012942",
"0.70107085",
"0.69891375",
"0.69365716",
"0.69323313",
"0.6881551",
"0.68442124",
"0.67836374",
"0.67836374",
"0.67711663",
"0.67711663",
"0.6... | 0.6862799 | 15 |
Set the range for the EXT trigger channel. This is only implemented for PS4000 series devices where the only acceptable values for VRange are 0.5 or 5.0. | def XR5g(YKHO, zQ28=0.5):
kDQc = None
for ZfUD in YKHO.CHANNEL_RANGE:
if oyIN.isclose(ZfUD['rangeV'], zQ28):
kDQc = ZfUD
break
if kDQc is None:
raise ValueError('Provided VRange is not valid')
YKHO._lowLevelSetExtTriggerRange(kDQc['apivalue']) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Mue8(YKHO, PNNh):\n YKHO.bus.write_byte_data(YKHO.deviceaddress, YKHO.accel_config, 0)\n YKHO.bus.write_byte_data(YKHO.deviceaddress, YKHO.accel_config, PNNh)",
"def Mue8(YKHO, PNNh):\n YKHO.bus.write_byte_data(YKHO.address, YKHO.ACCEL_CONFIG, 0)\n YKHO.bus.write_byte_data(YKHO.address, YKHO.ACCE... | [
"0.6514397",
"0.6509844",
"0.646073",
"0.6149011",
"0.61339295",
"0.6062431",
"0.60090643",
"0.59642726",
"0.59495276",
"0.593697",
"0.5906719",
"0.58192825",
"0.5766832",
"0.5634188",
"0.5579621",
"0.5547643",
"0.5547073",
"0.55299973",
"0.5518985",
"0.5503746",
"0.5496144",... | 0.8573255 | 0 |
Return connected units as serial numbers as list of strings. | def wJHs(YKHO):
return YKHO._lowLevelEnumerateUnits() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def A8Im():\n UHFx = QO9O()\n zNig = QO9O(1023)\n VAO0 = (Gaq5 * zNig.value)()\n iE7H = 'windll' if fjEm else 'cdll'\n lyVn = Tcyr('ps5000a', iE7H)\n Aofo = lyVn.lib.ps5000aEnumerateUnits(dWW6(UHFx), dWW6(VAO0), dWW6(zNig))\n if Aofo != zRXI:\n if Aofo == x0x6:\n QGg5, YXxD =... | [
"0.63199675",
"0.6009037",
"0.5999887",
"0.5953307",
"0.5913185",
"0.5901766",
"0.5872697",
"0.5872697",
"0.585725",
"0.5814489",
"0.5787047",
"0.5756824",
"0.5730717",
"0.570653",
"0.57064074",
"0.5705864",
"0.5690127",
"0.5667687",
"0.565771",
"0.56302893",
"0.56248766",
... | 0.0 | -1 |
Set logging level according to whatever value is stored in the environment variable. Order of "if" checks is prioritized by anticipated frequency | def f8MA(LqY9=None, UND1='LOGGING_LEVEL'):
bo34 = G9jH.getLogger()
ABDL = Hy7s.environ.get(UND1) if UND1 else LqY9
if ABDL == 'INFO':
bo34.setLevel(G9jH.INFO)
elif ABDL == 'ERROR':
bo34.setLevel(G9jH.ERROR)
elif ABDL == 'WARNING':
bo34.setLevel(G9jH.WARNING)
elif ABDL == ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bi51(YKHO) -> 'Logger':\n zKTY = ['PYFUNCEBLE_DEBUG_LVL', 'PYFUNCEBLE_LOGGING_LVL']\n WIK8 = inme()\n qiTu = False\n for IH1p in zKTY:\n if WIK8.set_name(IH1p).exists():\n YKHO.min_level = WIK8.get_value()\n qiTu = True\n break\n if not qiTu:\n if E... | [
"0.67597663",
"0.6548691",
"0.6503005",
"0.6344647",
"0.6207006",
"0.61388904",
"0.61005825",
"0.60507625",
"0.6049592",
"0.6042728",
"0.598542",
"0.59827876",
"0.59588456",
"0.5952133",
"0.58999264",
"0.5837111",
"0.58362633",
"0.5816679",
"0.5806134",
"0.580072",
"0.5796609... | 0.70686895 | 0 |
Initialize charging station connection. | def FIMM(YKHO, ylhb, GWuV: ChargingStationInfo, lGbz=None, yYcw: bool=True, QKkf: int=5, o8b4: int=1) -> None:
YKHO._loop = V7ok.get_event_loop() if lGbz is None else lGbz
YKHO._keba = ylhb
YKHO.device_info = GWuV
YKHO.data = {}
YKHO._callbacks = []
YKHO._refresh_interval = max(QKkf, 5)
YKHO... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OM8D(YKHO):\n YKHO.flush()\n print('Initializing sensor...')\n try:\n YKHO.get_sample()\n print('Initialization successful')\n except:\n print('Initialization failed. Please disconnect and reconnect sensor.')",
"async def init(YKHO):\n bo34.info('Init device: %s', YKHO._se... | [
"0.6642998",
"0.643647",
"0.63186747",
"0.6303991",
"0.6227921",
"0.6211244",
"0.6181869",
"0.61746716",
"0.61621594",
"0.6158604",
"0.6139265",
"0.6116205",
"0.6094739",
"0.60852104",
"0.6042763",
"0.604232",
"0.5992218",
"0.5952974",
"0.5932269",
"0.5930774",
"0.59260815",
... | 0.5529921 | 95 |
Unlock the socket. For this command you have to disable the charging process first. Afterwards you can unlock the socket. | async def unlock_socket(YKHO, **B2fa) -> None:
await YKHO._send('unlock') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kgS3(YKHO):\n YKHO.socket.shutdown(GGmw.SHUT_RDWR)",
"async def async_unlock(YKHO, **B2fa: Any) -> None:\n if not await YKHO._node.secure_unlock():\n raise xDmq(f'Unable to unlock device {YKHO._node.address}')",
"def Q4ix(YKHO, Gcbu):\n AiF7.lockf(Gcbu, AiF7.LOCK_UN)",
"def H9zv(YKHO):\n ... | [
"0.6802666",
"0.67976046",
"0.63873225",
"0.60683",
"0.60019237",
"0.59823465",
"0.596635",
"0.5950885",
"0.5916946",
"0.58824915",
"0.58802664",
"0.5873205",
"0.58641315",
"0.5857665",
"0.5841081",
"0.58273053",
"0.5826547",
"0.58191764",
"0.580191",
"0.5789088",
"0.57618517... | 0.872766 | 0 |
Creates and saves a User with the given email, username and password. | def lYUQ(YKHO, D3lj, jTXt):
if not D3lj:
raise ValueError('Users must have an email address')
if not jTXt:
raise ValueError('Password is required')
CBIr = YKHO.model(email=YKHO.normalize_email(D3lj))
CBIr.set_password(jTXt)
CBIr.save(using=YKHO._db)
return CBIr | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xWi2(YKHO, D3lj, jTXt, NtEF, **wdCM):\n if not D3lj:\n raise ValueError('The given email must be set')\n if not NtEF:\n raise ValueError('The given username must be set')\n D3lj = YKHO.normalize_email(D3lj)\n CBIr = YKHO.model(email=D3lj, username=str.strip(NtEF), **wdCM)\n CBIr.se... | [
"0.8635576",
"0.84807277",
"0.8440991",
"0.8421272",
"0.8409197",
"0.8402626",
"0.8398233",
"0.8383942",
"0.8354441",
"0.83158565",
"0.8307883",
"0.82789755",
"0.82615095",
"0.82203734",
"0.82171905",
"0.8194278",
"0.81932116",
"0.8185191",
"0.8171665",
"0.8171403",
"0.815163... | 0.0 | -1 |
Creates and saves a User with the given email, username and password. | def Zp54(YKHO, D3lj, jTXt):
CBIr = YKHO.create_user(email=D3lj, password=jTXt)
CBIr.is_staff = True
CBIr.is_teacher = True
CBIr.save(using=YKHO._db)
from assignments.models import StaffDetail
StaffDetail.objects.create(staff_id='STF-%s' % TJC9(), user=CBIr, staff_role='MAN')
return CBIr | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xWi2(YKHO, D3lj, jTXt, NtEF, **wdCM):\n if not D3lj:\n raise ValueError('The given email must be set')\n if not NtEF:\n raise ValueError('The given username must be set')\n D3lj = YKHO.normalize_email(D3lj)\n CBIr = YKHO.model(email=D3lj, username=str.strip(NtEF), **wdCM)\n CBIr.se... | [
"0.8635576",
"0.84807277",
"0.8440991",
"0.8421272",
"0.8409197",
"0.8402626",
"0.8398233",
"0.8383942",
"0.8354441",
"0.83158565",
"0.8307883",
"0.82789755",
"0.82615095",
"0.82203734",
"0.82171905",
"0.8194278",
"0.81932116",
"0.8185191",
"0.8171665",
"0.8171403",
"0.815163... | 0.0 | -1 |
Return True if a number is prime and False otherwise. | def T1qg(exwG):
if exwG == 1:
return False
else:
YRbF = 2
while YRbF < exwG:
if exwG % YRbF == 0:
return False
YRbF += 1
return True | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def T1qg(FGW3):\n if FGW3 < 2:\n return False\n elif FGW3 == 2:\n return True\n elif FGW3 % 2 == 0:\n return False\n else:\n for WKvO in range(2, FGW3):\n if FGW3 % WKvO == 0:\n return False\n else:\n return True",
"def GiUy(f813... | [
"0.8282519",
"0.8246728",
"0.82139134",
"0.81972986",
"0.81892836",
"0.8171325",
"0.8133826",
"0.80697376",
"0.80539393",
"0.80282617",
"0.80153066",
"0.80120593",
"0.79991156",
"0.7992172",
"0.79767275",
"0.79750526",
"0.7954117",
"0.7931414",
"0.7926193",
"0.792192",
"0.791... | 0.75026804 | 49 |
Return the next prime greater than n. | def UtWo(exwG):
YRbF = exwG + 1
while not T1qg(YRbF):
YRbF += 1
return YRbF | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dZ_g(exwG):\n Aofo = exwG + (1 if exwG % 2 == 0 else 2)\n while not T1qg(Aofo):\n Aofo += 2\n return Aofo",
"def XtR7(exwG):\n return next(uOgj(DzI6(), exwG - 1, None), None)",
"def hHKe(exwG):\n return (r845 for YRbF, r845 in enumerate(k954()) if YRbF == exwG - 1).next()",
"def XtR... | [
"0.7881514",
"0.75169104",
"0.7296439",
"0.7261415",
"0.7177585",
"0.70906055",
"0.7077313",
"0.6956592",
"0.68918353",
"0.68890387",
"0.68747556",
"0.6780663",
"0.6778611",
"0.6707346",
"0.67064214",
"0.66767657",
"0.66705596",
"0.66652083",
"0.66429394",
"0.6612685",
"0.660... | 0.7365508 | 2 |
Returns whether the Perfect Piggy diceswapping rule should occur. | def _Vfz(_qUB):
return (Erwk(_qUB) or i_go(_qUB)) and _qUB != 1 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def gV00(YKHO):\n M81Z = False\n if YKHO.my_score == YKHO.opponent_score:\n M81Z = True\n YV4p = YKHO.steps_available(YKHO.loc)\n IQ6M = YKHO.steps_available(YKHO.opponent_loc)\n if YV4p == 0 and IQ6M == 0 and M81Z:\n return True\n else:\n YiU0 = YKHO.penalty_score\n i... | [
"0.6279453",
"0.6268443",
"0.60206103",
"0.5947934",
"0.5912243",
"0.5875321",
"0.58732736",
"0.58707154",
"0.5869803",
"0.5867973",
"0.58345556",
"0.5815252",
"0.5800191",
"0.5795617",
"0.5784604",
"0.5784275",
"0.5780927",
"0.5770483",
"0.57356024",
"0.5722959",
"0.5718242"... | 0.64312756 | 0 |
Return the other player, for a player PLAYER numbered 0 or 1. >>> other(0) 1 >>> other(1) 0 | def Elif(oyg0):
return 1 - oyg0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QzY_(Emd4, oyg0):\n return 0 if oyg0 == 1 else 1",
"def wNmq(Emd4, oyg0):\n return 0 if oyg0 == 1 else 1",
"def wNmq(YKHO, oyg0):\n if oyg0 == YKHO.__opponent:\n return YKHO.__pid\n else:\n return YKHO.__opponent",
"def t7fg(YKHO):\n return eHpk.Engine.game_manager.players[(Y... | [
"0.8185557",
"0.81336266",
"0.7927831",
"0.7878474",
"0.771178",
"0.70963603",
"0.6847596",
"0.68090963",
"0.66224766",
"0.66224766",
"0.6581127",
"0.64776134",
"0.6458407",
"0.6427077",
"0.638957",
"0.6376942",
"0.6365836",
"0.6365836",
"0.63378143",
"0.62321705",
"0.6201012... | 0.7806004 | 6 |
Returns an array of strings for use by speech and braille that represent the checked state of the object. This is typically for check boxes that are in a table. An empty array will be returned if this is not a checkable cell. | def YS0x(YKHO, YEnM, **qIxc):
Aofo = []
if YKHO._script.utilities.hasMeaningfulToggleAction(YEnM):
uze1 = YKHO._overrideRole(NUD9.ROLE_CHECK_BOX, qIxc)
Aofo.extend(YKHO.generate(YEnM, **qIxc))
YKHO._restoreRole(uze1, qIxc)
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def eT38(YKHO, YEnM, **qIxc):\n Aofo = []\n if not qIxc.get('mode', None):\n qIxc['mode'] = YKHO._mode\n qIxc['stringType'] = 'checkbox'\n ikfC = YKHO._script.formatting.getString(**qIxc)\n QTBn = YEnM.getState()\n if QTBn.contains(NUD9.STATE_CHECKED):\n Aofo.append(ikfC[1])\n el... | [
"0.78597516",
"0.75153136",
"0.715974",
"0.70708823",
"0.68852395",
"0.65728337",
"0.64509827",
"0.64307785",
"0.6145154",
"0.60856634",
"0.6018546",
"0.5987553",
"0.592451",
"0.5891737",
"0.5845161",
"0.5843238",
"0.5801463",
"0.5784729",
"0.56994337",
"0.5655949",
"0.564524... | 0.7846166 | 1 |
Returns an array of strings for use by speech and braille for the toggle value of a toggle in a table cell that has a special 2 child pattern that we run into. Otherwise, an empty array is returned. | def rehs(YKHO, YEnM, **qIxc):
Aofo = []
if YEnM.childCount == 2:
O_Kf = []
pMPk = [False, False]
for YRbF, aUGN in enumerate(YEnM):
if YKHO._script.utilities.hasMeaningfulToggleAction(aUGN):
pMPk[YRbF] = True
break
if pMPk[0] and (not p... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def pKm_(YKHO, YEnM, **qIxc):\n Aofo = []\n if YEnM.childCount == 2:\n O_Kf = []\n pMPk = [False, False]\n for YRbF, aUGN in enumerate(YEnM):\n if YKHO._script.utilities.hasMeaningfulToggleAction(aUGN):\n pMPk[YRbF] = True\n break\n if pMPk... | [
"0.64175016",
"0.58864707",
"0.5802288",
"0.54427946",
"0.5432684",
"0.5315806",
"0.5289848",
"0.52799964",
"0.5205643",
"0.51921636",
"0.51733345",
"0.5110673",
"0.51007503",
"0.50254416",
"0.4996558",
"0.49788553",
"0.49487627",
"0.49424136",
"0.49372393",
"0.4926295",
"0.4... | 0.6583316 | 0 |
Computes the expectation of the weight initialization squared value. Weights are drawn from an uniform distribution. | def sqFB(IddF):
iJP1 = 1.0 / epAf.sqrt(IddF)
return 1 / 3 * iJP1 ** 2 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dIoi(YKHO):\n YKHO.weights = [oyIN.random.normal(0, 1 / oyIN.sqrt(WKvO), (WKvO, LVAh)) for WKvO, LVAh in list(zip(YKHO.structure[1:], YKHO.structure[:-1]))]",
"def Ixt2():\n return oyIN.random.uniform(-1, 1)",
"def vB93(YKHO):\n YKHO.w = oyIN.random.randn(YKHO.D) / oyIN.sqrt(YKHO.D)",
"def C1Tw(... | [
"0.6684415",
"0.66808736",
"0.6669938",
"0.6464006",
"0.6374624",
"0.63681585",
"0.6343656",
"0.6338369",
"0.6320977",
"0.6296438",
"0.6271583",
"0.61881447",
"0.61837167",
"0.6142952",
"0.6064868",
"0.6063742",
"0.6063742",
"0.60503805",
"0.60259485",
"0.59808606",
"0.596227... | 0.0 | -1 |
Returns copy of self.table such that the largest value is in the first (upper left) cell. | def ia2z(YKHO):
tyNF = [list(YKHO.table[0]), list(YKHO.table[1])]
while tyNF[0][0] != YKHO.max_value:
tyNF = YKHO._rotate_cw(tyNF)
return tyNF | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def JBxi():\n return Nk6w",
"def q1NN(tyNF):\n return max(((Ty9i, G1Hx) for G1Hx, Ty9i in tyNF.iteritems()))[1]",
"def BEuN(YKHO):\n VmPb = next(YKHO.cells)\n if YKHO.min_row == YKHO.max_row:\n YKHO.min_col += 1\n else:\n YKHO.min_row += 1\n return VmPb",
"def OmFP(YKHO):\n ... | [
"0.63561314",
"0.60624194",
"0.59959126",
"0.59558934",
"0.5705076",
"0.56326026",
"0.5632019",
"0.56218106",
"0.5601197",
"0.5600753",
"0.5584648",
"0.5578649",
"0.5559997",
"0.55514497",
"0.5548755",
"0.5543374",
"0.552857",
"0.55207753",
"0.5512766",
"0.55022424",
"0.54935... | 0.5584742 | 10 |
Assert that the endpoint returns 200. | def KlO0(cuiw, x0hE, DvJO, P4t4):
im04 = x0hE.get('/api/v1/codes/errors', headers={})
assert im04.status_code == 200
assert len(im04.json.get('codes')) > 0 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xi2t(YKHO, geh0):\n YKHO.assertEqual(geh0.status_code, 200)",
"def us5f(YKHO):\n pass",
"def MEXE(d4y1):\n Mkmy = d4y1.get(path='/')\n assert Mkmy.status_code == 200",
"def akZS(x0hE):\n bD7m = '/api/v1/calls/'\n geh0 = x0hE.get(bD7m)\n assert geh0.status_code == jGRS.HTTP_200_OK",
... | [
"0.82210654",
"0.8013816",
"0.7946608",
"0.7903406",
"0.7885061",
"0.7880224",
"0.77164006",
"0.77164006",
"0.7668261",
"0.76476663",
"0.7645023",
"0.7640879",
"0.7640879",
"0.7563328",
"0.75562114",
"0.752852",
"0.752852",
"0.752852",
"0.752852",
"0.752852",
"0.752852",
"0... | 0.0 | -1 |
Assert that the endpoint returns 200. | def Ihsn(cuiw, x0hE, DvJO, P4t4):
im04 = x0hE.get('/api/v1/codes/xxxx', headers={})
assert im04.json.get('codes') is None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xi2t(YKHO, geh0):\n YKHO.assertEqual(geh0.status_code, 200)",
"def us5f(YKHO):\n pass",
"def MEXE(d4y1):\n Mkmy = d4y1.get(path='/')\n assert Mkmy.status_code == 200",
"def akZS(x0hE):\n bD7m = '/api/v1/calls/'\n geh0 = x0hE.get(bD7m)\n assert geh0.status_code == jGRS.HTTP_200_OK",
... | [
"0.82210654",
"0.8013816",
"0.7946608",
"0.7903406",
"0.7885061",
"0.7880224",
"0.77164006",
"0.77164006",
"0.7668261",
"0.76476663",
"0.7645023",
"0.7640879",
"0.7640879",
"0.7563328",
"0.75562114",
"0.752852",
"0.752852",
"0.752852",
"0.752852",
"0.752852",
"0.752852",
"0... | 0.0 | -1 |
Assert that the endpoint returns 200. | def JnwJ(cuiw, x0hE, DvJO, P4t4):
im04 = x0hE.get('/api/v1/codes/errors', headers={})
Wxnj = im04.json.get('codes')[0].get('type')
im04 = x0hE.get(f'/api/v1/codes/errors/{Wxnj}', headers={})
assert im04.json.get('type') == Wxnj | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xi2t(YKHO, geh0):\n YKHO.assertEqual(geh0.status_code, 200)",
"def us5f(YKHO):\n pass",
"def MEXE(d4y1):\n Mkmy = d4y1.get(path='/')\n assert Mkmy.status_code == 200",
"def akZS(x0hE):\n bD7m = '/api/v1/calls/'\n geh0 = x0hE.get(bD7m)\n assert geh0.status_code == jGRS.HTTP_200_OK",
... | [
"0.82210654",
"0.8013816",
"0.7946608",
"0.7903406",
"0.7885061",
"0.7880224",
"0.77164006",
"0.77164006",
"0.7668261",
"0.76476663",
"0.7645023",
"0.7640879",
"0.7640879",
"0.7563328",
"0.75562114",
"0.752852",
"0.752852",
"0.752852",
"0.752852",
"0.752852",
"0.752852",
"0... | 0.0 | -1 |
Assert that the endpoint returns 200. | def howd(cuiw, x0hE, DvJO, P4t4, Wxnj: Code):
im04 = x0hE.get(f'/api/v1/codes/{Wxnj.value}', headers={})
assert im04.status_code == 200 | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def xi2t(YKHO, geh0):\n YKHO.assertEqual(geh0.status_code, 200)",
"def us5f(YKHO):\n pass",
"def MEXE(d4y1):\n Mkmy = d4y1.get(path='/')\n assert Mkmy.status_code == 200",
"def akZS(x0hE):\n bD7m = '/api/v1/calls/'\n geh0 = x0hE.get(bD7m)\n assert geh0.status_code == jGRS.HTTP_200_OK",
... | [
"0.82210654",
"0.8013816",
"0.7946608",
"0.7903406",
"0.7885061",
"0.7880224",
"0.77164006",
"0.77164006",
"0.7668261",
"0.76476663",
"0.7645023",
"0.7640879",
"0.7640879",
"0.7563328",
"0.75562114",
"0.752852",
"0.752852",
"0.752852",
"0.752852",
"0.752852",
"0.752852",
"0... | 0.0 | -1 |
Get a temp directory available of all the tests | def Baw8(Emd4) -> None:
Emd4.tempdir = gbPf.TemporaryDirectory()
Emd4.path = Emd4.tempdir.name | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wQf6():\n return gbPf.mkdtemp()",
"def LqMp(YKHO):\n return YKHO.useFixture(vRCC.TempDir())",
"def U9hK(YKHO):\n pmON = gbPf.gettempdir()\n return Hy7s.path.join(pmON, 'parquet-index-test-' + str(qxeD.uuid4()))",
"def U9hK():\n return gbPf.mkdtemp()",
"def OgLc(YKHO):\n pass",
"def ... | [
"0.8000417",
"0.78809375",
"0.7710799",
"0.77102053",
"0.7708421",
"0.7631405",
"0.75626993",
"0.7547986",
"0.7506301",
"0.74639815",
"0.74589896",
"0.74545664",
"0.7452939",
"0.74451184",
"0.73512125",
"0.7318311",
"0.731303",
"0.7265502",
"0.71361846",
"0.71241546",
"0.7094... | 0.0 | -1 |
After each test, delete the temporary directory | def tBIc(YKHO):
YKHO.tempdir.cleanup() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tBIc(YKHO):\n print('\\nDeleting temporary files...\\n')\n try:\n RDuA.rmtree(PiBm)\n except OSError:\n pass",
"def tBIc(YKHO):\n RDuA.rmtree(YKHO.temp_dir_path)",
"def tBIc(YKHO):\n RDuA.rmtree(YKHO.tempdir)",
"def tBIc(YKHO):\n if 'turbinia-test-tmp' in YKHO.tmp_dir:\n ... | [
"0.85222846",
"0.8487326",
"0.84253997",
"0.83541584",
"0.8202493",
"0.81914693",
"0.81845844",
"0.8141798",
"0.813982",
"0.81107527",
"0.81004846",
"0.806003",
"0.8053699",
"0.8045086",
"0.8044019",
"0.8026089",
"0.8026089",
"0.80070233",
"0.7960108",
"0.79100037",
"0.788932... | 0.8163513 | 7 |
Add enemy to enemy list | def zNvx(mWFP):
with open('data.json', 'r') as nUeQ:
nPrm = qQXR.load(nUeQ)
nPrm['enemy_data']['names'].append(mWFP)
with open('data.json', 'w') as O3Ih:
qQXR.dump(nPrm, O3Ih, indent=4) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Kbzi(YKHO, icVf):\n if isinstance(icVf, lUw0):\n YKHO.enemy_list.append(icVf)\n YKHO.turn_order.add(icVf)\n elif all([isinstance(JjEH, lUw0) for JjEH in icVf]):\n for JjEH in icVf:\n YKHO.enemy_list.append(JjEH)\n YKHO.turn_order.add(JjEH)\n else:\n ra... | [
"0.75207627",
"0.7144573",
"0.69138473",
"0.6899743",
"0.6858339",
"0.67478573",
"0.66414505",
"0.6614225",
"0.6605368",
"0.65694636",
"0.6516147",
"0.6501377",
"0.64817476",
"0.6352639",
"0.6297114",
"0.6250094",
"0.61938816",
"0.6089914",
"0.60534513",
"0.60249007",
"0.5974... | 0.7245207 | 1 |
update the critics and actors of all the agents | def QdZT(YKHO, gGnb, EL1S):
W061, CWnR, XeOP, vOGg, YFaX, Khpc, _ins = gGnb
YWSi = YKHO.maddpg_agent[EL1S]
YWSi.critic_optimizer.zero_grad()
hb5a = YKHO.target_act(YFaX)
with ht2j.no_grad():
Bkxd = YWSi.target_critic(Khpc, hb5a.view(-1, 4))
LVAh = vOGg[:, EL1S].view(-1, 1) + YKHO.discoun... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cmwX(YKHO):\n for jzdc in YKHO.agents:\n HwXW(jzdc.target_actor, jzdc.actor, YKHO.tau)\n HwXW(jzdc.target_critic, jzdc.critic, YKHO.tau)\n YKHO.num_iteration += 1",
"def QdZT(YKHO):\n YKHO.reset()\n YWSi = YKHO.simulation.agent\n YKHO.mask = YWSi.active & YKHO.room.contains_point... | [
"0.7793435",
"0.62337434",
"0.5746579",
"0.57021135",
"0.56952703",
"0.5685467",
"0.5654011",
"0.5617586",
"0.55508715",
"0.55255216",
"0.5490698",
"0.54705274",
"0.5440514",
"0.54386806",
"0.54381484",
"0.5408061",
"0.53959286",
"0.5368262",
"0.5361991",
"0.53616476",
"0.534... | 0.55483985 | 9 |
Asks user to specify a city, month, and day to analyze. | def RxGd():
print("Hello! Let's explore some US bikeshare data!")
j5sA = str(input('Would you like to see data for Chicago, New York or Washington?\n').lower())
while j5sA not in OerS.keys():
j5sA = str(input('Sorry, it looks like an invalid input. Please try again: Chicago, New York or Washington?\... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NoUH(j5sA, x0eS, CjKC):\n print('The city you have entered is: ', j5sA)\n print('The month you have entered is: ', x0eS)\n print('The day you have entered is: ', CjKC)",
"def RxGd():\n j5sA = None\n x0eS = None\n CjKC = None\n while CjKC == None:\n j5sA = input('Please enter a cit... | [
"0.66714007",
"0.65354675",
"0.64593667",
"0.6374057",
"0.6348314",
"0.63097656",
"0.62868035",
"0.6259136",
"0.62316",
"0.62130964",
"0.62050414",
"0.6181105",
"0.6171822",
"0.61686903",
"0.6158568",
"0.61582303",
"0.61532456",
"0.61444426",
"0.6131269",
"0.610484",
"0.61025... | 0.0 | -1 |
Loads data for the specified city and filters by month and day if applicable. | def UlWi(j5sA, x0eS, CjKC):
jQ3Z = rLdf.read_csv(OerS[j5sA])
jQ3Z['Start Time'] = rLdf.to_datetime(jQ3Z['Start Time'])
jQ3Z['month'] = jQ3Z['Start Time'].dt.month
jQ3Z['weekday'] = jQ3Z['Start Time'].dt.weekday_name
jQ3Z['hour'] = jQ3Z['Start Time'].dt.hour
if x0eS != 'all':
x0eS = X_bn.... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UlWi(j5sA, x0eS, CjKC):\n jQ3Z = rLdf.read_csv(OerS[j5sA])\n jQ3Z['Start Time'] = rLdf.to_datetime(jQ3Z['Start Time'])\n jQ3Z['month'] = jQ3Z['Start Time'].dt.month\n jQ3Z['hour'] = jQ3Z['Start Time'].dt.hour\n jQ3Z['day_of_week'] = jQ3Z['Start Time'].dt.weekday_name\n if x0eS == 0 and CjKC =... | [
"0.81320685",
"0.8108889",
"0.8045821",
"0.8042514",
"0.80090284",
"0.80071104",
"0.79991937",
"0.7998333",
"0.7988789",
"0.797905",
"0.79737365",
"0.79610896",
"0.7956163",
"0.7947432",
"0.79463065",
"0.7908287",
"0.7908229",
"0.7904569",
"0.7900715",
"0.78930074",
"0.788921... | 0.78664976 | 23 |
Displays statistics on the most frequent times of travel. | def dWJR(jQ3Z):
print('\nCalculating The Most Frequent Times of Travel...\n')
print('-' * 40)
SWox = ITS7.time()
MQHq = jQ3Z[jQ3Z['month'] == jQ3Z['month'].mode()[0]]['month'].count()
BnJE = jQ3Z['month'].mode()[0]
print('\nThe most popular month is {}, which has {} total counts.'.format(BnJE, M... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dWJR(jQ3Z):\n print('\\nDisplaying the statistics on the most frequent times of travel...\\n')\n SWox = ITS7.time()\n hFPs = jQ3Z['Month'].mode()[0]\n print('For the selected filter, the month with the most travels is: ' + str(X_bn[hFPs - 1]).title() + '.')\n DSEJ = jQ3Z['Weekday'].mode()[0]\n ... | [
"0.80247396",
"0.80233026",
"0.7915788",
"0.78266186",
"0.7822246",
"0.78143597",
"0.77659196",
"0.7740343",
"0.773628",
"0.77344066",
"0.76867086",
"0.7668633",
"0.7651731",
"0.7644636",
"0.76399267",
"0.76367253",
"0.7625196",
"0.7623158",
"0.7612803",
"0.76002145",
"0.7583... | 0.72042453 | 69 |
Displays statistics on the most popular stations and trip. | def Huc_(jQ3Z):
print('\nCalculating The Most Popular Stations and Trip...\n')
SWox = ITS7.time()
PzFL = jQ3Z[jQ3Z['Start Station'] == jQ3Z['Start Station'].mode()[0]]['Start Station'].count()
_8rG = jQ3Z['Start Station'].mode()[0]
print('\nThe most popular start station is {}, which has {} total co... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Huc_(jQ3Z):\n print('\\nCalculating The Most Popular Stations and Trip...\\n')\n SWox = ITS7.time()\n print(_8rG(jQ3Z))\n print(oFx8(jQ3Z))\n print(_Ek3(jQ3Z))\n print('\\nThis took %s seconds.' % (ITS7.time() - SWox))\n print('-' * 40)",
"def Huc_(nPrm):\n print('\\nCalculating The M... | [
"0.7815675",
"0.7662213",
"0.7553417",
"0.74914914",
"0.74748665",
"0.7446617",
"0.7428588",
"0.74237514",
"0.74177027",
"0.7400495",
"0.7387161",
"0.7385634",
"0.73647535",
"0.735934",
"0.73566747",
"0.73548365",
"0.7351854",
"0.7351274",
"0.735057",
"0.73421645",
"0.7340198... | 0.68601453 | 90 |
Displays statistics on the total and average trip duration. | def kDMA(jQ3Z):
print('\nCalculating Trip Duration...\n')
SWox = ITS7.time()
jQ3Z['Trip Duration'] = jQ3Z['Trip Duration'].astype(oyIN.float64)
bJiw = str(qcWV.timedelta(seconds=jQ3Z['Trip Duration'].sum()))
print('\nThe total travel time is {}.'.format(bJiw))
n0t6 = str(qcWV.timedelta(seconds=j... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kDMA(nPrm):\n print('\\nCalculating Trip Duration...\\n')\n SWox = ITS7.time()\n DbBi = nPrm['Trip Duration'].sum()\n print('The Total Travel Time is {} Hours'.format(DbBi / 3600))\n IEfE = nPrm['Trip Duration'].mean()\n print('The Average Travel Time is {} Minutes'.format(IEfE / 60))\n pr... | [
"0.814274",
"0.8025143",
"0.80041367",
"0.79496753",
"0.7937415",
"0.79312176",
"0.7926815",
"0.7915187",
"0.79142886",
"0.7908032",
"0.79055744",
"0.7900715",
"0.7891682",
"0.78894734",
"0.7886722",
"0.78851086",
"0.7884266",
"0.7882474",
"0.78738385",
"0.78686154",
"0.78664... | 0.0 | -1 |
Function to return a tuple with the squae of a num and a string | def WV2t(G1Hx: str, Ty9i: Union[int, float]) -> AzJI[str, float]:
YqXz = (G1Hx, Ty9i * Ty9i)
return YqXz | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Mol0(ywwl: int) -> tuple:\n jtyf = str(ywwl)\n jzdc, Fg_i = ('', '')\n for YRbF in range(len(jtyf)):\n if jtyf[YRbF] == '4':\n jzdc += '2'\n Fg_i += '2'\n else:\n jzdc += str(jtyf[YRbF])\n Fg_i += '0'\n return (int(jzdc), int(Fg_i))",
"def... | [
"0.6646078",
"0.6228154",
"0.61565506",
"0.59388137",
"0.5852559",
"0.5832017",
"0.58082485",
"0.5801215",
"0.5766872",
"0.5740432",
"0.5685302",
"0.5649507",
"0.5627665",
"0.5614808",
"0.55979145",
"0.5584616",
"0.5544328",
"0.55387473",
"0.55262804",
"0.5523099",
"0.5498246... | 0.0 | -1 |
Retrieves a user entry by id | def NMoC(YKHO, **B2fa):
uJjO = B2fa['id']
CBIr = FYrf.User.get_by_id(uJjO)
if CBIr is None:
YKHO.abort(422, 'could not find user')
YKHO.set_response_view_model(DYke.User.view_contract())
YKHO.api_response = DYke.User.form(CBIr)
YKHO.send_response() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NMoC(YKHO, id):\n jbXL = LeQX.get_one_entry(id)\n return jbXL",
"def NMoC(id):\n return mv1M.query.filter_by(id=id).first()",
"def bt8D(YKHO, id):\n return YKHO.users.get(id)",
"def JuUv(YKHO, id):\n for CBIr in YKHO.users:\n if CBIr['id'] == id:\n return CBIr",
"def TK... | [
"0.8309573",
"0.8057501",
"0.80325854",
"0.8009222",
"0.7940538",
"0.7682704",
"0.76086646",
"0.75919694",
"0.75227076",
"0.7517773",
"0.7504012",
"0.7503571",
"0.74671954",
"0.74657494",
"0.74657494",
"0.74657494",
"0.74657494",
"0.7419156",
"0.741581",
"0.7412899",
"0.74097... | 0.0 | -1 |
Builds the Flask App | def Cc7Y():
P4t4 = WsL5.Flask('cnc-forge-api')
P4t4.api = mIW6.Api(P4t4)
with open('/opt/service/secret/redis.json', 'r') as JUQ3:
P4t4.redis = OeZe.Redis(charset='utf-8', decode_responses=True, **qQXR.loads(JUQ3.read()))
P4t4.api.add_resource(_ZGJ, '/health')
P4t4.api.add_resource(kJjR, '/f... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def C6M2(YKHO) -> L2w0:\n P4t4 = L2w0(YKHO.name, *YKHO.args, **YKHO.kwargs)\n P4t4 = YKHO.setup_app_config(P4t4)\n P4t4 = YKHO.add_app_headers(P4t4)\n P4t4 = YKHO.add_xsrf_error_handler(P4t4)\n return P4t4",
"def Ixpz(YKHO, mWFP):\n P4t4 = L2w0(mWFP)\n P4t4.add_url_rule('/ping', 'healthcheck... | [
"0.77231485",
"0.7603172",
"0.748624",
"0.72408855",
"0.7203377",
"0.71367025",
"0.7116849",
"0.7101528",
"0.7095095",
"0.70842695",
"0.7042892",
"0.7037099",
"0.70270205",
"0.69814086",
"0.69570893",
"0.69570714",
"0.6956612",
"0.69494325",
"0.6940777",
"0.69321066",
"0.6931... | 0.74496615 | 3 |
Remove the test config file. | def tBIc(YKHO):
z3xZ.delete_test_config() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tBIc(YKHO) -> None:\n Hy7s.remove(YZyJ.TEST_CONFIG)",
"def x0SS():\n RdPg.d(CGPs, 'Delete config file...')\n try:\n Hy7s.remove(u8az)\n except Hy7s.error as e:\n RdPg.e(CGPs, 'Delete config file%s error, reason:%s' % (u8az, tTpl))",
"def bjSb(YKHO):\n RDuA.rmtree(YKHO.test.user... | [
"0.82603157",
"0.7938341",
"0.75796455",
"0.7303897",
"0.72549134",
"0.7250045",
"0.7201434",
"0.7196431",
"0.71776867",
"0.7148807",
"0.71268976",
"0.7090882",
"0.7071481",
"0.70521754",
"0.7034664",
"0.70326316",
"0.70326316",
"0.7023845",
"0.6998058",
"0.69897544",
"0.6982... | 0.779682 | 2 |
finds minimum indices in an array | def v8eB(oWao):
YRbF, r845 = oyIN.unravel_index(oyIN.argmin(oWao), dims=oWao.shape)
return (YRbF, r845) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def WHwV(YKHO, qw7D):\n emQY = FfMS\n fk3S = None\n for YRbF in range(len(qw7D)):\n if qw7D[YRbF] < emQY:\n emQY = qw7D[YRbF]\n fk3S = YRbF\n return (emQY, fk3S)",
"def k_d9(ezWE):\n qzD7 = float('inf')\n EucI = -1\n for YRbF in range(len(ezWE)):\n if ezWE... | [
"0.7526155",
"0.7433892",
"0.73650557",
"0.73347956",
"0.73043925",
"0.7294479",
"0.72058755",
"0.71541744",
"0.71419907",
"0.7028905",
"0.6938305",
"0.68783945",
"0.6864014",
"0.68151575",
"0.6813339",
"0.676083",
"0.67506117",
"0.6743916",
"0.6729411",
"0.6728803",
"0.66797... | 0.67804635 | 15 |
Initialize the water_heater device. | def FIMM(YKHO, x0hE, qfpW):
YKHO._client = x0hE
YKHO._boiler = qfpW
YKHO._operation_list = list(JxGc) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def FIMM(YKHO, ajET, begE: Warmup4IEDevice, x0hE: WarmupClient):\n vzeF.info('Setting up Warmup Thermostat %s', begE.get_room_name())\n YKHO._device = begE\n YKHO._client = x0hE\n YKHO.attributes = {}\n YKHO._update_attributes_from_device()\n YKHO._current_temperature = begE.current_temperature\n... | [
"0.62667716",
"0.5942362",
"0.59006435",
"0.5740189",
"0.5737908",
"0.5720192",
"0.569426",
"0.5652093",
"0.56175846",
"0.5583131",
"0.55813503",
"0.55641305",
"0.5559214",
"0.55472535",
"0.5541044",
"0.5533628",
"0.55258596",
"0.5506846",
"0.54698575",
"0.5452834",
"0.544964... | 0.0 | -1 |
Return the device state attributes. | def R1i3(YKHO):
jbXL = YKHO._boiler.__dict__.items()
return {'status': {G1Hx: Ty9i for G1Hx, Ty9i in jbXL if G1Hx in FP3v}} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def R1i3(YKHO):\n return YKHO.attributes",
"def R1i3(YKHO):\n return YKHO._attributes",
"def R1i3(YKHO):\n return YKHO._attrs",
"def R1i3(YKHO):\n return YKHO.attr",
"def R1i3(YKHO):\n return YKHO.attr",
"def R1i3(YKHO):\n return YKHO._state_attrs",
"def R1i3(YKHO):\n return YKHO._... | [
"0.93173087",
"0.9245708",
"0.92207897",
"0.92147964",
"0.92147964",
"0.9210798",
"0.9210798",
"0.91909975",
"0.91909975",
"0.91909975",
"0.91909975",
"0.91909975",
"0.91909975",
"0.91909975",
"0.91909975",
"0.91909975",
"0.91909975",
"0.91909975",
"0.91909975",
"0.91909975",
... | 0.84394234 | 40 |
Return max valid temperature that can be set. | def eCok(YKHO):
return AU9g | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tb4q(YKHO):\n TKGt, wmQo = (lY0q.c_int(), lY0q.c_int())\n YKHO.lib.GetTemperatureRange(lY0q.pointer(TKGt), lY0q.pointer(wmQo))\n return wmQo.value",
"def Mvd7(YKHO) -> int:\n if YKHO.temperature_scale == 'C':\n return YKHO.locked_temp_max_c\n elif YKHO.temperature_scale == 'F':\n ... | [
"0.7610117",
"0.74711955",
"0.74485534",
"0.74425983",
"0.7331048",
"0.73265946",
"0.7324182",
"0.7318453",
"0.7316482",
"0.72396296",
"0.7217405",
"0.7177121",
"0.7117323",
"0.70919865",
"0.68738693",
"0.68283707",
"0.67236835",
"0.67182505",
"0.6662115",
"0.6626988",
"0.659... | 0.0 | -1 |
Return max valid temperature that can be set. | def TWl1(YKHO):
return j9oD | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tb4q(YKHO):\n TKGt, wmQo = (lY0q.c_int(), lY0q.c_int())\n YKHO.lib.GetTemperatureRange(lY0q.pointer(TKGt), lY0q.pointer(wmQo))\n return wmQo.value",
"def Mvd7(YKHO) -> int:\n if YKHO.temperature_scale == 'C':\n return YKHO.locked_temp_max_c\n elif YKHO.temperature_scale == 'F':\n ... | [
"0.7610117",
"0.74711955",
"0.74485534",
"0.74425983",
"0.7331048",
"0.73265946",
"0.7318453",
"0.7316482",
"0.72396296",
"0.7217405",
"0.7177121",
"0.7117323",
"0.70919865",
"0.68738693",
"0.68283707",
"0.67236835",
"0.67182505",
"0.6662115",
"0.6626988",
"0.6598519",
"0.656... | 0.7324182 | 6 |
Get an identifier of this product used by the IEM | def Trci(YKHO):
Ii1o = '%s-%s-%s-%s' % (YKHO.valid.strftime('%Y%m%d%H%M'), YKHO.source, YKHO.wmo, YKHO.afos)
return Ii1o.strip() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Mc9N(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'product_id')",
"def Mc9N(YKHO) -> qe4Y.Input[str]:\n return qe4Y.get(YKHO, 'product_id')",
"def mLJR(YKHO):\n return _VfD.GeneProduct_getId(YKHO)",
"def Mc9N(YKHO):\n return YKHO._product_id",
"def Mc9N(YKHO):\n return YKHO._produc... | [
"0.80947524",
"0.7656646",
"0.7540833",
"0.7490796",
"0.7490796",
"0.7490796",
"0.7490796",
"0.7473361",
"0.74033344",
"0.72727764",
"0.7001536",
"0.69974697",
"0.696872",
"0.6949469",
"0.68776137",
"0.6847264",
"0.68438613",
"0.67738664",
"0.67699814",
"0.6766168",
"0.673593... | 0.73596233 | 9 |
Route for getting either a supporting file or the root index.html file for the UI | def A7K2(pmON: str):
if pmON != '' and Hy7s.path.exists(Hy7s.path.join(wk5E.config['UI_PATH'], pmON)):
vzeF.info('sending {} file from {}'.format(pmON, wk5E.config['UI_PATH']))
return cs4A(wk5E.config['UI_PATH'], pmON)
else:
vzeF.info('sending index.html file at {} from {}'.format(pmON, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def d6pt(YKHO):\n xuug = Hy7s.path.join(Hy7s.path.dirname(Hy7s.path.abspath(xAKo)), 'index.html')\n return UbvO(xuug)",
"def kZiy():\n return Yxsy(open('app/templates/index.html').read())",
"def d6pt(pmON):\n return TvZl('index.html')",
"def d6pt():\n return cs4A('views', 'index.html')",
"de... | [
"0.7691439",
"0.74965346",
"0.7394288",
"0.73789537",
"0.729984",
"0.7279394",
"0.7250933",
"0.7233653",
"0.7210124",
"0.7183364",
"0.7183351",
"0.7174102",
"0.71048576",
"0.71037334",
"0.71000904",
"0.71000904",
"0.7090237",
"0.70599145",
"0.70564705",
"0.70564705",
"0.70459... | 0.0 | -1 |
Creates an Agency from a dict. Checks correctness after creation. | def jG8h(nPrm):
U5bT = cJQ3()
for H5ew, BWXx in nPrm.items():
U5bT.setkey(H5ew, BWXx)
U5bT.verify()
return U5bT | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jG8h(Emd4, fK8P):\n pass",
"def xN6F(sjXb, nPrm):\n U5bT = cJQ3()\n for H5ew, BWXx in zip(sjXb, nPrm):\n U5bT.setkey(H5ew, BWXx)\n U5bT.verify()\n return U5bT",
"def CCiu(Emd4, tbx9):\n return Emd4.from_dict(tbx9)",
"def CCiu(Emd4, tbx9):\n return Emd4.from_dict(tbx9)",
"def... | [
"0.6009804",
"0.5934105",
"0.58895844",
"0.58895844",
"0.58895844",
"0.58895844",
"0.58895844",
"0.58895844",
"0.58895844",
"0.58895844",
"0.58895844",
"0.58895844",
"0.58895844",
"0.58895844",
"0.58895844",
"0.58895844",
"0.58895844",
"0.58895844",
"0.58895844",
"0.58895844",
... | 0.8378693 | 0 |
Return the df from that file. | def Chp4(geh0):
VOdS = geh0.text
Nqlg = VOdS.strip().split('\n')
' Crea df dove ogni linea corrisponde ad una riga del df\n In questa operazione non si ha ancora la divisione per le singole colonne\n questo dipende dalla response della richiesta'
return rLdf.DataFrame(Nqlg[:], columns=[Nqlg[0]]) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Nwr9(IznC: str) -> rLdf.DataFrame:\n WPdU = rLdf.read_hdf(IznC).to_frame().reset_index(level=[0, 1]).loc[jNhW]\n WPdU['date'] = WPdU.index\n return WPdU",
"def _OdL(VqRE):\n I1iR = [qQXR.loads(eHNT) for eHNT in open(VqRE).readlines()]\n return rLdf.DataFrame(I1iR)",
"def sW6H(gIsw):\n if ... | [
"0.73206097",
"0.7273985",
"0.72532266",
"0.725288",
"0.72142917",
"0.70904326",
"0.7084267",
"0.70563334",
"0.70420986",
"0.69824964",
"0.69229513",
"0.68404067",
"0.68404067",
"0.68404067",
"0.68379134",
"0.6834317",
"0.6807396",
"0.6716032",
"0.6659324",
"0.66523355",
"0.6... | 0.0 | -1 |
Save settings contained within the .json and .js settings files. | def RXnA(YKHO, K0DF):
try:
with T_Uj.open(K0DF, encoding='utf-8-sig', mode='w+') as eHNT:
qQXR.dump(YKHO.__dict__, eHNT, encoding='utf-8', ensure_ascii=False)
with T_Uj.open(K0DF.replace('json', 'js'), encoding='utf-8-sig', mode='w+') as eHNT:
eHNT.write('var settings = {0};'... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def TVMf(YKHO):\n with open(YKHO.settings_path, 'w') as eHNT:\n qQXR.dump(YKHO.settings, eHNT, indent=4)",
"def QXAv(YKHO):\n XN37.saveFile(YKHO.dataDir, YKHO.settingsFilename, qQXR.dumps(YKHO.settings))",
"def QXAv():\n global settings\n J7Cn = open(Nu1S, 'w')\n J7Cn.write(qQXR.dumps(gCu... | [
"0.8557654",
"0.8479817",
"0.84648174",
"0.8247739",
"0.8107492",
"0.80212617",
"0.79664224",
"0.7918237",
"0.76606166",
"0.7643112",
"0.75955284",
"0.7537307",
"0.7505763",
"0.7473185",
"0.7244251",
"0.71832156",
"0.71723247",
"0.71697444",
"0.7119456",
"0.7056987",
"0.70531... | 0.74582314 | 14 |
Format the sentence divided by spaces in to camelCaseSpelling | def mPcS(l5Ny):
hlel = ''
for YRbF, yzQ0 in enumerate(l5Ny.split(' ')):
if YRbF > 0:
hlel += yzQ0[0].upper() + yzQ0[1:]
else:
hlel += yzQ0
return hlel | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def ltAp(YKHO, yAmx):\n return ZbWC.sub('[\\\\W_ ]+', ' ', yAmx).lower()",
"def T1YZ(KCHu):\n HpFY = GdiO.sub('\\\\1 \\\\2', KCHu)\n return uPpi.sub('\\\\1 \\\\2', HpFY).lower()",
"def MDZz(V22M):\n l1kM = ''\n for GIN8 in V22M:\n if l1kM == '':\n l1kM = GIN8[:1].lower() + GIN8... | [
"0.73090994",
"0.72395027",
"0.7106232",
"0.70089257",
"0.6961377",
"0.69247425",
"0.6841329",
"0.6785974",
"0.6770731",
"0.66761297",
"0.66446626",
"0.66296375",
"0.66296375",
"0.66161925",
"0.6579748",
"0.65370876",
"0.65228355",
"0.6521351",
"0.64494944",
"0.6436152",
"0.6... | 0.7426275 | 0 |
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero. | def wnVm(xYvp: List[int]) -> x1iM[x1iM[int]]:
zNig = len(xYvp)
Ylbp = list()
if zNig < 3:
return Ylbp
xYvp.sort()
gV7J = dict()
for YRbF in range(zNig - 2):
mLGw = xYvp[YRbF]
if mLGw in gV7J:
continue
gV7J[mLGw] = 1
jP0a = dOFu(xYvp, YRbF + 1, ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kkPW(jzdc):\n Aofo = set()\n jzdc.sort()\n exwG = len(jzdc)\n for WKvO in jzdc:\n o8aI = 0 - WKvO\n YRbF = 0\n r845 = exwG - 1\n while YRbF < r845:\n if jzdc[YRbF] + jzdc[r845] == o8aI:\n Aofo.add(tuple(sorted([WKvO, jzdc[YRbF], jzdc[r845]])))\n... | [
"0.74995184",
"0.6807669",
"0.66731316",
"0.66455746",
"0.65322167",
"0.63680613",
"0.63485014",
"0.6313556",
"0.6306352",
"0.6225103",
"0.6220736",
"0.60896564",
"0.60747087",
"0.60718614",
"0.6049467",
"0.6044564",
"0.60016406",
"0.59917116",
"0.5980008",
"0.5976277",
"0.59... | 0.57478637 | 38 |
Validate the password that the user gave. | def tg18(YKHO, jTXt):
AVNP.validate_password(jTXt)
return jTXt | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SqNO(YKHO):\n RnXU = wsY0(''.join(['x' * int(YKHO.app.config['MAX_PWD_LEN'])]))\n UpdD(None, RnXU)",
"def tg18(nPrm):\n if 'password' not in nPrm:\n return False\n jTXt = nPrm['password']\n if len(jTXt) < 4 or len(jTXt) > 16:\n return False\n return True",
"def EoXa(jTXt):\n... | [
"0.8092302",
"0.78717",
"0.7847557",
"0.7838408",
"0.7806384",
"0.78028417",
"0.7801196",
"0.77922606",
"0.77895856",
"0.7763571",
"0.7758819",
"0.7729701",
"0.77275616",
"0.7719578",
"0.7700801",
"0.767292",
"0.76702726",
"0.7658963",
"0.76577514",
"0.7656788",
"0.7646463",
... | 0.7948696 | 1 |
Generates a random 3D unit vector (direction) with a uniform spherical distribution | def Ooch():
rVnq = GPtr.random.uniform(0, oyIN.pi * 2)
fSLV = GPtr.random.uniform(-1, 1)
q7In = oyIN.arccos(fSLV)
WKvO = oyIN.sin(q7In) * oyIN.cos(rVnq)
LVAh = oyIN.sin(q7In) * oyIN.sin(rVnq)
epBp = oyIN.cos(q7In)
return (WKvO, LVAh, epBp) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def VuRC():\n vjVv = [0, 0, 0]\n vjVv[2] = tuKI.uniform(-1.0, 1.0)\n mPai = epAf.sqrt(1.0 - vjVv[2] * vjVv[2])\n rVnq = 2.0 * epAf.pi * tuKI.random()\n vjVv[0] = mPai * epAf.cos(rVnq)\n vjVv[1] = mPai * epAf.sin(rVnq)\n return vjVv",
"def M93i():\n UqpO = oyIN.random.normal(size=3)\n F... | [
"0.712667",
"0.70134175",
"0.6973644",
"0.6965655",
"0.6919834",
"0.6893882",
"0.6756543",
"0.67218494",
"0.6658979",
"0.6642232",
"0.6616335",
"0.66099644",
"0.65963835",
"0.65433717",
"0.6478685",
"0.6400619",
"0.6388276",
"0.6335655",
"0.6297577",
"0.6248027",
"0.6202129",... | 0.6695186 | 8 |
Get a user by id | def bt8D(YKHO, uJjO):
xDcj = 'SELECT * FROM users WHERE user_id = %s'
YKHO.cursor.execute(xDcj, [uJjO])
Aofo = YKHO.cursor.fetchone()
return Aofo | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def bt8D(YKHO, id):\n return YKHO.users.get(id)",
"def TKWP(id):\n pass",
"def NMoC(id):\n return mv1M.query.filter_by(id=id).first()",
"def KacQ(YKHO, id: int) -> auMM.bbUser:\n id = YKHO.validateID(id)\n return YKHO.users[id]",
"def NMoC(YKHO, id):\n try:\n H6Ho.logger.debug('We ... | [
"0.8864504",
"0.87704843",
"0.8740833",
"0.8554642",
"0.8504539",
"0.8469546",
"0.84685934",
"0.84557086",
"0.84486854",
"0.835241",
"0.83285975",
"0.8327167",
"0.8313935",
"0.8302917",
"0.8269085",
"0.8265841",
"0.8265841",
"0.8265841",
"0.8265841",
"0.82535756",
"0.82497597... | 0.8164781 | 29 |
Set up a user for testing login.. | def FCbF(YKHO):
CBIr = NqOl(username='mike', email='mike@ike.net')
CBIr.set_password('password')
CBIr.save() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Ucvb(YKHO):\n YKHO.email = 'foo@test.com'\n YKHO.password = 'bar'\n YKHO.username = 'test'\n YKHO.create_account(YKHO.username, YKHO.email, YKHO.password)\n YKHO.activate_user(YKHO.email)\n YKHO.login(YKHO.email, YKHO.password)",
"def FCbF(YKHO):\n YKHO.new_user = mv1M(username='burens',... | [
"0.8567419",
"0.81652975",
"0.81637216",
"0.8143983",
"0.80611825",
"0.80477697",
"0.80252427",
"0.8007449",
"0.7977663",
"0.7932932",
"0.7908676",
"0.7880863",
"0.7880021",
"0.7850239",
"0.78186995",
"0.7779807",
"0.7729569",
"0.769425",
"0.769124",
"0.769124",
"0.769124",
... | 0.7909903 | 10 |
Test that home route has a 200 response code. | def Pkml(YKHO):
YKHO.client.login(username='mike', password='password')
geh0 = YKHO.client.get(Rmd_('journal'))
YKHO.assertEqual(geh0.status_code, 200) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kgM1(YKHO):\n Aofo = YKHO.app.get('/')\n YKHO.assertEqual(Aofo.status_code, 200)",
"def ol9Q(YKHO):\n geh0 = YKHO.client.get('/')\n YKHO.assertTrue(geh0.status_code == 200)",
"def RS_x(YKHO):\n YKHO.assertEqual(200, YKHO.response.status_code)",
"def J7B2(YKHO):\n vja_ = YKHO.client.get(... | [
"0.8968988",
"0.8833738",
"0.86914694",
"0.8362857",
"0.81079036",
"0.8064336",
"0.803854",
"0.8009026",
"0.79975283",
"0.79687226",
"0.78929687",
"0.7766967",
"0.7766967",
"0.7766967",
"0.7766967",
"0.7766967",
"0.7766967",
"0.7766967",
"0.7766967",
"0.7766967",
"0.7766967",... | 0.70018405 | 92 |
Test that home route has a 200 response code. | def An84(YKHO):
YKHO.client.login(username='mike', password='password')
geh0 = YKHO.client.get(Rmd_('create_journal'))
YKHO.assertEqual(geh0.status_code, 200) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def kgM1(YKHO):\n Aofo = YKHO.app.get('/')\n YKHO.assertEqual(Aofo.status_code, 200)",
"def ol9Q(YKHO):\n geh0 = YKHO.client.get('/')\n YKHO.assertTrue(geh0.status_code == 200)",
"def RS_x(YKHO):\n YKHO.assertEqual(200, YKHO.response.status_code)",
"def J7B2(YKHO):\n vja_ = YKHO.client.get(... | [
"0.8968988",
"0.8833738",
"0.86914694",
"0.8362857",
"0.81079036",
"0.8064336",
"0.803854",
"0.8009026",
"0.79975283",
"0.79687226",
"0.78929687",
"0.7766967",
"0.7766967",
"0.7766967",
"0.7766967",
"0.7766967",
"0.7766967",
"0.7766967",
"0.7766967",
"0.7766967",
"0.7766967",... | 0.0 | -1 |
Test that a user can only create a journal entry if logged. | def D2n4(YKHO):
YKHO.client.login(username='mike', password='password')
geh0 = YKHO.client.get(Rmd_('create_journal'))
YKHO.assertEqual(geh0.status_code, 200) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def quwl(YKHO):\n geh0 = YKHO.client.get(Rmd_('create_journal'))\n YKHO.assertEqual(geh0.status_code, 302)",
"def wp27(YKHO):\n CBIr = NqOl.create()\n YKHO.request.user = CBIr\n VrjN.send(sender=CBIr.__class__, request=YKHO.request, user=CBIr)\n YKHO.assertFalse(z82G.objects.count())",
"def p... | [
"0.7454325",
"0.7039992",
"0.6864036",
"0.68615115",
"0.65915525",
"0.6441175",
"0.6264454",
"0.62089926",
"0.61062616",
"0.60613185",
"0.60062087",
"0.5965917",
"0.59638494",
"0.5907406",
"0.5883169",
"0.58725154",
"0.58709425",
"0.5858532",
"0.58444816",
"0.58284324",
"0.58... | 0.70603704 | 1 |
Append key values to another dict with the same keys. | def wtQS(PqLx, *fgcx):
for Csk6 in fgcx:
for H5ew, BWXx in Csk6.items():
try:
PqLx[H5ew].append(BWXx)
except:
PqLx[H5ew] = [BWXx] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nSnN(KYzv, TDnD):\n XgFU = KYzv.copy()\n for G1Hx, Ty9i in TDnD.items():\n if G1Hx in XgFU:\n XgFU[G1Hx].append(Ty9i)\n else:\n XgFU[G1Hx] = [Ty9i]\n return XgFU",
"def CaoY(YKHO, Elif):\n if not isinstance(Elif, dict):\n tO9_ = 'Can not concatenate Dict... | [
"0.761868",
"0.7320622",
"0.7264299",
"0.7261883",
"0.72461456",
"0.7105629",
"0.71054024",
"0.7059993",
"0.7056007",
"0.7002684",
"0.7002684",
"0.69979066",
"0.69800407",
"0.69702154",
"0.69489527",
"0.69252527",
"0.6870841",
"0.685961",
"0.6841138",
"0.68257046",
"0.6811402... | 0.6312285 | 59 |
Serialize recursively a list to another list composed of basic python object (list, dict, int, float, str...) | def wuJU(nPrm):
Cc00 = []
for BWXx in nPrm:
if isinstance(BWXx, list):
Cc00.append(wuJU(BWXx))
elif isinstance(BWXx, dict):
Cc00.append(V_Cx(BWXx))
elif isinstance(BWXx, int) or isinstance(BWXx, float) or isinstance(BWXx, str) or isinstance(BWXx, bool):
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def wuJU(YKHO, YEnM):\n return YKHO.serialize_tuple(YEnM)",
"def fiIk(YEnM):\n if YEnM is None:\n return YEnM\n if isinstance(YEnM, QGpr._Element):\n return YEnM\n if isinstance(YEnM, list):\n return [fiIk(finE) for finE in YEnM]\n Aofo = U8Lr()\n for H5ew in YEnM:\n ... | [
"0.6896342",
"0.6492682",
"0.64743435",
"0.64743435",
"0.6473793",
"0.6349664",
"0.6349664",
"0.6349664",
"0.63097835",
"0.63022345",
"0.62427187",
"0.6200168",
"0.61150545",
"0.60014796",
"0.60004",
"0.5997754",
"0.59920305",
"0.5988519",
"0.5968988",
"0.5951313",
"0.5945658... | 0.668352 | 1 |
r"""Get an attribute recursively. | def rr5d(YEnM, hkS8, *qIxc):
def gDr3(YEnM, hkS8):
return getattr(YEnM, hkS8, *qIxc)
return xBlr.reduce(gDr3, [YEnM] + hkS8.split('.')) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def LAVl(YKHO, mWFP, i_PE=None):\n pu8V = mWFP.split('.')\n xxyc = pu8V[0]\n hkS8 = getattr(YKHO, xxyc)\n if hkS8 is None and xxyc in YKHO.default_values:\n hkS8 = YKHO.build_param(xxyc, memo=i_PE)\n if len(pu8V) == 1:\n return hkS8\n else:\n return Pusg(getattr, pu8V[1:], hk... | [
"0.7474846",
"0.7153808",
"0.71363187",
"0.7023625",
"0.70105433",
"0.68282807",
"0.67382437",
"0.6680349",
"0.66647214",
"0.655203",
"0.652388",
"0.651328",
"0.64850074",
"0.6449671",
"0.6426947",
"0.6424302",
"0.6422253",
"0.64146745",
"0.64083445",
"0.64053845",
"0.6402996... | 0.61479867 | 35 |
Get the logits of NCE estimated probability for target and noise Both NCE and sampled_softmax are unchanged when the probabilities are scaled evenly, here we subtract the maximum value as in softmax, for numeric stability. | def ErSQ(YKHO, input, TJX3, kueJ):
ERpq, IzjC = YKHO.get_score(input, TJX3, kueJ)
ERpq = ERpq.sub(YKHO.norm_term)
IzjC = IzjC.sub(YKHO.norm_term)
return (ERpq, IzjC) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def IuYC(YKHO, nndn, KchN, x3L5, j49z):\n boz2 = ht2j.cat([nndn.unsqueeze(2), KchN], dim=2)\n RtIp = ht2j.cat([j49z.unsqueeze(2), x3L5], dim=2)\n qWJl = boz2.exp() / (boz2.exp() + YKHO.noise_ratio * RtIp.exp())\n UXqs = ht2j.zeros_like(boz2)\n UXqs[:, :, 0] = 1\n FLMZ = -U78l.BCELoss(reduction='n... | [
"0.72175956",
"0.67632514",
"0.60848016",
"0.60833734",
"0.59923303",
"0.59795344",
"0.59593785",
"0.5932857",
"0.5932428",
"0.5878064",
"0.58604705",
"0.5827933",
"0.58246285",
"0.58109814",
"0.580438",
"0.5772957",
"0.5747648",
"0.5742967",
"0.5713755",
"0.5694718",
"0.5686... | 0.60539824 | 4 |
Compute the sampled softmax based on the tensorflow's impl | def Rwb_(YKHO, nndn, KchN, x3L5, j49z):
KeL5 = ht2j.cat([nndn.unsqueeze(2), KchN], dim=2)
vz4J = ht2j.cat([j49z.unsqueeze(2), x3L5], dim=2)
KeL5 = KeL5 - vz4J
MgkA = ht2j.nn.LogSoftmax(dim=-1)(KeL5)
Crrw = ht2j.zeros_like(KeL5.narrow(2, 0, 1)).squeeze(2).long()
FLMZ = -ht2j.nn.NLLLoss(reduction=... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def q8xW():\n WKvO = oyIN.array([[[2.0, 3.0, 4.0, 5.0], [3.0, 4.0, 5.0, 6.0], [7.0, 8.0, 8.0, 9.0]], [[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0], [6.0, 7.0, 8.0, 9.0]]])\n Ylbp = oyIN.array([[[0.0320586, 0.08714432, 0.23688282, 0.64391426], [0.0320586, 0.08714432, 0.23688282, 0.64391426], [0.07232949, 0.1966... | [
"0.72375625",
"0.71592647",
"0.7141543",
"0.7124955",
"0.709431",
"0.7092487",
"0.7092487",
"0.7082904",
"0.70629096",
"0.7051943",
"0.70487213",
"0.70325476",
"0.70325476",
"0.70313686",
"0.70313686",
"0.70313686",
"0.70313686",
"0.70313686",
"0.70313686",
"0.70313686",
"0.7... | 0.0 | -1 |
Returns the ID of the chain object. It does not matter if the id has been changes after adding the chain the to complex. It returns the "real" id of the chain object | def xq7M(eNCK):
if '-' in eNCK.id:
tpAv = eNCK.id[-1]
else:
tpAv = eNCK.id
return tpAv | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def unpH(YKHO):\n return YKHO.__id",
"def unpH(YKHO):\n return YKHO.__id",
"def unpH(YKHO):\n return YKHO.__id",
"def id(YKHO):\n return YKHO.__id",
"def UVlm(YKHO):\n if YKHO.Id is None:\n return YKHO.internalid\n else:\n return YKHO.Id",
"def UVlm(YKHO):\n if YKHO.Id ... | [
"0.64789414",
"0.64199543",
"0.64199543",
"0.6401988",
"0.6400864",
"0.6400864",
"0.6400864",
"0.6400864",
"0.6400864",
"0.6400864",
"0.6396841",
"0.6396841",
"0.6396841",
"0.6396841",
"0.6396841",
"0.6396841",
"0.6396841",
"0.6396841",
"0.6396841",
"0.6396841",
"0.6396841",
... | 0.6789862 | 0 |
Function that changes the name of the new chains to be added to the complex, it adds a letter from the alphabet before the real ID separated by a "" | def zqTf(OPS2, uk1W, d6pt):
for eNCK in uk1W[0]:
eNCK.id = SLdk.merged_list[d6pt] + '-' + eNCK.id
d6pt += 1
return (OPS2, uk1W, d6pt) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def vsG9(YKHO):\n from string import ascii_uppercase\n nPrm = YKHO.get('chainID')\n YaGA = len(nPrm)\n jQi8 = []\n for Z9rn in nPrm:\n if Z9rn not in jQi8:\n jQi8.append(Z9rn)\n if jQi8 == ['A', 'B']:\n return\n if len(jQi8) > 26:\n print('Warning more than 26 c... | [
"0.6926116",
"0.60350186",
"0.60258704",
"0.6007591",
"0.5950556",
"0.5924839",
"0.58528405",
"0.5840551",
"0.5680777",
"0.56515217",
"0.56277215",
"0.56207675",
"0.5593432",
"0.55552065",
"0.5544808",
"0.5507894",
"0.5491381",
"0.5483248",
"0.54693663",
"0.5440123",
"0.54387... | 0.60154825 | 3 |
Class method which checks if the given value is an `Option`. Returns `True` if it is. | def td4z(Emd4: Type['Option[T]'], BWXx: Any) -> bool:
return isinstance(BWXx, KowT) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SXHT(YKHO, y7GR):\n if len(y7GR) < 2 or y7GR[0] != '-':\n return False\n if y7GR[1] != '-':\n return YKHO._short_opt.get(y7GR[0:2]) is not None\n try:\n if '=' in y7GR:\n y7GR, Vp64 = y7GR.split('=', 1)\n if YKHO._match_long_opt(y7GR):\n return True\n ... | [
"0.67180294",
"0.644909",
"0.62299746",
"0.6211447",
"0.6131447",
"0.6097059",
"0.60543674",
"0.59446865",
"0.5943079",
"0.59417915",
"0.59372663",
"0.5894563",
"0.5870201",
"0.58435833",
"0.58040565",
"0.57954943",
"0.5792939",
"0.5746857",
"0.57454437",
"0.5744768",
"0.5737... | 0.87929916 | 0 |
Constructs a ResNet50 model. | def ylKG(**B2fa):
C3ST = jlrL(MF6R, [3, 4, 6, 3], **B2fa)
return C3ST | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uwZX(mL4f=False, **B2fa):\n C3ST = S1Vm(MF6R, [3, 4, 6, 3], **B2fa)\n if mL4f:\n C3ST.load_state_dict(rA0C.load_url(mDCG['resnet50']))\n FBfN = JpOW(C3ST.fc)\n C3ST.fc = FBfN\n return C3ST",
"def uwZX(**B2fa):\n C3ST = S1Vm(MF6R, [3, 4, 6, 3], **B2fa)\n return C3ST",
"def uwZX(m... | [
"0.755625",
"0.7553112",
"0.7474026",
"0.7474026",
"0.7474026",
"0.7474026",
"0.74543184",
"0.73849267",
"0.73849267",
"0.73605144",
"0.735356",
"0.7241305",
"0.7241305",
"0.718981",
"0.71567255",
"0.7100313",
"0.70160615",
"0.6966828",
"0.68684405",
"0.6820117",
"0.67994595"... | 0.5979895 | 85 |
Min step of the minimax algorithm. | def GVoT(YKHO, QTBn: TwoPlayerGameState, rb7a: int) -> float:
if QTBn.end_of_game or rb7a == 0:
E2VJ = YKHO.heuristic.evaluate(QTBn)
else:
E2VJ = oyIN.inf
bzfn = YKHO.generate_successors(QTBn)
for U08W in bzfn:
if YKHO.verbose > 1:
print('{}: {}'.forma... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iexY(YKHO) -> int:\n return 2",
"def Wg84(YKHO):\n pass",
"def JZD_(YKHO):\n YKHO.nstep += 1\n tJKp = False\n Hhz4, MQog = YKHO._monte_carlo_step()\n if Hhz4:\n YKHO.energy = MQog.fun\n YKHO.x = oyIN.copy(MQog.x)\n tJKp = YKHO.storage.update(MQog)\n if YKHO.disp:\n... | [
"0.74909216",
"0.6502346",
"0.64237064",
"0.6418244",
"0.6352389",
"0.63380665",
"0.63229454",
"0.63112587",
"0.6275154",
"0.62703514",
"0.62668175",
"0.623938",
"0.6237472",
"0.6223793",
"0.62124515",
"0.62124515",
"0.61966765",
"0.6194855",
"0.6193998",
"0.6168595",
"0.6160... | 0.63414204 | 5 |
Max step of the minimax algorithm. | def ztzb(YKHO, QTBn: TwoPlayerGameState, rb7a: int) -> float:
if QTBn.end_of_game or rb7a == 0:
E2VJ = YKHO.heuristic.evaluate(QTBn)
else:
E2VJ = -oyIN.inf
bzfn = YKHO.generate_successors(QTBn)
for U08W in bzfn:
if YKHO.verbose > 1:
print('{}: {}'.form... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def iexY(YKHO) -> int:\n return 2",
"def IyCL(YKHO):\n return YKHO._best_value_step",
"def CkuG(YKHO, iBIi, qieF, TksD, Cwt5, UqYS):\n pass",
"def bnFD(YKHO):\n raise NotImplementedError",
"def YFKz(YKHO) -> (int, float('inf')):\n return 2",
"def bnFD(YKHO, Jtpl, K0do):\n pass",
"def ... | [
"0.67484635",
"0.67362964",
"0.6595354",
"0.65674037",
"0.65080017",
"0.6462683",
"0.6455741",
"0.64522177",
"0.6421434",
"0.64014816",
"0.6369479",
"0.63460934",
"0.6338692",
"0.6336562",
"0.62939847",
"0.6289916",
"0.6255334",
"0.6232077",
"0.62190896",
"0.61707526",
"0.615... | 0.6816621 | 0 |
The Azure Region in which the Key Vault managed Hardware Security Module exists. | def Rci7(YKHO) -> str:
return qe4Y.get(YKHO, 'location') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def zn0c(YKHO):\n return YKHO.config.region",
"def oMHX(YKHO):\n return YKHO.creds.get('region_name')",
"def zn0c(YKHO) -> str:\n return qe4Y.get(YKHO, 'region')",
"def zn0c(YKHO) -> str:\n return qe4Y.get(YKHO, 'region')",
"def zn0c(YKHO) -> str:\n return qe4Y.get(YKHO, 'region')",
"def z... | [
"0.7266168",
"0.7237674",
"0.70635974",
"0.70635974",
"0.70635974",
"0.70635974",
"0.70635974",
"0.70635974",
"0.693939",
"0.68693393",
"0.68693393",
"0.68693393",
"0.68693393",
"0.6813604",
"0.6809065",
"0.6690985",
"0.6690985",
"0.66757965",
"0.66209483",
"0.66209483",
"0.6... | 0.0 | -1 |
The Name of the SKU used for this Key Vault Managed Hardware Security Module. | def mDSP(YKHO) -> str:
return qe4Y.get(YKHO, 'sku_name') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jxQJ(YKHO) -> str:\n return qe4Y.get(YKHO, 'vm_sku_name')",
"def mDSP(YKHO) -> qe4Y.Output[h8nf[str]]:\n return qe4Y.get(YKHO, 'sku_name')",
"def mDSP(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'sku_name')",
"def mDSP(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'sku_n... | [
"0.8121262",
"0.79325676",
"0.7739485",
"0.7739485",
"0.7579729",
"0.7579729",
"0.7389494",
"0.7327727",
"0.73114425",
"0.7281661",
"0.71447146",
"0.71447146",
"0.69583124",
"0.69331557",
"0.69292045",
"0.6906445",
"0.6906445",
"0.6873477",
"0.6838579",
"0.68206424",
"0.68206... | 0.8303261 | 2 |
Sets the current driving direction and sets the driving timer accordingly. | def oivB(YKHO, XSoh: int) -> None:
YKHO.direction = XSoh
if XSoh == o5oX.turn_left or XSoh == o5oX.turn_right:
YKHO.stop_timer = ITS7.time() + YKHO.driving_time_turning
else:
YKHO.stop_timer = ITS7.time() + YKHO.driving_time | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def oivB(YKHO, bPBo):\n YKHO.__direction = bPBo",
"def Y9qN(YKHO, XSoh, iBLD=100):\n if XSoh == 1:\n print('Drive sync 1')\n YKHO.driveSpeed = iBLD\n if XSoh == -1:\n YKHO.driveSpeed = -iBLD\n if XSoh == 0:\n YKHO.driveSpeed = 0\n YKHO.setSpeeds()",
"def RSBG(YKHO, iB... | [
"0.6608926",
"0.65660435",
"0.653478",
"0.6503984",
"0.65009046",
"0.65009046",
"0.64775205",
"0.6448301",
"0.63582534",
"0.6293403",
"0.6293403",
"0.6278547",
"0.61013895",
"0.6075105",
"0.6051007",
"0.6026443",
"0.59987295",
"0.59787923",
"0.59741753",
"0.5969381",
"0.59307... | 0.760538 | 0 |
Check if returning weak ref of a C obj. For example `git_checkout_options checkout_opts` is returning a weak reference. | def ipRV(h_UO: str, cLOH: str):
return h_UO in i3BH and cLOH == 'jlong' | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def S_po(YKHO):\n raise NotImplementedError()",
"def WzEO(bf9h):\n if isinstance(bf9h, ZUBR.ref):\n bf9h = bf9h()\n return bf9h",
"def izQz(YKHO):\n nqEK = w_rv()\n D4AW = Uc7x(None, None)\n nqEK.register(D4AW)\n bf9h = ZUBR.ref(D4AW)\n del D4AW\n gigf.collect()\n YKHO.asse... | [
"0.6626275",
"0.6454295",
"0.62101966",
"0.6130012",
"0.6118841",
"0.6100253",
"0.6042762",
"0.602644",
"0.59560275",
"0.59127533",
"0.59099925",
"0.590179",
"0.5783609",
"0.5756982",
"0.5756982",
"0.5700847",
"0.56840247",
"0.55712956",
"0.5542497",
"0.55220205",
"0.5482321"... | 0.6542793 | 1 |
JSON serializer for datetime objects to ensure that objects being saved will be able to be tracked. Will raise error if passed object it cannot serialize. | def LAQU(YEnM):
if isinstance(YEnM, qcWV):
Pt6R = YEnM.isoformat()
return Pt6R
raise TypeError('{} is not JSON serializable.'.format(YEnM)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SuQJ(YKHO, YEnM):\n if isinstance(YEnM, qcWV.datetime):\n return int(ITS7.mktime(YEnM.timetuple()))\n raise TypeError('Type %s not serializable' % type(YEnM))",
"def JW5R(YKHO, YEnM):\n if isinstance(YEnM, qcWV.datetime):\n return YEnM.isoformat()\n raise TypeError('Type not seriali... | [
"0.771173",
"0.74197257",
"0.7363774",
"0.7331228",
"0.72766143",
"0.72766143",
"0.72614646",
"0.7252251",
"0.7245006",
"0.72341764",
"0.7231653",
"0.72154784",
"0.71997553",
"0.71997553",
"0.71997553",
"0.71997553",
"0.7189503",
"0.71843654",
"0.7178176",
"0.7177841",
"0.716... | 0.7925466 | 0 |
Check if in the request only has only a unique combination between shift and day. | def oc5t(YKHO, BWXx):
r9Hf = mBkc()
if BWXx:
for YRbF in BWXx:
CjKC, DkWr = YRbF.values()
aaqF = str(CjKC) + ', ' + str(DkWr)
r9Hf[aaqF] += 1
if r9Hf.most_common(1)[0][1] >= 2:
raise IyFz.ValidationError(f'You need set a unique combination this {r9... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def RGTD(YKHO):\n pass",
"def T72_(YKHO):\n return YKHO._repeatable[0] is True",
"def ZbR2(YKHO, H5ew):\n return YKHO._in_keys(H5ew, YKHO._unique_keys)",
"def NFSk(YKHO):\n for AIu6 in YKHO:\n UHFx = YKHO.search_count([('occ_date', '=', AIu6.occ_date), ('working_hours_id', '=', AIu6.workin... | [
"0.5851898",
"0.5394493",
"0.5354619",
"0.53512913",
"0.5290591",
"0.52530515",
"0.52441525",
"0.52324",
"0.5178041",
"0.51483494",
"0.5106582",
"0.510037",
"0.50881714",
"0.50829184",
"0.5080927",
"0.5076379",
"0.5057633",
"0.5054936",
"0.50527745",
"0.50365835",
"0.50063187... | 0.6941287 | 0 |
Setup the gevent queue and the workers. | def FIMM(YKHO, ANdr=0, fHUa=10):
YKHO.queue = eUgz(maxsize=ANdr)
[cl53(YKHO.worker) for WKvO in range(fHUa)] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def Hoxq(YKHO):\n YKHO.queue_workers = [J9b7.spawn(YKHO._EventQueueWorker) for bGrB in Ni9Y(YKHO.num_workers)]\n YKHO.gc_worker = J9b7.spawn(YKHO._GarbageCollectorWorker)",
"async def _setup(YKHO):\n tuFO.info('Setting up workers...')\n YKHO.workers = [V7ok.Task(YKHO._work(), loop=YKHO.loop) for bGrB... | [
"0.7769949",
"0.7139168",
"0.6955711",
"0.6743766",
"0.66819346",
"0.6650294",
"0.66424555",
"0.64448136",
"0.63536066",
"0.63292646",
"0.624944",
"0.62140614",
"0.62063307",
"0.6204641",
"0.61613536",
"0.6154683",
"0.61263525",
"0.6087827",
"0.60686773",
"0.60517365",
"0.604... | 0.5584802 | 69 |
Do forward, backward and gradient step in parallel. | def _U64(YKHO, gGnb):
h4tI = False
if not YKHO._grads_initialized:
h4tI = True
YKHO._grads_initialized = True
YKHO._scatter_samples(gGnb, replace_empty_samples=h4tI)
BmSV, F9Yl = D1Oj.gen_tuple_list([YKHO.call_async(fdMZ, '_async_forward') for fdMZ in range(YKHO.num_replicas)])
fV2p ... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def n4wF(N8L0, H69_=True):\n\n def Ze0F(N77f):\n IoiV.backward(N77f)\n RcgH = [T6FA.Thread(target=Ze0F, args=(N77f,)) for N77f in N8L0]\n if H69_:\n for MgeT in RcgH:\n MgeT.start()\n for MgeT in RcgH:\n MgeT.join()\n else:\n for N77f in N8L0:\n ... | [
"0.691453",
"0.6655669",
"0.6476425",
"0.63899904",
"0.62763053",
"0.6268684",
"0.6249809",
"0.6219835",
"0.6191865",
"0.6189565",
"0.6188072",
"0.6181299",
"0.6125889",
"0.6078165",
"0.60117966",
"0.6007914",
"0.60031486",
"0.5998216",
"0.5979641",
"0.5968244",
"0.59573764",... | 0.0 | -1 |
nn.utils.clip_grad_norm for flattened (contiguous) tensors. | def ZKkJ(YKHO, oRwY, trO2):
CkYf = oRwY.norm()
if trO2 > 0 and CkYf > trO2:
vqVR = max(CkYf, 1e-06) / trO2
oRwY.div_(vqVR)
return CkYf | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tv6i(vtNT, wTln):\n wAqf = []\n qk3l = []\n for YRbF, Oa1e in enumerate(vtNT):\n if Oa1e is not None:\n qk3l.append(YRbF)\n wAqf.append(Oa1e)\n GRKF = ZylS.norm(ZylS.stack([ZylS.norm(Oa1e, ord=2) for Oa1e in wAqf]), ord=2)\n WsX1 = wTln / (GRKF + 1e-06)\n NHFr = [... | [
"0.7292905",
"0.70816815",
"0.6999802",
"0.6975075",
"0.69559264",
"0.6948092",
"0.6917727",
"0.6909057",
"0.6829388",
"0.66394484",
"0.6619211",
"0.65782523",
"0.65581644",
"0.6532657",
"0.65101385",
"0.643352",
"0.64316124",
"0.6419963",
"0.6419963",
"0.6419963",
"0.6419963... | 0.6374938 | 22 |
Get the current learning rate. | def gWpO(YKHO):
return YKHO.call_async(0, '_async_get_lr').gen() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NkTt(YKHO):\n GPtr = YKHO.config\n JQpF = LXsA.adjust_learning_rate(YKHO.optimizer, YKHO.epoch, GPtr['training']['learning_rate'], decay=GPtr['training']['lr_decay_rate'], step=GPtr['training']['lr_decay_step'])\n YKHO.cur_lr = JQpF\n return JQpF",
"def b0Ix(qtWj):\n YKHO.lr = YKHO.lr / 1.0000... | [
"0.8338021",
"0.8257183",
"0.80368876",
"0.76718974",
"0.7653609",
"0.7651945",
"0.76396656",
"0.76396656",
"0.74942815",
"0.7460383",
"0.7419125",
"0.7365561",
"0.72476804",
"0.72476804",
"0.70984983",
"0.7093192",
"0.7053641",
"0.70433134",
"0.70149547",
"0.6989301",
"0.698... | 0.63190496 | 60 |
Adjust the learning rate depending on the validation loss. | def qomG(YKHO, AIKr=None, qtWj=None):
tspZ = D1Oj.gen_list([YKHO.call_async(fdMZ, '_async_lr_step', val_loss=AIKr, epoch=qtWj) for fdMZ in range(YKHO.num_replicas)])
return tspZ[0] | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def fggk(YKHO, qSva=None):\n if qSva is None:\n for IesV in YKHO.schedulers:\n IesV.step()\n else:\n for IesV in YKHO.schedulers:\n IesV.step(qSva)\n YKHO.lr = YKHO.optimizers[0].param_groups[0]['lr']\n print('learning rate = {0:.7f}'.format(YKHO.lr))",
"def e_63(Y... | [
"0.81191456",
"0.7936515",
"0.78766936",
"0.785512",
"0.7854872",
"0.7789796",
"0.77870864",
"0.7785367",
"0.7776074",
"0.77457184",
"0.77307266",
"0.7693429",
"0.7683071",
"0.76826876",
"0.766253",
"0.76550776",
"0.764174",
"0.7638202",
"0.7632693",
"0.76292247",
"0.76261693... | 0.0 | -1 |
get quartz config object | def lKUg(sEAN, zZcM):
_Fei = sEAN.configStore()
z1Rg = _Fei.get(c18X.Quartz.ConfigV2, zZcM)
if z1Rg is not None:
return z1Rg
z1Rg = _Fei.get(c18X.Quartz.ConfigV1, zZcM)
if z1Rg is not None:
return z1Rg
return None | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def OswW(YKHO):\n xAU6 = dict()\n FF05 = YKHO.app.config.get('SCHEDULER_JOBSTORES')\n if FF05:\n xAU6['jobstores'] = FF05\n QlIX = YKHO.app.config.get('SCHEDULER_EXECUTORS')\n if QlIX:\n xAU6['executors'] = QlIX\n Mx_8 = YKHO.app.config.get('SCHEDULER_JOB_DEFAULTS')\n if Mx_8:\n ... | [
"0.6142567",
"0.58563805",
"0.5817024",
"0.5806531",
"0.580482",
"0.5803616",
"0.580205",
"0.580205",
"0.580205",
"0.580205",
"0.580205",
"0.580205",
"0.580205",
"0.580205",
"0.580205",
"0.580205",
"0.580205",
"0.580205",
"0.580205",
"0.580205",
"0.580205",
"0.580205",
"0... | 0.7785167 | 0 |
Return name of image file in current working directory with this root | def pyUn(mWFP):
EmMj = None
if '.' in mWFP:
if Hy7s.path.exists(mWFP):
EmMj = mWFP
elif '.' not in mWFP:
for ZI14 in ('.pdf', '.eps', '.ps', '.JPG', '.jpg', '.png'):
foZf = mWFP + ZI14
if Hy7s.path.exists(foZf):
EmMj = foZf
if EmMj is N... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XKel(YKHO):\n return Hy7s.path.join(YKHO.__folder, YKHO.__name + '.jpg')",
"def M2Rr(YKHO) -> str:\n TLI7 = Hy7s.path.basename(Hy7s.getcwd())\n grXu = f'{TLI7}_{YKHO.config_name}'\n C7_O = YKHO.config_options.get('image', grXu)\n return C7_O",
"def uwfy(VXjJ):\n return Hy7s.path.dirname(V... | [
"0.786632",
"0.78609234",
"0.7424861",
"0.737362",
"0.73325926",
"0.7311707",
"0.7129474",
"0.7123577",
"0.71204376",
"0.7033828",
"0.69671804",
"0.69488907",
"0.6902777",
"0.6893927",
"0.6882196",
"0.6834376",
"0.682497",
"0.6812889",
"0.680251",
"0.6775631",
"0.6773598",
... | 0.0 | -1 |
Form output file name. | def VMwq(mLGw, YBcr, hcXw=''):
return 'f{}{}{}'.format(mLGw, hcXw, YBcr) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def NqYl(YKHO, Eqh1=''):\n if YKHO._outname is None:\n YKHO._outname = YKHO.generate_outname(fileappend='')\n return YKHO._outname",
"def Snra(YKHO, Ux0P):\n return Ux0P[:-4] + '.txt'",
"def loba(YKHO):\n assert YKHO.__patient_name and YKHO.__location_name, 'New filename could not be determi... | [
"0.7624078",
"0.75484014",
"0.73216164",
"0.73161376",
"0.71804863",
"0.71551675",
"0.70691735",
"0.7027036",
"0.7016375",
"0.70112383",
"0.7010359",
"0.69670796",
"0.69408983",
"0.6937287",
"0.6915561",
"0.69057035",
"0.6876231",
"0.685482",
"0.68535167",
"0.68445647",
"0.68... | 0.63679355 | 65 |
Add new tags in "new_tags" to the set of tags attached to this log manager instance, and return a new DagsterLogManager with the merged set of tags. | def _AiO(YKHO, **cHXH):
return mSs8(logging_metadata=YKHO.logging_metadata._replace(**cHXH), loggers=YKHO._loggers, handlers=YKHO.handlers) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def g0vP(YKHO, FcaX: List[TagMeta]) -> VVku:\n return YKHO.clone(tag_metas=YKHO.tag_metas.add_items(FcaX))",
"def dJ1p(YKHO, cHXH: List[str]) -> None:\n if not isinstance(cHXH, list):\n raise TjbZ(f'The `tags` field of {type(YKHO).__name__} must be a list.')\n YKHO._db_data.tags = oyIN.unique(cHX... | [
"0.5979848",
"0.5740028",
"0.5470231",
"0.5432234",
"0.52555025",
"0.51227975",
"0.4986611",
"0.497146",
"0.4889816",
"0.46688485",
"0.4656642",
"0.46005845",
"0.457154",
"0.45025256",
"0.45018414",
"0.44660848",
"0.44474703",
"0.4399408",
"0.43832096",
"0.43555197",
"0.43517... | 0.7944571 | 0 |
Validates a field for a valid phone number | def rqRT(L03z, Jyyj):
if len(Jyyj.data) > 16:
raise sUXu('Invalid phone number')
try:
YnnA = MBR5.parse(Jyyj.data)
if not MBR5.is_valid_number(YnnA):
raise sUXu('Invalid phone number')
except Exception:
YnnA = MBR5.parse('+1' + Jyyj.data)
if not MBR5.is_va... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def SR9Q(BWXx):\n try:\n epBp = MBR5.parse(BWXx, None)\n except MBR5.NumberParseException:\n raise H6V6.ValidationError('Enter a valid phone number.')\n if not MBR5.is_valid_number(epBp):\n raise H6V6.ValidationError('Enter a valid phone number.')",
"def rqRT(BWXx):\n if BWXx.str... | [
"0.83677363",
"0.83241045",
"0.81992954",
"0.8163816",
"0.812398",
"0.7893777",
"0.77964145",
"0.7727902",
"0.77080286",
"0.76732373",
"0.7634139",
"0.76136893",
"0.761128",
"0.7583921",
"0.7578268",
"0.75425816",
"0.75329864",
"0.7505469",
"0.7474268",
"0.7350862",
"0.725585... | 0.87605786 | 0 |
Validates a field for a valid phone number | def sLSN(L03z, Jyyj):
try:
ECWZ.subdivisions.lookup(Jyyj.data)
except Exception:
raise sUXu(Jyyj.data + ' is not a State / Province / Region') | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def rqRT(L03z, Jyyj):\n if len(Jyyj.data) > 16:\n raise sUXu('Invalid phone number')\n try:\n YnnA = MBR5.parse(Jyyj.data)\n if not MBR5.is_valid_number(YnnA):\n raise sUXu('Invalid phone number')\n except Exception:\n YnnA = MBR5.parse('+1' + Jyyj.data)\n if ... | [
"0.8760536",
"0.8367812",
"0.8324525",
"0.81999034",
"0.8163585",
"0.8125083",
"0.78939086",
"0.77962124",
"0.7727542",
"0.77089703",
"0.76728123",
"0.7635166",
"0.76130885",
"0.76118827",
"0.75831395",
"0.75777227",
"0.7542088",
"0.7533505",
"0.75056684",
"0.74741024",
"0.73... | 0.0 | -1 |
Utility function to reset the weights of the network. | def SiRx(YKHO, Q1LX='default'):
raise NotImplementedError() | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def UMkV(YKHO):\n YKHO._weights = _qLf(YKHO._tmp_weights)\n YKHO._tmp_weights = None",
"def UMkV(YKHO):\n YKHO.head.reset_weights()",
"def UMkV(YKHO):\n YKHO.policy_backbone.reset_weights()\n YKHO.value_backbone.reset_weights()\n YKHO.action_head.reset_weights()\n YKHO.critic_head.reset_we... | [
"0.8593917",
"0.8472963",
"0.8228671",
"0.8048129",
"0.7762969",
"0.74412835",
"0.73798925",
"0.7370133",
"0.7283574",
"0.72022825",
"0.71882766",
"0.708746",
"0.7065608",
"0.7029281",
"0.7010241",
"0.6991684",
"0.695444",
"0.6923053",
"0.6908367",
"0.6908367",
"0.6908367",
... | 0.0 | -1 |
This returns a dict which is the standardised structure for serialising all states into json | def oD7C(YKHO):
return {'state_type': YKHO.state_type, 'state_id': YKHO.state_id, 'public': YKHO.public, 'private': YKHO.private} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def cbsw(YKHO) -> cuzp[str, ImMB]:\n return YKHO.state_to_json()",
"def oD7C(YKHO) -> cuzp[str, ImMB]:\n return qQXR.loads(YKHO.get_state().to_json())",
"def stVm(YKHO) -> cuzp[str, ImMB]:\n return YKHO.rstate.to_json()",
"def RckX(YKHO) -> dict:\n return {'optimizers': [z1Rg.state_dict() for z1R... | [
"0.8200849",
"0.7825386",
"0.7803366",
"0.7589789",
"0.7589789",
"0.75872403",
"0.75732154",
"0.73999345",
"0.73828095",
"0.73686856",
"0.7308452",
"0.72323084",
"0.72216594",
"0.7196019",
"0.7191161",
"0.71577793",
"0.71469086",
"0.7145572",
"0.71452224",
"0.71452224",
"0.71... | 0.75617945 | 7 |
Test orthogonal projection of one vector to another vector. | def Qq3C():
jzdc = oyIN.ones(3)
fpPq = zTi3.vector_projection(jzdc, zTi3.unitx)
t_0o(fpPq, zTi3.unitx)
Xgmb(zTi3.angle_between_vectors(fpPq, zTi3.unitx), 0.0)
l3yZ = zTi3.vector_projection(2 * jzdc, zTi3.unitx)
t_0o(l3yZ, 2 * zTi3.unitx)
Xgmb(zTi3.angle_between_vectors(l3yZ, zTi3.unitx), 0.0... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tP4o(iArr):\n return (-1 * iArr[1], iArr[0])",
"def i4GV():\n t3eI = oyIN.random.RandomState(23)\n for bGrB in range(5):\n jzdc = zTi3.random_vector(t3eI, 3)\n crjL = zTi3.vector_projection(jzdc, oyIN.zeros(3))\n t_0o(crjL, oyIN.zeros(3))",
"def fWWE(Ty9i):\n return oyIN.ar... | [
"0.6770901",
"0.67674327",
"0.6689018",
"0.6670237",
"0.66599363",
"0.6557277",
"0.6445381",
"0.64218956",
"0.637236",
"0.62990284",
"0.61442435",
"0.61123866",
"0.6099427",
"0.6088672",
"0.60610044",
"0.6026007",
"0.5905668",
"0.58639765",
"0.58582276",
"0.5835021",
"0.58155... | 0.75394046 | 0 |
Test input validation for rotation matrix. | def MZ5v():
GeTY = [[1, 0, 0], [0, 1, 0], [0, 0, 1]]
A3Vt = zTi3.check_matrix(GeTY)
SjMt(type(A3Vt), oyIN.ndarray)
SjMt(A3Vt.dtype, oyIN.float64)
zmW0 = oyIN.eye(3, dtype=int)
A3Vt = zTi3.check_matrix(zmW0)
SjMt(type(A3Vt), oyIN.ndarray)
SjMt(A3Vt.dtype, oyIN.float64)
d4bE = oyIN.eye... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def dnr9():\n t3eI = oyIN.random.RandomState(2345)\n for bGrB in range(5):\n jzdc = zTi3.random_axis_angle(t3eI)\n A3Vt = zTi3.matrix_from_axis_angle(jzdc)\n y_Qe = A3Vt[2, 2]\n for P1dF in [0, 1e-08, 1e-07, 1e-05, 0.0001, 1]:\n A3Vt[2, 2] = y_Qe + P1dF\n try... | [
"0.76198494",
"0.6995302",
"0.6820299",
"0.670978",
"0.6608136",
"0.6603374",
"0.65707165",
"0.65181303",
"0.6468469",
"0.6346897",
"0.6291172",
"0.62752175",
"0.6232407",
"0.62080777",
"0.6202115",
"0.618742",
"0.6177467",
"0.6146699",
"0.6122371",
"0.6122213",
"0.6104839",
... | 0.67749566 | 3 |
Test conversions between rotation matrix and quaternion. | def hi4y():
A3Vt = oyIN.eye(3)
jzdc = zTi3.axis_angle_from_matrix(A3Vt)
t_0o(jzdc, oyIN.array([1, 0, 0, 0]))
t3eI = oyIN.random.RandomState(0)
for bGrB in range(5):
vexM = zTi3.random_quaternion(t3eI)
A3Vt = zTi3.matrix_from_quaternion(vexM)
zTi3.assert_rotation_matrix(A3Vt)
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def jfIW(YKHO):\n A3Vt = oyIN.identity(3)\n vexM = Omrx(A3Vt)\n wXjW = vexM - oyIN.array([0.0, 0.0, 0.0, 1.0])\n YKHO.assertAlmostEqual(oyIN.linalg.norm(wXjW), 0.0)\n for bGrB in range(20):\n vexM = oyIN.random.randn(4)\n vexM /= oyIN.linalg.norm(vexM)\n A3Vt = ehCx(vexM)\n ... | [
"0.80193526",
"0.79094625",
"0.7781212",
"0.7733679",
"0.7370852",
"0.7351515",
"0.73497933",
"0.7315278",
"0.72531325",
"0.71705234",
"0.7152907",
"0.7126747",
"0.7024841",
"0.7011307",
"0.6987472",
"0.6973207",
"0.6935359",
"0.6919898",
"0.6917783",
"0.68654966",
"0.6836206... | 0.82358253 | 0 |
Test conversions between compact axisangle and quaternion. | def pwsy():
vexM = oyIN.array([1, 0, 0, 0])
jzdc = zTi3.compact_axis_angle_from_quaternion(vexM)
t_0o(jzdc, oyIN.array([0, 0, 0]))
BzON = zTi3.quaternion_from_compact_axis_angle(jzdc)
t_0o(BzON, vexM)
t3eI = oyIN.random.RandomState(0)
for bGrB in range(5):
jzdc = zTi3.random_compact_... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def nZCr():\n vexM = oyIN.array([1, 0, 0, 0])\n jzdc = zTi3.axis_angle_from_quaternion(vexM)\n t_0o(jzdc, oyIN.array([1, 0, 0, 0]))\n BzON = zTi3.quaternion_from_axis_angle(jzdc)\n t_0o(BzON, vexM)\n t3eI = oyIN.random.RandomState(0)\n for bGrB in range(5):\n jzdc = zTi3.random_axis_ang... | [
"0.71578026",
"0.67892486",
"0.67066747",
"0.6634019",
"0.6620193",
"0.66132396",
"0.6583995",
"0.65805155",
"0.65768725",
"0.6571968",
"0.6494356",
"0.6492593",
"0.6478215",
"0.638819",
"0.6378265",
"0.6212822",
"0.6184301",
"0.6151081",
"0.6124323",
"0.61219126",
"0.6080763... | 0.8033839 | 0 |
Test conversion of quaternion between wxyz and xyzw. | def WzyC():
_W73 = oyIN.array([1.0, 0.0, 0.0, 0.0])
sVMP = zTi3.quaternion_xyzw_from_wxyz(_W73)
Qhng(sVMP, oyIN.array([0.0, 0.0, 0.0, 1.0]))
M8AC = zTi3.quaternion_wxyz_from_xyzw(sVMP)
Qhng(_W73, M8AC)
t3eI = oyIN.random.RandomState(42)
GYF4 = zTi3.random_quaternion(t3eI)
cyg2 = zTi3.qua... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def MbuV(cE9V):\n Kt_s = DGlu(Sp_B.SO3)\n iZU9(Kt_s, Sp_B.SO3.from_quaternion_xyzw(Kt_s.as_quaternion_xyzw()))",
"def BjlW():\n SsCY = [1, 0, 0, 0]\n vexM = zTi3.check_quaternion(SsCY)\n t_0o(SsCY, vexM)\n SjMt(type(vexM), oyIN.ndarray)\n SjMt(vexM.dtype, oyIN.float64)\n t3eI = oyIN.rando... | [
"0.7026409",
"0.67457294",
"0.6717996",
"0.66186094",
"0.6506997",
"0.642514",
"0.6366318",
"0.6352576",
"0.63209",
"0.62506706",
"0.62370414",
"0.62185806",
"0.6182944",
"0.6182421",
"0.6155607",
"0.6111267",
"0.60847276",
"0.6046263",
"0.5985926",
"0.59652936",
"0.59482473"... | 0.74388933 | 0 |
Test if quaternion multiplication follows Hamilton's convention. | def k4Zr():
ovLK = zTi3.concatenate_quaternions(zTi3.q_i, zTi3.q_j)
Qhng(zTi3.q_k, ovLK)
Rzk1 = zTi3.concatenate_quaternions(ovLK, zTi3.q_k)
Qhng(-zTi3.q_id, Rzk1) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def tYLU():\n vexM = oyIN.sqrt(0.5) * oyIN.array([1, 0, 0, 1])\n A3Vt = zTi3.matrix_from_quaternion(vexM)\n t_0o(oyIN.array([[0, -1, 0], [1, 0, 0], [0, 0, 1]]), A3Vt)",
"def dU1C(cJsZ, hbUd):\n cJsZ = XTiz.array(cJsZ)\n hbUd = XTiz.array(hbUd)\n return XTiz.allclose(cJsZ, hbUd) or XTiz.allclose... | [
"0.68623555",
"0.64047253",
"0.6300059",
"0.60610235",
"0.60184723",
"0.59799457",
"0.5941113",
"0.5696614",
"0.5696614",
"0.5615042",
"0.5550903",
"0.54939413",
"0.5489515",
"0.5483338",
"0.5454985",
"0.5452444",
"0.5450511",
"0.5447861",
"0.5435056",
"0.542706",
"0.5415491"... | 0.7402401 | 0 |
Test if quaternion rotation and multiplication are Hamiltonian. | def _x4t():
t3eI = oyIN.random.RandomState(1)
for bGrB in range(5):
Ty9i = zTi3.random_vector(t3eI)
vexM = zTi3.random_quaternion(t3eI)
Ive_ = oyIN.hstack(((0.0,), Ty9i))
SO0N = zTi3.concatenate_quaternions(vexM, zTi3.concatenate_quaternions(Ive_, zTi3.q_conj(vexM)))[1:]
... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def k4Zr():\n ovLK = zTi3.concatenate_quaternions(zTi3.q_i, zTi3.q_j)\n Qhng(zTi3.q_k, ovLK)\n Rzk1 = zTi3.concatenate_quaternions(ovLK, zTi3.q_k)\n Qhng(-zTi3.q_id, Rzk1)",
"def JZnz(uipa: Qs) -> bool:\n u84f = OZFX(uipa, uipa.rows, uipa.columns)\n return aPi6(uipa, u84f)",
"def tYLU():\n ... | [
"0.7360241",
"0.661501",
"0.6586913",
"0.61760306",
"0.60709524",
"0.59135395",
"0.5888707",
"0.57508194",
"0.57298416",
"0.5710799",
"0.56980115",
"0.56793535",
"0.56330824",
"0.5612407",
"0.5610576",
"0.5589202",
"0.5536868",
"0.55191875",
"0.5515655",
"0.54935735",
"0.5475... | 0.5390463 | 26 |
Test angular metric of quaternions q and q. | def oQZ5():
t3eI = oyIN.random.RandomState(0)
for bGrB in range(5):
vexM = zTi3.quaternion_from_axis_angle(zTi3.random_axis_angle(t3eI))
t_0o(zTi3.matrix_from_quaternion(vexM), zTi3.matrix_from_quaternion(-vexM))
SjMt(zTi3.quaternion_dist(vexM, -vexM), 0.0) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uuj8(YKHO):\n assert oyIN.allclose(YKHO.stepper.q, YKHO.ODE.exact(YKHO.stepper.t), rtol=0.001, atol=1e-05)",
"def jzSH():\n NSBV = [[1, 0, 0, 0]]\n T8ck = zTi3.check_quaternions(NSBV)\n t_0o(NSBV, T8ck)\n SjMt(type(T8ck), oyIN.ndarray)\n SjMt(T8ck.dtype, oyIN.float64)\n SjMt(T8ck.ndim, 2... | [
"0.65812486",
"0.63682437",
"0.62707365",
"0.62577444",
"0.6152928",
"0.6128305",
"0.59861505",
"0.5902872",
"0.5889198",
"0.5887856",
"0.58824587",
"0.58787906",
"0.5865886",
"0.5857081",
"0.5853649",
"0.58215487",
"0.5812693",
"0.57913405",
"0.576557",
"0.5740266",
"0.57042... | 0.5651043 | 23 |
Test angular metric of quaternions q and ca. q. | def pvwD():
t3eI = oyIN.random.RandomState(0)
for bGrB in range(5):
jzdc = zTi3.random_axis_angle(t3eI)
hbUd = zTi3.quaternion_from_axis_angle(jzdc)
Mkmy = 0.0001 * t3eI.randn(4)
BzON = -zTi3.quaternion_from_axis_angle(jzdc + Mkmy)
Xgmb(zTi3.quaternion_dist(hbUd, BzON), 0... | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def uuj8(YKHO):\n assert oyIN.allclose(YKHO.stepper.q, YKHO.ODE.exact(YKHO.stepper.t), rtol=0.001, atol=1e-05)",
"def jzSH():\n NSBV = [[1, 0, 0, 0]]\n T8ck = zTi3.check_quaternions(NSBV)\n t_0o(NSBV, T8ck)\n SjMt(type(T8ck), oyIN.ndarray)\n SjMt(T8ck.dtype, oyIN.float64)\n SjMt(T8ck.ndim, 2... | [
"0.6432881",
"0.63669115",
"0.6307198",
"0.62803376",
"0.600475",
"0.5989186",
"0.59654045",
"0.58865666",
"0.58673596",
"0.58640534",
"0.5856488",
"0.5845763",
"0.5842495",
"0.5806429",
"0.5804048",
"0.5789136",
"0.5776353",
"0.57747257",
"0.5760685",
"0.5750213",
"0.5746283... | 0.5581739 | 27 |
Test equivalence of constants that represent no rotation. | def sNxd():
t_0o(zTi3.R_id, zTi3.matrix_from_axis_angle(zTi3.a_id))
t_0o(zTi3.R_id, zTi3.matrix_from_quaternion(zTi3.q_id))
t_0o(zTi3.R_id, zTi3.matrix_from_euler_xyz(zTi3.e_xyz_id))
t_0o(zTi3.R_id, zTi3.matrix_from_euler_zyx(zTi3.e_zyx_id)) | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def QKdv(YKHO):\n assert YKHO.data.rotconsts.shape == (len(YKHO.data.atomcoords), 3)",
"def S_DI(YKHO):\n from pedemath.quat import Quat\n YKHO.assertNotEqual(SoA4(1, -2, 3), 5)\n YKHO.assertNotEqual(SoA4(1, -2, 3), 'abc')\n YKHO.assertNotEqual(SoA4(1, 1, 1), Quat(1, 1, 1, 1))\n YKHO.assertNotE... | [
"0.66059446",
"0.6270688",
"0.61368585",
"0.6078763",
"0.6030151",
"0.602586",
"0.5985331",
"0.59735966",
"0.5959248",
"0.5901648",
"0.5896601",
"0.5890921",
"0.5887384",
"0.5854365",
"0.5854225",
"0.57990503",
"0.57977736",
"0.57966346",
"0.57914954",
"0.5788889",
"0.578846"... | 0.0 | -1 |
Initialize the drawable surface | def FIMM(YKHO, J20S, mawX):
YKHO.surface = J20S
YKHO.rect = mawX | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def DKS8(YKHO):\n if type(YKHO.image_ref) is BglY:\n YKHO.image = YKHO.image_ref\n else:\n LNo8 = qgI7.img(YKHO.image_ref)\n if type(LNo8) is tuple:\n YKHO.image = BglY(UsSh)\n YKHO.image.fill(LNo8)\n elif type(LNo8) is list or type(LNo8) is dict:\n ... | [
"0.7053568",
"0.6702888",
"0.6660765",
"0.651732",
"0.6495449",
"0.6475579",
"0.6423008",
"0.6241607",
"0.62350696",
"0.6222372",
"0.621946",
"0.62041616",
"0.61815536",
"0.6154902",
"0.6130131",
"0.61234355",
"0.6111104",
"0.6104045",
"0.6071729",
"0.60600996",
"0.60506016",... | 0.6689883 | 3 |
return the effective diffusion coefficient in the porous catalyst | def baVq(WzhO, h3MF, jmzt, WTkW):
return WzhO * WTkW * h3MF / jmzt | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"def XQKP(BYpM: int) -> a1PO.Diffusivity:\n return a1PO.Diffusivity(10 ** (-4.536 + -0.1088 * BYpM), 'cm^2/s')",
"def zZRI(YKHO) -> float:\n ...",
"def HpUt(YKHO):\n return YKHO._diffuse_coefficient",
"def bjX8(YKHO):\n return oyIN.abs(YKHO.coherency) ** 2",
"def RHr8(YKHO):\n return 2 * YKHO... | [
"0.68750376",
"0.6755158",
"0.6722923",
"0.65299207",
"0.6489864",
"0.6422776",
"0.64193666",
"0.6395849",
"0.63579047",
"0.6323069",
"0.62970465",
"0.6229028",
"0.62257785",
"0.62219423",
"0.6183919",
"0.6125393",
"0.6114657",
"0.6082984",
"0.6075881",
"0.6062295",
"0.604915... | 0.0 | -1 |