text
stringlengths
25
2.19k
embedding
listlengths
768
768
def print _ stats ( self, oil ) : delta = datetime. now ( ) - self. start _ time hours = delta. total _ seconds ( ) / 3600 if oil! = 0 : logger. log _ success ( " current oil : " + str ( oil ) ) if self. config. commissions ['enabled'] : logger. log _ success ( " commissions sent : { } / received : { } ". format ( self...
[ -0.05113452300429344, -0.853944718837738, 0.8680164217948914, -0.6998729705810547, -0.13891814649105072, 0.7673219442367554, 0.1701280176639557, -0.5909790992736816, -0.7202304005622864, 0.11861256510019302, -0.1006728857755661, 0.6297937035560608, 0.5076464414596558, 0.29920539259910583, ...
def apply ( self, als ) : # check for correction files stored self. corr _ files = [ ifile for ifile in os. listdir ( '. /') if ifile. endswith ( self. cfg ['export _ file'] ) ] if len ( self. corr _ files ) = = 0 : logger. info ('elevcor : warning - offsetcorrectionfilter called without providing correction files') # ...
[ -0.16361398994922638, -0.5722397565841675, 0.9181286096572876, -0.5979474782943726, -0.3047748804092407, 0.9247411489486694, 0.7542924880981445, 0.6753253936767578, -0.2789008617401123, 0.705788791179657, 0.6825762391090393, 0.39985767006874084, 0.5898377895355225, 0.26527705788612366, 0...
def summaries ( var ) : with tf. name _ scope ('summaries') : mean = tf. reduce _ mean ( var ) tf. summary. scalar ('mean ', mean ) with tf. name _ scope ('stddev') : stddev = tf. sqrt ( tf. reduce _ mean ( tf. square ( var - mean ) ) ) tf. summary. scalar ('stddev ', stddev )
[ 0.15769550204277039, 0.6385082006454468, 0.4666251838207245, -1.0301283597946167, -0.0880764052271843, 0.18755730986595154, 0.7083101868629456, 0.07200297713279724, 0.15723799169063568, 0.09217553585767746, -0.6190959215164185, 1.0580048561096191, 1.1130625009536743, 0.47012415528297424, ...
def paragraphs ( text, # string to search for paragraphs parabnd = default _ para _ bnd, # the string that means paragr boundary ) : # for par in text. split ( parabnd ) : # p = par. strip ( ) for p in map ( str. strip, text. split ( parabnd ) ) : if p : yield ( p )
[ 0.6641635894775391, -0.6459792256355286, 0.6712304353713989, 0.38312163949012756, -0.49507415294647217, 0.7921001315116882, -1.1844624280929565, 0.13210687041282654, -0.6266351938247681, 0.5592526793479919, 0.049312081187963486, 0.5097635984420776, -1.1625401973724365, 0.026251118630170822...
def make _ ternary _ constraint ( a, b, c, ab, ca, cb ) : def new _ value ( ) : av, bv, cv = [ connector ['has _ val'] ( ) for connector in ( a, b, c ) ]
[ 0.6895495057106018, -0.5302119255065918, 0.45804378390312195, 0.002155835274606943, 1.0076169967651367, 0.08293914049863815, -0.25082024931907654, -0.17486847937107086, -0.49481555819511414, 0.25713062286376953, -0.4278014302253723, -0.6573308110237122, -0.05838267132639885, -0.91877955198...
def get _ group _ devices ( self ) : return self. storage. vgs
[ -0.5837319493293762, 0.7571955919265747, 0.4729423522949219, 0.9175187945365906, 0.23458413779735565, -0.13721570372581482, 0.13847000896930695, -0.817482054233551, -0.5075399875640869, 0.6083558201789856, 0.39578306674957275, 0.2231643944978714, -0.9321093559265137, 0.054777972400188446, ...
def sample _ tag ( user, name ='sample tag') : return tag. objects. create ( user = user, name = name )
[ 1.0872471332550049, 0.5191783308982849, 0.14348910748958588, 0.4774307310581207, -0.6923926472663879, 0.2708248794078827, -0.5408661961555481, -0.32943159341812134, -0.39578184485435486, -0.20085696876049042, -1.3503729104995728, 0.2414027601480484, -0.18372231721878052, -0.228189840912818...
def get _ default _ tenant ( ) : tenant _ uuid = none err _ msg, _ auth _ mgr = get _ auth _ mgr ( ) if err _ msg : return err _ msg, none, none if _ auth _ mgr. allow _ all _ access ( ) : return none, auth _ data _ const. default _ tenant _ uuid, auth _ data _ const. default _ tenant try : cur = _ auth _ mgr. conn. ex...
[ -0.3874054253101349, -0.3806297183036804, 0.4331005811691284, -0.010656936094164848, -0.010191397741436958, -0.34085798263549805, 0.2102707326412201, 0.1315556764602661, -0.513475239276886, 0.7441452145576477, -0.12944002449512482, 0.2007264643907547, -0.64989173412323, 0.10673914849758148...
def merge _ moments ( circuit : circuit _ type, merge _ func : callable [ [ ops. moment, ops. moment ], optional [ ops. moment ] ], ) - > circuit _ type : if not circuit : return circuit merged _ moments : list [ ops. moment ] = [ circuit [ 0 ] ] for current _ moment in circuit [ 1 : ] : merged _ moment = merge _ func ...
[ -0.7458214163780212, 0.6805734038352966, 0.6323042511940002, 0.25212785601615906, 0.8554931879043579, -0.4993080794811249, 0.30295121669769287, -0.18607588112354279, 0.7123202085494995, 0.101645328104496, -0.2600683867931366, 0.8377089500427246, -0.7180994749069214, 0.7728043794631958, 0...
def delete ( self, x1, x2 = none ) : if x2 is none : x2 = x1 # training continuation if self. kernel _ matrix is none : self. kernel _ matrix = self. kernel _ function ( x1, x2 ) self. kernel _ matrix _ inv = inv _ stable ( self. kernel _ matrix ) else : # delete first row and column self. kernel _ matrix = self. kerne...
[ 0.27254360914230347, -0.1122925728559494, 1.0844790935516357, 0.1936805099248886, -0.4394157826900482, -0.5394632816314697, 0.2169855684041977, 0.8475233912467957, -0.8900114893913269, 0.7146421074867249, 0.22520476579666138, 0.8126652240753174, -0.5295312404632568, -0.27650734782218933, ...
def observation _ window ( df, window _ size ) : # index date equals to admit time plus selected observation window df ['index _ date'] = df ['admittime'] + pd. to _ timedelta ( window _ size, unit ='h') # exclude cases when the diagnosis of resistant bacteria is earlier than index _ date subset = df [ df ['index _ dat...
[ 0.2081022560596466, 0.48591017723083496, 0.6771798133850098, -0.44889265298843384, -0.6224554181098938, 0.3045668601989746, 0.1574791669845581, -0.30552077293395996, -0.11679279804229736, 0.3553886413574219, 1.2943756580352783, 1.8037046194076538, 0.2026737928390503, -0.142406165599823, ...
def test _ runnerdebugger ( self ) : self. parseoptions ( ['- - reporter ','capturing ','- - debugger ','twisted. trial. test. test _ runner. runnertests. cdebugger ','- - debug ','twisted. trial. test. sample ', ] ) my _ runner = self. getrunner ( ) result = self. runsamplesuite ( my _ runner ) self. assertequal ( sel...
[ -0.5879393219947815, 0.9536974430084229, 0.5462322235107422, 0.3296310007572174, -0.15691913664340973, -0.0002537684340495616, 0.2541891634464264, 0.5380686521530151, 0.16590024530887604, -0.822155237197876, -1.0378918647766113, -0.42369544506073, -0.8923161625862122, 0.9352182745933533, ...
def update _ date ( self, update _ date ) : self. _ update _ date = update _ date
[ -0.08606371283531189, -0.15942507982254028, 0.49535682797431946, 0.7233625650405884, -0.041037485003471375, 0.7283222675323486, -0.7855793237686157, 1.2490853071212769, -0.18924446403980255, 0.34233853220939636, -0.5117793679237366, 0.06306766718626022, 0.298775315284729, 0.458006024360656...
def datareceived ( self, data ) : while len ( data ) > 0 : chunk = data [ : 4096 ] msg = ccpmessage. data _ send ( self. conn _ id, chunk ) self. write _ dst ( msg. pack ( ) ) data = data [ 4096 : ]
[ 0.1753915399312973, -0.0727362111210823, 0.4656316041946411, -0.8716400861740112, 1.2490407228469849, -0.058346010744571686, -0.33841320872306824, 0.0056340876035392284, 0.1442229151725769, -0.45911774039268494, -0.9534559845924377, -0.12884967029094696, -0.14525748789310455, -0.4216754436...
def unpack ( stream, * * kwargs ) : return msgpack. unpack ( stream, ext _ hook = _ decode _ ext _ type, raw = false, * * kwargs )
[ -0.05692017450928688, 0.5776675343513489, 0.6376667618751526, 0.380300372838974, -1.32899010181427, -1.2961325645446777, -0.018479667603969574, -0.36895862221717834, 0.4520050883293152, -1.0655910968780518, -0.6086670756340027, 0.6345207691192627, -0.477504163980484, 0.3117588758468628, ...
def plot _ training _ history ( history, fname = none, metric _ name ='acc ', figsize = ( 8, 6 ) ) : epochs = np. arange ( 1, len ( history ['loss'] ) + 1 ) val ='val _ loss'in history and'val _ epochs'in history if metric _ name : fig, axes = plt. subplots ( 1, 2, figsize = figsize ) axes [ 0 ]. plot ( epochs, history...
[ 0.28574422001838684, 0.9280956983566284, 0.8270871043205261, 0.43710920214653015, -0.5834239721298218, 0.06230434402823448, 0.7443091869354248, 0.2252253293991089, -0.270375519990921, 0.22543582320213318, -0.20629043877124786, 0.3901297450065613, 1.518380880355835, 0.4041712284088135, 0....
def getiou ( boxa, boxb ) : xa = max ( boxa [ 0 ], boxb [ 0 ] ) ya = max ( boxa [ 2 ], boxb [ 2 ] ) xb = min ( boxa [ 1 ], boxb [ 1 ] ) yb = min ( boxa [ 3 ], boxb [ 3 ] ) # compute the area of intersection rectangle interarea = max ( 0, xb - xa + 1 ) * max ( 0, yb - ya + 1 ) # compute the area of both the prediction a...
[ -0.5537006855010986, 0.22380714118480682, 1.342013955116272, -0.13201981782913208, 0.2035176306962967, -0.26108482480049133, 0.5143244862556458, 0.7228984236717224, -0.5489328503608704, -0.16453485190868378, 0.5088557004928589, 0.7544382214546204, -0.4178912043571472, -0.331437885761261, ...
def _ _ repr _ _ ( self ) : # - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | return binomialdistbase. _ _ repr _ _ ( self )
[ -0.44936591386795044, -1.532304286956787, 0.6720048785209656, -1.329260230064392, -0.8452738523483276, 0.23039163649082184, -0.038057394325733185, -0.05095333233475685, 0.5089523196220398, 0.26920264959335327, -0.7080307602882385, 0.7208840250968933, 0.06254392862319946, -0.568225324153900...
def logout ( ) : if'uid'in session : del session ['uid'] return redirect ( url _ for ('index') )
[ -0.49668100476264954, -0.16787302494049072, 0.32399052381515503, 0.15971912443637848, 0.04879119619727135, 0.16334335505962372, 0.7283183932304382, 0.4376711845397949, 1.6297459602355957, -0.5679150819778442, 0.860552191734314, 0.14629578590393066, 0.2163987010717392, -0.5209293961524963, ...
def host _ string ( self, vapp ) : assert isinstance ( vapp, libcloud. compute. base. node ) if vapp. private _ ips : return vapp. private _ ips [ 0 ] else : print ( red ('server ip is unknown') ) return''
[ -0.34274694323539734, 0.2697201371192932, 0.36976736783981323, 0.16275516152381897, -0.3618670403957367, 0.5728714466094971, -0.8675026297569275, -0.7906885743141174, -0.21668419241905212, 0.5110506415367126, 1.6168750524520874, 0.13647475838661194, -0.47855526208877563, -1.174324870109558...
def patcher ( self, xml _ path ) : log. debug ( " executing volatility patcher plugin on " " { 0 } ". format ( self. memdump ) ) self. _ _ config ( ) self. config. write = true self. config. xml _ input = xml _ path command = self. plugins [ " patcher " ] ( self. config ) scanner, addr _ space = command. calculate ( ) ...
[ 0.06400534510612488, -1.3782039880752563, 0.49221402406692505, -0.3685602843761444, -0.5431579351425171, -0.5104532241821289, 0.26306450366973877, 0.1291116178035736, 0.2379007786512375, 0.3222929835319519, -0.3333326280117035, -0.5830612182617188, -0.6741170287132263, 0.15378519892692566,...
def sync _ from ( self, src, dest, verbose = true ) : self. _ raise ( )
[ 0.3089013993740082, 0.5890377163887024, 0.3759651184082031, 1.0056265592575073, -0.22622846066951752, 0.2057211697101593, -0.9578484892845154, -0.6324312090873718, -0.41132214665412903, 0.8206928968429565, -0.1378956288099289, 1.2421975135803223, 0.5905579924583435, -0.10435733199119568, ...
def test _ state _ print ( self, capfd ) : result = result ( np. array ( [ [ 1, 2 ], [ 3, 4 ], [ 5, 6 ] ] ), is _ stateful = true ) print ( result ) out, err = capfd. readouterr ( ) assert " modes = 2 " in out assert " shots = 3 " in out assert " contains state = true " in out
[ 0.09149646013975143, -0.46154460310935974, 0.340584397315979, 0.23577022552490234, 0.022415775805711746, -0.22202910482883453, -0.3877864480018616, -0.529827356338501, -0.14172355830669403, 0.04943634942173958, -0.22613254189491272, 0.18397961556911469, -0.162791445851326, -0.2241007685661...
def get _ color ( i, j, holes ) : for hole in holes : if hole [ 2 ] = = i and hole [ 3 ] = = j : return hole [ 1 ] ; return none _ color
[ -0.08174525946378708, -0.49147316813468933, 0.4723786413669586, -0.22415733337402344, 0.04464744031429291, 0.03524130955338478, 0.36350810527801514, -1.1745762825012207, -0.4587249755859375, 1.2553660869598389, 0.6583881974220276, 0.8016326427459717, -0.6368387937545776, -0.644833385944366...
def validate _ transaction _ error _ trace _ attributes ( required _ params = { }, forgone _ params = { }, exact _ attrs = { } ) : @ transient _ function _ wrapper ('newrelic. core. stats _ engine ','statsengine. record _ transaction') def _ validate _ transaction _ error _ trace ( wrapped, instance, args, kwargs ) : t...
[ -0.4085111618041992, 0.42231860756874084, 0.5399465560913086, -0.5114445686340332, 0.27370956540107727, 0.15872880816459656, 0.22200670838356018, -0.4388328790664673, -0.20414838194847107, 0.9738701581954956, -0.04897984862327576, -0.039883099496364594, 0.7996002435684204, -0.0146760456264...
def testtfsummarytensor ( self ) : event _ sink = _ eventgenerator ( self, zero _ out _ timestamps = true ) writer = test _ util. filewriter ( self. get _ temp _ dir ( ) ) writer. event _ writer = event _ sink with tf. compat. v1. graph ( ). as _ default ( ) : with self. test _ session ( ) as sess : tensor _ summary = ...
[ -0.006093568168580532, -0.1233624815940857, 0.6926183700561523, -0.18445242941379547, 0.5339668393135071, -0.40816816687583923, 0.8335990309715271, -0.6180429458618164, 0.18126732110977173, -0.01593404822051525, -0.5070741772651672, -0.04961637780070305, 0.6648122668266296, -0.432546466588...
def visit ( self, example : example ) : image = example. get _ image ( ) self. modification _ information = modificationinformation ( image, self. preference. border _ proportion ) self. pre _ process _ image ( ) if self. preference. should _ rotate : self. apply _ rotation _ transformation ( ) if self. preference. sho...
[ -0.6695892810821533, 0.26358452439308167, 0.7314989566802979, -0.536472737789154, -0.4200502932071686, -0.35299116373062134, 1.0722384452819824, -0.3222750723361969, 0.4689484238624573, 0.2778373956680298, 0.041678011417388916, 0.6309000849723816, -0.10473539680242538, 1.297523021697998, ...
def slurp ( path ) : try : with open ( path ) as f : return f. read ( ). strip ( ) except ioerror : raise ioerror
[ 0.7446134090423584, -0.027499649673700333, 0.7226263284683228, -0.9972659945487976, -1.0414400100708008, 0.6034001708030701, -0.624756395816803, -0.3334628641605377, -0.3048296868801117, 0.5084180235862732, 1.1091405153274536, 0.1691870242357254, 0.8689917325973511, -1.7097574472427368, ...
def test _ 508 _ kruskal _ matched _ all _ empty ( self ) : np. random. seed ( 987654321 ) x _ input _ array = [ np. nan, np. nan, np. nan, " four ", np. nan ] y _ input _ array = [ " one ", " two ", " three ", " four ", " five " ] alpha = 0. 05 self. assertraises ( nodataerror, lambda : kruskal ( x _ input _ array, y ...
[ -0.3239515423774719, 0.27101919054985046, 0.4695594906806946, -0.33836331963539124, 0.06594380736351013, 0.6829880475997925, 0.3553541302680969, -0.336008220911026, -0.4835309684276581, 0.04853295162320137, -0.13329529762268066, 0.25986209511756897, 0.034966856241226196, 1.4049668312072754...
def _ mgui _ set _ choices ( self, choices : iterable [ tuple [ str, any ] ] ) - > none : choices _ = list ( choices ) if not choices _ : self. _ qwidget. clear ( ) return choice _ names = [ x [ 0 ] for x in choices _ ] # remove choices that no longer exist for i in range ( self. _ qwidget. count ( ) ) : if self. _ qwi...
[ -0.8148303627967834, -0.09008480608463287, 0.5208726525306702, -0.5254116654396057, 0.23834273219108582, 0.39256516098976135, -0.4630272686481476, -0.4320983290672302, -0.2171395719051361, 1.0831588506698608, -0.4314199686050415, -0.2664519250392914, -0.0862543135881424, 0.5817907452583313...
def remove _ product ( list _ of _ product _ objects ) : print ( " you have selected to remove an existing product from the list " ) product _ name = input ( " please, provide the name of the product you wish to remove : " ) found = false for product in list _ of _ product _ objects : if product. product _ name = = pro...
[ -0.7143616676330566, -0.9622552990913391, 0.5230385065078735, 0.6161701083183289, -0.05781196430325508, 0.3593097925186157, 0.6917447447776794, 0.027503764256834984, 0.5128858089447021, 0.8555912375450134, -0.9256683588027954, -0.0879448726773262, -1.0049077272415161, -0.34205713868141174,...
def all _ survey _ package _ instances ( self, client ) : all _ survey _ package _ instances = client. all _ survey _ package _ instances ( ) return all _ survey _ package _ instances
[ -0.7326756119728088, 0.24382413923740387, 0.19170893728733063, 0.3069503605365753, -0.7425628304481506, 0.9068198800086975, -0.4622932970523834, -0.499900221824646, 0.8207201957702637, -0.04503866285085678, 0.05981094017624855, 0.13169680535793304, -0.8720557689666748, 0.04738364741206169,...
def parse _ metadata ( metadata ) : x = etree. parse ( metadata ) root = x. getroot ( ) def get _ field ( matcher ) : match = root. find ( '. / opf : metadata / dc : % s'% matcher, namespaces = namespaces ) if match is none : return'' return match. text id _ = get _ field ('identifier [ @ id = " calibre _ id " ]') if n...
[ -0.23206552863121033, -0.02390613965690136, 0.4746636748313904, -0.7388430237770081, -0.7557719945907593, -0.4339767396450043, -1.2853310108184814, -1.1027170419692993, -0.09806171804666519, 0.12595869600772858, -0.9465776085853577, -0.5853271484375, -0.12406499683856964, 0.180919364094734...
def norm ( self ) - > float : return math. hypot ( self. x, self. y )
[ 0.16836388409137726, -0.5439332127571106, 0.2676353454589844, 0.7547634243965149, 0.4173455238342285, 0.23092740774154663, -0.10041036456823349, -0.2955506145954132, -0.5281303524971008, -0.7262237668037415, 0.07092800736427307, 0.46261170506477356, -0.1503777951002121, -0.3721109628677368...
def get _ licensees _ ok ( ) : date = datetime. now ( ). isoformat ( ) [ : 10 ] licensee _ folder = os. path. join ( '. datasets ', date ) licensee _ files = [ ] for url in licensee _ lists : files = download _ website _ pdfs ( url, licensee _ folder ) licensee _ files + = files frames = [ ] for file _ name in licensee...
[ 0.28377071022987366, -0.26533573865890503, 0.5178086757659912, 0.37019017338752747, 0.03500298783183098, 0.26370948553085327, -0.1710420399904251, 0.9801132082939148, 0.02471654675900936, 0.2267298847436905, 0.3439522087574005, 0.5790049433708191, -0.003162459935992956, 0.03534423559904098...
def _ update _ category _ data ( self ) : pass
[ -1.5126301050186157, -1.1989026069641113, 0.22172342240810394, -0.2306201010942459, -0.6598140597343445, 1.071985125541687, -0.04034418612718582, 0.09651678055524826, -0.6215183734893799, -0.358599990606308, 0.20620723068714142, 0.13357670605182648, 0.7902963757514954, 0.6171607375144958, ...
def id ( self ) : # freezedicts ( ) allows filters to return dict objects as part # of unique ( ), which are not per - se supported by hash ( ). return hash _ func ( ( self. name, freezedicts ( self. unique ( ) ), ) )
[ 0.10799955576658249, -0.08266191929578781, 0.39274314045906067, -0.4665180444717407, 0.037979379296302795, 0.29523539543151855, 0.05372793227434158, 0.08964049071073532, 0.45027419924736023, -0.015319275669753551, -1.171149492263794, 0.22616790235042572, -0.34883949160575867, -0.6539278626...
def _ _ init _ _ ( self, tree, lines, src _ ast, file = sys. stdout ) : self. calls = self. crop _ calls ( lines, src _ ast ) self. variable, self. return _ vars = self. crop _ vars ( lines, src _ ast ) self. mod _ calls = [ ] self. functions = src _ ast. functions self. classes = src _ ast. classes self. lines = lines...
[ -0.09745756536722183, -0.6621530055999756, 0.8835616707801819, -0.43532368540763855, -0.8425766825675964, -0.48440685868263245, -0.34624359011650085, -0.13660548627376556, -0.38841623067855835, 0.27578988671302795, -0.1928214281797409, 0.2218443751335144, 0.5909835696220398, 1.057032942771...
def getmouseclick ( self, event, x, y, flags, param ) : if event = = cv2. event _ lbuttondown : print ( x ) print ( y )
[ 1.5350134372711182, -1.4003913402557373, 0.6706662178039551, 0.6984611749649048, 0.3263556659221649, 0.4399986267089844, -0.0034855264239013195, -0.5620325803756714, 0.20973607897758484, -0.2709418833255768, 0.048389583826065063, 0.8873282074928284, 0.11169803887605667, -0.0032331035472452...
def get _ distributions _ for _ course ( course, teachers, print _ errors ) : course _ data = { } for teacher in teachers : department, _, code = course. partition ('' ) url ='http : / / cape. ucsd. edu / responses / results. aspx? coursenumber ='+ department +'+'+ code +'& name ='+ teacher. replace ('','% 20') post = ...
[ -0.733103334903717, 0.34067288041114807, 0.6347538232803345, -0.6929931640625, -0.3607693612575531, 0.07035226374864578, -0.030500048771500587, -0.0037813701201230288, -0.7403812408447266, 0.49855664372444153, 0.7500864267349243, 0.041308145970106125, 0.6898810863494873, 0.8460832834243774...
def _ filtered ( msg : str ) - > str : fmt = filteredsecretsformatter ('% ( msg ) s') rec = logging. makelogrecord ( dict ( msg = msg ) ) return fmt. format ( rec )
[ 0.8032679557800293, 0.20899932086467743, 0.42595788836479187, -1.0876504182815552, -1.0341322422027588, -0.41452884674072266, -0.06854788213968277, -0.7214417457580566, -0.08217228949069977, -0.10691489279270172, 0.33519038558006287, 0.9675925374031067, 0.4517682194709778, 0.47643032670021...
def easimple ( population, toolbox, cxpb, mutpb, ngen, stats = none, halloffame = none, logger = none, verbose = _ _ debug _ _, bar = none, const _ gene = none ) : if const _ gene : set _ gene _ value ( population, const _ gene ) last _ gen = time. time ( ) logbook = tools. logbook ( ) logbook. header = ['gen ','nevals...
[ -0.4664170742034912, -0.21022763848304749, 0.8704379200935364, 0.5408949851989746, -0.30269259214401245, 0.7645441889762878, -0.20136462152004242, -0.1463041603565216, -0.6718901991844177, 0.2309613972902298, -0.34607556462287903, 0.4564972221851349, -0.2838831841945648, 0.4887394011020660...
def _ check _ color ( ) : plat = sys. platform supported _ platform = plat! ='pocket pc'and ( plat! ='win32'or'ansicon'in os. environ ) # isatty is not always implemented. is _ a _ tty = hasattr ( sys. stdout,'isatty') and sys. stdout. isatty ( ) if supported _ platform and is _ a _ tty : return true else : return fals...
[ -0.25878024101257324, 0.17492204904556274, 0.703083872795105, 0.1587693840265274, -0.5710171461105347, 0.442033052444458, -0.7392616868019104, -0.3870701193809509, -0.713786244392395, 0.06534327566623688, 0.7347268462181091, 0.5733038187026978, 0.03843247517943382, 0.9779895544052124, -0...
def show ( self ) : self. build _ dataset ( ) self. plot ( ) plt. show ( )
[ 1.1207935810089111, 0.2864997088909149, 0.1810496747493744, -0.1370547115802765, -0.3176179826259613, 0.5181968808174133, 1.1500836610794067, 1.1474865674972534, 0.018504885956645012, -0.9775541424751282, 1.0661360025405884, 2.250866413116455, 0.8942024111747742, -0.0029772520065307617, ...
def interp _ shapcoefs ( self, nmax, tr _ psf _ cf, psfcoords, imshape, compress, plot ) : x, y = n. transpose ( psfcoords ) index = [ ( i, j ) for i in range ( nmax + 1 ) for j in range ( nmax + 1 - i ) ] xi = x yi = y xo = n. arange ( 0. 0, round ( imshape [ 0 ] ), round ( compress ) ) yo = n. arange ( 0. 0, round ( ...
[ 0.39392074942588806, 0.24903708696365356, 0.7607678174972534, -0.5013716220855713, 0.0647650957107544, -0.11239032447338104, 0.11019421368837357, -0.31265291571617126, -0.7613620758056641, 0.39180147647857666, -0.21286541223526, -1.119263768196106, -0.22679954767227173, -0.0220416970551013...
def callback _ query _ unknown ( self, bot : bot, update : update ) - > none : self. logger. info ( " unknown callback query'% s'from % s ", update. callback _ query. data, self. _ log _ user ( update. callback _ query. from _ user ) ) bot. answer _ callback _ query ( callback _ query _ id = update. callback _ query. i...
[ 0.12495318800210953, -0.8677911758422852, 0.5121870636940002, 0.41446614265441895, -0.4760948121547699, 0.03977234289050102, -0.3098391592502594, -0.2439708560705185, 1.3216524124145508, -0.5258041620254517, 0.41145357489585876, 0.650591254234314, -0.49638453125953674, 0.07013703882694244,...
def temporarily _ as _ real _ root ( setenv = true ) : return _ set _ uids ( true, true, setenv = setenv )
[ -0.2349269837141037, -0.167967289686203, 0.4046158790588379, 0.6377648711204529, -0.38660162687301636, 0.3511418104171753, 0.2645954191684723, -0.2211272418498993, 0.7562220096588135, 0.30862951278686523, -0.5547806620597839, 1.1182752847671509, -0.4898384213447571, 0.47090858221054077, ...
def check _ session ( self, lo ) : if lo. status! = login. status _ accepted : # if we got here, it should never happen that the login is not accepted # anyway this will fix any unexpected behaviour lo. delete ( ) raise authenticationerror ( " not a valid session " ) now = time. time ( ) if ( now - lo. created ) > = se...
[ -0.22684454917907715, -0.2939946949481964, 0.55643230676651, 0.2880508303642273, -0.19995808601379395, 0.5477185249328613, -0.28937217593193054, -0.45765724778175354, 1.4905617237091064, 0.26456424593925476, 0.18656636774539948, 0.04849940538406372, 0.2372601479291916, 0.21734356880187988,...
def tesselate ( self, vorogenp, vorogens, tile _ prop, tess _ method, tess _ sc, tess _ fuzzy, generators, gencode, shape ) : wtfn = {'unity': lambda x : n. ones ( len ( x ) ), \'log10': n. log10, \'sqrtlog10': lambda x : n. sqrt ( n. log10 ( x ) ), \'roundness': n. array } tile _ list, tile _ coord, tile _ snr = tile ...
[ 0.13249285519123077, -0.19901590049266815, 0.27128323912620544, -0.3654790222644806, -0.10849125683307648, -0.889568567276001, -0.27861252427101135, -0.07568130642175674, -0.047224435955286026, 0.33275488018989563, 0.2201559692621231, 0.2590906620025635, 0.5346036553382874, 0.1501931697130...
def stitch _ list ( l ) : l = [ str ( i ) for i in l ] # convert all elements to string l =''. join ( l ) # stitch them together return l
[ -0.36244896054267883, -0.4551948308944702, 0.6650429368019104, -0.36908048391342163, -0.6198321580886841, 0.8960803747177124, -1.1017045974731445, 0.8230705261230469, 0.8952906727790833, 0.1596219390630722, -1.0397108793258667, -0.47782987356185913, -0.6026938557624817, 0.5200402736663818,...
def _ translate _ _ interfaces _ state _ interface _ ipv6 ( input _ yang _ obj, translated _ yang _ obj = none ) : if input _ yang _ obj. forwarding. _ changed ( ) : input _ yang _ obj. forwarding = input _ yang _ obj. forwarding if input _ yang _ obj. mtu. _ changed ( ) : input _ yang _ obj. mtu = input _ yang _ obj. ...
[ -0.9581428170204163, -0.07367570698261261, 0.2845318913459778, -0.6875414848327637, -0.7119218707084656, -0.19019454717636108, 1.1224802732467651, -0.25527405738830566, 1.0076264142990112, 0.5361156463623047, -0.5258021950721741, -0.614018440246582, -0.42170435190200806, -0.269716262817382...
def simulate ( self, n = 100, pack = false, cutoff ='truncate') : return super ( ). _ simulate ( ( n, false, lambda s : self. r * s, lambda s, sigma : sigma * s * * self. beta, true, lambda sigma : 0, lambda sigma : self. alpha * _ modify ( sigma, cutoff ), self. rho ), pack )
[ -0.44072040915489197, 1.0164860486984253, 0.5644012689590454, 0.06108418107032776, -0.46135109663009644, -0.2706296741962433, -0.05916554108262062, -0.5887538194656372, 0.2565530240535736, 0.25627410411834717, -0.7165696620941162, -0.6980544328689575, -0.03732782602310181, -0.0528624095022...
def replenish ( self, key, rate, capacity ) : try : # note ( kgriffs ) : correctness of this algorithm assumes # that the calculation of the current time is performed # in the same order as the updates based on that # timestamp, across all threads. if an older " now " # completes before a newer " now ", the lower token...
[ -0.16740302741527557, -0.2573508322238922, 0.8392453193664551, -0.7020984292030334, -0.20280307531356812, -0.5151225328445435, 0.45391035079956055, -0.46500009298324585, -0.5412919521331787, 0.03649221733212471, -0.3835030496120453, 0.00510404072701931, -0.4293355643749237, -0.349291235208...
def test _ explicit _ page _ handling ( self ) : response = self. client. get ( reverse ('test - pagination ', kwargs = {'page': 1 } ) ) valid _ url = " / forum / test - pagination / " self. assertequal ( response ['location'], valid _ url )
[ 0.014611330814659595, -0.03829824551939964, 0.5443311929702759, -0.05250176414847374, 0.9968761205673218, 0.6041216850280762, 0.42767927050590515, 0.44371771812438965, 0.458917498588562, -1.1876373291015625, 0.33952397108078003, -0.4665369689464569, 0.39769446849823, 0.5066617727279663, ...
def from _ data ( cls, data, builder ) : obj = cls ( builder = builder ) obj. data = data return obj
[ 0.7010946273803711, -0.40643608570098877, 0.21793460845947266, 0.5607438683509827, -1.1706186532974243, 0.7552960515022278, -0.5862181186676025, 0.5648428201675415, 0.5380849838256836, -1.2549844980239868, -0.4514225721359253, 0.3056783378124237, 0.12239889055490494, -0.1256902813911438, ...
def _ get _ ngram _ counter ( ids, n ) : # remove zero ids used to pad the sequence. ids = [ token _ id for token _ id in ids if token _ id! = 0 ] ngram _ list = [ tuple ( ids [ i : i + n ] ) for i in range ( len ( ids ) + 1 - n ) ] ngrams = set ( ngram _ list ) counts = collections. counter ( ) for ngram in ngrams : c...
[ -0.8700218796730042, 0.35382091999053955, 0.4168495535850525, -0.1703067123889923, -0.1371237337589264, -0.9610148668289185, -0.15328870713710785, -0.4195716977119446, 0.07740514725446701, 0.5880667567253113, -1.1741282939910889, 0.07527077943086624, -0.2611543536186218, 0.4269665777683258...
def _ _ enter _ _ ( self ) : attempts, reason = 5, self. _ check _ request _ reason ( ) while attempts and reason! ='ok': if reason = ='forbidden': msg _ ='user access denied, update credentials.'raise requests. exceptions. connectionerror ( msg _ ) attempts - = 1 time. sleep ( 5 ) reason = self. _ check _ request _ re...
[ -0.13682754337787628, 0.41650494933128357, 0.6180352568626404, 0.10548712313175201, -0.32956627011299133, 0.11927444487810135, 0.0780705064535141, -1.1949652433395386, -0.2650807499885559, -0.6099573969841003, 1.2396767139434814, 0.746518611907959, -0.8306154608726501, -0.39619171619415283...
def organization ( self ) : return self. _ tower. get _ organization _ by _ id ( self. _ data. get ('organization') )
[ 0.2279399335384369, 0.8191536664962769, 0.14724037051200867, 1.0593171119689941, 0.6703889966011047, -0.29652631282806396, 0.18022149801254272, -0.8688448667526245, 0.3705296516418457, 0.17491978406906128, 0.6017192602157593, 0.41127538681030273, 0.1480114907026291, -0.4683239459991455, ...
def asgi _ middleware ( self, middleware : t ) - > t : self. _ asgi _ middlewares. append ( middleware ) return middleware
[ -0.5853132009506226, 0.3329722583293915, 0.44437605142593384, -0.00958408322185278, -0.6970136761665344, 0.35883036255836487, -1.4303054809570312, -0.403732031583786, 0.42531365156173706, -0.42309704422950745, -0.39533841609954834, -0.00973887462168932, -0.24376866221427917, 0.954746663570...
def mapfeature ( x1, x2 ) : degree = 6 out = np. ones ( ( x1. shape [ 0 ], ( degree + 1 ) * ( degree + 2 ) / 2 ) ) # we map the two features to ( degree + 1 ) * ( degree + 2 ) / 2 features index = 0 for i in range ( 0, degree ) : for j in range ( 0, degree - i + 1 ) : out [ :, index ] = ( x1 * * i ) * ( x2 * * j ) inde...
[ -0.35166844725608826, -0.3498203754425049, 0.600951611995697, 0.7078970074653625, -0.23446200788021088, -0.3673912286758423, 0.36908072233200073, 0.5845304131507874, -0.07941632717847824, 0.46558669209480286, -0.374478816986084, 0.8830670714378357, 0.13267625868320465, -1.091064214706421, ...
def discard _ authorization _ code ( self, client _ id, code ) : key ='oauth2. authorization _ code. % s : % s'% ( client _ id, code ) self. redis. delete ( key )
[ 0.6506433486938477, 0.4030466377735138, 0.3671744763851166, -0.2932737469673157, -0.822230339050293, 0.047557976096868515, -0.13861632347106934, 0.8060725927352905, 0.11240918934345245, 1.0180994272232056, 0.5755191445350647, 0.8057941198348999, -0.22570927441120148, -0.24207158386707306, ...
def store _ centroids ( new _ labels, new _ labeled _ data, inter _ medoids _ dict, hydro _ names, labels = none, labeled _ data = none, medoids _ dict = none, keep _ labeled _ data = true ) : # store the correctly identified data and its labels if keep _ labeled _ data : if labels is none : labels = deepcopy ( new _ l...
[ -0.20496319234371185, -0.934100329875946, 0.5905855298042297, -0.7986348867416382, -0.096242755651474, 0.6556476950645447, -0.2905459702014923, 0.44403076171875, 0.1368199735879898, 0.7455082535743713, 0.06144338101148605, 0.7425746321678162, -0.931714653968811, -0.19989199936389923, 0.7...
def itersegments _ oriented ( self ) : yield segment ( self. pt1. x, self. pt1. y, self. pt1. x, self. pt2. y ) # left yield segment ( self. pt1. x, self. pt2. y, self. pt2. x, self. pt2. y ) # top yield segment ( self. pt2. x, self. pt2. y, self. pt2. x, self. pt1. y ) # right yield segment ( self. pt2. x, self. pt1. ...
[ -0.9063186049461365, -0.46744295954704285, 0.7782449722290039, -0.2757567763328552, 0.7127189040184021, 0.6915910840034485, 0.432913601398468, -1.7442808151245117, -0.3060680329799652, 0.3352448642253876, 0.04224015027284622, -0.2265051156282425, 0.09774849563837051, -0.2837485373020172, ...
def backup _ resource _ to _ folder ( resource _ record, destination _ folder ) : uploaded _ files = [ ] file _ path, metadata _ file _ path = download _ resource _ file ( resource _ record, destination _ folder ) # https : / / github. com / box / box - python - sdk / blob / master / docs / usage / files. md # upload -...
[ 0.15698888897895813, -0.3145870566368103, 0.6396926641464233, 0.03338678926229477, 0.06214487552642822, 0.3943426311016083, 0.01122729480266571, 0.021273871883749962, -0.9161301851272583, 1.18961501121521, 0.082089863717556, -0.2310430258512497, 0.43374103307724, 0.20272883772850037, -0....
def gen _ bit _ values ( number ) : digits = bin ( number ) [ 2 : ] return map ( int, reversed ( digits ) )
[ -1.0820709466934204, 0.8232160210609436, 0.8409242033958435, 0.6106100678443909, 0.7088407874107361, 0.5804404616355896, 0.021474488079547882, -0.16812561452388763, -0.5918704867362976, -0.4210878908634186, -0.8471289873123169, 0.4445306062698364, 0.6109068393707275, 0.681640088558197, 0...
def place ( self, sector ) : self. sector = sector ev = characterplaceevent ( self ) self. evmananger. post ( ev )
[ 0.5063639879226685, -0.8596205711364746, 0.3603467643260956, -0.7511098980903625, 0.3775656521320343, 0.43197575211524963, 0.28053051233291626, 0.29983681440353394, 0.5091028213500977, -0.39562323689460754, -1.4163886308670044, -0.17011061310768127, -0.24399831891059875, 0.5546895265579224...
def test _ cancel _ task ( c, users : list [ user ], flights : list [ flight ] ) : def callback ( request : httprettyrequest, uri, response _ headers ) : body = request. parsed _ body assert " uuid " in body # body [ uuid ] is a list, probably to support repeated keys assert body [ " uuid " ] [ 0 ] = = str ( flights [ ...
[ -0.21486523747444153, 0.9921367764472961, 0.6655234694480896, 0.11268866807222366, -0.07100865989923477, 0.11111948639154434, -0.40796002745628357, 0.4208816587924957, -0.4969729781150818, 0.13678522408008575, -0.3984764516353607, -0.4859045147895813, 0.017693452537059784, 0.15953771770000...
def get _ bit _ values ( number, size = 32 ) : number + = 2 * * size return list ( map ( int, bin ( number ) [ - size : ] ) )
[ -0.5433325171470642, 1.0254327058792114, 0.7711830735206604, 1.1036206483840942, -0.13044729828834534, 0.5877198576927185, -0.06308192014694214, -0.8112980127334595, 0.10051611065864563, -0.34391048550605774, -1.4459882974624634, 0.764693021774292, 0.049260158091783524, 0.3234103322029114,...
def test _ priority _ uniqueness ( self ) : project = project. objects. create ( name ='proj1 ', slug ='proj1') sprint = sprint. objects. create ( number = 1, project = project ) i4 = item. objects. create ( summary ='item4 ', priority = 4, sprint = sprint ) try : i5 = item. objects. create ( summary ='item5 ', priorit...
[ 0.4614699184894562, 0.6160153746604919, 0.4577452838420868, 0.8030270934104919, 1.3279434442520142, 0.7269105911254883, -0.10307297855615616, 0.34747955203056335, 0.24949312210083008, -0.5704757571220398, -1.0367628335952759, -0.8138800263404846, -0.39785632491111755, 0.06545065343379974, ...
def create _ spot _ feed ( api _ key : str, password : str ) - > spot _ sdk. feed : if not isinstance ( password, str ) : return spot _ sdk. feed ( api _ key ) else : return spot _ sdk. feed ( api _ key, password )
[ -0.0914824828505516, -0.4706704318523407, 0.31214600801467896, 0.024242324754595757, 0.2906263470649719, -0.5438638925552368, -1.1488373279571533, -0.13120250403881073, 0.20011837780475616, 0.07932992279529572, 0.8028867244720459, 0.8454569578170776, -0.9126306176185608, -0.248107969760894...
def dice ( bot, message ) : rest = message ['text']. replace ( " ", " " ) # remove all whitespace results = [ ] total = 0 terms = 0 if rest. count ( " + " ) + rest. count ( " - " ) > = terms _ cutoff : return try : while rest : terms + = 1 mult, how _ many, sides, rest = re. match ( r " ( [ \ + \ - ]? ) ( \ d * ) d ( \...
[ -0.4455016255378723, 0.6853981018066406, 1.048067331314087, -0.15264640748500824, -0.19690324366092682, -0.08991212397813797, 0.16006158292293549, -0.07540228962898254, 0.4940173625946045, 0.07395203411579132, 0.6681572198867798, 0.036270007491111755, -0.7979664206504822, 0.106908649206161...
def fixture _ observations _ input _ files ( observations _ input _ files _ raw : dict, ) - > mipdnaobservationsinputfiles : return mipdnaobservationsinputfiles ( * * observations _ input _ files _ raw )
[ -0.6638349890708923, -0.2836642563343048, 0.4506426751613617, -0.6718972325325012, -0.5784815549850464, 0.791915774345398, 0.5129860043525696, 0.06712798774242401, 0.20778198540210724, -0.20436115562915802, 0.20568013191223145, -0.661260724067688, 0.5583942532539368, -0.976530134677887, ...
def test _ set _ vcs _ labeling _ options ( self ) : pass
[ -0.3562137484550476, -0.06979662925004959, 0.2604671120643616, 0.2137446403503418, 0.3467879593372345, 0.1918182373046875, 0.5912790298461914, -0.023515410721302032, 0.5863626003265381, 0.19454902410507202, -0.885818600654602, -0.2644527554512024, -1.0274256467819214, -0.14249522984027863,...
def literal _ question _ distance ( question, ( answer, doc _ num, index, features, q _ id ) ) : doc = chunker. clean _ punctuation ( init. get _ doc ( doc _ num ) ) ( start, _, length ) = find _ match ( question, doc ) words = doc. split ( ) index = len ( " ". join ( words [ 0 : index + 1 ] ) ) return ( min ( abs ( st...
[ 0.8185341358184814, -1.1158440113067627, 0.6780102849006653, -0.9553256630897522, -0.8569431900978088, 0.4378231465816498, -0.30284830927848816, 0.17812421917915344, 0.3800358176231384, 0.10646453499794006, -0.4615526497364044, -0.3000636398792267, -0.23474662005901337, -0.661229133605957,...
def parse _ edit _ args ( args : list [ str ], flags : list [ str ] ) - > tuple [ union [ str, int, bool, none ] ] : message = none colored = true time = none mins = none if long _ nocolor _ flag in flags : colored = false flags. remove ( long _ nocolor _ flag ) if len ( flags ) = = 1 and not args and flags [ 0 ] not i...
[ -0.39807531237602234, 0.1893027275800705, 0.7445358633995056, -1.0715994834899902, 0.5329034328460693, -0.16596217453479767, -0.38001692295074463, -0.9083400368690491, -0.7474467754364014, 0.6563566327095032, -0.10613692551851273, 1.1925380229949951, -0.9343088269233704, 0.7286041975021362...
def devicetree ( self ) : log. debug ( " executing volatility devicetree module on { 0 } ". format ( self. memdump ) ) self. _ _ config ( ) results = [ ] command = self. plugins [ " devicetree " ] ( self. config ) for _ object _ obj, driver _ obj, _ in command. calculate ( ) : new = { " driver _ offset " : " 0x { 0 : 0...
[ -0.26159098744392395, -0.5171465277671814, 1.0700193643569946, -0.8328847885131836, 0.03729919716715813, -0.06812300533056259, 0.2036942094564438, -0.28776299953460693, -0.03428835794329643, 0.5160663723945618, -0.06532149016857147, -0.07195638120174408, -0.05410918593406677, 1.12822043895...
def read _ from _ tokens ( tokens ) : token = tokens. pop ( 0 ) if token = ='(': y = z = cell ( nil, nil ) while tokens [ 0 ]! =')': if tokens [ 0 ] = = '.': tokens. pop ( 0 ) y. cdr = read _ from _ tokens ( tokens ) if tokens [ 0 ]! =')': raise syntaxerror (') is expected') break e = read _ from _ tokens ( tokens ) y....
[ 0.04285804182291031, -0.5873742699623108, 0.7547578811645508, -0.42124512791633606, -0.7752180099487305, -0.7072192430496216, -0.23918649554252625, -0.5144919157028198, -0.15901696681976318, -0.06396736204624176, 0.7217860817909241, -0.08505908399820328, 0.2022705078125, -0.569695353507995...
def test _ status _ subtask _ failed ( self ) : task1 = statussimulatingtaskproxy ( ) task2 = statussimulatingtaskproxy ( ) ctask = taskcontainer ('tester') ctask. add _ task ( task1 ) ctask. add _ task ( task2 ) self. verify _ status ( status _ failed, status _ stopped, status _ failed, ctask ) self. verify _ status (...
[ 0.7442701458930969, 0.4625689387321472, 0.6134178042411804, 1.0874767303466797, 0.00004245433592586778, 0.9867761135101318, 0.45273923873901367, -0.07226579636335373, -0.1608135849237442, -0.8697880506515503, -1.6167316436767578, -0.18043574690818787, 0.2970987558364868, 0.6550357341766357...
def _ _ twocomplement ( value ) : # check if the bit at position 255 is set if value & 2 * * 255 = = 2 * * 255 and value > 0 : # if yes, the sign bit is set return ( 2 * * 256 - value ) * - 1 # in case we have a negative value, we make the 2 complement of it if value < 0 : return 2 * * 256 + value return value
[ -0.3995699882507324, -1.1498695611953735, 0.9044936895370483, -0.12841860949993134, -0.710146427154541, -0.5460969805717468, 0.6006754040718079, -0.373732328414917, 0.2535882592201233, 0.035129982978105545, -0.340230256319046, -0.45251986384391785, 0.2076907753944397, 0.9262619018554688, ...
def drawspike ( self ) : if not self. collitionactive : for spike in self. spikelist : spike. update ( )
[ -0.02188665047287941, -0.7228251099586487, 0.2245425134897232, -0.07584425061941147, 1.0868321657180786, 0.48142069578170776, 0.12936410307884216, 0.8438042998313904, 0.5766336917877197, 0.5270229578018188, -0.5192843079566956, -0.14713068306446075, -0.8166331648826599, 0.33207374811172485...
def gibbs ( self, init _ batch, init _ batch _ len, granularity = 1 ) : accept _ rate = 0 with torch. no _ grad ( ) : noise = init _ batch. clone ( ) right _ bound = init _ batch. shape [ 1 ] - 1 for t in range ( 1, right _ bound, granularity ) : # mask the t - granularity tokens b = init _ batch. size ( 0 ) # batch si...
[ -0.1409800797700882, 0.13563969731330872, 0.9492970705032349, 0.085311159491539, 0.37257635593414307, -0.48132309317588806, -0.5306949615478516, 0.11722678691148758, -0.22819362580776215, 1.219007968902588, 0.07430127263069153, 0.9690247774124146, -0.019508810713887215, 0.4454958736896515,...
def counter ( self ) - > bytearray : return self. _ counter
[ 0.15071967244148254, -0.8722127676010132, 0.3147355616092682, 0.15151941776275635, -0.3177701532840729, 0.8641717433929443, 0.7190564870834351, -0.5819692015647888, 0.39620205760002136, -1.0687240362167358, -0.19424518942832947, 0.3002609610557556, -0.6832934617996216, 0.3843081295490265, ...
def execute ( self, oldstate ) : state = state ( oldstate, self. offset + ( 3 if self. value is not none else 1 ) ) # pure functional stuff self. visited = true if self. op _ name = ='nop': pass elif self. op _ name in ('load _ const ','load _ name ','load _ fast ','load _ global') : state. push ( self. value ) elif se...
[ -0.820997953414917, -0.392533540725708, 1.0025219917297363, -0.19332993030548096, -0.5468941330909729, -0.8050073385238647, 0.5481069684028625, -0.2853485941886902, 0.15861165523529053, 0.43745648860931396, -0.31954285502433777, -0.08018841594457626, 0.42795661091804504, 0.1270408481359481...
def tick ( self, t, dt ) : self. control _ speed ( t, dt ) self. control _ altitude ( t, dt ) self. control _ direction ( t, dt ) self. platform. tick ( t, dt )
[ -0.01614357903599739, 0.39116722345352173, 0.31051331758499146, 0.13864171504974365, 0.8374772667884827, 0.6512296795845032, -0.007256574463099241, -1.2648746967315674, -1.2425707578659058, 0.1276634782552719, -0.6253857016563416, -0.26767775416374207, 0.7877328395843506, 0.322640538215637...
def save ( self, * args, * * kwargs ) : update _ thread = false if not self. pk : update _ thread = true super ( message, self ). save ( * args, * * kwargs ) if update _ thread : self. thread. last _ message = self self. thread. save ( )
[ -0.6902083158493042, 0.09226632863283157, 0.7293851375579834, 0.061086930334568024, 1.4966511726379395, 0.2909168004989624, -0.310136079788208, -0.11759065836668015, -0.09254378825426102, 0.17946764826774597, -0.474917471408844, -0.23213399946689606, -1.7602248191833496, 1.2196998596191406...
def get _ log _ settings ( self, headers : dict [ str, t. any ] =..., as _ json : t. literal [ false ] =... ) - > service _ pb2. logsettingsresponse :
[ -1.1959031820297241, 0.12837426364421844, 0.5703613758087158, 0.24760164320468903, 0.0494467169046402, -1.0586203336715698, -1.2863377332687378, -1.376131534576416, -0.18158882856369019, 0.2629305124282837, -0.3039219081401825, 0.7776268124580383, -0.6764520406723022, -0.4933250844478607, ...
def load ( self ) : # main frame for the planner self. frame = directframe ( parent = aspect2d, geom = self. gui. find ( " * * / background " ), relief = none, scale = 0. 85, pos = ( 0. 05, 0. 0, 0. 1 ), ) self. titlescale = ttlocalizer. pptitlescale self. _ createnavbuttons ( ) # welcome page shows a party planner and...
[ -0.24116359651088715, 0.23893553018569946, 0.6088187098503113, -0.16185787320137024, -0.03913699835538864, 0.5289922952651978, -0.12592868506908417, 0.054799363017082214, 0.1407957673072815, -0.1598985493183136, -0.10741590708494186, -0.6204246282577515, -0.07023248821496964, 0.58891689777...
def score _ azure ( cls, deployment, source _ url, destination _ url, credential = none, * * kwargs ) : intake _ settings = { " type " : " azure ", } if credential is not none : if isinstance ( credential, credential ) : intake _ settings [ " credential _ id " ] = credential. credential _ id else : intake _ settings [ ...
[ -0.3633590340614319, -0.34929159283638, 0.7201591730117798, -0.038894541561603546, 0.11955465376377106, 0.3514047861099243, -0.4786537289619446, 0.337843656539917, -0.6558385491371155, 1.0774989128112793, 0.3647538721561432, 0.24622493982315063, -0.2223781794309616, 0.21832531690597534, ...
def writefasta ( outfile, mali, line _ width = 60, identifiers = none, skip _ first = 0, gap _ char = none ) : mali _ width = mali. getwidth ( ) mali _ length = mali. getlength ( ) for x in range ( skip _ first, mali _ width ) : if identifiers : outfile. write ( " > " + str ( identifiers [ x ] ) + " \ n " ) else : outf...
[ -0.21398229897022247, -0.4094531536102295, 0.8634318709373474, -0.17604857683181763, -0.342124342918396, -0.09110503643751144, 0.21616965532302856, 0.8122022151947021, 0.10134248435497284, -0.21684107184410095, 0.32557806372642517, -0.0028111848514527082, 0.3399309515953064, 0.554863154888...
def sms ( request, text ) : client = twiliorestclient ( settings. account _ sid, settings. auth _ token ) sms = client. messages. create ( to = " 4105416123 ", from _ = " + 14158892387 ", body = text, ) return httpresponse ( sms. sid )
[ 0.7964152097702026, 0.7256494760513306, 0.5756691098213196, -0.19286343455314636, 0.31363946199417114, 0.1997658610343933, -0.527062714099884, -0.6216757297515869, 1.1486762762069702, -0.3106165826320648, -0.7671107649803162, -0.1431090086698532, -0.6804027557373047, -0.9778999090194702, ...
def make _ circuit _ error _ correction ( qbts ) : assert len ( qbts ) = = 6 c = cirq. circuit ( ) c. append ( [ cnot ( qbts [ 0 ], qbts [ 2 ] ) ] ) c. append ( [ cnot ( qbts [ 0 ], qbts [ 4 ] ) ] ) # deutsch part c. append ( [ x ( qbts [ 1 ] ), x ( qbts [ 3 ] ), x ( qbts [ 5 ] ) ] ) c. append ( [ h ( qbt ) for qbt in ...
[ 0.4702569544315338, -0.47712284326553345, 0.6358246207237244, -0.9324721097946167, -0.3411056697368622, 0.2471076250076294, 0.16511018574237823, -0.3478219211101532, 0.17330166697502136, 0.08461892604827881, -0.10089178383350372, -0.7783817648887634, -0.38239315152168274, 0.265718996524810...
def driver _ allocated _ memory ( ) - > int : return torch. _ c. _ mps _ driverallocatedmemory ( )
[ 0.25447508692741394, -0.6653041243553162, 0.6902564167976379, -0.019407643005251884, 0.4445314407348633, -0.692261278629303, 1.1974700689315796, -0.1266307830810547, 0.9117090702056885, -0.522028923034668, 0.9370715022087097, 0.1862303763628006, -0.5472790002822876, 0.023067044094204903, ...
def plot _ monthly ( p, program ='dark ', monsoon = false, fullmoon = true, cmap ='viridis ', save = none ) : import matplotlib. pyplot as plt raise runtimeerror ('not updated for daily weather fractions.') # tabulate month index for each night. month = np. empty _ like ( p. calendar, np. int16 ) # # date = desisurvey....
[ 0.07210971415042877, 0.6763671636581421, 0.8069463968276978, 0.12183943390846252, -0.705838680267334, 0.5932800769805908, 0.07558469474315643, 0.021783551201224327, -0.09854447096586227, 0.1473858505487442, 0.6433967351913452, 0.7129738330841064, -0.2719409763813019, 1.0580494403839111, ...
def send _ mail ( self, subject _ template _ name, email _ template _ name, context, from _ email, to _ email, html _ email _ template _ name = none ) : subject = loader. render _ to _ string ( subject _ template _ name, context ) # email subject * must not * contain newlines subject =''. join ( subject. splitlines ( )...
[ -0.5885165929794312, 0.515752911567688, 0.764766275882721, -0.29395896196365356, -1.0085724592208862, 0.02224281243979931, -1.5679892301559448, 0.3297277092933655, -0.7051451802253723, 0.4121600091457367, -0.38433903455734253, 0.9697744250297546, 0.3821907043457031, 0.10844425112009048, ...
def do _ insert ( self, * * kwargs ) : _ reliability = ramstkreliability ( ) _ reliability. hardware _ id = kwargs ['hardware _ id'] _ error _ code, _ msg = ramstkdatamodel. do _ insert ( self, entities = [ _ reliability, ] ) if _ error _ code = = 0 : self. tree. create _ node ( _ reliability. hardware _ id, _ reliabil...
[ -0.12398440390825272, 1.019677996635437, 0.795589804649353, -0.13205528259277344, 0.8888016939163208, 0.05433795228600502, 0.22413046658039093, 0.4409298300743103, -0.923747718334198, 0.6833334565162659, -0.9419999718666077, -0.07754001021385193, -1.1326581239700317, 0.25608089566230774, ...
def pem _ cls _ loss _ func ( pred _ cls _ score, gt _ iou _ map, bm _ mask, threshold = 0. 9 ) : mask _ positive = ( gt _ iou _ map > threshold ). float ( ) mask _ negative = ( gt _ iou _ map < = threshold ). float ( ) * bm _ mask num _ positive = torch. sum ( mask _ positive ) num _ negative = torch. sum ( mask _ neg...
[ -0.38258063793182373, -0.6402936577796936, 0.7696670889854431, 0.24820533394813538, -0.5282580256462097, 0.2397606372833252, 0.48485273122787476, 0.01583727076649666, -0.46956363320350647, 0.19269110262393951, 0.16375961899757385, -0.0410209558904171, -0.2379029244184494, -0.63229197263717...
def post ( self ) : if not request. is _ json : return jsonify ( { " message " : " missing json in request " } ), 400 email _ input = request. json. get ('email ', none ) password = request. json. get ('password ', none ) if not email _ input or not password : return jsonify ( { " message " : " missing email or passwor...
[ -0.5684123039245605, -0.4987376630306244, 1.135615587234497, 0.40192529559135437, -0.6559779047966003, 0.14573368430137634, -0.43470919132232666, 0.30068033933639526, 0.08034095913171768, 0.24017879366874695, 0.4907320737838745, 0.313301146030426, 0.2188679575920105, -0.04588360711932182, ...
def plot _ graph ( nodes _ source, edges _ source, legend _ col, color _ col, title, tab = false ) : # names = ['cell'] matches p1. circle (... name ='cell '... ) so that the # hover tooltip only shows up on the cells, not on the edges hover1 = hovertool ( names = ['cell'], tooltips = [ ( " cell barcode ", " @ barcode ...
[ 0.7679765224456787, 1.0112217664718628, 0.8298178911209106, -0.16412372887134552, -0.4965716600418091, 0.25440946221351624, 0.3541965186595917, 0.03638467937707901, -0.8819994926452637, 0.345610111951828, 0.5440735816955566, 0.429952472448349, 0.6920250654220581, -0.5990800857543945, 0.3...
def convert _ str _ to _ list ( s : str ) - > list : l = list ( set ( s. split ( ) ) ) l. sort ( ) return l
[ 0.1466241180896759, -0.8713735938072205, 0.2634040415287018, -0.6059793829917908, -0.1275521069765091, -0.47501271963119507, 0.18563567101955414, 0.5857133865356445, 1.0099828243255615, 0.9948840141296387, -1.2229982614517212, 0.29949402809143066, 0.5354962348937988, -0.751018762588501, ...
def _ get _ igroup ( self, volume, connector ) : v = self. vmem _ vip # use the connector's primary hostname and use that as the # name of the igroup. the name must follow syntax rules # required by the array : " must contain only alphanumeric # characters, dashes, and underscores. the first character # must be alphanu...
[ -0.4296184182167053, 0.4184800684452057, 0.5330920815467834, -0.6326860189437866, -0.18593096733093262, -0.6596725583076477, -0.4125958979129791, -0.16652484238147736, -0.9694328904151917, 0.7793404459953308, 0.32913118600845337, -0.2276282161474228, -1.5878121852874756, -0.820231258869171...