text
stringlengths
25
2.19k
embedding
listlengths
768
768
def integrate ( self, theta, dv ) : theta = np. asarray ( theta ) dv = np. asarray ( dv ) n _ data = self. traj. shape [ 0 ] if n _ data = = 0 : raise valueerror ( " no point to start integration from. " " call ` init ` first. " ) n _ readings = theta. shape [ 0 ] size = self. lat _ arr. shape [ 0 ] required _ size = n...
[ -0.32359960675239563, 0.9208571314811707, 0.5885884165763855, 0.038750771433115005, 0.34590113162994385, 0.055707529187202454, 0.2552468776702881, -0.3371603190898895, -1.0419026613235474, -0.4666624665260315, 0.023334277793765068, -0.44613519310951233, 0.3142506182193756, 0.52595031261444...
def bfs ( tree, elem ) : from collections import deque # library that allows us to pop and append at the beginning of a list easily # add the initial state ( root ) to the < fringe > fringe = deque ( ) # creates a list that allows us to pop and append on the left side ( slow operation ) # take every available node in t...
[ -0.017034297809004784, -0.11728399991989136, 0.8427904844284058, 0.43875956535339355, -0.6010346412658691, 0.09223596751689911, -0.8338987827301025, 0.17462439835071564, 0.562228798866272, 0.1509091556072235, -0.9027085900306702, 0.6328408122062683, -0.882523775100708, 0.9084755182266235, ...
def run ( self, plan _ path, state _ file _ path, target _ resources, terraform _ exec, variable _ dict, variable _ files ) : self. terraform. working _ dir = plan _ path self. terraform. terraform _ bin _ path = terraform _ exec self. set _ semantic _ version ( ) self. terraform. targets = target _ resources return _ ...
[ 0.03379110246896744, -0.4805576205253601, 0.45196405053138733, -0.20768211781978607, 0.9020766019821167, 0.12222025543451309, 0.15970410406589508, 0.49300965666770935, -0.9735380411148071, 0.6022710204124451, 0.4975838363170624, -0.13526925444602966, 0.39493095874786377, -0.586849689483642...
def densepoint _ module ( xyz, features, is _ training, bn _ decay, scope = none, bn = true, npoint = none, radius = none, nsample = none, mlp = none, ppool = none, use _ xyz = true, group _ num = 1 ) : with tf. compat. v1. variable _ scope ( scope ) as sc : if npoint is not none : new _ xyz, grouped _ features = sampl...
[ -0.1809835284948349, -0.3426815867424011, 0.6986088752746582, 0.8622134923934937, 0.1336599886417389, -0.12956365942955017, 0.4233461320400238, 0.2515578269958496, 0.3817559480667114, 0.49847307801246643, -0.04373817518353462, 0.9984385967254639, -0.3233068883419037, 0.4310298562049866, ...
def twitter _ threat _ feed ( self, ipaddress = none ) : if ipaddress is not none : endpoint = " { } / { } ". format ( self. ep _ twitter _ threat _ feed, ipaddress ) else : endpoint = self. ep _ twitter _ threat _ feed return self. _ make _ request ( endpoint = endpoint )
[ 0.2157120704650879, 0.23209170997142792, 0.4552958011627197, -0.2762160003185272, 0.6276797652244568, -1.1735519170761108, -0.9291121363639832, -0.050000376999378204, 0.0997433215379715, 0.21075277030467987, -0.817575991153717, 1.428650975227356, -0.9570345282554626, -0.8207047581672668, ...
def _ apply _ reset ( self, y ) : return y
[ -0.9370628595352173, -0.38663971424102783, 0.3970705568790436, 0.03310733661055565, -0.18887193500995636, -0.21284182369709015, 0.38268014788627625, -1.2835350036621094, 0.9267367124557495, 0.23187831044197083, 0.43688076734542847, 0.6226142644882202, 0.29342490434646606, -0.41355529427528...
def test _ import _ failure _ from _ module ( self ) : code1 ='''from future import standard _ library standard _ library. install _ hooks ( ) standard _ library. remove _ hooks ( ) import importme2'''code2 ='''import socketserver print ('uh oh. importme2 should have raised an importerror.')'''self. _ write _ test _ sc...
[ 0.31542888283729553, 0.09704544395208359, 0.4860571622848511, 0.622173547744751, -0.1644952893257141, 0.46736741065979004, 0.6485047340393066, -0.34507426619529724, -0.031059766188263893, 0.20829340815544128, -0.7219553589820862, 0.8667121529579163, -0.762381911277771, 0.5674194693565369, ...
def torch _ dynamic _ rnn ( rnn _ cell, input _ data, initial _ state, sequence _ lengths ) : # [ batch, time, features ] - > [ time, batch, features ] input _ data = input _ data. permute ( 1, 0, 2 ) # dimensions state = initial _ state if sequence _ lengths is none : shape = input _ data. shape ( ) max _ seq _ len = ...
[ 0.4067904055118561, -0.14127323031425476, 0.40155693888664246, 0.9494950175285339, 0.04423999786376953, -1.0525590181350708, 0.26306629180908203, -0.018234072253108025, -0.5347750186920166, 0.2111031860113144, -0.26190873980522156, 0.13209272921085358, 0.37546542286872864, -0.6108229756355...
def supported _ features ( self ) - > int : if self. _ me [ " product " ]! = " premium " : return 0 return support _ spotify
[ -0.4157584607601166, 0.4981434643268585, 0.3727557957172394, 1.0836323499679565, 0.33959507942199707, 1.0934597253799438, 0.010713412426412106, 0.8228529095649719, 0.8015749454498291, -0.3709007203578949, -1.2174115180969238, 0.01327724102884531, -1.052720308303833, -0.5919639468193054, ...
def while _ i ( ) : i = 0 while i < 4 : j = 0 while j < 4 : if i = = 0 or i = = 3 or j = = 3 : print ( " * ", end = " " ) else : print ( " ", end = " " ) j + = 1 i + = 1 print ( )
[ 0.0834088996052742, 0.3257630169391632, 0.6154093146324158, 0.7690325379371643, -0.5041435956954956, 0.8169673681259155, 0.6297272443771362, -0.23638468980789185, -0.36649012565612793, 0.27717161178588867, -0.22215496003627777, 0.2506958544254303, -1.305971384048462, -0.5727668404579163, ...
def setup ( self ) : self. restuarant = restaurant ( " asian ", true, " noodle shop ", 200 )
[ -0.10867609083652496, -0.21994389593601227, 0.1650010645389557, -0.07075505703687668, 0.2873517572879791, -0.11903100460767746, -0.040165018290281296, 0.9605892896652222, 0.12860555946826935, 0.29691264033317566, -0.6609877347946167, 0.44143369793891907, -0.6092516183853149, -0.51133543252...
def postprocess _ input ( sentence ) : return postprocess ( sentence )
[ 0.290255606174469, -1.4316697120666504, 0.35192254185676575, -0.7081748843193054, -1.4122642278671265, -0.759579062461853, -0.40351876616477966, 0.029875874519348145, 0.21100521087646484, -0.3244239091873169, -1.0509902238845825, -0.9237566590309143, -0.7734761238098145, 0.1352347135543823...
def flush ( self, timestamp, interval ) : raise notimplementederror ( )
[ -0.5635063648223877, 0.2681325674057007, 0.34384363889694214, 0.3233863115310669, 0.06359470635652542, 1.291619896888733, -0.22797684371471405, -0.8627479076385498, -0.05100858211517334, -0.04313211515545845, -0.15298864245414734, 0.67094486951828, 0.2770003080368042, 0.06678701192140579, ...
def _ aperture _ convolve _ img ( orig _ img, aperture _ radius, apkwargs = {'method':'subpixel ','subpixels': 4 } ) : phot _ img = np. zeros ( orig _ img. shape ) nanpix = np. where ( np. isnan ( orig _ img ) ) notnanpix = np. where ( ~ np. isnan ( orig _ img ) ) orig _ shape = orig _ img. shape img = orig _ img. copy...
[ -0.41611170768737793, -0.14561989903450012, 0.9340033531188965, -0.2070772796869278, -1.3163896799087524, -0.33568161725997925, 0.36622634530067444, 0.9019179940223694, 0.48285967111587524, 0.9621353149414062, 0.5808814167976379, 0.8395770788192749, 0.6686972379684448, 0.25270184874534607,...
def find ( self, data ) : # first check that the tree is not empty. if self. root is none : raise valueerror ( str ( data ) + " is not in the tree. " ) # define a recursive function to traverse the tree. def _ step ( current, target ) : " " " recursively approach the target node. " " " if current is none : # base case ...
[ -0.007343815639615059, -0.04010544717311859, 0.7574213743209839, -0.11210370808839798, -0.037442196160554886, 0.027476515620946884, -0.3870388865470886, -0.747395932674408, 0.05437666177749634, -0.43400415778160095, 1.0071195363998413, 0.45617884397506714, -1.205356478691101, 1.19642031192...
def setprefresolution ( res ) : if haspaid ( ) : res2enum = { 360 :'12 ', 480 :'20 ', 720 :'21 ', 1080 :'23'} response = jsonrequest ( {'req': " rpcapiuser _ updatedefaultvideoquality ",'value': res2enum [ res ] } ) if response. get ('result _ code') = = 1 : return true else : return false return false
[ -1.0874675512313843, 0.2589488923549652, 0.5815184116363525, 0.7881505489349365, 0.46494749188423157, -0.48097363114356995, -0.5998933911323547, -0.5838802456855774, 0.7006425857543945, 0.2112075686454773, -1.4580200910568237, -0.106419637799263, -1.4693388938903809, 0.6661979556083679, ...
def _ check _ column ( self ) : total = sum ( [ self. _ letter _ dict [ self. _ game _ state. board [ row ] [ self. _ col ] ] for row in range ( 3 ) ] ) if abs ( total ) = = 3 : winning _ letter = self. _ game _ state. board [ self. _ row ] [ self. _ col ] self. _ game _ outcome = winning _ letter return true return fa...
[ -0.49138736724853516, 0.2579422891139984, 0.9786482453346252, -0.10216262936592102, -0.07598163932561874, 0.5487372875213623, 0.09552276134490967, -0.2964308559894562, -0.7083811163902283, 0.9767546653747559, -1.0034990310668945, -0.20419426262378693, 0.23002822697162628, -1.27086794376373...
def senddevartreport ( request ) : valid, response = initrequest ( request ) if not valid : return response issent = false template ='templated _ email / artdevreport. html'try : email _ subject _ prefix = settings. email _ subject _ prefix except : _ logger. warning ('no email _ subject _ prefix set in settings, keepi...
[ -0.6605252623558044, 0.8250778913497925, 0.8085569739341736, -0.32788464426994324, 0.20987394452095032, -0.1286061555147171, 0.3123633861541748, -0.4919263422489166, -0.06437165290117264, 0.2956707775592804, -0.37100017070770264, 0.7146878242492676, -0.7972149848937988, 0.26004758477211, ...
def _ movebolts ( self ) : for b in self. _ bolts : if b. y > game _ height or b. y + bolt _ height < 0 : self. _ bolts. remove ( b ) else : b. y = b. y + b. getvelocity ( )
[ -0.41702941060066223, 0.06233789771795273, 0.7393510937690735, 0.14488422870635986, 0.010726296342909336, 0.13207869231700897, -0.23305490612983704, -0.9235764741897583, -0.918516993522644, 0.5857121348381042, -0.352600634098053, 0.08989603817462921, -0.9259448647499084, 0.1837792098522186...
def query ( self, * args, * * kwargs ) : from sqlalchemy. exc import operationalerror from.. dbexceptions import queryerror if isinstance ( args [ 0 ], basestring ) : fd = { x : x for x in self. _ attachments } args = ( args [ 0 ]. format ( * * fd ), ) + args [ 1 : ] try : return self. connection. execute ( * args, * *...
[ -0.419111967086792, -0.23595406115055084, 0.6362553834915161, -0.02336711250245571, 0.1777929961681366, 0.22618509829044342, -0.40006229281425476, -0.4556713104248047, -0.2591170370578766, -0.707363486289978, 0.911017119884491, -0.1337522566318512, -0.8632186651229858, -0.1323675811290741,...
def license _ resource ( self ) - > pulumi. output [ optional ['outputs. regioncommitmentlicenseresource'] ] : return pulumi. get ( self, " license _ resource " )
[ 1.8758726119995117, -0.7000396847724915, 0.26416918635368347, -0.30660513043403625, -0.08117224276065826, 0.5641040205955505, 0.46577632427215576, 1.0954575538635254, 1.4568290710449219, 0.08911678194999695, 1.135058879852295, 0.4561573565006256, -0.15186132490634918, -0.3413236141204834, ...
def image _ ratio _ check ( index, image _ ratio = [ 0. 462, 6. 868 ], bbox _ ratio = [ 0. 117, 15. 5 ] ) : filename = os. path. join ( image _ root,'annotations ','det ','train ', index + '. xml') tree = et. parse ( filename ) size = tree. find ('size') width = float ( size. find ('width'). text ) height = float ( siz...
[ -0.3439478576183319, -0.4741131067276001, 0.8807610273361206, -0.5109381079673767, -0.47344911098480225, 0.13452710211277008, 0.378791481256485, -0.2344646155834198, -0.060701820999383926, 0.2474304586648941, 0.7906737923622131, -0.6860553026199341, -0.016436636447906494, 0.165316149592399...
def model _ summary ( learn, data, find _ all = false, print _ mod = false ) : model = learn. model xb, yb = get _ batch ( data. valid _ dl, learn ) mods = find _ modules ( model, is _ lin _ layer ) if find _ all else model. children ( ) f = lambda hook, mod, inp, out : print ( f " = = = = \ n { mod } \ n " if print _ ...
[ -0.1992286741733551, -0.4987086057662964, 0.6666132211685181, 0.30487579107284546, 0.14928101003170013, 0.12191685289144516, 0.03731913864612579, -0.24992063641548157, 0.32412564754486084, 0.37000882625579834, 0.10207389295101166, 0.7519598007202148, 0.4912763833999634, 0.5248942375183105,...
def uc _ wrapper ( self, obj, * args, * * kwargs ) : # keys are of the form : < function > : < uri > # e. g, get _ albums _ from _ artist # spotify : album : kjasg98qw35hg0 logger. info ( " searching for % s ( % s, % s, % s ) ", func. _ _ name _ _, obj, args, kwargs ) key = func. _ _ name _ _ + " # " + str ( obj ['uri'...
[ -1.3530843257904053, 0.5723330974578857, 0.7024476528167725, 0.14735595881938934, -0.131061851978302, -0.13126282393932343, -0.018295668065547943, -0.5271851420402527, 0.600835919380188, 0.06904985010623932, 0.19559860229492188, 0.47011226415634155, 0.4417399764060974, -0.596156120300293, ...
def _ compare _ plot ( matched _ pairs _ 1 : fingerprintlist, matched _ pairs _ 2 : fingerprintlist ) : x _ pos1 = [ ] y _ pos1 = [ ] for mfp, qfp in matched _ pairs _ 1 : x _ pos1. append ( mfp. pos1 ) y _ pos1. append ( qfp. pos1 ) f, arg = plt. subplots ( 2, 2 ) arg [ 0, 0 ]. scatter ( x _ pos1, y _ pos1, marker = "...
[ 0.31908002495765686, 0.35659024119377136, 1.086472749710083, -0.48613467812538147, -0.8432093262672424, 0.7679594159126282, 0.9138266444206238, 0.4597682058811188, -0.9149578809738159, -0.22043068706989288, -0.03424244374036789, 0.36247745156288147, -0.08262824267148972, 0.3059423565864563...
def _ monthly ( self, pattern _ dict ) : _ repeat _ months = 1 _ on _ day = 10 if self. _ pattern ['freq _ type'] = = 16 : _ repeat _ months = self. _ pattern ['freq _ recurrence _ factor'] _ on _ day = self. _ pattern ['freq _ interval'] _ freq _ recurrence _ factor = pattern _ dict. get ('repeat _ months ', _ repeat ...
[ -0.5071045160293579, 0.3373641073703766, 0.8233876824378967, -0.6280348896980286, -0.19443602859973907, -0.2126237004995346, 0.6356169581413269, 0.10311230272054672, 0.30542126297950745, -0.20487578213214874, 0.274095356464386, 0.5065093040466309, 0.4746142327785492, 0.4101469814777374, ...
def test _ atomic _ any _ uri _ max _ length _ 3 _ nistxml _ sv _ iv _ atomic _ any _ uri _ max _ length _ 4 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - maxlength - 4. xsd ", instance = " nistdata...
[ 0.13419365882873535, -0.28974974155426025, 0.32692450284957886, 0.7978517413139343, -0.6253871321678162, -0.1815461963415146, -0.6267720460891724, -0.0077337902039289474, -0.1026199534535408, -0.12192998826503754, -0.1385454684495926, -0.4789811372756958, -0.21608132123947144, 0.0516989342...
def main ( ) : start _ date, end _ date = min _ max _ timestamp ( ) n _ date = ( end _ date - start _ date ). days + 1 date _ fmt = " % y - % m - % d " session = session ( aws _ access _ key _ id = os. environ [ " aws _ access _ key " ], aws _ secret _ access _ key = os. environ [ " aws _ secret _ access _ key " ], reg...
[ -0.9398707151412964, 0.06619181483983994, 1.0916292667388916, 0.5859496593475342, -0.21905995905399323, 0.40849825739860535, 0.1810799390077591, -0.27390533685684204, -0.6038146615028381, 0.7084304094314575, -0.874051034450531, 1.0961116552352905, 0.1380269080400467, 0.05147259682416916, ...
def update ( self, y = none, generic _ strategy = false ) : self. y = y if y is not none else self. y # find ( new ) set of non - dominated points changed = self. _ update _ front ( ) # recompute cell bounds if required # note : if the pareto set is based on model predictions it will almost always change in between opt...
[ -0.5670796036720276, -0.2314172387123108, 0.44315892457962036, 1.0069489479064941, -0.11177007853984833, 0.10641263425350189, 0.1850309520959854, -0.8328053951263428, -0.37515100836753845, -0.021452846005558968, 0.46160244941711426, 0.4929429292678833, 0.7296878695487976, 0.965537071228027...
def speakwordundermouse ( self, acc ) : return acc and acc. getstate ( ). contains ( pyatspi. state _ editable )
[ 0.7492271065711975, -0.38631680607795715, 0.41990604996681213, 0.7583872675895691, -1.436517357826233, 0.35947510600090027, 0.13772182166576385, -0.6122831702232361, 0.100435271859169, 0.5189614295959473, 0.3319009840488434, 0.7851820588111877, -0.062324076890945435, 0.5423329472541809, ...
def get _ queryset ( self ) : user = self. request. user return chatmessage. objects. filter ( q ( sender = user ) | q ( receiver = user ) )
[ -0.134034663438797, -0.27243295311927795, 0.564652681350708, 0.09493616968393326, 0.047365207225084305, 0.5755951404571533, -0.46902549266815186, -0.49952051043510437, -0.48807626962661743, -0.8100814819335938, 0.17847919464111328, 0.4090135097503662, 0.21117810904979706, 0.577988028526306...
def get ( self ) : self. log. debug ('starting the ` ` get ` ` method') self. _ find _ image _ link _ in _ flicker _ html ( ) self. log. debug ('completed the ` ` get ` ` method') return none
[ -0.682325541973114, -0.03826383128762245, 0.28810542821884155, 0.47933411598205566, 0.6992905735969543, -1.1276007890701294, 0.24707148969173431, -0.42725902795791626, -0.46231353282928467, -0.9747389554977417, 0.24606378376483917, 0.98349529504776, -0.4385087192058563, 0.7942288517951965,...
def get ( self, request, context ) : context. set _ code ( grpc. statuscode. unimplemented ) context. set _ details ('method not implemented!') raise notimplementederror ('method not implemented!')
[ -1.2609745264053345, 0.2823307514190674, 0.6169535517692566, 0.2295660376548767, 0.6711642146110535, 0.28176149725914, 0.1169099286198616, -0.5451061725616455, 0.06521647423505783, -0.32081833481788635, 0.3550286591053009, 1.4098585844039917, -0.7847945094108582, 0.0036124596372246742, -...
def traffic _ topic _ model ( dataframe, topic _ num : int ) : if'retweeters _ text'not in dataframe : dataframe _ renamed = dataframe. rename ( columns = {'retweete _ 1':'retweeters _ text'} ) else : dataframe _ renamed = dataframe. copy ( ) text _ list = list ( dataframe _ renamed ['text'] ) retweet _ list = list ( d...
[ -0.44457489252090454, -0.15813979506492615, 0.7481408715248108, -0.5204520225524902, 0.4371982514858246, 0.20704302191734314, 0.38295823335647583, 0.0572190061211586, -0.0036178326699882746, 0.8082858324050903, -0.2327556312084198, -0.0001790778333088383, -0.3022928833961487, -0.2902242541...
def get _ summary _ and _ synopsis ( cursor, hpage _ html, movie _ title ) : print ('summary...') # 1. fetch plot summary page # a typical summary url is extracted from : # < a href = " / title / tt0418279 / plotsummary? ref _ = tt _ stry _ pl " > plot summary < / a > result = etree. html ( hpage _ html ). xpath ('/ / ...
[ -0.34379926323890686, 0.6530101299285889, 0.7761400938034058, 0.8142666816711426, 0.5847371220588684, -0.388900488615036, 0.564578115940094, 0.789551854133606, 0.15080922842025757, 0.959285318851471, -0.6582173705101013, -0.5247471332550049, 0.1347484439611435, 0.16679488122463226, 0.882...
def _ convert _ categorical _ columns ( self, data : pandas. dataframe, categorical _ indicator : typing. list [ bool ] ) - > pandas. dataframe : for column _ index, is _ categorical in enumerate ( categorical _ indicator ) : if not is _ categorical : continue column _ name = data. columns [ column _ index ] data [ col...
[ -0.6424169540405273, -0.15889529883861542, 0.29439064860343933, -0.030200090259313583, 0.12520544230937958, 0.2300487607717514, -1.0447899103164673, 0.4795111417770386, -1.4008060693740845, 1.3234117031097412, -0.2802139222621918, 0.7762515544891357, 0.40118104219436646, -0.402952015399932...
def add _ callback ( self, callback _ fn : callable [ [ any ], none ] ) - > none : self. _ callbacks. append ( callback _ fn )
[ 0.22059085965156555, 0.14534901082515717, 0.24741040170192719, 0.7532147169113159, 1.0143826007843018, 0.06348353624343872, -0.056328658014535904, 0.8710154294967651, 0.572255551815033, -1.4307996034622192, -0.42842236161231995, 0.18771517276763916, 0.21220271289348602, 0.27778828144073486...
def read _ and _ call ( uhandle, method, * * keywds ) : line = safe _ readline ( uhandle ) errmsg = _ fails _ conditions ( * ( line, ), * * keywds ) if errmsg is not none : raise valueerror ( errmsg ) method ( line )
[ -0.09538283199071884, 0.5755283236503601, 0.39884859323501587, 0.6773362159729004, -0.18350103497505188, 0.01675531454384327, -0.6483042240142822, -0.22482845187187195, -0.38494062423706055, -0.4231601357460022, 1.182070016860962, 0.06379368156194687, 0.03295668587088585, -0.24533864855766...
def process _ notes ( self, original _ obj ) : for note _ handle in original _ obj. get _ note _ list ( ) : if note _ handle : note = self. db. get _ note _ from _ handle ( note _ handle ) self. process _ note ( note )
[ 0.22402338683605194, -0.5863874554634094, 0.5339708924293518, 0.36216050386428833, 0.562938928604126, 0.23577649891376495, 0.4558582305908203, 0.14189638197422028, -0.10698822140693665, 0.1879204362630844, -0.3524804711341858, 0.3981640040874481, -0.10763659328222275, 0.48380982875823975, ...
def test _ atomic _ hex _ binary _ enumeration _ 4 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ enumeration _ 5 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - enumeration - 5. xsd ", instance ...
[ -0.6863779425621033, -0.8316954970359802, 0.4319719672203064, 0.6566281914710999, -0.5192514657974243, 0.032418143004179, -0.012475582771003246, -0.5465263724327087, -0.7264837622642517, 0.5986539721488953, -0.9639330506324768, -0.29723167419433594, -0.3667818009853363, 0.8024996519088745,...
def _ _ remove ( self, data _ area, delete, test ) : column _ map = { name : index for index, name, data _ type in self. _ _ columns } for row in tuple ( data _ area ) : value = test ( rowadapter ( data _ area [ row ], column _ map ) ) assert not isinstance ( value, rowadapter ), " test improperly formed! " if bool ( v...
[ -0.29503411054611206, -0.15382620692253113, 0.33215951919555664, -0.04315399378538132, -1.0377132892608643, -0.9881637692451477, 0.48159709572792053, 0.813390851020813, 0.6284583210945129, 0.39604777097702026, 0.6800057291984558, -0.14698933064937592, -0.30888110399246216, 0.41783788800239...
def root ( f, a, b, eps = 1e - 13 ) : assert f ( a ) * f ( b ) < 0, " oh! f ( a ) et f ( b ) doivent etre de signe oppose. " assert eps > 1e - 14, " oh! faut pas exagerer la precision : ) " xlow = a xup = b while np. abs ( xlow - xup ) > eps : xmiddle = ( xlow + xup ) / 2 if f ( xlow ) * f ( xmiddle ) > 0 : xlow = xmid...
[ 0.6742157936096191, 0.27706146240234375, 0.6643159985542297, 0.20916877686977386, -0.1429627239704132, 0.09110064059495926, -0.39975881576538086, 0.12638872861862183, -0.09037119150161743, 0.18044792115688324, 0.8973414301872253, 0.1422869861125946, -0.380746066570282, -0.5320087671279907,...
def _ updateworlddict ( self, world _ dict ) : logging. debug ( " updating world. " ) payload = self. _ getrequestjson ( ) for key in payload : value = payload [ key ] logging. debug ( " updating attribute'% s'to'% s'" % ( key, value ) ) if value is none : logging. debug ( " deleting attribute'% s'" % key ) del world _...
[ -1.1217341423034668, -0.9338119029998779, 0.752079963684082, -1.1093981266021729, -0.9547707438468933, 0.35596659779548645, -0.35966089367866516, -0.23602032661437988, 0.27636784315109253, 1.171994924545288, 0.059021372348070145, -0.15543659031391144, -0.11404155194759369, 0.89623862504959...
def name ( self ) : return self. _ name
[ -0.5138100981712341, -1.1646956205368042, 0.21370011568069458, -0.46015816926956177, -0.8609189391136169, 0.9157972931861877, 0.21445101499557495, -0.455634206533432, 0.15261998772621155, 0.13091617822647095, -0.522395670413971, 0.2680298686027527, 0.42176124453544617, -0.44303271174430847...
def repartition ( tab _ couches, test _ size ) : base _ test, base _ train = [ ], [ ] nbr _ elem _ couche = [ len ( tab _ couches [ i ] ) for i in range ( len ( tab _ couches ) ) ] nbr _ elem = sum ( nbr _ elem _ couche ) nbr _ elem _ test = test _ size * nbr _ elem arg _ min _ max = np. argsort ( nbr _ elem _ couche )...
[ -0.08526129275560379, -0.43098893761634827, 0.6879194378852844, -0.21340346336364746, 0.3842850625514984, 0.014487382024526596, 0.6883159875869751, 0.026306048035621643, -0.07801062613725662, -0.1379818469285965, 0.21558141708374023, -0.0474662259221077, -0.6765647530555725, -0.10695882141...
def dumps ( o ) : return json. dumps ( _ pretty _ floats ( o ), cls = _ customencoder )
[ -0.4003641903400421, -0.01052926667034626, 0.5054665803909302, -0.3091495931148529, -1.4606374502182007, -0.6782797574996948, 0.1834946572780609, -1.3257086277008057, 0.20793169736862183, -0.18065187335014343, -1.3737421035766602, 0.5107160806655884, 1.0176076889038086, 0.6599732041358948,...
def apply _ topology ( self, topology ) : for switch in self : outgoing = self [ switch ] output = flow _ space ( [ ] ) for pkt, rule in outgoing : port = pkt. in _ port ( target _ switch, target _ port ) = topology. node [ switch ] ['port'] [ port ] if not ( target _ switch in topology. node and topology. node [ targe...
[ -0.5436292290687561, -0.08284017443656921, 0.5304208397865295, 0.1424538493156433, 0.3227117657661438, 0.3278229832649231, 0.5230638384819031, 0.294670969247818, 0.6427502036094666, -0.3096219003200531, 0.25598466396331787, -0.4587947726249695, 0.3478701710700989, 0.18656906485557556, -0...
def scheme ( cls ) : raise notimplementederror
[ -0.2985653579235077, -0.5320459604263306, 0.5662634372711182, 0.2658187448978424, 0.4609648287296295, 0.8876256346702576, 0.004660570528358221, -0.25526857376098633, 0.3698807954788208, -0.39668771624565125, 0.01476132869720459, 0.4295230805873871, 1.1108438968658447, 0.6252806186676025, ...
def prepare _ cohorts _ for _ metadata _ export ( paths _ to _ batches _ info, google _ bucket _ id, blacklist, tsca _ id, namespace, workspace ) : # retrieve list of samples with corresponding cohort from bsp. broadinstitute. org samples _ with _ cohort = pd. read _ excel ('cohort _ files / bsp _ latest _ all _ sample...
[ 0.2453637719154358, -0.45667269825935364, 0.623508870601654, -0.2786758244037628, 0.07751820236444473, -0.5059256553649902, -0.04914164915680885, -0.040856290608644485, -0.05183852091431618, 0.7717004418373108, 0.24190831184387207, 0.7776427268981934, 0.8977105617523193, 0.3694748878479004...
def test _ atomic _ id _ pattern _ 2 _ nistxml _ sv _ iv _ atomic _ id _ pattern _ 3 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - pattern - 3. xsd ", instance = " nistdata / atomic / id / schema + instance...
[ 0.32587364315986633, -0.2726966440677643, 0.49710288643836975, 0.38807204365730286, -0.42704951763153076, 0.5283349752426147, 0.23830381035804749, -0.17688682675361633, 0.17930880188941956, 1.18459153175354, -0.5764333009719849, 0.3674844801425934, 0.16948622465133667, -0.3664085268974304,...
def category ( self ) : return self. family. category
[ 0.04926009848713875, -0.2748008668422699, 0.21891136467456818, 0.3500480353832245, 0.01729099452495575, 0.572195827960968, 0.36847326159477234, -0.3057374656200409, 0.18477855622768402, -2.0935189723968506, 1.4177123308181763, 0.2882671058177948, 0.6819028854370117, 0.5489632487297058, -...
def test _ atomic _ base64 _ binary _ length _ 2 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ length _ 3 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - length - 3. xsd ", instance = "...
[ 0.498038113117218, -0.2178543210029602, 0.41739776730537415, 0.8405362963676453, 0.43631041049957275, 0.1895902156829834, -0.0596366822719574, -0.12422119081020355, 0.054081764072179794, 0.5450007915496826, -0.4314103126525879, -0.05895727127790451, -0.4570319354534149, 0.09500212967395782...
def get _ report _ title ( self, report ) : max _ length = 31 report _ title = report. title [ : max _ length ] i = 2 while report _ title in self. report _ titles : report _ title = f " { report _ title [ : max _ length - 4 ] } ( { i } ) " i + = 1 return report _ title
[ 0.382966011762619, 0.9309284090995789, 0.5615192651748657, -0.1798780858516693, 0.7271277904510498, 0.011559286154806614, -0.6391328573226929, -0.5218684077262878, 0.0703514963388443, 0.0748693123459816, 0.38798823952674866, -0.7105597853660583, -0.9048207998275757, -1.067366123199463, 0...
def multiply ( x, y ) : result = x * y return result
[ -1.3786075115203857, 0.5521210432052612, 0.3870653808116913, 0.0745348185300827, -0.12656724452972412, -0.12906581163406372, -1.35844886302948, -1.8662316799163818, -0.38643205165863037, -0.23202675580978394, -0.46614134311676025, -0.2293689101934433, 0.04475298151373863, -0.69219458103179...
def delete _ sample _ set ( namespace, workspace, sample _ set _ id ) : body = [ { " entitytype " : " sample _ set ", " entityname " : sample _ set _ id } ] res = firecloud _ api. delete _ entities ( namespace, workspace, body ) return res
[ -0.052274495363235474, 0.01647891104221344, 0.14400453865528107, -0.3003805875778198, -0.6331364512443542, -0.36359086632728577, -0.0812579095363617, -0.9501214027404785, 0.91901034116745, -0.4781034290790558, 0.027039578184485435, 0.9809486269950867, -0.8191078305244446, 0.830332815647125...
def lstsqmultipt ( thetahat, thetaa, dthetahat, dthetaa, etap _ lysc, t, factor =. 05 ) : abl = [ linsys ( thetahat [ i, : ], thetaa [ i ], dthetahat [ i, : ], dthetaa [ i ], etap _ lysc ) for i in range ( thetahat. shape [ 0 ] ) ] return ( ss. vstack ( [ tu [ 0 ] * np. exp ( ti * factor ) for tu, ti in zip ( abl, t ) ...
[ -0.29621824622154236, -0.604051411151886, 0.6247698664665222, -1.0851633548736572, -0.05123385041952133, -0.4909176528453827, -0.7165217995643616, -0.21424409747123718, 0.21131297945976257, 0.6726465821266174, -0.510409951210022, -0.2153347283601761, 0.8828094005584717, 0.5625079870223999,...
def mockgrid ( ) : with namedtemporaryfile ( suffix = '. grid') as tf : create _ grid ( tf. name ) yield tf. name
[ 0.3744796812534332, 0.0834713727235794, 0.7142923474311829, -0.2598778307437897, 0.18489910662174225, 0.16626378893852234, 0.38753607869148254, -0.6970244646072388, -0.9480470418930054, 0.33069491386413574, -0.4547538757324219, -0.21913447976112366, 0.13347861170768738, 0.2045021802186966,...
def test _ list _ decimal _ min _ length _ nistxml _ sv _ iv _ list _ decimal _ min _ length _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - minlength - 1. xsd ", instance = " nistdata / list / deci...
[ -0.23276132345199585, -0.061142660677433014, 0.5067723989486694, 0.4432690739631653, -0.15933188796043396, 0.2160143256187439, -0.499733567237854, 0.06577042490243912, 1.6216537952423096, -0.11863035708665848, -0.8421671986579895, -0.41113272309303284, -0.5986223816871643, 0.23141396045684...
def test _ sync _ dirty ( synced _ repo _ and _ workspace ) : data = synced _ repo _ and _ workspace # edit file in workspace ( data [ " workspace " ] / " test " / " output. txt " ). write ( u " changed " ) result = clirunner ( ). invoke ( metarepo. cli. cli, [ " sync " ] ) assert result. exit _ code = = 1
[ -0.00040618193452246487, -0.060457099229097366, 0.4630412757396698, 0.2974701523780823, 0.5243448615074158, 0.4542953670024872, 0.7592744827270508, -0.4213700592517853, -0.34396684169769287, 0.006272207945585251, -0.13297654688358307, 1.3640836477279663, 0.471096009016037, 0.88301944732666...
def _ handle _ openflow _ packetin ( self, event ) : packet = event. parsed if ( packet. effective _ ethertype! = pkt. ethernet. lldp _ type or packet. dst! = pkt. ethernet. ndp _ multicast ) : if not self. _ eat _ early _ packets : return if not event. connection. connect _ time : return enable _ time = time. time ( )...
[ 0.3740157186985016, -0.7936142683029175, 0.9289717078208923, -0.9104734063148499, -0.18776433169841766, 0.5893457531929016, 0.18473473191261292, -0.18337474763393402, 0.7743703722953796, -0.26078930497169495, 0.8193979263305664, -0.1522655338048935, -0.30112314224243164, 0.5649200081825256...
def clean _ str ( string ) : string = re. sub ( r " [ ^ a - za - z0 - 9 ( ),!? \'\ ` ] ", " ", string ) string = re. sub ( r " \'s ", " \'s ", string ) string = re. sub ( r " \'ve ", " \'ve ", string ) string = re. sub ( r " n \'t ", " n \'t ", string ) string = re. sub ( r " \'re ", " \'re ", string ) string = re. sub...
[ 0.8242310881614685, -1.3044049739837646, 1.0701793432235718, -0.6050919890403748, -0.8499029278755188, 0.04370803013443947, 0.22021208703517914, -0.34857961535453796, 0.3682587146759033, 0.4203914701938629, 0.08766751736402512, -0.1363062858581543, -0.6673347353935242, -0.06197372078895569...
def _ build _ register _ mapping ( stages ) : # build lists of registers for each input / output register _ mapping = { none : " none " } reg _ count = 0 register _ inits = { } register _ types = { } buffers = { } take _ loads = [ ] last _ write = { } constants = { } has _ argmaxmin = false # flex _ scale : register na...
[ -0.8905783891677856, 0.15165287256240845, 0.695279598236084, 0.10767948627471924, -0.07070628553628922, -0.4941532015800476, 0.5567635297775269, -0.20223025977611542, -0.18894675374031067, -0.1411360800266266, -0.4644434154033661, -0.40501609444618225, 0.5480273962020874, 0.546533465385437...
def test _ atomic _ hex _ binary _ max _ length _ nistxml _ sv _ iv _ atomic _ hex _ binary _ max _ length _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - maxlength - 1. xsd ", instance = " ...
[ 0.26639777421951294, -0.0306636244058609, 0.31156837940216064, 0.9876972436904907, -0.06692556291818619, 0.3709484040737152, -0.4946058690547943, 0.119148850440979, 0.17939412593841553, 0.2521882653236389, -0.3911876976490021, -0.8505126237869263, -0.28234952688217163, 0.4988172650337219, ...
def migration _ window _ end _ time _ in _ utc ( self ) - > optional [ str ] : return pulumi. get ( self, " migration _ window _ end _ time _ in _ utc " )
[ 0.07348169386386871, -0.4202529191970825, 0.6933581829071045, 0.2194870263338089, 0.2748250663280487, 1.6596331596374512, -0.3181249797344208, 0.06687269359827042, -0.08560832589864731, 0.8304697275161743, -0.18469534814357758, 0.7856248021125793, -0.5288332104682922, 0.4147613048553467, ...
def load _ image ( self, image _ id ) : info = self. image _ info [ image _ id ] orig _ img = cv2. imread ( info [ " path " ] ) # resized _ img = cv2. resize ( orig _ img, ( self. w, self. h ) ) return orig _ img
[ -0.3266955614089966, -0.6291296482086182, 0.49836793541908264, -0.44442832469940186, -0.06108156219124794, -0.026210805401206017, -0.4750030040740967, -0.06899693608283997, 0.2387290596961975, 0.008724366314709187, 1.0155954360961914, -0.11574583500623703, -0.3912871479988098, 0.3013847470...
def reddish ( pt ) : return int ( pt [ 2 ] ) - pt [ 1 ] - pt [ 0 ] ;
[ -0.1749226599931717, 0.3107810914516449, 0.2489451915025711, -0.5865035057067871, 0.08688627928495407, -0.1346188634634018, -0.5028566718101501, -0.7476882934570312, 0.3999168276786804, 0.11211449652910233, -0.6306774616241455, 0.6594085693359375, -0.8324677348136902, -0.5197770595550537, ...
def run _ crt ( self, institute = none, path _ to _ crt = none, cms _ file = none, collab _ file = none, user _ settings _ file = none, output _ directory = none, log _ file = none, log _ file _ handle = none ) : if self. config is not none : self. config. set _ last _ run ( institute, datetime. now ( ). timestamp ( ) ...
[ 0.5783581137657166, -0.1422090083360672, 0.5997455716133118, 0.09914962947368622, 0.41717520356178284, 0.31394287943840027, 0.3474389612674713, 0.2145417183637619, -0.6140056252479553, 0.5890656113624573, 0.40648117661476135, 0.4459275007247925, -0.9155259728431702, -0.4759891927242279, ...
def _ alienbelowdefense ( self ) : for i in self. _ aliens : if i is not none : for j in i : if j is not none : if j. y - 1 / 2 * alien _ height < defense _ line : self. _ fail = true
[ 0.9093035459518433, -0.3777439296245575, 0.6743559241294861, 0.46051475405693054, 0.7234719395637512, 0.460348904132843, -0.12590165436267853, -1.9702378511428833, -0.4202232360839844, -0.39631906151771545, -0.13295401632785797, 0.5748471617698669, -0.23225171864032745, 1.1327229738235474,...
def proc _ template ( template, * * kwargs ) : res = template for name, value in kwargs. iteritems ( ) : res = res. replace ( " { " + name + " } ", quote ( str ( value ) ) ) return res
[ 0.15168918669223785, -0.32675817608833313, 0.4445721507072449, -1.3828388452529907, -0.7766047120094299, -0.7237734198570251, -1.0968348979949951, -0.19414976239204407, -0.7961874604225159, 0.5272923707962036, -0.31713175773620605, -0.42483773827552795, -0.2122097611427307, 0.2785150706768...
def test _ atomic _ language _ pattern _ 4 _ nistxml _ sv _ iv _ atomic _ language _ pattern _ 5 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - pattern - 5. xsd ", instance = " nistdata / atomic ...
[ 0.1641949564218521, -0.33649736642837524, 0.3143625557422638, 0.4415864646434784, -0.4629020690917969, -0.004152489826083183, 0.272762268781662, -0.5007131695747375, -0.21338774263858795, 0.7702068090438843, -0.4543958604335785, -0.32188427448272705, -0.7588742971420288, 0.0527278743684291...
def build _ leaderboard _ for _ letters ( self, starting _ letters ) : calculated _ scores = [ ] start _ counter = counter ( starting _ letters ) for word in self. valid _ words : if ( len ( word ) > = self. min _ word _ length and len ( word ) < = len ( starting _ letters ) and not counter ( word ) - start _ counter )...
[ -0.18928977847099304, -0.21721412241458893, 0.349088191986084, 0.08775157481431961, -0.1232573539018631, 0.27470800280570984, 0.022752586752176285, -0.16996343433856964, 0.29364702105522156, 0.39771711826324463, -0.5198590755462646, 0.4967423379421234, -1.5521553754806519, 0.51071041822433...
def is _ blank _ line ( line, allow _ spaces = 0 ) : if not line : return 1 if allow _ spaces : return line. rstrip ( ) = ='' return line [ 0 ] = ='\ n'or line [ 0 ] = ='\ r '
[ -0.0964350551366806, 0.32119065523147583, 0.4386492669582367, 1.1615746021270752, 0.13751080632209778, 0.23730699717998505, -0.559052586555481, -0.0068566082045435905, 0.8353049159049988, 0.042731959372758865, 0.5691589713096619, 0.7205259203910828, -0.17115041613578796, 0.6303984522819519...
def best _ guess ( self, storage _ name ) : self. _ best _ guess = storage _ name
[ -0.3703569173812866, -0.6812365055084229, 0.29050031304359436, 0.9731264710426331, 0.04537355527281761, 0.5375150442123413, 0.306939035654068, 0.46960604190826416, -0.4716246426105499, -0.175612673163414, -0.9818753600120544, -0.5065255761146545, 0.6246991753578186, 0.02981455996632576, ...
def initialize _ weights ( w ) : if hasattr ( w,'weight') and w. weight. dim ( ) > 1 : nn. init. xavier _ uniform _ ( w. weight. data )
[ 0.23145104944705963, 1.3132036924362183, 0.4473259150981903, 0.0007310360670089722, 0.5413638949394226, -0.43017587065696716, 0.06394121795892715, 0.010512534528970718, 0.37737658619880676, 0.017591657117009163, -0.7191757559776306, -0.10327550023794174, 0.07576560229063034, 0.860519230365...
def getfeatureswithgeometry ( self, url, fields, querytext, usecustomheaders = false, additionalparameters = none ) : # get a list of all the features by using the objectids which have no limit, then break into chunks chunks = self. getoidsfromservice ( url, querytext, usecustomheaders = usecustomheaders ) # initialize...
[ -0.2382284700870514, -0.394096702337265, 0.8158595561981201, -0.1615123152732849, -0.22641296684741974, -0.38872894644737244, -0.09704059362411499, -0.5969066023826599, -0.5602381229400635, 0.4335731565952301, -0.16930562257766724, 0.719524621963501, -0.5709064602851868, 0.1476208567619323...
def test _ example _ input _ one _ required _ field _ name ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. create _ new _ input. select ( " example input one " ) input _ page. entity1. ex...
[ -0.7074577808380127, 0.07506529986858368, 0.633239209651947, 0.06594201177358627, 0.34808024764060974, 1.1511882543563843, 0.16795490682125092, -0.055975232273340225, 0.06377343833446503, 0.7619592547416687, -1.240291953086853, -0.48778852820396423, -0.4026522636413574, 0.14760564267635345...
def profile _ edit ( request, username, edit _ profile _ form = profileditformular, template _ name ='userena / profile _ form. html ', success _ url = none, extra _ context = none, * * kwargs ) : user = get _ object _ or _ 404 ( get _ user _ model ( ), username _ _ iexact = username ) profile = get _ user _ profile ( ...
[ -0.056712452322244644, 0.06688437610864639, 0.6175345182418823, 0.39088699221611023, -0.5220311284065247, 0.10408615320920944, 0.7839431166648865, 0.29362648725509644, -0.21948841214179993, -0.02682795561850071, -0.4452827274799347, -0.006611061282455921, 0.19220545887947083, 0.10529432445...
def transform ( image, matrix, k1 = 0. 22, k2 = 0. 24 ) : return cv2. undistort ( image, matrix, np. array ( [ k1, k2, 0, 0, 0 ] ) )
[ 0.352877140045166, -0.42577576637268066, 0.5009940266609192, 0.7791879177093506, -0.3455125391483307, -0.2656996250152588, -0.8788116574287415, 0.3982776403427124, -0.32836952805519104, 0.6052273511886597, 0.3809066712856293, 0.11455652862787247, -0.13636812567710876, -0.014672169461846352...
def set _ block _ cursor ( self, block _ cursor ) : if block _ cursor : self. _ write _ command ( [ lcdbackpack. block _ cursor _ off ] ) else : self. _ write _ command ( [ lcdbackpack. block _ cursor _ on ] )
[ 0.17551085352897644, -0.25516223907470703, 0.5619983077049255, 1.2463387250900269, 0.032692160457372665, 0.49523356556892395, 0.2930834889411926, 0.4693027436733246, 0.03964133933186531, 0.3728782534599304, -0.6702053546905518, 1.3286664485931396, -1.0164272785186768, 0.7361075282096863, ...
def test _ direct _ set _ exe _ args _ mutation ( ) : args = [ " sleep. py ", " - - time = 5 " ] orig = [ " sleep. py ", " - - time = 5 " ] rs0 = runsettings ( " python " ) rs0. exe _ args = args # both should be the same assert rs0. exe _ args = = args # modify the args list args. append ( " - - foo " ) assert rs0. ex...
[ -0.8156688213348389, -0.42544281482696533, 0.6852394938468933, 0.45680665969848633, 0.7325254678726196, 0.5395394563674927, 0.44068294763565063, -0.5480857491493225, -0.48077088594436646, 0.8406137228012085, -0.9548642635345459, 0.3425670862197876, -0.14658735692501068, 0.5201762318611145,...
def description ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " description " )
[ 1.0720183849334717, -0.09113579243421555, 0.36013609170913696, 0.37186259031295776, 0.317030131816864, 0.45251724123954773, -0.21846939623355865, -0.047291100025177, 0.16608387231826782, 0.2832004427909851, 0.693762481212616, 0.7878496050834656, 0.017777372151613235, -0.8770273923873901, ...
def profile _ change _ form ( ) : # handle form data name = request. form. get ( " name " ) phone _ number = request. form. get ( " phone _ number " ) old _ password = request. form. get ( " old _ password " ) new _ password = request. form. get ( " new _ password " ) email = request. form. get ( " email " ) profile _ ...
[ -0.10518258810043335, 0.28557899594306946, 0.6143186688423157, -0.2724861800670624, -0.05583891272544861, -0.409094899892807, -0.243887796998024, -0.03898121416568756, -0.7340930104255676, 0.5297002792358398, 0.03138235956430435, -0.4091566801071167, 0.4273976683616638, -0.1845345497131347...
def is _ black ( self ) : return self. suit = = suit. clubs or \ self. suit = = suit. spades or \ self. suit = = suit. black
[ -0.469158411026001, -0.493519127368927, 0.6691029071807861, 1.4402668476104736, 0.403740793466568, -0.03181277588009834, 0.21779750287532806, -0.33734360337257385, 0.6260256171226501, 0.5690837502479553, -0.23871351778507233, 1.789503812789917, -0.26710426807403564, 1.2789195775985718, -...
def encodestate ( state ) : elements = [ tuple ( elem ) for elem in state ] return tuple ( elements )
[ -1.8186484575271606, 0.21753741800785065, 0.3912505507469177, -0.01228985283523798, 0.05585308000445366, -0.013905426487326622, -0.6576706171035767, 0.12866151332855225, 0.924884557723999, 0.3459736704826355, -1.606416940689087, -0.5582821369171143, -0.37989571690559387, 0.1854640245437622...
def check _ keyup _ events ( event, ship ) : # movement keys if event. key = = pygame. k _ right : ship. moving _ right = false elif event. key = = pygame. k _ left : ship. moving _ left = false
[ -0.9308210015296936, 0.007718577049672604, 0.9108068346977234, 0.2766156494617462, -0.5260222554206848, 0.4137354791164398, -0.12463639676570892, 0.016052665188908577, 0.3114115297794342, 1.3899047374725342, 0.10782285779714584, -0.15120011568069458, 0.1694602519273758, 0.58414226770401, ...
def add _ funds ( self, amount, transfer _ frequency, start _ date = none, end _ date = none ) : url = lendingclub _ url ('accounts ', self. investor _ id,'funds ','add') request _ data = { " transferfrequency " : transfer _ frequency, " amount " : amount, " startdate " : start _ date, " enddate " : end _ date } respon...
[ -0.5299492478370667, 0.38029226660728455, 0.4790899455547333, 0.20141424238681793, 0.5957024097442627, -0.34717655181884766, -0.4109814167022705, -0.8982240557670593, -0.5126236081123352, -0.9019151329994202, -0.06387755274772644, 0.21571145951747894, -1.2495657205581665, 0.259653151035308...
def collect _ raw _ schedule _ pages ( authorizer, season ) : for month in const. basketball _ months : url = unformatted _ url. format ( season, month ) if has _ raw _ schedule _ page ( authorizer, url ) : continue # do not add again r = requests. get ( url, headers = headers ) add _ raw _ page ( authorizer, url, seas...
[ -0.6424363851547241, -0.18675373494625092, 0.6899843811988831, 0.03206482529640198, 0.08192113786935806, 0.158222958445549, -0.4357580542564392, -0.24109415709972382, 0.9445613622665405, 0.6318216919898987, 0.3191566467285156, 0.21285060048103333, 0.9030776023864746, 0.4453228712081909, ...
def test _ atomic _ language _ max _ length _ 4 _ nistxml _ sv _ iv _ atomic _ language _ max _ length _ 5 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - maxlength - 5. xsd ", instance = " nistda...
[ 0.38466840982437134, -0.13533499836921692, 0.08627497404813766, 0.3375963568687439, -0.6944116950035095, -0.11899492144584656, -0.18889260292053223, -0.446092814207077, -0.023044802248477936, 0.6827278137207031, -0.663634181022644, -0.35263296961784363, -0.47993847727775574, 0.169824898242...
def is _ frunk _ closed ( self ) - > bool : response = self. _ vehicle _ data. get ( " vehicle _ state ", { } ). get ( " ft " ) return response = = 0
[ -1.1703052520751953, -0.35638776421546936, 0.5218586921691895, 0.08375523239374161, 0.01721838489174843, -0.5441043376922607, -0.4879361391067505, -0.5820698738098145, -0.2739081382751465, -0.5719877481460571, 0.2857593894004822, -0.37788593769073486, -0.30174678564071655, 0.18613000214099...
def clean _ file ( filename ) : f = open ( filename, " r " ) lines = f. readlines ( ) f. close ( ) unique _ blender = true fix _ fstrings = false if bpy. app. version < = ( 2, 79, 0 ) : fix _ fstrings = true trim _ code = false active _ print0 = none f = open ( filename, " w " ) for line in lines : if unique _ blender ...
[ -0.052326858043670654, -1.19673490524292, 0.934120237827301, 0.9575523734092712, -0.042622607201337814, 0.06185033917427063, 0.9791588187217712, 0.7939257025718689, -0.5208542943000793, 0.42739349603652954, 0.25660157203674316, 0.263688862323761, -0.29257872700691223, 0.6504247784614563, ...
def setclasses ( self, classnames ) : self. cnames = list ( classnames ) self. nclasses = len ( classnames )
[ -1.67930269241333, -0.05877630412578583, -0.025640884414315224, -0.2894110381603241, 0.9165754318237305, 0.392544686794281, 0.13112559914588928, 0.4562714993953705, 0.4535083770751953, -0.4267551004886627, -1.0331144332885742, -0.2655954360961914, 0.0029397341422736645, 0.4230811595916748,...
def execute _ command _ on _ remote ( remote ) : remote. execute _ commands ( ['cd / var / www / & & ls ','tail / var / log / nginx / access. log ','ps aux | grep node ','cd / uploads / & & ls'] )
[ -0.1265546828508377, -0.3631484806537628, 0.6470290422439575, -0.5281654596328735, 0.49255499243736267, 0.013667392544448376, -1.0718978643417358, -0.37589290738105774, -0.3049638569355011, 0.5516544580459595, -0.3541150987148285, 1.0691900253295898, -0.15165278315544128, 0.576923549175262...
def pack ( self, command ) : if command. id is not none : if command. direction! = dir _ out : _ log. warning ( " request to pack input message. % s ", command ) msg = [ sync, command. pack _ size ( ), command. id ] msg _ args = command. pack _ args ( ) if msg _ args is not none : msg. extend ( array. array ( " b ", ms...
[ -0.19379958510398865, 0.9803629517555237, 0.648315966129303, 0.4901665449142456, 0.7287394404411316, -0.10706975311040878, 0.06894336640834808, -0.44993436336517334, 0.7449782490730286, 0.026931220665574074, -0.26269781589508057, 0.23056672513484955, -1.06920325756073, 1.5046018362045288, ...
def generatepairplots ( data, col, columns ) : numvars, numpoints = data. shape fig, ax = plt. subplots ( numvars, numvars, figsize = ( 5, 5 ) ) classes = ['setosa ','versicolour ','virginica'] cdict = { 0 :'red ', 1 :'blue ', 2 :'green'} for i in range ( 0, numvars ) : for j in range ( 0, numvars ) : if i! = j : for i...
[ 0.031474415212869644, 0.8263489007949829, 1.146225929260254, 0.08579228073358536, -0.5843692421913147, 0.5164139270782471, 0.9369221329689026, 0.3831111192703247, 0.14118771255016327, -0.16220368444919586, 0.4325464069843292, 0.8288678526878357, -0.18427243828773499, 0.21692907810211182, ...
async def set _ heated _ steering _ wheel ( self, value : bool ) - > none : data = await self. _ send _ command ( " remote _ steering _ wheel _ heater _ request ", on = value ) if data and data [ " response " ] [ " result " ] is true : params = { " steering _ wheel _ heater " : value } self. _ vehicle _ data [ " climat...
[ -0.24490347504615784, 0.46685782074928284, 0.7192255854606628, -0.027977988123893738, 0.5952135324478149, 0.7326882481575012, -1.1386101245880127, 0.13451074063777924, -1.074426293373108, 0.5070582628250122, -1.1908910274505615, 0.4682917892932892, -0.418876051902771, 1.1670352220535278, ...
def send ( self, topic, value = none, timeout = 60, key = none, partition = none, timestamp _ ms = none ) : future = self. producer. send ( topic, value = value, key = key, partition = partition, timestamp _ ms = timestamp _ ms ) future. get ( timeout = timeout )
[ -0.25994640588760376, 0.5568240284919739, 0.3847775459289551, 1.0190716981887817, -0.5999208688735962, -0.13764481246471405, -1.1857149600982666, -0.10561215132474899, -0.4112257957458496, 0.7258647680282593, 0.30160045623779297, 0.18593132495880127, -0.2060757279396057, -0.347594827413558...
def node _ elif _ new ( node : list, cond, stmt ) - > none : node. append ( [ " node _ elif ", cond, stmt ] )
[ 0.6192845106124878, 0.47498294711112976, 0.27742791175842285, -0.10539554059505463, 0.2702071964740753, 0.14265947043895721, -1.1139696836471558, 1.2176473140716553, -0.9963411688804626, 0.29361334443092346, -0.5175626873970032, 0.4989992678165436, 0.05042610689997673, 0.9600059986114502, ...
def create ( new _ attrs : dict ) - > address : new _ address = address ( ) db. session. add ( new _ address ) db. session. commit ( ) return new _ address
[ -0.9494271874427795, -0.9425255060195923, 0.5808343291282654, -0.10139612853527069, -0.028039244934916496, 0.4081244170665741, -0.3430370092391968, 0.32294103503227234, 0.29617834091186523, 0.3259420096874237, -0.2609112858772278, -0.05359666049480438, -0.7799219489097595, -0.2308346778154...
def get _ args ( ) : parser = argparse. argumentparser ( description ='standard arguments for talking to vcenter') # because - h is reserved for'help'we use - s for service parser. add _ argument ('- s ','- - host ', required = true, action ='store ', help ='vsphere service to connect to') # because we want - p for pas...
[ 0.20971301198005676, -0.5880981683731079, 0.9327406883239746, 0.15134668350219727, 0.03380820155143738, -0.05808023735880852, -0.6202150583267212, 0.46835416555404663, -0.4733392894268036, 0.45981577038764954, 0.016679203137755394, -0.04636474326252937, -0.8734129667282104, 0.6551848053932...
def step ( theta0, s, alpha ) : # compute new parameter vector as sum of old vector and steepest descent step theta1 = theta0 - alpha * s return theta1
[ 0.5718528032302856, -0.24110932648181915, 0.22716529667377472, 0.35555803775787354, -0.060885924845933914, 0.1449422687292099, 0.9261909127235413, 0.6859483122825623, -0.4544307291507721, 0.09671536087989807, -0.4061878025531769, 0.38542062044143677, 0.29315653443336487, 0.5543966889381409...