text
stringlengths
25
2.19k
embedding
listlengths
768
768
def getsuitablecommandline ( command, _ platform = none ) : platform = _ platform or sys. platform if platform! = " win32 " : return command try : slashre = getsuitablecommandline. _ slashre except attributeerror : import re slashre = getsuitablecommandline. _ slashre = re. compile ( r'( \ \ + ) ( " | $ )') # what we d...
[ -0.1684270203113556, -0.7016438245773315, 0.8745454549789429, -0.3909258544445038, -0.5969363451004028, -0.31570520997047424, -0.15680374205112457, 0.09150329232215881, -0.5307713747024536, 0.338503897190094, -0.06719747185707092, 0.15093538165092468, 0.34420445561408997, 0.022257182747125...
def clean ( db _ loc ) : # create the database for the output db = sqliteextdatabase ( db _ loc, pragmas = {'cache _ size': - 1024 * 64, # 64mb page - cache.'journal _ mode':'wal ', # use wal - mode ( you should always use this! ).'foreign _ keys': 0,'wal _ autocheckpoint': 10, } ) # get the models fragment, heritage, ...
[ 0.08468159288167953, -0.0701669231057167, 0.5943684577941895, -0.5442533493041992, 0.694080650806427, 0.2757256329059601, 0.7347002029418945, 0.45558246970176697, -0.37061211466789246, 0.16717882454395294, 0.03024979680776596, -0.7100883722305298, -0.40866100788116455, 0.18586277961730957,...
def get _ motor _ one ( self ) : return self. _ get _ motor ( self. command _ get _ a )
[ -0.5303980112075806, -0.07745439559221268, 0.3521406948566437, 0.7813923954963684, 1.5421912670135498, -0.41183707118034363, 0.4150342345237732, -0.5110597610473633, -0.03145517408847809, -1.1904596090316772, 0.9458503127098083, 1.5918701887130737, -1.2115048170089722, 0.22972463071346283,...
def forrevlogheader ( self, header ) : return self. _ engines [ self. _ revlogheaders [ header ] ]
[ 0.15514922142028809, -0.4811922013759613, 0.4917437732219696, -0.6445891261100769, -0.8610743880271912, -0.653394877910614, -1.3802372217178345, -0.2020762413740158, -0.7874929904937744, -0.4044094383716583, 0.20477509498596191, 1.094495177268982, -0.311654269695282, -0.648347795009613, ...
def topoplot _ psd ( self, collapse _ epochs = true, flims ='stimulation ', * * kwargs ) : # find out over which range ( s ) to collapse : fmins, fmaxs = self. _ get _ flims ( flims ) # get the actual data, collapse across frequency band if len ( fmins. flatten ( ) ) > 1 : topodata = [ self. psd [..., ( self. freqs > f...
[ -0.43865323066711426, 0.6983505487442017, 0.8120924830436707, -0.025345632806420326, -1.150620937347412, -0.12311040610074997, -0.5009465217590332, 0.2104940265417099, -0.4205426275730133, -0.4908750653266907, 0.7923493385314941, 0.47135642170906067, 0.18924477696418762, -0.053216468542814...
def print _ servers ( log, barreleye _ instance, servers, status = false, print _ table = true, field _ string = none ) : # pylint : disable = too - many - branches, too - many - locals, too - many - statements if not print _ table and len ( servers ) > 1 : log. cl _ error ( " failed to print non - table output with mu...
[ -0.2512686550617218, 0.7159851789474487, 0.8496429920196533, 0.16882506012916565, 0.5861392617225647, -0.3380149006843567, 0.06528782099485397, -0.028062541037797928, -0.9287844896316528, 0.05966809019446373, -0.17138268053531647, 0.6494224071502686, -0.34520214796066284, 0.570936501026153...
def set _ repo _ folder ( self ) : self. current _ folder = self. repo _ folder
[ -0.4482673704624176, -0.3995698094367981, 0.20826423168182373, -0.4935048222541809, 0.29888778924942017, 0.40494197607040405, 0.7608397006988525, 0.336047500371933, -0.9418584704399109, -0.20270125567913055, 0.14660687744617462, 0.868838906288147, -0.2998787760734558, 0.5834728479385376, ...
def move ( self, dx, dy, dz ) : if ( self. flightmode ) : # this is flight mode so we need to move along the forward axis. # move left or right along the camera's x - axis. self. position + = self. xaxis * dx # move up or down along the world's y - axis. self. position + = world _ yaxis * dy # move forward along the ca...
[ -0.6861163973808289, 0.3570050597190857, 0.5285312533378601, 0.3795032799243927, -0.03781570866703987, 0.12027063220739365, 0.058782048523426056, -0.5764082670211792, 0.4057506322860718, -0.6175281405448914, -0.12904401123523712, -0.37389054894447327, -0.2786119282245636, -0.22907288372516...
def _ _ init _ _ ( self, screen ) : super ( background, self ). _ _ init _ _ ( ) self. screen = screen self. image = pygame. image. load ( '.. / images / background. png'). convert _ alpha ( ) self. rect = self. image. get _ rect ( ) self. screen _ rect = screen. get _ rect ( )
[ -0.17113564908504486, -0.29336997866630554, 0.7949061393737793, 0.5109070539474487, 0.6397989988327026, 0.4510464072227478, 0.04073582962155342, -0.038213104009628296, 0.31903767585754395, 0.33060094714164734, 0.18634459376335144, 0.21389052271842957, 0.37424689531326294, 1.133094787597656...
def _ _ init _ _ ( self, request = none, pk = none, * args, * * kwargs ) : self. request = request self. pk = pk super ( companyform, self ). _ _ init _ _ ( * args, * * kwargs )
[ -0.8464640378952026, -0.24915210902690887, 0.8320562839508057, 0.2549195885658264, 0.1543608456850052, 0.43167462944984436, -0.586558997631073, 0.7618057727813721, -0.1542973816394806, -1.3082282543182373, -0.5427468419075012, 0.019489772617816925, 0.35478129982948303, 0.8526967763900757, ...
def call _ menu _ function ( self, choice _ dict, choice, unfound _ key _ handler, * * kwargs ) : try : # get the selection number and call helper function choice _ dict [ choice ] ['function'] ( ) except keyerror : unfound _ key _ handler ( * * kwargs ) return false else : return true
[ -0.9927059412002563, -0.045762572437524796, 0.44414347410202026, 0.618794322013855, 0.28381437063217163, 0.10762616991996765, -0.3265582025051117, -0.11767298728227615, -0.5713796019554138, 0.07577835023403168, -0.5181249380111694, -0.2831538915634155, -0.3930946886539459, 0.16521118581295...
def schedule _ tas ( tas, slots, rsf = none ) : if not len ( slots ) : return rsf if rsf is none : rsf = [ ] for a in make _ assignments ( tas, slots [ 0 ], rsf ) : value = schedule _ tas ( tas, slots [ 1 : ], [ a ] + rsf ) if value : return value
[ -0.48161548376083374, 0.375160813331604, 0.3714146912097931, -0.26662784814834595, -0.7085872888565063, -0.794952929019928, 0.4930681586265564, 0.3027346134185791, -0.018093379214406013, 0.30397725105285645, 0.4057765305042267, -0.07026185840368271, 0.5513111352920532, -0.11367868632078171...
def calc _ ll ( params, target, w = 1. 0 ) : recon, mu, lv, mu _ prior, lv _ prior, z = params # std = torch. exp ( 0. 5 * lv ) # std _ prior = torch. exp ( 0. 5 * lv _ prior ) rcon = f. binary _ cross _ entropy _ with _ logits ( recon, target, reduction = " none " ). sum ( dim = - 1 ) kld = - 0. 5 * torch. sum ( 1 + l...
[ 0.785528302192688, -0.6740440130233765, 0.6695338487625122, -0.1429755538702011, -0.5989059209823608, 0.08429771661758423, 0.2082749456167221, 0.5280397534370422, 0.31728595495224, 0.5685118436813354, -0.3462461531162262, 1.0331064462661743, -0.15219369530677795, -0.0556507371366024, -0....
def test _ sequence _ consistency ( self ) - > none : # prefill with some rows self. _ insert _ row _ with _ id ( " master ", 3 ) # now we add a row * without * updating the stream id def _ insert ( txn : cursor ) - > none : txn. execute ( " insert into foobar values ( 26,'master') " ) self. get _ success ( self. db _ ...
[ -0.5932635068893433, 0.9513741731643677, 0.4811089336872101, -0.033255767077207565, 1.0304592847824097, 0.3145561218261719, 0.820184588432312, 0.25210514664649963, -0.1900370568037033, 0.2035188525915146, -1.0891005992889404, -1.0438770055770874, -0.8446727991104126, 1.202778697013855, 0...
def install _ mysql _ client ( update = false ) : fabtools. require. deb. packages ( ['libmysqlclient - dev'], update = update )
[ 0.5309879779815674, -0.5089189410209656, 0.41623133420944214, 0.08511772006750107, -0.7831069827079773, 0.15943416953086853, 0.0916065201163292, -0.6015229821205139, -0.24163185060024261, -0.38598862290382385, -1.081036925315857, -0.7096057534217834, -0.45802831649780273, 0.378302603960037...
def get _ post ( ) : # set the connection to db uri = " mongodb : / / 127. 0. 0. 1 : 27017 " client = pymongo. mongoclient ( uri ) # set the collection and db to work on db = client ['blog'] collection = db ['posts'] id = " 5cb0939271806b6b41599077 " post = collection. find _ one ( { " _ id " : id } ) # return only one...
[ 0.5884467959403992, 0.5278167128562927, 0.5577332377433777, 0.2627239525318146, 0.6000908613204956, 0.47118961811065674, -0.10228877514600754, 0.009310749359428883, -0.6533262729644775, 0.12773478031158447, -0.34277990460395813, 0.04079284518957138, -1.6210625171661377, -0.3204472959041595...
def is _ text ( file ) : init ( ) if '.'not in file : return false file _ name, file _ suffix = os. path. splitext ( file ) file _ suffix = file _ suffix. strip ( ) if file _ suffix in text _ suffix : return true else : return false
[ 0.6697335839271545, -0.6128565073013306, 0.8915436267852783, 0.48253682255744934, -0.9657156467437744, 0.4811575710773468, 0.2411024570465088, 0.9391741156578064, -0.02418130449950695, 0.5737661719322205, -0.8365435600280762, 0.26471447944641113, 0.03333799168467522, 0.12307625263929367, ...
def table _ metadata ( self, table ) : self. _ tables _ init ( ) if'metadata'not in self. tables [ table ]. keys ( ) : self. tables [ table ] ['metadata'] = { } q ='set hive. cli. print. header = false ; describe formatted { 0 } ; '. format ( table ) for line in self. query ( q ). splitlines ( ) : try : key, value = li...
[ -0.5514593124389648, 0.4306759834289551, 0.5868461728096008, 0.19806694984436035, -0.12185482680797577, -0.08875440061092377, -1.120493769645691, -0.25868210196495056, -0.4676230251789093, 0.8270119428634644, -0.07574360817670822, 0.334729939699173, -0.1920103132724762, 0.42698830366134644...
def test _ create _ admin _ only ( self ) : payload = { " date " : [ 2, 2022 ], " name " : { " en " : " test skill ", " fr " : " skill de test " }, " description " : { " en " : [ " test desc " ], " fr " : [ " desc test " ] } } res = self. client. post ( skill _ url, payload, format ='json') self. assertequal ( res. sta...
[ 0.4215734302997589, 0.898697018623352, 0.5736376643180847, -0.0659528523683548, 0.6974759101867676, 1.2841665744781494, -0.27001696825027466, -1.3753705024719238, -0.49442678689956665, 0.301700621843338, -0.7660030126571655, 1.1341396570205688, 0.09953157603740692, 0.43514180183410645, 0...
def _ _ init _ _ ( self, mb _ info, index ) : self. microblaze = pmod ( mb _ info, pmod _ timer _ program ) self. clk _ period _ ns = int ( 1000 / clocks. fclk0 _ mhz ) # write pwm pin config self. microblaze. write _ mailbox ( 0, index ) # write configuration and wait for ack self. microblaze. write _ blocking _ comma...
[ -0.21910642087459564, 0.7043538093566895, 0.5005728006362915, 0.7418163418769836, 0.3129081130027771, 0.3955928385257721, 0.8070001006126404, -0.2521180808544159, 0.2520359456539154, 0.12229544669389725, -0.05756724998354912, 0.01580146513879299, -0.8418009877204895, 0.10993649810552597, ...
def getemails ( feature ) : emails = ['brad. craddick @ spireenergy. com ','robert. domiano @ spireenergy. com'] for email in emails : if ( email [ - 16 : ]! = " @ spireenergy. com " ) and email! = " " : log. info ( " { } is not a valid email. an email will not be sent to this address. ". format ( email ) ) emails. rem...
[ 0.13711251318454742, -0.009864920750260353, 0.4665048122406006, 0.3817462623119354, 0.5920437574386597, -0.2567208707332611, -0.634194552898407, 0.5924233198165894, -0.07885803282260895, 0.7056616544723511, 0.6672687530517578, 1.0057731866836548, -0.3441855013370514, -0.9027663469314575, ...
def floor ( n : float ) - > int : from math import floor return floor ( n )
[ 0.12181391566991806, 0.6624293327331543, -0.048155270516872406, 0.45628461241722107, 0.04690553620457649, 0.3668062090873718, 1.6898376941680908, -1.6435521841049194, -0.4631659984588623, -1.4007424116134644, -0.26501044631004333, -0.3779805600643158, -0.4644673764705658, 1.992888689041137...
def _ _ getexistingfiles ( self, lfns ) : filesexist = [ ] missing = { } res = self. filecatalog. exists ( lfns ) if not res ['ok'] : glogger. error ( " requestpreparation. _ _ getexistingfiles : failed to determine whether files exist. ", res ['message'] ) return res failed = res ['value'] ['failed'] for lfn, exists i...
[ -1.024377703666687, -0.2707568407058716, 0.641453206539154, -0.04328598827123642, 1.6755685806274414, -0.32615911960601807, -0.6796926259994507, 0.21759499609470367, -0.5773148536682129, 0.17153926193714142, -0.38997891545295715, -0.5981193780899048, 0.25170058012008667, 0.3207718133926391...
def joinset ( itemset, length ) : return set ( [ i. union ( j ) for i in itemset for j in itemset if len ( i. union ( j ) ) = = length ] )
[ 0.5475694537162781, -0.16185542941093445, 0.4533103108406067, -0.9946837425231934, -0.6015756130218506, -0.2941899299621582, -1.3750958442687988, -0.34357091784477234, 0.02966981753706932, 0.0815039798617363, -0.36029425263404846, -0.21085725724697113, -0.7944095134735107, -1.4605981111526...
def _ _ init _ _ ( self, features, target, min _ split _ samples = 80 ) : self. x = features self. y = target self. categorical = false self. rule = none self. left _ rule = none self. right _ rule = none self. feature _ name = " " self. gini _ index = none self. counts = self. get _ counts ( self. y ) self. predicted ...
[ -0.20610184967517853, -0.18258316814899445, 0.6588150858879089, -0.08068256825208664, 0.33994436264038086, -0.09809015691280365, -0.3838217258453369, 0.30886411666870117, -0.6754436492919922, -0.09341929107904434, -0.41020500659942627, 0.37287023663520813, 0.27250078320503235, 0.1668284684...
def select _ template ( template _ folder : str = r '. / recordings') : recordings = utils. get _ audio _ files ( audio _ path = template _ folder, endswith = '. wav') print ('的 :') for i, r in enumerate ( recordings ) : print ( f'\ t { i }. { r }') c = input ('的 > > >') try : c = int ( c ) except ( valueerror, indexer...
[ -0.39263901114463806, 0.2789364755153656, 0.7533078193664551, 0.40876826643943787, -0.4107007086277008, -0.08915654569864273, 1.346904993057251, -0.09531527012586594, -0.015505319461226463, 0.10822905600070953, -0.21438753604888916, 0.6678909659385681, -0.5379093289375305, 0.07487640529870...
def turndecreases ( self ) : self. trap. turns = 5 turns = self. trap. turns self. trap. afterturn ( self. pkmn ) assert self. trap. turns = = turns - 1, " turns should decrement "
[ 0.009800233878195286, -0.11238904297351837, 0.3063071370124817, 0.05364058539271355, 0.975963294506073, 0.04422381520271301, 0.4840863347053528, -0.7112569808959961, 0.09567974507808685, -0.8687565922737122, -0.2878003716468811, -0.7148405313491821, -0.18108227849006653, -0.300573676824569...
def init _ table _ view ( self ) : if not create _ connection ( ) : sys. exit ( 1 ) self. model = qsqltablemodel ( ) initialize _ model ( self. model ) self. tableview. setmodel ( self. model ) self. tableview. setsortingenabled ( true ) reflesh _ model ( self. model )
[ 0.959784209728241, -0.28156349062919617, 0.4418679177761078, 0.4611242413520813, -0.28402256965637207, 0.4838583767414093, 0.4300408661365509, -0.7088444828987122, -0.848354160785675, -1.1957013607025146, -0.22850821912288666, -0.02013569138944149, 0.1264348030090332, 1.0103752613067627, ...
def zlkc ( candles : np. ndarray, period : int = 20, mult : float = 1, source _ type = " hlc3 ", sequential = false ) - > zerolagkeltnerchannel : source = get _ candle _ source ( candles, source _ type = source _ type ) ma = cta. zlema ( source, period = period, sequential = true ) tr = ta. trange ( candles = candles, ...
[ -0.011404622346162796, 0.2745061218738556, 0.44884175062179565, 0.06161758676171303, -0.6449472904205322, -0.8479458093643188, 1.0545177459716797, -0.28289878368377686, -0.03291889652609825, 0.13782747089862823, 0.8022035360336304, 0.5478060245513916, -0.314147025346756, 0.3946529328823089...
def call ( request, text ) : client = twiliorestclient ( settings. account _ sid, settings. auth _ token ) call = client. calls. create ( to = " 4105416123 ", from _ = " + 14158892387 ", url = " mail - safe. appspot. com / twiml / % s " % text, # url to find twitxml method = " get ", fallback _ method = " get ", status...
[ 0.3341633081436157, 0.9008156657218933, 0.5591266751289368, -1.0127981901168823, -0.7222133874893188, 0.08581147342920303, -1.101855754852295, -0.6034078001976013, 0.5271715521812439, 0.21752145886421204, 0.013397992588579655, 0.05686898157000542, -1.1350586414337158, -0.2813788056373596, ...
async def createissuegreetingforupdate ( gl, event ) : url = f " / projects / { event. project _ id } / issues / { event. object _ attributes ['iid'] } / notes " message = f " reminder : @ { event. data ['user'] ['username'] }, please don't forget to remove redundant labels. ( i'm a bot ). \ n \ n - - - \ n if there ar...
[ 0.22108612954616547, -0.24408796429634094, 0.7804020047187805, -0.8979348540306091, 0.3430733382701874, 0.8092986345291138, -0.533690869808197, -0.15253262221813202, -0.17225269973278046, 0.43761739134788513, -0.44385915994644165, 0.36573395133018494, -1.3066409826278687, 0.444094955921173...
def input ( self, _ in, out, * * kw ) :
[ -0.9485767483711243, -0.19970658421516418, 0.3130321502685547, 0.9763698577880859, -1.0995432138442993, 0.4238013029098511, 0.43344148993492126, -0.048053763806819916, -0.2241344153881073, -0.8920574188232422, -0.23763404786586761, 1.1543383598327637, 0.09327613562345505, -0.46294975280761...
def text ( self ) : return self. browser. text ( self )
[ -0.5452274084091187, -1.6384665966033936, 0.3574148118495941, 0.4907536208629608, -0.4721354842185974, -0.14863236248493195, -0.03938418626785278, -0.8882527947425842, 0.9592646956443787, 0.15770049393177032, -0.05152913182973862, -0.3829718232154846, -0.33281606435775757, -0.5481862425804...
def get _ outplanes ( self ) : return self. out _ planes
[ -0.08735712617635727, -0.10316581279039383, 0.46327105164527893, 0.3979324698448181, -0.7650620341300964, 1.0492178201675415, 0.1423988938331604, -0.7033634185791016, -0.6932993531227112, -0.15877170860767365, -0.6623581051826477, 0.1357724666595459, -0.9233967661857605, -0.024934628978371...
def _ date _ from _ solr ( self, date _ string ) : def safe _ decode ( date _ string ) : if isinstance ( date _ string, str ) : lang, encoding = locale. getlocale ( ) encoding = encoding if encoding else self. default _ date _ encoding return unicode ( date _ string, encoding ) return date _ string date = self. _ strpt...
[ 0.5071350336074829, -0.4873022735118866, 0.12871642410755157, 0.17122910916805267, -0.9992783069610596, 0.21310575306415558, -0.7656183838844299, -0.20838819444179535, 0.6609314680099487, -0.6554791927337646, 0.20495545864105225, 0.33444494009017944, -0.43855246901512146, -0.91704219579696...
def get ( org _ id ) : try : response, status = orgservice. get _ contacts ( org _ id ), http _ status. http _ 200 _ ok except businessexception as exception : response, status = {'code': exception. code,'message': exception. message }, exception. status _ code return response, status
[ -0.5329323410987854, -0.40038204193115234, 0.7005714774131775, 0.4197378158569336, 0.6167967915534973, -0.818141758441925, -0.19759702682495117, -0.030549755319952965, -0.13110804557800293, 0.45826247334480286, -0.09309586137533188, 0.7342752814292908, -0.4573611319065094, 0.18716827034950...
def getmpintrests ( self ) : # annoyingly, the data from theyworkforyou for the registered intrests # is in html, use beautifulsoup to parse into regular text intrests = self. full _ info ['register _ member _ interests _ html'] soup = beautifulsoup ( intrests,'html. parser') text = soup. text # split into lines for it...
[ -0.508383572101593, 0.39972880482673645, 0.7319319844245911, -0.8890058994293213, 0.08223101496696472, -0.5684514045715332, -0.3149952292442322, -0.6451444625854492, -0.3066895604133606, -0.5998114943504333, 0.2303580641746521, 0.13699239492416382, -0.3317447900772095, 0.41319647431373596,...
def winner ( board ) : if ( board [ 1 ] [ 1 ] = = board [ 0 ] [ 0 ] = = board [ 2 ] [ 2 ] ) or \ ( board [ 1 ] [ 1 ] = = board [ 0 ] [ 1 ] = = board [ 2 ] [ 1 ] ) or \ ( board [ 1 ] [ 1 ] = = board [ 0 ] [ 2 ] = = board [ 2 ] [ 0 ] ) or \ ( board [ 1 ] [ 1 ] = = board [ 1 ] [ 0 ] = = board [ 1 ] [ 2 ] ) : winner = boar...
[ 1.0692256689071655, -0.4547346234321594, 1.5383362770080566, 0.3119983673095703, -0.9287455081939697, -0.23698219656944275, 0.5605667233467102, -0.17159749567508698, 0.5165152549743652, 0.5140751004219055, -0.21682888269424438, -0.30408230423927307, -0.44671252369880676, -0.524034917354583...
async def _ _ aexit _ _ ( self, exc _ type, exc _ value, traceback ) : await self. close ( )
[ 0.06968916207551956, -0.14810730516910553, 0.6468309164047241, -0.007239636033773422, 0.06467145681381226, 0.14014020562171936, 0.2879805266857147, 0.15948724746704102, 0.1729995161294937, -0.1346050649881363, 0.9662356376647949, -0.07792484015226364, 0.04088076949119568, -0.02573412284255...
def get _ posts ( cls, year = none ) : years = cls. get _ years ( ) if not year else [ year ] for year in years : directory = os. path. join ( cls. root, year ) if not os. path. isdir ( directory ) : abort ( 404 ) for name in os. listdir ( directory ) : if name. endswith ( cls. suffix ) : yield cls. load ( year, name [...
[ -0.17881950736045837, 0.3610309958457947, 0.7473185658454895, 0.09690873324871063, -0.15908722579479218, 0.09273244440555573, -0.4564991295337677, -0.09744065254926682, 0.5325639843940735, -0.27516722679138184, -0.38833922147750854, 0.2531295120716095, 0.2424280047416687, 0.838266968727111...
def get _ language ( file ) : file _ name, file _ suffix = os. path. splitext ( file ) return get _ language _ on _ suffix ( file _ suffix )
[ 0.987927258014679, -0.32677775621414185, 0.44681450724601746, 0.29482918977737427, -1.1717276573181152, 0.015373905189335346, 0.09082668274641037, 0.7131195664405823, -0.9543781876564026, 0.4321761429309845, -0.39446184039115906, 0.3675766885280609, 0.3103829026222229, 0.28349569439888, ...
async def _ load _ scenes ( self ) : _ log. debug ( " loading scenes from the smart bridge " ) scene _ json = await self. _ request ( " readrequest ", " / virtualbutton " ) for scene in scene _ json. body [ " virtualbuttons " ] : _ log. debug ( scene ) # if'name'is not a key in scene, then it is likely a scene pico # v...
[ -0.7160926461219788, -0.3605937361717224, 0.5544123649597168, -0.07470592111349106, -0.11506387591362, -0.1349141150712967, -0.9592869877815247, -0.3252071142196655, 0.8460221886634827, 0.4679654836654663, -1.1109721660614014, -0.4396994709968567, -0.6943243145942688, 0.25514671206474304, ...
def valid ( self, value ) : raise notimplementederror
[ -0.28022536635398865, -0.25254958868026733, 0.5069663524627686, 0.30601030588150024, -0.5173183679580688, 1.4700860977172852, 0.373622864484787, -0.07274267077445984, 0.402627557516098, -0.2824765741825104, -0.18875178694725037, -0.37657201290130615, 0.23922741413116455, 0.6976751089096069...
def _ _ init _ _ ( self, * args, * * kwds ) : if args or kwds : super ( gpsposition, self ). _ _ init _ _ ( * args, * * kwds ) # message fields cannot be none, assign default values for those that are if self. header is none : self. header = std _ msgs. msg. header ( ) if self. time _ utc _ usec is none : self. time _ ...
[ 0.18315990269184113, -0.49850112199783325, 0.9821301102638245, -0.19629482924938202, 0.16585347056388855, 0.32300907373428345, -0.1857977956533432, -0.02468937635421753, -0.061945412307977676, 0.09919137507677078, 0.031891923397779465, -1.013915777206421, -0.7083712816238403, 1.06295907497...
def moves _ list ( n : int, source : int = 0, intermediate _ left : int = 1, intermediate _ right : int = 2, destination : int = 3 ) - > list : moves _ lst = [ ] move _ with _ four ( moves _ lst, n, source, intermediate _ left, intermediate _ right, destination ) movesequence. _ _ init _ _ ( movesequence, moves _ lst )...
[ -1.6089156866073608, -0.01891290955245495, 0.330740749835968, 0.22162123024463654, 0.3800661861896515, -0.7232641577720642, -0.822407603263855, 0.21884748339653015, -0.001302878838032484, 0.9114614725112915, -2.269287347793579, -0.6984721422195435, 0.3523997962474823, -0.13001981377601624,...
def queue _ fetch _ source ( model _ admin, request, queryset ) : for incomming in queryset : incomming. source. queue _ fetch ( )
[ -0.4789491593837738, 0.03103051893413067, 0.22541509568691254, -0.2452700287103653, -0.014427674934267998, 0.3753255009651184, 0.18698963522911072, -0.6817868947982788, 0.18387186527252197, 0.4505767822265625, -0.6499518156051636, 0.3978855013847351, 0.580109715461731, 1.3217717409133911, ...
def mainwidget ( self ) : return self. _ _ splitter
[ 0.22280798852443695, -0.3486565351486206, 0.3872799277305603, -0.6625708341598511, -1.0565844774246216, 0.21139226853847504, 0.7447710633277893, 0.7662729024887085, 0.8822678327560425, -1.057592511177063, 0.030463524162769318, -0.32770103216171265, -1.4436053037643433, 0.33806368708610535,...
def up _ whole ( self ) : whole = self. up _ half ( ). up _ half ( ) return whole if self. get _ accidental ( ) = = c. tone _ flat else whole. alt ( )
[ -0.14183785021305084, -0.8489630222320557, 0.7144123315811157, 0.04982035979628563, -0.4142186939716339, 0.5477731823921204, 0.5572171211242676, -1.1187543869018555, 0.03604380413889885, 0.5297518372535706, 0.22838999330997467, 0.08914811909198761, -0.7917228937149048, -0.22761788964271545...
def _ unstack ( self, params ) : mu = params [ :, : self. dims ] logstdev = params [ :, self. dims : ] return mu, logstdev
[ 0.13362255692481995, 0.748095691204071, 0.4172208905220032, -0.07695885747671127, -0.6273596286773682, -0.611299991607666, 0.9567084908485413, 0.4377266764640808, -0.7920635938644409, 0.8490182757377625, 0.4408787488937378, 0.9504170417785645, 0.061329010874032974, 0.47241267561912537, 0...
def get _ groups ( self, uuid = none, cache = false, * * kwargs ) : if cache : groups = self. get _ cached _ inventory ('_ _ groups') if uuid : return [ deepcopy ( x ) for x in groups if x ['uuid'] = = uuid ] return groups return self. request ('groups ', uuid = uuid, * * kwargs )
[ -2.2274487018585205, 0.8645066022872925, 0.3507704436779022, 0.8662338852882385, 0.26675936579704285, -0.4127262234687805, -0.6620290875434875, -0.16488666832447052, 0.07136207818984985, 0.23872250318527222, 0.24005664885044098, 0.9194706678390503, -0.6259608268737793, -0.23758263885974884...
def clean _ ghecause ( df ) : indices = df. index i = indices [ 0 ] subs = df. ix [ i,'group'] to _ drop = [ ] for n in range ( len ( indices ) ) : i = indices [ n ] if ( isalpha ( df. ix [ i,'ghecause'] ) ) : subs = df. ix [ i,'group'] to _ drop. append ( i ) df. ix [ i,'ghecause'] = subs df. drop ( to _ drop, axis = ...
[ -0.3335162401199341, 0.49452123045921326, 0.8108190894126892, -0.5971248149871826, 0.3163934051990509, 0.08330202102661133, 0.832940936088562, 0.2759566307067871, -0.09398158639669418, 1.172209620475769, 0.24366311728954315, 0.4925989508628845, -0.3938670754432678, -0.1470552235841751, 1...
def mul _ add ( self, selffac, other, otherfac, queue = none ) : result = self. _ new _ like _ me ( _ get _ common _ dtype ( self, other, queue or self. queue ) ) self. _ axpbyz ( result, selffac, self, otherfac, other ) return result
[ 0.38707593083381653, 0.2389739453792572, 0.8098624348640442, 0.6245931386947632, -0.11439792811870575, -0.6833400130271912, 0.10447554290294647, -0.9441720247268677, 0.646625816822052, -0.4430001974105835, -0.6676504015922546, 0.10742557793855667, -0.14813478291034698, -0.5115655660629272,...
def main ( args = none ) : usage = " usage : % prog [ options ] config _ file " parser = optparse. optionparser ( usage = usage ) parser. add _ option ( " ", " - - check - interval ", type = " int ", default = 60, help = " the interval between checks, in seconds " ) parser. add _ option ( " ", " - - backend - timeout "...
[ 0.5428251028060913, 0.7805817723274231, 1.3003166913986206, 0.24644947052001953, 0.6360606551170349, -0.07025795429944992, 0.5016554594039917, 0.2291097193956375, -0.6463367342948914, 0.8040903806686401, 0.5787969827651978, 0.001914238091558218, -0.8199067115783691, 0.2243214249610901, 0...
def partition _ spec _ from _ path ( path, regex ) : if isinstance ( regex, basestring ) : regex = re. compile ( regex ) group _ matches _ in _ order = [ g [ 1 ] for g in sorted ( [ ( index, group ) for group, index in regex. groupindex. items ( ) ] ) ] match = regex. search ( path ) spec _ parts = [ ] for key in group...
[ 0.05237184837460518, -0.4301367402076721, 0.787825882434845, -0.6123189926147461, -0.5291135311126709, -0.6583847999572754, -0.08504823595285416, 0.4020695686340332, -0.4326026141643524, 0.6782556176185608, 0.8962339162826538, -0.6852163672447205, 0.12194954603910446, -0.8495866656303406, ...
def get _ weather ( city _ id ) : try : payload = request. get _ json ( ) # badrequest exception will be raised if json data is not formated properly # and decoding of json data failed. except exceptions. badrequest as e : return make _ response ( jsonify ( { " error " : " bad request " } ), 400 ) # the remaining comma...
[ -0.06537994742393494, -0.5745415687561035, 1.015584111213684, -0.016758635640144348, 0.07914434373378754, -0.5998771786689758, -0.30658695101737976, -0.2814134955406189, -0.181905135512352, -0.11066866666078568, 0.02663416787981987, 0.14444859325885773, -0.21197731792926788, 1.142413735389...
def connect ( self, host, port = 1883, keepalive = 60, bind _ address = " " ) : print ( " connect " ) self. connect _ async ( host, port, keepalive, bind _ address ) return self. reconnect ( )
[ -0.42290329933166504, -0.614651620388031, 0.5737106800079346, 1.2854443788528442, -0.2016073614358902, 0.5745280385017395, -1.047424554824829, -0.258317232131958, -0.769114077091217, 0.7093768119812012, -0.3541812002658844, -0.06921254098415375, -0.7676642537117004, -0.5752550363540649, ...
def create _ test _ db ( ) : if os. getenv ('databoard _ stage') in ['test ','testing'] : shutil. rmtree ( deployment _ path, ignore _ errors = true ) os. makedirs ( deployment _ path ) # todo : not sure it is necessary to have the fabfile copied for local # test shutil. copyfile ( os. path. abspath ('fabfile. py'), os...
[ 0.5962246060371399, 0.28144165873527527, 0.6662081480026245, 0.42542651295661926, 0.41706201434135437, 0.7871402502059937, 1.517163634300232, 0.4515540599822998, 0.1861516833305359, -0.027531759813427925, -0.39688900113105774, -0.5460379123687744, -0.3518969714641571, 0.6937764286994934, ...
def _ tj _ numba ( j, a, x, l ) : return ( _ soft _ threshold _ numba ( sum ( np. delete ( a [ :, j ], j, axis = 0 ) * np. delete ( x, j, axis = 0 ) ), l ) / ( 2 * a [ j, j ] ) )
[ 0.6348368525505066, 0.12881158292293549, 0.3064993917942047, -0.39379939436912537, -1.2833749055862427, -1.4917412996292114, 0.8912528157234192, 0.1887928992509842, 0.015565416775643826, 1.3037947416305542, -0.638346254825592, -0.048123542219400406, 0.08659156411886215, 0.02897037193179130...
def log ( message, severity, print _ debug = true ) : print _ me = ['warning ','info ','debug'] if severity in print _ me : if severity = ='debug': if print _ debug : print severity, message else : print severity, message else : raise exception ( " % s : % s " % ( severity, message ) )
[ 1.1919190883636475, 0.5510818958282471, 0.6824320554733276, 0.8126611113548279, -0.3157913386821747, -0.18483950197696686, -1.4898875951766968, 0.5524278283119202, -0.24590156972408295, 0.0709589496254921, 0.39988794922828674, 0.7232035994529724, -0.18221482634544373, 0.5873413681983948, ...
def validate _ available _ choice ( enum, to _ value ) : if to _ value is none : return if isinstance ( to _ value, str ) : try : if to _ value. isdigit ( ) : to _ value = enum. get ( int ( to _ value ) ). value else : to _ value = enum. get ( to _ value ). value except attributeerror : message _ str = "'{ value }'cann...
[ -1.4875496625900269, 0.05767330154776573, 0.5361008644104004, -0.3895629048347473, -0.05512677878141403, 0.41115784645080566, 0.06101761758327484, 0.15349754691123962, 0.29839402437210083, 1.127733826637268, 0.692535400390625, 0.33251088857650757, 0.41357070207595825, 0.11779729276895523, ...
def security _ country ( self, security _ country ) : self. _ security _ country = security _ country
[ 0.6594526767730713, -0.9839387536048889, -0.10725272446870804, 1.2226141691207886, 0.6973011493682861, 1.3879183530807495, 1.460587978363037, -0.15540029108524323, -0.002441766671836376, -0.7398695349693298, -1.3890395164489746, -0.42466580867767334, -0.7055962085723877, 0.3839305639266968...
def test _ reactorparametrizationinclientmultiplestart ( self ) : reactor = memoryreactor ( ) factory = protocol. clientfactory ( ) t = internet. tcpclient ('127. 0. 0. 1 ', 1234, factory, reactor = reactor ) t. startservice ( ) self. assertequal ( reactor. tcpclients. pop ( ) [ : 3 ], ('127. 0. 0. 1 ', 1234, factory )...
[ -0.6581112146377563, -0.1090918704867363, 0.3951576054096222, -0.657206118106842, 0.9429047703742981, -0.5046542882919312, 0.11813537031412125, -0.13142161071300507, -0.4078335464000702, 0.30724582076072693, -0.2820659577846527, 0.0089494027197361, -0.617770254611969, -0.17852424085140228,...
def calculate _ from _ string ( math _ string ) : divided _ str = math _ string. split ( " " ) num1 = float ( divided _ str [ 0 ] ) num2 = float ( divided _ str [ 2 ] ) sgn = divided _ str [ 1 ] if sgn = = " + " : return num1 + num2 elif sgn = = " - " : return num1 - num2 elif sgn = = " / " : if num2! = 0 : return num1...
[ 1.1360487937927246, -0.4703676402568817, 0.6565375924110413, 0.551310658454895, -1.0082274675369263, -0.0923130214214325, 0.15554656088352203, -1.0017635822296143, -0.08524999767541885, -0.5274149775505066, -0.15050484240055084, -0.11485559493303299, -0.3757883906364441, -0.635848939418792...
def convert _ labels ( self ) : unq _ labels = np. unique ( np. array ( self. labels ) ) self. label2indexes = dict ( ( l, i ) for i, l in enumerate ( unq _ labels ) ) self. index2labels = dict ( ( i, l ) for i, l in enumerate ( unq _ labels ) ) if self. verbose > 5 : print ('label to index : ', self. label2indexes ) p...
[ -1.5194730758666992, -0.4412010610103607, 0.5294473767280579, -1.1290407180786133, 0.07230524718761444, -0.5134837031364441, 0.43969833850860596, 0.3316439390182495, -0.10655605792999268, 0.1357874870300293, -0.5406957864761353, 0.04229503497481346, 0.2869887053966522, -0.25513553619384766...
def load _ classifications ( classifications _ file, min _ version ) : df = pd. read _ csv ( classifications _ file ) df = df [ df. workflow _ version > min _ version ] df = df [ df. workflow _ name = = " counts and behavior " ] return df
[ -0.23742544651031494, 0.16527508199214935, 0.27307072281837463, 0.29043203592300415, 0.264669805765152, 0.5501114726066589, -0.033594273030757904, 0.351963609457016, -0.4693543612957001, 0.11624280363321304, 0.6740748882293701, 0.7328364849090576, 0.044978976249694824, -0.4264110028743744,...
def rotatez ( self, angle ) : rad = angle * math. pi / 180 cosa = math. cos ( rad ) sina = math. sin ( rad ) x = self. x * cosa - self. y * sina y = self. x * sina + self. y * cosa return point3d ( x, y, self. z )
[ -0.4894283711910248, 0.004349394701421261, 0.43451812863349915, -0.8239781260490417, -0.159393310546875, -0.29624995589256287, 0.2513362467288971, 0.1917981058359146, 0.9569395184516907, -0.676270067691803, 0.14620143175125122, 0.04876860976219177, -0.6260107755661011, -1.0805983543395996,...
def get _ df ( self ) - > pd. dataframe : raise notimplementederror
[ -0.12836472690105438, 0.17593686282634735, 0.31313982605934143, 0.6923618912696838, 0.5767431855201721, 0.05557239055633545, 0.35443323850631714, -0.10794996470212936, -0.265343576669693, -2.062512159347534, 0.5513904690742493, 0.8837190866470337, 0.46407848596572876, -0.5333728194236755, ...
def test _ _ get _ labels ( ) : # uppercase'c'assert imageconfig. _ get _ labels ( json. loads ('{ " config " : { " labels " : { " x " : " 5 " } } }') ) = = { " x " : " 5 " } # lowercase'c'assert imageconfig. _ get _ labels ( json. loads ('{ " config " : { " labels " : { " x " : " 5 " } } }') ) = = { " x " : " 5 " } # ...
[ -0.6366508603096008, -0.005532925482839346, 0.49007347226142883, -1.4643980264663696, 0.08784427493810654, -0.13621972501277924, -0.8084011673927307, -0.8534609079360962, -0.3074181377887726, 0.5668807029724121, -0.715355396270752, -0.6819488406181335, 0.2669055759906769, 0.304549366235733...
def print ( self, message : string, tag : string = none, stats : bool = true, log _ level = logging. info ) : self. log _ manager. print ( message, tag, stats, log _ level )
[ 0.6440677642822266, -0.08421779423952103, 0.3904228210449219, -0.19776636362075806, 0.012869513593614101, -0.03957191854715347, -0.8316131830215454, -0.6119135022163391, -0.7461518049240112, -1.0525035858154297, 0.25162434577941895, 0.7621369361877441, -0.18610548973083496, 0.8666064143180...
def execute _ none ( self, sql : str, * params ) - > none : cursor = self. _ _ conn. cursor ( ) cursor. execute ( sql, * params ) cursor. close ( )
[ -0.16270877420902252, 0.019512305036187172, 0.47925376892089844, 0.3239341676235199, 0.9922971725463867, -0.1878892183303833, -1.0203304290771484, -0.703454852104187, -0.7937528491020203, -0.2055889517068863, 0.4103425443172455, 0.2760266065597534, -0.9475212693214417, 0.3458564281463623, ...
def calculaterotationoperator ( theta, phi ) : return np. array ( [ [ math. cos ( theta ), - math. sin ( theta ) * math. sin ( phi ), math. sin ( theta ) * math. cos ( phi ) ], [ math. sin ( phi ), math. cos ( theta ), math. sin ( theta ) * math. sin ( phi ) ], [ - math. sin ( theta ) * math. cos ( phi ), - math. sin (...
[ -1.1316595077514648, 0.6615191102027893, 0.7602956891059875, -1.5417691469192505, -0.08700083941221237, -0.4608566164970398, 0.16320425271987915, 0.4300934970378876, -0.15229065716266632, 0.9566932916641235, -0.42222046852111816, 0.1808055192232132, -1.099063754081726, -0.08994291722774506...
def add ( self, * args, * * kwargs ) : # real signature unknown pass
[ -0.22976702451705933, -0.32354864478111267, 0.367561012506485, 0.9648721814155579, 0.9398144483566284, 0.4759882986545563, 0.18785184621810913, -0.23467831313610077, 0.31277942657470703, -0.6259744763374329, -0.7861489057540894, -0.007549813948571682, -0.6201560497283936, 0.631558477878570...
def remake _ nums ( self ) : self. n _ tverts = len ( self. tri _ verts ) # number of tri _ verts self. tri _ vert _ i = np. linspace ( 0, self. n _ tverts - 1, self. n _ tverts, dtype = np. int ) self. n _ tcell = len ( self. tri _ cells ) # number of simplexes in trimesh self. tri _ cell _ i = np. asarray ( [ i for i...
[ 0.26633092761039734, 0.17546890676021576, 0.3320600092411041, -0.4046134650707245, 0.1456068456172943, -0.1358635276556015, 0.8811935782432556, 0.5833810567855835, 0.26950210332870483, -0.05279165133833885, -0.5847604870796204, 0.1641533374786377, 0.0911128968000412, -0.6107168793678284, ...
def _ _ cursorlinechanged ( self, lineno, editor ) : if editor and isinstance ( editor, qscintilla. editor. editor ) : fn = editor. getfilename ( ) if fn : self. vm. editorlinechanged. emit ( fn, lineno + 1 )
[ 0.6829144358634949, -0.45826035737991333, 0.16772328317165375, 0.35755425691604614, -0.2746814787387848, -0.8829708099365234, -0.2894778549671173, 0.3343659043312073, -0.1610099971294403, 0.04060421139001846, -0.750728964805603, 0.2511136829853058, 0.8526710867881775, 0.952428936958313, ...
def gethandle ( self ) : return _ topods. topods _ tsolid _ gethandle ( self )
[ 0.9106935858726501, 0.18726301193237305, 0.18460582196712494, -0.17612940073013306, 0.9863483905792236, 1.6801056861877441, 1.1261695623397827, -0.6763915419578552, 0.018312783911824226, -1.8152508735656738, 0.2926546335220337, -0.49933257699012756, -0.8437655568122864, -0.2320922762155532...
def read _ from _ proccesserr ( self ) : while self. alive : data = self. p. stderr. raw. read ( 1024 ). decode ('utf - 8') self. err _ queue. put ( data )
[ 0.18197733163833618, -1.466651439666748, 0.6955510973930359, -0.8342095017433167, -0.07333202660083771, 1.0679038763046265, -1.1820943355560303, -0.02659398689866066, -0.5843265056610107, 0.1326201856136322, 0.5332813858985901, 0.7125187516212463, -0.3522798717021942, -0.29068440198898315,...
def create _ core _ operators ( self ) : logs. log _ info ( " creating core operators... " ) # exterior derivative operator for tri mesh : operates on verts to return edges : delta _ tri _ 0 = np. zeros ( ( self. n _ tedges, self. n _ tverts ) ) for ei, ( vi, vj ) in enumerate ( self. tri _ edges ) : delta _ tri _ 0 [ ...
[ -0.003498152829706669, 0.1791277676820755, 0.7386561036109924, -0.7635413408279419, 0.33684852719306946, 0.6458790898323059, 0.759880006313324, 0.29648345708847046, -0.34552884101867676, 0.2950636148452759, -0.45939376950263977, -0.29798784852027893, -1.2222530841827393, 0.2144943475723266...
def getint ( string ) : try : ret = int ( string ) except valueerror : ret = 0 return ret
[ 0.03821897506713867, -0.31063827872276306, 0.322909414768219, -0.04553884267807007, 0.1938961297273636, -0.12459421902894974, 0.5783211588859558, -0.09626757353544235, -0.8956956267356873, -0.4629483222961426, 0.35598263144493103, 0.14255937933921814, -1.0900391340255737, -1.12187063694000...
def test _ create _ networklocation _ 2 ( self, context ) : # these could come from a data file id = " networklocationwithrulesgroupstwo " name = " network rules and groupstwo " # define a test step with pytest. allure. step ( " create networklocation ` { } ` ( { } ). ". format ( name, id ) ) : # create a place in cont...
[ 0.4701693058013916, 0.02439776062965393, 0.7137519121170044, 0.15047235786914825, 0.08438775688409805, 0.6386821866035461, 0.9234328866004944, -0.05739033222198486, 0.377594530582428, -0.23567047715187073, -0.7307488918304443, -0.062520831823349, -0.19251765310764313, 0.12344292551279068, ...
def filterforxml ( value ) : try : regex = filterforxml. _ regex except attributeerror : import re chars = u''. join ( [ chr ( num ) for num in range ( 32 ) if num not in ( 9, 10, 13 ) # xml 1. 0 ] ) regex = filterforxml. _ regex = re. compile ( " [ % s ] " % chars ) return regex. sub ( u'\ ufffd ', value )
[ 0.14442050457000732, 0.4968254864215851, 0.36345869302749634, -0.3287009000778198, -0.8909929394721985, -0.10996236652135849, 0.2772522568702698, 0.16565679013729095, 0.24614229798316956, -0.7142574787139893, 0.17064128816127777, -0.3635706603527069, -0.1774388700723648, 0.1442342698574066...
def distribute _ children ( self ) - > none : all _ new _ children = [ true ] * self. n + [ false ] * self. n random : randomstate = get _ random _ state ( ) random. shuffle ( all _ new _ children ) family _ sizes = [ ] i = 1 j = 0 for p in settings. p : n _ families _ size _ i = int ( p * self. n ) for fam in range ( ...
[ -0.027684159576892853, 1.0174598693847656, 0.595852255821228, 0.05564916506409645, 0.9083037972450256, 0.7872573733329773, 1.2469182014465332, -0.2765870988368988, 0.37469375133514404, -0.11256520450115204, -0.30885764956474304, -0.39672210812568665, -0.12506575882434845, 0.618149936199188...
def run _ window ( args, bootstrap _ args, d, handler ) - > baseapplication : def start ( ) : declarative. run _ window ( d, handler, app = app ) return true app = baseapplication ( make _ ui ( bootstrap _ args ), on _ start = start ) app. initialize ( ) return app
[ -0.12266626954078674, -0.23170392215251923, 0.58149653673172, 0.9880775809288025, -0.5509995222091675, 0.697068452835083, 0.6269997358322144, 0.02859754115343094, -0.41447123885154724, -0.6353743076324463, 0.12123142927885056, 0.5935055613517761, -0.2067473828792572, 1.1075583696365356, ...
def playerstandings ( ) : # joining two project tables and a newly created view table to get correct results. query = " select players. player _ id as id, players. name, count ( matches _ won. wins ) as win, \ sum ( case when scores. match! = 0 then 1 else 0 end ) as matches \ from players \ left join scores \ on ( pla...
[ 0.016087563708424568, -0.7685273289680481, 0.8035820126533508, 0.11147195100784302, -0.46595054864883423, -0.0562705397605896, 0.10482914745807648, 0.2505303919315338, -0.5323481559753418, 0.2639552056789398, 0.44911521673202515, -0.8492986559867859, -0.5069172978401184, 0.1700818538665771...
def error ( title, error _ msg ) : err = {'type':'error ','title': title,'message': error _ msg, } return err
[ -0.5454109907150269, -0.029791664332151413, 0.5001528859138489, -0.09084808081388474, -0.6379734873771667, 0.002357505727559328, -0.7785871624946594, 0.45219340920448303, -0.8713186979293823, 0.33951377868652344, -0.40298280119895935, 0.09613963216543198, -0.1849493831396103, 0.32928079366...
def add _ tunnel _ endpoint ( ip, max _ retries = 10 ) : # note ( rpodolyaka ) : generation of a new tunnel endpoint must be put into a # repeatedly executed transactional block to ensure it # doesn't conflict with any other concurrently executed # db transactions in spite of the specified transactions # isolation leve...
[ -0.4551766514778137, 0.7388955950737, 0.525848388671875, 0.1874663233757019, 0.2788950204849243, -0.24451789259910583, -0.003406660631299019, -0.7648969292640686, 0.12677550315856934, 0.5463296175003052, 0.1656082421541214, -0.6479132771492004, -0.8377593755722046, -1.0353420972824097, 0...
def fit _ model ( self, model ) : model. fit ( self. data, self. y _ train ) error _ test = mean _ squared _ error ( model. predict ( self. data _ test ), self. y _ test ) error _ train = mean _ squared _ error ( model. predict ( self. data ), self. y _ train ) print ('fitted model train _ error = { } '. format ( error...
[ -0.1927674114704132, -0.5596229434013367, 0.38993188738822937, 0.023240989074110985, 0.20419123768806458, 1.149362325668335, -0.06900654733181, 0.11321070045232773, 0.028786059468984604, -0.6954309940338135, -0.2429826408624649, 0.6638795733451843, 0.11866989731788635, 0.3848342299461365, ...
def sample _ fn ( time, outputs, state ) : return tf. constant ( [ 0 ] )
[ 0.39251360297203064, -0.5800983309745789, 0.16145838797092438, 0.2091473639011383, -0.23740853369235992, -1.204555869102478, 0.4929186701774597, 0.22897392511367798, -0.2255404144525528, 0.0241960808634758, 0.014992667362093925, -0.17091937363147736, 0.9063436985015869, -1.2341634035110474...
def stoichmat ( self ) : smat = [ ] clst = [ ] rlst = [ ] rev = [ ] for r in self. rlst : if r. nobalance = = false : if r. name not in rlst : rlst. append ( r. name ) rev. append ( r. reversible ) else : print'error in stoichmat : reaction \ t ', r. name,'\ talready present!'for cname in union ( r. innames [ : ], r. o...
[ -0.5701615810394287, -0.6643521785736084, 0.7207186818122864, -0.5741726756095886, 0.2767179310321808, -0.1014426127076149, -0.2719424366950989, -0.20249706506729126, -0.11059335619211197, 0.703292727470398, -0.5133801102638245, -0.3079000413417816, -0.31571096181869507, -0.372978091239929...
def _ validate ( self ) : model = self. _ model assert model. getattr ( " numobj " ) = = 2, " the'% s'model is not bi - objective " % self. _ model. getattr ( " modelname " ) assert not model. isqp, " the % s model is a qp " % self. _ model. getattr ( " modelname " ) assert not model. isqcp, " the % s model is a qcp " ...
[ -0.478408545255661, -0.8656933307647705, 0.37014928460121155, -0.3155801296234131, 0.43689635396003723, 0.7800370454788208, 0.45538827776908875, -0.6629047989845276, -0.780850350856781, -0.06023645028471947, 0.12786529958248138, 0.10605115443468094, -0.213408961892128, -0.2054966539144516,...
def test _ authentication _ is _ required _ for _ access ( self ) : res = self. client. get ( recipe _ url ) self. assertequal ( res. status _ code, status. http _ 401 _ unauthorized )
[ -0.8087257742881775, 0.1395784169435501, 0.3936493396759033, 0.6642050743103027, -0.20314013957977295, 0.6815781593322754, 0.18955397605895996, 0.9638798236846924, 0.24474340677261353, -0.9200810790061951, -0.019517766311764717, 0.5474538207054138, 0.11741600930690765, -0.11090325564146042...
def make _ function ( xtr, ytr, iteration, rand ) : def get _ roc _ f1 ( layer ) : layer = tuple ( layer ) _, f1 = get _ perf _ model _ tmp ( xtr, ytr, xtr, ytr, layer, iteration, rand ) return layer, f1 return get _ roc _ f1
[ 0.12874022126197815, 0.11267237365245819, 0.2682158946990967, -0.19880619645118713, 0.15451973676681519, -0.36681827902793884, 1.150934100151062, -0.802173376083374, -0.9832308888435364, 0.16207802295684814, -0.24223485589027405, -0.16808539628982544, 0.8036895990371704, -0.82171231508255,...
def write ( self, file _ name : optional [ path ] = none ) : if file _ name is none : if self. file _ name is not none : file _ name = self. file _ name else : raise valueerror ('file _ name must be specified') vector _ format ='{ 0 : 20. 10e } { 1 : 19. 10e } { 2 : 19. 10e }'name _ line ='{ 0 : s } \ n '. format ( sel...
[ 0.028301337733864784, -1.0287967920303345, 0.8083813190460205, 0.4127383232116699, 0.7113914489746094, 0.12680462002754211, 0.4302571713924408, 0.26394835114479065, -0.2898099422454834, 0.2701842784881592, -0.27065473794937134, 0.11789840459823608, 0.05439111590385437, 0.3476656377315521, ...
def tag _ adverb ( node, context ) : return word _ from _ file ('data / adverbs')
[ 0.9768603444099426, 0.4523303806781769, 0.18251565098762512, -0.7029772400856018, 0.2537626326084137, 0.5045576691627502, -0.9431386590003967, -0.7889114618301392, -0.2122667133808136, 0.8778557777404785, 0.2314046174287796, 0.8722460865974426, 0.1411849856376648, 0.40774911642074585, -0...
def catchstatechanged ( self, newstate, oldstate ) : # print ('state ='+ str ( newstate ) ) # print ('meta info') # print ( self. mediaobject. metadata ( ) ) if newstate = = phonon. errorstate : print ('error playing back file') if self. disablegui : qapp. quit ( )
[ 1.0257060527801514, -1.456130862236023, 0.5443340539932251, 0.10445160418748856, -0.18337322771549225, 0.7806547284126282, -0.04020123556256294, -0.6435226798057556, 0.21109621226787567, 0.3173786401748657, 0.3099435269832611, 0.8771273493766785, -0.11319761723279953, -0.16273608803749084,...
def get _ move _ counter ( self ) : return self. _ move _ counter
[ -0.2868829667568207, -0.4751207232475281, 0.4735899567604065, -0.0032707243226468563, -0.29561078548431396, 0.29264122247695923, 0.6030429601669312, -0.16906589269638062, -0.24507452547550201, -0.10251230001449585, -0.5610001683235168, 0.46516236662864685, -0.08502426743507385, -0.38876989...
def add _ index ( x ) : inx = np. reshape ( np. arange ( x. shape [ 0 ] ), ( - 1, 1 ) ) return np. hstack ( [ x, inx ] )
[ -1.1205816268920898, 0.14025703072547913, 0.42636266350746155, 0.255317360162735, 0.21088989078998566, 0.27691850066185, -0.3783382475376129, 0.04823677986860275, 0.8281956315040588, 0.24531275033950806, -0.0737408995628357, 0.8892508149147034, -0.14309778809547424, -0.796714186668396, 0...
def argument _ parser ( ) : import argparse parser = argparse. argumentparser ( description = " module for loading geometry data into mongodb " ) # group = parser. add _ mutually _ exclusive _ group ( required = true ) # group. add _ argument ('- - distributed ', action ='store _ true ', dest = " dist " ) # group. add ...
[ 0.9301981329917908, 0.14889474213123322, 1.1694927215576172, -0.5426845550537109, 0.44178661704063416, 1.12666916847229, -0.07486893981695175, 0.25043344497680664, -0.6170092821121216, 0.4431803524494171, -0.49774977564811707, 0.741470217704773, -0.3747591972351074, 1.0848281383514404, 0...
def admin ( fn ) : @ wraps ( fn ) def wrapper ( * args, * * kwargs ) : if login _ session ['gplus _ id']! = admin _ id : response = make _ response ( json. dumps ('restricted area. your id :'+ login _ session ['gplus _ id'] ), 401 ) response. headers ['content - type'] ='application / json'return response else : return...
[ -0.4932454526424408, -0.2651103138923645, 0.6036801338195801, -0.15029187500476837, -0.5768218040466309, 0.06373783946037292, -0.2738518714904785, -1.4552770853042603, 1.8839672803878784, 0.287666916847229, 0.8388933539390564, 1.1564594507217407, 0.44405597448349, -0.3670676350593567, 1....
def parameterise ( testcase _ klass, reference _ fname = none, test _ fname = none, tolerance = 3, decimal _ precision = 4, integer _ precision = 1, ) : testloader = unittest. testloader ( ) testnames = testloader. gettestcasenames ( testcase _ klass ) suite = unittest. testsuite ( ) for name in testnames : suite. addt...
[ -0.22050169110298157, -0.5728344321250916, 0.7798216342926025, 0.11262290179729462, 0.33657389879226685, -0.13121885061264038, -0.07117385417222977, -0.03134655952453613, 0.4975060224533081, 0.8995115160942078, 0.5771477222442627, -0.5866868495941162, -0.296627014875412, 0.6171450018882751...
def drop _ partitions ( self, table, partition _ specs ) : if partition _ specs : q = self. drop _ partitions _ ddl ( table, partition _ specs ) # this query could be large if there are many partiitons to drop. # use a tempfile when dropping partitions. return self. query ( q, use _ tempfile = true ) else : logger. inf...
[ -1.0439354181289673, 0.36229628324508667, 0.4869702160358429, 0.5202081203460693, -0.2285473346710205, -0.04656853526830673, -0.4028167724609375, 0.3618496060371399, -0.8395364284515381, 0.3330879211425781, 1.1158634424209595, -1.0621798038482666, -0.11644387245178223, -0.18213121592998505...