text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def test _ multi _ fetch _ data _ multi _ series _ configured _ aggregation _ functions ( self ) : nodes = list ( self. finder. find _ nodes ( query ( self. metric _ prefix + ". agg _ path. * " ) ) ) paths = [ node. path for node in nodes ] aggregation _ funcs = sorted ( list ( set ( graphite _ influxdb. utils. get _ a... | [
-0.3408225476741791,
0.9509522318840027,
0.591417133808136,
0.5440277457237244,
1.0400233268737793,
0.023071952164173126,
-0.050705794245004654,
-0.9720332026481628,
-0.5762166976928711,
-0.4429452121257782,
-0.2604784667491913,
0.3162747621536255,
0.7929723262786865,
0.06935212761163712,
... |
def correlation _ 5 ( x, y ) : mx = k. mean ( x [ :, :, :, :, 0 ] ) my = k. mean ( y [ :, :, :, :, 0 ] ) xm, ym = x [ :, :, :, :, 0 ] - mx, y [ :, :, :, :, 0 ] - my r _ num = k. mean ( tf. multiply ( xm, ym ) ) r _ den = k. std ( xm ) * k. std ( ym ) return r _ num / ( r _ den + k. epsilon ( ) ) | [
0.1850130558013916,
0.23405371606349945,
0.9103032946586609,
-0.09193077683448792,
-0.8010334968566895,
-0.2472684681415558,
0.6851442456245422,
-0.8280490040779114,
-0.9557854533195496,
1.242830514907837,
0.09632150828838348,
-0.007323811762034893,
-0.04143424704670906,
-0.131239384412765... |
def interpolate _ arrays ( arrays, t, tp ) : i, w = linear _ interpolation ( t, tp ) if isinstance ( arrays, np. lib. npyio. npzfile ) : # arrays behaves as a dict with keys u1, u2,... if w is none : return arrays ['u % 04d'% i ], i, none else : return w * arrays ['u % 04d'% i ] + \ ( 1 - w ) * arrays ['u % 04d'% ( i +... | [
0.19607022404670715,
-0.5636045932769775,
0.6105299592018127,
-0.1755516529083252,
-0.09794294089078903,
0.28863874077796936,
0.4197999835014343,
0.3475548028945923,
0.34066811203956604,
0.5043610334396362,
-0.49386289715766907,
-0.8025019764900208,
-0.2981835901737213,
0.1388510912656784,... |
def damage ( self ) : self. pkmn. setstat ( " hp ", self. hp ) damage = self. trap. getdamage ( self. pkmn ) assert damage = = self. hp / trap. ratio, " damage should be a sixteenth of the targets health " | [
-0.10500461608171463,
0.0934879407286644,
0.2664281129837036,
-0.03610008582472801,
1.4507887363433838,
0.2366921305656433,
-0.5434324741363525,
0.37178027629852295,
-0.047508079558610916,
-0.8339281678199768,
0.9641662240028381,
-0.5708149075508118,
0.22575409710407257,
-0.260922580957412... |
def oai _ result _ item ( self, identity, oai _ record _ source ) : record = self. record _ cls. loads ( oai _ record _ source ) return self. result _ item ( self, identity, record, links _ tpl = self. links _ item _ tpl, ) | [
-0.6139344573020935,
0.3626265525817871,
0.3913452625274658,
-0.085028275847435,
-0.06051389500498772,
-0.35372111201286316,
-0.04231163486838341,
-0.37076616287231445,
0.41995635628700256,
-0.4202406406402588,
0.02977548912167549,
-0.20216627418994904,
-0.04013862833380699,
-1.04741811752... |
def extract _ vars ( samples _ file _ name, n _ burnin, v _ names, debug, stride = 1 ) : # open text file with all samples, samples _ file = open ( samples _ file _ name, " r " ) # extract first line with the column labels and find the column # numbers corresponding to the variables of interest. labels _ line = samples... | [
-0.07743971049785614,
-0.9647349715232849,
0.8313969373703003,
-0.14805401861667633,
-0.2358519583940506,
-0.34232327342033386,
0.1861182451248169,
-0.0876951664686203,
-0.7781470417976379,
0.5986563563346863,
-0.39651256799697876,
0.2658320665359497,
-0.41407153010368347,
-0.0305862873792... |
def solve _ bind ( expr, vars ) : value _ expressions = [ ] keys = [ ] for pair in expr. children : keys. append ( solve ( pair. key, vars ). value ) value _ expressions. append ( pair. value ) result = row _ tuple. rowtuple ( ordered _ columns = keys ) intermediate _ scope = scope. scopestack ( vars, result ) for idx,... | [
-0.8402572274208069,
0.5613937377929688,
0.6631242036819458,
0.6532387137413025,
-0.4314137101173401,
-1.5052419900894165,
0.21708419919013977,
0.1286887526512146,
-0.3111859858036041,
0.3803262710571289,
-0.16141867637634277,
-0.22282429039478302,
-0.2123103141784668,
0.001798560610041022... |
def test _ feeds _ loaded ( self, history ) : entry = {'id':'1234'} history. add _ seen _ feed ( entry,'http : / / example. com') assert len ( history ) = = 1 # now create a new history object orig _ uri = history. store. uri new _ history = pmxbot. rss. feedhistory ( orig _ uri ) assert len ( new _ history ) = = 1 ass... | [
0.2486981451511383,
0.3997175693511963,
0.47357556223869324,
-0.6845464110374451,
0.3357309103012085,
-0.097213514149189,
-0.3575148582458496,
-0.41133323311805725,
0.5977382063865662,
-1.1934845447540283,
-0.8508153557777405,
0.5092253088951111,
-0.403511643409729,
-0.025969291105866432,
... |
def pad _ query ( query ) : extension = [ ] extended _ query = query. copy ( ) for i in range ( 0, 9 - len ( query ) ) : extension. append ( 0 ) extended _ query. extend ( extension ) extended _ query = np. array ( extended _ query ) extended _ query = extended _ query. reshape ( 1, - 1 ) return extended _ query | [
0.35344576835632324,
0.6636120080947876,
0.6207124590873718,
-0.12341982126235962,
0.08944865316152573,
0.4231797158718109,
-0.7210540771484375,
0.07979675382375717,
1.8277781009674072,
0.03996974974870682,
0.7692486047744751,
0.19922879338264465,
-0.4853198528289795,
0.10217384994029999,
... |
def _ struct _ lookup ( self, index ) : lookup = ( s for s in self. index. structures if s. index = = index ) try : return next ( lookup ) except stopiteration : if index > len ( self. index. type _ names ) or index < 0 : msg ='type index { } is not valid for this blend file '. format ( index ) else : type _ name = sel... | [
-0.5867419242858887,
-0.44112280011177063,
0.6955292820930481,
-0.9408574104309082,
0.30431026220321655,
-0.1441112905740738,
0.8175045251846313,
-1.5490792989730835,
-0.24841684103012085,
0.01050143875181675,
0.9735661745071411,
0.16335423290729523,
-0.9037634134292603,
-0.592750668525695... |
def _ autoaxis _ y _ cb ( self, setting, autoaxis _ y ) : if autoaxis _ y = ='on': msg = " autoaxis y on " elif autoaxis _ y = ='vis': msg = " autoaxis y vis " else : msg = " autoaxis y off " self. viewer. onscreen _ message ( msg, delay = 1. 0 ) self. adjust _ view ( ) | [
0.10429556667804718,
-0.3028232753276825,
0.6343753337860107,
0.27125483751296997,
-0.4063834846019745,
-0.9685478806495667,
1.0772373676300049,
-0.36726513504981995,
0.39687806367874146,
0.07685257494449615,
-0.19255593419075012,
0.8381444215774536,
0.551746666431427,
0.03296447545289993,... |
def get _ parts _ by _ name ( self, pname ) : res = [ ] for part in self. parts : name = self. get _ part _ name ( part ) if name = = pname : res. append ( part ) return res | [
-0.3018651604652405,
-0.4224219024181366,
0.2918049693107605,
0.16435660421848297,
0.208840474486351,
0.23043686151504517,
-1.2225587368011475,
-0.484416127204895,
-0.059779342263936996,
1.1605851650238037,
-0.3966236114501953,
-0.13637468218803406,
-1.2206693887710571,
0.2396688461303711,... |
def bad _ request ( start _ response ) : output = [ ] output _ len = sum ( len ( line ) for line in output ) start _ response ('400 bad request ', [ ('content - type ','application / json'), ('content - length ', str ( output _ len ) ) ] ) return output | [
-0.3305167257785797,
-1.488081693649292,
0.675450325012207,
0.09875257313251495,
0.501695454120636,
-1.0112226009368896,
-0.8602242469787598,
-0.6410871148109436,
0.12140849977731705,
-0.09575760364532471,
-0.5464590787887573,
0.23246033489704132,
-0.3159633278846741,
0.40328890085220337,
... |
def _ istypecheck ( interface, node, args ) : if len ( args ) = = 0 or args [ 0 ] [ 0 ]! ='pp _ resource': return false return node. getname ( ) = ='is % s'% _ getshortname ( interface, ['dev ','private'] ) | [
-1.0523195266723633,
0.9342337846755981,
0.5720597505569458,
0.3251029849052429,
0.7288055419921875,
0.36990469694137573,
0.17396663129329681,
-1.0531593561172485,
0.3309881091117859,
0.4110119044780731,
0.8615779876708984,
0.24622932076454163,
-0.7873420119285583,
0.7969764471054077,
0.... |
def all _ affected ( self ) : for i in self : if self [ i ]. phenotype = = " 2 " : yield self [ i ] | [
-0.03067564219236374,
-1.1869608163833618,
0.6892549991607666,
1.1216137409210205,
-0.3078819811344147,
-0.08028967678546906,
-0.10560829192399979,
0.8265320658683777,
-0.2987363338470459,
-0.39205998182296753,
-0.47963961958885193,
1.2166181802749634,
-0.5566835999488831,
0.64628034830093... |
def test _ filesystem _ create _ same _ name ( self ) : pool _ name = p _ n ( ) pool _ path = make _ test _ pool ( pool _ name, stratiscertify. disks [ 0 : 1 ] ) fs _ name = fs _ n ( ) make _ test _ filesystem ( pool _ path, fs _ name ) self. _ unittest _ command ( stratisdbus. fs _ create ( pool _ path, fs _ name ), d... | [
-0.02596355602145195,
0.44727107882499695,
0.6177343130111694,
-0.05912235751748085,
1.1968486309051514,
0.3514747619628906,
0.4891669750213623,
-1.4870795011520386,
0.6257457733154297,
-0.882753849029541,
-0.7290897369384766,
-0.13825562596321106,
0.009356406517326832,
0.163224458694458,
... |
def test _ equality ( self ) : tools. eq _ ( self. old _ manifest, manifest ( stringio ( old _ manifest ) ) ) | [
0.7624117732048035,
-1.4996397495269775,
0.11897221952676773,
0.040770236402750015,
0.3687497079372406,
0.10495205968618393,
-0.1256989985704422,
0.0902922973036766,
0.6186195611953735,
-0.06689537316560745,
-0.4871724843978882,
0.9079863429069519,
0.4461313486099243,
-0.1572389155626297,
... |
def create _ model ( params, is _ train ) : with tf. name _ scope ( " model " ) : categories = tf. keras. layers. input ( ( none, ), dtype = " int32 ", name = " categories " ) mask _ positions = tf. keras. layers. input ( ( none, 1 ), dtype = " int32 ", name = " mask _ positions " ) if params [ " with _ cnn " ] : input... | [
-0.10223738104104996,
0.06515059620141983,
0.5632317662239075,
0.6418421864509583,
0.12875935435295105,
-0.17672665417194366,
0.03213903307914734,
0.19457654654979706,
-0.3447000980377197,
-0.04592161253094673,
0.08177080750465393,
0.501724123954773,
0.5672392845153809,
0.23257948458194733... |
def physics _ only _ simulation _ validator ( self ) : go _ on, fit = self. simulate ( ) while go _ on : # simulate physics man. step ( near _ callback, self. n ) self. elapsed _ time + = self. dt go _ on, fit = self. simulate ( ) print ( fit ) | [
0.3314446210861206,
0.5627884268760681,
0.37606191635131836,
1.17537260055542,
-0.22568202018737793,
1.109457015991211,
-0.3351513743400574,
-0.877225935459137,
0.02943907119333744,
-0.5409715175628662,
0.1436212807893753,
0.03535030409693718,
-0.3127724528312683,
0.7336283922195435,
0.3... |
def winbio _ winbioenrollcapture ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " sessionhandle ", " rejectdetail " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value ) | [
-0.32926085591316223,
0.0022847792133688927,
0.6431082487106323,
0.7700508832931519,
-0.9378197193145752,
1.2838209867477417,
1.0244559049606323,
-0.4245666563510895,
0.6377309560775757,
0.3751157820224762,
-0.3632444143295288,
0.6155204772949219,
-1.2398649454116821,
1.4054219722747803,
... |
def filter _ langs ( query ) : from languages import langs if not query : return [ pair for pair in langs if len ( pair [ 1 ] ) = = 3 ] langs = [ ] query = query. lower ( ) for lang, code in langs : if len ( code )! = 3 : continue if query in lang. lower ( ) or query in code. lower ( ) : langs. append ( ( lang, code ) ... | [
-0.6192800998687744,
0.2417302280664444,
0.4407726526260376,
-0.2752704918384552,
-1.304738163948059,
0.3336859941482544,
-1.1471542119979858,
0.5414454936981201,
0.8374021649360657,
0.5503449440002441,
0.1276392787694931,
-0.43150752782821655,
-1.0036882162094116,
0.4184117019176483,
-0... |
def pytest _ sessionfinish ( exitstatus, session ) : if global _ var ['config']! = none : if logger _ gv. init : logger _ gv. debug ('global result of the test') print ( " \ n " ) if exitstatus = = 0 : if logger _ gv. init : logger _ gv. debug ('- - - > passed') print ( " \ n " ) print ('ssssssss ssss ssssssss ssssssss... | [
0.21978411078453064,
-0.7366039752960205,
1.0878074169158936,
-0.48338785767555237,
-0.04131355881690979,
0.7900029420852661,
-0.12778429687023163,
-0.4188530445098877,
-0.11780983209609985,
0.4236159324645996,
-0.6808712482452393,
0.7389355897903442,
0.40470466017723083,
1.146149158477783... |
def _ _ init _ _ ( self, start _ offset : timetype, wait _ time : timetype, end _ offset : optional [ timetype ] = 0 ) : self. wait _ time = wait _ time self. start _ offset = start _ offset self. end _ offset = end _ offset | [
-0.23886573314666748,
-0.48622822761535645,
0.6680365800857544,
0.055189959704875946,
0.38702237606048584,
0.96216881275177,
-0.47235727310180664,
0.7909654378890991,
-0.8794658184051514,
0.44799351692199707,
-0.5659166574478149,
0.22306689620018005,
0.3181939721107483,
0.20963634550571442... |
def test _ ens _ reverse _ lookup ( ethereum _ inquirer ) : call _ contract _ patch = patch. object ( ethereum _ inquirer,'call _ contract ', wraps = ethereum _ inquirer. call _ contract, ) # the patch is just to to check that chunking works correctly # we do 2 requests - first without splitting in chunks and in the se... | [
-0.3437540829181671,
0.0032342858612537384,
0.9400224089622498,
-0.9800411462783813,
0.6929314732551575,
-0.07527778297662735,
-0.34000363945961,
0.12241985648870468,
0.10342702269554138,
0.09417712688446045,
-0.3221067488193512,
-0.13471901416778564,
-0.3617468476295471,
-0.17506052553653... |
def create _ private ( self, fqdomain, availability _ zone, response _ key = true, * * kwargs ) : body = {'domain _ entry': {'scope':'private ','availability _ zone': availability _ zone } } key = none if response _ key : key ='domain _ entry'return self. _ update ('/ os - floating - ip - dns / % s'% _ quote _ domain (... | [
-0.7668549418449402,
-0.12303148210048676,
0.47978296875953674,
-0.3494946360588074,
-0.014244629070162773,
0.15882346034049988,
0.25856897234916687,
-1.4293211698532104,
0.9945873618125916,
-0.6853020787239075,
-0.7771487236022949,
0.3183269202709198,
-0.5534050464630127,
0.02257181890308... |
def get _ params ( self, deep = true ) : return self. model. get _ params ( deep ) | [
-1.467549443244934,
1.0051716566085815,
0.2821836471557617,
0.4814926087856293,
0.47595423460006714,
0.2944513261318207,
-0.31987398862838745,
0.359994113445282,
-1.5812170505523682,
0.057076167315244675,
-0.6999846696853638,
0.7963874936103821,
-0.08014148473739624,
1.0265964269638062,
... |
def save _ model ( self, optimizer, epoch, best _ model ) : print ( " [ - - - - ] saving current network state " ) epoch = " " if best _ model else f " _ { epoch } " torch. save ( self. state _ dict ( ), os. path. join ( self. save _ folder, f " params { epoch }. net " ) ) torch. save ( optimizer. state _ dict ( ), os.... | [
0.3494606018066406,
-0.4936303198337555,
0.4560753107070923,
0.1261129230260849,
1.0714503526687622,
0.7310160994529724,
-0.0902983620762825,
-0.21796724200248718,
-0.5715211033821106,
0.0857282280921936,
-1.1798615455627441,
-0.4618363678455353,
0.3550375998020172,
0.7013588547706604,
-... |
def _ _ init _ _ ( _ _ self _ _, *, asset _ name : str, dataset _ version : str, enable _ incremental _ dataset _ refresh : optional [ bool ] = none ) : pulumi. set ( _ _ self _ _, " asset _ name ", asset _ name ) pulumi. set ( _ _ self _ _, " dataset _ version ", dataset _ version ) if enable _ incremental _ dataset _... | [
0.1402050107717514,
0.27077552676200867,
0.5262872576713562,
-0.5096017122268677,
-0.2793178856372833,
0.565108060836792,
-0.5602118372917175,
0.09053832292556763,
0.08737991005182266,
0.13643069565296173,
-0.3850787281990051,
0.9670783877372742,
0.80938321352005,
-0.9383711814880371,
-0... |
def test _ ipaddr ( self ) - > none : self. lookups [ " example. com " ] = [ ( ipv4address, " 10. 1. 2. 3 " ) ] channel = self. make _ request ( " get ", " preview _ url? url = http : / / example. com ", shorthand = false, await _ result = false, ) self. pump ( ) client = self. reactor. tcpclients [ 0 ] [ 2 ]. buildpro... | [
-0.20999430119991302,
0.8858034610748291,
0.6101560592651367,
-0.8035801649093628,
0.004902873653918505,
0.062045175582170486,
-0.32825079560279846,
-0.28962451219558716,
0.024908356368541718,
0.033937130123376846,
0.2584107518196106,
0.5654073357582092,
-0.0681997761130333,
-0.45414578914... |
def test _ owners _ access _ gen ( test _ class, user, file _ name, content, mode ) : def test ( self ) : # check access to a file for owners os. system ('sudo chown { user } { file } '. format ( user = user, file = file _ name ) ) file _ content = sb. check _ output ( ['sudo ','- u ', user,'cat ', file _ name ], stder... | [
0.09495136141777039,
-0.5534756779670715,
0.6056880950927734,
0.00222072284668684,
0.13428868353366852,
0.5000141263008118,
0.8746694922447205,
0.157335102558136,
-1.3812570571899414,
-1.2710158824920654,
0.9726603031158447,
-0.023967456072568893,
1.092816948890686,
-0.028777508065104485,
... |
def save ( self, path : union [ str, pathlib. path, io. bufferediobase ], exclude : optional [ iterable [ str ] ] = none, include : optional [ iterable [ str ] ] = none, ) - > none : # add her parameters to model self. model. n _ sampled _ goal = self. n _ sampled _ goal self. model. goal _ selection _ strategy = self.... | [
-0.4068545997142792,
-0.03427211940288544,
0.6889042258262634,
0.45205017924308777,
-0.44115304946899414,
0.9028599858283997,
0.27330341935157776,
0.3935527503490448,
-0.36827564239501953,
0.7396857738494873,
-1.4516847133636475,
-0.10397046059370041,
-0.49933746457099915,
0.02431082725524... |
def _ _ len _ _ ( self ) : return len ( list ( self. _ _ iter _ _ ( ) ) ) | [
-0.06831718981266022,
-0.6159245371818542,
0.24588817358016968,
-1.3524469137191772,
0.6362090110778809,
0.3675738573074341,
0.07009869813919067,
1.1362299919128418,
0.6086397767066956,
-0.5595077276229858,
-1.055345892906189,
-0.495315819978714,
0.5369867086410522,
-0.018475377932190895,
... |
def update _ names ( ) : logger. info ( " [ observations. tasks. update _ names ] start updating names... " ) encs = utils. reconstruct _ animal _ names ( ) msg = " [ observations. tasks. update _ names ] { } animal names reconstructed. ". format ( len ( encs ) ) logger. info ( msg ) | [
-0.7552288174629211,
-0.43246936798095703,
0.3370862603187561,
-0.901573896408081,
-0.492159366607666,
-0.08977209031581879,
-0.3021480441093445,
0.14985960721969604,
-0.8876990079879761,
0.9628469347953796,
-0.957550048828125,
0.8121874928474426,
0.5747572779655457,
-0.48638033866882324,
... |
def random _ transform _ group _ entry ( self, image, annotations, transform = none ) : # randomly transform both image and annotations if transform is not none or self. transform _ generator : if transform is none : transform = adjust _ transform _ for _ image ( next ( self. transform _ generator ), image, self. trans... | [
-0.44578817486763,
-0.1881970763206482,
0.35033440589904785,
-0.7282520532608032,
0.16816338896751404,
-0.13962413370609283,
0.36509644985198975,
-0.20292958617210388,
0.28699204325675964,
-0.09042702615261078,
0.3821770250797272,
0.35236769914627075,
-0.04824810475111008,
0.63910210132598... |
def _ set _ creation _ counter ( self ) : self. creation _ counter = manager. creation _ counter manager. creation _ counter + = 1 | [
-0.1687767505645752,
-0.05379229411482811,
0.3142448961734772,
-0.05284355208277702,
0.5341951847076416,
0.5355995297431946,
0.5219607949256897,
-0.06551838666200638,
-1.0668171644210815,
-1.4170944690704346,
-0.41273194551467896,
-0.1753673553466797,
0.5409387350082397,
1.217840313911438,... |
def decode ( self, value ) : return super ( datetimefield, self ). decode ( datetime. datetime. strptime ( value, self. format ) ) | [
-0.602931022644043,
-0.247405543923378,
0.4828318655490875,
-0.6673665046691895,
-0.5218411684036255,
0.19636790454387665,
-1.1888121366500854,
0.01999184489250183,
0.3643876910209656,
-0.18928630650043488,
-1.02474844455719,
-0.6603460311889648,
-0.4365878999233246,
-0.3165293037891388,
... |
def _ set _ fields ( names, data, obj ) : template = re. compile ('(. + ) _ \ d + _ ( \ d + )') gen = zip ( names, data ) while true : name, value = gen. _ _ next _ _ ( ) match = template. findall ( name ) if len ( match ) = = 0 : setattr ( obj, name, value ) else : field _ name, array _ len = match [ 0 ] arr = [ value... | [
-1.2854024171829224,
0.23075488209724426,
0.7488662004470825,
-1.1738187074661255,
-0.3760336637496948,
-0.6175143718719482,
-0.04253789037466049,
-0.19439496099948883,
-0.5628650784492493,
-0.02606595680117607,
-1.448612093925476,
-0.907139241695404,
0.37522783875465393,
-0.21311326324939... |
def savedataframe ( dataframe, path ) : try : dataframe. write. mode ('overwrite'). parquet ( path ) except : print'error : dataframe cloud not be saved at'+ path return false return true | [
-0.48748984932899475,
0.4987119138240814,
0.5552891492843628,
-0.027142707258462906,
0.6094607710838318,
0.49647536873817444,
0.3020895719528198,
-0.5369669198989868,
-1.0527054071426392,
-0.4272841513156891,
-0.5795629620552063,
-0.7254112958908081,
-0.6775058507919312,
-0.958939075469970... |
def _ calculate _ single _ penalty ( rp, ra ) : # calculate the penalty on the basis of rp, ra penalty = 5. 0 * ( 1. 0 - math. pow ( ( rp / gt6. jr - 2. 0 ) / 15. 0, 2 ) ) * ( 1. 0 + 1. 0 / ( 1. 0 + ra / gt6. jr - rp / gt6. jr ) ) * ( ( 1. 0 + np. sign ( ra ) ) * ( 1 + np. sign ( 17. 0 - rp / gt6. jr ) ) / 4. 0 ) ; ret... | [
0.32197219133377075,
-0.2074068933725357,
0.6998441815376282,
-0.9233444333076477,
0.05783793702721596,
0.06103317067027092,
0.7830349206924438,
0.21066832542419434,
0.3025951385498047,
0.8440616130828857,
0.2656131386756897,
-0.6996952295303345,
-1.3389852046966553,
-0.07509487867355347,
... |
def set _ active _ guide _ name _ settings ( * args ) : if guides. active _ guide is not none : app _ settings. set ('active _ guide _ name ', guides. active _ guide. guide _ name ) else : app _ settings. set ('active _ guide _ name ','' ) | [
-0.4782645106315613,
-0.5732256174087524,
0.43813225626945496,
0.5182753205299377,
0.28355997800827026,
-0.1593400090932846,
0.5816852450370789,
-0.45089614391326904,
-0.5977031588554382,
2.2715935707092285,
-0.09692158550024033,
0.5575577020645142,
-0.14409413933753967,
0.396414577960968,... |
def get _ next _ pk _ trough ( pk _ pos, pk _ neg ) : ix _ nxt _ neg = [ np. where ( ppos < pk _ neg ) [ 0 ] for ppos in pk _ pos ] ix _ nxt _ neg = [ i [ 0 ] for i in ix _ nxt _ neg if i. size ] if len ( ix _ nxt _ neg ) > len ( set ( ix _ nxt _ neg ) ) : # remove reapated pos pk dupes = [ n for n, x in enumerate ( ix... | [
-0.8861793279647827,
0.15697219967842102,
0.72531658411026,
-0.20435267686843872,
-0.6797717809677124,
0.18542885780334473,
-0.08321741223335266,
0.370438814163208,
0.20023499429225922,
0.24318234622478485,
-0.5943604111671448,
-0.2156999111175537,
-0.2643645405769348,
-0.2774718999862671,... |
def get _ latest _ project _ storage ( max _ project _ id = none ) : offset = 0 limit = 1000 latest = - 1 all _ projects = [ ] while true : prjs = [ p for p in project. listing ( service _ account ( ), offset = offset, limit = limit ) ] all _ projects + = prjs offset + = limit if len ( prjs ) < limit : break for prj in... | [
-0.19087539613246918,
0.2843936085700989,
0.7786611914634705,
0.018266770988702774,
-0.3781900703907013,
0.40662989020347595,
-0.00869104266166687,
0.2720290720462799,
0.3893878161907196,
0.18752892315387726,
0.41533342003822327,
0.6030895709991455,
-0.6496851444244385,
-0.0745088160037994... |
def show _ image _ and _ keypoints ( image, keypoints, image _ name = none, save _ folder = none ) : plt. imshow ( image ) for key _ index in range ( len ( keypoints ) ) : plt. scatter ( x = keypoints [ key _ index ] [ 0 ], y = keypoints [ key _ index ] [ 1 ], c ='r') plt. annotate ( str ( key _ index ), ( keypoints [ ... | [
0.340668648481369,
-0.13487671315670013,
0.4374697804450989,
0.1262439787387848,
-0.9433209300041199,
0.5050963759422302,
-0.27874764800071716,
1.2639116048812866,
-0.0020735503640025854,
1.2073384523391724,
0.004450205247849226,
0.3927425742149353,
0.5168865919113159,
0.7017248272895813,
... |
def rotatexyandshift ( x, y, dx, dy, angle ) : import math x = x - 0 # xc y = y - 0 # yc angle = math. radians ( angle ) xr = ( x * math. cos ( angle ) ) - ( y * math. sin ( angle ) ) + 0 # xc yr = ( x * math. sin ( angle ) ) + ( y * math. cos ( angle ) ) + 0 # yc return xr + dx, yr + dy | [
-0.1415891945362091,
0.6169998049736023,
0.6623474359512329,
-1.4655290842056274,
0.2182149440050125,
-0.4967677891254425,
-0.9580252170562744,
-0.9727277755737305,
-0.05767923593521118,
-0.3804273009300232,
0.05515265464782715,
0.1895897537469864,
0.2175770103931427,
-0.7379409670829773,
... |
def click _ managingaddress ( self ) : m = self. driver. find _ element _ by _ css _ selector ( self. css _ managingaddress ) action = touchactions ( self. driver ) action. tap ( m ). perform ( ) time. sleep ( 0. 5 ) # self. driver. implicitly _ wait ( 5 ) | [
0.30488547682762146,
0.23678070306777954,
0.4836138188838959,
0.45244452357292175,
0.6748321652412415,
-0.28773218393325806,
1.077303171157837,
-0.3836337924003601,
1.3694952726364136,
-0.029003091156482697,
-0.03951549530029297,
0.5230948328971863,
-0.35456588864326477,
0.0201607141643762... |
def cpu _ turn ( dominoes, played, winner ) : cmd = input ( " status : computer is about to make a move. press enter to continue... \ n " ) if winner : return none # find left and right most played numbers left = played [ 0 ] [ 0 ] length = len ( played ) right = played [ length - 1 ] [ 1 ] # determine if computer has ... | [
-0.2740531265735626,
0.7340021133422852,
1.0645337104797363,
0.11576562374830246,
-0.3838003873825073,
-0.19854821264743805,
0.7455500364303589,
0.4439522624015808,
-0.1821235865354538,
0.3667333424091339,
-1.0642247200012207,
-0.17903132736682892,
-0.6441839933395386,
-0.36409792304039,
... |
def getbackingmachine ( self ) : return self. thebackingmachine | [
0.10801547020673752,
0.40819573402404785,
0.6920838952064514,
-0.14290601015090942,
1.146419882774353,
0.6534875631332397,
0.42857426404953003,
-0.6494685411453247,
0.28024208545684814,
-0.696714460849762,
0.21106259524822235,
0.7094958424568176,
-1.0393232107162476,
-0.5109992623329163,
... |
def evaluate _ players ( p1 : player, p2 : player, games _ per _ battle = 10, num _ battles = 100, show _ step = true ) : p1 _ wins = [ ] p2 _ wins = [ ] draws = [ ] # for printing previous = 0 for i in range ( num _ battles ) : p1win, p2win, draw = battle ( p1, p2, num _ games = games _ per _ battle, show = false ) p1... | [
-0.18226170539855957,
-0.022820282727479935,
0.7635169625282288,
-0.09668494015932083,
0.06285274773836136,
0.5631048679351807,
-0.033276092261075974,
-0.11898680031299591,
-0.8508033752441406,
0.08393785357475281,
-0.052511848509311676,
-0.08042272925376892,
0.49315300583839417,
0.3995427... |
def validate _ user _ details ( self, * args ) : firstname = args [ 0 ] lastname = args [ 1 ] email = args [ 2 ] username = args [ 3 ] password = args [ 4 ] phonenumber = args [ 5 ] isadmin = args [ 6 ] othernames = args [ 7 ] email _ validation = re. compile ( " ( ^ [ a - za - z0 - 9 _. ] + @ [ a - za - z0 - 9 - ] + \... | [
-0.1273425817489624,
0.2007196992635727,
0.7166361212730408,
-0.35157012939453125,
-0.24279990792274475,
0.7723761796951294,
-0.13088764250278473,
-0.40926966071128845,
-0.4838981628417969,
-0.25108134746551514,
0.42788612842559814,
-0.14411987364292145,
-0.6986692547798157,
0.623223602771... |
def test _ installreactorreturnsreactor ( self ) : reactor = object ( ) def install ( ) : from twisted import internet self. patch ( internet,'reactor ', reactor ) name ='fakereactortest'package = _ _ name _ _ description ='description'self. pluginresults = [ fakereactor ( install, name, package, description ) ] instal... | [
-0.3126324415206909,
-0.6869315505027771,
0.28716394305229187,
-0.7642419934272766,
0.9393832683563232,
-1.2931758165359497,
-0.16585233807563782,
0.49111390113830566,
0.921256422996521,
-0.011505033820867538,
-1.6859948635101318,
-0.2288731336593628,
-1.4782984256744385,
-0.59899520874023... |
def preprocess ( infile, outfile ) : p1 = re. compile ( r " (? : ( current. * \ s? ) ) | ( [ ^ a - z \ s'0 - 9a - z ] ) " ) # removes current url : line and everything except a - z, 0 - 9 and '. # removes spaces between'and removes'that are unattached to letters. p2 = re. compile ( r " ( [ a - z ] + ) \ ( [ a - z ]?'[ ... | [
0.4212372899055481,
-1.2716745138168335,
0.687183678150177,
-0.7627235054969788,
-0.2621416449546814,
0.4644753932952881,
0.47231996059417725,
1.4565587043762207,
-0.083198681473732,
-0.04728927090764046,
-0.11041439324617386,
0.30190929770469666,
-0.17165078222751617,
0.4237346947193146,
... |
def back _ track ( src, dest, predecessor ) : node = dest # make a copy of the destination node shortest _ path = [ ] # store shortest path from source to destination while node! = src : try : shortest _ path. append ( node ) # add the node to the list node = predecessor [ node ] except : print ( " route not found! " )... | [
-0.09030063450336456,
0.5086181163787842,
0.5331698656082153,
0.10720440745353699,
-0.21817219257354736,
-0.19342370331287384,
-0.4385482966899872,
0.7589328289031982,
-0.0970480889081955,
0.5841459035873413,
0.20181061327457428,
0.32771527767181396,
-0.1574711948633194,
-0.405717521905899... |
def tokenize ( text ) : tokens = [ normalize ( t ) for t in re. split ('+ ', text ) ] # remove the first'i'if len ( tokens ) > 0 and tokens [ 0 ] = ='i': tokens = tokens [ 1 : ] return tokens | [
-0.897883415222168,
-0.35920459032058716,
0.4926413893699646,
0.676510214805603,
-1.1281204223632812,
-0.2108047902584076,
0.1421441286802292,
1.2904738187789917,
0.8008085489273071,
0.5823010206222534,
-0.7768391966819763,
-0.5366355776786804,
-1.1708301305770874,
-0.5134013295173645,
0... |
def mod1func ( ) : log ( " executing mod1func " ) | [
-0.40220674872398376,
-0.7296543121337891,
0.29125863313674927,
1.421675205230713,
-0.15497010946273804,
-0.006614079233258963,
1.259346604347229,
0.6990987062454224,
-0.28339317440986633,
0.36907732486724854,
0.5301929712295532,
1.505858302116394,
0.21206879615783691,
-0.33909595012664795... |
def configure _ cli ( subparsers ) : parser = subparsers. add _ parser ('unpack ', help ='unpack hdf5 file') parser. add _ argument ('- - force ','- f ', help ='write into non - empty directories ', action ='store _ true') parser. add _ argument ('- - output ','- o ', type = str, help ='output directory ', metavar ='ou... | [
0.44641217589378357,
0.14574652910232544,
0.8049361705780029,
0.17963410913944244,
0.5132783055305481,
-0.41938912868499756,
-0.0024070031940937042,
0.5569117665290833,
-0.975678026676178,
-0.13045701384544373,
-0.10011860728263855,
-0.2856961190700531,
0.38787832856178284,
0.1207153350114... |
def scroll _ to _ bottom ( self ) : scroll _ pause _ time = 1. 75 # get scroll height last _ height = self. driver. execute _ script ('return document. body. scrollheight') while true : self. driver. execute _ script ('window. scrollto ( 0, document. body. scrollheight ) ;') time. sleep ( scroll _ pause _ time ) new _ ... | [
-0.12565521895885468,
-0.2209199070930481,
1.1430357694625854,
0.7954325079917908,
1.1650049686431885,
-0.4659896492958069,
0.40663301944732666,
-1.894249677658081,
-0.3757505416870117,
-0.07259921729564667,
-0.5487390756607056,
1.0105712413787842,
-0.5654110312461853,
0.293824702501297,
... |
def adjust ( loomfile, model, hapcode, verbose ) : utils. configure _ logging ( verbose ) scbase. adjust ( loomfile, model, hapcode ) | [
0.8175503611564636,
0.4118591547012329,
0.21853739023208618,
0.8892900347709656,
0.4735654592514038,
-0.38060659170150757,
0.2706550359725952,
0.858385443687439,
-0.3611546456813812,
0.040579382330179214,
-0.09439395368099213,
0.28501272201538086,
-0.4069383442401886,
0.5999703407287598,
... |
def get _ embedding _ dart ( self, dart, propertydict ) : for d in self. orbit ( dart, [ 1, 2 ] ) : if propertydict. has _ key ( d ) : return d return dart | [
0.032284412533044815,
-0.06902032345533371,
0.5081345438957214,
-0.06461343914270401,
-0.47686365246772766,
0.9922870993614197,
-0.8600813746452332,
0.17659008502960205,
-0.10742118209600449,
-0.2527523338794708,
1.5998646020889282,
0.21656233072280884,
0.1664048433303833,
0.00117412954568... |
def new ( request ) : return edit ( request, none ) | [
-1.1135332584381104,
-0.6243655681610107,
0.17391766607761383,
0.051149431616067886,
-0.09061811864376068,
-0.44656842947006226,
0.06995438784360886,
-0.35259371995925903,
-0.5546537041664124,
-1.1288392543792725,
0.49761587381362915,
-0.23902961611747742,
0.16510102152824402,
-0.093604117... |
def tpg ( axial _ travel, filament _ width _ og, printbed _ diameter, final _ diameter, helix _ angle, smear _ factor, feedrate _ og ) : del commands [ : ] commands. append ( " ; parameters " ) commands. append ( " ; filament _ width = { } ". format ( filament _ width _ og ) ) commands. append ( " ; axial _ travel = { ... | [
0.1259460747241974,
0.15679848194122314,
0.7510612607002258,
0.08240031450986862,
0.1749500036239624,
-0.6840687990188599,
0.4417886734008789,
-0.5291919112205505,
-0.28581470251083374,
0.32274308800697327,
0.03867419436573982,
0.7246317267417908,
-0.6864486336708069,
0.736803412437439,
... |
def _ _ init _ _ ( self, line ) : # get outer bag color i = 0 ( i, bag _ adj ) = get _ next _ word ( i, line ) i = i + 1 ( i, bag _ color ) = get _ next _ word ( i, line ) bag = bag _ adj + " " + bag _ color self. outer _ bag = bag i = i + 1 # eat " bags contain " ( i, _ ) = get _ next _ word ( i, line ) i = i + 1 ( i,... | [
0.1625671684741974,
-0.26731589436531067,
1.0743721723556519,
0.21225357055664062,
-0.6525076627731323,
-0.1709219068288803,
0.5601332187652588,
-0.33551329374313354,
-0.767989456653595,
-0.4716438353061676,
-0.615058958530426,
-0.2788894772529602,
-0.11251668632030487,
0.3656862676143646,... |
def _ _ repr _ _ ( self ) : return ( " { } { } / { } ". format ( self. tire _ type, self. width, self. ratio ) + " { } { } ". format ( self. construction, self. diameter ) ) | [
0.4327264428138733,
-1.3935492038726807,
0.6939486861228943,
-1.8610903024673462,
-0.2161462903022766,
0.9137654900550842,
0.05022875592112541,
-0.7953026294708252,
-0.3532750904560089,
0.12102511525154114,
0.5521496534347534,
-0.12184260040521622,
0.3934754431247711,
0.04817721247673035,
... |
def get _ table _ download _ link ( df, name ) : csv = df. to _ csv ( index = false ) b64 = base64. b64encode ( csv. encode ( ) ). decode ( ) # some strings < - > bytes conversions necessary here # href = f'< a href = " data : file / csv ; base64, { b64 } " > download csv file < / a >'href = f'< a href = " data : file ... | [
-0.090291328728199,
0.20903493463993073,
0.5964472889900208,
0.44519755244255066,
-0.049125298857688904,
-0.6170240640640259,
-0.45309144258499146,
-0.06491147726774216,
-0.4175185561180115,
-0.42728063464164734,
0.34375256299972534,
0.8226286172866821,
0.7512558698654175,
-0.1776470243930... |
def render ( ) : global masked _ frame, image ret, frame = camera. read ( ) frame = cv2. cvtcolor ( frame, cv2. color _ bgr2rgb ) mask, masked _ frame = apply _ mask ( frame = frame, r = selected _ color [ 0 ] [ 0 ] [ 2 ], g = selected _ color [ 0 ] [ 0 ] [ 1 ], b = selected _ color [ 0 ] [ 0 ] [ 0 ], negdh = cv2. gett... | [
0.2269740104675293,
-0.05149662122130394,
1.0061161518096924,
0.4382392466068268,
0.17117196321487427,
-0.42222169041633606,
0.5237680077552795,
-0.8364484906196594,
-0.5205609798431396,
0.6158086061477661,
0.3204377293586731,
0.8564780354499817,
-0.07768595218658447,
0.47628968954086304,
... |
def sm _ flavor _ get _ all ( context ) : return impl. sm _ flavor _ get _ all ( context ) | [
0.15791162848472595,
-0.06222033128142357,
0.37649643421173096,
1.3505797386169434,
-0.2345310002565384,
-1.640796422958374,
-0.541782796382904,
-0.453765869140625,
0.508615255355835,
-0.17192479968070984,
0.014289963990449905,
1.110495924949646,
0.4810795783996582,
0.9853176474571228,
-... |
def rgb _ to _ hue ( red : float, green : float, blue : float ) - > int : color = round ( rgb _ to _ hls ( red, green, blue ) [ 0 ] * 360 * 182 ) return color | [
-0.039287712424993515,
-0.07639524340629578,
0.5527562499046326,
-0.12141275405883789,
0.11703990399837494,
0.6957240700721741,
-0.7614250779151917,
-0.9697805643081665,
-1.3952693939208984,
0.48790544271469116,
-0.16375024616718292,
0.3827551305294037,
-0.5064681768417358,
-0.889706313610... |
def intersect _ aabb ( self, aabb ) : # check for aabb collision maxx = max ( self. p1. x, self. p2. x, self. p3. x ) if aabb [ " maxx " ] < minx return false minx = min ( self. p1. x, self. p2. x, self. p3. x ) if aabb [ " minx " ] > maxx return false maxy = max ( self. p1. y, self. p2. y, self. p3. y ) if aabb [ " ma... | [
0.34378230571746826,
-0.4712584912776947,
1.1653276681900024,
0.2400042712688446,
-0.0785471647977829,
1.5606651306152344,
0.2600984573364258,
0.09881554543972015,
0.5768030881881714,
0.7241183519363403,
-0.01674880087375641,
-0.8197529315948486,
-0.966371476650238,
-0.47805067896842957,
... |
def writetohtml ( self, dataframe, directory, filename ) : filename = directory + filename html _ str = dataframe. to _ html ( ) html _ file = open ( filename,'w') html _ file. write ( html _ str ) html _ file. close ( ) | [
-1.028091549873352,
0.4335649907588959,
0.12893660366535187,
0.726757824420929,
0.963470995426178,
0.44732412695884705,
0.9051072001457214,
1.2709940671920776,
-1.0114202499389648,
-0.05484074726700783,
0.43925940990448,
0.8243330717086792,
1.2027473449707031,
-0.40029987692832947,
-0.25... |
def fill _ holes ( masks, min _ size = 15 ) : slices = scipy. ndimage. find _ objects ( masks ) i = 0 for sr, sc in slices : msk = masks [ sr, sc ] = = ( i + 1 ) msk = scipy. ndimage. morphology. binary _ fill _ holes ( msk ) sm = np. logical _ and ( msk, ~ skimage. morphology. remove _ small _ objects ( msk, min _ siz... | [
-0.4451325833797455,
-0.2072988897562027,
0.7231387495994568,
0.10916950553655624,
-0.205973818898201,
0.10266276448965073,
1.6109672784805298,
-0.987250030040741,
0.8668118119239807,
0.6363831758499146,
-0.472180038690567,
0.08183138072490692,
-0.1416579782962799,
0.47077035903930664,
-... |
def prepare _ networking ( lani = " eth0 ", dockeri = " docker0 ", gateway ='1 ', dns = " 8. 8. 8. 8 " ) : lanip = get _ ip _ range ( lani ) lan = '. '. join ( lanip ) gateway = '. '. join ( lanip [ : - 1 ] + [ gateway ] ) dockerip = get _ ip _ range ( dockeri ) docker = '. '. join ( dockerip ) dockerdns = '. '. join (... | [
-0.6731411814689636,
0.280927449464798,
0.6512090563774109,
-0.41207048296928406,
0.0637989491224289,
-0.3615272045135498,
-0.6040006875991821,
-0.02312595583498478,
0.4306608736515045,
-0.10529924929141998,
-0.7502377033233643,
-0.852420449256897,
0.4011467397212982,
0.38020554184913635,
... |
def set _ scroll ( self, request, pk ) : if not isinstance ( request. data, int ) : raise validationerror ( { " detail " : " data must be an int. " } ) projector _ instance = self. get _ object ( ) projector _ instance. scroll = request. data projector _ instance. save ( ) return response ( { " detail " : " setting scr... | [
-0.9458564519882202,
0.8906538486480713,
0.5833834409713745,
-0.10629106312990189,
-0.16159583628177643,
1.1516181230545044,
0.23403260111808777,
-0.9223228693008423,
0.25651440024375916,
0.09810247272253036,
-0.7347198724746704,
0.027599886059761047,
-0.44511908292770386,
0.10494749993085... |
def compare _ data ( plt _ type, correct, given, special _ comparison = none ) : if special _ comparison is none : def special _ comparison ( left, right ) : return left = = right # infer arguments if plt _ type = ='hist': correct _ xs = none correct _ ys = correct elif not correct : correct _ xs = [ ] correct _ ys = [... | [
0.016826331615447998,
-0.4244387745857239,
0.5995436310768127,
-0.10673262923955917,
0.10565917193889618,
0.4701361060142517,
-0.46383917331695557,
0.5256457924842834,
0.08808664977550507,
-0.07200204581022263,
0.21610116958618164,
1.1440420150756836,
0.25953006744384766,
0.923708796501159... |
def _ get _ cap _ service _ name ( self ) - > str : return self. name. value. capitalize ( ) | [
-0.8096755743026733,
-1.4974619150161743,
0.7461976408958435,
-0.16318906843662262,
-0.4712095856666565,
0.8127726316452026,
-0.496330589056015,
-1.0969176292419434,
-0.12485396862030029,
0.7374603152275085,
0.9653648734092712,
0.5180982947349548,
0.4939119517803192,
0.6082690358161926,
... |
def estzshiftsgrouping ( sc, regdict, nzshifts = 5, zfwhm = 2. 5, nanthreshold = 200, crop = none, preflag = true, redobestcrop = false, do _ plot = true ) : start = time. time ( ) regdict ['nzshifts'] = nzshifts regdict ['nanthresholdzshiftsgrouping'] = nanthreshold regdict ['zfwhm'] = zfwhm groups = copy. deepcopy ( ... | [
-0.10349015146493912,
0.8256569504737854,
0.6168376803398132,
-0.201809361577034,
-0.6026529669761658,
-0.4328165054321289,
0.9901494979858398,
0.24285300076007843,
0.26683980226516724,
0.4536491632461548,
0.35786572098731995,
0.5564049482345581,
-0.3091478943824768,
0.7992861270904541,
... |
def imp ( filename, module _ name = none ) : if module _ name is none : module _ name = pxt. helpers. get _ module _ name ( filename ) spec = importlib. util. spec _ from _ file _ location ( module _ name, filename ) mod = importlib. util. module _ from _ spec ( spec ) spec. loader. exec _ module ( mod ) return mod | [
-0.7013623714447021,
-0.2924371659755707,
0.6618589758872986,
-0.17030705511569977,
-0.05496339127421379,
0.2041880190372467,
0.11022138595581055,
1.0279531478881836,
0.14286808669567108,
0.6620474457740784,
0.26598191261291504,
0.6142835021018982,
-0.5595953464508057,
-0.8051022887229919,... |
def supports _ snapshot _ lv _ activation ( self ) : if self. _ supports _ snapshot _ lv _ activation is not none : return self. _ supports _ snapshot _ lv _ activation self. _ supports _ snapshot _ lv _ activation = ( self. get _ lvm _ version ( self. _ root _ helper ) > = ( 2, 2, 91 ) ) return self. _ supports _ snap... | [
-0.6415972709655762,
0.3532162308692932,
0.674797534942627,
0.7618424296379089,
-1.3580423593521118,
0.12845033407211304,
-0.541104793548584,
0.7329761981964111,
1.0003650188446045,
0.10990547388792038,
-0.9761210680007935,
0.1338118463754654,
0.48027345538139343,
0.20702730119228363,
-1... |
async def test _ set _ pin _ wrong _ chars ( v3 _ server ) : async with aiohttp. clientsession ( ) as session : with pytest. raises ( pinerror ) as err : simplisafe = await get _ api ( test _ email, test _ password, session = session, client _ id = test _ client _ id ) systems = await simplisafe. get _ systems ( ) syst... | [
-0.19819334149360657,
0.546391487121582,
0.2559586763381958,
-0.6045297980308533,
0.568905234336853,
1.367323637008667,
-0.5197397470474243,
-0.6102359890937805,
0.42936307191848755,
0.7401978373527527,
-0.6187677979469299,
0.8646183013916016,
-0.45247337222099304,
-0.14845849573612213,
... |
def check _ previous _ tweet ( self ) - > none : tweet _ log = os. path. join ( self. repo _ path, " tweet _ log " ) if not os. path. exists ( tweet _ log ) : previous _ tweet = " " else : with open ( tweet _ log,'r +') as previous _ tweet _ log : previous _ tweet = previous _ tweet _ log. read ( ) tweet = self. logicb... | [
1.0061615705490112,
-0.5126188397407532,
0.7139086127281189,
-0.19611407816410065,
0.6148224472999573,
0.3441128134727478,
0.845699667930603,
-0.2322336733341217,
-0.19876764714717865,
0.4104265868663788,
-0.23014138638973236,
0.20522892475128174,
-0.35237717628479004,
0.5291817784309387,
... |
def _ tssjs _ 2 _ errorview _ format ( self, errors ) : self. files = { } self. points = { } text = [ self. create _ message ( ) [ 1 ] ] previous _ file ='' line = 0 for e in errors : filename = e ['file']. split ('/') [ - 1 ] if previous _ file! = filename : text. append ( " \ n \ non file : % s \ n " % filename ) lin... | [
-0.5401256680488586,
-0.8962600231170654,
0.7883639931678772,
-1.0545400381088257,
-0.8316954374313354,
-0.8664311170578003,
0.19413331151008606,
0.019581828266382217,
-0.45751410722732544,
-0.09169328212738037,
0.40838423371315,
0.18856772780418396,
0.9868228435516357,
0.35048773884773254... |
def test _ solver _ constraints _ with _ simplification _ and _ secrete ( self ) : parameters = [ 3, 3, 3, 3 ] constraints = { ( pair ( 0, 0 ), pair ( 1, 0 ) ), ( pair ( 0, 0 ), pair ( 1, 2 ) ), ( pair ( 0, 1 ), pair ( 3, 0 ) ), ( pair ( 0, 2 ), pair ( 3, 0 ) ), ( pair ( 1, 1 ), pair ( 3, 0 ) ) } solver = solver ( para... | [
-0.6047065854072571,
0.5906849503517151,
0.5918220281600952,
0.37853237986564636,
-0.009369311854243279,
0.24265402555465698,
0.13220176100730896,
1.0394402742385864,
-0.015950093045830727,
0.027250558137893677,
-1.30088472366333,
-0.9012311100959778,
-0.7109681963920593,
0.259516984224319... |
def _ _ unicode _ _ ( self ) : return _ ( u " test suite { 0 } / { 1 } " ). format ( self. job. id, self. name ) | [
-0.0020147990435361862,
-1.106200098991394,
0.530803918838501,
-0.729120135307312,
-0.33547067642211914,
0.5095728635787964,
0.3173183500766754,
-0.3899291157722473,
0.35118287801742554,
-0.537224292755127,
-0.3852270841598511,
0.7077193260192871,
-0.08148550242185593,
-0.5921902656555176,... |
def finish _ task ( self, jobreports, threads ) : | [
0.9054060578346252,
-0.381710946559906,
0.1342184692621231,
-0.15684279799461365,
1.2385976314544678,
0.29868778586387634,
0.06808923184871674,
-0.11265110969543457,
-1.50381338596344,
-0.31999531388282776,
0.17295408248901367,
-0.9085553288459778,
-1.1631414890289307,
0.34474071860313416,... |
def map _ attribute _ to _ seq ( self, attribute : str, key _ attribute : str, value _ attribute : optional [ str ] = none ) - > none : if not self. has _ attribute ( attribute ) : return attr _ node = self. get _ attribute ( attribute ) if not attr _ node. is _ mapping ( ) : return start _ mark = attr _ node. yaml _ n... | [
-0.9027111530303955,
-0.6536997556686401,
0.7623375654220581,
-0.2858847379684448,
-0.13521087169647217,
-0.4734708368778229,
0.1343192607164383,
0.9968128204345703,
0.569718599319458,
0.8705623745918274,
-0.3562644124031067,
0.17885418236255646,
1.2922189235687256,
0.28089210391044617,
... |
def test _ gaussian _ regression _ outliers ( n _ samples, d, n _ replications, prop _ outliers, corruption _ params, agg _ params, noise _ sd = 0. 5 ) : regrets = [ ] predictors = make _ function _ class _ regression ( ) for i in tqdm ( range ( n _ replications ) ) : x, y = make _ gaussian _ regression ( n _ samples, ... | [
-0.48413634300231934,
0.8347873687744141,
1.0793204307556152,
-0.36601799726486206,
0.25635406374931335,
-0.3642696738243103,
0.0698850005865097,
-0.09407410770654678,
-0.3108501434326172,
1.0804684162139893,
0.28366348147392273,
1.3790847063064575,
0.08931995183229446,
0.2885841131210327,... |
def check _ proto _ version ( self ) : packed _ len = pack ( len _ fmt, calcsize ( protover _ fmt ) ) sentbytes = self. _ sendall ( packed _ len ) assert sentbytes = = calcsize ( len _ fmt ) sentbytes = self. _ sendall ( protoversion ) assert sentbytes = = calcsize ( protover _ fmt ) protover _ length = self. _ recvall... | [
0.07668136805295944,
-0.16075357794761658,
0.6020688414573669,
-0.2408149391412735,
-0.05107404291629791,
1.1296501159667969,
-0.12203468382358551,
-0.12459610402584076,
0.3192925751209259,
0.12479059398174286,
-1.2105265855789185,
0.37473827600479126,
-1.2148246765136719,
0.41250246763229... |
def datatype _ name ( self ) - > str : return " fixedsize _ array " | [
1.118583083152771,
0.17324689030647278,
0.4381040930747986,
-0.23914575576782227,
-0.03316493704915047,
0.3762144446372986,
-0.19787536561489105,
-0.1598900854587555,
0.5875113606452942,
0.18231447041034698,
-1.1670570373535156,
0.7216349840164185,
0.5379586219787598,
0.8358485102653503,
... |
async def wiki _ search ( wiki, text, limit ) : url = _ urlencode ( wiki, action ='cargoautocomplete ', table ='items ', field ='name ', substr = text, limit = limit ) async with aiohttp. clientsession ( ) as session : async with session. get ( url ) as response : if ( response. status! = 200 ) : return none json = awa... | [
-0.7147878408432007,
-0.3026258647441864,
0.638408362865448,
-0.24272893369197845,
-0.0918615460395813,
-1.3482602834701538,
-2.0822856426239014,
-0.574580729007721,
-0.8115673661231995,
0.7542203068733215,
-0.7144241333007812,
0.1278812140226364,
-0.81067955493927,
-0.8153550028800964,
... |
def get _ instance _ key ( base _ name, revision, zone, instance _ name ) : return ndb. key ( models. instance,'% s % s % s % s'% ( base _ name, revision, zone, instance _ name ) ) | [
-0.14664041996002197,
-0.6300180554389954,
0.3145461976528168,
-0.5556729435920715,
-0.23175430297851562,
0.8618103265762329,
-0.22899572551250458,
0.13298670947551727,
-1.140885829925537,
1.2720767259597778,
-0.38088104128837585,
0.6263547539710999,
-1.155001163482666,
-0.5909379720687866... |
def extract _ item ( layercake, edit _ id ) : parsed = fromstring ( layercake ) return parsed. find ( ". / / div [ @ id ='% s'] " % ( edit _ id, ) ) | [
-0.13820062577724457,
-0.23584744334220886,
0.4589409828186035,
0.021638154983520508,
-0.2909112572669983,
-0.23543663322925568,
-0.048089247196912766,
-0.1765420287847519,
-0.5117151737213135,
-0.09192371368408203,
-0.06369830667972565,
-0.03575589880347252,
-0.26256874203681946,
-0.24245... |
def set _ length ( self, value ) : self. length = value | [
0.2270849049091339,
0.5825336575508118,
0.2135867178440094,
-0.9625479578971863,
0.5420464277267456,
1.4721062183380127,
0.7102866768836975,
0.3210148513317108,
0.4035786986351013,
0.16270525753498077,
-1.2338788509368896,
-0.5731799006462097,
0.3901490569114685,
0.800033450126648,
0.385... |
def makeaveragepslocalfigure ( averagepslocal, figurefilename, gridsize ) : pylab. figure ( ) for i in range ( gridsize [ 0 ] ) : for j in range ( gridsize [ 1 ] ) : pylab. subplot ( gridsize [ 0 ], gridsize [ 1 ], i * gridsize [ 1 ] + j + 1 ) pylab. imshow ( np. log ( averagepslocal [ i, j ] ), cmap = " gray " ) pylab... | [
0.08097994327545166,
0.3189357817173004,
0.5962206721305847,
-0.5101637244224548,
-0.9755940437316895,
0.3653448820114136,
1.0100444555282593,
0.5377681851387024,
-0.3502839207649231,
0.48637354373931885,
-0.11708793044090271,
0.45873644948005676,
0.3333088457584381,
0.037055905908346176,
... |
def image _ aspect _ ratio ( self, image _ index ) : # pil is fast for metadata image = image. open ( self. image _ path ( image _ index ) ) return float ( image. width ) / float ( image. height ) | [
-0.4628903269767761,
-0.40750011801719666,
0.3657425343990326,
-1.055770993232727,
0.15709161758422852,
-0.37545913457870483,
-0.04161512479186058,
-0.18339575827121735,
0.6210899353027344,
0.6011902689933777,
1.16266930103302,
-0.252929151058197,
0.37640297412872314,
0.6597315669059753,
... |
def reservation _ rollback ( context, reservations ) : return impl. reservation _ rollback ( context, reservations ) | [
-0.7890333533287048,
0.5136180520057678,
0.2014375478029251,
-0.23276375234127045,
0.04322066903114319,
0.43004879355430603,
-0.21042995154857635,
1.4083728790283203,
0.02598932385444641,
1.5830379724502563,
0.7575712203979492,
0.1760387420654297,
-0.24592645466327667,
-1.4474314451217651,... |
def mp ( amounts ) : from projecteulertoolkit. formula import fac s, p = 0, 1 for v in amounts : s + = v p * = fac ( v ) return fac ( s ) / / p | [
0.6672126650810242,
-0.1346772313117981,
0.36357206106185913,
-0.2859441936016083,
-0.06174666807055473,
0.052178166806697845,
0.42974740266799927,
-0.06605047732591629,
0.9606595635414124,
-0.30324846506118774,
1.0299876928329468,
-1.1148048639297485,
0.013437585905194283,
0.4803442060947... |
def full _ metric _ evaluation ( a, f, upper _ forecast, lower _ forecast, df _ train, prediction _ interval, columns = none, scaler = none, return _ components = false, * * kwargs, ) : # this is used in amfm so try to modify without changing inputs and outputs # arrays are faster for math than pandas dataframes a = np... | [
-0.1248687133193016,
0.011158719658851624,
0.9647488594055176,
-0.3582589626312256,
-0.7258291244506836,
-0.22816886007785797,
0.63241046667099,
0.08165358006954193,
-0.5088294744491577,
0.5034576058387756,
0.8264837265014648,
0.20651696622371674,
1.0801074504852295,
0.47906044125556946,
... |
def _ _ init _ _ ( self, pos, transform = false, comment = false ) : self. init ( ) self. pos = vec ( pos ) self. point _ type ='ignore'self. transform = transform self. obtype = " point " self. control = true self. comment = comment | [
0.6992206573486328,
-0.6407442688941956,
0.7163904905319214,
0.1801839917898178,
0.3173535168170929,
0.3696818947792053,
0.15113237500190735,
0.37762418389320374,
0.46106597781181335,
-0.18638931214809418,
-0.9790608286857605,
-0.8491363525390625,
0.10201254487037659,
0.04416060447692871,
... |
def base _ size ( self ) - > int : return ( self. size - sum ( txi. size for txi in self. _ inputs ) - sum ( txo. size for txo in self. _ outputs ) ) | [
0.8765293955802917,
0.1372198909521103,
0.6130756735801697,
-0.36165913939476013,
0.30429044365882874,
0.3340601325035095,
1.2089396715164185,
-0.2759493291378021,
-0.4444456994533539,
-0.27160322666168213,
-0.6794195175170898,
-0.634125292301178,
-1.547417163848877,
0.06288473308086395,
... |
def max _ sliced _ wasserstein _ distance ( x _ s, x _ t, a = none, b = none, n _ projections = 50, p = 2, projections = none, seed = none, log = false ) : from. lp import wasserstein _ 1d x _ s, x _ t = list _ to _ array ( x _ s, x _ t ) if a is not none and b is not none and projections is none : nx = get _ backend (... | [
0.8572924137115479,
-0.20997421443462372,
0.8830434083938599,
0.0454772524535656,
-0.40268996357917786,
-0.6207870841026306,
-0.5570927262306213,
0.36118534207344055,
0.6334444880485535,
0.4633890986442566,
0.28463488817214966,
0.422227680683136,
0.2452607899904251,
0.043545521795749664,
... |
def winbio _ winbioverify ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " sessionhandle ", " identity ", " subfactor ", " unitid ", " match ", " rejectdetail " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value ) | [
0.4653763771057129,
0.028164662420749664,
0.4093374013900757,
1.165522813796997,
-0.014983031898736954,
1.0727684497833252,
0.804101288318634,
0.08841903507709503,
0.5394644737243652,
-0.006393815856426954,
-0.8966456651687622,
0.8071127533912659,
-1.780472755432129,
0.6545758843421936,
... |
def phase _ space ( system, param, vect _ ic, vect _ t, integrator = rk4, xmodulo = none, pmodulo = none ) : n _ ic = len ( vect _ ic ) n _ t = len ( vect _ t ) # computing the trajectories, solutions of the diff. eq. ( de ) for each ic progression = 0 xtot, ptot = zeros ( ( n _ ic, n _ t ) ), zeros ( ( n _ ic, n _ t )... | [
-0.018408972769975662,
-0.12459103763103485,
0.5199497938156128,
0.2696141302585602,
0.2890135645866394,
-0.3409600257873535,
0.4340193271636963,
0.2055342048406601,
-0.06884854286909103,
0.601318359375,
0.056760337203741074,
-0.9019879102706909,
-0.5874921083450317,
0.221642404794693,
-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.