text
stringlengths
25
2.19k
embedding
listlengths
768
768
def load _ weighted _ knowledge _ base ( file _ path ) : with open ( file _ path ) as kb _ file : line _ regexp = re. compile ('\ d + (? : \. \ d + )? \ s + (? : ( -? \ d + ) \ s + ) + 0') separator _ regexp = re. compile ('\ s +') weighted _ clauses = [ ] for line in kb _ file : line = line. strip ( ) if not line or l...
[ 0.7107638716697693, -1.3894751071929932, 0.6634881496429443, -0.25461310148239136, -0.46404168009757996, 0.013439513742923737, 0.013327357359230518, 0.5600894093513489, -1.0598737001419067, 1.186078667640686, 0.5632113814353943, -0.5435264110565186, -1.343119502067566, 0.013497027568519115...
def get _ project _ sample _ ids ( self, sample _ prj ) : self. log. debug ( " retrieving sample ids subset by sample _ prj'{ }'". format ( sample _ prj ) ) sample _ ids = [ self. name _ proj _ view [ k ]. id for k in self. name _ proj _ view. keys ( ) if self. name _ proj _ view [ k ]. value = = sample _ prj ] return ...
[ 0.1455731838941574, 0.1411295384168625, 0.24553918838500977, -0.1453096866607666, -0.9075875282287598, 0.37089064717292786, 0.01529675256460905, -0.5149734616279602, 0.6577460169792175, 0.5264049172401428, -0.20915652811527252, 0.41954413056373596, -0.6493121385574341, 0.1367880403995514, ...
def test _ single _ survey _ package _ success ( self, client, all _ survey _ packages ) : package = client. single _ survey _ package ( " 71c01598 - 4682 - 4a4c - 90e6 - 69c0bd38ea47 " ) assert package = = self. test _ survey _ package
[ -0.22881513833999634, 0.5395336151123047, 0.24177974462509155, 0.5480904579162598, 0.2925151288509369, 1.012259602546692, 0.242778941988945, 0.46959277987480164, 1.230630874633789, -0.2523442506790161, -0.25185883045196533, -0.30724817514419556, -0.13805678486824036, -0.49081140756607056, ...
def send _ document ( self, context, file _ path ) : with open ( file _ path, " rb " ) as document : data = { " chat _ id " : context [ " from " ] [ " id " ] } file = { " document " : document } requests. post ( url = self. get _ url ( method = " senddocument " ), data = data, files = file ) self. database. inc _ stat ...
[ -0.2320980578660965, -0.22778207063674927, 0.5142960548400879, 0.25618043541908264, 0.3226237893104553, 0.6794946193695068, 0.024123797193169594, -0.5413150191307068, -0.8061719536781311, 0.5507223606109619, -0.5087022185325623, 0.5694607496261597, -0.5610958337783813, 0.1041100025177002, ...
def to _ dict ( self, batch _ size : optional [ int ] = none, batched : bool = false ) - > union [ dict, iterator [ dict ] ] : if not batched : return query _ table ( table = self. _ data, key = slice ( 0, len ( self ) ), indices = self. _ indices if self. _ indices is not none else none, ). to _ pydict ( ) else : batc...
[ -0.3765995502471924, 0.7946757078170776, 0.6006321310997009, -0.5878843665122986, -1.1332993507385254, -0.32844823598861694, -0.15208643674850464, 0.32235729694366455, -0.6168702244758606, -0.05927376076579094, -0.388562947511673, 0.26446881890296936, 0.7159321308135986, 0.3729533851146698...
def fit ( train _ set, train _ labels, dev _ set, n _ iter, batch _ size = 100 ) : # initialize variables losses = [ ] lrate = 1 insize = len ( train _ set [ 0 ] ) outsize = 5 net = neuralnet ( lrate, nn. crossentropyloss ( ), insize, outsize ) # standardize data sample _ mean = train _ set. mean ( ) std = train _ set....
[ -0.22070956230163574, 0.22063541412353516, 0.6535098552703857, 0.20004834234714508, -0.3318687081336975, 0.1338721215724945, -0.2909712493419647, -1.1027650833129883, -0.9145650267601013, -0.39342471957206726, -0.2398507297039032, -0.2764192223548889, 0.30792236328125, 0.5422021150588989, ...
def count ( iterable : iterable ) - > int : return sum ( 1 for _ in iterable )
[ -0.1909761130809784, 0.09370840340852737, 0.1416804939508438, 0.6088799238204956, 0.42374294996261597, 0.2354867160320282, 0.943548321723938, 0.42856743931770325, -0.5308823585510254, -0.18265673518180847, -0.4552679657936096, -0.8295656442642212, -0.16152140498161316, 0.08766916394233704,...
def get _ layer _ size ( self ) : return self. biases ( ). shape [ 0 ]
[ 0.23038505017757416, 0.9306754469871521, 0.4669567346572876, 0.2359069436788559, 1.0935924053192139, 0.13043242692947388, 0.9791901111602783, 0.11720287054777145, -0.15546952188014984, -0.5714536905288696, -0.6616288423538208, 0.95560622215271, -0.8627362847328186, 0.4897383749485016, 0....
def rsum ( n ) : if len ( n ) = = 1 : return n [ 0 ] elif len ( n ) = = 0 : return 0 else : return n [ 0 ] + n [ - 1 ] + rsum ( n [ 1 : - 1 ] )
[ -0.7713660001754761, 1.3049403429031372, 0.6052504181861877, 0.8110561966896057, 1.4914063215255737, -0.5765671730041504, 0.18357795476913452, 0.21781480312347412, 0.8730868697166443, 0.12990900874137878, -0.8055718541145325, 0.466021329164505, -0.7642828226089478, 0.4428224563598633, 0....
def toggles _ enabled _ for _ domain ( domain ) : return { toggle _ name for toggle _ name, toggle in all _ toggles _ by _ name ( ). items ( ) if toggle. enabled ( domain, namespace _ domain ) }
[ -0.46501222252845764, 0.28725263476371765, 0.3874065577983856, 0.28319597244262695, -0.9445300698280334, -0.3462125360965729, -0.48804324865341187, 0.4478754997253418, 0.5556836724281311, 0.7208642959594727, -0.7571735382080078, -0.1215733215212822, -0.04299669712781906, 1.1708582639694214...
def clean ( self ) : from akismet import akismet data = {'comment _ type':'comment ','referrer': self. request. meta. get ('http _ referer ','' ),'user _ ip': self. request. meta. get ('remote _ addr ','' ),'user _ agent': self. request. meta. get ('http _ user _ agent ','' ) } body = self. data. get ('body') blog _ ur...
[ 0.17038221657276154, 0.22478210926055908, 0.5060208439826965, 0.05256716534495354, -0.11790645867586136, 0.2713787853717804, -0.20721513032913208, -0.087590791285038, -0.22643625736236572, 0.7233328223228455, -0.09102131426334381, 0.46763497591018677, -0.7798396348953247, 0.524991154670715...
def metadata _ path ( * subdirs ) : paths = [ ] # highest priority is env if os. environ. get ( " elyra _ metadata _ path " ) : paths. extend ( p. rstrip ( os. sep ) for p in os. environ [ " elyra _ metadata _ path " ]. split ( os. pathsep ) ) # then user dir paths. append ( jupyter _ core. paths. jupyter _ data _ dir ...
[ -0.4689262807369232, 0.6913908123970032, 0.6974769234657288, 0.9563606977462769, 1.125454068183899, 0.7273973226547241, -0.04682818427681923, 0.07598299533128738, -0.4286479949951172, 0.6369573473930359, 0.6831237077713013, 0.4331240952014923, 0.5485985279083252, 0.8213999271392822, -0.2...
def _ update _ break _ state ( self ) : pass
[ -1.2084110975265503, -0.9778738021850586, 0.2480732947587967, 0.5433840751647949, -0.7016288638114929, 1.2019108533859253, 0.36775338649749756, -0.14741656184196472, 0.01127701997756958, 0.41566202044487, -0.3092767894268036, -0.10147073119878769, -0.12649773061275482, -0.0539681613445282,...
def test _ target _ packed ( ) - > none : test _ file = " tests / wf / scatter - wf4. json " exit _ code = main ( [ " - - target ", " out ", get _ data ( test _ file ), " - - inp1 ", " inp1 ", " - - inp2 ", " inp2 " ] ) assert exit _ code = = 0
[ -0.5079536437988281, -0.03644007444381714, 0.561338484287262, 0.2025696188211441, 0.8384004831314087, 0.7908969521522522, 0.13153721392154694, 0.038049183785915375, -0.7622120380401611, 0.21436111629009247, -0.02059565670788288, 1.035680890083313, 0.1299712061882019, -0.7307750582695007, ...
def listexperimentsnames ( self ) : return [ x ['name'] for x in self. listexperimentsdescriptions ( ) ]
[ 0.04973260313272476, 0.1263333410024643, 0.3360816538333893, -0.09626232087612152, 0.34365251660346985, 0.34947723150253296, -1.1037455797195435, 0.25035545229911804, 0.5163242220878601, 1.1630494594573975, 0.3161433935165405, 0.9569688439369202, -0.20600475370883942, 1.1269723176956177, ...
def _ get _ ports _ from _ server _ list ( self, servers, neutron ) : def _ chunk _ by _ ids ( servers, limit ) : ids = [ ] for server in servers : ids. append ( server ['id'] ) if len ( ids ) > = limit : yield ids ids = [ ] if ids : yield ids # note : have to split the query up as the search criteria # form part of th...
[ -0.36585909128189087, 0.7652835249900818, 0.49120816588401794, -0.13421595096588135, 0.5023835301399231, -0.5260115265846252, 0.03447214514017105, -0.7556305527687073, 0.3222886621952057, 0.44511544704437256, -0.07312293350696564, 0.4800790250301361, -0.6559152007102966, 0.5415981411933899...
def best _ sample _ size ( pop, errprob, confidence = 0. 95 ) : sample _ size, best _ prob = none, none threshold = max ( 0, 1. - confidence ) mins, maxs = 1, pop while maxs - mins > 20 : size = max ( 1, int ( ( maxs + mins ) / 2. ) ) # print size,'\ t ', prob _ no _ error ( pop, errprob, size ) good = prob _ no _ erro...
[ 0.4839073717594147, -0.3247506022453308, 0.5626294612884521, 0.07227767258882523, -1.060133934020996, -0.3104405701160431, -0.15267954766750336, -0.2473803460597992, 0.20433475077152252, -0.26136326789855957, 0.15317393839359283, 0.7344115376472473, -0.621504545211792, -0.19834662973880768...
def test _ create _ new _ superuser ( self ) : user = get _ user _ model ( ). objects. create _ superuser ('test @ londonappdev. com ','test123') self. asserttrue ( user. is _ superuser ) self. asserttrue ( user. is _ staff )
[ 0.513899028301239, 0.7533846497535706, 0.033380892127752304, 1.653419852256775, 0.5239765048027039, 1.1071956157684326, -0.1689988374710083, 0.5168419480323792, 0.19579067826271057, -1.0118242502212524, -1.673290491104126, 0.011093229055404663, -0.2614608705043793, 0.5538616180419922, -0...
def register ( request ) : return httpresponseredirect ( reverse ('auth _ login') )
[ -1.4153902530670166, 0.2719104588031769, 0.5714714527130127, 0.4922785460948944, 0.8762695789337158, 0.7143659591674805, 0.8762538433074951, 0.37074917554855347, -0.25144246220588684, -0.7678070068359375, -0.3227091431617737, 0.9150794744491577, 0.7460566163063049, -0.985152006149292, 0....
def testdistancemodulus ( self ) : h0 = 73. 0 universe = cosmologyobject ( ) for om0 in numpy. arange ( start = 0. 15, stop = 0. 56, step = 0. 2 ) : for ok0 in numpy. arange ( start = - 0. 1, stop = 0. 11, step = 0. 2 ) : for w0 in numpy. arange ( start = - 1. 1, stop = - 0. 85, step = 0. 2 ) : for wa in numpy. arange ...
[ 0.08826757967472076, -0.5972594618797302, 0.7975786328315735, -0.14492842555046082, -0.059849757701158524, 0.7350132465362549, 0.3582569658756256, 0.28738707304000854, 0.6396610140800476, -0.7373562455177307, -0.2913702428340912, -0.08983273804187775, -0.6099445223808289, 1.072004914283752...
def print _ results ( args ) : min _ comics, filename = args with codecs. open ( filename,'a ','utf - 8') as fp : for name, shortname in sorted ( load _ result ( json _ file ). items ( ) ) : if name in exclude _ comics : print ( " excluded " + name ) continue fp. write ( u " add ( % r, % r ) \ n " % ( str ( truncate _ ...
[ 0.6866074800491333, -0.10645788162946701, 0.6393850445747375, -1.2819700241088867, 0.06258881837129593, 0.7266021966934204, -0.1447368860244751, -0.8849211931228638, -0.600644588470459, -0.31910958886146545, -0.5600598454475403, 0.5030002593994141, -0.1988615244626999, 0.11268334090709686,...
def authenticaterequest ( self, request, service _ request, * args, * * kwargs ) : username = password = none if'credentials'in request. headers : cred = request. headers ['credentials'] username = cred ['userid'] password = cred ['password'] return self. gateway. authenticaterequest ( service _ request, username, pass...
[ -0.8827128410339355, -0.6031402349472046, 0.5619029402732849, 0.08371049910783768, -0.5196306705474854, -0.42920616269111633, -1.2437912225723267, -0.3951002359390259, 0.1970004141330719, -0.183084174990654, 0.5421954989433289, 0.5030469298362732, -0.6417315602302551, 0.5849496126174927, ...
def get _ spark _ memory ( self ) : return os. environ. get ('max _ memory ','2')
[ 0.4348202645778656, -0.03661424666643143, 0.5004276037216187, 0.6713605523109436, 0.15073540806770325, 0.4401825964450836, -0.3908178508281708, 0.39415958523750305, -0.18963968753814697, -1.0821397304534912, -0.2202988564968109, 0.9131457805633545, -0.22087803483009338, 0.9181384444236755,...
def gettoptenscoresforallminigames ( self, username = none ) : message = dict ( ) if username! = none and not ( self. checkuserexists ( username ) ) : message [ " success " ] = false message [ " error " ] = " username doesn't exist. " return ( json. dumps ( message ) ) cache _ select = " " " select * from geocache m " ...
[ -0.8056347370147705, 0.7239013314247131, 0.9842478036880493, -0.3748321831226349, -0.02212577313184738, 0.006923462264239788, 0.09209925681352615, -0.41550689935684204, -0.3483704626560211, 1.5259521007537842, -0.6759310960769653, 0.17545577883720398, -0.23409542441368103, 0.34688007831573...
def get _ requests _ by _ uid ( self, uid : int ) - > list [ request ] : requests = [ ] data = self. get _ data ('''select * from request where uid = % s order by create _ date desc'' ', ( uid, ) ) for request in data : requests. append ( request ( request [ 0 ], request [ 1 ], request [ 2 ], request [ 3 ], request [ 4...
[ -0.6125884056091309, 0.5474204421043396, 0.36778929829597473, 0.7054367065429688, 1.0491719245910645, -0.16808117926120758, -0.875912070274353, -1.0075139999389648, 0.26853474974632263, -0.44922178983688354, -0.19253624975681305, 0.556371808052063, -0.040252119302749634, 0.6622996926307678...
def drawmatches ( image _ 1, image _ 1 _ keypoints, image _ 2, image _ 2 _ keypoints, matches ) : # compute number of channels. num _ channels = 1 if len ( image _ 1. shape ) = = 3 : num _ channels = image _ 1. shape [ 2 ] # separation between images. margin = 10 # create an array that will fit both images ( with a mar...
[ -0.36263754963874817, -0.34302544593811035, 1.2274115085601807, -0.3506722152233124, 0.2352319359779358, 0.41582953929901123, 0.2450835108757019, 0.1988644003868103, -0.32168513536453247, 0.05023116618394852, 0.3821840286254883, 0.2783445417881012, 0.42952075600624084, -0.5997704267501831,...
def network _ interfaces ( self ) - > pulumi. output [ optional ['outputs. launchtemplatenetworkinterfaces'] ] : return pulumi. get ( self, " network _ interfaces " )
[ -0.19453948736190796, 0.26943111419677734, 0.3383781611919403, 0.6949133276939392, 0.8043647408485413, 0.5994417071342468, 0.3243306875228882, 0.021414712071418762, 1.026918649673462, -0.916706383228302, -1.2819652557373047, -0.48773646354675293, -0.1490662842988968, 0.3625541031360626, ...
def get _ serializer _ context ( self ) : context = super ( ). get _ serializer _ context ( ) context ['include'] = getattr ( self. request,'jsonapi _ include ', ( ) ) return context
[ -0.3812921643257141, 0.06651214510202408, 0.6472764015197754, -0.14350174367427826, -0.6125766038894653, -0.26433318853378296, 0.07755335420370102, 0.21573308110237122, 1.0895320177078247, 0.19377100467681885, -0.05196421965956688, 0.1286993771791458, -0.40843015909194946, -0.0534004010260...
def _ search ( self, data ) : if self. is _ empty ( ) : return self. head current = self. head while current is not none : if current. data = = data : return current. data current = current. next if current is none : return current return current. data
[ -0.1538463830947876, 0.7915583252906799, 0.5507475137710571, -0.3380066752433777, -0.5706043839454651, -0.16267366707324982, -0.3069271743297577, -1.0102856159210205, 0.47682154178619385, -0.4273263216018677, 0.029177414253354073, 0.811255156993866, -1.6668978929519653, 0.39132899045944214...
def gettargetfile ( filename, target _ arch, target _ type ) : assert target _ type = = target _ type _ qemu or target _ type = = target _ type _ generic return os. path. join ( common. images _ root, target _ arch, target _ type, filename )
[ -0.41167837381362915, -0.4496706426143646, 0.4571623206138611, 0.036973435431718826, 0.8132190704345703, -0.009661911055445671, 0.443977952003479, -0.11133885383605957, -0.4226306080818176, 0.05344567447900772, 1.4868966341018677, 0.9346224665641785, 0.21599076688289642, -0.498307406902313...
def _ exclude _ filter ( self, path : str ) - > bool : folder _ name = path ( path ). name for exclude _ folder in self. _ exclude _ folders _ filters : if fnmatch. fnmatch ( folder _ name, exclude _ folder ) : return true for service _ name in self. _ services _ names : if folder _ name = ='autotuned _ defaults': serv...
[ -0.9584440588951111, 0.32838940620422363, 0.8510854244232178, 0.10483979433774948, -1.2222641706466675, 0.5154410600662231, 0.523493230342865, -0.4923108220100403, -0.3359292447566986, -0.6418883204460144, 0.2586844861507416, -0.12093240767717361, -0.6996196508407593, 0.1357918083667755, ...
def _ get _ collection _ folder ( self, folderid, page _ idx ) : return self. _ api ( f " / collections / { folderid } ", get _ data = { " username " : self. user, " offset " : page _ idx * daexplorer. max _ items _ per _ request, " limit " : daexplorer. max _ items _ per _ request, " mature _ content " : true } )
[ -1.1554089784622192, 0.028154244646430016, 0.3847600519657135, -0.10914531350135803, 0.16761916875839233, -0.08304363489151001, -0.5190157294273376, -1.0827172994613647, -0.10354681313037872, -0.36306697130203247, 0.6958206295967102, 0.4393945336341858, -0.13556084036827087, 0.350210577249...
def to _ sql _ statement _ drop ( self, cascade = false ) : cascade = " cascade " if cascade else " " template = " { function _ name } ( { parameters } ) " result = parse ( template, self. signature, case _ sensitive = false ) try : function _ name = result [ " function _ name " ] parameters _ str = result [ " paramete...
[ -0.7848668694496155, -0.1871747225522995, 0.6466752886772156, -0.35637667775154114, -0.450313001871109, -1.126845359802246, -0.7826473116874695, 0.045817822217941284, -0.39878448843955994, 0.6054765582084656, -0.4826543927192688, -0.04057479649782181, -0.36627939343452454, 0.09230784326791...
def anonymize _ annotator ( current _ annot _ ix ) : return " c " + str ( current _ annot _ ix + 1 )
[ -0.6011710166931152, 0.03525935858488083, 0.31832829117774963, -0.6605510711669922, -0.46498021483421326, 0.3159167766571045, 0.407680481672287, -0.02900267019867897, 0.16304661333560944, 0.47755858302116394, -0.02170129306614399, 0.9183999300003052, 0.08561740815639496, -0.754388511180877...
def decline _ appointment ( request ) : if request. user. is _ stylist = ='yes': if request. method = ='post': appointment = appointment. objects. get ( pk = request. post. get ('appointment _ pk') ) appointment. status = appointment. status _ declined appointment. save ( ) return redirect ( request. meta. get ('http _...
[ -0.48029062151908875, -0.22996513545513153, 0.6645529270172119, 0.6372600793838501, -0.23578135669231415, 1.6168206930160522, 0.07741539180278778, 0.760826826095581, 0.3106786012649536, 0.7316423058509827, 0.15206217765808105, 0.089409738779068, 0.05170357599854469, 0.9789458513259888, 0...
def itkimageserieswriterid3id2 _ cast ( * args ) : return _ itkimageserieswriterpython. itkimageserieswriterid3id2 _ cast ( * args )
[ -0.10324394702911377, -0.861849308013916, -0.13820216059684753, -1.1419076919555664, -0.4390319883823395, 0.5180984735488892, -1.3022139072418213, -0.5456857681274414, 0.37406623363494873, 1.3756227493286133, -0.32258889079093933, 0.5986355543136597, -0.5980477333068848, -0.569918632507324...
def weight _ variable ( shape, name = none ) : initial = tf. truncated _ normal ( shape, stddev = 0. 1 ) if name = = none : return tf. variable ( initial ) return tf. variable ( initial, name = name )
[ 0.6512069702148438, -0.08684863895177841, 0.5346057415008545, -0.26080238819122314, -0.9154677987098694, 0.06711235642433167, 0.013754875399172306, -0.3182339370250702, -0.4439309239387512, 0.36526668071746826, -0.6715710163116455, 0.5461509227752686, -0.07667226344347, -0.6627727150917053...
def getdependencepercentagefeaturevalue ( self ) : raise deprecationwarning ('gldm - dependence percentage always computes 1,'' see http : / / pyradiomics. readthedocs. io / en / latest / removedfeatures. html for more details')
[ 0.0291687473654747, -0.11705485731363297, 0.6579530239105225, 0.3916202187538147, -0.48253771662712097, 0.11494843661785126, 0.783250093460083, -0.37357693910598755, -1.0716053247451782, -0.7316860556602478, -0.409124493598938, -0.8192221522331238, -0.30456477403640747, 0.14866049587726593...
def test _ 05 _ 4 _ days ( self ) : self. m _ schedule _ obj. dayofweek = dayofweek _ sunday l _ days = schedtime. _ extract _ days ( self. m _ schedule _ obj, t _ wednesday ) # print ( prettyformatany. form ( l _ days,'b1 - 05 - a - days') ) self. assertequal ( l _ days, 4 )
[ -0.233583003282547, 0.6004039645195007, 0.3341381251811981, -1.6476571559906006, 0.2827869951725006, -0.7077279090881348, 0.14396195113658905, -0.7835555672645569, 0.4382021427154541, -0.48880091309547424, -0.2845774292945862, -0.40436968207359314, -0.006534863729029894, 0.0793687775731086...
def test _ filter _ recipe _ by _ ingredients ( self ) : ingredient1 = sample _ ingredient ( user = self. user, name ='ingredient1') ingredient2 = sample _ ingredient ( user = self. user, name ='ingredient2') recipe1 = sample _ recipe ( user = self. user, title ='recipe1') recipe2 = sample _ recipe ( user = self. user,...
[ 0.15894033014774323, 0.00011200119479326531, 0.5138958096504211, -0.2060268372297287, -0.3230816423892975, -0.4160517752170563, -0.75100177526474, 0.6266348361968994, -0.19875548779964447, -0.07885123044252396, -0.004346586298197508, -0.14307691156864166, -0.5313582420349121, -0.7249820828...
def load _ container ( self, cont _ spec ) : self. init _ container ( cont _ spec )
[ 0.496453195810318, -0.5596519708633423, 0.14142152667045593, -0.16356337070465088, 0.6749510169029236, -0.2321782261133194, 0.8314704895019531, 0.8953726291656494, -0.5313421487808228, 0.7313085794448853, 0.03145396336913109, -0.27019786834716797, 0.632851243019104, 0.6160047650337219, 0...
def secretvalidfornextcache ( self, username, cache _ secret ) : message = dict ( ) if username! = none and not ( self. checkuserexists ( username ) ) : message [ " success " ] = false message [ " error " ] = " username doesn't exist. " return ( json. dumps ( message ) ) if self. lastlogbookentrybyuser ( username )! = ...
[ -0.8645839095115662, 0.2299289107322693, 0.6088629961013794, 0.800748348236084, -0.8956775665283203, -0.051358409225940704, -0.24323482811450958, -0.789013147354126, -0.4997050166130066, 0.6839239597320557, -0.9317259192466736, 0.12649467587471008, -0.3518011271953583, 0.7491441965103149, ...
def send _ quick _ pickup _ notice _ to _ ops ( booking _ id ) : from core. tasks import send _ async _ sms from core. models. booking import booking from core. models. master import notifications sms _ notice = notifications. objects. get ( name ='ops _ sms _ quick _ pickup _ scheduled') number _ to _ send _ to = sett...
[ -0.6268752217292786, -0.019174745306372643, 0.6999620795249939, 0.6210364103317261, -0.1496056765317917, -0.5542218685150146, -0.005859499331563711, -0.06808541715145111, -0.15200641751289368, 0.5760416388511658, -0.5497032403945923, -0.12880101799964905, 1.2257860898971558, 0.384422600269...
def dump _ iter _ to _ csv ( iterable, csv _ filename ) : with w _ open ( csv _ filename ) as csvfile : spamwriter = csv. writer ( csvfile, delimiter ='\ t ', lineterminator ='\ n') for row in iterable : spamwriter. writerow ( row ) return csv _ filename
[ -0.2124626338481903, -0.5131630301475525, 0.30291566252708435, 0.42048007249832153, 0.45062941312789917, 0.08237477391958237, 0.14219507575035095, 0.6403417587280273, -0.33511221408843994, 0.5018134713172913, 0.02571035362780094, -0.5279162526130676, 0.0663442462682724, 0.28254202008247375...
def valid _ metric _ type ( metric _ type ) : return metric _ type in valid _ metrics
[ 0.4266381859779358, 0.676093339920044, 0.24069230258464813, 0.9174996614456177, -0.24322660267353058, 1.2811813354492188, 0.22344328463077545, -1.0387513637542725, -0.34848475456237793, -0.2559162676334381, 0.8928510546684265, -0.04420662671327591, -0.6993948817253113, -0.11405697464942932...
def test _ increment _ self _ with _ diff _ matrix ( self ) : matrix = matrix ( [ [ 1, 2, 3 ], [ 4, 3, 2 ] ] ) matrix - = matrix ( [ [ 3, 2, 1 ], [ 1, 4, 7 ] ] ) self. assertequals ( [ [ - 2, 0, 2 ], [ 3, - 1, - 5 ] ], matrix ) self. assertraises ( differentdimensionerror, matrix. _ _ isub _ _, [ [ 3, 2 ], [ 1, 4 ] ] )...
[ -0.3233836591243744, 0.15110944211483002, 0.8765933513641357, 0.6084511280059814, -0.3626386821269989, 0.7002798318862915, 0.8810026049613953, -0.21754030883312225, 0.06419339030981064, -0.4301227629184723, -0.33394724130630493, 0.10800273716449738, 0.040221743285655975, 0.4142040312290191...
def get _ mobi _ file ( files ) : for f in files : if f. endswith ( '. mobi') : return f return''
[ 0.8255816102027893, -0.5070738196372986, 0.7871372103691101, 1.6226189136505127, 0.28455209732055664, -0.06329125165939331, -0.3577210605144501, -0.6480284333229065, -0.3750045895576477, 0.9609718322753906, 0.7579705715179443, -0.523525595664978, -0.6577975153923035, 0.3067153990268707, ...
def explain ( self, deployment _ name = none, df = none, endpoint = none ) : raise notimplementederror ( " this function is not implemented yet. " )
[ -0.2860937714576721, 0.9599252939224243, 0.5086696743965149, 0.30182409286499023, 0.3567999005317688, -0.39149564504623413, -0.20731191337108612, 0.7743383049964905, -0.28433921933174133, 0.24143898487091064, 0.8139628767967224, 0.2072664052248001, 0.19604475796222687, -0.36526650190353394...
def deserialize ( filename ) : if not os. path. exists ( filename ) : raise exception ('file does not exist.') with open ( filename,'rb') as f : return pickle. load ( f )
[ 0.4590730369091034, -0.4840640425682068, 0.6690008640289307, -0.719820499420166, 0.16849304735660553, -0.0015059256693348289, -0.30956146121025085, 0.4443627595901489, -0.41857677698135376, -0.43824058771133423, -0.2628963887691498, -0.7772684693336487, -0.5508668422698975, -1.243208169937...
def backprop ( self, x, y ) : delta _ nabla _ b = [ np. zeros ( b. shape ) for b in self. biases ] delta _ nabla _ w = [ np. zeros ( w. shape ) for w in self. weights ] # feedforward activation = x activations = [ x ] # list to store all the activations, layer by layer zs = [ ] # list to store all the z vectors, layer ...
[ 0.6118430495262146, -0.20101995766162872, 1.012033462524414, 0.3384035527706146, -0.1583753377199173, -0.16055841743946075, 0.7364947199821472, 0.05279200151562691, -0.05606106296181679, 0.545211911201477, -0.4347616732120514, 0.22414728999137878, -0.39690452814102173, -0.09917651861906052...
def get _ job _ info ( self, job : j ) - > jobinfo :...
[ -0.18408235907554626, 0.2838425934314728, 0.08635062724351883, 0.35826757550239563, -0.5919603705406189, -0.44557154178619385, -0.5228080749511719, -0.8798156976699829, -0.7171844840049744, -0.5538883805274963, -0.8563757538795471, 0.0976756140589714, 0.20480836927890778, 0.148787990212440...
def hpc ( account, config _ file, mem, partition, qos, hpc _ type, tmp, walltime ) : if hpc _ type = = " slurm " : hpc = slurmconfig ( account = account, mem = mem, partition = partition, qos = qos, tmp = tmp, walltime = walltime, ) elif hpc _ type = = " fake " : hpc = fakehpcconfig ( walltime = walltime ) else : asser...
[ 0.4338279366493225, 0.05034844949841499, 0.5667811036109924, 0.24680595099925995, 1.1348049640655518, 0.2876040041446686, -0.35597214102745056, 1.260318398475647, -0.3995417654514313, 0.18251879513263702, -0.028963148593902588, 0.5637242197990417, 0.14403392374515533, 0.3382556140422821, ...
def mask _ invalid ( data ) : xyz _ invalid = ( data ['xyzflagprimary'] > 2 ) | ( data ['xyzflagsecondary'] > 0 ) data ['xyzzdisplacement'] [ xyz _ invalid ] = np. nan time _ invalid = ( data ['waveflagprimary'] > 2 ) | ( data ['waveflagsecondary'] > 0 ) freq _ invalid = ( data ['wavefrequencyflagprimary'] > 2 ) | ( da...
[ 0.10382341593503952, -0.2679976224899292, 0.6549922227859497, -0.5982372164726257, 0.33470553159713745, 0.4446364939212799, 0.5393460392951965, 0.29426172375679016, 0.48107391595840454, -0.41161152720451355, -0.21974819898605347, 0.6422581076622009, -0.2887028753757477, 0.8461140990257263,...
def create _ date ( self, create _ date ) : self. _ create _ date = create _ date
[ 0.663302481174469, 0.4552864730358124, -0.092949777841568, 0.37190818786621094, 1.2582875490188599, 0.8792717456817627, -0.40687599778175354, 0.3596152663230896, -1.1697666645050049, -0.2050914615392685, -0.1673128753900528, -0.6108512878417969, -0.07017892599105835, 1.1210635900497437, ...
def main ( ) : logging. getlogger ( ). setlevel ( logging. info ) app = wx. app ( false ) controller = controller ( ) app. view _ top _ frame = controller. view app. mainloop ( )
[ 0.6374602317810059, -0.1098499447107315, 0.6472172141075134, 0.885231614112854, -0.6908318996429443, 0.4050038754940033, 0.5476964712142944, 0.15015020966529846, 0.4429624676704407, -0.9726892113685608, 0.5563197135925293, 0.1627405881881714, -0.2086750566959381, 0.45652881264686584, 0.5...
def _ get _ instrument _ filters ( ) : return { l : [ l _ for l _ in os. listdir ( path _ lepharedir + " / filt / " + l ) if l _. endswith ( ". pb " ) ] for l in os. listdir ( path _ lepharedir + " / filt " ) if os. path. isdir ( path _ lepharedir + " / filt / " + l ) }
[ -0.47713011503219604, -0.2508949041366577, 0.7408745884895325, -0.46259909868240356, -0.3378436267375946, 0.6342759132385254, 0.4511739909648895, -0.06415850669145584, -0.44276317954063416, -0.17420832812786102, -0.26590490341186523, 0.21475037932395935, -0.497519850730896, 1.1811269521713...
def setup ( self ) : self. category _ item _ class = categoryclass ( ) app. testing = true self. app = app. test _ client ( ) self. data = { " email " : " mochualex4 @ gmail. com ", " username " : " chairman ", " password " : " qwer12 # $ ", " confirm _ password " : " qwer12 # $ " } self. data1 = { " category " : " mat...
[ -0.9714985489845276, 0.5236860513687134, 0.749207079410553, 0.4646351933479309, 0.5821384191513062, 0.3204948306083679, -0.0269392728805542, -0.3574194610118866, -0.4728110432624817, -0.08144768327474594, -0.6011762022972107, 0.28700074553489685, 0.5590786933898926, 0.49265310168266296, ...
def kill ( self ) : self. send _ signal ( signal. sigkill )
[ 0.1342974752187729, -0.1520562618970871, 0.11871780455112457, 1.5190120935440063, 0.9755632877349854, 0.7247257828712463, -0.13782307505607605, -0.3022111654281616, -0.33785757422447205, 0.6348115801811218, -0.9498404264450073, -0.09795860946178436, 0.13857367634773254, -0.1787349581718444...
def test _ l1 ( bar _ file ='bar / 20180727 / nym _ cl _ b1s. csv ', hist _ load _ date = none, symbol ='cl ', repo _ path ='repo _ test ', bs = 1 ) : if hist _ load _ date is not none : print ('create repo ', repo _ path,'and load history dates : ', hist _ load _ date ) import os import ib _ hist as ibhist os. system ...
[ 0.1930905282497406, 0.3110538125038147, 0.7895988821983337, 0.35779812932014465, 0.32275664806365967, 1.3097373247146606, 0.44680336117744446, -0.3263416886329651, -0.27735745906829834, 0.22916939854621887, -0.36211878061294556, 0.4288733899593353, -0.6906523704528809, 0.1687982827425003, ...
def rasterize _ points ( pointclouds, image _ size : union [ int, list [ int ], tuple [ int, int ] ] = 256, radius : union [ float, list, tuple, torch. tensor ] = 0. 01, points _ per _ pixel : int = 8, bin _ size : optional [ int ] = none, max _ points _ per _ bin : optional [ int ] = none, ) : points _ packed = pointc...
[ -0.12275537103414536, 0.5608425736427307, 0.7007662057876587, 1.0722239017486572, -0.14911110699176788, -0.47117143869400024, -0.046215206384658813, 0.27742958068847656, -0.15145434439182281, 0.25077125430107117, 0.22677092254161835, -0.2821613848209381, -0.1991017460823059, 0.159497484564...
def test _ get _ artifact _ deps ( self ) : pass
[ 0.22946850955486298, 0.22533093392848969, 0.03378584608435631, 0.3856882154941559, 0.6615017652511597, 0.2784571051597595, 1.5381156206130981, -0.8139878511428833, 0.5825405716896057, -0.8117678761482239, -0.7645938992500305, -0.1040622815489769, 0.04114847630262375, -1.0080492496490479, ...
def query _ by _ grid _ indices ( self, idxs ) : if self. nn _ groups is none : self. partition _ grid ( ) return [ self. atom _ labels [ self. nn _ groups [ i ] ] for i in idxs ]
[ -1.150342345237732, 0.6600359082221985, 0.35425513982772827, 0.24835838377475739, -0.13373471796512604, -0.47064030170440674, -0.4796912968158722, -1.2395682334899902, 0.06008882075548172, 0.6378633975982666, 1.2482835054397583, -0.394729882478714, -1.0494987964630127, -0.46333158016204834...
def deconvolution ( hv, be, r, d _ r ) : density = [ ] matrix = gen _ matrix ( r, d _ r ) while len ( hv ) > len ( matrix ) : hv. pop ( ) while len ( matrix ) > len ( hv ) : matrix. pop ( ) rev _ hv = list ( reversed ( hv ) ) x = 0 for i in range ( len ( rev _ hv ) ) : # # calculate how much to subtract from bin densit...
[ -0.2762923240661621, 0.4415043890476227, 0.9323041439056396, 0.09430284798145294, -0.2923490107059479, -0.09123928844928741, 0.9176113605499268, 0.8048198819160461, -0.8809094429016113, 0.5267956256866455, -0.19129042327404022, 0.612595796585083, -0.1959685981273651, -0.01573140174150467, ...
def succeed ( self ) : log. info ( " action run % s succeeded ", self. id ) self. mark _ success ( ) self. start _ dependants ( ) self. state _ callback ( )
[ 0.09660234302282333, -0.6053808927536011, 0.37878578901290894, 0.6822311878204346, 1.0889021158218384, 0.8409013748168945, 0.5579995512962341, 0.3297969698905945, 0.24431249499320984, -0.19484204053878784, -1.078007698059082, 0.6331204175949097, 0.7568470239639282, 0.23534172773361206, 0...
def test _ filter _ jobs _ by _ regional _ restrictions ( self ) : job _ post _ 1 = create _ job ( title = " job a ", category = job _ category _ choices. design, company = self. test _ company, regional _ restrictions = regional _ restrictions _ choices. anywhere ) response = self. client. get ( reverse ('jobs : jobs ...
[ 0.5297518968582153, 0.7617458701133728, 0.5050128698348999, -0.0016454491997137666, 0.5750520825386047, 0.6369044780731201, 0.03718364238739014, -0.15234187245368958, -0.01046481728553772, 0.002005931455641985, -0.010231656953692436, 0.3082129955291748, -0.42907893657684326, -0.57083821296...
def add _ button _ subscriber ( self, button _ id : str, callback _ : callable [ [ str ], none ] ) : self. _ button _ subscribers [ button _ id ] = callback _
[ 0.6672291159629822, -0.5424792170524597, 0.21697160601615906, -0.2362554371356964, 0.0673239454627037, 0.09401916712522507, -1.1624881029129028, -0.17893239855766296, 0.5232295989990234, -0.7433557510375977, -1.2816648483276367, 0.3104119300842285, 0.08626037836074829, 0.46558237075805664,...
def check _ positive _ integer ( value ) : try : intval = int ( value ) except valueerror : raise argumenttypeerror ( " % s is not a positive integer " % value ) if intval < 0 : raise argumenttypeerror ( " % s is not a positive integer " % value ) return intval
[ -0.19284896552562714, -0.3258790373802185, 0.4809945225715637, 0.37011292576789856, -0.7461852431297302, 1.1675949096679688, -0.09628069400787354, -0.6385577321052551, -0.6085067391395569, -0.0976506695151329, 1.1162282228469849, -0.5900348424911499, -0.6181377172470093, 0.5881180167198181...
def get _ tiles _ in _ row ( self, index ) : try : tiles = self. _ maze [ index ] return tiles except indexerror : raise indexerror ( " invalid value, { } not a valid index for a row ". format ( index ) )
[ -0.08065224438905716, 0.5559589862823486, 0.23694972693920135, 0.38252773880958557, 0.13358008861541748, -0.33882200717926025, 0.679504930973053, -0.4240313470363617, 0.653091549873352, 0.08038212358951569, -0.12599799036979675, -0.20891410112380981, -0.49201276898384094, 0.107694394886493...
def checkoptimization ( chains ) : all _ good = true orphan _ groups = [ ] l1 _ groups = { } l1 _ lumi = { } l2 _ groups = { } l2 _ lumi = { } # breadth - first search to make l1 and l2 groups # optimization will be tested at every l1 / l2 / ef breakpoint, so # merge the lists of luminosity points for chain in chains :...
[ -0.11456611007452011, 0.2118474543094635, 0.809347927570343, 0.700727105140686, 0.8176172375679016, 0.15295825898647308, -0.7786254286766052, -0.14833661913871765, -1.490052580833435, 0.36938750743865967, -0.049651484936475754, 0.0024588999804109335, -0.29551446437835693, 0.498904615640640...
def from _ card ( cls, creator : gameentity, * args, * * kwargs ) : kwargs ['creator'] = creator kwargs ['oop'] = creator. oop kwargs ['player _ id'] = creator. player _ id enc = cls ( * args, * * kwargs ) return enc
[ -0.08392316848039627, -0.28670534491539, 0.46801331639289856, 0.5551924705505371, -0.12312985956668854, 0.1834179013967514, -0.5801114439964294, -0.38589146733283997, 0.36041781306266785, -0.38513824343681335, -0.21675904095172882, 0.003604782512411475, 0.726836621761322, 0.647404193878173...
def distance _ sklearn _ metrics ( z, k = 4, metric ='euclidean') : d = sklearn. metrics. pairwise. pairwise _ distances ( z, metric = metric, n _ jobs = 1 ) # k - nn graph. idx = np. argsort ( d ) [ :, 1 : k + 1 ] d. sort ( ) d = d [ :, 1 : k + 1 ] return d, idx
[ 0.13372062146663666, 0.4362494647502899, 0.31231990456581116, 0.9596066474914551, -0.9666921496391296, 0.25800269842147827, 0.8186403512954712, -0.0922677293419838, 0.2886211574077606, 0.19965925812721252, 0.24925392866134644, 0.13462625443935394, 0.7758461833000183, -0.33964109420776367, ...
def close ( self ) : try : self. connection. close ( ) except exception as e : raise udsexception ( str ( e ) )
[ -0.2682640552520752, 0.7618011832237244, 0.6623914241790771, -0.08855872601270676, -0.1062086895108223, 0.6574105620384216, -0.1337280571460724, -0.024271197617053986, -0.33773311972618103, -1.2496418952941895, 1.0042327642440796, -0.29432928562164307, -0.7049631476402283, 0.21460747718811...
def move _ object ( self, indexes = none, vert _ inc = 0, hor _ inc = 0, auto = false, mode ='n') : if isinstance ( indexes, str ) : indexes = [ indexes ] for index in indexes : if index in self. object _ dict and'p'in self. object _ dict [ index ] : positions = list ( self. object _ dict [ index ] ['p'] ) up _ bound =...
[ -0.3786436915397644, -0.37696701288223267, 1.1062202453613281, 0.14295579493045807, -0.4852236211299896, 0.9262002110481262, 0.8188325762748718, -0.3782602846622467, 0.3346436619758606, 0.35040152072906494, -0.7796124815940857, -0.12694600224494934, 0.08886879682540894, -0.5438407063484192...
def _ parse _ shuffle _ set ( bot, shuffle _ string ) : shuffle _ string = shuffle _ string. strip ( ) shuffle _ list = shuffle _ string. split ( ) if len ( shuffle _ list ) > 1 : return true, shuffle _ list shuffle _ components = shuffle _ string. split ( ',') error _ list = [ ] shuffle _ list = sequencelist ( ) for e...
[ -0.6472852826118469, -0.526526153087616, 0.7220161557197571, -0.44185784459114075, -0.529553234577179, -0.2984360456466675, -0.12508979439735413, 0.5290443897247314, 0.44760194420814514, -0.01586080528795719, -0.007209276780486107, 0.344645619392395, -0.7147591710090637, 0.0782589763402938...
def test _ ylength _ is _ scale ( self, width, height, scale ) : assume ( scale > 0 ) domain = get _ real _ domain ( width, height, scale ) ymax = domain. ymax ymin = domain. ymin assert ( ymax - ymin ) = = scale
[ 0.18028055131435394, -1.1438624858856201, 0.4240901470184326, 0.8610948324203491, 0.1717616617679596, 0.21884401142597198, -0.6571823954582214, -1.0200724601745605, 0.5053334832191467, -0.07438288629055023, -0.8913925886154175, 0.4943956434726715, 0.12055086344480515, 1.035129427909851, ...
def _ _ init _ _ ( self, width : int, height : int ) : self. _ _ dict _ _ ['width'] = width self. _ _ dict _ _ ['height'] = height
[ -0.30019259452819824, -0.5425122976303101, 0.772644579410553, -0.16221028566360474, -0.8168953061103821, -0.10854917764663696, -0.4064388573169708, 0.09512370079755783, -0.2267134189605713, -0.44544026255607605, -0.6652456521987915, -0.15379935503005981, 0.2319505512714386, 1.0343250036239...
def _ _ call _ _ ( self, environ, start _ response ) : try : for var in'query _ string path _ info '. split ( ) : if var not in environ : raise knownunknown ('missing " % s " environment variable'% var ) query = dict ( parse _ qsl ( environ ['query _ string'] ) ) for param in'size zoom '. split ( ) : if param not in qu...
[ -0.6792412400245667, -0.7539256811141968, 0.8530586957931519, -0.21330957114696503, 0.013511248864233494, 0.2619408667087555, 0.29927781224250793, 0.006128272041678429, 0.45157554745674133, 0.005395184271037579, -0.45271456241607666, -0.2891024053096771, 0.25789767503738403, 0.062955342233...
def correlationlag ( series _ 1, series _ 2, lag _ length = 50, name _ series _ 1 ='series 1 ', plot = true ) : lag _ 1, lag _ 2 = [ ], [ ] correlation _ 1, correlation _ 2 = [ ], [ ] error _ low _ 1, error _ high _ 1, error _ low _ 2, error _ high _ 2 = [ ], [ ], [ ], [ ] for lag _ i in range ( lag _ length + 1 ) : # ...
[ -0.202294260263443, -0.07999895513057709, 0.9771621823310852, -0.9299179315567017, 0.4297688901424408, 0.31706470251083374, 0.2803085148334503, -0.10025934875011444, -0.6052550673484802, 0.9117844700813293, -0.21537058055400848, 1.0662771463394165, -0.18901394307613373, 0.5236541628837585,...
def _ bigru _ layer ( input _ feature ) : pre _ gru = fluid. layers. fc ( input = input _ feature, size = grnn _ hidden _ dim * 3, param _ attr = fluid. paramattr ( initializer = fluid. initializer. uniform ( low = - init _ bound, high = init _ bound ), regularizer = fluid. regularizer. l2decayregularizer ( regularizat...
[ -0.29353252053260803, 0.13420690596103668, 1.049612045288086, 0.09241820871829987, 0.7856554985046387, -0.6103073358535767, 0.21065962314605713, 0.2679283320903778, -0.6828121542930603, -0.5930638909339905, -0.1156814694404602, 0.6250614523887634, -0.2434653490781784, -0.11060052365064621,...
def current _ user _ following ( self ) : return self. _ current _ user _ following
[ -0.347031831741333, -0.47466760873794556, 0.26587000489234924, 1.3904718160629272, -0.14314964413642883, 1.5184158086776733, 0.9733291268348694, -0.5329751372337341, 0.002162862801924348, -0.7453760504722595, 0.43166035413742065, 0.3330371677875519, -0.1584075689315796, -0.2428081631660461...
def batchify ( batch ) : # batch is a list of vectorized examples batch _ size = len ( batch ) ids = [ ex ['id'] for ex in batch ] # - - - - - - - - - prepare code tensors - - - - - - - - - code _ words = [ ex ['code _ word _ rep'] for ex in batch ] code _ type = [ ex ['code _ type _ rep'] for ex in batch ] max _ code ...
[ 0.29231375455856323, 0.2328784167766571, 0.6457408666610718, -0.8303282260894775, -0.576216995716095, -0.7237405180931091, -0.17490918934345245, 0.40525418519973755, -0.10223162174224854, 0.8060765862464905, -1.2147905826568604, 0.6334791779518127, 0.2398141324520111, 0.4685124456882477, ...
def test _ xs ( ) : assert geo _ lin. xs. shape = = ( len _ ts, mlin. n ) for ii in range ( len _ ts - 1 ) : dx = mlin. vi * ( geo _ lin. ts [ ii + 1 ] - geo _ lin. ts [ ii ] ) assert np. allclose ( dx, ( geo _ lin. xs [ ii + 1 ] - geo _ lin. xs [ ii ] ) )
[ 0.43301883339881897, 0.4125731885433197, 0.272705078125, -0.35546204447746277, 0.6417630910873413, 0.4424201250076294, -0.05376311019062996, -0.3029671013355255, 0.39547398686408997, -0.345653235912323, -0.630207896232605, 0.37388941645622253, 0.24222637712955475, -0.5533765554428101, -0...
def _ _ str _ _ ( self ) - > str : output = " " output + = f " name : { self. name } \ n " # if isinstance ( self. alias, str ) and self. alias! = " " : # output + = f " alias : { self. alias } \ n " # if isinstance ( self. type, str ) and self. type! = " " : # output + = f " type : { self. type } \ n " output + = f " ...
[ -0.22124038636684418, -1.3303709030151367, 0.8185381889343262, -1.0561202764511108, -0.5562160015106201, 0.7249407768249512, 0.3225414454936981, -0.8336138725280762, -0.8079279661178589, 0.05034757778048515, 0.19345498085021973, 0.5331518054008484, -0.5800947546958923, 0.308999627828598, ...
def on _ shutdown ( ) : rclpy. shutdown ( ) logger. info ( " waiting for rclpy spin thread to exit " ) global spin _ thread spin _ thread. join ( ) spin _ thread = none global node node = none
[ 0.5956134796142578, -1.0039784908294678, 0.1777379810810089, -0.45507338643074036, 0.7852793335914612, 0.5944178104400635, 0.37478721141815186, 0.6933825612068176, -0.3383246660232544, 0.3142906427383423, -0.18603163957595825, 0.4100077450275421, -1.5700734853744507, -0.6295590996742249, ...
def redeem _ ticket ( self, theater, customer ) : # pre : # the customer must be a user who has an unredeemed ticket for this showtime. # the theater must be the theater containing this showtime. # post : # if the customer does not have an unredeemed ticket for this showtime, this method does nothing. # if, on the othe...
[ 0.36888960003852844, 0.19728410243988037, 0.766417384147644, -0.04731489345431328, 0.232679545879364, 0.10105323791503906, 0.21951286494731903, 0.6467411518096924, 0.17708706855773926, 0.4495231509208679, -0.5289733409881592, -0.3399563729763031, -0.814460813999176, 0.39873477816581726, ...
def acquisitions ( self ) : acquisitions _ dict = { } for key in self. files : matlab _ file = scipy. io. loadmat ( self. files [ key ] ) if len ( key ) = = 8 : vibration _ data _ raw = matlab _ file ['bearing'] [ 0 ] [ 0 ] [ 1 ] else : vibration _ data _ raw = matlab _ file ['bearing'] [ 0 ] [ 0 ] [ 2 ] vibration _ da...
[ -0.2549681067466736, -0.5657188892364502, 0.37765786051750183, -0.2630845010280609, 0.008223377168178558, 0.5285201072692871, 0.12172005325555801, 0.4152977466583252, -0.4867021143436432, -0.05569371581077576, 0.2400709092617035, -0.5334164500236511, 0.17541539669036865, 1.1042944192886353...
async def get _ valid ( self, * * kwargs ) - > " models. fish " : cls = kwargs. pop ('cls ', none ) # type : clstype [ " models. fish " ] error _ map = { 404 : resourcenotfounderror, 409 : resourceexistserror } error _ map. update ( kwargs. pop ('error _ map ', { } ) ) # construct url url = self. get _ valid. metadata ...
[ -0.4281023144721985, -0.05544714257121086, 0.8441073894500732, -0.14025551080703735, 0.0569172278046608, -0.7704487442970276, -0.14332276582717896, -0.11265825480222702, 0.06920003145933151, -0.20385994017124176, -0.15191513299942017, 1.4241745471954346, -0.433232843875885, -0.738024473190...
def apply _ jrf ( jrf _ target, domain _ home = none, should _ update = false ) : _ method _ name ='apply _ jrf'_ logger. entering ( jrf _ target, domain _ home, should _ update, class _ name = _ class _ name, method _ name = _ method _ name ) _ logger. fine ('wlsdply - 00073 ', jrf _ target, domain _ home, should _ up...
[ -0.40473705530166626, 0.09025240689516068, 0.6732231974601746, 0.10984846949577332, -0.48631247878074646, -0.3231123387813568, 0.2795012295246124, 0.33949941396713257, 0.5749086141586304, -0.0555497482419014, 0.052472155541181564, 1.105438470840454, -0.4472171664237976, 0.48386216163635254...
def toextended ( self ) - > str : return self. m _ pub _ key. toextended ( )
[ 0.30879512429237366, 0.6261423826217651, 0.41371652483940125, -0.5735256671905518, -0.3708121180534363, 0.560489296913147, -1.5038821697235107, 0.2906750440597534, 0.44239896535873413, 0.5096619725227356, 0.09021293371915817, 0.8589273691177368, -0.6727476716041565, 0.3975794017314911, -...
def run ( ) : grid = create _ game _ grid ( ) player _ nought, player _ cross = store _ names ( ) token _ map = { player _ nought :'o ', player _ cross :'x'} display _ welcome ( player _ nought, player _ cross ) display _ game _ board ( grid ) for turn in range ( 9 ) : if turn % 2 = = 0 : current _ player = player _ no...
[ -0.13615970313549042, 0.17828354239463806, 0.6970350742340088, 0.06902389228343964, 0.6403973698616028, -0.15948700904846191, 0.5893825888633728, 0.016153644770383835, -0.6183769106864929, 0.209200918674469, -0.04402074217796326, 0.13097944855690002, -0.6556631326675415, 0.1888806670904159...
def getincrementindex ( self ) : return _ itkimageserieswriterpython. itkimageserieswriteriul3iul2 _ getincrementindex ( self )
[ 0.0904940515756607, 0.3410412073135376, 0.39839181303977966, 0.4390447735786438, -0.48968616127967834, 0.8633599281311035, -0.24040302634239197, -0.017559098079800606, -0.21032151579856873, -0.6848532557487488, -0.6536283493041992, 0.6556468605995178, 0.18725275993347168, -0.71945440769195...
def get _ tiles _ in _ column ( self, index ) : try : tiles = [ ] for row in self. _ maze : tiles. append ( row [ index ] ) return tiles except indexerror : raise indexerror ( " invalid value, { } not a valid index for a column ". format ( index ) )
[ 0.022018354386091232, 0.06159384548664093, 0.42864149808883667, 0.5405351519584656, 0.4309397041797638, -0.15552759170532227, 0.8057509064674377, -0.19695167243480682, -0.10251079499721527, 0.31240883469581604, -0.5479875802993774, -0.07016301155090332, -0.5138874650001526, -0.028641980141...
def forward ( self, x ) : x, recalled _ quant _ mask = x m1, m2, mb = self. weights x _ shape = x. shape x = jnp. reshape ( x, [ - 1, x _ shape [ - 1 ] ] ) # easier to operate on flattened x. # q : should we add bias and / or put relu after the low - rank m1 dot? # replacing multiplication and reshape by this einsum br...
[ -0.0036743006203323603, -0.32178786396980286, 0.8007831573486328, -0.056939322501420975, -0.4092719554901123, 0.03129133582115173, 0.48745203018188477, -0.5372424125671387, 0.5571889281272888, -0.4419584572315216, 0.22525954246520996, 0.633209228515625, 0.2964254319667816, -0.0602882057428...
def vectorize ( ex, model ) : src _ dict = model. src _ dict code = ex ['code'] type _ dict = model. type _ dict vectorized _ ex = dict ( ) vectorized _ ex ['id'] = code. id vectorized _ ex ['code'] = code. text vectorized _ ex ['code _ tokens'] = code. tokens vectorized _ ex ['code _ type _ rep'] = none code _ vectori...
[ -0.4242098033428192, 0.30534467101097107, 0.611891508102417, -0.8684129118919373, -0.6384690999984741, -0.7810544371604919, -0.4294317066669464, 0.985420286655426, -0.030854949727654457, 1.0705831050872803, -0.7697128057479858, 0.8315463066101074, 0.466990202665329, 0.44031789898872375, ...
def get _ tiles ( i, j, tiles ) : cell _ tiles = [ ] for tile in tiles : if tile [ 2 ] = = i and tile [ 3 ] = = j : for _ in range ( 0, tile [ 0 ] ) : cell _ tiles. append ( tile [ 1 ] ) return cell _ tiles
[ -0.017306208610534668, -0.19142325222492218, 0.5275252461433411, 1.5952197313308716, 0.05040767788887024, -0.4624406695365906, 0.1329517364501953, -0.1739458292722702, -1.1142414808273315, 1.2638579607009888, -0.4528771936893463, -0.10793076455593109, -0.306264191865921, -0.044284429401159...
def parse _ licensee _ records ( file _ name ) : records = [ ] with fitz. open ( file _ name ) as doc : for page in doc : page _ text = page. gettext ( ) values = page _ text. replace ('\ n \ n ','\ n'). split ('\ n') row = [ ] for value in values : if value in exclude or any ( x in value for x in exlude _ parts ) : co...
[ 0.6507653594017029, -0.15750394761562347, 0.5931944847106934, -0.6676754951477051, -0.5180484056472778, 0.17232055962085724, -1.0786211490631104, 1.702950358390808, -0.2620304226875305, 0.4597148299217224, 0.3260563910007477, -0.4649967849254608, -0.3828813433647156, 0.6893848180770874, ...
def test _ vasp _ calc _ extra ( run _ vasp _ process ) : # let us add an additional object to the retrieve _ list ( which do not delete the object after parse ) # and check if it is actually there from aiida _ vasp. calcs. vasp import vaspcalculation inputs = { } extra _ object _ to _ keep ='poscar'inputs ['settings']...
[ 0.6800035238265991, -0.2984206974506378, 0.5807444453239441, -0.12357087433338165, -0.10238508135080338, 0.40950408577919006, 0.002597254002466798, -0.46771129965782166, 0.8290738463401794, -0.584507167339325, -0.6111883521080017, -0.24105603992938995, 0.1480344980955124, 0.190838962793350...
def set _ activation ( self, activation ) : self. _ activation _ function = activation
[ -0.3513922095298767, -0.793641984462738, 0.013580812141299248, 0.3142797350883484, 0.23237302899360657, -0.3605644106864929, 0.9606688022613525, 0.7179310321807861, -0.23145826160907745, 0.2791125178337097, -1.2840925455093384, 0.6925137042999268, 0.4841294288635254, -1.0506136417388916, ...
def causalattention ( d _ feature, n _ heads = 1, dropout = 0. 0, mode ='train') : assert d _ feature % n _ heads = = 0 d _ head = d _ feature / / n _ heads def compute _ attention _ heads ( x ) : batch _ size = x. shape [ 0 ] seqlen = x. shape [ 1 ] # n _ batch, seqlen, n _ heads * d _ head - > n _ batch, seqlen, n _ ...
[ 0.37131425738334656, -0.24407492578029633, 0.8058088421821594, -0.09633997827768326, -0.4360397458076477, -0.6790609359741211, 1.3014826774597168, 0.21468451619148254, 0.47605589032173157, 0.009972779080271721, 0.40244242548942566, 0.7738048434257507, 0.6772369742393494, -0.074874907732009...
def get _ prodcut _ name _ byid ( pid ) : query ='select testcasemanage _ product from product where prod _ id = { 0 } '. format ( pid ) result = autodb. select _ one _ record ( query ) pname = result [ 0 ] ['prod _ name'] return pname
[ 0.23569002747535706, -0.8203041553497314, 0.5497351288795471, -0.08155156672000885, -0.3544677793979645, 0.006168670486658812, 0.5941609740257263, -1.004678726196289, 0.42885926365852356, 1.141759991645813, 0.5389249920845032, -0.40292438864707947, -0.11599317193031311, -0.1819131523370742...