text
stringlengths
25
2.19k
embedding
listlengths
768
768
def _ run ( self ) : try : self. state ='run'while ( true ) : # logging. getlogger ( ). debug ( " yeah, still taking data like the lhc! " ) self. thread. stop _ request. wait ( 1. 0 ) # little trick to have a long ( 1 s ) refresh interval but still react immediately to a stop request if self. thread. stop _ request. is...
[ -0.6883958578109741, -0.8164042830467224, 0.708825945854187, -0.2477482557296753, -0.009723632596433163, 0.8060627579689026, -0.3371953070163727, -0.5771491527557373, -0.05259983614087105, -0.5748950839042664, -0.12895777821540833, -0.15421484410762787, -0.6801427602767944, 0.0069591002538...
def plot _ xvariance _ equation ( self, laxis, xbl, xbr, ybu, ybd, ilg ) : if self. ig! = 1 and self. ig! = 2 : print ( " error ( xvarianceequation. py ) : " + self. errorgeometry ( self. ig ) ) sys. exit ( ) # convert nuc id to string xnucid = str ( self. inuc ) element = self. element taul = self. taul # load x grid ...
[ 0.6175077557563782, 0.29037782549858093, 1.0816186666488647, 0.32516545057296753, -0.44898754358291626, 0.6994748711585999, 0.2557212710380554, -0.037293415516614914, -0.40394288301467896, -0.03733598068356514, 0.2140243500471115, 0.47543856501579285, -0.5769813060760498, 0.061243351548910...
def unique ( in _ str, max _ length = 20 ) : n = 1 alias = in _ str. lower ( ) [ : max _ length ] # keep on looping until an alias becomes available. # - - # warning : this isn't going to work at high volumes, since the alias # that we return might be taken before we have time to do anything # with it! this should logi...
[ 0.04617267847061157, -0.593187153339386, 0.4052565395832062, -0.36664098501205444, -0.7999680042266846, 0.3059428334236145, 0.09117356687784195, 0.0650295689702034, 0.16791945695877075, 0.16425734758377075, -0.3843339681625366, 0.46612125635147095, -0.3631797432899475, -0.4069526195526123,...
def keep _ arrays _ by _ name ( self, gt _ names, used _ classes ) : inds = [ i for i, x in enumerate ( gt _ names ) if x in used _ classes ] inds = np. array ( inds, dtype = np. int64 ) return inds
[ -1.136765956878662, -0.6550460457801819, 0.49634331464767456, -0.34625300765037537, -0.16816316545009613, 0.6463899612426758, 0.3411644697189331, -0.9023380875587463, -0.30411234498023987, 1.0753825902938843, 0.02271851897239685, 0.4016442596912384, -0.48360565304756165, -0.272844702005386...
def ingest _ from _ multiple _ blobs ( self, blobs, delete _ sources _ on _ success, ingestion _ properties ) : self. _ refresh _ queues _ if _ needed ( ) self. _ refresh _ token _ if _ needed ( ) for blob in blobs : queue _ details = random. choice ( self. _ queues ) storage _ client = cloudstorageaccount ( queue _ de...
[ 0.2315879613161087, -0.23807065188884735, 0.6066011786460876, 0.7163726091384888, 0.8396013379096985, 0.03286202996969223, -0.8595917224884033, -0.9215072989463806, -0.10487845540046692, 0.8933143019676208, -0.7124281525611877, -0.3122084438800812, -0.07803412526845932, 0.5936906337738037,...
def mousepressevent ( self, ev ) : if self. linksenabled : page, link = self. linkat ( ev. pos ( ) ) if link : self. linkclickevent ( ev, page, link ) return super ( ). mousepressevent ( ev )
[ 0.19475099444389343, 0.2127677947282791, 0.7141730785369873, 0.3260127007961273, 0.1825743019580841, -0.37633591890335083, -0.31017959117889404, 1.1676886081695557, 0.9335961937904358, -0.4779435396194458, 0.05338112637400627, -0.19991405308246613, -0.39360252022743225, 0.6575497984886169,...
def populate _ all _ nodes ( self ) : parents, children = self. _ create _ all _ nodes ( ) for parent in parents : # # add parents to tree self. ids. treeview. add _ node ( parent ) # # adds children nodes into parents for parent in self. ids. treeview. iterate _ all _ nodes ( ) : for child in children : if parent! = s...
[ -0.19354654848575592, 0.20033524930477142, 0.737643837928772, -0.35598573088645935, 0.29452794790267944, 0.6062836050987244, -0.10668690502643585, -0.032353475689888, -0.21547062695026398, 0.4242452085018158, 0.2880284786224365, 0.1997465044260025, 0.4196983575820923, 0.6348876953125, -1...
def get _ blkdev _ info ( root _ helper, devlist ) : data = [ ] devitr = devlist. replace ('/ dev / ','' ). split ( ',') for dev in devitr : devinfo = {'dev': dev } # size cmd = ['cat ','/ sys / block / % s / size'% dev ] ( out, _ err ) = putils. execute ( * cmd, root _ helper = root _ helper, run _ as _ root = true ) ...
[ -0.20425516366958618, 0.4389224648475647, 1.1312246322631836, 0.3139536678791046, 0.344544380903244, -0.22141967713832855, 0.5580862164497375, -0.841996431350708, -0.739751935005188, 0.38814273476600647, -0.5843667984008789, 0.17052151262760162, -0.06456921249628067, 1.2946186065673828, ...
def set _ biases ( self, biases ) : if biases. shape! = self. biases ( ). shape : raise self. invalidmatrixdimensions ('wrong weight matrix dimensions') self. _ biases = np. copy ( biases )
[ 0.2065867930650711, 0.3295226991176605, 0.2706758975982666, 0.6990073919296265, -0.057150863111019135, 0.738461971282959, 0.3152412176132202, -0.05003155767917633, -0.026766110211610794, 0.6839348077774048, -0.3748202621936798, 1.1081832647323608, -0.6288256645202637, 0.3141074478626251, ...
def int _ ( schema ) : types ='integer'if'_ notnull'not in schema. data : types = [ types ] + ['null'] return schema ( {'type': types } )
[ -0.22563691437244415, 0.723917543888092, 0.21147611737251282, -0.45449286699295044, 0.22697925567626953, -0.9052191376686096, -0.5309523940086365, 0.007100277114659548, 0.3146771490573883, 0.8125302195549011, -0.7031162977218628, 0.24797478318214417, -0.23475219309329987, -0.23483106493949...
def print _ game _ objects ( self ) : for room, data in sorted ( self. game ['rooms']. items ( ) ) : print ( " info about room {! s } ". format ( room ) ) # add attributes based on the object data for obj in data ['objects'] : info = data ['objects'] [ obj ] attributes = [ ] if info ['breakable'] = = true : attributes....
[ -0.3663536310195923, -1.0628399848937988, 1.0886261463165283, -0.6281045079231262, -0.19564592838287354, 0.5412620902061462, -0.31804364919662476, -0.6407236456871033, -0.9104399681091309, 0.7271040678024292, -0.22985239326953888, 0.553839921951294, 0.1918625831604004, 0.4357048273086548, ...
def gettransaction ( self ) : return self. _ transaction
[ 0.1520853340625763, -0.037034329026937485, 0.47250035405158997, -0.21000713109970093, 0.5702077150344849, -0.31289780139923096, 0.637923002243042, -0.5320810675621033, 0.43136754631996155, -0.8206179738044739, -0.5590255856513977, 0.266304075717926, -0.5806041955947876, -1.2450062036514282...
def evaluate ( self, f _ array ) : for f in f _ array : if f ( self. state _ env, self. variables _ env ) : return true return false
[ -0.8083157539367676, -1.147116780281067, 0.4418604075908661, 0.6545225977897644, 0.4378608167171478, 0.2967979609966278, -0.3259558081626892, 0.3860699236392975, -0.8875960111618042, 0.16093133389949799, 0.07072605937719345, -0.3089521825313568, -0.6529394388198853, 0.8239595293998718, -...
def get _ list _ for _ user _ or _ 404 ( user, permission, * * filters ) : # we're not using the native get _ list _ or _ 404 since we want to return a queryset objects = get _ objects _ for _ user ( user, permission ). filter ( * * filters ) if not objects. exists ( ) : raise http404 return objects
[ -0.9180530309677124, 0.009368505328893661, 0.5414913892745972, 1.3521524667739868, 0.3331502377986908, -0.6306271553039551, -0.5296503305435181, -0.2234458029270172, -0.008795174770057201, 0.3991529941558838, 0.16838641464710236, -0.04219527915120125, 0.25101667642593384, -0.04236110299825...
def oldwaning ( self, bootstrap = false, n _ iter = 200 ) : def monthly _ kept ( x ) : " " " return number of old infections past burnin " " " monthly _ old = x [ ( ~ x. true _ new ) & ( x. date > = x. burnin ) ] return monthly _ old [ ['cohortid ','h _ popuid'] ]. drop _ duplicates ( ). shape [ 0 ] def waning ( df ) :...
[ 0.14155213534832, 0.23045118153095245, 0.9605104923248291, 0.5511647462844849, -0.6453098058700562, -0.026035932824015617, 0.5638322830200195, -0.26598188281059265, 0.04292011633515358, 0.22166883945465088, 0.8877835273742676, 0.6175055503845215, -0.3066151440143585, 0.6439831256866455, ...
def length ( self, edge ) : if edge. canonical _ range [ 1 ] = = - 1 : return int ( len ( self. sequences [ edge. canonical _ sequence ] ) - int ( edge. canonical _ range [ 0 ] ) ) else : return int ( edge. canonical _ range [ 1 ] - edge. canonical _ range [ 0 ] )
[ -0.7771547436714172, -0.5239257216453552, 0.5847364664077759, -0.6318730711936951, -0.19491219520568848, 0.8033918142318726, 0.7396939396858215, 0.6190146207809448, 0.7913801670074463, 1.016152262687683, -0.14516618847846985, 0.2799798548221588, -0.19371996819972992, 0.32082879543304443, ...
def start ( self, start ) : if start is none : raise valueerror ( " invalid value for ` start `, must not be ` none ` " ) # noqa : e501 self. _ start = start
[ -0.03233525529503822, 0.29931890964508057, -0.13996535539627075, 0.410288542509079, 0.7020055651664734, 0.2023034542798996, 0.4454406499862671, 0.8384097218513489, 0.14095373451709747, 0.48402002453804016, -1.0797362327575684, 0.08586644381284714, -0.26339417695999146, -0.244169220328331, ...
def right ( dimension, position ) : if position [ 0 ] = = dimension : return none return position [ 0 ] + 1, position [ 1 ]
[ 0.09596946835517883, 0.27595254778862, 0.6308329105377197, 0.4494035542011261, -0.8428322076797485, -0.536483883857727, -0.726631760597229, -1.2339024543762207, -0.5162520408630371, 0.4168763756752014, -0.26899954676628113, 0.4069896936416626, -0.67510986328125, -0.11527577042579651, 0.5...
def polyfit ( xs, ys, n, full = false ) : ans = [ ] coefs = [ ] for i in xrange ( n + 1 ) : # degree 2 - > c0 * x ^ 0 + c1 * x ^ 1 + c2 * x ^ 2 ( n + 1 ) ans. append ( sum ( ys * xs * * i ) ) coefs. append ( [ ] ) for j in xrange ( i, n + 1 + i ) : coefs [ i ]. append ( sum ( xs * * j ) ) cs = numpy. linalg. solve ( co...
[ 0.5024346709251404, 0.24068275094032288, 0.5643556714057922, -0.5022737979888916, -0.750186026096344, -0.4598442316055298, -0.2699470818042755, -0.22221286594867706, 0.006071595009416342, 0.4205867350101471, -1.2979161739349365, 0.3625417947769165, 0.3286438584327698, -0.3838192820549011, ...
def translate2morse ( self, human ) : dict _ morse = self. get _ code _ dict ( ) if human : res = [ ] for h in human. upper ( ). split ('' ) : aux = [ ] for letter in h : if letter in dict _ morse : aux. append ( dict _ morse. get ( letter ) ) res. append (''. join ( aux ) ) return''. join ( res ), 200 return'', 200
[ -1.5238293409347534, -0.41368165612220764, 0.6951206922531128, -0.26118606328964233, -0.02317049168050289, -1.1933038234710693, -0.6007619500160217, 0.27385905385017395, 0.14382068812847137, 0.5711569786071777, -1.0477317571640015, 0.14224307239055634, -0.3140885829925537, 0.89210402965545...
def compute _ r _ parameter ( ago _ susceptible : int, current _ susceptible : int, current _ infected : int ) - > float : d _ susceptible = current _ susceptible - ago _ susceptible return - d _ susceptible * ( 1 / ( current _ susceptible * current _ infected ) )
[ -0.23889289796352386, -0.36464163661003113, 0.4771330952644348, -0.32994574308395386, -0.040786661207675934, 0.22190126776695251, 0.3389666676521301, 0.17836622893810272, -0.27165353298187256, 1.0982095003128052, 0.7602987885475159, 0.6108191013336182, -0.6418683528900146, -0.4462958574295...
def refresh _ tokens ( self ) - >'dict [ str, str ]': self. cognito. renew _ access _ token ( ) tokens = self. _ extract _ tokens _ from _ cognito ( ) if self. token _ updater is not none : self. token _ updater ( tokens ) return tokens
[ -0.08975546061992645, -0.9174212217330933, 0.3393454849720001, -0.19835960865020752, -0.9360054135322571, -1.0497031211853027, -0.9722344875335693, 0.33556273579597473, -0.027514543384313583, 0.2699947953224182, -0.3581211268901825, 0.8309046626091003, 0.8320457339286804, 0.585034072399139...
def test _ amplitude ( self ) : rabi = rabi ( self. qubit ) rabi. set _ experiment _ options ( amplitudes = np. linspace ( - 0. 95, 0. 95, 21 ) ) exp _ data = rabi. run ( rabibackend ( ) ) exp _ data. block _ for _ results ( ) with self. assertraises ( calibrationerror ) : self. cals. get _ schedule ( " xp ", qubits = ...
[ 0.24814027547836304, 0.24682746827602386, 0.8078142404556274, 0.2872157692909241, -0.12379982322454453, 1.0149940252304077, -0.1758480668067932, -0.5271504521369934, 0.4366309344768524, 0.15896108746528625, 0.20695990324020386, 0.20003622770309448, -0.336103618144989, -0.22885511815547943,...
def check _ table _ for _ type _ bugs ( table ) : broken _ data = false for row in table : if type ( row ) = = list and broken _ data is false : for column in row : if type ( column ) = = str : broken _ data = false else : broken _ data = true break else : broken _ data = true break return broken _ data
[ -0.617409884929657, -0.37981560826301575, 0.8727627396583557, 0.5944245457649231, -0.2619509994983673, 0.7604244351387024, -0.29409292340278625, -0.3517436385154724, -0.5842726230621338, 0.22258080542087555, -0.3310830295085907, 0.0107190553098917, -1.2086436748504639, 1.2594572305679321, ...
def threshold ( img, threshold = 250 ) : return ( ( img > threshold ) * 255 ). astype ( img. dtype )
[ -0.5228798985481262, 0.223584845662117, 0.036431822925806046, -0.2607494294643402, -1.0621423721313477, -1.274545669555664, -1.0408267974853516, -0.5167681574821472, 0.3079349398612976, -0.04525105655193329, -0.3368135094642639, 0.8059544563293457, 0.6261603832244873, -0.1613517850637436, ...
def get _ inputs ( list _ labels, title ) : inputs = [ ] if type ( list _ labels ) = = list : print ( title ) for question in list _ labels : user _ input = input ( question +':') inputs. append ( user _ input ) elif len ( list _ labels ) = = 1 : user _ input = input ( list _ labels [ 0 ] +':') inputs. append ( user _ ...
[ -0.5977169871330261, -0.43401700258255005, 0.6420285701751709, 1.0413918495178223, 0.13380064070224762, 1.2362428903579712, -0.6657099723815918, -0.44281625747680664, 0.23225094377994537, -0.010614958591759205, 0.6620404124259949, 0.15068107843399048, -0.6326922178268433, 0.302031904458999...
def handle _ authn _ request ( self, context ) : # verify auth req ( correct redirect _ uri, contains nonce and response _ type ='id _ token') request = urlencode ( context. request ) satosa _ logging ( logger, logging. debug, " authn req from client : { } ". format ( request ), context. state ) info = self. provider. ...
[ -0.8552961349487305, -0.21869288384914398, 0.776336669921875, 0.2344190925359726, 0.2993790805339813, -0.6188234090805054, 0.018514856696128845, -0.5326709747314453, 1.0745975971221924, -0.5004258751869202, 0.6094743609428406, 0.5405458807945251, 0.28754422068595886, -0.44344621896743774, ...
def instance _ type _ extra _ specs _ delete ( context, flavor _ id, key ) : impl. instance _ type _ extra _ specs _ delete ( context, flavor _ id, key )
[ -0.6246569156646729, 0.26907989382743835, 0.4510645568370819, -0.1713017374277115, -0.6258600950241089, 0.4444769620895386, 0.4454946219921112, 0.21664279699325562, -0.15114280581474304, 0.9203392863273621, -0.1830255538225174, 1.0605520009994507, -0.6604591608047485, 0.6463582515716553, ...
def delete _ variable ( variable _ id ) : " " " example variable _ id = 3409643000002275025 " " " # get instance of variablesoperations class variables _ operations = variablesoperations ( ) # call delete _ variable method that takes variable _ id as parameter response = variables _ operations. delete _ variable ( vari...
[ -0.09054837375879288, -0.647231936454773, 1.0781207084655762, -0.08250067383050919, 1.020104169845581, -0.4141360819339752, 0.3339587450027466, -0.037479858845472336, 0.6750732660293579, -0.17377887666225433, 0.00440047774463892, 0.8604357242584229, -0.550182044506073, 0.4369870722293854, ...
def get _ depth _ text ( temperature _ cube, min _ depth, max _ depth ) : lev _ coord = temperature _ cube. coord ('depth') bounds _ info = gio. vertical _ bounds _ text ( lev _ coord. points, min _ depth, max _ depth ) depth _ text ='ohc integrated over % s'% ( bounds _ info ) return depth _ text
[ 0.3257754147052765, -0.43311211466789246, 0.5168963670730591, -0.6037107110023499, -0.14293979108333588, 0.47551044821739197, -0.20607706904411316, -0.39479294419288635, -0.8473865389823914, 0.3527814447879791, -0.5261184573173523, 0.46241840720176697, -0.31294023990631104, -0.402181327342...
def quota _ usage _ get _ all _ by _ project ( context, project _ id ) : return impl. quota _ usage _ get _ all _ by _ project ( context, project _ id )
[ -0.10799059271812439, 0.33149686455726624, 0.48469388484954834, 0.3454101085662842, 0.701203465461731, -0.31595107913017273, -0.026576492935419083, -0.9731522798538208, -0.7888683080673218, 1.0975885391235352, 0.6851329803466797, -0.10445692390203476, 0.6382773518562317, 0.3736745417118072...
def create _ admin ( ) : if len ( sys. argv ) = = 8 : new _ user = { " fname " : sys. argv [ 1 ], " lname " : sys. argv [ 2 ], " othername " : sys. argv [ 3 ], " username " : sys. argv [ 4 ], " email " : sys. argv [ 5 ], " phone " : sys. argv [ 6 ], " password " : sys. argv [ 7 ], " isadmin " : true, " createdon " : da...
[ -0.13326703011989594, 0.11834222823381424, 0.6828463673591614, 0.6677454710006714, 0.742479681968689, 1.1434133052825928, -0.3289033770561218, -0.802514910697937, -0.4612877368927002, -0.06248337775468826, -0.7442981600761414, -0.25636932253837585, -0.6510973572731018, 1.2434459924697876, ...
def add ( s, bugid, pattern, comment = none ) : s. bugs. append ( bug ( bugid, pattern, comment ) )
[ 0.3225157856941223, -0.9270045757293701, 0.20875847339630127, 0.4957035183906555, 0.8795692324638367, 0.570347249507904, -0.41837164759635925, 0.1545698195695877, 1.2132902145385742, -1.150330662727356, -0.7689336538314819, 0.33932769298553467, -0.6451596021652222, -0.28414449095726013, ...
def new ( * args, * * kargs ) : obj = itksmoothingrecursivegaussianimagefilterid3id3. _ _ new _ orig _ _ ( ) import itktemplate itktemplate. new ( obj, * args, * * kargs ) return obj
[ 0.392675518989563, 0.5106935501098633, 0.032853566110134125, -0.9718275666236877, -0.42188143730163574, 1.1235967874526978, -0.6073446273803711, -1.3991261720657349, 0.7108112573623657, 0.3081413805484772, -0.6199646592140198, 0.3655712306499481, -1.2321970462799072, 0.4458261728286743, ...
def removesplit ( self, index = - 1 ) : if len ( self. tabwidgets ) > 1 : if index = = - 1 : tw = self. currenttabwidget else : if index < len ( self. tabwidgets ) : tw = self. tabwidgets [ index ] else : tw = self. tabwidgets [ - 1 ] res = true savededitors = tw. editors [ : ] for editor in savededitors : res & = self...
[ -1.0274478197097778, -0.5438305735588074, 0.6855749487876892, -0.7701230049133301, -1.0524749755859375, 0.5205904841423035, 1.2783819437026978, 0.33870020508766174, 0.21536991000175476, 0.2131265550851822, -0.644359290599823, -0.9776448607444763, -1.8723961114883423, -0.04082557559013367, ...
def getrandommove ( self, state, role ) : if self. thebackingmachine = = none : return none try : return self. thebackingmachine. getrandommove ( state, role ) except movedefinitionexception as me : raise me except exception as e : self. failgracefully ( e, none ) except outofmemoryerror as e : raise e except threaddea...
[ -0.06769797950983047, 0.15313825011253357, 0.7165203094482422, 0.06760267913341522, 0.5321444272994995, -0.5782333016395569, -0.28314998745918274, -0.6090500354766846, 0.6650100946426392, -0.011312983930110931, 0.8232970237731934, 0.45039281249046326, -0.45819729566574097, -0.3568072617053...
def uuid ( self, name = none ) : # if no name is given, generate a random uuid. if name is none : uuid = _ uu. uuid4 ( ) elif " http " not in name. lower ( ) : uuid = _ uu. uuid5 ( _ uu. namespace _ dns, name ) else : uuid = _ uu. uuid5 ( _ uu. namespace _ url, name ) return self. encode ( uuid )
[ -0.842103898525238, 0.5022928714752197, 0.5541098713874817, -0.13996967673301697, -0.7212480306625366, 0.2848721444606781, -0.15540514886379242, 0.046991005539894104, 1.174185872077942, -0.5916977524757385, -0.9533936381340027, 0.28315529227256775, -0.6101261377334595, 0.09408819675445557,...
def set _ dbpath ( path ) : if os. path. isfile ( path ) : global db _ path db _ path = path else : raise filenotfounderror ( f " no such file :'{ path }') " )
[ 0.799877405166626, -0.16342538595199585, 0.5151232481002808, 0.4987300634384155, 0.3944367468357086, 1.178566575050354, 0.8305346369743347, -0.1632990688085556, -0.8171747922897339, 0.9185994267463684, -0.2550117075443268, 0.3096822202205658, -0.7630978226661682, 0.8402135372161865, 0.14...
def clean ( self, value ) : if self. required and not value : raise validationerror ( self. error _ messages ['required'] ) elif not self. required and not value : return [ ] if not isinstance ( value, ( list, tuple ) ) : raise validationerror ( self. error _ messages ['list'] ) key = self. to _ field _ name or'pk'for ...
[ -1.1950628757476807, -0.3227281868457794, 0.7598974108695984, 0.06862964481115341, -0.5335976481437683, 0.853468656539917, 0.4723352789878845, -0.622389554977417, 0.014605384320020676, 0.9426079392433167, 0.03553751856088638, -0.6092038154602051, -0.07429426163434982, 0.6226583123207092, ...
def _ _ init _ _ ( self, grid _ size, grid _ spacing, atomic _ hierarchy ) : # save inputs self. hierarchy = atomic _ hierarchy self. grid _ size = grid _ size self. grid _ spacing = grid _ spacing self. grid _ indexer = flex. grid ( grid _ size ) # calculate partition variables atoms = [ at for at in atomic _ hierarch...
[ 0.3004021644592285, -0.10701744258403778, 0.6252831816673279, -0.16587640345096588, -0.10844998061656952, 0.2947497069835663, 0.1724015325307846, -0.2576386630535126, -0.45862463116645813, 0.060163579881191254, -0.3298551142215729, 0.45808643102645874, 0.14233723282814026, 0.52252554893493...
def get _ score ( self ) : for choice in loads ( self. choices ) : if choice ['slug'] = = self. value : return choice ['score']
[ -0.4284698963165283, -0.8209428191184998, 0.5134151577949524, -0.7641255259513855, 0.2220592498779297, -0.540059506893158, -0.2941283583641052, -0.7502843141555786, -0.304869145154953, 0.1888725310564041, 0.477561891078949, -0.13886961340904236, -0.7445992827415466, -0.07875100523233414, ...
def draw _ food ( self ) : if not self. food : self. create _ food ( ) ellipse ( self. food [ 0 ] * grid _ length, self. food [ 1 ] * grid _ length, grid _ length, grid _ length )
[ 0.2930781841278076, 0.5525498390197754, 0.5164074897766113, 0.03306736797094345, 0.7441219687461853, 0.2668501138687134, -0.9795826077461243, 0.3533783555030823, -0.02591671235859394, -0.5874879360198975, 0.31335413455963135, 0.7852554321289062, 0.42100146412849426, 0.14763666689395905, ...
def _ load _ config _ values ( self, initkwargs, * * defaults ) : for k in defaults : default = getattr ( self. _ _ class _ _, k, defaults [ k ] ) value = initkwargs. pop ( k, default ) setattr ( self, k, value )
[ -1.0950170755386353, 0.17993898689746857, 0.3723059296607971, 0.2001935988664627, 0.49077948927879333, -0.33405449986457825, -1.542506217956543, 0.4604787230491638, -0.9511492848396301, 0.9239162802696228, -0.5594731569290161, -1.085057020187378, -0.6568204760551453, 1.0383788347244263, ...
def listdir ( self, path ) : assert isinstance ( path, unicode ), path listing = os. listdir ( path ) out = [ ] for item in listing : if ( not item. endswith ( '. pyc') ) and ( item! ='_ _ init _ _. py') : out. append ( item ) return out
[ -1.1085411310195923, -0.7235026359558105, 0.4243503212928772, 0.16342997550964355, -0.29005178809165955, 0.030233118683099747, -0.08473903685808182, -0.5811257362365723, 0.8529934883117676, -0.43493354320526123, -0.6472343802452087, 0.5436064004898071, -0.38350245356559753, 1.4105852842330...
def instance _ type _ get _ by _ name ( context, name ) : return impl. instance _ type _ get _ by _ name ( context, name )
[ -0.5430773496627808, -0.2568134367465973, 0.19129644334316254, -0.7128910422325134, -0.19542010128498077, -0.5260310173034668, 0.023147568106651306, -1.6717655658721924, -0.237728089094162, 0.9915003776550293, -0.2845968008041382, 0.6931030750274658, -0.6822608709335327, -0.627046227455139...
def get _ imdbmovieid ( self, movieid ) : titline = getlabel ( movieid,'% stitles. index'% self. _ _ db,'% stitles. key'% self. _ _ db ) if titline is none : return none return self. title2imdbid ( titline )
[ -0.9882726669311523, -0.5136102437973022, 0.4654701054096222, 0.0006914949044585228, -0.21627749502658844, 0.19358398020267487, -0.8050094246864319, -1.1272352933883667, 0.6264937520027161, 1.2265640497207642, 0.15650318562984467, 0.47204241156578064, -1.9093722105026245, 0.680411219596862...
def precision _ score _ ( y, y _ hat, pos _ label = 1 ) : tp = 0 fp = 0 for i in range ( len ( y ) ) : if y [ i ] = = pos _ label and y _ hat [ i ] = = y [ i ] : tp + = 1 elif y [ i ]! = pos _ label and y _ hat [ i ] = = pos _ label : fp + = 1 return ( tp / ( tp + fp ) )
[ 0.5514911413192749, -1.29304039478302, 0.815643846988678, 0.1788858026266098, 0.3069537580013275, -0.21567636728286743, -0.21053847670555115, 0.1928044855594635, 0.22623950242996216, 0.8373416662216187, -0.3002449572086334, -0.7310435771942139, 0.2086518257856369, -0.15016652643680573, 0...
def generate _ sequence ( self, config ) : pulse1 = pulse ( shape = pulseshape. square ) pulse1. amplitude = config ['parameter # 1'] pulse1. width = float ( config ['number of points'] ) / float ( config ['sample rate'] ) pulse3 = pulse ( shape = pulseshape. square ) pulse3. amplitude = config ['parameter # 1'] pulse3...
[ 0.1857159286737442, 0.4977966845035553, 0.7502585649490356, 0.397810161113739, 0.32466787099838257, 0.47764652967453003, 0.062072526663541794, 0.3242459297180176, 0.2910853922367096, 1.1309956312179565, -1.1855840682983398, -0.07225196808576584, 0.008281142450869083, 0.5902037620544434, ...
def gf _ rem ( f, g, p ) : return gf _ div ( f, g, p ) [ 1 ]
[ 0.6932365298271179, 0.7219792604446411, 0.35284167528152466, 0.5093917846679688, 0.014903251081705093, 0.2296801209449768, -0.17624440789222717, 0.4865860044956207, -1.5443400144577026, 0.29598891735076904, 0.8818830251693726, 0.17298641800880432, -1.1047496795654297, -1.8771133422851562, ...
def get _ play _ head ( self, vrv _ session ) : request _ string ='/ core / accounts / { }'\'/ playheads? mode = content & content _ ids = { } '. format ( vrv _ session. auth ['account _ id'], self. id ) play _ head _ collection = vrv _ json _ hook ( vrv _ session. session. get ( vrv _ session. api _ url + request _ st...
[ -0.31111037731170654, -0.7744234204292297, 0.9173587560653687, 0.537955105304718, 0.6452574729919434, -0.12355746328830719, 0.4567139446735382, -1.5960755348205566, 0.870864987373352, 0.3955613076686859, 0.2873075604438782, 1.3215656280517578, -1.6749919652938843, -1.3421956300735474, 0....
def swap ( self, direction : int ) - > none : if len ( self. children ) > 0 : old = self. children if direction = = 1 : # vertical swap new _ children = [ old [ 3 ], old [ 2 ], old [ 1 ], old [ 0 ] ] else : # horizontal swap new _ children = [ old [ 1 ], old [ 0 ], old [ 3 ], old [ 2 ] ] self. children = new _ children...
[ -1.1407499313354492, -0.05884221941232681, 0.49390020966529846, 0.08639050275087357, 0.2602353096008301, 0.47298750281333923, 0.43375861644744873, 0.3064497709274292, -0.16508439183235168, 0.06731565296649933, -0.9740835428237915, 0.5068663954734802, -0.38521018624305725, 0.398279726505279...
def test _ pol _ rotator ( time _ location, spectral _ type ) : time, telescope _ location = time _ location nsrcs = 50 ras = longitude ( np. linspace ( 0, 24, nsrcs ) * units. hr ) decs = latitude ( np. linspace ( - 90, 90, nsrcs ) * units. deg ) names = np. arange ( nsrcs ). astype ( " str " ) fluxes = np. array ( [ ...
[ -0.18746331334114075, 0.3655221164226532, 0.7239999175071716, -0.5783129334449768, 0.9819368124008179, 0.322784423828125, 0.6688037514686584, 0.19325485825538635, 0.5814694166183472, -0.5223210453987122, -1.038461446762085, -0.2361825853586197, -0.3558553159236908, 0.16220737993717194, 1...
def test _ interval _ calculated _ for _ last _ printed _ commit _ only ( tsv _ output _ path ) : run _ git _ repo _ language _ trends _ output _ test ( tsv _ output _ path, [ " - - min - interval - days = 2 ", " - - first - commit = v0. 3. 0 ", ". rs ", ], " " ". rs 2021 - 01 - 19 66 2021 - 01 - 24 196 2021 - 01 - 27 ...
[ 0.707399845123291, -0.4935438632965088, 0.4978122115135193, -0.4663575291633606, 0.3816487789154053, 0.236761674284935, -0.007176428101956844, -0.5286572575569153, -0.3863793611526489, -0.427582323551178, 0.28218311071395874, 0.5522488951683044, 0.22803542017936707, -0.20261210203170776, ...
def _ create _ masked _ lm _ predictions ( self, tokens, masked _ lm _ prob, max _ predictions _ per _ seq, vocab _ words, rng ) : cand _ indexes = [ ] for ( i, token ) in enumerate ( tokens ) : if token = = " " or token = = " " : continue # whole word masking means that if we mask all of the wordpieces # corresponding...
[ -0.12360542267560959, -0.22005268931388855, 0.8251437544822693, 0.6677185893058777, -0.6820669174194336, -0.21805329620838165, 0.33825600147247314, 0.6538132429122925, 0.10700452327728271, 0.5183782577514648, -0.08931344747543335, 0.18719248473644257, -0.2084367871284485, 0.157491788268089...
def utility ( self ) : util _ val = 0 # b has 2 in a row for r in range ( 7, - 1, - 1 ) : for c in range ( 8 ) : try : if self. grid [ r ] [ c ] = ='-'and self. grid [ r + 1 ] [ c ] = ='-'and self. grid [ r + 2 ] [ c ] = ='b'and \ self. grid [ r + 3 ] [ c ] = ='b': util _ val + = - 40 except : pass for r in range ( 7, ...
[ -0.3159874975681305, 0.11493799835443497, 1.1006124019622803, -0.3942541480064392, 0.22958840429782867, -0.39199450612068176, 0.46158966422080994, -0.22569897770881653, 0.3146715760231018, 0.15788693726062775, 0.20209500193595886, 0.3133446276187897, -0.026142627000808716, 0.67984527349472...
def train _ step ( self, meta _ batch, input _ ph, label _ ph, minimize _ op, inner _ iters, meta _ step _ size ) : # change from original code : save and reset _ full _ state to reset not # only model state but also optimizer state. the original implementation # transmits optimizer parameters between tasks which leads...
[ -0.6443532705307007, -0.021124105900526047, 0.5935112237930298, 0.6505948305130005, -0.10808594524860382, -0.3741499185562134, -0.11300068348646164, 0.4264973998069763, -0.22743280231952667, 0.17043164372444153, -0.4214079976081848, 0.36048418283462524, -0.02984675019979477, -0.22141544520...
def bias _ variable ( shape ) : initial = tf. constant ( 1. 0 ) return tf. variable ( initial )
[ 0.6169878840446472, -0.389664888381958, 0.2094908356666565, -0.5246261358261108, 0.21918727457523346, 0.39249441027641296, 0.38774752616882324, -0.3514343500137329, -0.7826990485191345, 0.3861926794052124, -1.0782811641693115, 1.596326231956482, 0.18030032515525818, -1.2131085395812988, ...
def time _ update ( self ) : if ( len ( self. neuron _ images. shape ) = = 3 ) : self. image _ view. set _ array ( self. get _ image ( ) ) self. canvas. draw _ idle ( )
[ -0.3776821494102478, 0.20370346307754517, 0.5558671951293945, -0.1592990607023239, 0.6940087080001831, 0.020193172618746758, -0.5878676176071167, -0.048444896936416626, 0.5160247683525085, 0.8190838694572449, 0.01647636853158474, -0.025273174047470093, -0.3763284385204315, 0.43521398305892...
def c2kel ( tempc ) : return tempc + 273. 15
[ 0.9723681211471558, -1.0238064527511597, 0.196855828166008, -0.8331388235092163, -0.6996346116065979, -0.22682435810565948, 0.5915625095367432, -0.517707347869873, -0.5910470485687256, 0.1843685358762741, -0.035598695278167725, -0.3311002254486084, 0.24928194284439087, 0.16888755559921265,...
def load _ embeddings _ binary ( embeddings _ path ) : with codecs. open ( embeddings _ path + '. vocab ','r ','utf - 8') as f _ in : index2word = [ line. strip ( ) for line in f _ in ] wv = np. load ( embeddings _ path + '. npy') model = { } for i, w in enumerate ( index2word ) : model [ w ] = wv [ i ] return model
[ -0.6527180075645447, -0.47121888399124146, 0.49663859605789185, -0.5244967341423035, -0.821575939655304, 0.11040154844522476, 0.3916197717189789, -0.3839288055896759, -0.15166088938713074, 1.1272058486938477, -1.1758384704589844, 0.18677391111850739, -0.09741701930761337, 0.017504030838608...
def update _ library ( self, e = none ) : if self. dl _ thread : return if self. library. need _ download ( ) or e : self. enable _ all _ buttons ( false ) self. dl _ thread = self. library. download ( ) self. timer = wx. timer ( self ) self. bind ( wx. evt _ timer, self. update _ gauge, self. timer ) self. timer. star...
[ -0.6977493166923523, -0.8483726382255554, 0.7717204093933105, -0.09641658514738083, -0.4446472227573395, 0.7779938578605652, -0.024519912898540497, 0.2204510122537613, -0.01583600789308548, 0.591671884059906, 0.18147967755794525, -0.34334665536880493, -0.592275083065033, 1.547981858253479,...
def b _ tp _ principle _ fc _ array ( self, b _ tp _ borr _ for, b _ tp _ save _ for, b _ tp _ borr _ inf, b _ tp _ lend _ inf ) :'''b. get consumption value today of total net financial position tomorrow. if nonzero is empty, then the line below is still empty, zero time cost'''b _ tp _ principle = 0 logger. debug ('n...
[ -0.37155815958976746, -0.6119775176048279, 0.9206944108009338, -0.7549917101860046, 1.0083328485488892, -0.1232990249991417, 0.3473820686340332, 0.11847028136253357, -0.297288179397583, 0.9641767740249634, -0.25981608033180237, -0.3354967534542084, -0.7459538578987122, 0.27865082025527954,...
def flatten ( self, key _ list = none ) : if not key _ list : key _ list = self return dict ( ( k, self [ k ] ) for k in key _ list )
[ -1.0530591011047363, 0.7040808796882629, 0.24076129496097565, 0.23779229819774628, -0.8095940947532654, -0.21213926374912262, -0.36551159620285034, 0.8375698328018188, -0.22322656214237213, -0.33724403381347656, -1.266196846961975, -0.5099391341209412, -1.3017687797546387, 1.44155693054199...
def test _ sudo _ prompt _ display _ passthrough ( self ) : testnetwork. _ prompt _ display ( true )
[ 0.6273710131645203, 0.012302597984671593, 0.1731199324131012, 0.7464923858642578, -0.007572531700134277, 0.9956647753715515, 1.0169025659561157, -0.2613549828529358, 0.0072303395718336105, -0.6663607954978943, 0.0005281526246108115, 0.2475060075521469, 0.48506027460098267, -0.5657411217689...
def get ( id _ ) : with database _ session ( ) as sess : result = sess. query ( database. asset ). filter ( database. asset. category _ id = = id _ ). all ( ) return [ i. serialize ( ) for i in result ]
[ -0.7529884576797485, 0.01408530492335558, 0.3140907883644104, -0.9795048832893372, 0.011859273537993431, -0.6761311888694763, -0.8122146129608154, -0.7454250454902649, -0.35154470801353455, 0.1598215401172638, 0.05442148074507713, 0.5550583004951477, 0.7431238293647766, 0.2521342933177948,...
def formula _ weight ( self ) : # remove moieties element _ dict = { k : v for k, v in iteritems ( self. elements ) if not ( k. startswith ( " [ " ) and k. endswith ( " ] " ) ) } # calculate formula weight try : return sum ( [ count * elements _ and _ molecular _ weights [ element ] for element, count in sorted ( iteri...
[ -0.29668599367141724, -0.7307173013687134, 0.5411248803138733, 0.10364869982004166, -0.42353618144989014, -0.1788226068019867, -0.0223196130245924, 0.2623726725578308, -0.6141979098320007, 0.005053832195699215, 0.3236362338066101, -0.17673413455486298, -0.5738653540611267, 0.68585586547851...
def render _ django ( self, template _ name, vars, response _ type = false ) : pass # from google. appengine. dist import use _ library from google. appengine. ext. webapp import template if not response _ type : response _ type = self. request. response _ type ( ) vars = self. get _ template _ vars ( vars ) vars = sel...
[ -0.6195803880691528, -0.3371966779232025, 0.37356898188591003, -0.26853621006011963, -0.5163944363594055, -0.45379638671875, -0.46208640933036804, -0.6469996571540833, 0.6089574098587036, -0.05326450616121292, 0.04818018525838852, -0.4697154462337494, -0.6409046649932861, 0.194943726062774...
def _ _ str _ _ ( self ) : return'jointrecurrencenetwork : \ n % s \ n % s'% ( jointrecurrenceplot. _ _ str _ _ ( self ), network. _ _ str _ _ ( self ) )
[ 0.7937692403793335, -1.0573159456253052, 0.6204261183738708, -1.073604941368103, -0.11591695249080658, 0.32633399963378906, 0.6709741950035095, -0.20662908256053925, -0.19085635244846344, -0.9292448163032532, 0.476921021938324, 0.26523149013519287, -0.3769969344139099, -0.9547885656356812,...
def solve ( grid ) : values = grid _ values ( grid ) values = reduce _ puzzle ( values ) if values! = false : values = search ( values ) if values! = false : return values else : print ('no solution. returned false after search') else : print ('no solution. returned false in reduced puzzle.')
[ -0.6001260280609131, 1.4542778730392456, 0.6480425596237183, 0.6752821803092957, 0.47612127661705017, -0.22576352953910828, -0.23131179809570312, -0.5509459972381592, -0.4110161066055298, 0.08494102954864502, -0.44819721579551697, -1.0691819190979004, -1.3389761447906494, 0.676734924316406...
def removeclient ( client ) : for c, a, i, m in clients : if c = = client : clients. remove ( ( c, a, i, m ) ) return true return false
[ -0.3771633803844452, -0.21505245566368103, 0.503059983253479, -0.5206698179244995, -0.6070736646652222, 0.09735901653766632, 1.019507884979248, -0.2905631363391876, -0.2790701687335968, 0.6622826457023621, -1.2265082597732544, -0.7202631235122681, -1.906956672668457, -0.16824902594089508, ...
def _ no _ arg _ check _ trigger _ function ( self, outer _ ref, * args, * * kwargs ) : return true
[ -0.8680733442306519, 0.017423070967197418, 0.36853063106536865, -0.33343222737312317, 0.1198921948671341, 0.25841230154037476, 0.18560543656349182, 0.3502669930458069, -0.7020988464355469, -0.4625962972640991, 0.08395278453826904, 0.36289873719215393, -0.6543949246406555, 0.657334148883819...
def _ clear _ value _ cache ( ) : _ cpo _ values _ from _ python. clear ( )
[ 0.7227363586425781, 0.4917895197868347, -0.20249105989933014, 0.35555392503738403, -0.22571228444576263, 0.26575756072998047, 0.49207547307014465, -0.3161746561527252, -0.9120206236839294, 0.8576212525367737, -0.6320616602897644, 0.9236569404602051, 0.3745379149913788, -0.05780670046806335...
def fourier ( l, algo ='eigh ', k = 1 ) : def sort ( lamb, u ) : idx = lamb. argsort ( ) return lamb [ idx ], u [ :, idx ] if algo is'eig': lamb, u = np. linalg. eig ( l. toarray ( ) ) lamb, u = sort ( lamb, u ) elif algo is'eigh': lamb, u = np. linalg. eigh ( l. toarray ( ) ) elif algo is'eigs': lamb, u = scipy. spars...
[ 0.8290566205978394, -0.3555331230163574, 0.543811559677124, 0.09480322152376175, -1.033324956893921, -0.2639259397983551, -0.6681728363037109, 1.103392481803894, 0.4016805589199066, -0.10147816687822342, -0.47884947061538696, 0.53481525182724, 0.24869327247142792, 1.4017974138259888, 0.1...
def assert _ empty _ descriptions _ should _ give _ poor _ matches ( self, rows ) : for row in rows : if not row [ " description " ] : self. assertequal ( row [ " match score " ], " 0. 0 " ) # description matches that match to current row for other _ row in rows : if other _ row! = row and other _ row [ " match site " ...
[ 0.2571426033973694, -0.27320799231529236, 0.5258759260177612, -0.23641625046730042, 1.4101983308792114, 0.46798738837242126, 0.2134987860918045, -0.28856000304222107, 0.3483138978481293, -0.40856507420539856, 0.5055027008056641, -0.1308545470237732, 0.03747222200036049, 0.7774204015731812,...
def image _ path ( self, image _ index ) : return os. path. join ( self. base _ dir, self. image _ names [ image _ index ] )
[ -0.409263551235199, -0.39215561747550964, 0.09890087693929672, -0.37295401096343994, 0.29140403866767883, 0.7504351735115051, 0.4155510365962982, -0.33209580183029175, -0.1516977995634079, 0.5698953866958618, 0.8571702241897583, -0.05902807042002678, -0.21015939116477966, 0.003759860992431...
def _ attributes _ set _ global _ setter ( self, setter, flow ) : d = self. _ attributes _ t _ init ( ) # register the attribute and properties d ['setter'] = setter
[ -0.6318013072013855, 0.1816377192735672, 0.2527788579463959, -0.2547141909599304, -0.28866633772850037, 0.45510005950927734, 0.3831268846988678, 0.984182596206665, -0.11165759712457657, 0.8895301818847656, -0.8313357830047607, 0.5010137557983398, 0.32351040840148926, 0.9181205630302429, ...
def filter _ string ( s ) : return s. replace ( " \ x00 ", " " )
[ 1.4578016996383667, -0.9613937139511108, 0.28670623898506165, -0.1612192541360855, -0.8173614144325256, -0.7776377201080322, -0.23839426040649414, 0.2913520038127899, 0.40069887042045593, 0.20447993278503418, -0.5552229881286621, 0.5314329862594604, -0.13963113725185394, -0.745090544223785...
def alphabet _ position ( letter ) : if letter. isupper ( ) : return upper. index ( letter ) elif letter. islower ( ) : return lower. index ( letter )
[ -1.3228822946548462, -1.0630310773849487, 0.6466087102890015, -0.5747524499893188, -0.3824214041233063, 0.03355904668569565, 0.5220640301704407, 0.11022515594959259, 0.6797757148742676, 0.11684992164373398, -0.16174353659152985, -0.1611379086971283, -0.8349679112434387, -0.0345354713499546...
def connect _ to _ database ( user, password ) : mydb = none try : mydb = mysql. connector. connect ( host = " localhost ", user = user, password = password, database = " financetracker " ) except mysql. connector. error as e : print ( e ) return mydb
[ -0.07846768200397491, -0.16753651201725006, 0.34985068440437317, 0.6249112486839294, 0.07686460018157959, -0.0016459079924970865, -0.6869763135910034, -0.34569311141967773, -0.7729180455207825, -0.29106250405311584, 0.057381562888622284, -0.0940018892288208, -0.8910315632820129, 0.31718894...
def _ _ init _ _ ( self, pack _ id = none, date = none, auth _ date = none, status = none, count = none, sum = none, cost = none, local _ vars _ configuration = none ) : # noqa : e501 # noqa : e501 if local _ vars _ configuration is none : local _ vars _ configuration = configuration ( ) self. local _ vars _ configurat...
[ 0.5842233300209045, 0.4295695126056671, 0.5459895133972168, 0.26091548800468445, -0.43846985697746277, -0.41487643122673035, -0.4026820957660675, 0.6268742680549622, 0.791092038154602, -0.676871120929718, -0.8427453637123108, 0.21616239845752716, 0.2331671267747879, 0.38924548029899597, ...
def test _ identify _ protliginterface ( protlig _ caprimodule, protlig _ input _ list ) : protlig _ complex = protlig _ input _ list [ 0 ] observed _ interface = protlig _ caprimodule. identify _ interface ( protlig _ complex, cutoff = 5. 0 ) expected _ interface = { " a " : [ 118, 119, 151, 152, 178, 179, 222, 224, 2...
[ -0.705695390701294, -0.3096825182437897, 0.2659621834754944, 0.46244367957115173, 0.2842733561992645, 1.0358426570892334, 1.0376192331314087, -0.120244599878788, 0.20349887013435364, -0.20946671068668365, -0.9239862561225891, -0.000051576440455392, -0.7958571910858154, 0.2022208869457245, ...
def read _ data ( ) : subnets = { } stats = { } for ipv in ( 4, 6 ) : # get configuration and statistics url = os. getenv ( f'url { ipv } ', f'/ run / kea / kea { ipv } - ctrl - socket') conf = kea _ talk ( url,'config - get ', ipv ) stats [ ipv ] = stat = kea _ talk ( url,'statistic - get - all ', ipv ) if not conf or...
[ -0.1511470377445221, 0.5105030536651611, 0.7685886025428772, 0.14017608761787415, -0.13016889989376068, -0.15641988813877106, -0.42197248339653015, -0.6420290470123291, -0.2902408242225647, -0.3072483241558075, 0.11700020730495453, -0.13446621596813202, 1.0969942808151245, 0.69401460886001...
def get _ test _ tbest ( args, clip, r, score ) : c = args. clip _ y [ clip ] a _ train = r ['train _ mode'] a _ test = r ['test _ mode'] # mean across cv folds t _ cv = np. mean ( a _ train ['t _ train _ % s'% score ] [ c ], axis = 0 ) v _ cv = np. mean ( a _ train ['t _ val _ % s'% score ] [ c ], axis = 0 ) if score ...
[ -0.4597379267215729, -0.5279961228370667, 0.7888779640197754, -0.36566996574401855, -0.11498979479074478, 0.07607180625200272, 0.6731211543083191, -0.19266396760940552, -0.05725420266389847, 1.5845942497253418, 0.36806824803352356, -0.0005060258554294705, 0.6860454082489014, -0.59509825706...
def applicable ( dataset ) : return len ( dataset. data. axes ) > 2
[ 0.3879565894603729, 0.8558272123336792, 0.3661082088947296, -0.7595227956771851, -0.4148470461368561, -0.26976853609085083, -0.24983280897140503, 0.4297955632209778, 0.2492210417985916, -0.44914135336875916, 0.33953842520713806, 0.17302751541137695, 1.1336864233016968, 0.21232765913009644,...
def set _ parent ( parent :'block ', children : list ['block'] ) - > none : for child in children : child. parent = parent
[ 0.08899257332086563, 0.30050474405288696, 0.2659350633621216, 0.6986422538757324, -0.20846718549728394, -0.622199535369873, 0.033568114042282104, -0.32042157649993896, -1.0152335166931152, 1.1331586837768555, -1.2171478271484375, -0.2427023947238922, -0.4381130635738373, 0.7658228874206543...
def _ _ init _ _ ( self, realmap = none, timelimit = none, calibratelim = 6, sim = true ) : self. timelimit = timelimit self. exploredarea = 0 self. currentmap = np. zeros ( [ 20, 15 ] ) if sim : from simulator import robot self. robot = robot ( self. currentmap, east, start, realmap ) self. sensors = self. robot. gets...
[ 0.4710330367088318, 0.0660386011004448, 0.6174537539482117, 0.8378009796142578, -0.9737180471420288, -0.322483628988266, -0.06408398598432541, 0.31222790479660034, 1.5036782026290894, 0.09579339623451233, -0.3193158507347107, -0.25022685527801514, -0.35634294152259827, 0.7782058119773865, ...
def security _ group _ exists ( context, project _ id, group _ name ) : return impl. security _ group _ exists ( context, project _ id, group _ name )
[ -0.46754997968673706, 0.7532312273979187, 0.20226527750492096, -0.152581587433815, 0.4610767364501953, 0.14578838646411896, -0.6056116223335266, -0.475879967212677, -0.7032473683357239, 0.5007315278053284, 0.04132743924856186, -0.0702088326215744, -0.1957450956106186, -0.19934046268463135,...
def sequence _ 2 _ df ( seq _ in ) : pos = [ i + 1 for i in range ( len ( seq _ in ) ) ] df _ out = pd. dataframe ( {'pos': pos,'mut': list ( seq _ in ),'freq': 1. 0 } ) df _ out ['pos'] = df _ out ['pos']. astype ( int ) df _ out ['freq'] = df _ out ['freq']. astype ( float ) return df _ out
[ -0.6476228833198547, -0.2659056484699249, 0.4766678810119629, -0.28950974345207214, -0.1513441950082779, -1.3783708810806274, 0.21765732765197754, 0.6373035311698914, 0.24200622737407684, -0.18114060163497925, 0.0005180475418455899, -0.03912850841879845, 0.26194459199905396, -0.17728990316...
def gf _ eval ( f, x, p ) : result = 0 for a in f : result * = x result + = a result % = p return result
[ 0.09451107680797577, 0.7526768445968628, 0.33528921008110046, -0.3011898994445801, 0.5465530157089233, 0.5732114911079407, -0.6839281916618347, 0.9036701917648315, -0.9871495366096497, 0.3071382939815521, -0.1763433814048767, -0.43538299202919006, -0.5825653076171875, -0.41776376962661743,...
def find _ given _ key ( element, given _ key ) : res = [ ] if type ( element ) = = dict : for key in element : if key = = given _ key : res + = [ element [ key ] ] elif type ( element [ key ] ) = = dict or type ( element [ key ] ) = = list : res + = find _ given _ key ( element [ key ], given _ key ) elif type ( eleme...
[ -0.39970457553863525, 0.060626957565546036, 0.5259093046188354, 1.0174107551574707, 0.3577781319618225, -0.6083704829216003, -0.5017457008361816, 0.39808154106140137, 0.07463574409484863, 0.8463428020477295, -0.04803935065865517, -0.08118953555822372, -0.8811239004135132, 1.970061302185058...
def _ _ init _ _ ( self, status = none, valid _ to _ date = none, next _ billing _ date = none, errors = none, last _ error _ date = none, payment _ compatible = none ) : # noqa : e501 # noqa : e501 self. _ status = none self. _ valid _ to _ date = none self. _ next _ billing _ date = none self. _ errors = none self. _...
[ 0.4370686113834381, 0.540098249912262, 0.48147261142730713, -0.00017612754891160876, -0.6198763847351074, -0.13938623666763306, -0.5457521677017212, 0.6726869940757751, 0.5160627365112305, -0.4268413484096527, -0.06477231532335281, 0.13568511605262756, 0.5538485050201416, 0.401629000902175...
def convert ( input _ file, output _ location ) : data = numpy. recfromcsv ( input _ file, delimiter = ',') dims = data. shape obs _ code = str ( 995 ) output = [ ] output _ filename = " c : \ users \ matt \ desktop \ find _ orb _ positions _ " output _ filename = output _ filename + str ( data [ 0 ] [ 0 ] ) + ". txt "...
[ -0.12680470943450928, -0.4587288200855255, 1.019992470741272, -0.48911815881729126, 0.018462572246789932, 0.12359175086021423, 0.1747920960187912, 0.17638088762760162, -0.24896059930324554, 0.8108122944831848, -0.2664167582988739, -0.5214744210243225, 0.16168275475502014, 0.076184608042240...
def test _ equivalence _ across _ load _ operations ( ) : with open ( fixture _ location ('long. conll'), encoding ='utf - 8') as f : contents = f. read ( ) str _ c = load _ from _ string ( contents ) file _ c = load _ from _ file ( fixture _ location ('long. conll') ) with open ( fixture _ location ('long. conll'), en...
[ 0.37183502316474915, -0.6125524640083313, 0.8462915420532227, -0.7535544633865356, 0.42874497175216675, -0.028260838240385056, 0.8968963027000427, -0.17557436227798462, -0.48810097575187683, 0.0019792078528553247, -1.0560024976730347, -0.5359199643135071, 0.2774328887462616, -0.26627030968...
def _ _ init _ _ ( self, args, bufsize = 0, executable = none, stdin = none, stdout = none, stderr = none, preexec _ fn = none, close _ fds = false, shell = false, cwd = none, env = none, universal _ newlines = false, startupinfo = none, creationflags = 0 ) : _ cleanup ( ) self. _ child _ created = false if not isinsta...
[ 0.14345219731330872, -0.8275467753410339, 0.9808245301246643, 0.3533005118370056, -0.6196392178535461, 0.0381794348359108, 0.8406573534011841, -0.28383028507232666, -0.46862494945526123, -0.9960783123970032, -0.15027844905853271, 0.08320777863264084, 0.21522299945354462, 0.2555889189243316...
def test _ categories ( ) : assert len ( test _ df. home _ ownership. cat. categories ) = = 4 assert len ( test _ df. purpose. cat. categories ) = = 14 assert len ( test _ df. grade. cat. categories ) = = 7
[ -0.07623478770256042, 1.402690052986145, 0.2517460286617279, -0.0953712910413742, 1.2533373832702637, 0.24249309301376343, 0.5254495143890381, 0.2647702395915985, -0.22866778075695038, -2.0017411708831787, 0.20995505154132843, -0.7088119387626648, 1.0298908948898315, 0.2478686273097992, ...
def from _ text ( cl, text ) : raise notimplementederror ( )
[ 0.19149546325206757, -0.5146101713180542, 0.2703796923160553, 0.4317212998867035, -0.5783488154411316, 1.0401880741119385, -0.39092716574668884, 0.6336933970451355, 0.6391019821166992, 0.15458139777183533, -0.6100262403488159, 0.1591019183397293, 0.24438408017158508, -0.015212958678603172,...
def add _ arguments ( self, parser ) : parser. add _ argument ('- - force ', action ='store _ true ', help ='load data even if there are existing records. ', )
[ -0.004018760751932859, 0.8438384532928467, 0.3519909977912903, -0.7565377354621887, 1.4272980690002441, 0.6011850237846375, -0.3779890239238739, 0.15935136377811432, -0.15045247972011566, -0.08904071897268295, -0.8754451274871826, 0.39697954058647156, 0.09977500885725021, 1.161571383476257...
def vpnvserver _ authenticationnegotiatepolicy _ bindings ( self ) : try : return self. _ vpnvserver _ authenticationnegotiatepolicy _ binding except exception as e : raise e
[ -1.2404314279556274, -0.016521697863936424, 0.43530020117759705, 0.8526062369346619, -0.055508799850940704, 1.6821231842041016, -0.03454715758562088, -0.323711633682251, 0.874153733253479, 0.8553010821342468, -0.6182342767715454, -0.04325373098254204, -1.229514241218567, 0.1724609732627868...
def _ _ rmul _ _ ( self, other ) : return self. _ _ mul _ _ ( other )
[ -0.581642210483551, 0.5174552798271179, 0.8647093772888184, -0.21025604009628296, -0.3232044577598572, 0.1319449245929718, -0.786824643611908, -0.6498486995697021, 1.2048089504241943, -0.4224741458892822, -0.2263994663953781, -0.4643130898475647, 0.0609983429312706, -0.6311125755310059, ...
def reversedzip ( * iterables ) : for tup in zip ( * map ( reversed, iterables ) ) : yield tup
[ -0.6945571899414062, -0.2117902934551239, 0.6181128621101379, 0.6425068974494934, 0.07118283212184906, 0.7450710535049438, -0.016014767810702324, 0.45629143714904785, -0.7630958557128906, -0.611743688583374, 0.11965446919202805, -0.5610523819923401, 0.10707973688840866, -0.6325029134750366...