text
stringlengths
25
2.19k
embedding
listlengths
768
768
def measured _ position ( self ) : return self. sensors [ 3 ]. sensor _ values [ 0 ], self. sensors [ 3 ]. sensor _ values [ 1 ]
[ -0.18508782982826233, -0.6935601234436035, 0.5249121189117432, -0.5398778915405273, 0.6022449731826782, 0.9923483729362488, -0.6945482492446899, -0.153333842754364, -0.16283363103866577, 0.19364701211452484, -0.8726212382316589, -0.7350053787231445, -0.39492377638816833, 0.0760659351944923...
def commit ( self ) - > none : self. _ session. commit ( )
[ -0.390548437833786, -0.7521389722824097, 0.4370211362838745, 0.09097585827112198, 1.1963481903076172, 0.21172581613063812, 0.9328282475471497, 0.3059530258178711, -0.6534469723701477, 0.9003739356994629, 0.04717528447508812, -0.3833993971347809, -0.04475194588303566, -0.6147406697273254, ...
def nv ( self ) : return self. num _ nodes ( kind ='v')
[ -0.821790874004364, 0.45250993967056274, 0.16715724766254425, 0.5709094405174255, 0.35516443848609924, -0.12387401610612869, 0.3141630291938782, -0.0031710180919617414, 0.4661511778831482, 0.41355305910110474, -0.5471753478050232, 1.049070954322815, 0.34255141019821167, 0.04027586057782173...
def gf _ rshift ( f, n ) : if not n : return f, [ ] else : return f [ : - n ], f [ - n : ]
[ -0.3716941773891449, 0.7379862070083618, 0.31057944893836975, 0.6181263327598572, 0.6203258633613586, -0.43343961238861084, -0.8540749549865723, -0.20025360584259033, -0.8293561935424805, 0.296490877866745, -0.8842645883560181, 0.3741300404071808, -0.19269220530986786, 0.14628149569034576,...
def list _ principals ( self, principal ) : try : principals = self. exec _ kadmin ( " list - l % s " % principal ). splitlines ( ) except exception : principals = [ ] return principals
[ -0.6740632057189941, 0.4065437316894531, 0.5205894112586975, 0.3717518746852875, -0.43114545941352844, 0.4640170931816101, -1.484886646270752, 0.2809239327907562, 1.1311237812042236, 1.1668288707733154, -0.12116201221942902, 0.8257015943527222, -1.3193246126174927, 0.10991112887859344, 0...
def realpath ( self ) : return self. clonepath ( os. path. realpath ( self. path ) )
[ 0.5941512584686279, -0.8301550149917603, 0.37722107768058777, 0.6182074546813965, -0.6760580539703369, 0.6869305372238159, 0.8103214502334595, -0.2771071195602417, 0.7525390386581421, -0.44364601373672485, 0.5813777446746826, -0.04312429949641228, -0.29571351408958435, -1.2802091836929321,...
def picovoice _ run ( ) : keywords = list ( ) for x in _ keyword _ paths : keywords. append ( os. path. basename ( x ). replace ( '. ppn ','' ). split ('_') [ 0 ] ) porcupine = none pa = none audio _ stream = none try : porcupine = pvporcupine. create ( library _ path = _ library _ path, model _ path = _ model _ path, ...
[ 0.4835847318172455, -0.37010231614112854, 0.9376852512359619, 0.7467990517616272, 0.9016935229301453, -0.0637645572423935, -0.07749854028224945, -0.2926062047481537, 0.24674871563911438, -0.1503908783197403, -0.030636871233582497, 0.06718545407056808, -0.6289916634559631, 0.134339049458503...
def get _ value _ from _ xml _ tag ( xmldom, tag _ hierarchy, ignore _ absense = false ) : current _ parent = xmldom if current _ parent : try : for each _ tag _ name in tag _ hierarchy : current _ parent = current _ parent. getelementsbytagname ( each _ tag _ name ) [ 0 ] return current _ parent. childnodes [ 0 ]. dat...
[ 0.5554919838905334, -0.355836421251297, 0.7201558947563171, 0.8475837707519531, -0.15654876828193665, 0.027965258806943893, -0.6558785438537598, -0.885767936706543, -1.222558856010437, 0.04156806692481041, 0.7850633859634399, -0.06286846846342087, -0.10156027227640152, 0.5692347884178162, ...
def mask ( image, xc, yc, radius = 20 ) : import numpy as np # copy image : image _ masked = image. copy ( ) for i in range ( len ( xc ) ) : # make a meshgrid of the image centered at star locations : xx, yy = np. meshgrid ( np. arange ( image. shape [ 1 ] ) - xc [ i ], np. arange ( image. shape [ 0 ] ) - yc [ i ] ) # ...
[ 0.18533819913864136, -0.5089088082313538, 0.5936667919158936, -0.3043818473815918, -0.0775480642914772, -0.09290077537298203, 0.09436868131160736, 0.3574446439743042, 0.041294023394584656, 0.8681648969650269, -0.0911945179104805, 0.579295814037323, 0.0797482579946518, 0.49366313219070435, ...
async def xpset ( self, ctx ) : pass
[ -0.32173657417297363, 0.6403499245643616, 0.15000604093074799, 0.6341171264648438, 0.7098320722579956, 0.03440507501363754, -0.9705153703689575, -0.4008004367351532, 1.0522538423538208, -0.2403116524219513, -0.081250861287117, 0.8972786664962769, -0.7366936802864075, -0.6970616579055786, ...
def metadata _ edit ( self, values : dict ) - > contextmanager [ mock ] : metadata = self. fake _ server. get _ metadata ( ) metadata. update ( values ) return patch. object ( self. fake _ server, " get _ metadata ", return _ value = metadata )
[ -1.4008585214614868, 0.1388474404811859, 0.49210116267204285, -0.24565210938453674, 0.8693180680274963, 0.3063719570636749, -0.4286726713180542, -0.01735580526292324, 0.12094905972480774, 0.39913588762283325, -0.31092193722724915, 0.864447832107544, -0.32141634821891785, -0.216794177889823...
def addcancellationnodetree ( parentnode ) : cancellationnode = parentnode. addopnode ('and') cancellationstatusnode = cancellationnode. addopnode ('or') if fswiftmlutils. get _ acm _ version ( ) > = 2016. 4 : cancellationstatusnode. addattrnode ('status ','equal ', operationsdocumentstatus. send _ failed ) cancellatio...
[ 0.5556959509849548, 0.33370089530944824, 1.044362187385559, -0.5636958479881287, -0.8295449614524841, 0.4710695743560791, -0.19969061017036438, -0.019055884331464767, 0.34406334161758423, 0.6648679971694946, 0.27370941638946533, -0.6021532416343689, 0.19866609573364258, 1.261197805404663, ...
def handle _ msg ( bot ) : global update _ id # request updates after the last update _ id for update in bot. get _ updates ( offset = update _ id, timeout = 10 ) : update _ id = update. update _ id + 1 if update. message : # your bot can receive updates without messages cursor. execute ( " select user _ id from users ...
[ 0.3525463044643402, 0.6889273524284363, 1.155903697013855, -0.7406362295150757, 0.22089478373527527, 0.4168855845928192, -0.21760091185569763, -0.027212610468268394, -0.46692588925361633, 0.04366421326994896, -0.30923253297805786, 0.27688735723495483, -0.7291496992111206, 0.432427644729614...
def key _ identifier ( self ) - > str : return pulumi. get ( self, " key _ identifier " )
[ 0.38080307841300964, -0.4685535728931427, 0.3896138370037079, 0.12510229647159576, 0.098777636885643, 1.6207537651062012, 0.20838992297649384, 0.7953492403030396, 0.5928890109062195, 0.2697645127773285, 0.0463624931871891, 0.5499058365821838, 0.025226470082998276, -1.0604958534240723, -0...
def built ( self ) : return self. _ built
[ 0.01039918139576912, -1.8438193798065186, 0.33290502429008484, 0.8186428546905518, 0.7749874591827393, 1.5001415014266968, 0.3777610957622528, 0.06136244162917137, -0.35107725858688354, -1.1838459968566895, -1.4646087884902954, 0.8068975806236267, 0.6185635924339294, -0.731644868850708, ...
def patch ( self, data, key = none ) : if key is not none : key = self. client. key ( * key ) elif'_ key'in data : key = self. client. key ( * data ['_ key'] ) else : raise runtimeerror ( " entity data has no _ key, it must either be in the data or specified in the arguments. " ) entity = self. client. get ( key ) valu...
[ -1.068908452987671, -0.2130717933177948, 0.6240574717521667, -0.7801386713981628, -0.6586365103721619, 0.3674428164958954, -1.0474588871002197, 0.7234362959861755, -0.03682372346520424, 0.34807300567626953, 0.2437605857849121, 0.09413456916809082, -0.3680305480957031, -0.05683669075369835,...
def main ( ) : if tournament _ id is none : print ( " " " tournament id not found... \ \ nchecking for existing tournaments... " " " ) t _ id = set _ tournament _ id ( ) t _ name = execute _ query ( " " " select tournament _ name from tournaments where tournament _ id = % s " " ", ( t _ id, ) ) [ 0 ] [ 0 ] print ( " " ...
[ 0.5542559027671814, -0.41083842515945435, 0.6932496428489685, -0.0575750507414341, 0.64683997631073, 0.010554869659245014, 0.11786550283432007, 0.4121004045009613, 0.09198471158742905, 0.6491940021514893, 0.5420101284980774, 0.5878008604049683, 0.33272454142570496, -0.02580709382891655, ...
def compute _ node _ get _ by _ xpu _ arch ( context, xpu _ arch, session = none ) : return impl. compute _ node _ get _ by _ xpu _ arch ( context, xpu _ arch )
[ -0.9877461194992065, 0.6264032125473022, 0.4288581609725952, 0.26491501927375793, 0.2532714605331421, -1.2921881675720215, 0.214011549949646, -0.5627037882804871, 0.904725193977356, 0.5690498948097229, -0.10696056485176086, 1.3749454021453857, -0.022284740582108498, -1.4133026599884033, ...
def dists ( g, n = 100 ) : ds = [ ] for i in g. nodes ( ) if len ( g ) < = n else sample ( g. nodes ( ), n ) : ds. extend ( [ d for d in nx. shortest _ path _ length ( g, source = i ). values ( ) if d > 0 ] ) return sum ( ds ) / len ( ds ), max ( ds )
[ -0.14435163140296936, 1.0022722482681274, 0.25470706820487976, -0.537231981754303, -0.6873380541801453, 0.003002594457939267, 0.38533368706703186, 0.5417884588241577, 0.8956085443496704, 0.49886637926101685, -0.8128288984298706, -0.32310643792152405, 0.9135383367538452, 1.188835859298706, ...
def _ tk ( k, a, x ) : sum _ term = sum ( np. delete ( a [ :, k ], k, axis = 0 ) * np. delete ( x, k, axis = 0 ) ) return ( ( - sum _ term + np. sqrt ( np. square ( sum _ term ) + 4 * a [ k, k ] ) ) / ( 2 * a [ k, k ] ) )
[ 0.9249722361564636, 0.12293059378862381, 0.5518782734870911, -0.8859208226203918, -0.43143975734710693, -1.0282140970230103, 0.3880399167537689, 0.9394788146018982, 0.42091384530067444, 1.8201191425323486, 0.051396310329437256, -0.4248020350933075, 0.7914722561836243, -0.7539968490600586, ...
async def create ( cls, inputs : iterable [ input ], outputs : iterable [ output ], funding _ accounts : iterable ['account'], change _ account :'account ', sign : bool = true ) : tx = cls ( ) \. add _ inputs ( inputs ) \. add _ outputs ( outputs ) ledger, _ = cls. ensure _ all _ have _ same _ ledger _ and _ wallet ( f...
[ 0.3474368155002594, 0.5596883893013, 0.6333353519439697, 0.7345736622810364, -0.1732061356306076, -0.8584093451499939, 0.42569488286972046, -0.549639880657196, -0.17914879322052002, 0.2712348699569702, 0.10365048050880432, -0.3226194381713867, -0.47282734513282776, 0.39666548371315, -0.3...
def make _ savepath ( self, basename ='inv ', start = 0, suffix ='' ) : while os. path. exists ( os. path. join ( self. wd, basename +'% 03i'% start + suffix ) ) : start + = 1 svpath = basename +'% 03i'% start + suffix return svpath
[ -0.4995514154434204, -0.5558957457542419, 0.4805794656276703, -0.34834304451942444, -0.4734783470630646, 1.0334174633026123, 0.8231942653656006, 0.05187246575951576, -0.5539938807487488, 0.23083755373954773, -0.24241407215595245, 0.0012790597975254059, -0.9744786620140076, -0.6425542831420...
def p _ l ( self, i ) : l = self. landmark ( i ) return self. p [ np. ix _ ( l, l ) ]
[ 0.009871204383671284, 0.09512351453304291, 0.3634794354438782, -0.7163341641426086, -0.17528949677944183, 0.6474849581718445, -0.05592287704348564, -0.18631590902805328, 0.7683736085891724, 1.0051274299621582, 0.09799840301275253, -0.8944521546363831, -0.577756941318512, -1.102080821990966...
def rows _ upsert ( x : dataframe, y : dataframe, by : stringoriter = none, copy : bool = true, ) - > dataframe : key = _ rows _ check _ key ( by, x, y ) _ rows _ check _ key _ df ( x, key, df _ name = " x " ) _ rows _ check _ key _ df ( y, key, df _ name = " y " ) idx = _ rows _ match ( y [ key ], x [ key ] ) new = is...
[ -0.8937898278236389, 0.4996244013309479, 0.7260690331459045, 0.2672134041786194, -1.0571730136871338, -1.2332969903945923, -0.4366416335105896, 0.1113412156701088, -0.07095982134342194, 1.0723341703414917, 0.008677573874592781, 0.41234031319618225, 0.3287908732891083, -0.5598647594451904, ...
def check _ title _ list _ for _ type _ bugs ( title _ list ) : for record in title _ list : if type ( record ) = = str : broken _ data = false else : broken _ data = true return broken _ data
[ -1.1553845405578613, -0.5786104202270508, 0.6635522246360779, 0.6151052117347717, -0.22796908020973206, 1.105411410331726, -0.7996574640274048, -0.6444532871246338, -0.6293095350265503, 0.6086642146110535, -0.2348564863204956, -0.17638827860355377, -1.5959532260894775, 0.9289551377296448, ...
def test _ init ( self ) : msg ='object is not an top. stopparser'self. assertisinstance ( self. _ sp, top. stopparser, msg )
[ -0.8271550536155701, -1.015221357345581, 0.30406057834625244, 0.17252501845359802, -0.268865704536438, 0.6634050607681274, 0.12745743989944458, -0.662264883518219, 0.8962220549583435, -0.8510684967041016, -0.38297194242477417, 0.19144181907176971, -0.8619375824928284, 0.28756439685821533, ...
def send ( oid, httpclient = asynchttpclient, target = settings. config ['target'], handler = response _ handler, logger = logger ) : try : item = bullet. get _ by _ id ( oid ) except notfound : logger. error ('object with id " { } " was not found! '. format ( oid ) ) return url = target if url. endswith ('/') : url = ...
[ -0.10960782319307327, -0.41703179478645325, 0.759052574634552, -0.1114325001835823, -0.1468331664800644, -0.3378191292285919, -0.6417779922485352, -1.4499647617340088, -0.0593782402575016, 0.6524643898010254, -0.33921515941619873, 0.7355031371116638, -0.017982229590415955, -0.0973629653453...
def predict ( model, selected _ embeddings, data _ file ) : selected _ embeddings _ text = [ key for key in selected _ embeddings if selected _ embeddings [ key ] ] selected _ embeddings _ text ='_ '. join ( selected _ embeddings _ text ) print ( selected _ embeddings _ text ) model _ dir ='resources / taggers / cadecg...
[ 0.5557804107666016, -0.9985735416412354, 0.665248453617096, -0.0433749258518219, 0.014452504925429821, -0.277146577835083, -0.3815405070781708, 0.5703328251838684, -1.3653473854064941, -0.01734275370836258, -0.8680688142776489, 0.06396215409040451, 0.39714524149894714, 0.6674411296844482, ...
def process _ observation _ pycb ( self ) : sleeper = rospy. rate ( 10 ) for j in xrange ( self. num _ cameras ) : pc = self. cameras. get _ pointcloud ( j ) xyz, rgb = ru. pc2xyzrgb ( pc ) rgb = np. copy ( rgb ) _, corners = cu. get _ corners _ rgb ( rgb, method ='cv ', rows = chessboard _ rows, cols = chessboard _ co...
[ -0.42238861322402954, 1.2335882186889648, 0.7332026958465576, 0.15776002407073975, 0.8153674602508545, 0.004106447100639343, 0.4227008521556854, -0.4808976948261261, 0.24841654300689697, 1.138501524925232, -0.18800340592861176, -0.32922062277793884, -0.43004024028778076, 0.7601516246795654...
def chk ( c ) : return not isinstance ( c, ( int, float, np. int32, np. int64, np. float32, np. float64 ) )
[ 0.03810945898294449, 0.7591094970703125, 0.5546238422393799, 0.14844849705696106, 0.739757776260376, 1.3951771259307861, 1.1366339921951294, -1.4732019901275635, 0.09657131880521774, -0.08591213822364807, 0.4723103642463684, -0.12885509431362152, -1.2937979698181152, 0.9891389012336731, ...
def call _ q ( self, _ ) : return menu _ go _ back
[ -0.7003752589225769, 0.7000879645347595, 0.595624566078186, 0.5561562180519104, 0.391385555267334, -0.02244194597005844, -0.04428865388035774, -0.18955543637275696, -0.234047532081604, -0.08871350437402725, 0.41084134578704834, 0.5486356616020203, -0.8324133157730103, -0.5896314382553101, ...
def configure _ routes ( self, context, resource _ data ) : self. _ send _ event ( context, resource _ data, gen _ cfg _ const. event _ configure _ routes )
[ -0.6547986268997192, 0.4031163454055786, 0.5460866689682007, -0.15104573965072632, 0.6910642385482788, -0.5860140919685364, 0.27042731642723083, 0.09270074218511581, -0.26209503412246704, 0.12944181263446808, -0.7638037800788879, 0.37467750906944275, 0.6842491626739502, 0.6532302498817444,...
def test _ clear _ signature _ list ( image _ config : imageconfig, image _ config _ signed : imageconfig ) : image _ config _ signed. clear _ signature _ list ( ) assert not image _ config _ signed. get _ signature _ list ( ) image _ config. clear _ signature _ list ( ) signatures _ unsigned = image _ config. get _ si...
[ -0.738437831401825, 0.5343985557556152, 0.3725517988204956, 0.9025088548660278, 0.2495059221982956, 0.7035449743270874, 0.1259911209344864, 0.11316731572151184, 0.4493025243282318, 0.8338621258735657, -1.5589934587478638, -0.7506910562515259, 0.26962241530418396, 0.8235353231430054, 0.56...
def security _ group _ get _ by _ project ( context, project _ id ) : return impl. security _ group _ get _ by _ project ( context, project _ id )
[ 0.32662463188171387, 0.9940370321273804, -0.08851215988397598, 0.20765456557273865, -0.05619993433356285, -0.2820071578025818, -0.28690266609191895, -1.2699133157730103, -0.705843985080719, 0.1867578625679016, 0.5333483815193176, 0.4823656976222992, -0.46503740549087524, 0.0243992321193218...
def _ _ str _ _ ( self ) : return str ( et. tostring ( self. obj ),'utf - 8')
[ -0.21724659204483032, -1.4227229356765747, 0.4999358355998993, -0.8938102126121521, -0.4064509868621826, 0.8164582252502441, -0.6117535829544067, -0.33437058329582214, 0.6398051977157593, 0.0027034843806177378, 0.6380606293678284, -0.2515243887901306, 0.525580883026123, -1.1768025159835815...
def getcrossrefqueuestatistics ( ) : q = ezidapp. models. async _ queue. crossrefqueue. objects. values ( " status " ). annotate ( django. db. models. count ( " status " ) ) status _ code _ to _ text = {'u':'awaiting _ submission ','s':'submitted ','w':'registered _ with _ warning ','f':'registration _ failed ', } defa...
[ 0.6567064523696899, 0.21175268292427063, 0.34175387024879456, -0.5125051736831665, 0.2259242683649063, -0.1282770037651062, -0.09140227735042572, -0.32261326909065247, 0.2408175766468048, 0.4018346071243286, -0.18146395683288574, 0.2284291833639145, 0.9105388522148132, 1.361291766166687, ...
def test _ table _ 8 _ fail ( ) : cleanup ( ) print _ test _ separator ( " starting test _ table _ 8 " ) cat = csvcatalog. csvcatalog ( ) try : t = cat. create _ table ( " teams ", ".. / data / teams. csv " ) print ( " teams table ", json. dumps ( t. describe _ table ( ), indent = 2 ) ) t. add _ column _ definition ( c...
[ 0.34794923663139343, 0.5775895714759827, 0.5281952023506165, 0.3801676034927368, 0.021771477535367012, 0.3484330177307129, 0.11686404794454575, -0.6559868454933167, -0.37467899918556213, -0.21255776286125183, -0.2723216414451599, 0.5274747014045715, 0.8117280006408691, 0.273380309343338, ...
def gettypesdict ( self, subsystem, typenames, name = none ) : if not isinstance ( typenames, list ) : typenames = [ typenames ] data = self. getsubsystem ( subsystem ) data = self. _ _ gettypes ( data, typenames, name ) return data
[ -1.0262281894683838, 0.8320869207382202, 0.4968745708465576, -0.20424576103687286, -0.596887469291687, -0.3661719858646393, -0.9063001871109009, -0.6632237434387207, -0.4806329309940338, -0.04523598402738571, -0.7086972594261169, 0.36003363132476807, -0.8645572662353516, 0.8067059516906738...
def calcular _ fpar ( self, pendiente, ordenada ) : # # todo : esto!! return none
[ 0.24395452439785004, -0.6862191557884216, 0.38616204261779785, 0.004790704697370529, -0.7668112516403198, -0.8239260315895081, -0.8901827335357666, -1.2405266761779785, -0.27335089445114136, -0.6048081517219543, 0.5343979001045227, -0.08951486647129059, -0.9520344138145447, -0.873756289482...
def _ gc _ testing ( self, host ) : # decide if we need room build = self. env ['runbot. build'] domain _ host = self. build _ domain _ host ( host ) testing _ builds = build. search ( domain _ host + [ ('local _ state ','in ', ['testing ','pending'] ), ('requested _ action ', '! = ','deathrow') ] ) used _ slots = len ...
[ -0.4312684237957001, -0.4936966598033905, 0.7731428742408752, 0.3942653238773346, 0.3094927668571472, 0.32826942205429077, 0.8802486658096313, -0.5609366297721863, -0.7598258256912231, 0.42081496119499207, 0.35045191645622253, 0.6124313473701477, -0.3757385015487671, 1.4263681173324585, ...
def _ _ str _ _ ( self ) : a = " " if not self. super else self. super b = self. base c = " " if not self. sub else self. sub return a + b + c
[ 0.3756636381149292, -0.14291049540042877, 0.8189017176628113, -0.6972866654396057, -0.039631884545087814, 1.0698384046554565, -0.5421104431152344, -0.6209214925765991, 0.20027367770671844, -0.5395326018333435, -0.3288044333457947, 0.19014139473438263, -0.6918074488639832, -0.17605225741863...
def _ togglestate ( self ) : self. a. state = 0 if self. a. state else 1 self. a. trigger ( )
[ -0.7428684830665588, 0.08375254273414612, 0.3197413682937622, 0.19011841714382172, 0.11682301014661789, -0.22454720735549927, 0.9079896807670593, 1.066048264503479, 0.855337917804718, -0.26093095541000366, 0.165137380361557, -0.03313145041465759, -0.09655987471342087, 0.26754486560821533, ...
def check _ time _ series _ exists ( self, path ) : data _ set = self. execute _ query _ statement ( " show timeseries { } ". format ( path ) ) result = data _ set. has _ next ( ) data _ set. close _ operation _ handle ( ) return result
[ -1.4752206802368164, 0.5614347457885742, 0.5696101188659668, -0.7096745371818542, -0.19869378209114075, 0.2106965035200119, -0.6714981198310852, -1.0110033750534058, -0.5355041027069092, 0.3901715874671936, 0.2504828870296478, -0.3401069641113281, -0.3251422047615051, -0.3994666635990143, ...
def getframecolumnsformasterpattern ( mali, identifiers, master _ pattern, gap _ char = " - " ) : columns = [ ] for id in identifiers : if re. search ( master _ pattern, id ) : columns + = getframecolumnsformaster ( mali, id ) if len ( columns ) = = 0 : columns + = getframecolumnsformaster ( mali, identifiers [ 0 ] ) #...
[ -1.0280367136001587, -0.12455867975950241, 0.8312569856643677, 0.377876341342926, -0.41523462533950806, -0.8806414604187012, 0.8240206837654114, 0.22235897183418274, 0.24711433053016663, 0.3815236985683441, -1.1118745803833008, 0.1871136873960495, -0.13033781945705414, -0.7093208432197571,...
def my _ merge ( list _ 1, list _ 2, key = lambda x : x ) : list _ res = [ ] while list _ 1 and list _ 2 : if key ( list _ 1 [ 0 ] ) < = key ( list _ 2 [ 0 ] ) : list _ res. append ( list _ 1. pop ( 0 ) ) else : list _ res. append ( list _ 2. pop ( 0 ) ) if list _ 1 : [ list _ res. append ( elem ) for elem in list _ 1 ...
[ -0.904186487197876, -0.30480578541755676, 0.7615320682525635, 0.6638320088386536, 0.006518151145428419, 0.06739969551563263, -1.814110517501831, 1.0420721769332886, -0.7664991617202759, 0.058244943618774414, -0.9025605320930481, 0.0161259975284338, -0.5022922158241272, 0.8391676545143127, ...
def test _ load _ one _ pip ( self, build _ image _ for _ jupyterlab ) : key = " pip & gtmunit1 " lb, username = build _ image _ for _ jupyterlab [ 0 ], build _ image _ for _ jupyterlab [ 5 ] loader = packagedataloader ( [ key ], lb, username ) promise1 = loader. load ( key ) assert isinstance ( promise1, promise ) pkg...
[ -1.07046639919281, 0.7698432207107544, 0.4437336027622223, -0.036078836768865585, 0.40606677532196045, 0.8894264698028564, -1.0036448240280151, -0.3257284462451935, -0.17484769225120544, -0.24885870516300201, 0.03704693913459778, -0.006311068776994944, 0.11223311722278595, 0.01845250092446...
def breadth _ first ( graph : gu. graph, start : int = 0 ) - > list : queue = queue ( ) # fifo data struct queue. put ( start ) visited = np. zeros ( graph. numvertices ) while not queue. empty ( ) : vertex = queue. get ( ) # if a node has already been visited, skip it if visited [ vertex ] = = 1 : continue # otherwise...
[ 0.28511613607406616, 0.9420093297958374, 0.7829732894897461, 0.699556827545166, 0.6945573091506958, -0.4298495054244995, 0.3696593642234802, 0.05346403643488884, -0.11492522060871124, 0.8142122626304626, -0.30569988489151, 1.0974010229110718, -0.0865769162774086, 0.48071637749671936, -1....
def checkanswer ( self, username, answer ) : with self. con : self. cur. execute ( " select name from users where name ='" + username + "'" " and answer ='" + answer + "'; " ) i = len ( self. cur. fetchall ( ) ) if i = = 1 : return true else : return false
[ -0.670078694820404, -0.15502026677131653, 0.5137366652488708, 0.9758629202842712, -0.6795576214790344, 0.3826940655708313, -0.28164762258529663, -0.006691431161016226, -0.08462308347225189, 0.6954574584960938, -0.1501009464263916, -0.5322559475898743, -1.2166799306869507, -0.14013011753559...
def save _ results ( ) : # get form variables keyword = request. form [ " keywords " ] text _ results = request. form [ " twitter " ] giphy _ url = request. form [ " giphy " ] block = request. form [ " b _ text " ] sentiment = request. form [ " sentiment " ] lat = request. form [ " lat " ] lng = request. form [ " long ...
[ -0.42641177773475647, -0.010704431682825089, 0.5832769870758057, -0.15198679268360138, 0.6339249610900879, 0.7809278964996338, 0.09282592684030533, -0.15952236950397491, -0.8850326538085938, -0.104407899081707, -0.7466410398483276, -0.9196727871894836, -0.4821311831474304, 1.55103898048400...
def _ splitext ( p, sep, altsep, extsep ) : sepindex = p. rfind ( sep ) if altsep : altsepindex = p. rfind ( altsep ) sepindex = max ( sepindex, altsepindex ) dotindex = p. rfind ( extsep ) if dotindex > sepindex : # skip all leading dots filenameindex = sepindex + 1 while filenameindex < dotindex : if p [ filenameinde...
[ 0.09429474174976349, -0.9630060791969299, 0.8050063848495483, -0.5215892195701599, -0.757794201374054, 0.46243080496788025, -0.20591837167739868, 0.10079590231180191, 0.9698862433433533, 0.8193985819816589, 0.22785663604736328, -0.018950197845697403, 0.1548495888710022, -0.883354902267456,...
def ascii ( var, printname = true ) : raise stopiteration
[ -0.6845179200172424, -0.6318340301513672, 0.3148760497570038, 0.037655942142009735, -1.5496606826782227, -0.21319521963596344, 0.14714348316192627, -1.2415605783462524, -0.8173225522041321, 0.9770433902740479, -0.34476399421691895, 0.5126092433929443, -0.7256401777267456, -0.32519942522048...
def configuration _ parser ( ) : test _ new _ config = { } test _ name = " " for key in config. tests _ conf. keys ( ) : yaml _ obj = none test _ name = key yaml _ file = config. tests _ conf [ key ] [ 0 ] config _ dict = config. tests _ conf [ key ] [ 1 ] with open ( yaml _ file,'r') as stream : try : yaml _ obj = yam...
[ -0.08047047257423401, -1.4511159658432007, 0.671025276184082, -0.3998485207557678, -0.3337864577770233, -0.0741829052567482, 0.41063958406448364, 0.6326233148574829, -0.8083107471466064, 0.9039590358734131, -0.2683873176574707, -0.614824652671814, -0.1421271413564682, 0.5546724200248718, ...
def save _ experience ( self, world, experience _ data ) : # saves the dictionary following the measurements - image - episodes format. even though episodes # are completely independent now. # we join the building of the measurements with some extra data that was calculated self. _ write _ json _ measurements ( self. _...
[ -0.9766759276390076, -0.7101724743843079, 0.39952659606933594, -0.4984877109527588, 0.5870715379714966, 0.06722114980220795, -0.15851818025112152, 0.04069448634982109, 0.18614457547664642, 0.7366252541542053, -0.732831597328186, -0.45374342799186707, -0.16186481714248657, 0.625231444835662...
def testsimplehomconf ( self ) : ( q, n ) = conftest. simplehomconf ( ) self. assertequal ( q, true ) self. assertequal ( len ( n ), 48 ) # i believe the answer is 48, though i am not positive off the top of my head, and it could be higher
[ 0.4816100597381592, -0.3881419003009796, 0.25768542289733887, 0.15045107901096344, 0.3638862669467926, 0.6471059918403625, 0.1333909034729004, 0.7938470244407654, 0.8963720798492432, -1.3094547986984253, -1.8768376111984253, -0.6341279745101929, -0.9293680787086487, 0.1413300782442093, -...
def full _ exit ( code = signal. sigterm ) : os. kill ( os. getpid ( ), code ) os. _ exit ( code )
[ -0.0348837710916996, -0.5107075572013855, 0.2978719472885132, 0.4004879891872406, -0.06713912636041641, 0.04737653583288193, -0.4773997664451599, 0.5407100319862366, -0.7062751650810242, 0.8598530292510986, -0.6352624893188477, -0.5473685264587402, 0.4707465171813965, 0.09919504821300507, ...
def reconfig _ pma _ get _ controlstatus ( fpgaid, verbose = 1 ) : global debug cmd = " rdwr - b % d global. g. rcfg. pma _ controlstatus " % fpgaid if ( verbose & 2 ) = = 2 : print cmd out = exec _ cmd ( cmd ) if out = = " " : if ( verbose & 1 ) = = 1 : print " = " * 30 if ( verbose & 1 ) = = 1 : print " pma control /...
[ -0.21823689341545105, -0.17276915907859802, 0.7846378087997437, -0.4065840542316437, -0.29683902859687805, -0.39948880672454834, 0.3396325409412384, 0.10502008348703384, 0.4041980803012848, 0.15552867949008942, -0.3470592796802521, 0.5198585987091064, -1.5554345846176147, 0.728954195976257...
def test _ subscription _ update ( authn _ policy, form _ validator, subscriptions _ model, user _ model ) : authn _ policy. authenticated _ userid. return _ value = " acct : john @ doe " form _ validator. return _ value = ( none, { " username " : " acct : john @ doe ", " pwd " : " smith ", " subscriptions " :'{ " acti...
[ 0.4778643250465393, -0.13091671466827393, 0.5337759852409363, 0.5227644443511963, 0.027691757306456566, 0.5896341800689697, 0.22150161862373352, -0.5095028877258301, 0.10782250761985779, -0.5278600454330444, -0.8727809190750122, -0.4458790421485901, 0.09129007160663605, -0.575282633304596,...
def item _ diagnosis ( relation, select ) : mats = vec2mat ( relation, select ) for m in mats : mask = torch. eye ( * m. shape ). byte ( ) m. masked _ fill _ ( mask, 0 ) result = torch. cat ( mats ). sum ( dim = 0 ) order = [ i for i, j in sorted ( enumerate ( result ), key = lambda x : x [ 1 ], reverse = true ) ] retu...
[ -0.13799934089183807, -0.4990099370479584, 0.5728262662887573, 0.29582637548446655, 0.5574337244033813, -0.8386620283126831, 0.5723786354064941, -0.35399356484413147, 0.029428310692310333, 0.5707569122314453, -0.15560343861579895, -0.30604058504104614, 1.1530495882034302, -0.96436059474945...
def security _ group _ rule _ get _ by _ security _ group ( context, security _ group _ id ) : return impl. security _ group _ rule _ get _ by _ security _ group ( context, security _ group _ id )
[ 0.7669675946235657, 0.0030134522821754217, -0.20383553206920624, -0.32339155673980713, 1.1493678092956543, -0.03428606316447258, -0.050112832337617874, -0.583004355430603, -0.11034059524536133, 0.08107155561447144, 1.1981372833251953, 0.7190092206001282, -0.5602536201477051, -0.20030090212...
def reset _ message _ subscription _ by _ position ( self, stream, subscription, message _ position ) : if self. persistent : url _ endpoint ='/ streams / persistent / stream / { } / subscription / { } / position / { } '. format ( stream, subscription, message _ position ) # else : # url _ endpoint ='/ streams / non - ...
[ 0.16268330812454224, -0.2955561876296997, 0.8213362097740173, 0.2625327706336975, 0.03786057233810425, -0.7380171418190002, -0.22998498380184174, -1.2681242227554321, -0.6871890425682068, 0.5071245431900024, 0.20648477971553802, 0.9818919897079468, -1.6294459104537964, -0.538330078125, -...
def get _ product _ date ( fname ) : return dates _ from _ fname ( fname ) [ 0 ]. date ( )
[ 0.27085888385772705, -0.5835775136947632, 0.42264682054519653, 0.9438388347625732, -0.38276299834251404, 0.838407039642334, 0.5109160542488098, -0.330132395029068, -0.40992823243141174, 0.49067193269729614, -0.12732577323913574, 0.4032270312309265, 0.3293501138687134, -0.7200189232826233, ...
def serialize _ docs ( data, filepath ) : docs = [ row ['content'] for row in data ] for row in data : # turn doc objects into byte arrays row ['binary _ content'] = row. pop ('content'). to _ bytes ( ) pickle. dump ( data, open ( filepath,'wb') ) # remove binary content from the in - memory data and put spacy docs bac...
[ 0.426445871591568, -0.16734689474105835, 0.40140530467033386, -0.22336409986019135, -0.06130479276180267, -0.3517839312553406, 0.038056764751672745, -0.16739501059055328, 0.4055325388908386, 0.25598955154418945, -0.5380891561508179, -0.46867433190345764, -0.8625300526618958, 0.116802752017...
def build _ pareto _ population ( population, scores, minimum _ population _ size, maximum _ population _ size ) : unselected _ population _ ids = np. arange ( population. shape [ 0 ] ) all _ population _ ids = np. arange ( population. shape [ 0 ] ) pareto _ front = [ ] while len ( pareto _ front ) < minimum _ populati...
[ 0.035071294754743576, -0.17661069333553314, 0.6860372424125671, -0.046939313411712646, 0.13640576601028442, 0.3059135377407074, 0.6113364696502686, 0.0023724939674139023, 0.24701082706451416, 0.6842175722122192, -0.16715587675571442, 0.6512307524681091, 0.2475612908601761, -0.7279276251792...
def readmessages ( self, processname, current = none ) : # logger. log ( " gathering messages " ) p = self. manager. getprocess ( processname ) if p = = none : if processname = = " logger " : p = logger else : return [ ] if self. logs. has _ key ( processname ) : log = self. logs [ processname ] else : log = messages. ...
[ -1.0845401287078857, -0.6970208287239075, 0.8277806043624878, -0.40684011578559875, 0.29385319352149963, 0.09514934569597244, -0.7306204438209534, -0.7981810569763184, 0.3107149600982666, 0.6334976553916931, 0.39064446091651917, 0.4434260427951813, -0.7481561303138733, 1.0516597032546997, ...
def serialize ( self, root ) : def preorder ( root ) : if not root : return [ ] else : return [ root. val ] + preorder ( root. left ) + preorder ( root. right ) def inorder ( root ) : if not root : return [ ] else : return inorder ( root. left ) + [ root. val ] + inorder ( root. right ) pre = preorder ( root ) ino = in...
[ -0.8061268925666809, -0.3116585910320282, 0.8505980968475342, 0.2029876857995987, -1.0568422079086304, -0.6316123008728027, 0.0800464078783989, 0.3672373294830322, 0.9120061993598938, 0.12894171476364136, -1.3877180814743042, 0.2941319942474365, -0.21911118924617767, 1.1100788116455078, ...
def _ _ last _ overlapping _ chunk ( self, audio _ segment, temp _ dir, chunks _ arr, overlapping ) : if overlapping and len ( audio _ segment ) % chunk _ len < 4000 : chunk _ path = self. _ _ create _ chunk ( len ( audio _ segment ) / / chunk _ len, # last index audiosegment. silent ( frame _ rate = 44100 ), # silent ...
[ -0.03152982145547867, -0.2780619263648987, 0.7129483222961426, -0.7121210098266602, 0.9673948287963867, 0.32415974140167236, 0.20742250978946686, 0.029519790783524513, -0.0031531353015452623, 0.14402970671653748, 0.43426454067230225, -0.7788859605789185, -0.018741270527243614, 0.1940399110...
def shuffle _ test ( measure, x, y, z = false, ns = 200, ci = 0. 95, * * kwargs ) : x _ clone = np. copy ( x ) # a copy that we can shuffle outputs = [ ] for i in range ( ns ) : np. random. shuffle ( x _ clone ) if z : outputs. append ( measure ( x _ clone, y, z, * * kwargs ) ) else : outputs. append ( measure ( x _ cl...
[ 0.0634954497218132, 0.2560403347015381, 0.48640212416648865, 0.33248573541641235, -0.7852208018302917, -0.3843393325805664, 0.5289645791053772, -0.8085514903068542, 0.5955047607421875, 0.23349367082118988, -0.028939643874764442, 0.553363561630249, -0.6788584589958191, 0.5230804085731506, ...
def train _ timetable ( inputs ) : line = inputs. split ( " \ n " ) l = 0 num _ cases = int ( line [ l ] ) l + = 1 solution = [ ] for c in xrange ( num _ cases ) : turnaround = int ( line [ l ] ) l + = 1 timesa, timesb = [ int ( x ) for x in line [ l ]. split ( ) ] l + = 1 ; timetablea = [ ] for t in xrange ( timesa ) ...
[ -0.40633130073547363, -0.1665889471769333, 0.7781513333320618, 0.13904592394828796, -0.0681724101305008, -0.18857982754707336, 1.1345893144607544, -0.035786401480436325, -1.0200326442718506, 0.7078983187675476, -0.49094074964523315, -0.9031671285629272, 0.11092634499073029, -0.054581094533...
def fit ( image, size, method = image. nearest, bleed = 0. 0, centering = ( 0. 5, 0. 5 ) ) : # by kevin cazabon, feb 17 / 2000 # kevin @ cazabon. com # http : / / www. cazabon. com # ensure centering is mutable centering = list ( centering ) if not 0. 0 < = centering [ 0 ] < = 1. 0 : centering [ 0 ] = 0. 5 if not 0. 0 ...
[ 0.16853484511375427, -0.06213366985321045, 1.0311775207519531, 0.23209422826766968, -0.6927777528762817, -0.3692598044872284, 0.1716122031211853, -0.3488634526729584, 1.0450167655944824, 0.5696154832839966, 0.7413978576660156, -0.28364336490631104, -0.1083470955491066, 0.29710832238197327,...
def generate _ zscores ( qmatrix, skills, noise = 0. 2, missing = 0. 0 ) : results = np. dot ( skills, qmatrix ) if noise > 0 : results + = np. random. normal ( scale = noise, size = results. shape ) for i in range ( results. shape [ 0 ] ) : for j in range ( results. shape [ 1 ] ) : if np. random. rand ( ) < missing : ...
[ -0.22165605425834656, -0.07625222951173782, 0.601100504398346, -0.6480532884597778, -0.07306549698114395, 0.5197792649269104, 0.15736721456050873, -0.7839968800544739, 0.9340106844902039, 0.13419003784656525, -0.16724413633346558, -0.35550227761268616, 0.005819737445563078, 0.5422559380531...
def zeros ( zeros _ ele ) : return np. zeros ( ( zeros _ ele, zeros _ ele ) )
[ -0.6309719681739807, -0.9696609973907471, 0.13894373178482056, 0.34464403986930847, 0.5274609327316284, 0.2822593152523041, 0.5881307125091553, 0.289427787065506, 0.5647258162498474, -0.3456030786037445, 0.1812746375799179, 0.8349700570106506, 0.3954199552536011, 0.3603748679161072, 0.62...
def main ( ) : parser = optionparser ( ) parser. add _ option ( " - - file1 ", dest = " file1 ", help = " file1 " ) parser. add _ option ( " - - file2 ", dest = " file2 ", help = " file2 " ) parser. add _ option ( " - o ", dest = " outfile ", help = " outfile " ) parser. set _ description ( main. _ _ doc _ _ ) ( option...
[ 0.33363431692123413, -0.22108429670333862, 1.163543939590454, 0.9555782675743103, 0.23329401016235352, 0.5076137185096741, 1.2993683815002441, 0.4991486668586731, -1.0131199359893799, 0.5400040149688721, 0.03158320114016533, 0.041908688843250275, -0.6091170907020569, -0.46040719747543335, ...
def storecategoriesdataframe ( self, categories _ df, store _ path, filename, verbose = false ) : # input validation if ( categories _ df is none ) | ( not store _ path ) | ( not filename ) : raise runtimeerror ( " input variables ` categories _ df `, ` store _ path `, and ` filename ` are required. " ) if categories _...
[ -0.07211006432771683, -0.04234860837459564, 0.2675142288208008, 0.035789795219898224, -0.12796291708946228, 0.5055109858512878, 0.6766119003295898, -0.26572492718696594, -0.7235357165336609, -0.8976531028747559, 0.33064115047454834, 0.3845937252044678, -0.2169932872056961, -0.8988845348358...
def main ( ) : if ( sys. argv [ 1 ] = = " - d " ) : image = cv2. imread ( sys. argv [ 2 ], - 1 ) txt = estenografia _ d ( image ) print ( txt ) open ( sys. argv [ 3 ],'w'). write ( txt ) print ( " done! " ) elif ( sys. argv [ 1 ] = = " - c " ) : image = cv2. imread ( sys. argv [ 2 ], - 1 ) txt = open ( sys. argv [ 3 ] ...
[ 0.021850161254405975, 0.17244070768356323, 0.8114975690841675, 0.7399515509605408, -0.2884627878665924, 0.7112735509872437, 0.580675482749939, 0.42700883746147156, -0.7013024687767029, 0.12998269498348236, 0.4630883038043976, -0.24798695743083954, -0.09043031185865402, 0.5776748657226562, ...
def volume _ allocate _ iscsi _ target ( context, volume _ id, host ) : return impl. volume _ allocate _ iscsi _ target ( context, volume _ id, host )
[ 0.058492742478847504, -0.6973125338554382, 0.44454365968704224, 0.41293132305145264, 0.7161344289779663, -0.34433335065841675, -0.9375243782997131, -0.46965503692626953, 0.4062789976596832, 0.24139106273651123, 1.5794028043746948, 1.4285029172897339, -0.14102797210216522, -1.65848875045776...
def polyline ( t, n, length, angle ) : # stack diagram print ( f'[ polyline ] : t - > { t }, n - > { n }, length - > { length }, angle - > { angle }') for i in range ( n ) : t. fd ( length ) t. lt ( angle )
[ 0.3920055031776428, -0.018962876871228218, 0.3287588655948639, -0.8640024662017822, 0.20444846153259277, 0.008475170470774174, -0.7464991211891174, -0.5902067422866821, -0.502172589302063, 0.35778212547302246, -1.535699486732483, -0.09264710545539856, 0.5647299289703369, -0.320331841707229...
def getvalue ( self, searcher ) : # todo : optimize this in one find. try : path = self. _ file _ path _ expander. expandpath ( self. reg _ path ) except keyerror : path = u'' if not path : raise errors. preprocessfail ( u'unable to expand path : { 0 : s } '. format ( self. reg _ path ) ) find _ spec = file _ system _ ...
[ -0.6265527009963989, 0.04254730045795441, 0.7055113911628723, 0.2403092086315155, 0.7496607303619385, -0.8415737748146057, 1.2752089500427246, -0.10310043394565582, -0.6447934508323669, -0.2682075798511505, 0.7231698632240295, 0.2579091787338257, -0.07617055624723434, 1.107270359992981, ...
def virtual _ interface _ get _ by _ instance ( context, instance _ id ) : return impl. virtual _ interface _ get _ by _ instance ( context, instance _ id )
[ -0.13902877271175385, -0.48486554622650146, 0.06359881162643433, -0.12535810470581055, -0.09858781099319458, -0.511306643486023, 0.18019568920135498, -0.4477875232696533, 0.28293710947036743, 0.7001112103462219, 0.2152220606803894, 0.9965899586677551, -0.7110332250595093, -0.49414694309234...
def event _ plot ( self, assoc _ id, west = - 104. 5, east = - 94, south = 33. 5, north = 37. 5, deltalon = 1. 0, deltalat = 1. 0 ) : fig = plt. figure ( figsize = ( 15, 8 ) ) ax = fig. add _ subplot ( 111 ) # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = ...
[ 1.2847152948379517, -0.000426583195803687, 1.1732921600341797, -0.7504551410675049, -0.26544758677482605, 1.0741498470306396, 1.0654780864715576, 0.46047288179397583, -0.023332646116614342, -0.5820359587669373, 0.8590915203094482, 1.0212212800979614, 0.38635557889938354, 0.2349643856287002...
def volume _ type _ extra _ specs _ get ( context, volume _ type _ id ) : return impl. volume _ type _ extra _ specs _ get ( context, volume _ type _ id )
[ 0.0075488644652068615, -0.7738587856292725, 0.565212070941925, 0.004749886225908995, 0.1358872503042221, -0.3292183578014374, -0.8512203097343445, -1.2006064653396606, 0.6354483962059021, 0.4331652820110321, 0.31569573283195496, 0.6461894512176514, -0.08409494906663895, 0.5991844534873962,...
def argmax ( self ) : if len ( self. keys ( ) ) = = 0 : return none all = self. items ( ) values = [ x [ 1 ] for x in all ] maxindex = values. index ( max ( values ) ) return all [ maxindex ] [ 0 ]
[ -0.41231751441955566, -0.27943646907806396, 0.601828932762146, -0.048647671937942505, 0.33658939599990845, 0.03557942807674408, -0.948104977607727, 0.6635534167289734, -0.16909167170524597, 0.24127210676670074, 0.6526766419410706, 0.5668594837188721, -0.28681817650794983, 0.048031527549028...
def prune _ summoners ( self ) : # select all summoners rows = self. stat _ db. select _ values ('summoners ', ['standardname ','cachedate'], [ ] ) # if nothing to prune, quit if not rows : return # convert second string to date rows = [ ( name, datetime. datetime. strptime ( dt _ str,'% y - % m - % d % h : % m : % s')...
[ 0.17796537280082703, 0.26268643140792847, 0.8281244039535522, 0.6530896425247192, -0.9544655680656433, -0.013940163888037205, -0.9666353464126587, 0.43168187141418457, -0.20360228419303894, 0.4452023208141327, -0.0973280668258667, 0.576290488243103, -0.16430069506168365, 0.5172932147979736...
def testimagecollectionconstructors ( self ) : from _ id = ee. imagecollection ('abcd') self. assertequal ( ee. apifunction. lookup ('imagecollection. load'), from _ id. func ) self. assertequal ( {'id':'abcd'}, from _ id. args ) from _ images = ee. imagecollection ( [ ee. image ( 1 ), ee. image ( 2 ) ] ) self. asserte...
[ -1.2373887300491333, -0.6583942770957947, 0.5405710339546204, -0.7808940410614014, 0.4558294117450714, -0.5445857048034668, 0.6549679636955261, -0.08479287475347519, -0.13290800154209137, -0.6398410797119141, -0.3552144765853882, -0.12675528228282928, 0.9420453906059265, 0.7364383339881897...
def test _ write _ with _ temporary _ config ( self, prompt ) : prompt. return _ value = " no " self. new _ manifest. get _ config ('hobopopo ', default = " yes ", secret = false ) new _ manifest = stringio ( ) self. new _ manifest. write ( new _ manifest ) assert not manifest ( new _ manifest ). has _ option ('config ...
[ 0.1207827553153038, -0.5634517669677734, 0.2724059224128723, 0.49032899737358093, 0.14021064341068268, 0.3236376643180847, -0.4022064805030823, 0.35806021094322205, -0.18093356490135193, -0.07764073461294174, -1.3514398336410522, -0.36707624793052673, -0.35632526874542236, 0.22709318995475...
def calc _ theta ( s, k, phi _ d1, sigma, t, callput, r, d2 ) : callput = callput. upper ( ) if callput = = " call " : # https : / / www. iotafinance. com / en / formula - theta - of - a - call - option. html theta1 = - 1 * ( ( s * phi _ d1 * sigma ) / 2 * np. sqrt ( t ) ) - ( r * k * vol _ math. e ( ) * * ( - r * t ) ...
[ -0.3201059401035309, 0.5422496795654297, 0.43587782979011536, 0.016061697155237198, -0.5865887999534607, -0.15318405628204346, 0.5719274282455444, 0.07656298577785492, -0.5831894278526306, 1.3030184507369995, 0.4790087044239044, 0.5818531513214111, -0.2805955410003662, -0.3721352517604828,...
def regression _ experiment ( x _ train, x _ test, y _ train, y _ test ) : for reg in [ ridgecv ( ), randomforestregressor ( random _ state = 0 ) ] : pipeline = make _ pipeline ( pca ( n _ components = 100 ), reg ) y _ pred = pipeline. fit ( x _ train, y _ train ). predict ( x _ test ) plot _ regression ( y _ test, y _...
[ 0.18623243272304535, 0.43847572803497314, 0.45292365550994873, -0.1904548555612564, 1.2472140789031982, -0.24099451303482056, 0.5524200797080994, 0.6908776164054871, -0.49924784898757935, -0.6573324799537659, 0.4084702432155609, 0.8200773596763611, 0.11494802683591843, 0.26008060574531555,...
def test _ run _ until _ fatal _ error ( ) : graph = create _ object _ graph ( " example ", testing = true ) def func ( graph ) : raise fatalerror ( ) state _ machine = statemachine ( graph, initial _ state = func ) state _ machine. run ( )
[ 0.45774009823799133, 0.8218054175376892, 0.14869429171085358, 0.6391436457633972, 0.3367712199687958, 0.6649134159088135, -0.19622288644313812, -0.19374772906303406, 0.08053885400295258, 0.12947383522987366, -0.4224705398082733, 0.29334843158721924, 0.6107429265975952, -0.3773789703845978,...
def gf _ to _ dict ( f, p ) : n, result = gf _ degree ( f ), { } for i in xrange ( 0, n + 1 ) : a = zp _ int ( f [ n - i ], p ) if a : result [ i ] = a return result
[ -0.3173450529575348, 0.7329548001289368, 0.32107046246528625, -0.3608023524284363, -0.5816221833229065, -0.09652037918567657, 0.5434108376502991, 0.05937458947300911, -1.0312790870666504, 0.6470537781715393, -0.7678481936454773, -0.4813608229160309, -0.6055347323417664, -0.2985711097717285...
def insert _ sent _ message ( conn : sqlite3. connection, sent _ timestamp, receiver _ contact, content, received _ timestamp ) : statement ='insert into sentmessage ( sent _ timestamp, receiver _ contact, content, received _ timestamp )'\'values (?,?,?,? )'with conn : conn. execute ( statement, ( sent _ timestamp, rec...
[ -0.2515060603618622, 0.2215300351381302, 0.5267865061759949, -0.8528426885604858, 0.7373347878456116, -0.3493618369102478, 0.04152708500623703, -0.46113643050193787, -0.5649510025978088, 0.37065526843070984, -0.6095150709152222, -0.4758799374103546, -1.5916366577148438, -0.4181294739246368...
def reversebits ( seq : int, length : int ) - > int : # reverses the bits in each byte of the sequence a = seq. to _ bytes ( ( length + 7 ) / / 8, " little " ). translate ( _ reverse _ bits ) # reverses the byte order b = int. from _ bytes ( a, " big " ) # removes extra bits c = b > > ( - length % 8 ) return c
[ -0.028939304873347282, 0.37477925419807434, 0.30899617075920105, -0.6129100918769836, -0.5698520541191101, -0.4701472818851471, 0.13497769832611084, 0.7646932601928711, 0.1554471105337143, 0.3157409429550171, -1.2028496265411377, 0.5676218867301941, -0.7463156580924988, -0.446439653635025,...
def get _ web _ payload ( df, include _ other = false ) : logger. info ('preparing web payload...') # columns to send to the browser. the six orbital elements for asteroids. columns _ to _ include = ['e ','a ','i ','long _ asc _ node ','arg _ perihelion ','m0'] # gets the dataframe epoch if len ( df. epoch _ timestamp....
[ -0.34250548481941223, 0.9450156092643738, 0.862082302570343, -0.33594784140586853, -0.672055721282959, -0.1844528168439865, 0.5300859212875366, -0.2962740957736969, -0.1486935168504715, 0.7655317187309265, -0.06215599551796913, 0.5236377716064453, 1.3258219957351685, 0.11921130865812302, ...
def count _ double _ hits ( decay _ positions, particle1 _ 4vec, particle2 _ 4vec, r, z _ detector ) : # numpy filter to filter the ones that decay in front of the detector in _ front = decay _ positions [ :, 2 ] < z _ detector # drop the decays that are behind decay _ positions = decay _ positions [ in _ front ] parti...
[ -0.07187145203351974, -0.7060505151748657, 0.6496742963790894, -0.4577992558479309, 0.4055400490760803, -0.033287640661001205, 0.7966833114624023, 0.24053137004375458, -0.7148867249488831, 0.16495664417743683, -0.6629112958908081, 0.29038023948669434, 0.4096294045448303, -0.086184620857238...
def get _ filename ( path, always = true, only _ files = false, source = source _ any ) : if os. path. isabs ( path ) : if only _ files and os. path. isdir ( path ) : return none if always or os. path. exists ( path ) : return path # not an absolute path, so process it. ensure _ paths ( ) p _ path = os. path. abspath (...
[ 0.4471683204174042, -0.21979232132434845, 0.9331545233726501, 0.4820321500301361, -0.6310106515884399, -0.006486411672085524, 0.6026620268821716, 0.4346129894256592, 0.2342066913843155, -0.24933774769306183, 0.641085684299469, -0.4087029695510864, 0.25582894682884216, 0.2879480719566345, ...
def single _ hit ( decay _ position, four _ vecs, z _ detector, detector _ radius ) : p = four _ vecs [ :, 1 : ] x, y, z = decay _ position. t # q is the position the particle will pass in the plane through z _ detector q = p. t * ( - z + z _ detector ) / p [ :, 2 ] qx, qy, qz = q # return whether the particles hit the...
[ 0.3126240074634552, -0.35634878277778625, 0.447811096906662, -0.3640771508216858, 0.41010719537734985, 0.24905620515346527, 0.4684370160102844, 0.4103133976459503, -0.3598630726337433, -0.33248716592788696, -0.09678787738084793, -0.39667758345603943, -0.8402004837989807, -0.318732261657714...
def breed _ by _ crossover ( population, fitness _ 1, fitness _ 2 ) : parent _ 1 = population [ fitness _ 1 ] parent _ 2 = population [ fitness _ 2 ] # get length of chromosome # chromosome _ length = len ( parent _ 1 ) # # pick crossover point, avoding ends of chromsome # crossover _ point = rn. randint ( 1, chromosom...
[ 0.3191627860069275, -0.3025677800178528, 1.0664347410202026, 1.0970399379730225, -0.3563781678676605, 0.3967876732349396, 0.4546326696872711, -0.07465501129627228, -0.6502589583396912, 0.5612276196479797, -0.5195971727371216, 0.2683769166469574, -0.03338027000427246, -0.18048542737960815, ...
def assert _ array _ equal ( self, * args, * * kwargs ) : return assert _ array _ equal ( * args, * * kwargs )
[ -0.8250976800918579, -0.7900667786598206, 0.4462199807167053, 0.40870586037635803, 1.5618020296096802, 0.14628709852695465, 0.16483618319034576, -0.5543915033340454, -0.06539221107959747, 0.25241026282310486, -0.9571428298950195, 1.366212010383606, -0.9020954966545105, 0.8018369674682617, ...
def _ get _ tweets ( self ) : auth = tweepy. oauthhandler ( consumer _ key, consumer _ secret ) auth. set _ access _ token ( access _ token, access _ secret ) api = tweepy. api ( auth ) search = api. search ( self. term, lang ='en ', count = 100 ) print ( f " getting tweets that mention'{ self. term } ', " f " this may...
[ -0.3012802004814148, -0.24943645298480988, 0.6296358704566956, -0.34969666600227356, 0.5583769679069519, -0.8638854622840881, -0.7718233466148376, -0.3721151649951935, -0.5252798199653625, 1.1444216966629028, -0.8024628758430481, 0.5987492799758911, 0.0020468521397560835, 0.891907274723053...
def get _ bonds _ coords ( resn _ list, matrix, chain, model ) : matrix _ coords = [ ] for state in range ( 1, cmd. count _ states ( ) + 1 ) : coords = [ ] for bond in matrix : stored. pos = [ ] # ex bond : # ( 3101,'nag ', 3100,'nag ', 1, 4 ) # ( 475,'man ', 471,'man ', 1, 6 ) exocyclic if bond [ 4 ] = = 6 : cmd. iter...
[ -0.06894386559724808, -0.8908912539482117, 0.765074610710144, -0.12258630990982056, 0.0798344761133194, -0.2033819556236267, 0.150455504655838, -0.34471166133880615, -0.20205770432949066, -0.25092196464538574, -0.5820181965827942, -1.0597470998764038, -0.6200087666511536, -0.09573669731616...
def _ _ init _ _ ( self ) : self. username ='dmarley'self. executable ='run'self. basedir = os. environ ['pwd'] +'/'self. mode ='lxbatch'#'condor ','lxbatch'self. test = false # just submit one job if testing self. submit = true # don't submit jobs, just testing code self. verbose = false # print output to screen self....
[ 0.28202173113822937, -0.6633155345916748, 0.6582721471786499, 0.7933247685432434, -0.40503963828086853, 0.10151148587465286, 0.1896689236164093, 0.46337491273880005, -0.7906054854393005, -0.7318243980407715, -1.0020053386688232, 0.14341488480567932, -0.1310053914785385, 1.008618712425232, ...
def from _ wkt ( cls, wkt, srid = none ) : if wkt. count (';') and not srid : ewkt = wkt. split (';') wkt = ewkt [ 1 ] srid = re. sub ( re. escape ('srid ='),'', ewkt [ 0 ], flags = re. i ) return cls. from _ wkt ( wkt, srid ) else : try : shape = shapely. wkt. loads ( wkt ) except readingerror as e : raise invalidgeom...
[ 1.2126885652542114, -0.23000690340995789, 0.5298892855644226, -0.46896421909332275, -1.000243902206421, 0.20713761448860168, -0.5458104014396667, 0.497755765914917, 0.5897347927093506, -0.44987350702285767, 0.2503000497817993, 0.042191922664642334, 0.4637543261051178, 0.08119861036539078, ...