text
stringlengths
25
2.19k
embedding
listlengths
768
768
def get _ distro ( ) : distro _ name, release, codename = platform _ information ( ) if not codename or not _ get _ distro ( distro _ name ) : error _ msg ='platform is not supported : % s % s % s'% ( distro _ name, release, codename, ) raise unsupportedplatform ( error _ msg ) # todo : make this part of the distro obj...
[ -0.6181913018226624, -0.33793967962265015, 0.3325616121292114, 0.27334558963775635, -0.17104332149028778, 0.44414985179901123, -0.3898250162601471, -0.49115175008773804, -0.993274986743927, -0.3800840675830841, -0.38451075553894043, 0.7255116105079651, -0.07547950744628906, 0.4322161674499...
def gen _ fake _ pitch _ data ( ) : pitch = pitch ( inning = 1, inning _ half ='t ', des ='ball ', result _ type ='b ', gameday _ sv _ id ='140404 _ 191151 ', x = 92. 70, y = 181. 33, start _ speed = 85. 7, end _ speed = 78. 9, sz _ top = 3. 66, sz _ bot = 1. 75, pfx _ x = - 2. 86, pfx _ z = 5. 87, px = 0. 141, pz = 1....
[ -0.02194065786898136, 0.2147868275642395, 0.9579288363456726, -0.7679242491722107, -0.3165617883205414, 0.5204330086708069, 0.5001908540725708, -0.6185472011566162, -0.4265376925468445, 0.06303755193948746, -0.3596494495868683, -0.3555341958999634, -0.5980665683746338, -0.02177704498171806...
def _ update _ pr _ status ( self, owner, repo, sha, state, event _ url, description, context ) : if not self. _ update _ remote : return data = {'state': self. _ status _ str ( state ),'target _ url': event _ url,'description': description,'context': context, } url = " % s / repos / % s / % s / statuses / % s " % ( se...
[ -0.5428013205528259, -0.281619668006897, 0.5053019523620605, -0.6658885478973389, 0.37001895904541016, 0.5934390425682068, -1.7492077350616455, 0.7558026313781738, 0.4895927608013153, 0.9657754898071289, -0.4562893211841583, 0.6978483200073242, -0.47243237495422363, -0.08071009069681168, ...
def parse _ args ( ) : parser = argparse. argumentparser ( ) # hyperparameters sent by the client are passed as command - line arguments to the script. parser. add _ argument ( " - - epochs ", type = int, default = 1 ) parser. add _ argument ( " - - learning _ rate ", type = float, default = 0. 001 ) parser. add _ argu...
[ -0.06542626768350601, -0.27319806814193726, 0.9142096638679504, -0.3799426555633545, 0.016561895608901978, -0.35973459482192993, -0.06592658162117004, -0.08467935025691986, -1.062598705291748, 0.3159885108470917, -0.7063789963722229, 0.48401638865470886, -0.28535935282707214, 0.61362320184...
def routing _ path _ to _ node ( node, shortest _ set = none ) : path = [ ] visited _ nodes = [ ] # check node is connected to start node if check _ node _ connect _ to _ start _ node ( node ) : path = backwards _ search ( node, visited _ nodes, shortest _ set ) # print ( path ) return path
[ -0.6057196259498596, 0.421770840883255, 0.6483096480369568, 0.18051300942897797, 0.9128634929656982, -0.0778425857424736, 0.8537092208862305, -0.36632612347602844, -0.05893050506711006, 0.7979211211204529, 0.6469212770462036, 0.2997557818889618, -0.45165762305259705, -0.4817790687084198, ...
def _ get _ schedule _ id ( self, schedule _ name = none, schedule _ id = none, task _ id = none ) : if not task _ id and not schedule _ name and not schedule _ id : raise sdkexception ('schedules ','102 ','either schedule name or schedule id is needed') if schedule _ name and not isinstance ( schedule _ name, basestri...
[ 0.5847395658493042, 0.13583283126354218, 0.6926631331443787, 0.44261470437049866, -0.5682888627052307, -0.28649190068244934, -0.5363805890083313, -0.04004957154393196, 0.09414969384670258, 0.4750550091266632, 0.8304388523101807, 0.8087267875671387, -0.10018327832221985, 0.29536715149879456...
async def set _ temperature ( self, temp : float ) - > none : data = await self. _ send _ command ( " change _ climate _ temperature _ setting ", driver _ temp = temp, passenger _ temp = temp ) if data and data [ " response " ] [ " result " ] is true : params = { " driver _ temp _ setting " : temp } self. _ vehicle _ d...
[ -1.113040804862976, 0.3732636272907257, 0.23791587352752686, 0.0164810623973608, 0.3296236991882324, -0.24479258060455322, -0.024335233494639397, 0.8145585060119629, -0.9487525224685669, 1.0148742198944092, -0.534247636795044, -0.09839724004268646, -0.7256026268005371, 0.2355549931526184, ...
def l2 _ norm ( scores ) : # todo : if we want to stay in tensorflow - land, we can look into # https : / / www. tensorflow. org / api _ docs / python / tf / norm return np. sum ( np. sqrt ( scores * * 2 ), axis = 2 )
[ -0.32913437485694885, -1.4220787286758423, 0.442781001329422, 0.026364998891949654, -0.2721160650253296, -0.11059508472681046, 0.3274948298931122, -0.43073800206184387, -0.4179064631462097, 0.5481154322624207, -0.3722642660140991, 0.43945685029029846, 0.10475878417491913, -0.50688654184341...
def create _ target _ initialization _ ops ( self, target _ scope, online _ scope ) : return self. create _ target _ update _ ops ( target _ scope, online _ scope, tau = 1. 0, name = " target _ init " )
[ -1.0170902013778687, -1.4265638589859009, 0.3877919912338257, 0.3384151756763458, 1.255816102027893, -0.5164486765861511, 0.08365678042173386, 0.17616918683052063, 0.17136815190315247, 0.9581944346427917, -0.12576517462730408, 0.558264970779419, 0.4978469908237457, -0.44815534353256226, ...
def debt _ to _ pay _ off _ to _ restore _ voluntary _ max _ margin _ to _ assets _ ratio ( self, taxes, years _ remaining ) : if self. margin _ to _ assets ( ) < = ( 1 + epsilon ) * self. personal _ max _ margin _ to _ assets _ ratio ( years _ remaining ) : return 0 else : if self. margin _ to _ assets ( ) = = float (...
[ 0.030983924865722656, -0.38387301564216614, 0.7181230187416077, -1.151415467262268, 0.09632420539855957, 0.35011833906173706, -0.9661492109298706, 0.158605694770813, 0.8516077399253845, -0.3465660810470581, 1.1875324249267578, 0.03012847900390625, -0.20473133027553558, 0.13110634684562683,...
def difference ( self, grad _ num, grad _ an ) : diff = np. sum ( np. abs ( np. subtract ( grad _ an, grad _ num ) ) ) diff / = np. sum ( np. add ( np. abs ( grad _ an ), np. abs ( grad _ num ) ) ) return diff
[ -0.23770618438720703, -0.2646121084690094, 0.7187463045120239, 0.060991328209638596, -0.01906397193670273, 1.011932611465454, 0.7919944524765015, 0.2528766691684723, 0.009695025160908699, -0.1523364782333374, 0.09622476249933243, 0.4958231747150421, 0.05243133381009102, 0.3355129063129425,...
def reduce _ max ( input _ tensor, axis = none, keepdims = false, name = none ) : return reduce _ max _ with _ dims ( input _ tensor, axis, keepdims, name, _ reductiondims ( input _ tensor, axis ) )
[ 0.2697526216506958, 0.4981202185153961, 0.5687940120697021, 1.1132993698120117, -0.7415720820426941, -0.17698021233081818, -0.4499034881591797, 0.21744488179683685, 0.04497522488236427, 0.767423152923584, -0.8260694742202759, 0.407767117023468, 0.5338107943534851, -0.7410240173339844, 1....
def headers ( ) : return { " content - type " : " application / json " }
[ -0.08981607854366302, -1.4238576889038086, 0.742432713508606, -0.532099187374115, -0.8123963475227356, -0.31354930996894836, -1.0459134578704834, -1.1114801168441772, -0.5205235481262207, 0.4651903510093689, -0.7604369521141052, 0.07683998346328735, 0.05355742946267128, -0.549079179763794,...
def _ get _ image ( self, index ) : image = self. images [ index, : ] image = image. reshape ( ( 3, 32, 32 ) ) image = image. transpose ( [ 1, 2, 0 ] ) return image
[ -0.9893098473548889, 1.002994418144226, 0.3948771059513092, -0.901112973690033, 0.6619457602500916, -0.4426468312740326, -0.4024776220321655, -0.4686148166656494, 0.2848871946334839, 0.3816560208797455, 0.35727351903915405, 0.003372614039108157, -0.05232112482190132, -1.2123878002166748, ...
def savetimeline ( t ) : with open ('timeline - data / timeline. data ','wb') as f : pickle. dump ( t, f, 4 )
[ -0.2150072455406189, -0.5234364867210388, 0.26380717754364014, -0.5007442831993103, 0.5996431112289429, 0.7811837792396545, -0.5723845362663269, 0.29684120416641235, -0.5822213888168335, 0.7461937069892883, -2.5885627269744873, -0.6860480308532715, 0.006084784399718046, -0.2829401195049286...
def get _ update _ load _ balancer _ flow ( self ) : update _ lb _ flow = linear _ flow. flow ( constants. update _ loadbalancer _ flow ) update _ lb _ flow. add ( lifecycle _ tasks. loadbalancertoerroronreverttask ( requires = constants. loadbalancer ) ) update _ lb _ flow. add ( a10 _ database _ tasks. getvthunderbyl...
[ 0.7189886569976807, -1.2688801288604736, 0.6921036839485168, 0.5721058249473572, 0.00396323949098587, 1.0332978963851929, 0.14139710366725922, -0.14781659841537476, 0.5329498052597046, 0.42253831028938293, -0.8441252112388611, -0.0561160184442997, -0.41020914912223816, 1.3133925199508667, ...
def _ command _ page ( self, brain, args ) : if not args : print " nooooooooo " return message =''. join ( args ) try : ( person, message ) = message. split ('', 1 ) except valueerror : print " you need to tell me who to page and what to say! " return mail _ server ='smarthost. yahoo. com'recipient ='page -'+ person +'...
[ 0.1892557293176651, 0.17783856391906738, 0.8768904805183411, -0.36186742782592773, 0.9910507798194885, 0.6120132803916931, -0.23203560709953308, 0.5543836951255798, -0.16496779024600983, 0.18898935616016388, 0.6330469846725464, 0.7735964059829712, -1.2037639617919922, 0.6685154438018799, ...
def _ _ iter _ _ ( self ) : for item in self. _ items : yield item
[ -0.6214278936386108, -1.191703200340271, 0.19003385305404663, -0.5724557042121887, 0.754522442817688, 0.8768815398216248, -0.2536516785621643, -0.32231342792510986, -0.9488223791122437, -0.8239184617996216, 0.2450319230556488, -0.13439211249351501, 0.15761058032512665, -0.4432085454463959,...
def playclipatblock ( clip, block, fps = 15, audio = true, audio _ fps = 22050, audio _ buffersize = 3000, audio _ nbytes = 2 ) : audio = audio and ( clip. audio is not none ) if audio : # the sound will be played in parrallel. we are not # parralellizing it on different cpus because it seems that # pygame and opencv a...
[ 0.06382396072149277, -0.1262718141078949, 1.2198718786239624, 0.5861683487892151, -0.8210559487342834, -0.33481842279434204, -0.5508226752281189, -0.6256710290908813, 0.5013809204101562, 0.9142064452171326, -0.03379165008664131, 0.5551484823226929, 0.19787754118442535, 0.5902294516563416, ...
def node _ model _ new ( node : list, model, datatest ) - > none : node. append ( [ " node _ model ", model, datatest ] )
[ -0.6257723569869995, 0.820014476776123, 0.18329012393951416, -0.16630235314369202, 0.8625524640083313, 0.4790675640106201, -1.0144188404083252, 0.4523942470550537, -0.47263678908348083, 0.029369940981268883, -1.2699201107025146, 0.4715312123298645, 0.9323019981384277, 0.9170656800270081, ...
def test _ atomic _ boolean _ white _ space _ 2 _ nistxml _ sv _ iv _ atomic _ boolean _ white _ space _ 3 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - whitespace - 3. xsd ", instance = " nistdat...
[ -0.3518257737159729, -0.13432669639587402, 0.4864962697029114, 0.403960257768631, -0.22768589854240417, 0.42984768748283386, -0.2992119789123535, -0.43075188994407654, 0.14369679987430573, 1.1270084381103516, -0.1237804964184761, 0.5920459628105164, 0.0728893056511879, 0.23405884206295013,...
def get ( self ) : return self. sections
[ -0.44903564453125, -1.0529497861862183, 0.328410804271698, -0.26911723613739014, 0.15752768516540527, 0.29191455245018005, -0.3275889754295349, -0.990069568157196, -0.03402814269065857, -1.4551384449005127, 0.8651005029678345, -0.46366333961486816, -0.20004792511463165, 0.33833858370780945...
def selectvalues ( self, stream _ id, channel _ id ) : return self. cursor. execute ( ( " select * from ( select count ( temp1 ) as ocurance, temp1, " " count ( distinct temp2 ) as distinct _ user from ( select text as temp1, user " " as temp2 from chat _ log where channel _ id = { } and stream _ id = { } ) group " " b...
[ 0.6449759602546692, -0.3324042856693268, 0.4639647901058197, -0.7074494361877441, 0.6414221525192261, -0.504637598991394, -0.12532781064510345, 0.010817650705575943, -0.7098500728607178, 0.052502624690532684, 0.3711809515953064, 1.1366469860076904, 0.09678763151168823, 0.3300286829471588, ...
def get _ common _ assets ( exchanges ) : symbols = [ ] for exchange _ name in exchanges : s = [ asset. symbol for asset in exchanges [ exchange _ name ]. get _ assets ( ) ] symbols. append ( s ) inter _ symbols = set. intersection ( * map ( set, symbols ) ) assets = [ ] for symbol in inter _ symbols : for exchange _ n...
[ 0.004382354207336903, -0.08333612978458405, 0.8589916229248047, -0.41045844554901123, 0.27264222502708435, 0.40999290347099304, 1.012007474899292, -0.613044023513794, 0.3833440840244293, 0.783352792263031, 0.4225488603115082, 0.0045490022748708725, -0.5084563493728638, 0.13054955005645752,...
def build ( self ) : super ( reactionblockdatabase, self ). build ( ) # object references to the corresponding state blocks and parameters add _ object _ reference ( self, " _ params ", self. config. parameters ) add _ object _ reference ( self, " solid _ state _ ref ", self. config. solid _ state _ block [ self. index...
[ -0.0864492803812027, -0.47265419363975525, 0.5616761445999146, 0.1378006488084793, 1.058529257774353, 0.31914737820625305, 0.3988190293312073, -0.15891842544078827, -0.45890113711357117, -0.2096395343542099, -0.31193849444389343, 0.014624123461544514, -0.5577406287193298, 0.618913531303405...
def prompt ( question, default = none, lowercase = false, _ raw _ input = none ) : input _ prompt = _ raw _ input or raw _ input prefix ='% s - - > % s'% ( color _ seq % ( 30 + colors ['debug'] ), reset _ seq ) if default : prompt _ format ='{ prefix } { question } [ { default } ] '. format ( prefix = prefix, question ...
[ -0.22360067069530487, -0.4793020188808441, 0.6350623369216919, -0.23292827606201172, -0.016287198290228844, 0.08705759048461914, -0.4288729131221771, -1.0709481239318848, 0.9263355731964111, -0.10223079472780228, 0.4496244192123413, 0.1949739307165146, -0.660020649433136, -0.69699406623840...
def test _ atomic _ boolean _ white _ space _ 3 _ nistxml _ sv _ iv _ atomic _ boolean _ white _ space _ 4 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - whitespace - 4. xsd ", instance = " nistdat...
[ -0.4165527820587158, 0.35951682925224304, 0.4759250283241272, 0.2524777948856354, -0.019579175859689713, 0.3275063633918762, 0.037667661905288696, -0.5623346567153931, 0.4199013411998749, 0.7502122521400452, -0.027766428887844086, -0.16966450214385986, -0.36005011200904846, 0.1063721776008...
def test _ directed _ edge _ has _ attr ( self ) : v0 = directedvertex ( val ='v0') v1 = directedvertex ( val ='v1') e01 = directededge ( ( v0, v1 ), attrs = {'weight': 5, 0 : 1 } ) self. asserttrue ( e01. has _ attr ('weight') ) self. assertfalse ( e01. has _ attr ('length') ) e01. del _ attr ('weight') self. assertfa...
[ 0.1553698182106018, -0.26611316204071045, 0.44898509979248047, -0.5719236135482788, -0.3774126470088959, 0.9096181392669678, 0.2482658475637436, 0.6225214004516602, -0.26211023330688477, 0.14777468144893646, -0.29403796792030334, -0.4007954001426697, 0.3821754455566406, 0.7243792414665222,...
def mean ( l ) : total = 0 # sum all of the terms and divide for i in l : total = total + i return total / len ( l )
[ -0.6205076575279236, 0.19007275998592377, 0.5161450505256653, -0.8741945624351501, 0.23908531665802002, 0.13972899317741394, 0.022026777267456055, 0.5887588858604431, 0.8434711694717407, 1.0186681747436523, -0.7667250037193298, -0.8907486796379089, -0.9407362937927246, 0.45511266589164734,...
def test _ sys _ intern ( self ) : from sys import intern if utils. py3 : self. assertequal ( intern ('hello'),'hello') else : # intern ( ) requires byte - strings on py2 : self. assertequal ( intern ( b'hello'), b'hello')
[ -0.10084094852209091, 0.33286795020103455, 0.4873523414134979, 0.45614197850227356, 0.10499679297208786, 0.9667250514030457, -0.05237433314323425, 0.12279582768678665, 0.406747967004776, -1.1717638969421387, -0.8454849123954773, 0.2773343026638031, -0.8789183497428894, 0.011075121350586414...
def output _ dirname ( self ) - > str : pass
[ -0.7547644376754761, -1.0861109495162964, 0.5989012122154236, 0.6199964880943298, -0.7675817608833313, 0.4056987762451172, 1.0313888788223267, 0.492960661649704, -0.21400122344493866, -0.8385356068611145, 0.463111937046051, 0.4247291386127472, 0.292540967464447, -0.6290941834449768, -0.8...
def htmlparameterstable ( parameters ) - > str : rows ='' for h, v in parameters. items ( ) : if h in excludedheaders : continue if h = ='x - m2m - rsc': v = annotaterschtml ( v ) rows + = f " " " < tr > < td style = " text - align : left ; white - space : nowrap ; " > { annotateheaderfieldhtml ( h ) } < / td > < td st...
[ 0.16029077768325806, 0.3756866753101349, 0.9526461362838745, -0.6546955704689026, -0.7356585264205933, 0.15427760779857635, -0.1367892026901245, -0.4564676284790039, -0.6067790389060974, 0.9016772508621216, 1.1526156663894653, 0.0644424706697464, 0.12733136117458344, 0.5931347608566284, ...
def test _ propensity _ migration _ carn _ callable ( self ) : self. cell. propensity _ migration _ carn
[ 0.08754374086856842, -0.3079170286655426, 0.39619317650794983, 1.5888786315917969, 0.6902140378952026, -0.14522893726825714, -0.2051696479320526, 0.33555951714515686, -0.19974546134471893, -0.7087239027023315, -0.17413289844989777, 0.40024885535240173, 0.6624419093132019, -0.31051668524742...
def write _ to _ yaml ( file _ path, data ) : import yaml with open ( file _ path,'w') as outfile : yaml. dump ( data, outfile, default _ flow _ style = false )
[ 0.4990153908729553, -0.6499331593513489, 0.17034481465816498, -0.24649013578891754, 1.3288856744766235, 0.4019283354282379, 0.36666110157966614, 0.9942057132720947, -0.6494065523147583, -0.05235141143202782, -0.3143228590488434, 0.6621118187904358, 0.8818739652633667, 0.3532204031944275, ...
def get _ orders ( self, request = { } ) : return self. trading _ api _ request ('get ','/ api / v1 / orders ', request )
[ -1.5674575567245483, 1.0779001712799072, 0.30378684401512146, 0.9547603726387024, 1.2920643091201782, -0.6189526915550232, -1.1509681940078735, -0.9077887535095215, 0.03984041512012482, -0.26013413071632385, -0.012010939419269562, 1.2527881860733032, -0.25029000639915466, 0.082720905542373...
def spec _ creator ( sample ) : sampling _ rate = 44100 # sampling rate in hz s, freqs, times = mlab. specgram ( sample, nfft = 4096, fs = sampling _ rate, window = mlab. window _ hanning, noverlap = int ( 4096 / 2 ) ) s = np. clip ( s, a _ min = 10e - 20, a _ max = none ) s = np. log ( s ) return s
[ 1.0407041311264038, 0.3986494243144989, 0.41695377230644226, -0.502469003200531, -1.1802595853805542, -0.3638521730899811, -0.05052751675248146, -0.5701408982276917, 0.916991651058197, 0.22971265017986298, 0.17963021993637085, 0.5062846541404724, 0.32790353894233704, -0.49576207995414734, ...
def move _ by ( self, dx, dy ) : new _ center = self. center. move _ by ( dx, dy ) return new _ center
[ -1.2927014827728271, -0.30410832166671753, 0.3702887296676636, -0.48771509528160095, -0.5771522521972656, -1.2387797832489014, -0.4820214807987213, -0.6368697285652161, 0.121488057076931, 1.1718096733093262, 0.0930129811167717, 0.30835214257240295, -0.15181881189346313, -0.6558659076690674...
def cancel _ alarm ( alarm _ cancel : str ) : # cancels the inputted alarm from the queue and removes it from list. alarm _ cancel _ epoch = strptime ( alarm _ cancel, " % y - % m - % dt % h : % m " ) alarm _ cancel _ epoch = mktime ( alarm _ cancel _ epoch ) for event in alarm. queue : epoch = event [ 0 ] if epoch = =...
[ 0.5529218912124634, -1.0066114664077759, 0.72682785987854, 0.3854750990867615, -0.7326298952102661, 0.15787328779697418, -0.07470925897359848, 1.1144061088562012, 0.004518936853855848, 0.8992763757705688, -0.20209328830242157, 0.5770350694656372, 0.4253174364566803, 0.5518137812614441, 0...
def runinthread ( self ) : thread = threading. thread ( target = self. _ _ requestloop ) thread. setdaemon ( true ) thread. start ( ) log. debug ( " broadcast server loop running in own thread " ) return thread
[ -0.6094480156898499, -0.5250426530838013, 0.5023988485336304, 0.03249089792370796, 0.20622266829013824, 0.7981067895889282, 0.3460976481437683, -0.0013570074224844575, 0.046721506863832474, -1.4155806303024292, 0.8898142576217651, 1.632891297340393, -1.8882572650909424, 0.05312357470393181...
def read ( self, verbose = false ) : print ( " spcfile : reading file " + self. filename ) self. realtime = 0. 0 self. livetime = 0. 0 self. channels = np. array ( [ ], dtype = float ) self. data = np. array ( [ ], dtype = float ) self. cal _ coeff = [ ] with open ( self. filename, " rb " ) as f : # read the file in ch...
[ 0.775408923625946, -0.7608124613761902, 0.8577695488929749, -0.38946107029914856, 0.4903777241706848, 0.05897323787212372, 0.07197552174329758, 0.3411003053188324, -0.5572776794433594, 0.38322994112968445, 0.527427613735199, 1.2188236713409424, -0.43111318349838257, 0.08425462990999222, ...
def do _ set _ datacenter ( self, args ) : global datacenter datacenter = args print ( " datacenter = " + datacenter )
[ 0.11638157069683075, -0.12842071056365967, 0.30605432391166687, -0.8285583853721619, 1.0624576807022095, 0.44974127411842346, 0.6573578715324402, 0.4099792540073395, 0.34572678804397583, -0.08426038920879364, -0.6348379254341125, 1.7897700071334839, 0.29969555139541626, 1.4581873416900635,...
def on _ failure ( self, exc, task _ id, args, kwargs, einfo ) : logger. info ( exc ) super ( basetask, self ). on _ failure ( exc, task _ id, args, kwargs, einfo )
[ 0.1456477791070938, -0.16237781941890717, 0.46001872420310974, 0.32257768511772156, 0.5499727725982666, -0.33349207043647766, -0.2479388266801834, 0.830173909664154, -0.09827550500631332, -0.41875413060188293, -1.1256747245788574, 0.16767233610153198, 1.1875134706497192, 0.8542572855949402...
def ifoutputqueueempty ( self ) : return self. output _ queue. empty ( )
[ -0.7413616180419922, -0.7388142943382263, 0.5928018689155579, -0.46773388981819153, -0.2951003909111023, -0.5677259564399719, -0.10250827670097351, -0.722797155380249, -0.7885586023330688, -0.29674190282821655, 0.20694372057914734, -0.3143017888069153, -0.9254566431045532, 0.16849035024642...
def netprop _ zscore ( seed _ gene _ file, seed _ gene _ file _ delimiter = none, num _ reps = 10, alpha = 0. 5, minimum _ bin _ size = 10, interactome _ file = none, interactome _ uuid ='f93f402c - 86d4 - 11e7 - a10d - 0ac135e8bacf ', ndex _ server ='public. ndexbio. org ', ndex _ user = none, ndex _ password = none, ...
[ -0.41188058257102966, -0.031465962529182434, 0.8247002363204956, 0.43900066614151, -0.16934476792812347, -0.16245479881763458, 0.9956031441688538, 0.714316189289093, -0.18689434230327606, 0.529952883720398, 0.005395445041358471, -0.04471020773053169, -0.7509848475456238, -0.606927871704101...
def single _ ray _ belief _ propagation ( s, ray _ voxel _ indices, ray _ to _ occupancy _ accumulated _ pon, ray _ to _ occupancy _ messages _ pon, output _ size ) : occupancy _ to _ ray = extract _ occupancy _ to _ ray _ pos ( ray _ voxel _ indices, ray _ to _ occupancy _ accumulated _ pon, ray _ to _ occupancy _ mes...
[ -0.017537478357553482, -0.08973216265439987, 1.0320136547088623, 0.3823915421962738, 0.45574092864990234, -0.2536366283893585, 0.6577668190002441, 0.5585107207298279, 0.26725348830223083, 1.5086777210235596, 0.33001381158828735, 0.24188132584095, 0.1994665265083313, -0.010826055891811848, ...
def _ get _ management _ network _ id _ and _ name ( neutron _ client, ctx ) : management _ network _ id = none management _ network _ name = none provider _ context = provider ( ctx ) if ('management _ network _ name'in ctx. node. properties ) and \ ctx. node. properties ['management _ network _ name'] : management _ ...
[ -0.15086336433887482, -0.48246312141418457, 0.4574728310108185, -0.8839445114135742, 0.11553490161895752, 0.016212016344070435, -0.4448156952857971, -0.5908322334289551, 0.8916321992874146, -0.18327653408050537, 0.12874138355255127, 1.2524034976959229, 0.27601125836372375, 0.60931241512298...
def _ write _ characteristic _ and _ wait ( self, msg ) : print ( " waiting response... ", end ='', flush = true ) self. _ send _ characteristic. write ( msg, true ) count = 0 while true : if self. connection. waitfornotifications ( 1. 0 ) : print ('\ n ', end ='', flush = true ) break print ( ". ", end ='', flush = tr...
[ -0.06294747442007065, -0.38187217712402344, 0.7807286977767944, -0.2036399394273758, 0.9957062602043152, 0.2422996610403061, 1.1642060279846191, -0.1446293741464615, -0.16099412739276886, -0.18801532685756683, -0.10502181947231293, -0.049348000437021255, -0.7153865694999695, -0.21078252792...
def personal _ max _ margin _ to _ assets _ ratio ( self, years _ remaining ) : initial _ ratio _ for _ when _ not _ near _ end = self. _ _ broker _ max _ margin _ to _ assets _ ratio * \ self. _ _ initial _ personal _ max _ margin _ to _ assets _ relative _ to _ broker _ max if self. _ _ taper _ off _ leverage _ a _ l...
[ -0.15863363444805145, -1.101116418838501, 0.9090462923049927, -0.8599194884300232, -0.6207332015037537, 0.7344372868537903, -0.2670312821865082, -0.3265763223171234, -0.02118714712560177, -0.08225589245557785, 0.6140954494476318, 0.06503653526306152, -0.3076786696910858, 0.7174607515335083...
def can _ be _ ( self, state ) : translator = self. _ meta ['translator'] state = translator. translate ( state ) if self. _ meta ['complete'] : return true if self. actual _ state is none : return true transitions = self. _ meta ['transitions'] [ self. actual _ state ] return state in transitions
[ -0.46155011653900146, 0.3459490239620209, 0.6545429229736328, -0.08805616199970245, -0.6078197360038757, 0.05357574298977852, -0.283254474401474, 0.3797895014286041, 0.34545522928237915, 0.4580516219139099, -0.670788586139679, -0.3609275221824646, 0.531252384185791, -0.000681072473526001, ...
def test _ calculate _ zero _ mult _ adj ( ) : attributes ['hazard _ rate _ method _ id'] = 1 attributes ['environment _ active _ id'] = 4 attributes ['environment _ dormant _ id'] = 3 attributes ['category _ id'] = 1 attributes ['mult _ adj _ factor'] = 0. 0 _ attributes, _ msg = component. calculate ( * * attributes ...
[ 0.45302021503448486, 0.10550211369991302, 0.636728823184967, 0.043494462966918945, 0.17200519144535065, -0.20703576505184174, 0.3344847857952118, -0.14742818474769592, -0.537055253982544, -0.4699905514717102, -0.11466802656650543, -0.35388025641441345, 0.030101779848337173, 0.9761163592338...
def plotnexttrace ( self ) : if self. place < = len ( self. tracelist. iloc [ :, 0 : : 2 ]. columns ) - 1 : self. place + = 1 self. plotdualtrace ( )
[ 0.22574478387832642, 1.5769543647766113, 0.5955411195755005, 0.12488597631454468, -0.17233021557331085, 0.35572898387908936, 0.9040647149085999, -0.20359399914741516, 0.6311430931091309, -0.0024888140615075827, -0.4346635937690735, 0.5819917321205139, -0.20151859521865845, 0.37333798408508...
def getnextrow ( self, col ) : i = self. row _ range - 1 while ( i > = 0 ) : if self. board [ i ] [ col ] = = 0 : return i i - = 1
[ -0.31375399231910706, 0.821545422077179, 0.6689601540565491, 1.156150460243225, -1.2830866575241089, 0.2803340256214142, 0.6733269691467285, 0.09631526470184326, -0.34013375639915466, -0.0732346698641777, 0.47194454073905945, 0.19459562003612518, -0.7135269045829773, 0.9036316275596619, ...
def get _ package _ source ( package _ path, package _ name ) : package _ path = package _ path or cwd pkg _ path = os. path. join ( package _ path, package _ name ) if not os. path. isdir ( pkg _ path ) : raise dirnotfound ( pkg _ path ) logger. debug ('detected packages path : % s ', pkg _ path ) return pkg _ path
[ 0.4212720990180969, 0.612199604511261, 0.5785006880760193, 0.003500123741105199, -0.001598441507667303, -0.11691130697727203, 0.5827935934066772, -0.02281654253602028, 0.5424801707267761, 0.037378303706645966, 0.5004437565803528, -0.3784535229206085, -0.04042718932032585, -0.08274033665657...
def start ( self ) : threading. thread ( target = self. _ run ). start ( ) time. sleep ( 1 ) # get video file path from the config video _ path = self. config. get _ section _ dict ( " app " ) [ " videopath " ] self. _ _ engine _ instance. process _ video ( video _ path )
[ -0.058238863945007324, -0.4963473081588745, 0.4472212493419647, 1.2720071077346802, 1.0077530145645142, 0.23078905045986176, 0.21921904385089874, 1.071711778640747, -0.26937416195869446, 0.1226285770535469, 0.3242364227771759, 1.856499195098877, -0.06696821749210358, 0.4830867648124695, ...
def check _ additional _ images ( self, kwargs _ ps, kwargs _ lens ) : # todo : make this part of the pointsource class ra _ image _ list, dec _ image _ list = self. multiband. image _ positions ( kwargs _ ps = kwargs _ ps, kwargs _ lens = kwargs _ lens ) if len ( ra _ image _ list [ 0 ] ) > self. param. num _ point _ ...
[ -0.5703045129776001, 0.5462667942047119, 0.35471871495246887, -0.32484936714172363, 0.13900066912174225, 0.4698088765144348, -0.5634549856185913, 0.1821134090423584, 0.7227598428726196, 0.1574062556028366, -0.40931999683380127, -0.6195635795593262, -0.3537848889827728, 1.0435054302215576, ...
def shopify _ set _ template _ value _ in _ shopify _ obj ( self, new _ product, template, is _ publish, is _ set _ basic _ detail ) : published _ at = datetime. utcnow ( ). strftime ( " % y - % m - % dt % h : % m : % s " ) if is _ publish = = " unpublish _ product " : new _ product. published _ at = none new _ product...
[ -0.9879633784294128, -0.6149097084999084, 0.6135744452476501, -0.17960461974143982, -0.04086886718869209, 0.04793154075741768, -0.4631398618221283, -0.330785870552063, -0.023076878860592842, 0.7562004923820496, -1.1188483238220215, 0.7490456104278564, 0.2709825336933136, 0.4669011235237121...
def draw _ window ( surface, game _ blocks, falling _ fig, score _ text ) : surface. fill ( black ) for block in game _ blocks : block. draw ( surface ) falling _ fig. draw _ preview ( surface, game _ blocks ) falling _ fig. draw ( surface ) # drawing bar and score stats = stat _ font. render ( score _ text, 1, black )...
[ 0.3785848319530487, 0.5594715476036072, 0.5841944217681885, 0.5694072842597961, -0.185484379529953, 0.9978504776954651, 1.2896078824996948, -0.686429500579834, -0.4232119619846344, -0.41489967703819275, 0.21898822486400604, 0.3966550827026367, -0.05920359864830971, 1.26885187625885, 0.37...
def get _ data ( object _ type, object, num _ scenes ) : dataset _ dir = ".. / src / dataset / train " # create the outliers get _ outliers ( dataset _ dir ) # creating the path for the object object _ path = ".. / { } / { } / in. csv ". format ( " src / dataset / { } ". format ( object _ type ), object ) # read in the...
[ -0.38869625329971313, 0.12035954743623734, 0.5990335941314697, 0.009180874563753605, 0.0017082479316741228, 0.40022552013397217, -0.5108019709587097, 0.41648069024086, -0.34751302003860474, 0.13154596090316772, 0.19116485118865967, 0.904487669467926, -0.4992455542087555, -0.70515376329422,...
def _ _ load _ settings ( self, config _ file _ path ) : try : config _ parser = configparser. rawconfigparser ( ) config _ parser. read ( config _ file _ path ) users _ list = config _ parser. get ('my - configs ','users _ list') user _ output = config _ parser. get ('my - configs ','user _ output') hashtag _ list = c...
[ -0.39173537492752075, -0.5084223747253418, 0.55522221326828, 0.03252248838543892, -0.671745240688324, -0.8746262788772583, -0.0937524363398552, -0.17072053253650665, -0.8675892353057861, 0.5672067999839783, -1.076230525970459, -0.7268584966659546, -0.8421157598495483, 0.7862553596496582, ...
def cumsum ( x, axis = 0, exclusive = false, reverse = false, name = none ) : with ops. name _ scope ( name, " cumsum ", [ x ] ) as name : x = ops. convert _ to _ tensor ( x, name = " x " ) return gen _ math _ ops. cumsum ( x, axis, exclusive = exclusive, reverse = reverse, name = name )
[ 0.36244678497314453, 0.6412838101387024, 0.8753911852836609, 0.7544156908988953, -1.2316665649414062, -0.0874318778514862, 0.2367040067911148, -0.08768028765916824, -0.012050512246787548, 0.3811063766479492, -0.8050909042358398, 1.188870906829834, 0.8538827300071716, -1.756392002105713, ...
def get _ full _ order _ book _ atomic ( self, symbol ) : return self. get _ request ('/ api / v1 / market / orderbook / level3? symbol ='+ symbol )
[ -1.0343565940856934, 0.6006795763969421, 0.6328208446502686, 0.8808832168579102, -0.20176148414611816, -0.30221036076545715, -0.473954975605011, -1.1584734916687012, -0.2511773407459259, 0.7601773738861084, -0.293117493391037, 0.49372729659080505, -0.5715956091880798, 0.0024452100042253733...
def control _ finding _ generator ( self ) - > pulumi. output [ optional [ str ] ] : return pulumi. get ( self, " control _ finding _ generator " )
[ 0.40817344188690186, 0.015662387013435364, 0.6085658073425293, 0.3490510880947113, 0.49709776043891907, 1.001832127571106, 0.7137431502342224, -0.8660125732421875, 0.17455530166625977, -0.7957728505134583, 0.1879040002822876, -0.3669619560241699, 0.35748955607414246, -0.4736470580101013, ...
def test _ hawkessumexpkern _ score ( self ) : n _ nodes = 2 n _ realizations = 3 train _ events = [ [ np. cumsum ( np. random. rand ( 4 + i ) ) for i in range ( n _ nodes ) ] for _ in range ( n _ realizations ) ] test _ events = [ [ np. cumsum ( np. random. rand ( 4 + i ) ) for i in range ( n _ nodes ) ] for _ in rang...
[ 0.49596327543258667, -0.027356039732694626, 0.7925368547439575, 0.10013887286186218, 0.64081871509552, -0.13218960165977478, -0.10814644396305084, 0.040327612310647964, 0.5027080774307251, -0.483005553483963, -0.5784423351287842, 0.3205491304397583, -0.4204801023006439, 0.04669909924268722...
def get _ option _ text ( elem ) : return elem. text. strip ( )
[ 0.24393486976623535, 0.7490717768669128, 0.38392898440361023, -0.04032934829592705, -0.10051466524600983, 0.21496601402759552, -0.34650641679763794, -0.6232693791389465, 0.84295254945755, 1.7931617498397827, -0.032233625650405884, -0.19017815589904785, -0.02232568897306919, -1.134499907493...
def default _ iam _ role _ arn ( self ) - > str : return pulumi. get ( self, " default _ iam _ role _ arn " )
[ 0.18441134691238403, -0.5525766015052795, 0.2556900382041931, -0.10393049567937851, 2.042252779006958, 0.9908505082130432, 0.15940646827220917, 0.6283697485923767, 0.28200483322143555, -0.7126502990722656, 0.6438568234443665, 0.9201529026031494, -0.06762538850307465, -0.380018949508667, ...
def string _ numbers _ to _ tuple ( string, is _ int = false ) : pos = string. split ( ", " ) try : if is _ int : return tuple ( [ int ( p ) for p in pos ] ) else : return tuple ( [ float ( p ) for p in pos ] ) except : return none
[ -0.1773417443037033, -0.04373347759246826, 0.3793441355228424, -0.33705979585647583, 0.5414150953292847, -0.4118264317512512, -0.7863233089447021, 0.24649475514888763, -0.6417757272720337, 1.032773733139038, -0.3651488125324249, -0.7603806853294373, -0.8577984571456909, -1.0937477350234985...
def getnormalmoves ( piece, position : tuple, board : list ) : row, col = position potential _ moves = [ ] chesspiece. moveupdate ( 2, 1, row, col, board, potential _ moves, 2 ) chesspiece. moveupdate ( 2, - 1, row, col, board, potential _ moves, 2 ) chesspiece. moveupdate ( 1, 2, row, col, board, potential _ moves, 2 ...
[ -1.0359671115875244, -0.1362687349319458, 0.7418850064277649, 0.4707770347595215, -0.8673496842384338, -0.02835400216281414, -0.43326979875564575, 0.04092556983232498, -0.24901121854782104, 0.8928393721580505, -0.755374014377594, -0.3985103368759155, -0.27573516964912415, -0.34151357412338...
def set _ progress _ bars ( enabled : bool ) - > bool : from ray. data import datacontext ctx = datacontext. get _ current ( ) old _ value = ctx. enable _ progress _ bars ctx. enable _ progress _ bars = enabled return old _ value
[ 0.1890912503004074, 0.17257681488990784, 0.6715052723884583, 0.12765689194202423, -0.10809829086065292, 1.3261277675628662, -0.21841756999492645, -0.18960517644882202, 0.04399080574512482, -0.38253816962242126, -1.0746151208877563, 0.17319078743457794, -1.94189453125, -0.02436443790793419,...
def notifier ( self ) : raise notimplementederror ( " notifiers not available for synchronous caches. " )
[ -0.26734212040901184, -0.061856940388679504, 0.561177134513855, 0.5507410168647766, -0.19512151181697845, 0.44719401001930237, 0.43503066897392273, 0.25190284848213196, 0.0614405982196331, 0.12771056592464447, -1.0642651319503784, 0.6009020209312439, 0.6134599447250366, 0.05929805338382721...
def inference _ dispatch ( unary _ potentials, pairwise _ potentials, edges, inference _ method, return _ energy = false, * * kwargs ) : if isinstance ( inference _ method, tuple ) : additional _ kwargs = inference _ method [ 1 ] inference _ method = inference _ method [ 0 ] # append additional _ kwargs, but take care ...
[ -0.26921889185905457, -0.11842406541109085, 1.0177955627441406, 0.24781644344329834, -0.254665732383728, -0.03103541024029255, -0.49116751551628113, -0.21467533707618713, 0.2711566984653473, 0.23787128925323486, 0.3375837206840515, -0.09442911297082901, -0.017104318365454674, 0.02006009966...
def _ dumppages ( self ) : if self. _ page _ count _ in _ this _ period > self. _ adump. max _ dump _ pages : raise memorydumpererror ('too many pages % s in this period'% self. _ page _ count _ in _ this _ period ) start _ page _ index = self. _ getprojectedpageindex ( self. _ last _ page _ count ) end _ page _ index ...
[ -0.43793272972106934, 0.28533098101615906, 0.6594744324684143, -0.39390790462493896, 0.19513405859470367, 0.3899475932121277, 0.20851394534111023, 0.06348928809165955, 0.5090616345405579, 0.22184205055236816, 1.4724870920181274, 0.1874515861272812, -0.18960696458816528, 0.8814548850059509,...
def calc _ word _ code ( dnastring ) : value _ map = {'a': 0,'c': 1,'g': 2,'t': 3 } values = [ ] for char in dnastring : if char not in value _ map : return - 1 else : values. append ( value _ map [ char ] ) word _ code = 0 for n, value in enumerate ( values ) : word _ code + = value * ( 4 * * ( len ( values ) - n - 1 ...
[ -0.04283357411623001, 0.4143714904785156, 0.5082854628562927, -0.23421652615070343, -0.14698141813278198, -0.3913974463939667, 0.3106147050857544, 0.4404130280017853, 0.4608193337917328, 0.5281386375427246, -0.768231213092804, -0.1104172095656395, -0.6032888293266296, 0.40961745381355286, ...
def gravitar _ hash ( email _ add ) : return hashlib. md5 ( email _ add. strip ( ). lower ( ) ). hexdigest ( )
[ 1.2211382389068604, 0.09831113368272781, 0.3850409686565399, -0.665195882320404, -0.5577675104141235, 1.3435660600662231, -0.8239578008651733, 0.21249686181545258, -0.48714348673820496, 0.7298963665962219, 0.4682541489601135, 0.793065071105957, -0.631240963935852, -0.6754958033561707, -0...
def display ( * * args _ r ) : args _ a = accelr. accel ( * * args _ r ) args = accelr. force ( * * args _ a ) args. f _ g = args. f / accelr. g print ( " acceleration calculation " ) print ( ) template = " " " \ mass of moving object ( kilograms ).. m = { m : 10. 3f } displacement ( metres ).............. d = { d : 10...
[ 1.3930875062942505, -0.6298862099647522, 1.0918011665344238, -0.19086821377277374, -0.49810999631881714, 0.19999724626541138, 0.9616544246673584, -0.39910197257995605, -1.0255448818206787, -0.008091137744486332, 0.4492048919200897, 0.23016099631786346, 0.02574578858911991, 0.58748775720596...
def _ get _ dataset _ metadata ( self, openml _ dataset : openml. openmldataset ) - > typing. dict : dataset _ metadata : typing. dict [ str, typing. any ] = {'id': str ( openml _ dataset. dataset _ id ), } if openml _ dataset. name : dataset _ metadata ['name'] = openml _ dataset. name if openml _ dataset. description...
[ -0.7789071202278137, 0.29976239800453186, 0.28909242153167725, -1.634096622467041, -0.9002825021743774, -0.13626736402511597, -1.6983567476272583, 0.013776925392448902, -0.3496890962123871, -0.09478320181369781, -0.3601614534854889, 0.38312259316444397, 0.9340552091598511, 0.10513123124837...
def test _ update _ market _ value _ of _ asset _ negative _ price ( ) : start _ dt = pd. timestamp ('2017 - 10 - 05 08 : 00 : 00 ', tz = pytz. utc ) later _ dt = pd. timestamp ('2017 - 10 - 06 08 : 00 : 00 ', tz = pytz. utc ) port = portfolio ( start _ dt ) asset = equity ( " acme inc. ", " aaa ", tax _ exempt = false...
[ 0.23470117151737213, 0.5446532368659973, 0.6287623643875122, -0.1473638266324997, 0.1846526712179184, 0.13687358796596527, -0.29746952652931213, -0.9141352772712708, -0.6318689584732056, 0.454524427652359, 0.37737375497817993, 0.08496502786874771, -0.07533498108386993, -0.2934083342552185,...
def _ _ init _ _ ( self, ants ) : self. ants = ants self. costs = { }
[ -0.052445147186517715, -0.3219873905181885, 0.2503543794155121, -0.34237566590309143, -0.8320485949516296, -0.05795970559120178, -1.3899598121643066, 0.4752896726131439, 0.1516135185956955, 0.13495251536369324, -0.29878827929496765, -0.7526192665100098, 1.472631812095642, -0.12458799034357...
def test _ client ( ) : course2 _ solution. app. config ['testing'] = true client = course2 _ solution. app. test _ client ( ) yield client
[ 0.40708285570144653, -0.16174210608005524, 0.24736985564231873, 0.30550485849380493, 0.179355651140213, 0.5850463509559631, 1.198692798614502, -1.0503804683685303, -0.266925573348999, -0.3162095844745636, -0.260101854801178, 0.1878134161233902, -0.17218807339668274, -0.36693447828292847, ...
def handleendtourbutton ( self, event ) : if graphicsdevice. ismouseinside ( event, self. end _ tour _ button _ rect ) : if self. game. current _ player = = 0 : self. playtravailtermine ( ) self. game. play _ turn ( ) self. resetselected ( )
[ -0.11883485317230225, 0.13415272533893585, 0.6788675785064697, 0.4465044140815735, 0.13655796647071838, 0.9237794876098633, 0.3243200182914734, -0.004369131755083799, 0.21054767072200775, 0.9859934449195862, -0.6006793975830078, -0.5504335761070251, -0.44491973519325256, -0.776511430740356...
def main ( global _ config, * * settings ) : settings ['mako. directories'] = os. path. join ( here,'templates') engine = engine _ from _ config ( settings,'sqlalchemy.') dbsession. configure ( bind = engine ) base. metadata. bind = engine config = configurator ( settings = settings ) config. add _ static _ view ('stat...
[ 0.274348646402359, 0.7836028933525085, 0.6298834085464478, 0.29187414050102234, -0.699410617351532, -0.13179296255111694, 0.33481478691101074, 0.251418799161911, -0.08809924870729446, 0.3854442536830902, -0.4320838153362274, -0.40513572096824646, 0.05601571500301361, 0.38858237862586975, ...
def draw ( self, surface ) : self. box. draw ( surface )
[ -0.7617321014404297, 0.6310518980026245, 0.0942605510354042, 0.3159217834472656, 0.13093405961990356, 1.122329592704773, 0.7525652647018433, -0.7692328691482544, -0.435644268989563, -1.6254711151123047, -0.344804048538208, 0.44741374254226685, 0.04058489203453064, 1.079014539718628, -1.8...
def cambiarestado ( self, regla, tiempo ) : self. setestados = self. setvectores # lista que contiene el conjunto de estados para la regla # introducida como parametro, # para cada ci, y para cada paso de tiempo. numesta2iniciales = len ( self. setestados ) # almacena el numero de estados iniciales # que correspondera ...
[ 0.40742653608322144, -0.08074306696653366, 0.5509686470031738, -0.3252682089805603, 0.5039339661598206, -0.19265013933181763, 0.10757121443748474, -0.2392728626728058, -0.6728596091270447, 0.9381215572357178, -0.15292395651340485, -0.2473057359457016, -0.07474083453416824, -0.1090230047702...
def node _ loop _ new ( node : list, cond, stmt ) - > none : node. append ( [ " node _ loop ", cond, stmt ] )
[ -0.03128235414624214, 0.8688663244247437, 0.3678171634674072, 0.3397773504257202, -0.7924898862838745, 0.7092130184173584, -1.1104472875595093, 0.23324008285999298, -1.008448839187622, 0.7137743234634399, -0.3039664924144745, 0.676598072052002, 0.2526562809944153, 1.1147302389144897, -0....
def validate _ id _ number ( id _ number ) : try : if 7 < = len ( id _ number ) < = 8 and id _ number. isdigit ( ) : return true except exception as e : lgr. error ('validate _ id _ number : % s ', e ) return false
[ -0.3030964732170105, 0.08443307131528854, 0.5405458211898804, 0.09951506555080414, 0.1880493015050888, 1.3264720439910889, -0.024602148681879044, -0.38391003012657166, 0.7542984485626221, -0.26757851243019104, -0.28011563420295715, -0.19063186645507812, -0.4565112292766571, 0.0577912814915...
def avggroup ( table : arrable, to _ avg : str, groupon : list ) : orig _ groupon = groupon. copy ( ) group _ col _ name = " avggroup " final _ columns = table. get _ col _ names ( ). append ( group _ col _ name ) all _ groups = [ table ] while groupon : next _ group _ col = groupon. pop ( ) print ( " nextgroup call = ...
[ -0.7078885436058044, 0.7788670063018799, 1.002778172492981, 0.544690728187561, -0.8167615532875061, -0.5142312049865723, 0.02643955871462822, 0.03203625604510307, -0.919187605381012, 1.168141484260559, 0.49180909991264343, -0.1432615965604782, -0.10036090016365051, 0.1368093490600586, 0....
def _ prepare _ transitions _ with _ proxy _ pc ( self ) : transitions = { unixremote. proxy _ pc : { unixremote. unix _ remote : { " action " : [ " _ execute _ command _ to _ change _ state " ], } }, unixremote. unix _ remote : { unixremote. proxy _ pc : { " action " : [ " _ execute _ command _ to _ change _ state " ]...
[ -0.4362832307815552, -0.14915671944618225, 0.5764988660812378, -1.109468698501587, 0.30587059259414673, 0.027253836393356323, -0.8755441308021545, -0.19392640888690948, -0.2005898505449295, 0.39268577098846436, -0.7019839286804199, -0.11354762315750122, -0.12170659005641937, 0.183271557092...
def ping ( host ) : host = str ( host ) # option for the number of packets as a function of param ='- n'if platform. system ( ). lower ( ) = ='windows'else'- c'# building the command. ex : " ping - c 1 google. com " command = ['ping ', param,'1 ', host ] v = subprocess. call ( command, stdin = pipe, stdout = devnull, s...
[ 0.10494640469551086, -0.3152167499065399, 1.4762017726898193, 0.9876093864440918, -0.7209577560424805, 0.9316492080688477, 0.8062462210655212, 0.8528169393539429, -0.32972437143325806, 0.5731075406074524, -0.41790661215782166, 0.7805993556976318, -0.43762680888175964, 0.3381340503692627, ...
def validate ( self, request, response ) : element = self. search _ response ( request ) if element is not none : element. cached _ response. options = response. options element. freshness = true element. max _ age = response. max _ age element. creation _ time = time. time ( ) element. uri = request. proxy _ uri
[ -0.5833268761634827, -0.49834325909614563, 0.37988144159317017, 0.29077279567718506, 0.6822285652160645, -0.016419123858213425, -0.3326365351676941, -0.33539560437202454, 1.151739478111267, -0.4407958984375, -0.08482357859611511, -0.026554523035883904, -0.009357467293739319, -0.08831845968...
def drawheroboard ( self, hero : hero, position ) : i = 0 for minion in hero. board : if position = = configuration. top : self. drawminion ( minion, configuration. card _ index _ board _ top _ pos [ i ] ) else : self. drawminion ( minion, configuration. card _ index _ board _ bottom _ pos [ i ] ) i + = 1
[ -0.378877192735672, 0.3087725043296814, 0.699235200881958, 0.45520052313804626, 0.48195379972457886, 0.43611764907836914, -0.9495365023612976, 1.0643233060836792, 0.26760509610176086, 0.28341400623321533, -1.1521661281585693, 0.5925813913345337, -0.45097485184669495, 0.029617348685860634, ...
async def warning _ message ( ctx : context, description : str, author : bool = true ) : await ctx. send ( embed = make _ embed ( title ='warning ', description = f'* * { description } * * ', ctx = ctx, color = " dark _ gold ", author = author ), delete _ after = 30 )
[ 0.6549521088600159, 1.2992929220199585, 0.6235984563827515, 0.583642840385437, 0.3685395419597626, 0.7723802924156189, -0.8906753659248352, 0.02200903370976448, 0.020963476970791817, 0.41745713353157043, 0.17494359612464905, 1.9047458171844482, -0.4563741087913513, 0.050175078213214874, ...
def iam _ roles ( self ) - > sequence [ str ] : return pulumi. get ( self, " iam _ roles " )
[ -0.09062407165765762, 0.40539348125457764, 0.28049594163894653, 0.05966402590274811, 1.718969464302063, 1.4358797073364258, -0.6921740770339966, -0.1460866779088974, 0.8966302871704102, 0.3902696967124939, -0.7973832488059998, 0.5118973255157471, 0.18500179052352905, -0.7532539963722229, ...
def substitute ( * args, * * kws ) : kwargs = { key : sub if sub is not none else'null'for key, sub in kws. items ( ) } return self. _ substitute ( * args, * * kwargs )
[ -0.7858372330665588, -0.3066774308681488, 0.4489428400993347, -0.36856427788734436, -0.5966436862945557, -0.9534559845924377, -1.4865834712982178, 0.2040441483259201, 0.14761684834957123, -0.3705299496650696, -0.7895694971084595, 0.1869477927684784, 0.2928552031517029, 0.3303096294403076, ...
def unix _ epoch _ nanos _ to _ dotnet _ ticks ( unix _ column : union [ str, column ] ) - > column : if not isinstance ( unix _ column, ( str, column ) ) : raise valueerror ( f " given column must be a column name ( str ) or column instance ( column ) : { type ( unix _ column ) } " ) sc = sparkcontext. _ active _ spar...
[ -0.41583698987960815, 0.23318889737129211, 0.3984222412109375, -0.5317064523696899, 0.4554113745689392, -0.42276617884635925, 0.18140193819999695, -0.21078082919120789, 0.1506967395544052, -0.3659367859363556, -0.655841588973999, 0.823954164981842, 0.9360942244529724, -0.2988262176513672, ...
def make _ pad _ mask ( lengths, xs = none, length _ dim = - 1 ) : if length _ dim = = 0 : raise valueerror ( " length _ dim cannot be 0 : { } ". format ( length _ dim ) ) if not isinstance ( lengths, list ) : lengths = lengths. tolist ( ) bs = int ( len ( lengths ) ) if xs is none : maxlen = int ( max ( lengths ) ) el...
[ -0.14016948640346527, 0.49275392293930054, 0.8418415188789368, -0.3137114644050598, -0.4358270764350891, -0.07359295338392258, 0.1689372956752777, -0.1448219269514084, 0.9191918969154358, 0.0318659171462059, 0.2405519336462021, 0.32488709688186646, 0.02429891563951969, -0.5891632437705994,...
def test _ board _ borders ( self ) : builder = builder ( 100, 100, 6, 6 ) builder. setmargins ( 20, 20 ) board = builder. create ( ) borders = board. graphics. _ borders self. assertequal ( len ( borders ), 4 ) self. assertequal ( len ( borders [ 0 ] ), 2 ) self. asserttrue ( ( ( 20, 20 ), ( 80, 20 ) ) in borders ) se...
[ 0.5302697420120239, 1.0067304372787476, 0.6624220609664917, -0.4181309640407562, 0.5539538264274597, 0.6782134771347046, 0.6341271996498108, -0.29903465509414673, 0.5554914474487305, -1.2832659482955933, -1.0863698720932007, -0.14788362383842468, -0.1993899941444397, 0.6350125670433044, ...
def clear ( self ) : self. operation = operation. equals self. previous _ number = none self. current _ input = " " self. update _ input ( )
[ -0.16587671637535095, 0.5162794589996338, 0.27087539434432983, 0.23198659718036652, -0.42580974102020264, 0.09861462563276291, 1.6593180894851685, -0.17576541006565094, 0.17869703471660614, 0.1705329418182373, -0.01896076649427414, 0.4537739157676697, -0.05455664172768593, -0.4219300448894...
def make _ merge _ list ( subs _ list, subscript _ dict ) : coords _ set = [ set ( ) for i in range ( len ( subs _ list [ 0 ] ) ) ] for subs in subs _ list : coords = make _ coord _ dict ( subs, subscript _ dict, terse = false ) [ coords _ set [ i ]. update ( coords [ dim ] ) for i, dim in enumerate ( coords ) ] dims =...
[ 0.013143901713192463, 0.11459533870220184, 0.9594104290008545, -0.2700585722923279, -0.3013734221458435, -0.630466878414154, -0.18885233998298645, -0.08738727122545242, 0.04502284526824951, 0.41228732466697693, -0.6141636371612549, 0.17993544042110443, 0.0020177331753075123, 0.208156019449...
def weighted _ binned ( x, y, bins ) : import scipy. stats as ss wgt = get _ coslat ( x ) wgt _ array = wgt. broadcast _ like ( x ) # wherever the data is invalid, weight should be set to zero : wgt _ array = xr. where ( np. logical _ or ( np. isnan ( x ), np. isnan ( y ) ), 0, wgt _ array ) # first get the sum of weig...
[ 0.05904439091682434, 0.05931725725531578, 0.6835997104644775, 0.19067126512527466, 0.031983207911252975, -0.023821931332349777, 0.2013367861509323, -0.6294555068016052, -0.47461435198783875, 0.5987576842308044, -0.18532918393611908, 1.11440110206604, -0.29811838269233704, 0.849533259868621...
def score _ samples ( self, x ) : return logsumexp ( self. _ estimate _ weighted _ log _ prob ( x ), axis = 1 )
[ 0.0060249739326536655, -0.1353815644979477, 0.6677049994468689, 0.4785175323486328, 0.040482234209775925, -0.07115590572357178, -0.5137007832527161, -0.6346262097358704, 0.5548213124275208, 0.6379386782646179, -0.06774575263261795, 0.36372044682502747, -0.1624365895986557, -0.8934280872344...
def get _ zonal _ climo ( data ) : tmp = get _ climo ( data ) return tmp. mean ( dim ='lon')
[ 0.36365267634391785, -0.28040871024131775, 0.2914974093437195, 0.33943861722946167, 0.09019425511360168, -0.39589500427246094, -0.18687847256660461, -0.2821446359157562, -0.3750198483467102, 0.6560673117637634, -0.4148525893688202, 0.6492000818252563, 0.5430942177772522, -1.090650796890258...