query
stringlengths
10
3.6k
document
stringlengths
19
61.4k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Returns a test suite configured with a test layer.
def Dzji(foZf, JbyC=vPBo, FCbF=FCbF, gEmA=db_j): r8hN = rkJ9.doctest.Manuel(optionflags=JbyC, checker=Pt3C) r8hN += rkJ9.codeblock.Manuel() return FPm9(rkJ9.testing.TestSuite(r8hN, foZf, setUp=FCbF, globs=dict(layer=gEmA)), layer=gEmA)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NxB3():\n DWkG = DuvM.TestLoader()\n CH5L = DWkG.loadTestsFromModule(HwRy.modules[__name__])\n return CH5L", "def NxB3():\n return DuvM.TestLoader().loadTestsFromName(__name__)", "def NxB3():\n DWkG = DuvM.TestLoader()\n KG2J = DuvM.TestSuite()\n KG2J.addTest(DWkG.loadTestsFromTestCase...
[ "0.76350325", "0.7401057", "0.7197761", "0.71340877", "0.7119628", "0.7110631", "0.70487565", "0.7030444", "0.69746447", "0.69642705", "0.69487154", "0.69442624", "0.6922646", "0.68770444", "0.68366295", "0.681701", "0.6802467", "0.6778123", "0.6738736", "0.6681138", "0.66803...
0.56368035
79
Return the value for a win (+1) if the game is over, otherwise return the minimum value over all legal child nodes.
def dgIT(YKHO, QTBn, E6Xd, d4aX, i0Hi): if QTBn.terminal_test(): return QTBn.utility(0) if i0Hi <= 0: return YKHO.score(QTBn) Ty9i = float('inf') for jzdc in QTBn.actions(): Ty9i = min(Ty9i, YKHO.max_value(QTBn.result(jzdc), E6Xd, d4aX, i0Hi - 1)) if Ty9i <= E6Xd: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def E2VJ(YKHO, BH3N, rb7a):\n if YKHO.time_left() < YKHO.TIMER_THRESHOLD:\n raise Z7bg()\n if rb7a == 0 or BH3N.is_winner(YKHO) or BH3N.is_loser(YKHO):\n return YKHO.score(BH3N, YKHO)\n oLdq = BH3N.get_legal_moves(BH3N.active_player)\n cCrA = [(YKHO.minimax_value(BH3N.forecast_move(r8hN),...
[ "0.73772734", "0.72615904", "0.70722085", "0.6971487", "0.6908342", "0.6781943", "0.66904825", "0.66322535", "0.6589574", "0.6579567", "0.6574109", "0.65508115", "0.65438753", "0.65390706", "0.64980227", "0.6480823", "0.6473899", "0.6463454", "0.6454646", "0.6386392", "0.6357...
0.5959784
57
Return the value for a loss (1) if the game is over, otherwise return the maximum value over all legal child nodes.
def bQ6z(YKHO, QTBn, unOp, hRsd, qi10): if QTBn.terminal_test(): return QTBn.utility(0) if qi10 <= 0: return YKHO.score(QTBn) Ty9i = float('-inf') for jzdc in QTBn.actions(): Ty9i = max(Ty9i, YKHO.min_value(QTBn.result(jzdc), unOp, hRsd, qi10 - 1)) if Ty9i >= hRsd: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bQ6z(Ov5A):\n if gVdZ(Ov5A):\n return -1", "def DNZA(YKHO, BH3N, rb7a):\n YKHO.__check_time()\n wEf2 = float('-inf')\n if YKHO.__is_terminal(BH3N, rb7a):\n wEf2 = YKHO.score(BH3N, YKHO)\n else:\n for BZN_ in BH3N.get_legal_moves():\n wEf2 = max(wEf2, YKHO.__min_...
[ "0.7336388", "0.71256316", "0.70073336", "0.6956904", "0.6888057", "0.6767903", "0.67463326", "0.67286676", "0.67062616", "0.6689845", "0.6562635", "0.65383226", "0.6523367", "0.6523264", "0.6508314", "0.64459115", "0.6435481", "0.6431325", "0.64089143", "0.63934004", "0.6388...
0.6366291
21
Spherical average density as a function of 3d radius.
def Hi6O(YKHO, Mkmy, BBiW, wuFe, Achr, TP50=0, fHZS=0, JPqE=0, fXzF=0): S5zb, wuFe, Achr, luAY, zhae = YKHO.param_convert(BBiW, wuFe, Achr, TP50, fHZS) riYg = YKHO._nie_1.density_lens(Mkmy, S5zb, TP50, fHZS, luAY, JPqE, fXzF) ez0h = YKHO._nie_2.density_lens(Mkmy, S5zb, TP50, fHZS, zhae, JPqE, fXzF) TYyO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lqZz(r845, WKvO, LVAh, epBp):\n q7In = oyIN.arccos(epBp)\n rVnq = oyIN.arctan2(LVAh, WKvO)\n return k13E(r845, q7In, rVnq)", "def EozG(YKHO, lfmz: float) -> float:\n iYsj = YKHO.critical_density(z=lfmz).to('solMass / kpc^3').value\n return iYsj", "def Kmov(YKHO, Mkmy, r8hN, epBp, JNU5=None):...
[ "0.65772235", "0.6442502", "0.643668", "0.6411733", "0.63362277", "0.6293318", "0.62569475", "0.62214035", "0.619501", "0.6167706", "0.6165493", "0.61422056", "0.61325884", "0.6105005", "0.60995215", "0.60757124", "0.6069958", "0.6029771", "0.6025661", "0.60089463", "0.600733...
0.0
-1
Get a str of current time
def EUP2(): return qcWV.datetime.now().strftime('%Y-%m-%d %H:%M:%S')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dni_() -> str:\n return qcWV.now().strftime('%FT%H:%M:%S')", "def JUFO() -> str:\n return hLAQ(RN2L())", "def _PtW():\n return F803('%Y_%m_%d_%H_%M_%S_%Z', WPt4())", "def YCc8():\n return JRYC.strftime(JRYC.now(), '%H:%M:%S')", "def JUFO():\n fkZM = str(qcWV.now().strftime('%d-%m-%Y %H:%...
[ "0.865743", "0.86497694", "0.8637203", "0.8448242", "0.84018785", "0.83604866", "0.8354596", "0.8339417", "0.8303579", "0.82449746", "0.81321", "0.80703133", "0.8048203", "0.802489", "0.8009913", "0.80075294", "0.79958105", "0.79369855", "0.7884949", "0.7871418", "0.78655016"...
0.7866158
20
Set the customDescription in the meta based on provided optional custom description or no description. This will inject into the meta the `customDescription` and `showDescriptionValue` if the `description` is provided as argument, otherwise it will inject 'no description'. It returns the meta definition of the widget.
def JXGr(e5kH: Dict, JBZA: Optional[Union[str, bool]]=None, **B2fa) -> cuzp: if JBZA is False or JBZA is None: M_3B = hgpc.DESCRIPTION_OPTION_NOTHING JBZA = '' elif isinstance(JBZA, str): M_3B = hgpc.DESCRIPTION_OPTION_CUSTOM else: raise gOA9("When using the add_card_widget o...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def AqxA(YKHO, QoB4: str) -> None:\n YKHO.metadata.data['description'] = QoB4", "def MeR3(YKHO, rQow=None, odyS=True, mljj=None, dJL_=False):\n return YKHO.get_title_obj_attribute('meta_description', rQow, odyS, mljj, dJL_)", "def MeR3(YKHO):\n J87D = YKHO.meta_description.replace('<title>', YKHO.titl...
[ "0.59299886", "0.58760107", "0.5664593", "0.5646101", "0.56214607", "0.55615705", "0.55515456", "0.554994", "0.5527326", "0.5512343", "0.5463594", "0.5427093", "0.541945", "0.5414692", "0.5400024", "0.5386919", "0.5368402", "0.53523314", "0.5350993", "0.53458434", "0.5321847"...
0.7902633
0
Validates the `slickml version` command.
def QxgO() -> None: WL52 = p9tP() Aofo = WL52.invoke(GSyo, args='version') tDkU(Aofo.exit_code).is_equal_to(0) tDkU(Aofo.output).is_instance_of(str) tDkU(Aofo.output).contains(f'SlickML Version: {BtDU}')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VKPC(YKHO):\n pass", "def vh6r(OaeV, bGrB, BWXx):\n if not BWXx or OaeV.resilient_parsing:\n return\n k8wH.echo(f'geocube v{ANWz.metadata.version('geocube')}')\n OaeV.exit()", "def vh6r():\n XObx = 'PaddlePaddle version 1.6 or higher is required, or a suitable develop version is satis...
[ "0.66529775", "0.6639908", "0.6474816", "0.647093", "0.63744926", "0.6338787", "0.6269328", "0.6083448", "0.60468054", "0.6036306", "0.60277903", "0.5971272", "0.5961025", "0.59483457", "0.5930615", "0.5930225", "0.5925808", "0.5914152", "0.5891469", "0.5887173", "0.5884716",...
0.5960367
13
r"""A value of true is returned if it is a default rewriteaction.
def fy9a(YKHO): try: return YKHO._isdefault except Exception as e: raise tTpl
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pG45(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'redirect_rewrite')", "def pG45(YKHO) -> h8nf[qe4Y.Input[str]]:\n return qe4Y.get(YKHO, 'redirect_rewrite')", "def _n5R(YKHO) -> h8nf['outputs.RuleRuleActionRewriteConfig']:\n return qe4Y.get(YKHO, 'rewrite_config')", "def sK6D(YKHO):\...
[ "0.6304335", "0.6304335", "0.58344686", "0.57790065", "0.5763412", "0.57028294", "0.56745297", "0.56745297", "0.56745297", "0.56710064", "0.5560442", "0.5466676", "0.5448285", "0.5397061", "0.533752", "0.53143483", "0.5301279", "0.5259219", "0.52356434", "0.5216609", "0.52057...
0.50480485
40
r""" Use this API to fetch all the rewriteaction resources that are configured on netscaler.
def NMoC(Emd4, x0hE, mWFP='', PPeq=''): try: if not mWFP: YEnM = A_io() geh0 = YEnM.get_resources(x0hE, PPeq) elif type(mWFP) is not list: if type(mWFP) == Emd4: raise Exception('Invalid parameter name:{0}'.format(type(mWFP))) YEnM = A_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cUP6(YKHO) -> bdIy['outputs.RewriteResponse']:\n return qe4Y.get(YKHO, 'rewrites')", "def cjOO(YKHO) -> bdIy['outputs.GetRulesRuleRuleActionRewriteConfigResult']:\n return qe4Y.get(YKHO, 'rewrite_configs')", "def _n5R(YKHO) -> h8nf['outputs.RuleRuleActionRewriteConfig']:\n return qe4Y.get(YKHO, 'r...
[ "0.6635202", "0.65814066", "0.54352105", "0.5325518", "0.5281006", "0.5271869", "0.52580476", "0.51275", "0.506616", "0.4958792", "0.49507806", "0.49458218", "0.4927503", "0.48807478", "0.4879837", "0.48721504", "0.48533827", "0.48511428", "0.484289", "0.48324654", "0.4830334...
0.5855259
2
Function to declare main member variables. X and Y coordinates are set in random locations right along the left edge of screen
def FIMM(YKHO): YKHO.x = tuKI.uniform(1, 10) YKHO.y = tuKI.uniform(1, 330)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def k2vQ(YKHO):\n m2os = tuKI.randrange(lXK9.SCREEN_MIN_X, lXK9.SCREEN_MAX_X)\n bmPF = tuKI.randrange(lXK9.SCREEN_MIN_Y, lXK9.SCREEN_MAX_Y)\n YKHO.x_coord = m2os\n YKHO.y_coord = bmPF", "def FIMM(YKHO, WKvO, LVAh):\n YKHO.height = WKvO\n YKHO.width = LVAh\n YKHO.grid = YKHO.initialize(YKHO.h...
[ "0.74468565", "0.7133956", "0.70399797", "0.7037827", "0.7037827", "0.69348204", "0.6865996", "0.6836733", "0.6758966", "0.6749782", "0.6749782", "0.6678604", "0.6624898", "0.65936226", "0.6570457", "0.6570457", "0.6570457", "0.6570457", "0.6570457", "0.655606", "0.65469563",...
0.75196844
0
Function to assign center of ball with Point() class' attributes and the velocity from Velocity() class
def FIMM(YKHO): YKHO.center = PvyL() YKHO.velocity = rg7f()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FIMM(YKHO, aPzV, coMm, hgiy, AA86, xVuK):\n YKHO.posn_x = aPzV\n YKHO.posn_y = coMm\n YKHO.velocity_x = hgiy\n YKHO.velocity_y = 100.0\n YKHO.color = xVuK\n YKHO.ball_width = 20.0\n YKHO.ball_height = 20.0\n YKHO.coef_restitution = 0.9", "def YEZH(YKHO, WKvO, LVAh):\n YKHO.x = WKvO...
[ "0.7039646", "0.6801206", "0.67774403", "0.6590186", "0.6381299", "0.631689", "0.62913436", "0.62616825", "0.62611747", "0.6230307", "0.6218584", "0.61599684", "0.6117306", "0.61100805", "0.61074823", "0.60990787", "0.60982317", "0.60596746", "0.60532373", "0.6053025", "0.604...
0.7635171
0
Responsible for making sure ball bounces horizontally but lost if it passes the right edge of screen.
def iUH4(YKHO): YKHO.velocity.dx = -YKHO.velocity.dx return
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hImw(httR):\n if httR:\n l4nO[1] = -l4nO[1]\n else:\n l4nO[0] = -l4nO[0]", "def gBD7(YKHO):\n _tIi = YKHO.surface.get_width() - YKHO.size\n LFlW = YKHO.size\n tlxW = YKHO.size\n es2x = YKHO.surface.get_height() - YKHO.size\n if YKHO.pos.x > _tIi:\n YKHO.pos.x = _tIi\...
[ "0.68605554", "0.6775136", "0.6759548", "0.671623", "0.6630472", "0.66025406", "0.6596937", "0.65426517", "0.6484303", "0.6483002", "0.6480968", "0.64414144", "0.64101404", "0.6392284", "0.6383765", "0.6381507", "0.63758355", "0.6327392", "0.6320571", "0.63168603", "0.6315765...
0.6936616
0
Responsible for making sure ball bounces up and down vertically.
def YqHd(YKHO): YKHO.velocity.dy = -YKHO.velocity.dy return
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def riZZ(YKHO):\n YKHO.y_dir *= -1", "def _I6A(YKHO):\n YKHO._vy = tuKI.uniform(-1.1, -0.9) * YKHO._vy", "def VAu5(YKHO):\n YKHO.dy = -YKHO.dy", "def gBD7(YKHO):\n _tIi = YKHO.surface.get_width() - YKHO.size\n LFlW = YKHO.size\n tlxW = YKHO.size\n es2x = YKHO.surface.get_height() - YKHO....
[ "0.76470816", "0.75425434", "0.72014", "0.7162889", "0.7140294", "0.7117331", "0.71083456", "0.7053118", "0.6982345", "0.6925602", "0.6903974", "0.6897591", "0.6808927", "0.67745864", "0.6760082", "0.67221045", "0.6614949", "0.6604583", "0.65904814", "0.65849024", "0.6572808"...
0.7755596
0
Checks to see if the ball has hit the paddle and if so, calls its bounce method.
def ybvY(YKHO): DTSn = _Z6J / 2 + oat2 mgki = dbOv / 2 + oat2 if abs(YKHO.ball.center.x - YKHO.paddle.center.x) < DTSn and abs(YKHO.ball.center.y - YKHO.paddle.center.y) < mgki and (YKHO.ball.velocity.dx > 0): YKHO.ball.bounce_horizontal() YKHO.score += a8iX
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def u8DF(YKHO):\n if YKHO.window.get_object_at(YKHO.ball.x, YKHO.ball.y + YKHO.radius * 2) is YKHO.paddle:\n YKHO.bounce()\n if YKHO.window.get_object_at(YKHO.ball.x + YKHO.radius * 2, YKHO.ball.y + YKHO.radius * 2) is YKHO.paddle:\n YKHO.bounce()", "def CjG0(YKHO):\n if YKHO._ball.getLeft...
[ "0.798999", "0.7777622", "0.7708951", "0.7706148", "0.76476926", "0.76099795", "0.74214804", "0.73795027", "0.7288236", "0.72598", "0.7258313", "0.72472936", "0.72299653", "0.71720135", "0.70372385", "0.69409704", "0.6931272", "0.6882324", "0.6877795", "0.6740171", "0.6583581...
0.6979026
15
Checks to see if the ball has hit the borders of the screen and if so, calls its bounce methods.
def UylV(YKHO): if YKHO.ball.center.x < 0 and YKHO.ball.velocity.dx < 0: YKHO.ball.bounce_horizontal() if YKHO.ball.center.y < 0 and YKHO.ball.velocity.dy < 0: YKHO.ball.bounce_vertical() if YKHO.ball.center.y > vkJL and YKHO.ball.velocity.dy > 0: YKHO.ball.bounce_vertical()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def CjG0(YKHO):\n if YKHO._ball.getLeft() <= 0 or YKHO._ball.getRight() >= xpNW:\n YKHO._ball.bounceSides()\n if YKHO._ball.getTop() >= ralU:\n YKHO._ball.bounceTopBottom()\n YKHO._ball.moveBall()\n YKHO._updateCollisions()", "def LuU0(YKHO):\n for nYVo in YKHO.overlapping_sprites:\n...
[ "0.78495353", "0.7828999", "0.76905483", "0.75966907", "0.75013435", "0.7473912", "0.74503756", "0.7166787", "0.7094467", "0.7084806", "0.7053152", "0.7021688", "0.7005068", "0.6914101", "0.6866494", "0.68219787", "0.6757214", "0.67538184", "0.6732893", "0.6680376", "0.66755"...
0.81079966
0
Runs at the end of the test case; drops the db
def tBIc(YKHO): with YKHO.app.app_context(): NCls.session.remove() NCls.drop_all()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mTtn():\n GTYX()", "def tBIc(YKHO):\n NCls.session.commit()\n NCls.drop_all()", "def tBIc(YKHO):\n YKHO.db.drop_all()\n pass", "def tBIc(YKHO):\n with P4t4.app_context():\n NCls = P4t4.db.get_db()\n DpUl = NCls.cursor()\n with P4t4.open_resource('sql/drop_tests.sql'...
[ "0.87688816", "0.8661875", "0.8634616", "0.85929716", "0.8583327", "0.85801166", "0.85801166", "0.85801166", "0.85801166", "0.85801166", "0.85801166", "0.85801166", "0.85801166", "0.85801166", "0.85801166", "0.85801166", "0.85801166", "0.85801166", "0.85801166", "0.85801166", ...
0.82276815
73
Exports the weather dataframe as a csv file formatted for importing into Amicus.
def vepz(gyP3: DataFrame, LXkU) -> None: YITS = gyP3[PKvH].to_frame(name='Date time') YITS['Air temperature (°C)'] = gyP3[VOCU] YITS['Relative humidity (%)'] = gyP3[Brq_] YITS['10 m wind speed (km/h)'] = gyP3[fsvu] YITS['Wind direction (°)'] = gyP3[d_pB] YITS['Cloud cover (%)'] = 0 LXkU = f'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def RJnH(YKHO):\n jQ3Z = rLdf.read_sql('SELECT * FROM sensor_data', YKHO.conn)\n jQ3Z.to_csv('output/sensor_data.csv', index=False)", "def RZtn(YKHO):\n YKHO.tableView.df.to_csv('Data export.csv', index=False)\n print('CSV file exported')", "def qV1b():\n UzPC = iHv3.connect('sensordata.db')\n ...
[ "0.7839396", "0.73751986", "0.7328462", "0.71246094", "0.70415", "0.7000611", "0.69713014", "0.69679004", "0.69349575", "0.6801677", "0.6783012", "0.67826456", "0.6775847", "0.67722857", "0.67339593", "0.67338246", "0.6722942", "0.66809446", "0.663279", "0.657332", "0.6567911...
0.7589649
1
Retrieves an organisation from the repository
def neBz(YKHO, PnyW: OrganisationId) -> h8nf[JUVT]: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yu6g(YKHO):\n return OqHK.deserialize(YKHO._get_single('org', {}, from_results=False))", "def yu6g(YKHO, tjyd=False):\n return OqHK.deserialize(YKHO._get_raw('org', {}, tjyd))", "def DrZz(CBIr, UivO):\n return rDfa(CBIr, UivO).get()", "def zPWF(wbiw):\n return npru(kym7, wbiw)", "def cvbw(Y...
[ "0.7201799", "0.7143288", "0.7084282", "0.7046704", "0.6988632", "0.6962273", "0.69420457", "0.6782259", "0.67702776", "0.6766686", "0.6682064", "0.6671275", "0.66634905", "0.6579827", "0.6555584", "0.65302795", "0.6458586", "0.6435865", "0.6434992", "0.6410172", "0.64003015"...
0.7570137
0
Transform nltk POS to wordnet POS.
def QhUD(oeNL: str) -> str: oeNL = oeNL.lower() t7IV = 'n' if oeNL.startswith('j'): t7IV = 'a' elif oeNL[0] in ('n', 'r', 'v'): t7IV = oeNL[0] return t7IV
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _ivB(oeNL):\n if oeNL[0] == 'J':\n return Dhdw.corpus.wordnet.ADJ\n elif oeNL[0] == 'V':\n return Dhdw.corpus.wordnet.VERB\n elif oeNL[0] == 'N':\n return Dhdw.corpus.wordnet.NOUN\n elif oeNL[0] == 'R':\n return Dhdw.corpus.wordnet.ADV\n else:\n return Dhdw.cor...
[ "0.6720926", "0.6385923", "0.6300673", "0.6275617", "0.62179047", "0.6204052", "0.6181552", "0.6084939", "0.6077209", "0.60389775", "0.6019915", "0.6008052", "0.6008052", "0.6008052", "0.6008052", "0.6008052", "0.6008052", "0.59951156", "0.5990497", "0.597806", "0.59759283", ...
0.0
-1
Turn a set of `re` flags into a string suitable for inclusion in a regex. >>> import superexpressive as se >>> se.re_flags_to_string(re.A) '(?a)' >>> import superexpressive as se >>> se.re_flags_to_string(re.IGNORECASE | re.LOCALE) '(?iL)' >>> import superexpressive as se >>> se.re_flags_to_string() ''
def JcWm(JbyC: int=0) -> str: K9g9 = {ZbWC.ASCII: 'a', ZbWC.IGNORECASE: 'i', ZbWC.LOCALE: 'L', ZbWC.UNICODE: 'u', ZbWC.MULTILINE: 'm', ZbWC.DOTALL: 's', ZbWC.VERBOSE: 'x'} RWbS = '' for ONGV, xs1j in K9g9.items(): if JbyC & ONGV: RWbS += xs1j return f'(?{RWbS})' if RWbS else ''
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _1DY(JbyC):\n return ObPa(JbyC, zXCM, YiHl)", "def SFZn(*qIxc: List[str], JbyC: int=0, compile: bool=True) -> uLKX[str, ZbWC.compile]:\n mXDZ = ''.join(qIxc)\n if compile:\n return ZbWC.compile(mXDZ, flags=JbyC)\n else:\n UPOC = JcWm(JbyC)\n mXDZ = f'{UPOC}{mXDZ}'\n re...
[ "0.6624036", "0.61152077", "0.59513146", "0.5809818", "0.5799426", "0.57630664", "0.56715584", "0.5597607", "0.55446595", "0.55166924", "0.5434782", "0.54221", "0.54160994", "0.52571785", "0.5225581", "0.5205827", "0.5185662", "0.50566024", "0.5014961", "0.49905992", "0.49066...
0.87320936
0
A length 1 item that matches any of the included characters. >>> import superexpressive as se >>> se.any_of_chars('A', 'F', 'dkja') '[AFdkja]'
def V7Bz(*qIxc: List[str]) -> str: gLiZ = ''.join(qIxc) return f'[{gLiZ}]'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TErK(gLiZ):\n return UIgY('[' + ZbWC.escape(gLiZ) + ']')", "def g83o(vIwR, SIyd):\n assert type(vIwR) is str\n assert iter(SIyd)\n return False not in [bseI in vIwR for bseI in SIyd]", "def Pt0a(YKHO):\n YKHO.assertTrue(xRT2('a'))\n YKHO.assertTrue(xRT2('b'))", "def VRoI(*qIxc: List[str...
[ "0.7097736", "0.6058937", "0.59057176", "0.58306646", "0.5787647", "0.5732651", "0.57322675", "0.5691855", "0.5670252", "0.5577965", "0.55327433", "0.5481739", "0.5469526", "0.54675406", "0.54498774", "0.5449688", "0.54294145", "0.53325975", "0.5286011", "0.52833676", "0.5264...
0.6909282
1
Overridden. Return a window containing the main content of the dialog.
def GK72(YKHO): return YKHO.FindWindow('content')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def HC_s(YKHO) -> Cvzl:\n return YKHO._main_window", "def niAW(YKHO):\n return YKHO._main_win", "def LTbw():\n pass", "def EGKw(YKHO):\n return YKHO.window", "def ErKj():\n pJo9 = hYxE.MQtUtil.mainWindow()\n return h_2_(Swre(pJo9), x5x0.QWidget)", "def ErKj():\n pJo9 = hYxE.MQtUtil.m...
[ "0.7395543", "0.7219583", "0.71592057", "0.70130676", "0.68830043", "0.68830043", "0.68830043", "0.6858769", "0.6769049", "0.674174", "0.6695728", "0.6677378", "0.6654865", "0.65950394", "0.6584246", "0.6475057", "0.6457443", "0.64419985", "0.64361936", "0.64361936", "0.64214...
0.69362885
4
Assign the content window to this dialog.
def pDoH(YKHO, KnxT): KnxT.SetName('content') KnxT.SetBackgroundColour(lnPd.GetApp().settings.bg_color) KnxT.SetForegroundColour(lnPd.GetApp().settings.fg_color) KnxT.SetFont(lnPd.GetApp().settings.text_font)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GK72(YKHO):\n return YKHO.FindWindow('content')", "def SvQl(YKHO, TEdI):\n YKHO.content = TEdI", "def RJkC(YKHO, yzQ0):\n YKHO.window = yzQ0", "def GBeQ(YKHO, nVrR):\n pass", "def X5bs(Emd4, leAC, hGN5):\n FzR0 = Kbxl(title=leAC, content=hGN5, size_hint=(0.8, None), height=TifC(250), aut...
[ "0.66529715", "0.6434889", "0.6285857", "0.6214485", "0.61130077", "0.6101298", "0.6094938", "0.60076296", "0.5951275", "0.5916565", "0.5868372", "0.5795479", "0.5709565", "0.5680944", "0.56758136", "0.5666169", "0.56418693", "0.55526847", "0.55474746", "0.5544652", "0.552217...
0.67843306
0
Return a vertical static line.
def utwz(YKHO, _AKB, rb7a=1): zFiD = owuj(_AKB, orient=lnPd.LI_VERTICAL) zFiD.SetMinSize(lnPd.Size(rb7a, -1)) zFiD.SetSize(lnPd.Size(rb7a, -1)) zFiD.SetPenStyle(lnPd.PENSTYLE_SOLID) zFiD.SetDepth(rb7a) zFiD.SetForegroundColour(YKHO.GetForegroundColour()) return zFiD
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def C0t4(a1PO, exwG):\n D5g7(a1PO)\n Gcbu(a1PO, exwG)\n QZcN(a1PO)", "def cbEp(YKHO):\n return YKHO.cv.create_line(0, 0, 0, 0, fill='', width=2, capstyle=cqfR.ROUND)", "def RO9f(YKHO, AU8u: Sequence[float], **B2fa) -> NTRO:\n return YKHO.get_line_from_axis_to_point(0, AU8u, **B2fa)", "def C0t4...
[ "0.7034275", "0.68892854", "0.6814996", "0.6659123", "0.6497669", "0.64920145", "0.63483816", "0.6292037", "0.626732", "0.6212418", "0.60922736", "0.6033434", "0.5909657", "0.58432186", "0.5842352", "0.58406615", "0.5830174", "0.5825188", "0.5819703", "0.58046913", "0.5788228...
0.72394747
0
Fadein opacity of the dialog.
def doI0(YKHO, *qIxc): YKHO.opacity_in += YKHO.deltaN if YKHO.opacity_in <= 0: YKHO.deltaN = -YKHO.deltaN YKHO.opacity_in = 0 if YKHO.opacity_in >= 255: YKHO.deltaN = -YKHO.deltaN YKHO.opacity_in = 255 YKHO.timer1.Stop() YKHO.SetTransparent(YKHO.opacity_in)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ptkH(YKHO):\n while 1:\n YKHO._alpha_amount -= 10\n if YKHO._alpha_amount <= 0:\n YKHO._alpha_amount = 255\n return\n YKHO.SetTransparent(YKHO._alpha_amount)\n lnPd.SafeYield()\n lnPd.MilliSleep(15)", "def oQ5X(YKHO, tvqc):\n pass", "def KCGX(Y...
[ "0.6712135", "0.65582323", "0.63700897", "0.6065584", "0.6010138", "0.59761536", "0.58341897", "0.5811401", "0.5772434", "0.56834716", "0.56687903", "0.5653866", "0.5646091", "0.5616334", "0.5612764", "0.5586602", "0.55856335", "0.553369", "0.55176526", "0.55113614", "0.54788...
0.5253901
25
Fadeout opacity of the dialog.
def qEMW(YKHO, *qIxc): YKHO.opacity_out += YKHO.deltaN G9jH.debug('opacity = {:d}'.format(YKHO.opacity_out)) if YKHO.opacity_out >= 255: YKHO.deltaN = -YKHO.deltaN YKHO.opacity_out = 255 YKHO.timer2.Stop() if YKHO.opacity_out <= 0: YKHO.deltaN = -YKHO.deltaN YKHO....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ptkH(YKHO):\n while 1:\n YKHO._alpha_amount -= 10\n if YKHO._alpha_amount <= 0:\n YKHO._alpha_amount = 255\n return\n YKHO.SetTransparent(YKHO._alpha_amount)\n lnPd.SafeYield()\n lnPd.MilliSleep(15)", "def T_P1(YKHO, T_P1):\n a9eO.mixer.music.fad...
[ "0.68651307", "0.6513315", "0.629913", "0.62010366", "0.61249274", "0.59980416", "0.59793377", "0.58805496", "0.5848932", "0.57893014", "0.5753309", "0.57012916", "0.5612499", "0.56114745", "0.5591843", "0.55330086", "0.5530878", "0.54946196", "0.5455164", "0.5442472", "0.543...
0.555935
15
Return a proportional size value.
def OpEy(BWXx): try: Usv_ = int(float(BWXx) * lnPd.GetApp().settings.size_coeff) except AttributeError: Usv_ = int(BWXx) return Usv_
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def O656(YKHO):\n return YKHO.proportion", "def gM85(yzQ0, MKlR, xu65=256):\n d4rl = xu65\n G1Hx = float(yzQ0) / float(MKlR)\n if yzQ0 > MKlR:\n NneL = d4rl\n scf4 = int(NneL / G1Hx)\n elif yzQ0 < MKlR:\n scf4 = d4rl\n NneL = int(scf4 * G1Hx)\n else:\n scf4 = ...
[ "0.7298712", "0.68818516", "0.6734537", "0.6581888", "0.6459702", "0.6437677", "0.6403491", "0.6367083", "0.63393307", "0.62594587", "0.625514", "0.6233785", "0.6216065", "0.6205839", "0.62009037", "0.61976385", "0.61776483", "0.6173507", "0.617318", "0.6172196", "0.61262584"...
0.63491035
8
Convert a snake case to camel case
def hr_R(vIwR): return ''.join((GIN8.title() for GIN8 in vIwR.split('_')))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kCQi(BQoY: str) -> str:\n V22M = BQoY.strip('_').split('_')\n return V22M[0] + ''.join((GIN8[:1].upper() + GIN8[1:] for GIN8 in V22M[1:]))", "def hr_R(BQoY):\n qWBe = BQoY.split('_')\n return ' '.join(qWBe).title()", "def kCQi(BWXx):\n V22M = BWXx.strip('_').split('_')\n return V22M[0].lo...
[ "0.85531586", "0.8521463", "0.8440934", "0.8360003", "0.82450986", "0.82365894", "0.82344395", "0.817078", "0.8089525", "0.808807", "0.808807", "0.80655485", "0.8030042", "0.8013399", "0.7962193", "0.7946988", "0.79186666", "0.7893642", "0.78589356", "0.7820551", "0.78112876"...
0.7907187
17
changes Rubylike YAML file to a list of dictionaries of dictionaries etc.
def M9fo(nUeQ='plewic.01.0001.yaml'): DZkp = 'plewic_python.' + '.'.join(nUeQ.split('.')[1:]) EtAa = set([':user:', ':revision:', '!ruby/object:']) MVVZ = [] Y0OW = False global file_holder SM1e = nUeQ with open(nUeQ, 'r') as GD7N: vDxM = True rEoI = -1 while True: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wGUH():\n nPrm = {'name': 'george', 'age': 16, 'friends': [{'name': 'marry', 'age': 16}, {'name': 'jack', 'age': 17}]}\n cwkY = eJb6.dump(nPrm)\n TLI7 = Hy7s.path.dirname(Hy7s.path.dirname(xAKo))\n h_xa = '/'.join([TLI7, 'data'])\n qaEx = h_xa + '/' + 'test.yaml'\n with open(qaEx, 'w') as nDE...
[ "0.6709343", "0.6476866", "0.6414832", "0.6353843", "0.6236895", "0.61842465", "0.6149002", "0.6097069", "0.6077178", "0.60674024", "0.602638", "0.5962776", "0.59446704", "0.59408236", "0.5877493", "0.5871509", "0.5836809", "0.58286023", "0.5824188", "0.5817663", "0.5810871",...
0.6207877
5
Returns the duration dict
def EdTY(YKHO): return YKHO.duration
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def WbTE(fCoM):\n WbTE = {}\n WbTE['day'] = fCoM.days\n Qb0Y, WbTE['second'] = divmod(fCoM.seconds, 60)\n WbTE['hour'], WbTE['minute'] = divmod(Qb0Y, 60)\n return WbTE", "def WbTE(YKHO):\n return YKHO._get('duration')", "def WbTE(YKHO):\n return YKHO._get('duration')", "def WbTE(YKHO):\n...
[ "0.7514982", "0.7157288", "0.71035075", "0.704194", "0.704194", "0.69898725", "0.69510144", "0.68659633", "0.6798888", "0.67785954", "0.6721468", "0.6705861", "0.67018634", "0.6690495", "0.668531", "0.668531", "0.668531", "0.668531", "0.668531", "0.668531", "0.668531", "0.6...
0.6945955
7
Returns the duration dict
def hCpU(YKHO): return YKHO.between_commands
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def WbTE(fCoM):\n WbTE = {}\n WbTE['day'] = fCoM.days\n Qb0Y, WbTE['second'] = divmod(fCoM.seconds, 60)\n WbTE['hour'], WbTE['minute'] = divmod(Qb0Y, 60)\n return WbTE", "def WbTE(YKHO):\n return YKHO._get('duration')", "def WbTE(YKHO):\n return YKHO._get('duration')", "def WbTE(YKHO):\n...
[ "0.7514982", "0.7157288", "0.71035075", "0.704194", "0.704194", "0.69898725", "0.69510144", "0.6945955", "0.68659633", "0.6798888", "0.67785954", "0.6721468", "0.6705861", "0.67018634", "0.6690495", "0.668531", "0.668531", "0.668531", "0.668531", "0.668531", "0.668531", "0....
0.0
-1
Calculate the duration for a transmission between the first and the `node_num`s node as a datetime.timedelta. This method needs to be implemented.
def WbTE(YKHO): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def WbTE(YKHO):\n return YKHO.t2 - YKHO.t1", "def UDEp(YKHO):\n return YKHO._nodes_time", "def EdTY(YKHO, vHj7):\n return vHj7 - YKHO.slam.get_data(node_name=YKHO.last_point_name)['time']", "def EdTY(YKHO):\n return float(YKHO.time.iloc[-1] - YKHO.time.iloc[0])", "def T12X(YKHO):\n return YK...
[ "0.57289964", "0.56476265", "0.56071085", "0.5585202", "0.5563804", "0.5550958", "0.554723", "0.55195343", "0.55195343", "0.551362", "0.5490098", "0.547661", "0.5453543", "0.53933656", "0.5373028", "0.53669167", "0.536428", "0.5336475", "0.5327848", "0.53093374", "0.5260612",...
0.48692286
70
Creates a symmetry operation from a rotation matrix and a translation vector.
def dH2E(Emd4, bULF=((1, 0, 0), (0, 1, 0), (0, 0, 1)), N0fI=(0, 0, 0), F1TX=((1, 0, 0), (0, 1, 0), (0, 0, 1)), sOxX=(0, 0, 0), yJiH=0.1): bULF = oyIN.array(bULF) N0fI = oyIN.array(N0fI) if bULF.shape != (3, 3): raise ValueError('Rotation Matrix must be a 3x3 numpy array.') if N0fI.shape != (3,):...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rrK4(r8hN, MicQ, N0Pp):\n\n def rJfl(r8hN):\n return tuple(reversed(r8hN))\n\n def SjGj(r8hN):\n return tuple((tuple(reversed(r8hN[WKvO][:])) for WKvO in range(len(r8hN))))\n X2PW = {r8hN}\n if MicQ:\n X2PW = X2PW | {rJfl(r8hN), SjGj(r8hN), rJfl(SjGj(r8hN))}\n if N0Pp:\n ...
[ "0.6287702", "0.60923773", "0.6083054", "0.608204", "0.60634536", "0.6053644", "0.5985068", "0.59602416", "0.5882171", "0.5882171", "0.5877154", "0.5874965", "0.5804815", "0.5720199", "0.5666781", "0.56627554", "0.565641", "0.5631901", "0.5569029", "0.55678266", "0.5562333", ...
0.0
-1
Applies rotation portion to a tensor. Note that tensor has to be in full form, not the Voigt form.
def rDLC(YKHO, vhpA): tpio = vhpA.shape fdMZ = len(tpio) assert all([YRbF == 3 for YRbF in tpio]) z5la = vIwR.ascii_lowercase _0VL = (z5la[:fdMZ], z5la[fdMZ:2 * fdMZ]) UU2t = ','.join([jzdc + YRbF for jzdc, YRbF in zip(*_0VL)]) UU2t += ',{}->{}'.format(*_0VL[::-1]) eavS = [YKHO.rotation_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def N0Pp(YKHO, DWJ0: Union[Tensor, np.ndarray, float], jDK_: Optional[int]=None) -> llWB:\n if not isinstance(DWJ0, llWB):\n DWJ0 = YKHO.tensor.new_tensor(DWJ0)\n assert DWJ0.shape == ht2j.Size([3, 3]) or DWJ0.numel() == 1, f'invalid rotation shape {DWJ0.shape}'\n if jDK_ is None:\n jDK_ = Y...
[ "0.6283869", "0.62538576", "0.6072927", "0.60491985", "0.5795175", "0.57842904", "0.5770796", "0.57429916", "0.5725348", "0.57105094", "0.56834596", "0.5657569", "0.5650958", "0.5645559", "0.56025314", "0.5592231", "0.5574966", "0.5568153", "0.55587983", "0.5537416", "0.55275...
0.6079811
2
A 3x3 numpy.array representing the rotation matrix.
def bULF(YKHO): return YKHO.affine_matrix[0:3][:, 0:3]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qMCU(YKHO) -> oyIN.ndarray:\n XyWv = oyIN.zeros((3, 3))\n YiEH = 2 * YKHO.x * YKHO.x\n h8m3 = 2 * YKHO.y * YKHO.y\n BC0e = 2 * YKHO.z * YKHO.z\n L2PY = 2 * YKHO.w * YKHO.x\n dQrM = 2 * YKHO.w * YKHO.y\n TRdG = 2 * YKHO.w * YKHO.z\n f_72 = 2 * YKHO.x * YKHO.y\n Lliw = 2 * YKHO.x * YKH...
[ "0.8225689", "0.7458449", "0.74491125", "0.74262255", "0.7270437", "0.72640806", "0.7225547", "0.719604", "0.7179377", "0.7155655", "0.71342736", "0.7130868", "0.7110312", "0.7080335", "0.7061877", "0.7014485", "0.69881886", "0.698092", "0.69518113", "0.69000506", "0.68524456...
0.7820476
1
Changes RGB [0,1] valued image to BGR [0,255] with mean subtracted.
def vGiv(VXjJ): yvT9 = XTiz.copy(VXjJ) yvT9 -= ArnK[None, None, :] yvT9 = yvT9[:, :, [2, 1, 0]] return yvT9
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cMpu(YKHO, VXjJ: np.ndarray) -> oyIN.ndarray:\n fVVZ = VXjJ.astype(float) - YKHO.bg\n fVVZ /= fVVZ.max()\n return fVVZ", "def okCT(YKHO, LNo8):\n return (LNo8 / 255.0)[:, :, ::-1]", "def rvmn(VXjJ):\n VXjJ = 255 - VXjJ\n return VXjJ", "def NkkI(VXjJ):\n return (VXjJ / 255.0 - 0.5) / ...
[ "0.6844709", "0.6844558", "0.6683562", "0.66460234", "0.6582157", "0.6481389", "0.64260936", "0.64152306", "0.63956726", "0.63849556", "0.63461757", "0.6338296", "0.63148713", "0.63080424", "0.6254225", "0.625152", "0.62453556", "0.623202", "0.6223897", "0.62127256", "0.62056...
0.63327444
12
Dot product for two lists.
def tM4L(AjzU, _sQW): return [oyIN.dot(WKvO[0].T, WKvO[1]) for WKvO in zip(AjzU, _sQW)]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pxL1(hQHm, jlSq):\n return sum(JaxB(seET.mul, hQHm, jlSq))", "def pxL1(WKvO, LVAh):\n return sum(JaxB(seET.mul, WKvO, LVAh))", "def uYbU(hQHm, jlSq):\n return hQHm[0] * jlSq[0] + hQHm[1] * jlSq[1]", "def pxL1(lSjb, v8Fa):\n import operator\n return sum(map(operator.mul, lSjb, v8Fa))", "d...
[ "0.8290546", "0.8147137", "0.79608387", "0.7949161", "0.7902275", "0.78892195", "0.7853784", "0.783287", "0.7825258", "0.7789848", "0.77896935", "0.77891684", "0.7753578", "0.77484345", "0.7699132", "0.7694744", "0.7678852", "0.76744646", "0.7649855", "0.7636648", "0.7613619"...
0.80125606
2
returns if the coordinate is valid
def SGVO(WKvO, LVAh): return (WKvO >= 0) & (WKvO < P5Bq) & (LVAh >= 0) & (LVAh < P5Bq)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def IuuK(YKHO, WKvO, LVAh):\n return WKvO >= 0 and WKvO < YKHO.width and (LVAh >= 0) and (LVAh < YKHO.height)", "def SGVO(YKHO) -> _ABP.BooleanValue:\n return IPme.GeoIsValid(YKHO).to_expr()", "def SGVO(YKHO):\n if len(YKHO.exterior) < 3:\n return False\n return YKHO.to_shapely_polygon().is_...
[ "0.7635393", "0.7472494", "0.74480176", "0.74360436", "0.74203867", "0.7327456", "0.7303246", "0.72949624", "0.726949", "0.7233637", "0.7144868", "0.71197385", "0.70538825", "0.7045558", "0.7041876", "0.7004137", "0.6978121", "0.6902285", "0.6894375", "0.68855935", "0.6874322...
0.6209266
88
Create a minesweeper game.
def FIMM(YKHO, BrEt=P5Bq, vEqt=NGU3): YKHO.board_size = BrEt YKHO.num_mines = vEqt YKHO.board = ZvR8(BrEt, vEqt) YKHO.my_board = oyIN.ones((BrEt, BrEt), dtype=int) * LTBJ YKHO.valid_actions = oyIN.ones((YKHO.board_size, YKHO.board_size), dtype=oyIN.bool) YKHO.observation_space = oi6k.Box(low=-2,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def minesweeper(YKHO, OaeV, TVTK: int=5, H2v2: int=5, STkk: int=5, dsE5=None):\n if TVTK <= 0 or H2v2 <= 0 or STkk <= 0:\n await OaeV.send('Please enter width, height, and number of mines greater than zero.', delete_after=10)\n return\n WGcV = [[0 for MKlR in range(H2v2)] for yzQ0 in rang...
[ "0.71119905", "0.7079213", "0.7059485", "0.7055157", "0.7003343", "0.6783584", "0.67306495", "0.65587604", "0.6529097", "0.6506076", "0.6492845", "0.64354086", "0.64216906", "0.6366257", "0.6360492", "0.6312773", "0.63115317", "0.62686133", "0.6266905", "0.62617075", "0.62253...
0.0
-1
Create a minesweeper game.
def FIMM(YKHO, BrEt=P5Bq, vEqt=NGU3): YKHO.board_size = BrEt YKHO.num_mines = vEqt YKHO.board = ZvR8(BrEt, vEqt) YKHO.my_board = oyIN.ones((BrEt, BrEt), dtype=int) * LTBJ YKHO.num_actions = 0 YKHO.observation_space = oi6k.Box(low=-2, high=9, shape=(YKHO.board_size, YKHO.board_size), dtype=oyIN.i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def minesweeper(YKHO, OaeV, TVTK: int=5, H2v2: int=5, STkk: int=5, dsE5=None):\n if TVTK <= 0 or H2v2 <= 0 or STkk <= 0:\n await OaeV.send('Please enter width, height, and number of mines greater than zero.', delete_after=10)\n return\n WGcV = [[0 for MKlR in range(H2v2)] for yzQ0 in rang...
[ "0.71119905", "0.7079213", "0.7059485", "0.7055157", "0.7003343", "0.6783584", "0.67306495", "0.65587604", "0.6529097", "0.6506076", "0.6492845", "0.64354086", "0.64216906", "0.6366257", "0.6360492", "0.6312773", "0.63115317", "0.62686133", "0.6266905", "0.62617075", "0.62253...
0.0
-1
Return True iff two lines are perpendicular
def VQ55(neQZ, ywKv): if not all((isinstance(aPd6, NTRO) for aPd6 in (neQZ, ywKv))): raise TypeError('_l_() expects two lines') return neQZ.normal_vec() * ywKv.normal_vec() == 0
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ScI_(jzdc, Fg_i, EBgd, HpuQ):\n TEa0(jzdc, (3,), (-1, 3), name='a')\n N6QS.shape.check(locals(), 'b', jzdc.shape)\n N6QS.shape.check(locals(), 'p1', jzdc.shape)\n N6QS.shape.check(locals(), 'p2', jzdc.shape)\n Sk2z = Fg_i - jzdc\n return N6QS.dot(N6QS.cross(Sk2z, EBgd - jzdc), N6QS.cross(Sk2z...
[ "0.75375444", "0.7429906", "0.71164393", "0.6961527", "0.6945664", "0.69406855", "0.689354", "0.68928206", "0.683313", "0.6813058", "0.6732602", "0.66901326", "0.66415787", "0.66334033", "0.66201824", "0.6606393", "0.6578443", "0.6523774", "0.6521847", "0.6519163", "0.6519163...
0.68369126
8
Return the last error string.
def Rgsj(yHDX): return p0Jv.strerror(yHDX)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def isRP(YKHO):\n return YKHO._error_string", "def YIKv():\n BQDi, P1dF = HwRy.exc_info()[0:2]\n d2YU = str(BQDi)\n if '<class' in d2YU:\n d2YU = d2YU.split(\"'\")[1]\n d2YU = d2YU.replace('dns.exception.', '')\n P1dF = '%s %s' % (d2YU, P1dF)\n return P1dF.rstrip()", "def S0w3(YKHO)...
[ "0.7801384", "0.77900064", "0.76998794", "0.7655489", "0.74398726", "0.73745316", "0.7249249", "0.71920145", "0.7148343", "0.71236336", "0.70572394", "0.6967696", "0.69484645", "0.6870067", "0.6870067", "0.6870067", "0.6862114", "0.68450445", "0.6833759", "0.6831707", "0.6817...
0.0
-1
Return the device name.
def ZQv6(yHDX): return p0Jv.device_get_name(yHDX)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def ueYb(YKHO):\n mWFP = YKHO._device['name']\n if not mWFP or mWFP == '--':\n mWFP = YKHO._mac\n return mWFP", "def yxaP(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'device_name')", "def yxaP(YKHO) -> h8nf[str]:\n return qe4Y.get(YKHO, 'device_name')", "def yxaP(YKHO) -> qe4Y.Input[str...
[ "0.8788066", "0.87851596", "0.87851596", "0.86620736", "0.86620736", "0.86360085", "0.86360085", "0.86360085", "0.86346877", "0.8572782", "0.8427779", "0.8426968", "0.8376641", "0.830186", "0.82401216", "0.8203853", "0.81880784", "0.81346387", "0.8027384", "0.79859686", "0.79...
0.7623448
28
Return the device connection string.
def F9o6(yHDX): return p0Jv.device_get_connstring(yHDX)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VeaS(YKHO) -> str:\n pass", "def YtR6(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'connection_string')", "def YtR6(YKHO) -> qe4Y.Output[str]:\n return qe4Y.get(YKHO, 'connection_string')", "def begE(YKHO) -> str:\n return YKHO._device", "def YtR6(YKHO) -> qe4Y.Output[h8nf[str]]:\n ...
[ "0.7637919", "0.7562592", "0.7562592", "0.7217359", "0.7163468", "0.6940765", "0.68373865", "0.68175423", "0.67627054", "0.67294014", "0.6644681", "0.6644681", "0.66303134", "0.659762", "0.65929246", "0.6565107", "0.65532345", "0.65360665", "0.6520301", "0.6508784", "0.648017...
0.70888174
5
Get supported baud rates.
def Wuoc(yHDX, Ttiv, PziJ): return p0Jv.device_get_supported_baud_rate(yHDX, Ttiv, PziJ)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hw6u(YKHO):\n return YKHO._read(jl5R)", "def p9vX(YKHO):\n return YKHO._baudrate", "def srFQ(YKHO):\n if YKHO.yotta_config and 'mbed-os' in YKHO.yotta_config:\n if 'stdio' in YKHO.yotta_config['mbed-os']:\n if 'default-baud' in YKHO.yotta_config['mbed-os']['stdio']:\n ...
[ "0.6981226", "0.6858425", "0.6422032", "0.6315792", "0.6092807", "0.59904325", "0.56992114", "0.56688", "0.56106347", "0.5532839", "0.5402132", "0.54003185", "0.53817034", "0.53686213", "0.5355297", "0.53449285", "0.53266823", "0.5315218", "0.53134626", "0.5277024", "0.527702...
0.7153391
0
Computes the intersection over union (IoU) between two boxes.
def rP5y(YKHO, UBSY): NZ85 = min(YKHO.x_max, UBSY.x_max) - max(YKHO.x_min, UBSY.x_min) EBA4 = min(YKHO.y_max, UBSY.y_max) - max(YKHO.y_min, UBSY.y_min) QmfO = max(0, NZ85) qki8 = max(0, EBA4) zRv5 = QmfO * qki8 jwoo = YKHO.get_area() + UBSY.get_area() - zRv5 return zRv5 / jwoo
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def RjuK(wGB6, QFOH):\n uMII = iQin(wGB6, QFOH)\n bzU2 = f0tD(wGB6)\n Eq1k = f0tD(QFOH)\n VXSp = oyIN.expand_dims(bzU2, axis=1) + oyIN.expand_dims(Eq1k, axis=0) - uMII\n return oyIN.where(uMII == 0.0, oyIN.zeros_like(uMII), uMII / VXSp)", "def RjuK(wGB6, QFOH):\n XMlP = iQin(wGB6, QFOH)\n bz...
[ "0.83120286", "0.82837814", "0.8182385", "0.81605506", "0.8152651", "0.8098413", "0.80617714", "0.7957169", "0.78419256", "0.7835584", "0.78270584", "0.77953416", "0.7757001", "0.7747402", "0.7746809", "0.7743636", "0.7743636", "0.7736999", "0.7686187", "0.76321757", "0.76017...
0.7200999
42
Applies the given deviations (returned by a call to `deviation_relative_to`) to this box.
def HZjA(YKHO, lNbf, LfFm, nzM4, Kcge): return R6EX.from_cx_cy_w_h(lNbf * YKHO.width + YKHO.center_x, LfFm * YKHO.height + YKHO.center_y, epAf.exp(nzM4) * YKHO.width, epAf.exp(Kcge) * YKHO.height)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Cajj(YKHO, UBSY):\n return ((YKHO.center_x - UBSY.center_x) / UBSY.width, (YKHO.center_y - UBSY.center_y) / UBSY.height, epAf.log(YKHO.width / UBSY.width), epAf.log(YKHO.height / UBSY.height))", "def jbpc(YKHO, Ayfi):\n if Ayfi > YKHO.desired_action_stddev:\n YKHO.current_stddev /= YKHO.adoption...
[ "0.5544952", "0.5416158", "0.5407359", "0.5097041", "0.5015258", "0.48771197", "0.47183898", "0.46998692", "0.4615728", "0.4595063", "0.45161223", "0.45132944", "0.4506885", "0.44606826", "0.44532582", "0.44488737", "0.4444152", "0.44321185", "0.4405695", "0.43806678", "0.434...
0.66072077
0
Create a JSON representation of this message.
def qQXR(YKHO): C0zA = _qLf(YKHO.value) return qQXR.dumps(MEzQ(C0zA))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def n6_F(YKHO):\n if 'message' not in YKHO.data:\n YKHO.data['message'] = YKHO.message\n if YKHO.status == 200:\n YKHO.data['status'] = 'OK'\n else:\n YKHO.data['status'] = 'Not OK'\n return qQXR.dumps(YKHO.data)", "def oD7C(YKHO):\n return qQXR.dumps({'messages': YKHO.message...
[ "0.80458975", "0.7907605", "0.76169115", "0.7143488", "0.7143488", "0.7143488", "0.7143488", "0.7143488", "0.7143488", "0.7143488", "0.7143488", "0.7143488", "0.7120693", "0.7086734", "0.70779884", "0.70779186", "0.70579106", "0.70224833", "0.6990568", "0.6985272", "0.6981935...
0.72216976
3
Decode text to JSON and return a Message object accordingly.
def aelJ(Emd4, l5Ny): m6Me = pbt6(qQXR.loads(l5Ny)) m6Me[0] = VKEj(m6Me[0]) return Emd4(*m6Me)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Ocrw(l5Ny):\n return GhjO(l5Ny)", "def rXBt(zgjV):\n zgjV = ZbWC.sub('\"(.*)\"', '\\\\1', zgjV)\n zgjV = ZbWC.sub('\\\\\\\\(.)', '\\\\1', zgjV)\n o8c1 = qQXR.loads(zgjV)\n return o8c1", "def hfK9(Ol8d):\n try:\n return qQXR.loads(Ol8d)\n except TypeError:\n print('Ignorin...
[ "0.74639183", "0.7189891", "0.70539623", "0.6721933", "0.6656054", "0.65904564", "0.6526649", "0.6493381", "0.6480489", "0.6411858", "0.6410093", "0.6305638", "0.62740964", "0.62445563", "0.622486", "0.61896896", "0.6150542", "0.6138943", "0.61382806", "0.6062557", "0.6049653...
0.56004024
59
Call this method instead of AddressForm.save() when appropriate to avoid duplicating an address in the database.
def cDO8(YKHO): if YKHO.is_valid(): UTX6, _EYN = EDCT.objects.get_or_create(street=YKHO.cleaned_data['street'], city=YKHO.cleaned_data['city'], state=YKHO.cleaned_data['state'], country=YKHO.cleaned_data['country'], postal_code=YKHO.cleaned_data['postal_code']) return UTX6 return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def xkzz(YKHO, *qIxc, **B2fa):\n YKHO._ensure_defaults_integrity()\n super(W62l, YKHO).save(*qIxc, **B2fa)", "def kgwh(YKHO, aeG7):\n KYrJ = EDCT.objects.filter(customer=YKHO.user)\n for UTX6 in KYrJ:\n kUBT = True\n for Jyyj in YKHO.cleaned_data:\n BWXx = YKHO.cleaned_data[J...
[ "0.7182839", "0.69642663", "0.66004765", "0.6497977", "0.6245208", "0.62204474", "0.5971764", "0.5785383", "0.5782658", "0.5718224", "0.56303114", "0.56266123", "0.56049377", "0.5599606", "0.5554738", "0.5554738", "0.5526102", "0.5508125", "0.5460157", "0.5458225", "0.5448546...
0.6076036
6
Initialization of LyricsNN class describing an RNN for lines prediction.
def FIMM(YKHO, rb7a, Ilxn): YKHO.model = ileL() YKHO.identifier = Ilxn YKHO.model_filename = f'models/{YKHO.identifier}.model' YKHO.model.add(HGYM(4, input_shape=(2, 2), return_sequences=True)) for YRbF in range(rb7a): YKHO.model.add(HGYM(8, return_sequences=True)) YKHO.model.add(HGYM(2,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FIMM(YKHO, jXxl, a6Jb, lhva, Norb, hUTg, tsWk, j63z=0.5):\n super(g8PC, YKHO).__init__()\n YKHO.output_size = a6Jb\n YKHO.n_layers = hUTg\n YKHO.hidden_dim = Norb\n YKHO.seq_len = tsWk\n YKHO.bidirectional = True\n YKHO.emb_layer = U78l.Embedding(num_embeddings=jXxl, embedding_dim=lhva, pa...
[ "0.6579965", "0.6544176", "0.6441179", "0.6438505", "0.6383005", "0.6339359", "0.63345486", "0.61825365", "0.61330235", "0.61164886", "0.6097343", "0.6083694", "0.60652137", "0.6063856", "0.60518354", "0.6039933", "0.60377985", "0.60356927", "0.60174865", "0.60089666", "0.595...
0.0
-1
create a fakeCSV.csv file and later rename it to the data.csv which can be used in the textToCsv function call
def N0bj(): jQ3Z = rLdf.DataFrame(['a', 'b', 'c']) jQ3Z.to_csv(pmON + '/fakeCSV.csv') Hy7s.rename('fakeCSV.csv', 'data.csv')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LMZk(Jmpp):\n with open(Jmpp, 'w', newline='') as z36O:\n WJI9 = m6_J.writer(z36O)\n WBPg = ['file_name', 'chart_in_file', 'year', 'month', 'row_no', 'bird_species']\n WBPg += list(range(1, 32))\n WJI9.writerow(WBPg)", "def VM_V(TBXe):\n z36O = TBXe.mkdir('sub').join('sample...
[ "0.7040914", "0.6868081", "0.6826778", "0.6786819", "0.67643785", "0.6664379", "0.664735", "0.66265637", "0.66244644", "0.6601803", "0.65988266", "0.65708536", "0.65648025", "0.6558951", "0.64657164", "0.6400722", "0.6392307", "0.63626724", "0.635851", "0.6356147", "0.6347168...
0.8577033
0
Converts a rotation matrix to a quaternion Matlab port to python for evaluation purposes
def KMoI(A3Vt): J0p0 = A3Vt - A3Vt.T Mkmy = oyIN.zeros(3) Mkmy[0] = -J0p0[1, 2] Mkmy[1] = J0p0[0, 2] Mkmy[2] = -J0p0[0, 1] k4pm = oyIN.linalg.norm(Mkmy) / 2 TRVV = oyIN.divide(Mkmy, oyIN.linalg.norm(Mkmy) + oyIN.finfo(oyIN.float32).eps) fSLV = (oyIN.trace(A3Vt) - 1) / 2 q7In = oyIN.a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def HyUz(Mkmy: array):\n yKIT = Mkmy[0, 0] + Mkmy[1, 1] + Mkmy[2, 2]\n if yKIT > 0:\n o4sw = PZyS(yKIT + 1.0) * 2\n zDbD = 0.25 * o4sw\n jCyH = (Mkmy[2, 1] - Mkmy[1, 2]) / o4sw\n PMVZ = (Mkmy[0, 2] - Mkmy[2, 0]) / o4sw\n MDnR = (Mkmy[1, 0] - Mkmy[0, 1]) / o4sw\n elif Mkm...
[ "0.8075256", "0.79984576", "0.7916058", "0.78263533", "0.77953583", "0.7602561", "0.7555989", "0.7463216", "0.7459454", "0.74492604", "0.7407526", "0.7295868", "0.72948986", "0.7284594", "0.72581196", "0.7230329", "0.71801275", "0.71128905", "0.71101606", "0.71029717", "0.709...
0.76489675
5
Get input, initial state, final state, and probabilities tensor from
def Zur1(aNyl): with aNyl.as_default(): FRUf = aNyl.get_tensor_by_name('input:0') Mf3n = aNyl.get_tensor_by_name('initial_state:0') BZPa = aNyl.get_tensor_by_name('final_state:0') JynB = aNyl.get_tensor_by_name('probs:0') return (FRUf, Mf3n, BZPa, JynB)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VMhG(YKHO):\n K2Ug = ZylS.placeholder(ZylS.int32, [None, None], name='n_input')\n MeT8 = ZylS.placeholder(ZylS.int32, [None, None], name='t_input')\n BT6X = ZylS.placeholder(ZylS.int32, [None, None], name='n_target')\n YpOa = ZylS.placeholder(ZylS.int32, [None, None], name='t_target')\n sMyr = Z...
[ "0.69206744", "0.6620964", "0.6510186", "0.6486847", "0.6457684", "0.6426807", "0.64235395", "0.6331466", "0.62967086", "0.6261943", "0.62432843", "0.622595", "0.6225692", "0.62057304", "0.6134078", "0.61149305", "0.6085871", "0.6084642", "0.6063506", "0.6058988", "0.6034808"...
0.6288018
9
Initialize the LIF model by specifying RC params.
def FIMM(YKHO, Mkmy=None, Z9rn=None, Ty9i=None): if Mkmy is None and Z9rn is None and (Ty9i is None): YKHO.r = bN_S YKHO.c = Cgyf YKHO.v = ie8d else: YKHO.r, YKHO.c, YKHO.v = (Mkmy, Z9rn, Ty9i)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cb52(JQEJ):\n v1sJ, DGqa = CpFy.init(JQEJ, *CrBO, train=False, debug=False).pop('params')\n if GPtr.get('init_head_bias', None) is not None:\n DGqa = iU95.core.unfreeze(DGqa)\n DGqa['output_projection'] = KES0.tree_map_with_names(lambda XP5J: oLG2.full_like(XP5J, GPtr.init_head_bias), DGqa[...
[ "0.68981415", "0.6778512", "0.6304026", "0.62496275", "0.6207386", "0.61951435", "0.5942858", "0.59382224", "0.59166574", "0.5913951", "0.589226", "0.58801925", "0.58637875", "0.58492166", "0.58403957", "0.5823923", "0.58199495", "0.580222", "0.5745649", "0.5742168", "0.57246...
0.5520111
73
Interpret the next 4 bytes in the stream as the chunk's CRC32 checksum, check if it matches the calculated checksum, and wipe the state.
def fuBi(YKHO) -> FYrf.ChunkEndToken: if YKHO._chunk_state is None or YKHO._chunk_state.next_read != 0: raise Bx6I.StreamStateError('Incorrect chunk state for ending data') [Rz56] = BlNT.unpack('>I', YKHO._read(4)) JURO = Rz56 == YKHO._chunk_state.crc32 uCmi = FYrf.ChunkEndToken(YKHO._chunk_stat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def zqOS(Emd4, yxzR):\n gV46 = 0\n while True:\n nPrm = yxzR.read(Emd4.checksum_struct.size)\n if len(nPrm) == 0:\n break\n if len(nPrm) < 4:\n rdb0 = len(nPrm) % 4\n nPrm = nPrm + '\\x00' * rdb0\n raise ValueError('Checksum data length is not ...
[ "0.6474902", "0.63290596", "0.6217175", "0.614795", "0.5855832", "0.57860446", "0.56504697", "0.56408715", "0.55898196", "0.5546535", "0.55336976", "0.5492091", "0.54762423", "0.54647064", "0.54517967", "0.54467636", "0.5416865", "0.5415279", "0.53935397", "0.5366285", "0.533...
0.46889907
95
Check is a string matches any of the ignorable string constants in the list.
def _4AT(jXCX): EmMj = False for mWFP in qBUX: if mWFP in jXCX: EmMj = True return EmMj
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def LTkL(KCHu, _CS_):\n for vIwR in _CS_:\n if vIwR not in KCHu:\n return False\n return True", "def tpRl(YKHO):\n tDkU(FRJU.is_valid('\"{{ env.BRANCH_NAME }}\" not in [\"dev\", \"prod\"]'), ZWQj(True))\n tDkU(FRJU.is_valid(' \"{{ env.BRANCH_NAME }}\" not in [ \"dev\", \"prod\" ...
[ "0.67769057", "0.6723068", "0.67195636", "0.6685276", "0.64831877", "0.6440842", "0.62976426", "0.62976426", "0.608894", "0.6061952", "0.6055659", "0.6016699", "0.5992257", "0.5951146", "0.5944341", "0.5908234", "0.5908234", "0.5908234", "0.584692", "0.5838412", "0.58344626",...
0.0
-1
Check validation for username
def koOq(NtEF): UAju = [] if hB7K(NtEF): UAju.append('Användarnamnet finns redan.') if len(NtEF) <= 3: UAju.append('Användarnamnet mäste vara 3 tecken eller längre.') return UAju
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mxq9(YKHO, NtEF):\n if YKHO.username_regex.search(NtEF) is not None:\n print('Correct username')\n return True\n else:\n print('Wrong username')\n return False", "def fUbN(YKHO, NtEF: str) -> bool:\n return not YKHO.registry.name_taken(NtEF)", "def Z3WL(YKHO, NtEF):\n ...
[ "0.8605321", "0.8363683", "0.8359597", "0.83194035", "0.82597756", "0.82597756", "0.8215134", "0.8189023", "0.81853515", "0.8174883", "0.81574917", "0.81487864", "0.81487864", "0.8146904", "0.81339544", "0.81268877", "0.81085265", "0.81054664", "0.80960983", "0.80745924", "0....
0.79777014
26
Check validation for password
def AVNP(_NMY, aAOF): UAju = [] if _NMY != aAOF: UAju.append('Lösenorden matchade inte.') if len(_NMY) < 3: UAju.append('Lösenordet måste vara längre än 3 bokstöver.') return UAju
{ "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 EoXa(jTXt):\n pass", "def tWk5(YKHO, jTXt):\n if YKHO.password_regex.search(jTXt) is not None:\n print('Correct password')\n return True\n else:\n print('Wrong passw...
[ "0.84507257", "0.8402689", "0.8400819", "0.8337054", "0.8277088", "0.81550276", "0.8100132", "0.8067589", "0.806264", "0.8041702", "0.80319214", "0.8028712", "0.80205053", "0.7986465", "0.7978783", "0.7977855", "0.795277", "0.79506594", "0.79307485", "0.79305184", "0.79275686...
0.0
-1
Show image with landmarks
def R39I(LNo8, CWXo): QrM1.imshow(LNo8) QrM1.scatter(CWXo[:, 0], CWXo[:, 1], s=10, marker='.', c='r') QrM1.pause(0.001)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def R39I(LNo8, CWXo):\n if isinstance(LNo8, str):\n LNo8 = XC5k.cvtColor(XC5k.imread(LNo8), XC5k.COLOR_BGR2RGB)\n QrM1.imshow(LNo8)\n QrM1.scatter(CWXo[:, 0], CWXo[:, 1], s=10, marker='.', c='r')\n QrM1.pause(0.001)", "def R39I(LNo8, CWXo):\n if hnIv.isImageType(LNo8):\n LNo8 = oyIN....
[ "0.808608", "0.78171635", "0.778297", "0.7465765", "0.7464966", "0.6598388", "0.65567565", "0.65280706", "0.6492143", "0.6483718", "0.6477732", "0.644593", "0.64328134", "0.63780797", "0.6371934", "0.6371934", "0.6371934", "0.636128", "0.6348264", "0.6341621", "0.6301995", ...
0.7926357
3
Assert slugs for selected search
def GVxa(YKHO, Jyyj, BWXx, O92W): OVJJ = [{'object_name': 'Assessment', 'filters': {'expression': {'left': Jyyj, 'op': {'name': '='}, 'right': BWXx}}, 'fields': ['slug']}] PSnA = YKHO.export_parsed_csv(OVJJ)['Assessment'] YKHO.assertEqual(sorted(O92W), sorted([YRbF['Code*'] for YRbF in PSnA]))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pOqK(YKHO):\n B2Dn = YKHO.page1\n B2Dn.search_tags = 'Chutes, Ladders'\n B2Dn.save_revision().publish()\n uRs1 = B2Dn.clean_search_tags\n for mWFP in ['Chutes', 'Ladders']:\n YKHO.assertIn(mWFP, uRs1)", "def Dp35(YKHO):\n x0hE = i9zE()\n s5ru = ['bryan-fox-snowboard-2017', 'some_s...
[ "0.6848772", "0.65132594", "0.64170605", "0.63745207", "0.62808585", "0.62615275", "0.6238778", "0.62327796", "0.62017906", "0.6165098", "0.6152465", "0.6140121", "0.6139936", "0.6139936", "0.6139936", "0.6136641", "0.61336833", "0.6069835", "0.60680634", "0.6020204", "0.6006...
0.6953346
0
Filter by added new comment and old comment exists
def tKaW(YKHO): O92W = [YKHO.assessment.slug] QoB4 = '321' J9bR = Rqdq.CommentFactory(description=QoB4) Rqdq.RelationshipFactory(source=J9bR, destination=YKHO.assessment) YKHO.assertSlugs('comment', YKHO.comment.description, O92W) YKHO.assertSlugs('comment', QoB4, O92W)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def CEj9(YKHO, BdN0):\n uhvJ = YKHO.get_comment_model()._default_manager.using(YKHO.target_object._state.db).filter(content_type=BdN0.content_type, object_pk=BdN0.object_pk, user_name=BdN0.user_name, user_email=BdN0.user_email, user_url=BdN0.user_url)\n for gv2B in uhvJ:\n if gv2B.submit_date.date() =...
[ "0.6316749", "0.5532967", "0.5489668", "0.5443753", "0.5391214", "0.5388516", "0.5315777", "0.52756", "0.5259229", "0.5197859", "0.51538825", "0.5149346", "0.51384956", "0.5113432", "0.50835305", "0.50456214", "0.5030016", "0.5017003", "0.4995472", "0.4978139", "0.497021", ...
0.4968502
22
Strips leading zeros from version number. This converts 1974.04.03 to 1974.4.3 as the format with leading month and day zeros is not accepted by PIP versioning.
def xYF2(DpZH: str) -> str: return '.'.join((str(int(YRbF)) for YRbF in DpZH.split('.')))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def BhPd(TBez: str) -> str:\n if TBez[-2:] == '.0':\n return TBez[:-2]\n return TBez", "def VGJm(DpZH):\n return 'v%03d' % DpZH", "def syuA(DpZH, Cc7Y=''):\n vC9B = DpZH.split('.')\n if Cc7Y:\n vC9B.append(Cc7Y)\n try:\n _CS_ = list(map(str, map(int, vC9B)))\n except V...
[ "0.6954924", "0.66494554", "0.6607103", "0.65504134", "0.6522276", "0.6475586", "0.64568365", "0.6435397", "0.63637435", "0.6274114", "0.6257918", "0.621994", "0.6191119", "0.61290926", "0.61062455", "0.6084795", "0.6005788", "0.59738547", "0.59320265", "0.5922085", "0.591614...
0.79807574
0
Return age of guitar.
def N_N1(YKHO): ZJe_ = 2021 - YKHO.year return ZJe_
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def N_N1(YKHO):\n return AdLa.CURRENT_YEAR - YKHO.year", "def N_N1(YKHO):\n return YKHO.age", "def N_N1(YKHO) -> int:\n return YKHO.age", "def N_N1(YKHO):\n return YKHO.age", "def N_N1(YKHO):\n ZJe_ = vEMp - YKHO.year\n return ZJe_", "def N_N1(YKHO):\n return int(vEMp[:4]) - YKHO.yea...
[ "0.84887856", "0.76437443", "0.7559086", "0.753404", "0.7532731", "0.7525913", "0.74784195", "0.74784195", "0.74746895", "0.74478936", "0.7411588", "0.7410562", "0.73717886", "0.7349488", "0.7336023", "0.7336023", "0.7336023", "0.7333213", "0.7325631", "0.72226375", "0.719377...
0.7427642
10
Return whether the device is HomeKitenabled.
def HgKF(YKHO) -> bool: return bool(YKHO._device_info['HomeKit'])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GYF7(YKHO):\n return bool([begE for begE in YKHO.devices if begE.is_home and begE.is_phone])", "def Debg(YKHO):\n return YKHO._program.get('enabled') is True", "def tHXH(YKHO):\n return YKHO._plrevgeoloc.isHome", "def Debg(YKHO) -> bool:\n return YKHO._device.is_on", "def Debg(YKHO):\n r...
[ "0.74554527", "0.6414873", "0.63198864", "0.6271145", "0.62071985", "0.62071985", "0.62071985", "0.6205384", "0.6196341", "0.6162103", "0.6160482", "0.61003095", "0.6073807", "0.6043367", "0.60089767", "0.5991096", "0.5985485", "0.5967729", "0.5962597", "0.59498745", "0.59478...
0.9178715
0
Return the device type.
def type(YKHO) -> str: return YKHO._device_info['Type']
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DS1x(YKHO):\n return YKHO._device_type", "def DS1x(YKHO):\n return YKHO._device_type", "def DS1x(YKHO):\n return YKHO._meta['device_type']", "def DS1x(YKHO):\n return cFqH.devtype2str[YKHO.device_typeid]", "def DS1x(YKHO):\n return cFqH.devtype2str[YKHO.device_typeid]", "def DS1x(YKHO)...
[ "0.9037524", "0.90288436", "0.9010983", "0.8995372", "0.8995372", "0.8832146", "0.8688302", "0.8621049", "0.85237527", "0.85237527", "0.85237527", "0.84477854", "0.834488", "0.8244467", "0.82170415", "0.81673187", "0.8035013", "0.8026461", "0.8024478", "0.79951596", "0.794047...
0.8421975
12
Clones the contents of this object into a new instance of the same class, and then modifies the cloned copy using the specified default_value and metadata. Returns the cloned object as the result. Note that subclasses can change the signature of this method if needed, but should always call the 'super' method if possib...
def i3ak(YKHO, HyJ9=RVJO, **yIVm): if 'parent' not in yIVm: yIVm['parent'] = YKHO BdN0 = YKHO.__class__.__new__(YKHO.__class__) TDnD = BdN0.__dict__ TDnD.update(YKHO.__dict__) if 'editor' in TDnD: del TDnD['editor'] if '_metadata' in TDnD: BdN0._metadata = BdN0._metadata....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def i3ak(YKHO, HyJ9=d2Yk, **yIVm):\n if 'parent' not in yIVm:\n yIVm['parent'] = YKHO\n BdN0 = YKHO.__class__.__new__(YKHO.__class__)\n TDnD = BdN0.__dict__\n TDnD.update(YKHO.__dict__)\n if 'editor' in TDnD:\n del TDnD['editor']\n if '_metadata' in TDnD:\n BdN0._metadata = B...
[ "0.7849692", "0.69377464", "0.62991315", "0.59456563", "0.57620776", "0.57402605", "0.56147456", "0.53697824", "0.5364406", "0.5359552", "0.5338624", "0.5318208", "0.5256096", "0.5254779", "0.52038485", "0.51854974", "0.5171551", "0.5153403", "0.5139882", "0.51387507", "0.509...
0.7796804
1
Tell ngrok to tear down the tunnel. Stop the background tunneling process.
def JCyR(YKHO): YKHO.ngrok.terminate() return
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def bq6s(Emd4, fGiV, co0j):\n bGrB, BCdN = Emd4.TUNNELS.pop((fGiV, co0j), (None, None))\n if BCdN:\n ILsd(BCdN)", "def JCyR(YKHO):\n YKHO.running = False\n YKHO.hop_channel('auto')", "def JIAT(YKHO):\n YKHO.host = None\n YKHO.port = None\n if YKHO.loop is not None:\n QOe9 = V...
[ "0.6602548", "0.6544424", "0.64130837", "0.6344659", "0.63190275", "0.6306022", "0.63053703", "0.6264894", "0.62556607", "0.6208981", "0.61939526", "0.6133307", "0.6125131", "0.6118024", "0.61080134", "0.6104832", "0.609015", "0.60852677", "0.60842836", "0.60435945", "0.60255...
0.6804179
0
Marks the supplied object as untextured. The shader needs to know this for every untextured object, because otherwise the shader will make it all black.
def PLED(YKHO, object): object.setShaderInput('texDisable', 1, 1, 1, 1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def dwPl(YKHO, object):\n object.setShaderInput('texDisable', 0, 0, 0, 0)", "def XpD_(hst7=None):\n hst7 = hst7 or FQNo.ls(sl=True)\n if not hst7:\n return\n cgsT = bPD1\n if not FQNo.objExists(cgsT):\n FQNo.shadingNode('lambert', asShader=True, n=cgsT)\n FQNo.setAttr(cgsT + '...
[ "0.81474715", "0.5573028", "0.5372784", "0.5259314", "0.52575266", "0.52540916", "0.5238957", "0.5146414", "0.51319337", "0.5054174", "0.49876937", "0.49832848", "0.48839203", "0.48695555", "0.48635027", "0.4834769", "0.4823867", "0.48199543", "0.48047712", "0.48025328", "0.4...
0.84461397
0
Returns the hardness of the shadows. This is usually a value higher than 0. 64 is usually a good value for very hard shadows, while at a value of 0, the shadows are so soft they are unnoticable. Usually a value near 15 is recommended, but this may vary on the scene and you may need to experiment a bit with this value.
def FCrv(YKHO, kSbX): return YKHO.__hardness
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qO8T(YKHO):\n B0QA = ht2j.autograd.grad(YKHO.hamiltonian_, YKHO.parameters, create_graph=True)[0]\n LGSp = B0QA.clone().detach()\n p8Jz = YKHO.inverse_ @ YKHO.momentum.t()\n bc6a = p8Jz.clone().detach()\n pNKp = bc6a @ B0QA.t()\n s3ee = ht2j.autograd.grad(pNKp, YKHO.parameters, retain_graph=T...
[ "0.64606076", "0.61076593", "0.5659373", "0.56149584", "0.56116533", "0.54669493", "0.5422367", "0.54214424", "0.5365746", "0.5348207", "0.5333525", "0.5332085", "0.5331254", "0.5279425", "0.52777076", "0.5239923", "0.5236636", "0.523562", "0.52228415", "0.518874", "0.5155837...
0.59974337
2
Test case for get_device_group_by_id1
def v16b(YKHO): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def g5uD(YKHO):\n pass", "def hkfb(YKHO):\n pass", "def rxnF(YKHO):\n pass", "def gdAO(YKHO):\n pass", "def nit3(YKHO):\n pass", "def tEpA(YKHO):\n pass", "def hS7D(YKHO):\n pass", "def Ovux(YKHO):\n pass", "def x6ny(YKHO):\n pass", "def T7Ji(YKHO):\n pass", "def S...
[ "0.9312894", "0.86152446", "0.81099105", "0.8045822", "0.7804015", "0.7775619", "0.7702657", "0.76584816", "0.75396895", "0.7477459", "0.7459499", "0.73985004", "0.7221935", "0.71005195", "0.7078464", "0.7072636", "0.7063998", "0.70401704", "0.70146847", "0.69065005", "0.6845...
0.95787245
0
Test case for update_device_group_by_id
def tEpA(YKHO): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def x6ny(YKHO):\n pass", "def gdAO(YKHO):\n pass", "def nit3(YKHO):\n pass", "def B5WJ(YKHO):\n pass", "def prmJ(YKHO):\n pass", "def Seti(YKHO):\n pass", "def vMQ3(YKHO):\n pass", "def Wc_F(YKHO):\n pass", "def g5uD(YKHO):\n pass", "def NBqU(YKHO):\n pass", "def h...
[ "0.9418701", "0.93432456", "0.9144009", "0.78787094", "0.78768146", "0.78417784", "0.779405", "0.77800554", "0.77212477", "0.7663947", "0.7663696", "0.75038546", "0.7167483", "0.71426827", "0.7122559", "0.70687544", "0.70444477", "0.6940763", "0.6936375", "0.68457174", "0.673...
0.9582825
0
Test case for update_device_group_by_id1
def gdAO(YKHO): pass
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def nit3(YKHO):\n pass", "def tEpA(YKHO):\n pass", "def x6ny(YKHO):\n pass", "def Wc_F(YKHO):\n pass", "def NBqU(YKHO):\n pass", "def hS7D(YKHO):\n pass", "def vMQ3(YKHO):\n pass", "def v16b(YKHO):\n pass", "def prmJ(YKHO):\n pass", "def B5WJ(YKHO):\n pass", "def S...
[ "0.93832743", "0.93671364", "0.9243686", "0.7982077", "0.79347783", "0.7787908", "0.7785914", "0.7717263", "0.7704478", "0.7656242", "0.76072687", "0.74940306", "0.71125656", "0.7084893", "0.7023078", "0.6988108", "0.68989885", "0.6894515", "0.6890141", "0.684053", "0.6828986...
0.9540272
0
Returns an observable sequence that contains a single element, using the specified scheduler to send out observer messages. There is an alias called 'just'. example res = rx.Observable.return(42) res = rx.Observable.return(42, rx.Scheduler.timeout)
def en4D(Emd4, BWXx, IesV=None): IesV = IesV or Jo_Y def FxIp(LiTy): def XeOP(IesV, QTBn=None): LiTy.on_next(BWXx) LiTy.on_completed() return IesV.schedule(XeOP) return GFfw(FxIp)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def yKcO(JfyU: Callable, IesV: abc.Scheduler=None) -> nkvd:\n from ..operators.observable.start import yKcO\n return yKcO(JfyU, IesV)", "def ntd0(fRVt: Callable[[Any], ObservableBase]) -> nkvd:\n from ..operators.observable.defer import ntd0\n return ntd0(fRVt)", "def HPnV(JZXy: Observable) -> cBwQ...
[ "0.55531275", "0.5166064", "0.50442696", "0.49978098", "0.49963588", "0.49476802", "0.4912872", "0.48327878", "0.475615", "0.4729894", "0.45519", "0.45499033", "0.4524066", "0.45072457", "0.43996987", "0.43576333", "0.433959", "0.4313538", "0.4313538", "0.4313538", "0.4313538...
0.6745742
0
Return the path. Prepend with CWD and prefix
def OyQC(pmON): if M_SG and (not '/' in pmON): pmON = M_SG + pmON if not ck3z: return pmON return gzes(ck3z, pmON)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pmON(YKHO, y0cW, qIxc=()):\n eHKs = YKHO.dir.path(y0cW, qIxc)\n return Hy7s.path.join(eHKs, YKHO.name)", "def pmON(YKHO, y0cW, qIxc=()):\n assert len(qIxc) == YKHO.nargs\n y0cW = Hy7s.path.abspath(y0cW)\n mWFP = YKHO.name_(qIxc)\n assert Hy7s.path.relpath(mWFP) == mWFP\n assert len(_HAN(...
[ "0.73822325", "0.73651373", "0.7036756", "0.7012196", "0.6879618", "0.6833048", "0.6808527", "0.6491455", "0.632277", "0.6292265", "0.62735814", "0.62713635", "0.626437", "0.6261836", "0.61543214", "0.61540467", "0.6135026", "0.6132204", "0.6132049", "0.6129539", "0.61061597"...
0.7837085
0
Issue a GET request for the given URL.
async def _fetch(YKHO, cuiw, bD7m, kMyc=None, m6Me=False, M9ng=False): print(bD7m) Aofo = None qpDA = None if 'hare' in bD7m: qpDA = YKHO._websites['Hares'] elif 'pixnet' in bD7m: qpDA = YKHO._websites['Pixnet'] else: qpDA = YKHO._websites['Unknown'] UHFx = 1 whil...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def NMoC(YKHO, bD7m):\n return YKHO._request('GET', bD7m)", "def jxrn(YKHO, bD7m):\n return YKHO._request(bD7m)", "def feOr(YKHO, bD7m, MOPg=None):\n return YKHO.__req(bD7m, 'GET', headers=MOPg)", "def NMoC(bD7m, GUxD=bbws, **B2fa):\n return QePW('get', bD7m, to_error=GUxD, **B2fa)", "def NMoC(...
[ "0.7883896", "0.77640957", "0.7738244", "0.7612464", "0.75966185", "0.7526963", "0.75052214", "0.7481662", "0.74746346", "0.74106705", "0.73912764", "0.73087555", "0.7297788", "0.7264017", "0.7259342", "0.7254266", "0.7232382", "0.72316253", "0.72316253", "0.72316253", "0.723...
0.0
-1
To set up a boundary for the open files limitation at the same time.
async def _bound_fetch(YKHO, hZqO, cuiw, bD7m, kMyc=None, m6Me=False, M9ng=False): async with hZqO: return await YKHO._fetch(cuiw, bD7m, kMyc, m6Me, M9ng)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def qoqK():\n W__b = HA5f()\n W__b.limit()", "def b0fk(oUZx, H5ew):\n global _MAX_OPEN_FILES\n if pF53 is None:\n pF53 = (kSBx.common.system.get_max_open_files(),)\n Tfi9, = pF53\n if Tfi9:\n Tfi9 = int(Tfi9 * BFuv)\n if Tfi9 < doMH:\n oUZx.append(H5ew, Tfi9)", ...
[ "0.5811182", "0.56389654", "0.5497745", "0.54893994", "0.545382", "0.5448054", "0.53914845", "0.53693", "0.5349658", "0.5330323", "0.53131086", "0.53071016", "0.5305885", "0.52843595", "0.5270937", "0.5249806", "0.5229425", "0.5227775", "0.5211759", "0.52109766", "0.51792026"...
0.0
-1
Return allones tensor of given shape and type.
def pSfY(ROpF, yDqo=nMvt.floatx()): if nMvt.backend() == 'theano': from theano import tensor as Kt_s return Kt_s.ones(ROpF, yDqo) else: assert nMvt.backend() == 'tensorflow' import tensorflow as ZylS return ZylS.ones(ROpF, yDqo)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pSfY(ROpF, yDqo=None):\n return vBWh(ROpF, 1, yDqo)", "def lsmZ(*ROpF, **B2fa):\n return llWB(oyIN.empty(ROpF), **B2fa)", "def pSfY(ROpF, **B2fa):\n return llWB(oyIN.ones(ROpF), **B2fa)", "def lsmZ(ROpF, yDqo=oyIN.float32, si3H=False):\n return llWB(oyIN.empty(ROpF, yDqo), constant=si3H)", ...
[ "0.7239552", "0.7234052", "0.71911055", "0.70934355", "0.70898616", "0.70649135", "0.672523", "0.6585413", "0.6585413", "0.6522735", "0.6515479", "0.6483929", "0.6466721", "0.6429149", "0.6366113", "0.63100284", "0.630325", "0.6278902", "0.6230271", "0.6223832", "0.6215334", ...
0.6712473
7
Return allzeros tensor of given shape and type.
def VNqG(ROpF, yDqo=nMvt.floatx()): if nMvt.backend() == 'theano': from theano import tensor as Kt_s return Kt_s.zeros(ROpF, yDqo) else: assert nMvt.backend() == 'tensorflow' import tensorflow as ZylS return ZylS.zeros(ROpF, yDqo)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VNqG(*ROpF, **B2fa):\n return llWB(oyIN.zeros(ROpF), **B2fa)", "def VNqG(ROpF, yDqo=None):\n return vBWh(ROpF, 0, yDqo)", "def VNqG(ROpF, yDqo=oyIN.float32, si3H=False):\n return llWB(oyIN.zeros(ROpF, yDqo), constant=si3H)", "def lsmZ(*ROpF, **B2fa):\n return llWB(oyIN.empty(ROpF), **B2fa)", ...
[ "0.78290266", "0.77888846", "0.7677265", "0.75223565", "0.74518645", "0.73906773", "0.7364313", "0.72332895", "0.72332895", "0.7180945", "0.7104846", "0.69690907", "0.6929705", "0.6898232", "0.68935305", "0.68361795", "0.6807142", "0.68026096", "0.6801418", "0.6801418", "0.67...
0.73404515
7
Return tensor of given shape and type filled with given value.
def hkxX(BWXx, ROpF, yDqo=nMvt.floatx()): return BWXx * pSfY(ROpF, yDqo)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def E5l4(YKHO, gyIm):\n gyIm = oyIN.asarray(gyIm).astype(YKHO.dtype)\n return Mecn.placeholder_with_default(gyIm, shape=gyIm.shape if YKHO.use_static_shape else None)", "def xElS(BWXx, mWFP=None, U3Fm=False, LltJ=None, fxyu=False, liuk=None):\n if not isinstance(BWXx, XTiz.ndarray):\n raise TypeE...
[ "0.64718324", "0.6296214", "0.6233983", "0.61664563", "0.61466515", "0.6141009", "0.6141009", "0.60928553", "0.60563564", "0.60109097", "0.6010672", "0.6009017", "0.59948504", "0.58983475", "0.5895598", "0.58839995", "0.5870249", "0.5870249", "0.5847118", "0.5844058", "0.5834...
0.6670203
0
Return matrices broadcasting indices on a 2d grid. This is a partial backendindependent version of TensorFlow meshgrid()
def mWKm(YRbF, r845, xU3n='ij'): if nMvt.ndim(YRbF) != 1 or nMvt.ndim(r845) != 1: raise ValueError('need ndim() == 1') if nMvt.backend() == 'tensorflow': import tensorflow as ZylS pdhd, Oa10 = ZylS.meshgrid(YRbF, r845, indexing=xU3n) else: assert nMvt.backend() == 'theano' ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def na8F(*qIxc, **B2fa):\n B2fa['indexing'] = 'ij'\n return mWKm(*qIxc, **B2fa)", "def mWKm(WKvO, LVAh, jxUm=True):\n jzdc = ht2j.arange(0, WKvO)\n Fg_i = ht2j.arange(0, LVAh)\n CAzz = jzdc.repeat(LVAh).view(-1, 1).float()\n Jd40 = Fg_i.view(-1, 1).repeat(1, WKvO).view(-1, 1).float()\n retur...
[ "0.66549087", "0.6448521", "0.6395647", "0.6385773", "0.62383676", "0.607281", "0.6054111", "0.6050764", "0.60465246", "0.6029575", "0.60188174", "0.5937803", "0.5893137", "0.5836443", "0.5809325", "0.58063555", "0.57907295", "0.5780437", "0.57102764", "0.56989294", "0.568289...
0.63798696
4
Return onehot representation of given tensor or numpy array.
def KLLm(jzdc, zNig=None, yDqo=oyIN.int32): if isinstance(jzdc, oyIN.ndarray): if zNig is None: zNig = jzdc.max() + 1 return oyIN.eye(zNig, dtype=yDqo)[jzdc] else: if zNig is None: raise NotImplementedError() return nMvt.eye(zNig, yDqo)[jzdc]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def KLLm(WKvO, jTqs, yDqo=oLG2.float32):\n return yOcR.nn.one_hot(WKvO, jTqs).astype(yDqo)", "def kj8B(ezWE, jTqs):\n ezWE = ezWE.data.astype(int)\n jzdc = oyIN.zeros((ezWE.shape[0], jTqs))\n jzdc[oyIN.arange(len(jzdc)), ezWE] = 1\n return vhpA.Tensor(jzdc, requires_grad=True)", "def kj8B(ezWE, ...
[ "0.7859921", "0.7779984", "0.7779984", "0.776788", "0.76527566", "0.7610865", "0.75510514", "0.75354576", "0.75270677", "0.75139195", "0.74732864", "0.7455506", "0.74368954", "0.7429599", "0.7426404", "0.74015445", "0.739606", "0.7351203", "0.7293224", "0.72600925", "0.725696...
0.7242473
21
Return unique values from iterable.
def kcwm(OxJJ): PwWw = set() return [YRbF for YRbF in OxJJ if not (YRbF in PwWw or PwWw.add(YRbF))]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def kcwm(OxJJ):\n PwWw = set()\n return [WKvO for WKvO in OxJJ if WKvO not in PwWw and (not PwWw.add(WKvO))]", "def UYlD(OxJJ):\n\n def z2Uo(GwnW):\n Frr0 = set()\n for YRbF in GwnW:\n if YRbF not in Frr0:\n Frr0.add(YRbF)\n yield YRbF\n return z...
[ "0.7999121", "0.78902364", "0.7870895", "0.77103716", "0.7579125", "0.7523557", "0.7280493", "0.71887684", "0.6989713", "0.6963051", "0.69561213", "0.6887821", "0.68650216", "0.6838632", "0.68206346", "0.6817162", "0.6778499", "0.6734577", "0.67336524", "0.67220056", "0.66545...
0.78983736
1
Return array of zeros with shape of given tensor or numpy array.
def PIEQ(jzdc): if isinstance(jzdc, oyIN.ndarray): return oyIN.zeros_like(jzdc) else: return nMvt.zeros_like(jzdc)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def VNqG(*ROpF, **B2fa):\n return llWB(oyIN.zeros(ROpF), **B2fa)", "def VNqG(ROpF, yDqo=None):\n if not isinstance(ROpF, (list, tuple, DKnh)):\n ROpF = [ROpF]\n if yDqo is None:\n yDqo = GPtr.floatX\n return a2Be(XTiz.array(0, dtype=yDqo), *ROpF)", "def VNqG(ROpF, yDqo=oyIN.float32, s...
[ "0.79991907", "0.7783359", "0.77504045", "0.7721461", "0.7674716", "0.75811875", "0.74053454", "0.74053454", "0.7366194", "0.73502535", "0.7249148", "0.7201274", "0.7160762", "0.7130828", "0.7086376", "0.7073063", "0.70270133", "0.69933385", "0.69453585", "0.686986", "0.68680...
0.7504606
6
Outer product of two vectors. If batch is True, return batchwise outer product.
def aKAg(jzdc, Fg_i, Wc9F=False): if Wc9F: return oVGL(jzdc, Fg_i) jzdc, Fg_i = CbK3([jzdc, Fg_i], 1) return jzdc[:, oyIN.newaxis] * Fg_i[oyIN.newaxis, :]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def oVGL(jzdc, Fg_i):\n jzdc, Fg_i = CbK3([jzdc, Fg_i], 2)\n return jzdc[:, :, oyIN.newaxis] * Fg_i[:, oyIN.newaxis, :]", "def aKAg(WKvO):\n return bdPE.backend.batch_dot(WKvO[0], WKvO[1], axes=[1, 1]) / WKvO[0].get_shape().as_list()[1]", "def W5DJ(jzdc: np.ndarray, Fg_i: np.ndarray, qutR: bool=True) ...
[ "0.76808894", "0.72845256", "0.7163513", "0.69399536", "0.687263", "0.6790263", "0.6752418", "0.6522772", "0.6463579", "0.6463288", "0.6452809", "0.6356816", "0.6337843", "0.62326765", "0.6077236", "0.6058667", "0.60003865", "0.59570444", "0.5895751", "0.58939034", "0.5848351...
0.8109959
0
Batchwise "outer sum" of pairs of vectors. Expects two 2d tensors of shapes (b, m) and (b, n) and returns a 3d tensor of shape (b, m, n) where each of the (m, n) submatrices is the "outer sum" of corresponding vectors.
def ig73(jzdc, Fg_i): jzdc, Fg_i = CbK3([jzdc, Fg_i], 2) return jzdc[:, :, oyIN.newaxis] + Fg_i[:, oyIN.newaxis, :]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def GR8_(jzdc, Fg_i, Wc9F=False):\n if Wc9F:\n return ig73(jzdc, Fg_i)\n jzdc, Fg_i = CbK3([jzdc, Fg_i], 1)\n return jzdc[:, oyIN.newaxis] + Fg_i[oyIN.newaxis, :]", "def oVGL(jzdc, Fg_i):\n jzdc, Fg_i = CbK3([jzdc, Fg_i], 2)\n return jzdc[:, :, oyIN.newaxis] * Fg_i[:, oyIN.newaxis, :]", "...
[ "0.7549128", "0.70124334", "0.6718192", "0.6595632", "0.6483426", "0.63795763", "0.6304991", "0.62340254", "0.6183096", "0.6170267", "0.6150513", "0.60053456", "0.59777755", "0.59755504", "0.5973091", "0.5962293", "0.594411", "0.59096915", "0.58444077", "0.5838402", "0.581593...
0.8179489
0
Return the log of the sum of exponentials of elements of x. Preserves numerical precision around the maximum value by initially subtracting and finally adding back in the max.
def vqBa(WKvO, jDK_=None): bYzl = nMvt.max(WKvO, axis=jDK_, keepdims=True) lvgK = nMvt.max(WKvO, axis=jDK_) return lvgK + nMvt.log(nMvt.sum(nMvt.exp(WKvO - bYzl), axis=jDK_))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def X0th(WKvO):\n MKHa = V6IE.ReduceSum()\n RKD7 = V6IE.Log()\n kLQb = V6IE.Exp()\n re6M = max(WKvO.data)\n return RKD7(MKHa(kLQb(WKvO - re6M), 1)) + re6M", "def WsPf(WKvO):\n IA3S = None\n u54L = len(WKvO)\n for YRbF in range(u54L):\n if IA3S is None or WKvO[YRbF] > IA3S:\n ...
[ "0.8786673", "0.8604101", "0.8512844", "0.82524306", "0.8206249", "0.8206249", "0.77675444", "0.7728264", "0.7438143", "0.74150777", "0.7405275", "0.73468286", "0.73385084", "0.7293474", "0.72790587", "0.72658545", "0.72424203", "0.72053695", "0.70896155", "0.70545155", "0.70...
0.6813828
27
Create the Spark Session
def Yu9h(): return lBG2.builder.appName('Dataframe Reader').master('local[*]').getOrCreate()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def Hv6k():\n return lBG2.builder.appName('Transforming the historical parking occupancy and blockface datasets').getOrCreate()", "def Yu9h():\n print('Create Spark Session')\n ujem = lBG2.builder.config('spark.jars.packages', 'org.apache.hadoop:hadoop-aws:2.7.0').getOrCreate()\n return ujem\n pri...
[ "0.8568158", "0.8250398", "0.81808573", "0.79985565", "0.79985565", "0.79985565", "0.79985565", "0.7984815", "0.79698676", "0.79698676", "0.79698676", "0.79698676", "0.79698676", "0.79698676", "0.79698676", "0.79698676", "0.79698676", "0.7966938", "0.79057294", "0.787787", "0...
0.8185485
2
To initialize a linked list structure used to handle hash conflicts and two variables for counting work.
def FIMM(YKHO): YKHO.count = 0 YKHO.keys = [] YKHO.singlyLinkedList = []
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def FIMM(YKHO):\n YKHO.hash_table = {}\n YKHO.count_table = {}\n YKHO.head = ZxiW()\n YKHO.tail = ZxiW()", "def FIMM(YKHO):\n YKHO.dummy = Msxl(-1)\n YKHO.cnt = 0", "def FIMM(YKHO, sdCG: ListNode):\n YKHO.head = sdCG\n YKHO.count = 0\n i4ai = sdCG\n while i4ai:\n i4ai = i4a...
[ "0.78824806", "0.7559018", "0.72582144", "0.7242763", "0.7227502", "0.71689093", "0.7115092", "0.70966566", "0.70966566", "0.70688194", "0.7066724", "0.7056077", "0.70482403", "0.70228016", "0.6980681", "0.6976722", "0.69580126", "0.69549394", "0.69451207", "0.69191515", "0.6...
0.73773247
2
To concatenate two dictionary objects and self stores the result.
def TcDW(YKHO, cmPJ: 'Dictionary') -> None: if not isinstance(cmPJ, tTte): raise Exception for d6pt in range(YKHO.length): if cmPJ.hashTable[d6pt].count != 0: for Q6kx in cmPJ.hashTable[d6pt].singlyLinkedList: if Q6kx.key not in YKHO.hashTable[d6pt].keys: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def CaoY(YKHO, Elif):\n if not isinstance(Elif, dict):\n tO9_ = 'Can not concatenate Dict and {}'.format(type(Elif))\n raise TypeError(tO9_)\n for H5ew, wEf2 in Elif.items():\n if H5ew in YKHO:\n YKHO._append_key(H5ew, wEf2)\n else:\n YKHO[H5ew] = wEf2\n r...
[ "0.8154367", "0.76680094", "0.7294488", "0.71228254", "0.7068959", "0.70477664", "0.70020056", "0.70011073", "0.6856165", "0.6803097", "0.6782024", "0.67354494", "0.6733947", "0.67152697", "0.67136866", "0.66847044", "0.66847044", "0.66611797", "0.6613321", "0.65947926", "0.6...
0.5654489
97
Sample same number of negatives as positives but at least one
def G0Ke(YKHO, tbib: torch.Tensor, dp80: int) -> int: aQv2 = min(tbib.numel(), max(dp80, 1)) return aQv2
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def H52a(YKHO):\n C3ST = Aw4b(YKHO.data_large, negative=3)\n FiLP = C3ST.node_relations[0]\n eAYh = 100\n for YRbF in range(eAYh):\n oJpn = C3ST._sample_negatives(0)\n YKHO.assertFalse(FiLP & set(oJpn))\n YKHO.assertEqual(len(oJpn), len(set(oJpn)))", "def lBnO(YKHO, ByyA, FoyG, *...
[ "0.708323", "0.69966656", "0.6853481", "0.68406075", "0.63011277", "0.61945343", "0.61586463", "0.6129091", "0.61034524", "0.60780746", "0.6037477", "0.603703", "0.5994463", "0.59613866", "0.5944668", "0.5925236", "0.5923893", "0.59209436", "0.59129316", "0.59129316", "0.5898...
0.0
-1
Create value map from enumerated type.
def s5LE(qQ1Y): uV2H = dict(zip(tuple(qQ1Y), qQ1Y._fields)) if -1 not in uV2H: uV2H[-1] = None return uV2H
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def K0B_(J8oL):\n return dict(J8oL.keys())", "def d7rc(YKHO, nPrm: Any) -> cuzp[ImMB, ImMB]:\n return {Jyyj: BWXx.value if isinstance(BWXx, bHD7) else BWXx for Jyyj, BWXx in nPrm}", "def t6cI(YKHO):\n import warnings\n warnings.warn('You should not use enum_dict. Use enum instead', DeprecationWarni...
[ "0.68868405", "0.59671664", "0.5924394", "0.5878461", "0.5795853", "0.57651186", "0.57444775", "0.5744464", "0.5743687", "0.555403", "0.5549169", "0.5529969", "0.55164593", "0.54984736", "0.54640585", "0.5461794", "0.5444919", "0.54248315", "0.5406385", "0.5396126", "0.539340...
0.66536695
1
Clear self.device input buffer.
def XmwG(YKHO): YKHO.device.reset_input_buffer()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def M2qM(YKHO):\n YKHO.serial.reset_input_buffer()", "def Y7Bk(YKHO):\n YKHO.buf = oyIN.zeros((YKHO.length, YKHO.dim))\n YKHO.ptr = 0\n YKHO._size = 0", "def WW6S(YKHO):\n for YRbF, BWXx in enumerate(YKHO.buffer):\n YKHO.buffer[YRbF] = 0", "def SiRx(YKHO):\n YKHO._buffer.clear()", ...
[ "0.7579089", "0.7564613", "0.7474572", "0.73297286", "0.72956663", "0.7286823", "0.70935583", "0.6971847", "0.69621885", "0.69489235", "0.68369627", "0.6791775", "0.6790212", "0.674181", "0.66984165", "0.6666557", "0.66506237", "0.6648108", "0.66307324", "0.6609893", "0.65864...
0.787337
0
Subset a pandas.DataFrame with a 'chr' (chromosome) column to a particular chromosome. Reset the index if desired.
def fAix(jQ3Z, v0pW, iNIY=False): if not isinstance(v0pW, list): v0pW = [v0pW] if not iNIY: JqJq = jQ3Z[jQ3Z['chr'].isin(v0pW)] else: JqJq = jQ3Z[jQ3Z['chr'].isin(v0pW)].reset_index(drop=True) if JqJq.empty: raise ValueError('Chromosome subsetting resulted in an empty Dat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def iBib(eH9u, SM9P, ywwl):\n jQ3Z = rLdf.DataFrame()\n for P2GO in range(eH9u):\n if not jQ3Z.empty:\n XvCG = jQ3Z\n jQ3Z = rLdf.DataFrame()\n jQ3Z.insert(0, 'loc', [WKvO[0] for WKvO in oyIN.random.randint(0, SM9P, size=(ywwl, 1))])\n jQ3Z.insert(1, 'trans', [f'som...
[ "0.5383547", "0.531656", "0.5285686", "0.52306026", "0.5181435", "0.5068248", "0.5054984", "0.50486916", "0.50470036", "0.50061595", "0.49313873", "0.4880109", "0.48668268", "0.48520857", "0.48259526", "0.4806168", "0.47955918", "0.4781934", "0.47592208", "0.47032985", "0.470...
0.7214755
0
Euclidean distance between current pose and the goal.
def usGr(YKHO): return PZyS(pow(YKHO.pose1.x - YKHO.pose2.x, 2) + pow(YKHO.pose1.y - YKHO.pose2.y, 2))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def usGr(YKHO, finv):\n return PZyS(pow(finv.x - YKHO.pose.x, 2) + pow(finv.y - YKHO.pose.y, 2))", "def usGr(YKHO, finv):\n return PZyS(pow(finv.x - YKHO.pose.x, 2) + pow(finv.y - YKHO.pose.y, 2))", "def usGr(YKHO):\n return PZyS(pow(YKHO.goal_pose.x - YKHO.ground_truth_pose.x, 2) + pow(YKHO.goal_pose...
[ "0.84976345", "0.84813356", "0.82875615", "0.73956144", "0.7167065", "0.69989085", "0.6992502", "0.688031", "0.67752343", "0.67629236", "0.67340976", "0.6733802", "0.6725629", "0.6725629", "0.6725629", "0.6725629", "0.6725629", "0.6725629", "0.6725629", "0.6715818", "0.668803...
0.76946825
3
Sets the arr_date of this Stop. Arrival date in format YYYYMMDD, if available
def O1oJ(YKHO, O1oJ): YKHO._arr_date = O1oJ
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fU0w(YKHO, fU0w):\n YKHO._rt_arr_date = fU0w", "def O1oJ(YKHO):\n return YKHO._arr_date", "def AS9e(YKHO, AS9e):\n YKHO._dep_date = AS9e", "def wjGx(YKHO, _c1T):\n YKHO.data['date'] = _c1T", "def boRJ(YKHO, boRJ):\n YKHO._arr_time = boRJ", "def fU0w(YKHO):\n return YKHO._rt_arr_date...
[ "0.76801926", "0.6634716", "0.6303334", "0.60577255", "0.60407275", "0.5995572", "0.59622914", "0.59370536", "0.59370536", "0.5928312", "0.591016", "0.5887686", "0.5856641", "0.5827557", "0.5771383", "0.57631165", "0.5760676", "0.5760676", "0.5760676", "0.5760676", "0.5760676...
0.8322325
0
Gets the dep_time of this Stop.
def Dmvv(YKHO): return YKHO._dep_time
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def i5Iu(YKHO):\n return YKHO._rt_dep_time", "def JRYC(YKHO) -> float:\n return YKHO._dt", "def WbTE(YKHO) -> float:\n return YKHO._stop - YKHO._start if YKHO._stop is not None else None", "def m7L9(YKHO) -> float:\n raise NotImplementedError()", "def LLqQ(YKHO):\n return YKHO.__time_elapsed...
[ "0.76340383", "0.69289684", "0.6700814", "0.6639289", "0.6582707", "0.656935", "0.6531528", "0.6488568", "0.6482343", "0.647869", "0.64723927", "0.6461741", "0.6451497", "0.6448607", "0.64331126", "0.640568", "0.6404436", "0.6399066", "0.6399066", "0.6388274", "0.637814", "...
0.85949135
0
Gets the dep_date of this Stop. Departure date in format YYYYMMDD, if available
def AS9e(YKHO): return YKHO._dep_date
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lQCx(YKHO):\n return YKHO._rt_dep_date", "def zFfq(YKHO) -> qcWV:\n return YKHO._dissolution_date", "def Dmvv(YKHO):\n return YKHO._dep_time", "def DmiH(YKHO):\n return YKHO._decommission_date", "def AS9e(YKHO, AS9e):\n YKHO._dep_date = AS9e", "def D4RL(YKHO):\n Pe9W = 'SELECT ddt_n...
[ "0.68812186", "0.62684524", "0.6139583", "0.6046779", "0.6004411", "0.56983453", "0.56968385", "0.5644735", "0.5618119", "0.5577743", "0.55707", "0.5556461", "0.5556461", "0.5556461", "0.5556461", "0.5541041", "0.55379695", "0.553578", "0.5535212", "0.55270046", "0.5510605", ...
0.813874
0
Sets the dep_date of this Stop. Departure date in format YYYYMMDD, if available
def AS9e(YKHO, AS9e): YKHO._dep_date = AS9e
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def lQCx(YKHO, lQCx):\n YKHO._rt_dep_date = lQCx", "def AS9e(YKHO):\n return YKHO._dep_date", "def Dmvv(YKHO, Dmvv):\n YKHO._dep_time = Dmvv", "def XH62(YKHO, ZpyY: datetime.date):\n if YKHO._departure:\n G9jH.warning(f'Overwriting departure date of {YKHO._departure.isoformat()} for pet {Y...
[ "0.7047382", "0.6734145", "0.6207777", "0.6137859", "0.6076862", "0.60438323", "0.5876538", "0.5876307", "0.58750683", "0.58623844", "0.5852742", "0.5852474", "0.5847346", "0.5839326", "0.5810803", "0.57592154", "0.5754374", "0.5745503", "0.5682334", "0.5682334", "0.5671467",...
0.8388232
0
Gets the id of this Stop.
def id(YKHO): return YKHO._id
{ "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 unpH(YKHO):\n return YKHO._id", "def unpH(YKHO):\n return YKHO._id", "def unpH(YKHO):\n return YKHO._id", "def unpH(YKHO):\n return YKHO.__id", "def unpH(YKHO):\n ...
[ "0.726365", "0.726365", "0.726365", "0.726365", "0.726365", "0.726365", "0.7178399", "0.7169161", "0.7169161", "0.7169161", "0.7169161", "0.7169161", "0.7169161", "0.7169161", "0.7169161", "0.7169161", "0.7169161", "0.7169161", "0.7169161", "0.7169161", "0.7169161", "0.7169...
0.7099034
88