text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ consolidate _ intraday _ history _ and _ realtime _ distinct _ fields ( self ) : def mock _ get _ history _ db _ config ( db ) : return { " bar _ size " : " 15 mins ", " universes " : [ " usa - stk " ], " vendor " : " ibkr ", " fields " : { " close " : " float ", " open " : " float ", " high " : " float ", "...
[ -0.06444525718688965, 0.5129878520965576, 0.987491250038147, 0.06971800327301025, 0.8645110726356506, -0.001228764420375228, 0.8273077011108398, -0.2479322850704193, -0.46976855397224426, -0.22402328252792358, -0.28933027386665344, 0.04393495246767998, 0.12187720835208893, -0.0512305460870...
def update ( self, action ) : if action = = actions. jump : self. finished = true self. _ highscore _ board. update ( high _ score )
[ -0.13563942909240723, 0.345468670129776, 0.4621537923812866, 0.9545621871948242, 0.24067158997058868, 0.5018510818481445, 0.4282386302947998, -0.8704716563224792, 0.11810136586427689, 0.6476114392280579, -0.6797217130661011, 0.591679573059082, 0.19320140779018402, 0.7169116735458374, 0.2...
def set _ available _ data ( self, event ) : self. c _ logger. info ( " start to set the time date based on the selected date. " " it's an event triggered call back. " ) current _ selected _ date = self. _ _ get _ date _ from _ calendar ( self. new _ data _ calendar _ instance ). replace ( " ", " " ) self. c _ logger. ...
[ -0.7010349035263062, 0.13445983827114105, 0.7070674896240234, -0.6325098276138306, 0.038358259946107864, 0.3467601239681244, -0.1336672604084015, -0.0855143815279007, -0.5591914057731628, 0.6744062304496765, -0.7091869711875916, 0.02914351224899292, 0.37683647871017456, 0.8123424649238586,...
def get _ 5gnr _ bwp _ ch _ ptrs _ l ( self ) : rdstr = " < tbs > " return rdstr
[ 0.32711517810821533, 0.03127047047019005, 0.23295265436172485, -1.5447425842285156, 0.08227252960205078, 0.5251374840736389, -0.12003938108682632, -1.5270686149597168, 0.37541788816452026, 0.09473879635334015, 0.28243422508239746, 0.49625086784362793, -1.5040292739868164, 0.049257624894380...
def find _ standard _ coins ( self, puzzle _ hash ) : return list ( filter ( lambda x : x. puzzle _ hash = = puzzle _ hash, self. outputs ) )
[ 0.8671066164970398, -0.24883787333965302, 0.28843870759010315, 1.0275784730911255, -0.0735161080956459, -0.3775704503059387, 0.02943381853401661, 0.2280409187078476, -0.09494849294424057, 0.8188856840133667, -0.6509518027305603, -0.02463913895189762, -0.5341904163360596, 0.5283559560775757...
def test _ srv _ metric _ exp _ and _ log ( self ) : curves _ ab = self. l2 _ metric _ s2. geodesic ( self. curve _ a, self. curve _ b ) curves _ bc = self. l2 _ metric _ s2. geodesic ( self. curve _ b, self. curve _ c ) curves _ ab = curves _ ab ( self. times ) curves _ bc = curves _ bc ( self. times ) log = self. srv...
[ 0.5692541599273682, -0.18476247787475586, 0.5253852009773254, -0.17281265556812286, -0.16901300847530365, 1.1819610595703125, 0.21344879269599915, -0.8001036047935486, -0.19030651450157166, 0.13543333113193512, 0.21912740170955658, -0.03611897677183151, 0.05943771451711655, -0.320733755826...
def test _ load _ using _ lazy _ bind ( self ) : self. build ( ) wd = os. path. realpath ( self. getbuilddir ( ) ) def make _ lib _ name ( name ) : return ( self. platformcontext. shlib _ prefix + name + ". " + self. platformcontext. shlib _ extension ) def make _ lib _ path ( name ) : libpath = os. path. join ( wd, ma...
[ 0.4257238805294037, -0.002894970588386059, 0.762690544128418, -0.36236491799354553, -0.1176014170050621, 0.17997801303863525, 0.5764716863632202, -0.20073145627975464, -0.3873532712459564, -0.26784956455230713, -0.33958742022514343, 0.16968703269958496, -0.24771641194820404, 0.861259877681...
def ping _ thread ( cls, port, message ) : thread = thread ( target = cls. ping, args = ( port, message ), name = " udppingthread " ) thread. setdaemon ( true ) thread. start ( ) return thread
[ 0.17989346385002136, 0.4896918535232544, 0.5419235825538635, -0.2965609133243561, 0.7610366940498352, 0.511167049407959, -0.26578763127326965, 0.2706935703754425, -0.1251782327890396, -0.5914216637611389, 0.17437180876731873, 0.7111508846282959, -1.1662304401397705, -0.7921779751777649, ...
def add _ brick ( self, brick ) : self. bricks. append ( brick ) brick. index = len ( self. bricks ) - 1 brick. beam = self
[ -0.40719807147979736, 0.2890138328075409, 0.5019790530204773, 1.7048290967941284, 0.29624974727630615, 0.08270781487226486, 0.03679272159934044, 0.41658878326416016, 0.1648613065481186, -0.5989002585411072, -1.02736234664917, 0.43012669682502747, -1.6236701011657715, 0.6532269716262817, ...
def command _ kick ( self, bot : bot, update : update ) - > none : if not self. _ is _ admin ( bot, update. message. from _ user. id ) : bot. send _ message ( chat _ id = update. message. chat. id, text = messages. unauthorized, parse _ mode = " html ", reply _ to _ message _ id = update. message. message _ id, ) retur...
[ -0.5377175807952881, -0.32555916905403137, 0.63532555103302, 0.39968326687812805, -0.29798561334609985, 0.1853170394897461, 0.05408353731036186, -0.05749955028295517, -0.31927576661109924, 0.5870245695114136, -0.03264254704117775, 0.6401163935661316, -0.7929694652557373, -0.262869864702224...
def runoperation ( self, stmt, args = none, conn = none, callback = none ) : self. _ threadpool. add _ task ( partial ( self. _ execute, stmt, args, conn ), callback )
[ -0.2836940586566925, 0.4409033954143524, 0.5537199378013611, 0.554192841053009, -0.026233404874801636, -0.33672046661376953, -0.27727997303009033, 0.41608962416648865, -0.4292571246623993, 0.5009759664535522, -0.34092170000076294, -0.5991749167442322, -0.9944730401039124, -0.75288951396942...
def target _ by _ name ( self, name : str ) - > optional [ pbxnativetarget ] : for target in self. fetch _ type ( pbxnativetarget ). values ( ) : if target. name = = name : return target return none
[ -0.6946672797203064, -0.6433171629905701, 0.334640771150589, -0.04513780400156975, 0.20891843736171722, -0.5831092596054077, -1.3657997846603394, -1.81919527053833, -0.1311296820640564, 0.16280336678028107, 0.1236407607793808, 0.3088177442550659, -0.6251764893531799, -0.6982101798057556, ...
def get _ out _ filename ( dirname, src, extension ) : return os. path. join ( dirname,'% s. % s'% ( os. path. basename ( src ), extension ) )
[ 0.12877632677555084, 0.06472450494766235, 0.7345364093780518, 0.048088256269693375, -0.791910707950592, -0.5984195470809937, 0.5286087393760681, 0.5978447198867798, -0.6387459635734558, 0.5281413197517395, 0.647877037525177, 0.7280750274658203, 0.4553200602531433, -0.5844892859458923, 0....
def test _ create _ group _ rules _ engine ( self ) : rules _ local _ path = get _ datafile _ path ( _ _ file _ _,'group _ test _ rules _ 1. yaml') rules _ engine = group _ rules _ engine. grouprulesengine ( rules _ file _ path = rules _ local _ path ) with open ( rules _ local _ path,'r') as f : rules _ file = yaml. l...
[ 0.18936483561992645, -0.3090137541294098, 0.4149135947227478, -0.164823979139328, 1.5955630540847778, 0.7894532680511475, 0.5582627654075623, 0.6866445541381836, -1.397119164466858, -0.3027682304382324, -0.04383649677038193, 0.44674527645111084, -0.04533416032791138, -0.007264604791998863,...
def _ do _ calculate _ cost _ metrics ( attributes ) : if attributes ['cost _ type _ id'] = = 1 : attributes ['total _ cost'] = ( attributes ['cost'] * attributes ['quantity'] ) try : attributes ['cost _ hour'] = ( attributes ['total _ cost'] / attributes ['mission _ time'] ) except zerodivisionerror : attributes ['cos...
[ -0.4693538248538971, -0.4690258502960205, 0.4023330807685852, -0.41716501116752625, -0.3665880262851715, -0.07139694690704346, -0.21021944284439087, -0.3476071357727051, -0.4731769859790802, 0.994734525680542, 0.4559765160083771, -1.2750816345214844, 0.6215917468070984, 0.04327930137515068...
def from _ file ( cls, filename ) : dsxml = xml _ open ( filename,'datasource'). getroot ( ) return cls ( dsxml, filename )
[ 0.44982942938804626, 0.25769102573394775, 0.07020948082208633, -0.8859978318214417, -0.7807543277740479, -0.34282180666923523, -0.42991840839385986, 1.0879119634628296, -0.30005520582199097, -0.7455957531929016, -0.6125203967094421, -0.0947907418012619, 0.6474488973617554, -0.4108574092388...
def run ( self ) : tasks = dict ( tei = { 0, 1 }, analyse = { 1 }, fromrelax = { 1 }, validate = true, ) possibleflags = { " - debug " : false, " + debug " : true, " - verbose " : - 1, " + verbose " : 0, " + + verbose " : 1, } args = sys. argv [ 1 : ] argset = set ( args ) flags = { arg. lstrip ( " + - " ) : val for ( ...
[ -0.6671326756477356, 0.530968427658081, 1.0784107446670532, 0.7996712327003479, 0.33178281784057617, 0.022756464779376984, 0.9138991236686707, 0.3569822311401367, -0.7503548264503479, -0.09335259348154068, 0.2383642941713333, -0.3951248824596405, 0.09137666970491409, 1.1117546558380127, ...
def _ handle _ connection ( self, s ) : try : self. _ really _ handle _ connection ( s ) except exception : print ( " error handling request : " ) print ( geterrormsg ( ) )
[ -0.827787458896637, -0.5102849006652832, 0.5031542778015137, 0.27590715885162354, 0.15472818911075592, -0.44185975193977356, -0.2919055223464966, -0.5616746544837952, -0.0473884642124176, -0.657296895980835, 1.0990616083145142, -0.7154312133789062, 0.0071877371519804, -0.09081155061721802,...
def put ( self, linknet _ id ) : json _ data = request. get _ json ( ) errors = [ ] for device _ arg in [ " device _ a ", " device _ b " ] : if device _ arg in json _ data : try : linknetsapi. validate _ hostname ( json _ data [ device _ arg ] ) except valueerror as e : errors. append ( " bad parameter { } : { } ". for...
[ -1.3921030759811401, -0.5502585172653198, 0.7639263272285461, -0.2544313669204712, 0.6647711992263794, 0.033505938947200775, 0.21060173213481903, -0.364976704120636, 0.38694363832473755, -0.06389731913805008, -0.2251228392124176, 0.06838229298591614, -0.26946765184402466, 0.632018744945526...
def _ mgui _ get _ orientation ( self ) - > any : orientation = self. _ qwidget. orientation ( ) return " vertical " if orientation = = qt. vertical else " horizontal "
[ 0.24754251539707184, 0.14503534138202667, 0.32548272609710693, 0.11500218510627747, -0.2263033241033554, 0.3174533545970917, -0.24633416533470154, -0.9832839965820312, -0.6263169646263123, 0.6741656064987183, 0.04235828295350075, -0.8836380839347839, -0.2021610587835312, -0.121324673295021...
def invalidate _ orphans ( confirm = true ) : # record all tasks that run and their output vs files present raise notimplementederror ( )
[ -0.007176254875957966, -0.15273915231227875, 0.45661407709121704, 1.0737009048461914, 0.2056872397661209, 0.7830489873886108, 1.471561312675476, 0.09834753721952438, -0.7159243822097778, 0.48543259501457214, -0.5053969621658325, 1.0124719142913818, -0.3004017174243927, 0.660270094871521, ...
def _ serialize ( self, filepath : str ='', to _ file = true ) : filepath = filepath or self. filepath assert not to _ file or filepath,'a < filepath > to serialize to must be provided in the constructor or as an argument'dict _ repr = self. serialized ( ) if to _ file : with open ( filepath, mode ='w +') as f : json. ...
[ -0.9557521939277649, -0.3922581076622009, 0.38022273778915405, -1.2918933629989624, -0.08762569725513458, -0.37220311164855957, 0.18419472873210907, 0.07002297788858414, 0.06931985914707184, 0.2097158282995224, 0.26243776082992554, -0.17625001072883606, 0.21251817047595978, -0.233982697129...
def _ _ repr _ _ ( self ) : return " < tweetid : % s, text : % s, city : % s > " % ( self. tweet _ id, self. text, self. city _ id )
[ 0.6353957056999207, -1.5704904794692993, 0.398887574672699, -1.7502669095993042, -0.2282070517539978, 0.8393846154212952, -0.8730263113975525, 0.698306679725647, -0.2707192599773407, 0.1962784081697464, -0.20648416876792908, 0.4351330101490021, 0.1955835223197937, 0.10911297053098679, -0...
def all _ infected ( self ) : if self. initial _ population < = self. infected and self. infected! = self. dead : return true else : return false
[ -0.5299166440963745, -1.729146122932434, 0.6483835577964783, 0.8084672093391418, -0.644456148147583, 1.4304382801055908, -0.7137722969055176, 0.24679720401763916, -0.0764106810092926, 0.2187482863664627, -0.08718419820070267, -0.09790845215320587, -0.8819893002510071, -0.44610118865966797,...
def list _ command ( login _ manager : loginmanager ) - > none : search _ client = login _ manager. get _ search _ client ( ) display ( search _ client. get ( " / v1 / index _ list " ), fields = index _ list _ fields, text _ mode = textmode. text _ table, response _ key = " index _ list ", )
[ -0.9147087335586548, 0.5010854601860046, 0.36661234498023987, 0.4803694188594818, 0.7217077612876892, -0.3846018314361572, -0.476900577545166, 0.40564078092575073, 0.3763313293457031, 0.3511527180671692, -0.23172195255756378, 1.4643458127975464, -0.4632187783718109, -0.18410268425941467, ...
def bypass _ ccdexposureid _ bits ( self, datasettype, pythontype, location, dataid ) : return 31 # max visit ~ 21400000 ( a 30s cadence every 10 - hour night for 20 years )
[ -0.2845796048641205, 0.4345671832561493, 0.28706657886505127, -0.554728090763092, -0.23223888874053955, 0.9601844549179077, 1.2025779485702515, -0.5085832476615906, 0.7539661526679993, 0.17117103934288025, 0.13854576647281647, 0.5527265071868896, -0.5827165246009827, 0.12008821964263916, ...
def get _ genomes ( f ) : # multifasta that contains all organisms allgenomes = open ( f ) # outfile = open ( " / media / imgorter / extern / pathogens1. txt ", " w " ) # outfile = open ( " / media / imgorter / extern / pathogens2. txt ", " w " ) outfile = open ( " / media / imgorter / extern / pathogens3. txt ", " w "...
[ 0.2998792231082916, -0.6790446043014526, 1.1153804063796997, 0.21119201183319092, -1.495680809020996, 0.26154595613479614, 0.049004580825567245, 0.6450308561325073, -1.022297978401184, 0.33556029200553894, -0.1689167618751526, 0.48557502031326294, 0.5285428166389465, 1.4604015350341797, ...
def generate _ tiles ( w, h, f ) : x _ step, y _ step = w, h for i in range ( 0, f ) : if i % 2 : y _ step / = 2 else : x _ step / = 2 y _ min, y _ max = 0, y _ step for i in range ( 0, h / y _ step ) : x _ min, x _ max = 0, x _ step for j in range ( 0, w / x _ step ) : yield [ x _ min, y _ min, x _ max, y _ max ] x _ ...
[ -0.3480423390865326, 0.2821565866470337, 0.7763239741325378, 0.3316093683242798, -0.24169236421585083, 0.48367246985435486, 0.4126220941543579, -0.24894151091575623, -1.2155791521072388, -0.15963824093341827, -0.9917625784873962, -0.7195878624916077, 0.4781041443347931, 0.7689793109893799,...
def compare _ files _ and _ folders ( files : list = [ ], root _ dir : str ='', optional _ files : list = none, return _ correct = false, return _ optional = false ) - > dict : required _ files = [ os. path. realpath ( os. path. join ( root _ dir, fn ) ). replace ('\ \ ','/') for fn in files ] # create list of root _ d...
[ 0.20696097612380981, -1.0037505626678467, 0.7653754949569702, -0.3132949769496918, -0.8600788712501526, -0.3135542869567871, 0.1570388227701187, 0.919914186000824, -0.4553188383579254, 0.5606527328491211, -0.347915917634964, -0.11923889815807343, -0.22304248809814453, 1.588729739189148, ...
def random _ action ( self, * args, * * kwargs ) : return self. env. action _ space. sample ( )
[ -0.5824786424636841, -0.7737566828727722, 0.3314898610115051, 0.32504504919052124, 0.788743257522583, 0.5285079479217529, 0.2751292288303375, -0.6656754016876221, 0.7499600052833557, -0.10985192656517029, 0.3026863932609558, 1.9249533414840698, -0.5906103849411011, 0.49806472659111023, -...
def afternoon ( self ) : for lifeclass in [ zebra, lion ] : for animal in self. species [ lifeclass ] : newpos = animal. proposemove ( ) if newpos = = animal. pos : continue self. pos [ animal. pos ] [ animal. _ _ class _ _. self _ class ]. pop ( animal ) animal. pos = self. transformpos ( newpos ) self. register ( ani...
[ -0.7848964333534241, -0.6827200055122375, 0.5594548583030701, -0.5863734483718872, 1.1717031002044678, 0.06208668276667595, -0.7131984233856201, 0.21914829313755035, -0.8995285630226135, 0.5011341571807861, -1.47951340675354, 0.1264529526233673, -0.2011701613664627, 0.5209636092185974, 0...
def writetoplevel ( self, config _ list, spec _ name, output _ path, xml _ file ) : content = " \ n \ nall : zip _ inputs zip _ files \ n \ n " index = 0 input _ list = " zip _ inputs : " zip _ list = " \ n \ nzip _ files : " full _ content = " " for config in config _ list : outputfile = os. path. normpath ( os. path....
[ -0.46531403064727783, -0.6842284798622131, 0.6384621858596802, -0.09266190975904465, 0.5790587067604065, 0.2608664929866791, 0.8012604117393494, 0.11467237770557404, -0.9489428400993347, 0.25491154193878174, -0.5014023184776306, -0.37210601568222046, -0.11607443541288376, 0.432749599218368...
def loadstopwords ( self ) : with open ('data / stopwords. txt') as stopwordfile : self. stopwords = set ( stopwordfile. read ( ). splitlines ( ) )
[ -0.16817361116409302, 0.34188416600227356, 0.3350009024143219, -1.1770204305648804, 0.037251729518175125, 0.5394524335861206, -0.7577107548713684, 0.7031727433204651, -0.9906752705574036, 0.5527673363685608, -0.8420135378837585, -0.11953023821115494, -0.6857853531837463, -0.325646072626113...
def input _ short _ sequence ( ) : ss = str ( input ('what dna sequence would you like to match?') ) new _ ss = ss. upper ( ) return new _ ss
[ -0.4702726900577545, -0.7083854079246521, 0.4430497884750366, 0.24496214091777802, -1.7443040609359741, 0.5293630957603455, 0.12386065721511841, -0.5789263248443604, 0.8466246724128723, -0.3343145251274109, -0.24154336750507355, 1.5399852991104126, -0.06036259979009628, -0.1669084429740905...
def bootup ( sender, * * kwargs ) : # only trigger if we have installed the last app if kwargs ['app']. _ _ name _ _ = ='{ 0 }. models '. format ( settings. installed _ apps [ - 1 ] ) : # 1. load the fixtures load _ fixtures ( ) # 2. setup sites setup _ sites ( ) # 3. setup an admin account setup _ superuser ( username...
[ 0.6514817476272583, 0.666021466255188, 0.4674241244792938, 0.9273872375488281, 0.4700089395046234, -0.22343482077121735, 0.7718561291694641, 0.0853562131524086, 0.787727415561676, 0.2830125391483307, -0.9215916395187378, -0.138850137591362, -0.10150296241044998, 0.3013887107372284, -0.32...
def parse ( self, coord _ text ) : match = re. match ( r " ( | - | \ * ) ( \ d + ) ( ( - | \ + ) ( \ d + ) )? ", coord _ text ) if not match : raise valueerror ( " unknown coordinate format'% s'" % coord _ text ) coord _ prefix, coord, _, offset _ prefix, offset = match. groups ( ) self. coord = int ( coord ) self. off...
[ 0.05008877441287041, -0.6055249571800232, 0.5982602834701538, -0.6948508620262146, -1.113595724105835, 0.29274994134902954, -0.09359466284513474, 0.9179503917694092, -0.10117202997207642, -0.12671153247356415, -0.9324302077293396, 0.5838432908058167, 0.2394733726978302, 0.07166595011949539...
def test _ wk _ load _ from _ file _ no _ file ( self ) : try : os. remove ( " rectangle. json " ) except : pass self. assertequal ( rectangle. load _ from _ file ( ), [ ] )
[ -0.05294863507151604, -0.3304748833179474, 0.5823512673377991, -0.6979753375053406, 0.09576981514692307, 0.9276660680770874, 0.01882900483906269, -0.5477496385574341, -0.7183098196983337, -0.5107209086418152, -0.5995482206344604, -0.06119420379400253, 0.07612425833940506, 0.765321075916290...
def collect _ dust ( pixels, imagesize ) : dust _ grains = [ ] if len ( pixels ) > imagesize / 4 : return dust _ grains else : dust _ grains. append ( [ pixels [ 0 ] ] ) pixels. pop ( 0 ) while ( len ( pixels ) > = 1 ) : contained = false for i in range ( len ( dust _ grains ) ) : for j in range ( len ( dust _ grains [...
[ 0.37524107098579407, -0.45502904057502747, 0.8118741512298584, 0.4288770258426666, -0.19384613633155823, 0.3811509311199188, 0.3220307230949402, -1.3050684928894043, 0.4149094223976135, 0.6492284536361694, 0.17137259244918823, 0.4821799695491791, -0.9403870701789856, 1.5700910091400146, ...
def get _ db ( ) : datab = create _ connection ( path _ to _ db ) return datab
[ -0.10341373831033707, 0.026117272675037384, 0.19605359435081482, 0.765180766582489, 1.029517412185669, 0.005421858746558428, -0.6522172689437866, -0.055036503821611404, -0.9925763607025146, -0.44952213764190674, 0.4783264696598053, 0.010081897489726543, -0.580623209476471, -0.6280980110168...
def highpassfilter ( signal ) : # path = " c : / users / squirel / workspace / hc - septum - network / popepi _ " # path = ". / traces _ 22feb / " # epi = x1plot. mean ( axis = 0 ) + x2plot. mean ( axis = 0 ) spectrum = fft. fftn ( signal ) freqs = fft. fftfreq ( signal. size, d = 100 ) bp = spectrum [ : ] for i in ran...
[ 0.6178739070892334, 0.23437489569187164, 0.807860791683197, 0.600028395652771, -0.06989423930644989, 0.36646726727485657, 0.7942184805870056, 0.0885481908917427, 0.04710495471954346, -0.14547233283519745, 0.193690225481987, 0.9522497653961182, 0.0615045428276062, 0.4503774344921112, 0.41...
def smart _ timedelta ( s, fallback = none ) : if isinstance ( s, datetime. timedelta ) : return s if s and s. endswith ('d') : try : days = int ( s [ : - 1 ] ) if days > 0 : return datetime. timedelta ( days = days ) except valueerror : pass return fallback
[ -0.5269664525985718, 0.9554659724235535, 0.6186280846595764, -0.3025648593902588, -0.7674431800842285, -0.5895422101020813, -0.013505242764949799, -0.4825391173362732, 1.3580188751220703, -0.9464985728263855, 0.619985818862915, 0.07556591928005219, 0.15807324647903442, -0.07565523684024811...
def getrandom ( self ) - > int : index = random. randrange ( len ( self. queue ) ) return self. queue [ index ]
[ -1.000638484954834, -0.17072270810604095, 0.562215268611908, -0.7966433167457581, -0.10802767425775528, 0.33953365683555603, 0.28805333375930786, 0.06828778982162476, 0.5198540091514587, -0.8952630758285522, 0.0049190158024430275, 1.1044057607650757, -0.8565845489501953, 0.0365474149584770...
def _ getbasedate ( content, regex ) : base _ date _ str = _ findmatch ( content, regex, 1 ) if not base _ date _ str : return none try : base _ date = datetime. datetime. strptime ( base _ date _ str, extract _ histograms. expiry _ date _ pattern ). date ( ) return base _ date except valueerror : raise error ( " unabl...
[ 0.9866502285003662, -0.3449404835700989, 0.44010797142982483, -0.2467922568321228, 0.6958802938461304, -0.28988632559776306, -0.17337670922279358, 0.47530773282051086, -0.35475507378578186, 0.23712962865829468, 0.3330409824848175, 0.3539075553417206, -1.0115340948104858, -0.666987121105194...
def list ( cls, deployment _ id, model _ id = none, start _ time = none, end _ time = none, metric = none ) : url = cls. _ path. format ( deployment _ id ) params = cls. _ build _ query _ params ( start _ time = start _ time, end _ time = end _ time, model _ id = model _ id ) if metric : params [ " metric " ] = metric ...
[ -0.32437390089035034, -0.3402654826641083, 0.6588712930679321, -0.11620916426181793, 0.24400901794433594, -0.2009708136320114, -1.221041202545166, -0.09600289165973663, -0.15737958252429962, 0.7604511380195618, 0.1651616245508194, 0.7351553440093994, 0.15028123557567596, 0.4313239753246307...
def shuffle ( bot, msg, shuffle _ string ) : cutoff = 200 shuffle _ string = util. flatten _ incoming _ text ( bot, shuffle _ string, flatten _ notice = false ) success, shuffle _ list = _ parse _ shuffle _ set ( bot, shuffle _ string ) if not success : bot. reply ('\ n '. join ( shuffle _ list ) ) return shuffle _ lis...
[ -0.47937119007110596, 0.34919655323028564, 0.5805317163467407, -0.8693991899490356, -0.539661705493927, 0.09195602685213089, -0.07441672682762146, 0.20096857845783234, 0.9015390872955322, -0.5523685812950134, 0.07342871278524399, 1.1137865781784058, -0.5676418542861938, 0.03680927678942680...
def reject ( self, object ) : status = contentflag. objects. add _ flag ( object, contentflag. reject _ flag ) return status
[ -0.3225289583206177, 0.44871893525123596, 0.37883901596069336, -0.24084240198135376, -0.4344866871833801, 0.9725140333175659, -0.19355669617652893, -0.45925086736679077, -0.2779746353626251, -0.4572985768318176, -1.147091031074524, -0.3719725012779236, -1.1941994428634644, -0.5011272430419...
def puzzle _ hash ( self ) - > bytes32 : return self. puzzle ( ). get _ tree _ hash ( )
[ 0.9339078664779663, 0.8645908832550049, 0.23736979067325592, 0.47496694326400757, -0.6993439793586731, 1.3101273775100708, 0.07911525666713715, -0.5477713346481323, 0.030285881832242012, -0.14283987879753113, -0.737274169921875, 0.24510732293128967, -0.618827223777771, -0.8711625337600708,...
async def async _ run _ command ( self, command, retry = false ) : if self. _ client is none and not retry : await self. async _ connect ( ) return await self. async _ run _ command ( command, retry = true ) else : if self. _ client is not none : try : result = await asyncio. wait _ for ( self. _ client. run ( " % s & ...
[ -0.22607849538326263, 0.2804659605026245, 0.9298892617225647, 0.7663977146148682, -0.019946610555052757, -0.3423948287963867, -1.0130293369293213, 0.1741957664489746, 0.7102988362312317, 0.7010663747787476, 0.4768882393836975, 0.39642947912216187, -0.7926918268203735, 0.23890320956707, 0...
def transformer ( u, theta, out _ size, name ='spatialtransformer ', * * kwargs ) : def _ repeat ( x, n _ repeats ) : with tf. variable _ scope ('_ repeat') : rep = tf. transpose ( tf. expand _ dims ( tf. ones ( shape = tf. stack ( [ n _ repeats, ] ) ), 1 ), [ 1, 0 ] ) rep = tf. cast ( rep,'int32') x = tf. matmul ( tf....
[ -0.08061762899160385, -0.08699488639831543, 0.8107043504714966, -0.22483913600444794, -1.164781093597412, -0.4117860496044159, 0.6171703934669495, -0.12603618204593658, 0.0555245466530323, 0.7617884278297424, -0.21974384784698486, 0.31096717715263367, 0.5771041512489319, -0.430293709039688...
def snr ( samples _ a, samples _ b ) : # convert to 64 - bit integers to prevent potential integer overflow samples _ a = samples _ a. astype ( np. int64 ) samples _ b = samples _ b. astype ( np. int64 ) # calculates mse noise = np. sum ( ( samples _ a - samples _ b ) * * 2 ) if noise = = 0 : return np. inf return 10 *...
[ 0.6676313281059265, -0.4736265242099762, 0.6170644760131836, 0.1828099936246872, 0.17197853326797485, -1.467482089996338, -0.4683019518852234, 0.038648124784231186, 0.5110964179039001, 0.6067110300064087, 0.08368649333715439, 0.8411581516265869, -0.024370545521378517, 0.42270034551620483, ...
def restore _ object ( self, attrs, instance = none ) : if instance : # update existing instance instance. artist _ name = attrs. get ('name ', instance. name ) instance. artist _ label = attrs. get ('artist _ label ', instance. artist _ label ) instance. bio = attrs. get ('bio ', instance. bio ) instance. currently _ ...
[ -0.713104784488678, -1.2759712934494019, 0.7525365352630615, -1.094907283782959, -1.2877949476242065, 0.06666363030672073, -0.11614280194044113, 1.031772494316101, 0.7561455368995667, 0.11876928061246872, -0.003221223596483469, 0.3048214316368103, -0.855905294418335, -1.2800074815750122, ...
def dot ( self, x, y ) : res = [ 0, 0 ] for r, dist in zip ( self. r, self. dist ) : res [ dist ] + = np. sum ( x [ r [ 0 ] : r [ 1 ] ] * y [ r [ 0 ] : r [ 1 ] ] ) if self. comm is none : return np. sum ( res ) else : return res [ 0 ] + self. comm. allreduce ( res [ 1 ] )
[ -0.03651471808552742, -0.47503140568733215, 0.7303029894828796, -0.8805283308029175, 0.39420732855796814, -0.29483237862586975, -0.4099274277687073, -0.4624089300632477, 0.5545901656150818, 0.0031486861407756805, 0.05282261222600937, 0.5797589421272278, -0.47817182540893555, 0.084016367793...
def test _ all ( ) : test _ push ( ) test _ search ( )
[ 0.043339066207408905, 1.164922833442688, 0.29810792207717896, 1.445349097251892, 1.3638969659805298, 0.3227178752422333, 0.40987834334373474, -0.5967395901679993, 0.2568237781524658, -0.2199198454618454, -0.1960989236831665, -0.0030609939713031054, -0.4616546034812927, 0.6573604345321655, ...
def fit ( self, x : np. ndarray, y : none = none ) - > saturation : x = check _ array ( x ) self. _ check _ n _ features ( x, reset = true ) return self
[ -0.2834859788417816, 0.6935446858406067, 0.3992772102355957, 1.7044920921325684, -0.5341481566429138, -0.0820438340306282, -0.1935359090566635, -0.39274919033050537, 0.17217008769512177, 0.3619633615016937, -0.523227334022522, 1.0310989618301392, 0.2681330740451813, 0.5552816390991211, -...
def value ( self, value ) : self. _ value = value
[ -0.4507686197757721, 0.6863287687301636, 0.01923503540456295, -0.6470776796340942, 0.06726068258285522, 0.7151980996131897, 0.3454653322696686, 0.2782439589500427, -0.5676224827766418, -0.003379021305590868, -0.9032349586486816, -0.362669438123703, 0.3979944586753845, 0.5628157258033752, ...
def notdone ( self ) : if len ( self. checked )! = 1 : return true if self. checked [ 0 ] [ 0 ]! = 0 : return true if self. checked [ 0 ] [ 1 ]! = self. upper : return true return false
[ -1.6792445182800293, -0.04653492197394371, 0.7613131999969482, 1.266661286354065, 0.6239298582077026, 0.7981769442558289, 0.6243441104888916, -0.38720858097076416, -0.38709983229637146, 0.3778364062309265, -0.13860984146595, -0.3440883457660675, -1.8523519039154053, 1.2678180932998657, -...
def _ _ getitem _ _ ( self, name ) : if name not in self : self [ name ] = { } return super ( dict, self ). _ _ getitem _ _ ( name )
[ -0.677648663520813, 0.4972245991230011, 0.5436038970947266, -1.005975604057312, -0.6423793435096741, -0.3371809124946594, -0.2039148509502411, -0.7380057573318481, -0.22713349759578705, 0.046670712530612946, -0.8180546760559082, -0.2854897379875183, -0.09179210662841797, 0.0515533015131950...
def tag _ pokemon ( node, context ) : word = do _ noun ( word _ from _ file ('data / pokemon'), node. attribute. split ( ) ) return word
[ -0.11463302373886108, 0.6459746956825256, 0.1962011307477951, -0.9246026277542114, 0.7579313516616821, -0.12535442411899567, -0.8796408176422119, 0.3195815980434418, -1.1360872983932495, 0.7032380104064941, 0.04694375768303871, 0.2689075469970703, 0.2278522104024887, -0.1632004827260971, ...
async def coins _ of _ interest _ farmed ( self, coin _ state : coinstate, fork _ height : optional [ uint32 ], peer : wschiaconnection ) - > none : self. log. info ( f " coins _ of _ interest _ farmed : { coin _ state } " ) trade = await self. get _ trade _ by _ coin ( coin _ state. coin ) if trade is none : self. log...
[ 0.4998713433742523, 0.17633192241191864, 0.6577134132385254, -0.807400107383728, 0.5707433223724365, -0.6376900672912598, 0.22432565689086914, -0.503728449344635, 0.25546973943710327, 0.5074900984764099, -0.5591016411781311, 0.855415403842926, -0.2893555462360382, -0.16705575585365295, -...
def store _ preprocessed _ tweets ( train _ x, val _ x, train _ y, val _ y ) : train _ x. to _ csv ( os. path. join ( data _ folder,'preprocessed _ data ','train _ x. csv'), sep = ',') val _ x. to _ csv ( os. path. join ( data _ folder,'preprocessed _ data ','val _ x. csv'), sep = ',') train _ y. to _ csv ( os. path. j...
[ 0.11740875989198685, 0.028725633397698402, 0.6775715351104736, -0.6029661893844604, 0.7983757257461548, 0.26625916361808777, 0.0413360595703125, -0.1222621276974678, -0.7163051962852478, -0.6703411340713501, -0.35317185521125793, 0.7606464624404907, 0.37338927388191223, 0.20521701872348785...
def testgettaginstancewithnonevalue ( self ) : result = tagapi ( self. user ). create ( [ ( u'username / tag ', u'description') ] ) [ ( objectid, path ) ] = result tagvalueapi ( self. user ). set ( { objectid : { u'username / tag': none } } ) self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transact ...
[ -0.45746904611587524, 0.3626651167869568, 0.4191667437553406, -0.13501398265361786, 0.3671379089355469, 0.46843236684799194, -0.08203431218862534, -0.6499807834625244, -0.6121398210525513, -0.9506990313529968, -0.4964103102684021, -0.1804046630859375, -0.2506489157676697, 0.581683158874511...
def clean ( self, * args, * * kwargs ) : self. transmit _ agnocomplete _ context ( ) return super ( ). clean ( * args, * * kwargs )
[ 0.2854377329349518, 0.2055184692144394, 0.4769190847873688, -0.007479424122720957, -0.17149494588375092, -0.3835146427154541, 0.33307066559791565, -0.8982440233230591, 0.526863694190979, 0.9166845083236694, 0.1360711008310318, 0.5301568508148193, 0.03784270957112312, 0.5198509097099304, ...
def _ translate _ _ interfaces _ state _ interface _ ipv4 _ neighbor ( input _ yang _ obj, translated _ yang _ obj = none ) : if input _ yang _ obj. link _ layer _ address. _ changed ( ) : input _ yang _ obj. link _ layer _ address = input _ yang _ obj. link _ layer _ address if input _ yang _ obj. origin. _ changed ( ...
[ -0.5249772071838379, -0.6937227845191956, 0.37022048234939575, -0.5379779934883118, -0.6083824634552002, 0.7516269683837891, 0.9843183755874634, -0.5181736946105957, 0.24427449703216553, -0.392906129360199, -0.3109913170337677, 0.09451159089803696, -0.41363492608070374, -0.1553612053394317...
def update _ school ( school _ id : int ) : data = request. get _ json ( ) if data is none : return post _ request _ empty ( ) school _ update _ status = false try : address _ id = int ( data. get ( " address _ id " ) ) if address _ service. update _ address _ by _ id ( address _ id, { " division " : data. get ( " divi...
[ -1.1692469120025635, -0.8406888246536255, 1.0824909210205078, 0.1469321995973587, -0.47935256361961365, 0.1464528739452362, -0.0875144824385643, 0.100175641477108, 0.6666295528411865, 0.7614953517913818, -0.26938194036483765, 1.1628293991088867, -0.10167480260133743, 0.44290491938591003, ...
def tick2on ( self ) : # noqa : n802 return self. _ tick2on and self. _ need _ upper ( )
[ -0.3820364475250244, -0.10629584640264511, 0.31046542525291443, 0.8394590616226196, -0.4285355806350708, 0.27783480286598206, 0.6084927916526794, -0.6065025329589844, -0.2790265679359436, 0.29075801372528076, -0.6286914944648743, 0.33023902773857117, -0.20522361993789673, 0.693628013134002...
def words _ as _ phones ( self ) - > sequence [ text ] : return [ " ". join ( word. pf. phones ) for word in self. words ]
[ -0.3360876739025116, -0.19989678263664246, 0.5019086003303528, 0.5687511563301086, 0.45841020345687866, 0.9290944933891296, -1.2322617769241333, -0.2227570116519928, 0.12247493863105774, 0.5892713069915771, -0.38218605518341064, -1.0350672006607056, -0.5449235439300537, 1.1129534244537354,...
def reset _ pos ( self ) : # self. rect. center = ( random. randrange ( - 300, - 20 ), random. randrange ( 0, screen _ width ) )
[ -0.37219521403312683, -0.7299650311470032, 0.35519322752952576, -0.6640321612358093, 0.6150074005126953, 0.5534223914146423, -0.05517048016190529, 0.12732024490833282, 0.8820765018463135, 0.2638639807701111, -0.13416418433189392, 0.18145433068275452, -0.4895988404750824, 0.1813612580299377...
def persist _ authorization _ code ( self, client _ id, code, scope ) : key ='oauth2. authorization _ code. % s : % s'% ( client _ id, code ) # store any information about the current session that is needed # to later authenticate the user. data = {'client _ id': client _ id,'scope': scope,'user _ id': str ( session. u...
[ -0.16678303480148315, 0.11168235540390015, 0.4843432605266571, -0.44841092824935913, -0.13837063312530518, -0.47854796051979065, -0.5955007672309875, 0.185924232006073, 0.7761173844337463, 0.6440224647521973, -0.5815873146057129, 0.52895587682724, -0.5341366529464722, -0.23239880800247192,...
def _ calctreesize ( self, alpha _ ll _ size _ log : typing. optional [ int ] = none, *, include _ root _ layer : bool = true ) - > int : root _ layer _ subtraction = 0 if include _ root _ layer else 1 totalsize = 0 for l in range ( self. _ calclandlordlayerscount ( none, alpha _ ll _ size _ log ) - root _ layer _ subt...
[ 0.771488606929779, 0.23187285661697388, 0.726195752620697, -0.21639591455459595, -0.7064676284790039, -0.23658087849617004, 0.5737536549568176, 0.6160781979560852, 0.2962609827518463, -0.13894352316856384, -0.09277389943599701, -0.2507287561893463, -0.5756535530090332, 1.1648404598236084, ...
def getdeviations ( self ) : indices = self. _ traj. _ indices coords = self. _ getcoords ( ) if indices is none : return coords - self. _ traj. _ coords else : return coords - self. _ traj. _ coords [ indices ]
[ 0.2666434049606323, 0.8319529294967651, 0.6772611141204834, 0.09660643339157104, 0.7555155158042908, 0.32090288400650024, 0.7254266142845154, -0.7534756064414978, 0.54800945520401, -1.1115003824234009, -0.2265011966228485, -0.5749478340148926, 0.4515894651412964, -0.08179667592048645, 0....
def format _ img _ size ( img, cfg ) : img _ min _ side = float ( cfg ['img'] ['min _ side'] ) ( height, width, _ ) = img. shape if width < = height : ratio = img _ min _ side / width new _ height = int ( ratio * height ) new _ width = int ( img _ min _ side ) else : ratio = img _ min _ side / height new _ width = int ...
[ 0.2453000843524933, 0.2005479335784912, 0.6943548917770386, -0.28603583574295044, -0.4756907522678375, -1.0201799869537354, -0.07861649245023727, -0.0900271013379097, -0.012652023695409298, 0.4580167531967163, 0.529066801071167, -0.5718311071395874, 0.5236025452613831, 1.3513922691345215, ...
def bubble _ sort ( items, reverse = false ) : # sorts in ascending order if false, # descending if false if reverse = = false : # instatiates a variable that stores the number of steps that were taken # if this variable reaches a number that represents the steps that would have been taken, # then it ends the loop. ste...
[ -0.4800407886505127, 0.523679792881012, 0.891483724117279, 1.0294170379638672, 0.01809372566640377, 0.09982538968324661, 0.5545654296875, -0.3775657117366791, -0.3656455874443054, 0.01510645542293787, -0.658332347869873, -0.0826670229434967, -1.3555818796157837, 0.8423219323158264, 0.046...
def two ( ) : return [ [ 0, 1, 1, 0 ], [ 1, 0, 0, 1 ], [ 0, 0, 0, 1 ], [ 0, 0, 1, 0 ], [ 0, 1, 0, 0 ], [ 1, 0, 0, 0 ], [ 1, 1, 1, 1 ], ]
[ -0.5899044275283813, -1.0400316715240479, 0.9398649334907532, 0.18971429765224457, 0.7988148927688599, -0.4591524302959442, 0.42271170020103455, -0.6909875273704529, -0.11590390652418137, -0.44227591156959534, -1.7414836883544922, -0.22499346733093262, 0.4987746477127075, 0.504016876220703...
def main ( ) : user = start _ story ( ) paths = [ scott _ adventure, team _ 1 _ adv, team _ 2 _ adv, team _ 3 _ adv, team _ 4 _ adv, team _ 5 _ adv, team _ 6 _ adv, team _ 7 _ adv, team _ 8 _ adv, team _ 9 _ adv, team _ 10 _ adv, team _ 11 _ adv, team _ 12 _ adv, team _ 13 _ adv, team _ 14 _ adv, team _ 15 _ adv, team ...
[ 0.22667443752288818, 0.5249026417732239, 0.5240982174873352, 1.1445335149765015, 0.7142922282218933, 0.07453099638223648, 0.8116238713264465, 0.012917925603687763, 0.11108602583408356, -0.12920495867729187, -0.20912210643291473, -0.3443347215652466, 0.1806264966726303, -0.06953569501638412...
def get _ num _ class ( dataset ) : if dataset = = dataset _ imdb : return imdb. num _ class else : raise valueerror ( " unsupported dataset : " + dataset )
[ -1.3938980102539062, 0.6628195643424988, 0.24938055872917175, 0.06446800380945206, -0.06713858991861343, -0.21410484611988068, -0.3351099491119385, 0.2858753800392151, 0.9400515556335449, -0.6829707622528076, -0.13051573932170868, 0.6633846759796143, 0.2758769690990448, 0.6032716631889343,...
def getavailablecameras ( ) : andor _ solis. getavailablecameras. restype = ctypes. c _ uint totalcameras = ctypes. c _ long ( ) result = andor _ solis. getavailablecameras ( ctypes. byref ( totalcameras ) ) check _ status ( result ) return int ( totalcameras. value )
[ -1.268317699432373, -0.16467565298080444, 0.6132605075836182, 0.44131970405578613, -0.2340158224105835, -0.8954176902770996, 0.4203871786594391, -0.265724778175354, 1.6731427907943726, 0.7565146684646606, -0.5858755707740784, 0.25260254740715027, -0.5647095441818237, 0.20820721983909607, ...
def test _ write _ json ( attempt _ json _ write : magicmock, sleep : magicmock ) : attempt _ json _ write. return _ value = none success, error = writer. write _ json _ file ('fake ', { } ) assert success assert error is none assert 1 = = attempt _ json _ write. call _ count assert 0 = = sleep. call _ count
[ -1.53611421585083, 0.23647700250148773, 0.4950569272041321, -0.0927208736538887, 0.8696256875991821, -0.17304609715938568, 0.6102657914161682, -0.34759509563446045, -0.34127944707870483, -0.09599883109331131, -0.8009224534034729, -0.5428406000137329, -0.17190705239772797, 0.233415886759758...
def save ( self, file, save _ raw = true, format ='h5 ', mode ='a ', overwrite = false, chunks ='auto ', compression ='gzip') : if f '. { format }'not in file : file + = f '. { format }'dir = os. path. dirname ( file ) if not os. path. isdir ( dir ) : os. makedirs ( dir ) elif os. path. isfile ( file ) : if not overwri...
[ 0.08656542003154755, -0.4543527662754059, 0.9361284375190735, 0.03146054968237877, 0.09403752535581589, -0.18778397142887115, 1.0401302576065063, -0.9662784337997437, -0.873395562171936, 0.037143148481845856, -0.041294027119874954, -0.09876161813735962, 0.6135106086730957, -0.1418427973985...
def retranslateui ( self, metrichedialog ) : _ translate = qtcore. qcoreapplication. translate metrichedialog. setwindowtitle ( _ translate ( " metrichedialog ", " informazioni sull'elaborazione'" ) ) self. label. settext ( _ translate ( " metrichedialog ", " colonne generate " ) ) self. label _ 2. settext ( _ translat...
[ 0.7490376830101013, 0.22170759737491608, 0.548069179058075, -0.22233985364437103, -0.36159229278564453, 1.1395326852798462, 0.18736307322978973, 0.3323856294155121, -0.7933744192123413, -0.11678708344697952, -0.181659534573555, 0.005505283363163471, 0.33605316281318665, -0.6329031586647034...
def read _ root ( path, tree _ key = none, columns = none, ignore = none, chunksize = none, where = none, * kargs, * * kwargs ) : if not tree _ key : branches = list _ trees ( path ) if len ( branches ) = = 1 : tree _ key = branches [ 0 ] else : raise valueerror ('more than one tree found in { } '. format ( path ) ) br...
[ -0.029764849692583084, -0.23385071754455566, 0.9468227624893188, -0.21900826692581177, -1.0673586130142212, -0.9258696436882019, -0.2006610482931137, -0.38830530643463135, -0.6779522895812988, 0.8280159831047058, 0.32457971572875977, 0.7789965271949768, -0.08487144857645035, -0.23724775016...
def unflatten ( self, tensor ) : with tf. name _ scope ('batch _ unflatten') : if self. _ batch _ dims = = 1 : return tensor if self. _ original _ tensor _ shape is none : raise valueerror ('please call flatten before unflatten.') # pyformat : disable return composite. reshape ( tensor, tf. concat ( [ self. _ original ...
[ -0.18780691921710968, 0.11270646005868912, 0.5543397068977356, 0.15144912898540497, 0.0901731625199318, 0.26123282313346863, 0.7011073231697083, 0.2394862025976181, -0.14820003509521484, -0.27051979303359985, -0.21289387345314026, 0.2149999886751175, -0.03803382068872452, -0.89581966400146...
def get _ ranked _ per _ class _ values ( self, top _ k = none ) : if self. _ ranked _ per _ class _ values is none : row _ indexes = np. arange ( len ( self. _ per _ class _ values ) ) [ :, np. newaxis ] self. _ ranked _ per _ class _ values = self. _ per _ class _ values [ row _ indexes, self. _ per _ class _ rank ] ...
[ -0.7770918607711792, 0.26320645213127136, 0.7083756327629089, 0.7601403594017029, 0.4481726288795471, 0.48605331778526306, 0.3303447365760803, 0.25771060585975647, -0.13714002072811127, -0.29681143164634705, 0.33330899477005005, 0.5236488580703735, 0.3720483183860779, 1.1590725183486938, ...
def compute _ best _ test _ losses _ case1 _ with _ details ( data, k, total _ queries ) : results = [ ] for query in range ( k, total _ queries + k, k ) : best _ arch = sorted ( data [ : query ], key = lambda i : i [ 2 ] ) [ 0 ] test _ error = best _ arch [ 3 ] results. append ( ( query, test _ error ) ) val _ distrib...
[ -0.17271725833415985, 0.014071162790060043, 0.3955558240413666, -0.4689258635044098, 0.11836355924606323, 0.15186360478401184, 0.1852090060710907, 0.8039239048957825, 0.5822333097457886, 0.3995283842086792, 0.16660135984420776, 0.017576679587364197, 0.5024322867393494, 0.5552008748054504, ...
def sphere _ to _ flat ( spherepointsrotated, height, width ) : map _ y = np. zeros ( ( height, width ), dtype = np. float32 ) map _ x = np. zeros ( ( height, width ), dtype = np. float32 ) factor _ phi = ( height - 1 ) / np. pi factor _ theta = ( width - 1 ) / ( 2 * np. pi ) # get multiplied ( by inverted rotation mat...
[ -1.5641939640045166, -1.420266032218933, 0.9176456332206726, -0.5344399213790894, -0.27839377522468567, 0.3073495328426361, 0.4639998972415924, 0.5774872303009033, 0.7776429653167725, 0.4419786036014557, -0.7944858074188232, 0.37646156549453735, 0.133418008685112, 0.5991051197052002, 0.2...
def handle _ user _ input ( self, lock ) : event _ keys = ( pygame. k _ w, pygame. k _ s, pygame. k _ d, pygame. k _ a ) keys _ pressed = [ 0, 0, 0, 0 ] # the pressed status of the keys on _ screen = true is _ grabbed = true pygame. mouse. set _ pos ( 500, 500 ) # avoids vew jumping on focus gain while true : if self. ...
[ 0.19553488492965698, -1.0020501613616943, 0.9915270209312439, 0.9886566996574402, -0.7081390023231506, -0.08725679665803909, 0.6167576909065247, -0.7761109471321106, 0.11722133308649063, 0.18808235228061676, -0.05057162418961525, -0.011055493727326393, -0.5523000955581665, 0.63945060968399...
def plot _ model _ history ( model _ history ) : fig, axs = plt. subplots ( 1, 2, figsize = ( 15, 5 ) ) # summarize history for accuracy axs [ 0 ]. plot ( range ( 1, len ( model _ history. history ['accuracy'] ) + 1 ), model _ history. history ['accuracy'] ) axs [ 0 ]. set _ title ('model accuracy') axs [ 0 ]. set _ yl...
[ 0.19518066942691803, 0.8480141758918762, 0.8815754652023315, -0.7925785779953003, 0.018417857587337494, 0.41211286187171936, 0.9020051956176758, 0.31647735834121704, 0.16673138737678528, -0.10543110966682434, -0.5306051969528198, 0.7357725501060486, 1.4296778440475464, 0.8955594897270203, ...
def path ( self ) : return self. _ path
[ -0.021836400032043457, -0.856448769569397, 0.059565093368291855, 0.10778100043535233, -0.09138956665992737, 1.3597028255462646, 1.7586413621902466, -0.08601658791303635, 0.40932369232177734, -1.1676945686340332, 0.6269177794456482, -0.19238899648189545, -0.3826705813407898, -0.739530384540...
def str _ to _ hours ( s ) : h = 0 for pos in range ( 8, - 1, - 4 ) : h / = 60 h + = int ( s [ pos : pos + 2 ] ) return h
[ -0.5214983820915222, -0.6962600350379944, 0.4938395023345947, -0.314304918050766, -0.6082913875579834, 0.05153191462159157, -0.2869649827480316, 0.2748596966266632, -0.13657063245773315, 1.08295738697052, -0.6512817740440369, -0.3088521361351013, -0.8194034695625305, -2.0118491649627686, ...
def accum ( accmap, a, func = none, size = none, fill _ value = 0, dtype = none ) : # check for bad arguments and handle the defaults. if accmap. shape [ : a. ndim ]! = a. shape : raise valueerror ( " the initial dimensions of accmap must be the same as a. shape " ) if func is none : func = np. sum if dtype is none : d...
[ 0.6608213782310486, 0.6699261665344238, 0.911981999874115, 0.00031923933420330286, -0.3328992426395416, -0.8168440461158752, 1.151538372039795, 0.16354404389858246, 0.9143190383911133, 0.6310550570487976, 0.3766475319862366, 1.1747161149978638, 1.3431190252304077, 0.34766292572021484, 0....
def avg ( self ) : self. aggrgl1 = self. aggrgl1 / self. gl1count self. aggrgl0 = self. aggrgl0 / self. gl0count mean = np. sum ( self. aggrgl1 ) + np. sum ( self. aggrgl0 ) mean = mean / ( 2 * self. non * self. non ) max = np. max ( self. aggrgl1 ) if max < np. max ( self. aggrgl0 ) : max = np. max ( self. aggrgl0 ) #...
[ -0.4470979571342468, -0.1310073733329773, 0.7072446346282959, 0.030855759978294373, -0.64804607629776, 0.25186705589294434, 0.3185120224952698, -0.023341551423072815, -0.806730329990387, 1.2800992727279663, -0.3454592823982239, 1.0374233722686768, -0.26390448212623596, 1.3087844848632812, ...
def test _ add _ snapshot _ dep ( self ) : pass
[ -0.4272119402885437, 0.7519578337669373, 0.5650457143783569, 0.8806940913200378, -0.3621026873588562, 1.0084294080734253, 0.8752719759941101, 0.18752796947956085, 1.0472755432128906, -1.4367698431015015, -1.3157824277877808, -0.9704577922821045, 0.7070969939231873, 0.6613709926605225, 0....
def sign ( number ) : if number > 0 : return 1 elif number < 0 : return - 1 else : return 0
[ -1.22740638256073, -0.1928039938211441, 0.9295383095741272, 0.5620917081832886, -0.0624193511903286, 0.3632439374923706, -0.18657782673835754, 0.6953133940696716, -0.20085495710372925, -0.7825376987457275, 0.19682209193706512, -0.4574735462665558, 0.004465153440833092, 0.5460392236709595, ...
def main ( comma _ separated _ file _ name : str, pipe _ separated _ file _ name : str, space _ separated _ file _ name : str, sort _ order : recordsortorder, ) - > none : records = [ ] record _ files = zip ( ( comma _ separated _ file _ name, pipe _ separated _ file _ name, space _ separated _ file _ name, ), ( ", ", ...
[ 0.6834751963615417, 0.2967258095741272, 0.8581053018569946, 0.5539674758911133, 0.21577662229537964, -0.03205253183841705, -0.17009690403938293, -0.29563260078430176, -1.553680658340454, 0.9099505543708801, 0.44167375564575195, 0.4188084900379181, 0.5423150658607483, -0.33504053950309753, ...
def adddisplay ( self, display, view, csname, looks = none ) : pass
[ 0.2139626443386078, -0.4391334056854248, 0.4233657717704773, 0.9046684503555298, -0.4861122965812683, 1.0432136058807373, -0.20927205681800842, -0.7435010671615601, 0.8033458590507507, -1.158360242843628, 0.448509156703949, 0.47463709115982056, -0.015111470595002174, 0.17320354282855988, ...
def station _ stats ( df ) : print ('\ ncalculating the most popular stations and trip... \ n') start _ time = time. time ( ) start _ time # to do : display most commonly used start station common _ ss = df ['start station']. mode ( ) print ('most common start ', common _ ss ) # to do : display most commonly used end s...
[ -0.4861516058444977, 0.20734775066375732, 0.7430526614189148, 0.06493596732616425, 0.08630707859992981, 0.03188477084040642, 1.2186877727508545, -0.34911492466926575, -0.6559312343597412, -0.185245543718338, 0.20914216339588165, -0.19797690212726593, 0.9033478498458862, 0.6687913537025452,...
def json _ to _ df ( file ) : data = pd. read _ json ( gzip. open ( path. abspath ( json _ path. format ( file ) ),'rt ', encoding ='utf - 8'), lines = true ) return data
[ -0.45649173855781555, -0.5377628207206726, 0.5046095252037048, -0.9565353393554688, -0.02814803458750248, -0.0636046975851059, -0.19842705130577087, -0.4047528803348541, -0.4308012127876282, 0.36731553077697754, -0.24077926576137543, 1.0211251974105835, 0.3426986336708069, -0.7384577989578...
def autodetect _ sip _ path _ windows ( self ) : # this code only runs if they have not specified a sip option # in the config file or via the commandline. # first, check for sip. exe on the path, and use that if found. sip _ exe = self. find _ on _ path ('sip. exe') if sip _ exe : return sip _ exe return none
[ 0.41022253036499023, -1.4043693542480469, 0.5779723525047302, 1.629050612449646, -0.1408427506685257, 0.10543809831142426, 0.8869280815124512, 0.07825368642807007, 0.605986475944519, -0.5182057619094849, 0.6199213862419128, -0.18175674974918365, -0.8273354768753052, 0.386227548122406, -0...
def utility ( board ) : if winner ( board ) = = x : util = 1 elif winner ( board ) = = o : util = - 1 else : util = 0 return util
[ -0.999965488910675, 0.30198934674263, 0.6797005534172058, 0.37989479303359985, 0.059246212244033813, -0.04619705304503441, 1.030909776687622, 0.1378614902496338, 0.8204280734062195, -0.06895677000284195, -0.30536267161369324, 0.18812285363674164, 0.8564262986183167, -0.8450136184692383, ...
def deletekit ( self, session, name, version, iteration, force = false ) : dbkit = self. getkit ( session, name, version, iteration ) # check if kit exists, and whether it is being used. self. getlogger ( ). debug ('deleting kit [ % s ]'% ( format _ kit _ descriptor ( dbkit. name, dbkit. version, dbkit. iteration ) ) )...
[ -0.48188772797584534, 0.7565285563468933, 0.40259358286857605, 0.11721241474151611, 0.29108431935310364, -0.30668744444847107, 0.8985098004341125, 0.07954765111207962, -0.3643325865268707, 0.28692716360092163, -0.10624056309461594, -0.1431141346693039, -0.4536987543106079, 1.25481092929840...
def getsimpoints ( fp ) : simp _ dict = { } for line in ensure _ string ( fp. readlines ( ) ) : field = re. match ('( \ d + ). * ( \ d + ) ', line ) if field : slice _ num = int ( field. group ( 1 ) ) region = int ( field. group ( 2 ) ) simp _ dict [ region ] = slice _ num return simp _ dict
[ 0.24518926441669464, -0.18983300030231476, 0.46202319860458374, -0.3983781337738037, -1.2431801557540894, -0.45668256282806396, 0.8864389061927795, 0.8769357204437256, -0.07530980557203293, 0.764315128326416, -1.544321894645691, -0.5952053070068359, 0.363433837890625, -0.6846515536308289, ...