text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def process _ image ( self, context, image _ format ) : available _ formats = self. image _ converter. available _ formats. copy ( ) available _ formats. remove ( image _ format ) self. logger. debug ( " document with supported image format detected " ) self. send _ message ( context, " image _ detected " ) self. send ... | [
-0.4366438090801239,
-0.474177747964859,
0.47480618953704834,
0.010180719196796417,
0.30179914832115173,
-0.4974992573261261,
-0.42772889137268066,
-0.3128149211406708,
0.6591759920120239,
0.9329419136047363,
0.3722640573978424,
0.6841491460800171,
-0.3297523260116577,
1.0966943502426147,
... |
def storage _ location ( self ) - > pulumi. input ['networkpacketcapturestoragelocationargs'] : return pulumi. get ( self, " storage _ location " ) | [
-0.39734166860580444,
-0.49594125151634216,
0.2950080335140228,
0.524847686290741,
0.5674596428871155,
0.6978094577789307,
0.7815489172935486,
-0.28259509801864624,
0.9162309169769287,
-0.3608298897743225,
-0.9444981813430786,
-0.4223906993865967,
0.4806382954120636,
-0.33118367195129395,
... |
def signature ( request ) - > str : return get _ test _ data ( request, _ _ name _ _, " signature ", " r " ) | [
-0.9566693305969238,
-0.4363376796245575,
0.19627830386161804,
0.4403843879699707,
0.05585023760795593,
-0.5574133992195129,
0.245336651802063,
-0.33380886912345886,
0.32273638248443604,
0.5894215703010559,
-0.5603331327438354,
-0.44281017780303955,
-0.013620980083942413,
-0.21326825022697... |
def _ _ init _ _ ( self, x : num, y : num ) : self. x = x self. y = y | [
-0.3154812455177307,
-0.5990134477615356,
0.56678307056427,
0.013823539949953556,
-0.04238075762987137,
0.3041938543319702,
-0.600684642791748,
-0.5896959900856018,
-0.6316906213760376,
-0.5339375138282776,
-0.2527531683444977,
0.7779111266136169,
0.7408488988876343,
-0.4087020754814148,
... |
def add _ event ( self, event ) : # pylint : disable = invalid - name self. addevent ( event ) | [
0.0021241409704089165,
-0.009686165489256382,
0.1346888393163681,
0.6675594449043274,
0.5708175897598267,
1.009999394416809,
-0.569195568561554,
0.582255482673645,
1.0715112686157227,
-1.0371960401535034,
-0.8885067105293274,
0.22880014777183533,
0.05636274442076683,
0.7782665491104126,
... |
def read _ config ( ) : global token, db _ url, db _ name, db _ username, db _ password global error _ color, alert _ color, success _ color d = json. load ( open ('config. json') ) token = d [ " security " ] [ " token " ] db _ url = d [ " database " ] [ " url " ] db _ name = d [ " database " ] [ " database " ] db _ us... | [
-0.7132910490036011,
-0.27816542983055115,
0.6861885190010071,
-0.8984125256538391,
0.12028371542692184,
0.4313620924949646,
-0.707179069519043,
0.25146934390068054,
-1.5006208419799805,
0.9288210272789001,
-1.0560832023620605,
1.0639160871505737,
0.1792546510696411,
0.7232810258865356,
... |
def load _ address _ book ( self ) : pass | [
-1.2592517137527466,
-0.3180539906024933,
0.12341487407684326,
0.8704527020454407,
-0.42501866817474365,
1.2192190885543823,
-0.42441263794898987,
0.43523961305618286,
-0.2758391201496124,
-0.05582554265856743,
-0.24905572831630707,
0.01716158539056778,
-0.5723238587379456,
0.0206605214625... |
def index ( self, req, tenant _ id ) : context = req. environ [ wsgi. context _ key ] volume _ types = models. volumetypes ( context = context ) return wsgi. result ( views. volumetypesview ( volume _ types, req ). data ( ), 200 ) | [
-0.1458388864994049,
-0.31496912240982056,
0.4692896604537964,
-0.15266957879066467,
1.0701942443847656,
-0.4103938341140747,
-0.3713683485984802,
-0.17084532976150513,
-0.13503912091255188,
0.5532220602035522,
0.6348932981491089,
1.0381532907485962,
-0.11809293180704117,
0.333136081695556... |
def split _ subreddit _ list ( subreddit _ string ) : return subreddit _ string. split ('/') | [
0.35162124037742615,
-0.050531722605228424,
0.29226550459861755,
0.6678166389465332,
0.004864857066422701,
0.661934494972229,
-0.6233725547790527,
0.9353713989257812,
0.3210970163345337,
0.3674253821372986,
-0.8471873998641968,
1.005253553390503,
-0.7772603631019592,
-0.24792760610580444,
... |
def build _ static _ libs ( self ) : def build _ one _ static _ lib ( acc, lib _ dir ) : lib _ name = os. path. join ( lib _ dir, os. path. basename ( lib _ dir ) ) static _ lib _ target = self. _ _ env. staticlibrary ( self. _ _ to _ build _ path ( lib _ name ), self. _ _ to _ build _ path ( self. _ _ build _ env. sta... | [
-1.4041715860366821,
-0.3859495222568512,
0.5220541954040527,
0.6652127504348755,
0.9983212947845459,
0.5891291499137878,
0.9231008887290955,
-0.32222479581832886,
0.6622799038887024,
0.14958414435386658,
0.05493323132395744,
0.5511620044708252,
0.5314455628395081,
0.39938071370124817,
0... |
def start ( self, playbook _ or _ integration _ id, path = none, record = false ) - > none : if self. is _ proxy _ listening ( ) : self. logging _ module. debug ( " proxy service is already running, stopping it " ) self. ami. call ( [ " sudo ", " systemctl ", " stop ", " mitmdump " ] ) self. logging _ module. debug ( f... | [
-0.4116774797439575,
-0.8070945739746094,
0.5381229519844055,
0.23997826874256134,
0.3812791407108307,
-0.12646882236003876,
0.14786121249198914,
0.689816951751709,
0.38800424337387085,
0.4238302409648895,
-0.0468948595225811,
0.8012516498565674,
-0.6319670677185059,
0.22894570231437683,
... |
def veg _ directory ( ) : vegetables = produce. query. filter _ by ( prod _ type = 1 ). all ( ) return render _ template ('/ vegetables. html ', vegetables = vegetables ) | [
-0.4970346987247467,
0.8814699649810791,
0.284291535615921,
1.0121018886566162,
0.20991098880767822,
-0.2368880957365036,
0.822919487953186,
0.1564149707555771,
0.49524298310279846,
0.35825812816619873,
0.4776332378387451,
0.7883023023605347,
0.47209009528160095,
0.35491153597831726,
-1.... |
def _ _ filladdpulltasksrequest ( self, task, task _ request, transactional ) : task _ request. mode = taskqueue _ service _ pb2. taskqueuemode. pull self. _ _ filltaskcommon ( task, task _ request, transactional ) if task. payload is not none : task _ request. body = task. payload else : raise badtaskstateerror ('pull... | [
-0.593952476978302,
0.9843084216117859,
0.5295133590698242,
-0.2980253994464874,
0.37942683696746826,
0.5717863440513611,
-0.9203847050666809,
-0.5042183995246887,
0.044235654175281525,
0.12600798904895782,
0.19078846275806427,
-0.012714061886072159,
0.5181007385253906,
0.4650821387767792,... |
def create _ instances ( self ) : self. cell _ inst = { } self. array _ layout = [ ] bitline = 0 for col in range ( ( self. column _ size * 2 ) - 1 ) : row _ layout = [ ] name = " rca _ { 0 } _ { 1 } ". format ( self. location, col ) # top / bottom cell are always dummy cells. # regular array cells are replica cells ( ... | [
-0.420729398727417,
0.47563937306404114,
0.8353221416473389,
-0.5911048650741577,
-0.008910921402275562,
0.28401660919189453,
0.7856946587562561,
-0.7371693253517151,
-0.27571621537208557,
0.7405533194541931,
-0.47886472940444946,
0.012858082540333271,
-0.21680161356925964,
0.1086675971746... |
def read1 ( self, n = - 1 ) : return b'' | [
-0.8351740837097168,
0.3560543656349182,
0.5832955837249756,
1.2256345748901367,
-0.4734278917312622,
0.5081814527511597,
-0.15297645330429077,
-0.7064167261123657,
-0.18848910927772522,
-0.41803592443466187,
0.19127923250198364,
0.4699033796787262,
-1.2163400650024414,
-0.340594083070755,... |
def squeeze ( x : np. ndarray, axis : union [ none, int, tuple [ int,... ] ] ) - > np. ndarray : if isinstance ( axis, int ) : axis = ( axis, ) non _ zero _ axes = tuple ( ) shift = 0 for a in sorted ( axis ) : if x. shape [ a - shift ] = = 0 : new _ shape = x. shape [ : a ] + x. shape [ a + 1 : ] if utils. size _ at (... | [
-0.2698286473751068,
0.15145441889762878,
0.82016921043396,
0.4553173780441284,
-0.15178696811199188,
0.2676765024662018,
0.37451979517936707,
-0.5869175791740417,
0.5094757676124573,
0.11712721735239029,
0.15628889203071594,
0.4222320318222046,
-0.03371373564004898,
-0.8036282062530518,
... |
def and ( q1, q2 ) : return openlegislationset ( q1, q2,'and') | [
0.7232787609100342,
-1.2845795154571533,
0.533301830291748,
-1.0066014528274536,
-1.4359992742538452,
0.18434250354766846,
-0.8866249322891235,
0.030246779322624207,
0.03575930744409561,
-1.1581312417984009,
1.1206672191619873,
0.23020566999912262,
-0.44247663021087646,
-1.108711838722229,... |
def _ _ init _ _ ( self, ship _ heading, x _ cord, y _ cord, speed _ x, speed _ y ) : self. _ _ heading = ship _ heading self. _ _ x _ cord = x _ cord self. _ _ y _ cord = y _ cord self. _ _ x _ speed = speed _ x + acccilrtor _ factor * math. cos ( math. radians ( ship _ heading ) ) self. _ _ y _ speed = speed _ y + ac... | [
0.31901153922080994,
0.06517629325389862,
0.5592758059501648,
-0.3573406934738159,
0.6257455348968506,
-0.41249701380729675,
-0.3564836382865906,
-0.44142982363700867,
-0.09165793657302856,
0.18957500159740448,
0.05584985017776489,
0.12603148818016052,
0.31405672430992126,
-0.0979415401816... |
def stdout _ ctx ( stdout = none ) : old = sys. stdout if stdout is none : stdout = stringio ( ) sys. stdout = stdout yield stdout sys. stdout = old | [
1.035943865776062,
-0.6735671758651733,
0.9690147638320923,
-0.13966864347457886,
-0.4862014651298523,
-0.7191883325576782,
-0.2606063783168793,
-1.0016003847122192,
0.3655976951122284,
-0.8543727993965149,
-0.3385687470436096,
0.399667352437973,
0.14199981093406677,
-0.13046357035636902,
... |
def catch _ expection _ return _ error ( self, exception _ name, url ) : if exception _ name. _ _ class _ _. _ _ name _ _ = = self. req. exceptions. connectionerror. _ _ name _ _ : pnote ( " max retries exceeded with url { 0 }. failed to establish a new connection. ". format ( url ), " error " ) status = false response... | [
-0.4637981355190277,
-0.673060417175293,
0.8259564638137817,
-0.24150405824184418,
0.07201647758483887,
0.09366100281476974,
-0.01896611787378788,
0.10595568269491196,
0.10174436122179031,
0.15891490876674652,
-0.21755284070968628,
-0.3228605389595032,
-0.7830616235733032,
-0.1440506577491... |
def calc _ fitness ( self, list ) : min _ distance _ to _ ball = min ( list ) return min _ distance _ to _ ball | [
-0.720517098903656,
-0.4693424105644226,
0.4211364984512329,
0.6499814391136169,
0.11394165456295013,
0.901178240776062,
0.08307991921901703,
-0.043521858751773834,
0.8945172429084778,
-0.34292253851890564,
-2.1849851608276367,
-0.5723779201507568,
-0.9290826320648193,
0.46164512634277344,... |
def find _ mixed _ ne ( payoff ) : # this implementation is based on page 88 of the book multiagent systems ( shoham etc. ) n _ action = payoff. shape [ 0 ] c = np. zeros ( n _ action ) c = np. append ( c, 1 ) a _ ub = np. concatenate ( ( payoff, np. full ( ( n _ action, 1 ), - 1 ) ), axis = 1 ) b _ ub = np. zeros ( n ... | [
-0.05083616077899933,
-0.45261141657829285,
0.87250816822052,
0.15938644111156464,
0.5193615555763245,
-0.1540941745042801,
0.17405427992343903,
-0.44974035024642944,
0.7312694191932678,
0.5997098684310913,
-0.4006206691265106,
-0.8172370791435242,
-0.1996312290430069,
0.389891654253006,
... |
def is _ triggered ( self, message ) : message = self. prepare _ string ( message ) if triggeroptions. anywhere in self. pos : return message. find ( self. name )! = - 1 elif triggeroptions. starts in self. pos : return message [ : len ( self. name ) - 1 ] = = self. name elif triggeroptions. ends in self. pos : return ... | [
-0.018611745908856392,
-0.4920564293861389,
0.6016806960105896,
-0.06000877171754837,
-0.13723346590995789,
-1.15383780002594,
0.4475850462913513,
-0.29376402497291565,
-0.07156961411237717,
0.1036151573061943,
-1.4180645942687988,
0.019202440977096558,
-1.3670521974563599,
-0.647172629833... |
def change _ cursor ( func ) : @ wraps ( func ) def wrapper ( * args, * * kargs ) : " " " wrapper " " " wait _ cursor ( true ) try : retcode = func ( * args, * * kargs ) finally : wait _ cursor ( false, force = true ) return retcode return wrapper | [
-0.5403570532798767,
-0.14440666139125824,
0.7406246662139893,
-0.16696248948574066,
-0.3543408513069153,
-0.4872104823589325,
0.060497771948575974,
0.8851932287216187,
0.11636561900377274,
1.2182527780532837,
0.057545796036720276,
0.8873350024223328,
0.2116164267063141,
0.2943205833435058... |
def push _ tag ( self, tag, index = 0 ) : if index < 0 : index + = self. tag _ cnt pos = 12 + 4 * max ( 0, min ( index, self. tag _ cnt ) ) data = self. get _ bytes ( ) data [ pos : pos ] = tag. get _ bytes ( ) self. set _ bytes ( data ) self. tag _ cnt + = 1 | [
-0.13663320243358612,
1.0281410217285156,
0.5234264731407166,
-0.3207586109638214,
0.47780361771583557,
0.08285395056009293,
-0.3084370195865631,
-1.2178677320480347,
-0.08232074975967407,
-0.10544079542160034,
-1.1703544855117798,
0.5312541723251343,
-0.49979346990585327,
0.14126314222812... |
def add _ one _ field ( self, marcfield, subfield, value ) : if marcfield in self. data. keys ( ) : if self. data [ marcfield ] = = [ ] : # empty list in case of postpone. i. e no 1001 _ self. data [ marcfield ] = [ { subfield : value } ] else : self. data [ marcfield ] [ 0 ] [ subfield ] = value else : self. data [ ma... | [
-0.46302416920661926,
0.7477375864982605,
0.5419408679008484,
-0.3046969771385193,
0.2391391545534134,
0.9620461463928223,
-0.2945488691329956,
0.7015340328216553,
-0.392381876707077,
-0.2329840213060379,
-0.7781379222869873,
-0.029166540130972862,
-0.1356768012046814,
-0.12779603898525238... |
def step ( self, g ) : self. _ t + = 1 # g _ avg = ( g _ 1 +... + g _ t ) / t self. _ g _ avg = ( 1 - 1 / ( self. _ t + self. t0 ) ) * self. _ g _ avg + g / ( self. _ t + self. t0 ) # according to formula ( 3. 4 ) of [ 1 ], we have # x _ t = argmin { g _ avg. x + loc _ t. | x - x0 | ^ 2 }, # where loc _ t : = beta _ t ... | [
-0.04468843340873718,
-0.09708063304424286,
0.519079864025116,
-0.6008429527282715,
0.10554084926843643,
0.45138615369796753,
0.22838632762432098,
-0.3040112555027008,
-1.3213400840759277,
0.3657195568084717,
-0.8185847401618958,
0.15105192363262177,
0.4231068789958954,
0.37722694873809814... |
def sethsspeed ( typ, index ) : return none | [
-0.06338325142860413,
0.3033439517021179,
0.316224604845047,
1.0440077781677246,
0.7899676561355591,
0.06611783802509308,
-0.17258070409297943,
-0.6855472922325134,
0.6579499840736389,
0.14024440944194794,
-1.1548596620559692,
0.1070094034075737,
-1.0046252012252808,
-0.08050204813480377,
... |
def quit ( self ) : self. proc. expect ( ". * any other key to take a reading : " ) self. proc. send ( " q " ) self. proc. send ( " q " ) # confirm quit | [
0.44131454825401306,
-0.06467773765325546,
0.6244054436683655,
0.1314709484577179,
0.03442706912755966,
0.5585857629776001,
0.137308731675148,
-0.8265085220336914,
-0.6383869051933289,
-0.29979974031448364,
0.6616398692131042,
0.6696352362632751,
-0.3811112940311432,
0.439410924911499,
-... |
def _ convert _ int _ to _ i64 ( val ) : if val > 0x7fffffffffffffff : val - = 0x10000000000000000 return val | [
-0.9773023724555969,
0.2439827024936676,
0.6246262192726135,
-0.2724144756793976,
-0.4703197479248047,
-0.10849952697753906,
0.23815998435020447,
-0.5005290508270264,
0.05994364246726036,
0.832581102848053,
0.3012810945510864,
-0.5064231157302856,
-0.4905456304550171,
0.48234957456588745,
... |
def _ eliminate ( self ) : n = len ( self. _ a ) for k in range ( n - 1 ) : # index k points to the'pivot row'and'pivot column'if self. _ pivot _ on : self. _ row _ pivot ( k ) for i in range ( k + 1, n ) : if self. _ a [ i, k ]! = 0. 0 : lambda _ = self. _ a [ i, k ] / self. _ a [ k, k ] self. _ a [ i, k : n ] - = lam... | [
0.19509467482566833,
0.7747937440872192,
0.6847823262214661,
-0.2847152650356293,
0.050397537648677826,
-0.6803103685379028,
0.5488107204437256,
0.7803511023521423,
-0.013328001834452152,
1.0077259540557861,
-0.24925239384174347,
-0.7166746258735657,
-0.29185882210731506,
0.713539183139801... |
def end _ turn _ bh ( ) : global player _ turn, has _ rolled, turn _ count if not has _ rolled : print'please roll before ending your turn'return current = player _ turn. get _ name ( ) if current = = player _ list [ - 1 ]. get _ name ( ) : player _ turn = player _ list [ 0 ] else : player _ turn = player _ list [ curr... | [
0.04955224692821503,
-0.5863195657730103,
0.6012256145477295,
-0.3434736132621765,
0.7462812066078186,
0.43403151631355286,
0.4803026020526886,
0.7383947968482971,
-0.7774014472961426,
0.674753725528717,
-0.1685071587562561,
1.067334771156311,
-1.2317922115325928,
0.3949088454246521,
1.2... |
def missing ( self ) : m = [ ] for i in range ( len ( self. comps ) ) : if self. comps [ i ] = = 0 : m. append ( i ) return m | [
-1.221182942390442,
-1.467220425605774,
0.5864437818527222,
0.15162330865859985,
0.7708839178085327,
1.4920281171798706,
0.05653360113501549,
0.4319586753845215,
0.6741584539413452,
-0.38687828183174133,
0.2549201250076294,
0.20704957842826843,
-0.8538299798965454,
1.1731743812561035,
-0... |
def most _ discriminative _ features ( vectorizer, selector ) : feature _ mask = selector. get _ support ( ) features = { name : score for name, score in zip ( np. asarray ( vectorizer. get _ feature _ names ( ) ) [ feature _ mask ], np. asarray ( selector. scores _ ) [ feature _ mask ] ) } return features | [
-0.4328785240650177,
-0.628130316734314,
0.6059789061546326,
0.46943429112434387,
-0.47753873467445374,
-0.8418619632720947,
-0.24813999235630035,
-0.017925305292010307,
-0.20573535561561584,
0.15766042470932007,
-1.013946771621704,
0.04943539574742317,
0.5920473337173462,
0.32259228825569... |
def get _ destination _ s3 ( dest _ bucket ) : logger. info ( " get the configuration paramters of the destination bucket in s3 " ) dest = dest _ bucket return dest | [
-0.5435217618942261,
0.16942501068115234,
0.4397994577884674,
-0.2504996061325073,
-0.051360417157411575,
0.05118472874164581,
-0.037619415670633316,
0.40563440322875977,
-0.10593750327825546,
0.7827761173248291,
-0.420213907957077,
0.04413919895887375,
0.23276492953300476,
-0.100729517638... |
def _ generate _ uniform _ quaternion ( cls ) : u = np. random. rand ( 3 ) q = np. array ( [ np. sqrt ( 1 - u [ 0 ] ) * np. sin ( 2 * np. pi * u [ 1 ] ), np. sqrt ( 1 - u [ 0 ] ) * np. cos ( 2 * np. pi * u [ 1 ] ), np. sqrt ( u [ 0 ] ) * np. sin ( 2 * np. pi * u [ 2 ] ), np. sqrt ( u [ 0 ] ) * np. cos ( 2 * np. pi * u ... | [
-0.37231042981147766,
-0.4846361577510834,
0.7121317386627197,
-1.092900276184082,
0.10937245190143585,
0.785223662853241,
-0.3504178822040558,
0.40931937098503113,
0.8840430378913879,
-0.22013357281684875,
-0.9972074627876282,
0.548337996006012,
-0.19752910733222961,
-0.2982368767261505,
... |
def hook _ cors ( self ) : bottle. response. headers ['access - control - allow - origin'] ='*'bottle. response. headers ['access - control - allow - methods'] ='put, get, post, delete, options'bottle. response. headers ['access - control - allow - headers'] ='* ' | [
0.09225758910179138,
-0.8831684589385986,
0.9390037059783936,
0.07723196595907211,
0.46064308285713196,
0.6428424119949341,
0.2641093134880066,
0.2968195378780365,
-0.03322746977210045,
-0.17346054315567017,
1.074880599975586,
0.19468572735786438,
0.4037697911262512,
-0.3514670729637146,
... |
def test _ invalid _ feature _ values ( ) : fset = sample _ featureset ( 10, 1, ['x _ valid ','x _ inf ','x _ nan'], ['class1 ','class2'] ) fset. x _ inf. values [ 0, 0 ] = np. inf fset. x _ nan. values [ 0, 0 ] = np. nan model = build _ model. models _ type _ dict ['randomforestclassifier'] ( ) try : model = build _ m... | [
-0.4928235113620758,
0.09621579945087433,
0.4143756628036499,
0.40339288115501404,
0.018521783873438835,
0.5152499675750732,
-0.7110697031021118,
0.4913085103034973,
-0.6057111024856567,
-0.8651178479194641,
-0.25742003321647644,
0.052158985286951065,
0.5082741379737854,
0.0768236964941024... |
def get _ ipython _ dir ( ) : if hasattr ( itango, " get _ ipython _ dir " ) : return itango. get _ ipython _ dir ( ) if hasattr ( ipython. iplib,'get _ ipython _ dir') : # starting from ipython 0. 9 they hadded this method return ipython. iplib. get _ ipython _ dir ( ) # try to find the profile in the current director... | [
-0.2465587705373764,
0.1121993139386177,
0.8699029684066772,
-0.03946075215935707,
-0.1387305110692978,
-0.3124719560146332,
0.8053228259086609,
-0.2234904170036316,
0.08277565240859985,
-0.44794556498527527,
0.3803558945655823,
0.43105679750442505,
-0.26091647148132324,
-0.471594214439392... |
def spherical _ to _ cartesian ( phi, theta ) : phi * = np. pi / 180 theta * = np. pi / 180 x = np. sin ( phi ) * np. cos ( theta ) y = np. sin ( phi ) * np. sin ( theta ) z = np. cos ( phi ) cartesian = np. stack ( [ x, y, z ], axis = - 1 ) return cartesian | [
-0.736315131187439,
-0.5172943472862244,
0.711136519908905,
-1.2258877754211426,
-0.12955987453460693,
-0.22810645401477814,
-0.4426843523979187,
0.3107151985168457,
-0.4743625819683075,
0.6879229545593262,
-1.0087594985961914,
0.7530215978622437,
-0.3430687487125397,
-0.19211097061634064,... |
def refine _ vertex ( self, vert, newgog, edgeupdate ) : # edgeupdate = { edge : ( newvert, newmap ) } # e is an edge incident to vert # if e is a loop at vert then newvert and newmap are tuples # add a copy of newgog to self, with vertex and edgekeys prefixed for v in newgog : self. add _ vertex ( v, newgog. localgrou... | [
-0.35998380184173584,
-0.9369595646858215,
0.8646502494812012,
-0.3750840723514557,
-0.47377389669418335,
0.2741377651691437,
-0.6946330666542053,
0.8511120080947876,
-0.0992918536067009,
0.892635703086853,
-0.11312346905469894,
0.4408928453922272,
-0.5571552515029907,
0.27266061305999756,... |
def create _ x _ y _ sets ( data : list, categorical _ sets : dict, selected _ features : list ) : print ('- - - - - - features') print ( selected _ features ) print ('- - - - - - features') features = [ ] labels = [ ] for row in data : feature = [ ] for x in selected _ features : if x not in discrete _ string _ featur... | [
-0.2498563975095749,
-0.17469896376132965,
0.3743036687374115,
-0.07847283035516739,
0.17949582636356354,
-0.3592502474784851,
-0.7902384400367737,
-0.04682832211256027,
-0.6400425434112549,
-0.30270156264305115,
0.14625723659992218,
0.24708394706249237,
0.38361287117004395,
0.269233524799... |
def test _ unit _ loginform ( self ) : with patch ('user _ auth. auth _ forms. forms') as form : form. charfield = magicmock ( return _ value = " charfiled " ) with patch ('user _ auth. auth _ forms. authenticate') as authenticate : ins = loginform ( ) ins. cleaned _ data = magicmock ( return _ value = none ) authentic... | [
-0.6566727757453918,
-0.05933118984103203,
0.5436984300613403,
-0.44006943702697754,
0.5725609660148621,
0.570713222026825,
-0.07006760686635971,
-0.2965182065963745,
0.790925920009613,
-1.1077253818511963,
-1.0103601217269897,
0.7174810171127319,
-0.026662936434149742,
-0.5974612236022949... |
def _ find _ adapter _ list ( adpt _ list, search _ adpt _ list ) : ret _ list = [ ] for search _ adpt in search _ adpt _ list : new _ adpt = _ find _ adapter ( adpt _ list, search _ adpt. name ) if new _ adpt : ret _ list. append ( new _ adpt ) return ret _ list | [
-1.1600056886672974,
-0.5147925615310669,
0.5270625948905945,
0.6493348479270935,
0.1305219829082489,
-0.06983419507741928,
-0.6147403717041016,
-0.4378208518028259,
0.5042755603790283,
1.4630448818206787,
-0.15785081684589386,
0.9364413022994995,
-0.5190321803092957,
1.1342319250106812,
... |
def setstartindex ( self, * args ) : return _ itkimageserieswriterpython. itkimageserieswriterif3if2 _ setstartindex ( self, * args ) | [
-0.6735172867774963,
-0.14514480531215668,
0.40828797221183777,
0.22020144760608673,
-0.03076561912894249,
0.6717981100082397,
0.3450409770011902,
-0.1076456755399704,
-0.2667500674724579,
0.315407931804657,
-1.1465760469436646,
0.5161111950874329,
-0.6655746102333069,
0.17609867453575134,... |
def get ( cls, deployment _ id, model _ id = none, start _ time = none, end _ time = none, metric = none ) : path = cls. _ path. format ( deployment _ id ) params = cls. _ build _ query _ params ( start _ time = start _ time, end _ time = end _ time, model _ id = model _ id ) if metric : params [ " metric " ] = metric ... | [
0.17594671249389648,
-0.23613370954990387,
0.4487122893333435,
0.2526005208492279,
0.27655866742134094,
-0.21249854564666748,
-1.265547752380371,
-0.5925881862640381,
-0.7796183824539185,
0.5525765419006348,
0.570523738861084,
0.8606777191162109,
-0.03696156665682793,
-0.3806874454021454,
... |
def write _ triple _ file ( triple _ df : pd. dataframe, filepath : str ) : open _ file = bz2. open if filepath. endswith ('bz2') else open with open _ file ( filepath, mode ='wt') as file _ writer : for _, row in triple _ df. iterrows ( ) : file _ writer. write ( format _ object _ triple ( row ['sub'], row ['pred'], r... | [
-0.22142349183559418,
-0.4959694445133209,
0.325842022895813,
0.21928243339061737,
0.555830717086792,
0.7157403230667114,
0.4161691665649414,
0.812842071056366,
-0.7017109990119934,
0.5795605778694153,
-0.5042275190353394,
0.3142695724964142,
0.710640549659729,
-0.6214807033538818,
-0.73... |
def pullsnapshotcsvonly ( self, tablename ) : snapshot = requests. get ( f " { self. snapshoturl } / { tablename } ", auth = httpbasicauth ( self. user, self. pswrd ) ) if snapshot. status _ code = = 200 : return ( stringio ( snapshot. content. decode ('utf - 8') ) ) else : raise valueerror ( " request to " + tablename... | [
-0.9812729358673096,
0.456907719373703,
0.41952136158943176,
0.8274003267288208,
-1.3502510786056519,
-0.2412603348493576,
-1.4029419422149658,
-0.48875993490219116,
0.4674065411090851,
-0.2733336091041565,
0.10466798394918442,
0.14928504824638367,
-0.05964590236544609,
-0.7391613125801086... |
def mbean _ name ( mbean _ type ) : return mbean _ type +'-'+ str ( random. randint ( 100, 65535 ) ), mbean _ type | [
-0.6784681677818298,
-0.24025890231132507,
0.4895707964897156,
-0.7104565501213074,
-0.44032523036003113,
1.0214908123016357,
-0.1681343913078308,
-0.552937388420105,
1.2104123830795288,
0.6671082377433777,
-0.17029953002929688,
0.4111596941947937,
-0.42156854271888733,
0.9676790833473206,... |
def temp _ monthly ( ) : session = session ( engine ) # find the most recent date in the data set. most _ recent _ date = session. query ( measurement. date ). order _ by ( measurement. date. desc ( ) ). first ( ). date most _ recent _ date # calculate the date one year from the last date in data set. one _ year _ ago ... | [
-0.4651586413383484,
-0.3420354723930359,
1.1052095890045166,
-0.07990540564060211,
-0.6736069321632385,
-0.41112807393074036,
0.16049689054489136,
-0.6772087812423706,
-0.07145482301712036,
0.2752929627895355,
0.5385580658912659,
-0.3665366768836975,
0.39802077412605286,
0.821586847305297... |
def _ set _ units ( self ) : for my _ unit in [ " m ", " pc ", " au ", " au " ] : new _ unit = " % scm " % my _ unit self. _ unit _ registry. add ( new _ unit, self. _ unit _ registry. lut [ my _ unit ] [ 0 ], length, self. _ unit _ registry. lut [ my _ unit ] [ 3 ] ) self. cosmology = cosmology ( hubble _ constant = s... | [
-0.510969340801239,
-0.03415762260556221,
0.472674697637558,
-0.691890299320221,
1.260109305381775,
0.4951570928096771,
0.051485590636730194,
0.24717921018600464,
-0.2633155286312103,
-0.46423742175102234,
-0.7061098217964172,
0.6493335962295532,
-0.09165935963392258,
0.12660574913024902,
... |
def get _ note _ at _ interval ( self, interval ) : n = self for i in xrange ( interval ) : n = n. up _ half ( ) return n | [
-0.992051362991333,
-0.05893821641802788,
0.4583270847797394,
0.31541773676872253,
0.6229928731918335,
0.1515270471572876,
0.4207645356655121,
-1.2301692962646484,
-0.9142297506332397,
0.052405714988708496,
-0.41681957244873047,
0.1957322359085083,
-0.9742576479911804,
-0.6280243396759033,... |
def patch _ feature _ histogram ( img, mask, ranges = none, nbins : int = 64 ) : h, w, d = img. shape n = np. sum ( mask ) # number of pixels in the mask if ranges is not none : assert ( ranges. shape = = ( d, 2 ) ) vals = img [ mask. astype ( bool ), : ] # [ n, d ] array assert ( vals. shape [ 0 ] = = n ) rst = [ ] fo... | [
0.38687992095947266,
0.2828517258167267,
0.6869875192642212,
0.9570208787918091,
-0.15412183105945587,
-0.3505231738090515,
0.2514055073261261,
0.3438970148563385,
0.6025149822235107,
0.5225496292114258,
0.3744473457336426,
0.2025100141763687,
-0.042364854365587234,
0.2922889292240143,
-... |
def _ convert _ list ( self, existing _ list ) : l = [ ] for item in existing _ list : if isinstance ( item, dict ) : l. append ( encase ( item ) ) elif isinstance ( item, list ) : l. append ( self. _ convert _ list ( item ) ) else : l. append ( item ) return l | [
-1.232063889503479,
-0.6689855456352234,
0.5699194073677063,
0.5109622478485107,
0.6772438883781433,
-0.08145004510879517,
-0.9770782589912415,
0.8787838220596313,
0.8589292764663696,
1.2642179727554321,
0.02102547325193882,
0.14473938941955566,
-0.3841424584388733,
1.6988095045089722,
-... |
def _ unify _ local _ variables ( self ) - > bool : simplified = false prop = self. _ compute _ propagation ( ) if not prop. model. equivalence : return simplified addr _ and _ idx _ to _ block : dict [ tuple [ int, int ], block ] = { } for block in self. func _ graph. nodes ( ) : addr _ and _ idx _ to _ block [ ( bloc... | [
-0.4319303631782532,
0.9371232390403748,
0.7754728198051453,
-0.3190174102783203,
-0.1752747744321823,
-0.9645909667015076,
1.1250529289245605,
0.694308876991272,
-0.3038475513458252,
0.998128354549408,
-0.9341468811035156,
0.5375615954399109,
-0.4486374258995056,
0.5438083410263062,
0.3... |
def load _ continuous _ downsampled _ tetrode _ data ( self ) : if self. verbose : print ('loading continuous data for { } '. format ( self. fpath ) ) # load downsampled data for all tetrodes in all channel groups tetrode _ nrs = sum ( [ self. channel _ map [ channel _ group ] ['tetrode _ nrs'] for channel _ group in s... | [
-0.04489670321345329,
-0.3979251980781555,
0.8821620941162109,
-1.1129777431488037,
-0.3952491879463196,
0.28078654408454895,
0.47653400897979736,
-0.18767914175987244,
-0.5356036424636841,
0.491054892539978,
0.19291354715824127,
-0.08573691546916962,
-0.5545200705528259,
-0.17554251849651... |
def ls ( self, status = false ) : log, barreleye _ instance = init _ env ( self. _ bac _ config _ fpath, self. _ bac _ logdir, self. _ bac _ log _ to _ file ) cmd _ general. check _ argument _ bool ( log, " status ", status ) agents = list ( barreleye _ instance. bei _ agent _ dict. values ( ) ) ret = print _ agents ( ... | [
0.44476526975631714,
-1.0016355514526367,
0.48075810074806213,
-0.5759064555168152,
0.2512779235839844,
-0.018298247829079628,
-0.2535093426704407,
0.47173231840133667,
-0.27301231026649475,
0.3457237482070923,
0.29597365856170654,
0.7420421838760376,
0.319105327129364,
0.7358750104904175,... |
def native _ min _ value ( self ) - > float : return self. entity _ description. native _ min _ value _ fn ( self. actuator ) | [
0.26572754979133606,
-0.6469064950942993,
0.1298489272594452,
0.3288469612598419,
-0.07918966561555862,
-0.2183385044336319,
-0.4001486897468567,
-0.9218142628669739,
-0.13343846797943115,
-0.6749280691146851,
0.9772613644599915,
0.4379723072052002,
0.2746247947216034,
0.3156677782535553,
... |
def add _ subscriber ( self, device _ id : str, callback _ : callable [ [ ], none ] ) : self. _ subscribers [ device _ id ] = callback _ | [
0.17181897163391113,
0.32363441586494446,
0.15973898768424988,
0.0855502337217331,
-0.05242078751325607,
-0.2829698324203491,
-0.550463855266571,
-0.049460045993328094,
0.35298240184783936,
-0.821900486946106,
-0.4531278908252716,
0.38580432534217834,
-0.05185823515057564,
1.06667828559875... |
def reset ( self ) : self. _ data = [ ] | [
-0.5918667912483215,
0.12629424035549164,
-0.06630716472864151,
-0.6002107858657837,
1.0152920484542847,
0.3476558029651642,
-0.18616262078285217,
-0.24461685121059418,
-0.6716083884239197,
-0.5584324598312378,
-1.3187400102615356,
1.7814576625823975,
-0.08771605044603348,
-0.2011360526084... |
def persist _ token _ information ( self, client _ id, scope, access _ token, token _ type, expires _ in, refresh _ token, data ) : # set access token with proper expiration access _ key ='oauth2. access _ token : % s'% access _ token self. redis. setex ( access _ key, expires _ in, json. dumps ( data ) ) # set refresh... | [
0.2323565036058426,
-0.5585265755653381,
0.49095407128334045,
-0.618492066860199,
0.4105638563632965,
0.42457345128059387,
-0.7722977995872498,
0.13895463943481445,
0.39977186918258667,
-0.1475553959608078,
-0.2267550826072693,
0.8075326681137085,
0.7198829650878906,
0.3190148174762726,
... |
def get _ health ( self ) : return self. health | [
0.06446042656898499,
-1.3068057298660278,
0.36267006397247314,
0.4610171616077423,
-0.27184244990348816,
1.2075809240341187,
-0.2510873079299927,
-0.37211862206459045,
-0.04371654987335205,
-1.3060728311538696,
0.20702135562896729,
0.6254166960716248,
-0.44458696246147156,
-0.5261734127998... |
def add _ field ( self, fieldname ) : text = read _ file ( self. curdir, fieldname ) fieldname = fieldname. replace ( " hgf _ ", " " ) marcfield = fieldname [ 0 : 5 ] subfield = fieldname [ 5 ] self. add _ one _ field ( marcfield, subfield, text ) | [
-0.1510850191116333,
0.4003535509109497,
0.5788437724113464,
-0.1353732943534851,
0.586128830909729,
0.36108270287513733,
0.6069832444190979,
0.7457196712493896,
-0.7472376227378845,
-0.9203634858131409,
-0.6540274620056152,
-0.28708186745643616,
-0.620640218257904,
0.11818506568670273,
... |
def test _ multiband _ vrt _ from _ single _ band ( self ) - > none : extract _ archive ( src = " tests / data / spacenet. zip " ) data = read _ csv ( " tests / tiling / tiling _ segmentation _ binary - singleband _ ci. csv " ) row = data [ 0 ] bands _ request = ['r ','g ','b'] aoi = aoi ( raster = row ['tif'], label =... | [
0.08334049582481384,
0.22322379052639008,
0.536263108253479,
0.5615013241767883,
0.3244646489620209,
1.1135538816452026,
0.4577982425689697,
-0.17121629416942596,
0.9702868461608887,
0.002617729129269719,
-0.2810649573802948,
-0.14277952909469604,
0.14012107253074646,
0.5285986065864563,
... |
def create _ discriminator _ from _ rgb _ layers ( regularizer, params ) : with tf. variable _ scope ( name _ or _ scope = " discriminator ", reuse = tf. auto _ reuse ) : # get fromrgb layer properties. from _ rgb = [ params [ " discriminator _ from _ rgb _ layers " ] [ i ] [ 0 ] [ : ] for i in range ( len ( params [ "... | [
-0.10938957333564758,
-0.5667787194252014,
0.6599835157394409,
0.593020498752594,
0.30059418082237244,
0.1771232783794403,
-0.22737275063991547,
0.0029118189122527838,
-0.3503359854221344,
0.24395751953125,
-0.7703118920326233,
-0.02153758704662323,
0.03634203225374222,
0.48736807703971863... |
def linf _ distance ( self ) : if isinstance ( self. network _ distribution, dict ) : linf _ distance _ summand _ dict = { } for key in list ( self. known _ distribution. keys ( ) ) : linf _ distance _ summand _ dict [ key ] = abs ( self. network _ distribution [ key ] \ - self. known _ distribution [ key ] ) l _ inf =... | [
1.1407753229141235,
-0.7150003910064697,
0.500533938407898,
-0.21963553130626678,
-0.32312530279159546,
0.731722354888916,
-0.5950249433517456,
1.3145257234573364,
0.589655876159668,
-0.2882677912712097,
-0.48407357931137085,
-0.019918492063879967,
-0.17547893524169922,
0.9160541892051697,... |
def get _ stream ( ast ) : while true : yield evaluate _ program ( ast ) | [
0.20503735542297363,
-0.15479446947574615,
0.39714497327804565,
-1.189946174621582,
-0.2605369985103607,
0.14287623763084412,
-0.10979229211807251,
-0.662919819355011,
-0.3477833867073059,
-0.3487780690193176,
0.1753845512866974,
0.7100246548652649,
0.011129805818200111,
0.6276851296424866... |
def async _ get _ options _ flow ( config _ entry : config _ entries. configentry, ) - > config _ entries. optionsflow : return netatmooptionsflowhandler ( config _ entry ) | [
0.8305883407592773,
-0.18521057069301605,
0.10664652287960052,
0.2028740495443344,
0.7771362662315369,
-0.033211369067430496,
0.06647507846355438,
-0.582310676574707,
0.5752084851264954,
-0.21091710031032562,
0.5179029703140259,
0.23392663896083832,
0.862005889415741,
-0.1302439570426941,
... |
def test _ check _ for _ updates ( repo _ updates ) : path = repo _ updates updates = check _ for _ updates ( path ) assert updates | [
0.48332780599594116,
-0.3141881227493286,
0.254183292388916,
0.2738801836967468,
0.676688551902771,
0.4990265667438507,
-0.3495124280452728,
0.11236537247896194,
-0.015839960426092148,
-0.7144680619239807,
0.11404237896203995,
-1.0499112606048584,
-0.07793077826499939,
-0.2941441237926483,... |
def rename _ latlon ( ds ) : if " latitude " in ds. coords : return ds. rename ( { " latitude " : " lat ", " longitude " : " lon " } ) elif " latitude " in ds. coords : return ds. rename ( { " latitude " : " lat ", " longitude " : " lon " } ) elif " lat " in ds. coords : return ds. rename ( { " lat " : " lat ", " lon "... | [
-0.764988899230957,
-0.9411280155181885,
0.6436104774475098,
-1.0186576843261719,
-0.9691942930221558,
-0.24780508875846863,
-1.5534425973892212,
0.9208805561065674,
0.0806475356221199,
0.8849021196365356,
-0.10677836835384369,
0.7148653864860535,
1.485360860824585,
0.02410363219678402,
... |
def get _ default _ retail _ site ( ) : return [ get _ retail _ site ( ). first ( ) ] | [
-0.1208488717675209,
0.6575102806091309,
0.24815650284290314,
0.47018563747406006,
1.0596206188201904,
-0.2703492343425751,
-0.42246994376182556,
-0.3658860921859741,
0.712370753288269,
-0.5628464221954346,
-0.29977089166641235,
0.28382545709609985,
-0.45863258838653564,
-0.113981723785400... |
def parse ( self, geditdoc ) : pass | [
-0.6532720327377319,
-0.15151047706604004,
0.2664623260498047,
-0.2568857967853546,
0.5227749943733215,
1.3216335773468018,
0.5725259184837341,
0.5620275139808655,
-0.08269030600786209,
-0.18510931730270386,
0.2849608063697815,
-0.48725906014442444,
-0.5380607843399048,
0.5928466320037842,... |
def draw _ plot ( column _ names, data, path _ output, title ) : col _ name _ dict = { column _ names [ i ] : i for i in range ( len ( column _ names ) ) } for col _ name in col _ name _ dict. keys ( ) : if col _ name! ='epoch': plt. plot ( data [ col _ name _ dict ['epoch'] ], data [ col _ name _ dict [ col _ name ] ]... | [
-0.044495414942502975,
-0.30324265360832214,
0.5334311723709106,
-0.2980039119720459,
-0.1554240733385086,
0.482320636510849,
-0.5028350353240967,
0.2893753945827484,
-1.2959202527999878,
-0.1765250414609909,
-0.20294226706027985,
0.2650611102581024,
0.6581389904022217,
-0.7898785471916199... |
def _ _ push ( self, bit ) : if bit : self. register | = ( 1 < < self. bpos ) self. bpos + = 1 if self. bpos = = 8 : self. bitvector + = pack ('b ', self. register ) self. bpos = 0 self. register = 0 | [
-0.5242623686790466,
1.2122666835784912,
0.8169918060302734,
0.05467060208320618,
0.6940500140190125,
0.08285246789455414,
0.23487435281276703,
-0.7813529372215271,
0.07687274366617203,
0.22793826460838318,
-0.6143446564674377,
0.7312052249908447,
-0.7661778330802917,
0.6106966137886047,
... |
def _ _ repr _ _ ( self ) : return'< badge { } ( # { } ) > '. format ( self. hash, self. id ) | [
0.3008922338485718,
-1.3138171434402466,
0.4730968475341797,
-0.823858380317688,
0.3703460693359375,
1.0186530351638794,
-0.03569553419947624,
0.1972752958536148,
0.7004770040512085,
-0.1427837610244751,
-0.7726660966873169,
1.0768953561782837,
0.18945832550525665,
-0.2534119188785553,
0... |
def run ( self ) : self. _ setup ( ) # run solution code and reset the buffer self. solution _ response = self. _ captured _ runner ( self. solution _ obj, self. args, self. kwargs,'solution ', f _ stdin = self. stdin _ buffer ) self. stdin _ buffer. reset _ buffer ( ) # run student code and reset the buffer self. stud... | [
-0.5121758580207825,
-0.677891194820404,
0.7054154872894287,
0.4332512617111206,
0.5725510120391846,
0.018054738640785217,
1.3961950540542603,
-0.840807318687439,
0.5449748635292053,
-0.47899240255355835,
-0.7931165099143982,
0.03036944754421711,
-0.3578149080276489,
0.6522524952888489,
... |
def test _ random _ sensor ( self ) : config = { " sensor " : { " platform " : " random ", " name " : " test ", " minimum " : 10, " maximum " : 20, } } assert setup _ component ( self. hass, " sensor ", config ) self. hass. block _ till _ done ( ) state = self. hass. states. get ( " sensor. test " ) assert int ( state.... | [
-0.21758107841014862,
-0.004170306492596865,
0.35199835896492004,
-0.43840333819389343,
0.41784024238586426,
0.6016101241111755,
-0.0614483617246151,
-0.47108498215675354,
0.7054668664932251,
-0.16896454989910126,
-1.2605793476104736,
-0.40871238708496094,
-0.027360407635569572,
0.17829719... |
def prepend ( self, resource _ name, value ) : if resource _ name = = " file " : self. loader ( value ) | [
0.7323687672615051,
-0.5077297687530518,
0.4618035852909088,
-0.14052528142929077,
-0.44958361983299255,
0.9113264679908752,
-0.9040804505348206,
-0.5263415575027466,
0.00567600829526782,
-0.06813131272792816,
0.8546304702758789,
0.31577035784721375,
0.5593801140785217,
1.5410100221633911,... |
def get _ freq _ band ( freq ) : if 2e9 < = freq < 4e9 : return's'if 4e9 < = freq < 8e9 : return'c'if 8e9 < = freq < = 12e9 : return'x'warn ('unknown frequency band') return none | [
-0.16213750839233398,
0.2791849374771118,
0.43424808979034424,
-0.15544214844703674,
-0.4923626780509949,
-0.12129760533571243,
-0.18964789807796478,
-0.9272317886352539,
0.4035148024559021,
-1.0285768508911133,
0.39462044835090637,
-0.10671526193618774,
0.3082636296749115,
0.1594490855932... |
def test _ comment _ count ( self ) : post _ comment = create _ post _ comment ( ) self. assertequal ( post _ comment. post. comment _ count ( ), 1 ) | [
0.5338073968887329,
-0.05062975361943245,
0.12486692517995834,
0.23838317394256592,
1.5562046766281128,
0.36997687816619873,
0.3961866796016693,
0.47412505745887756,
-0.8501877188682556,
-1.030913233757019,
-0.856130063533783,
-1.2380281686782837,
-0.1619805097579956,
0.15291355550289154,
... |
def outboundsmshandler ( phone, msg ) : phone = self. request. get ('target _ phone') msg = self. request. get ('message') # bail if there is no message defined if msg is none : logging. error ('caller ( incorrectly ) asked to send a message without text in it') ; return try : client = twiliorestclient ( config. twilio... | [
-0.17606543004512787,
0.5816656351089478,
0.6280484199523926,
0.05714911222457886,
0.15246817469596863,
0.5783092379570007,
-1.1544177532196045,
-0.588570237159729,
0.33206677436828613,
-0.08667869120836258,
0.6278564929962158,
-0.36097967624664307,
-0.773112416267395,
0.4332018792629242,
... |
def test _ check _ config _ params _ satd _ keywords _ wrong _ type ( gitdelver _ config _ params _ fixture : callable [ [ none ], dict [ str, str ] ] ) : config _ params = gitdelver _ config _ params _ fixture config _ params [ " satd _ keywords " ] = [ 1, 2 ] with pytest. raises ( systemexit ) : gitdelver. _ check _ ... | [
-0.03118395060300827,
0.23626287281513214,
0.34867697954177856,
0.42576369643211365,
-0.09509365260601044,
0.8829175233840942,
-0.5730884075164795,
-0.07669511437416077,
-0.8377588391304016,
1.238403558731079,
-0.2411068230867386,
0.3033442497253418,
-0.09528972953557968,
1.774391651153564... |
def _ _ getitem _ _ ( self, name ) : if name not in self : raise keyerror ( " key % s does not exist " % name ) if self. is _ sub _ group ( name. lstrip ('/') ) : handle = self. _ handle _ factory ( self. _ handle, name. lstrip ('/') ) return group ( handle, self. _ handle _ factory, self, self. _ name +'/'+ name, self... | [
-0.4773535132408142,
0.3390495777130127,
0.4764409065246582,
-0.34145092964172363,
-1.4760335683822632,
0.18911266326904297,
0.5517858862876892,
-0.7724810838699341,
-0.5282261371612549,
-1.2299399375915527,
0.8220477104187012,
0.7365273237228394,
-0.10623545199632645,
-0.6077515482902527,... |
def loadenv ( args, verbose = true ) : print ( " \ n = = environment information = = " ) env _ name = " dubins _ car - v1 " if args. forcecpu : device = torch. device ( " cpu " ) else : device = torch. device ( " cuda " if torch. cuda. is _ available ( ) else " cpu " ) env = gym. make ( env _ name, device = device, mod... | [
-0.4773636758327484,
-0.10358326882123947,
0.9666465520858765,
0.017353760078549385,
0.950187623500824,
0.023553358390927315,
0.1700618863105774,
-0.30205637216567993,
-1.080365777015686,
0.2567247450351715,
0.2565988004207611,
0.8582034707069397,
0.259236603975296,
-0.12398572266101837,
... |
def ftp _ download ( domain : str, path : str, fname : str, callback ) - > none : try : with ftplib. ftp ( domain ) as ftp : ftp. login ( ) ftp. cwd ( path ) ftp. retrbinary ( f " retr { fname } ", callback ) except ftplib. all _ errors as e : logger. error ( f " ftp download failed : { e } " ) raise exception ( e ) | [
0.5249110460281372,
-0.24423789978027344,
0.5294008851051331,
-0.19439372420310974,
-0.8128856420516968,
0.05025410279631615,
0.2477221041917801,
-0.841230034828186,
0.03493580222129822,
-0.5410963296890259,
0.42508217692375183,
0.566749095916748,
-0.6232568621635437,
-0.8594648241996765,
... |
def image _ config _ signed ( json _ bytes _ signed : bytes ) - > imageconfig : # do not use caching ; get a new instance for each test return imageconfig ( json _ bytes _ signed ) | [
-0.6203752756118774,
-0.8943052887916565,
0.300847589969635,
-0.8074676990509033,
-1.0820759534835815,
-0.5837199687957764,
-0.6480595469474792,
-0.3371533155441284,
1.3818895816802979,
0.7273066639900208,
-1.3940789699554443,
-0.1626344472169876,
-0.2816990613937378,
0.8547025322914124,
... |
def items ( self ) : return [ self. browser. text ( item ) for item in self. browser. elements ( self. items ) ] | [
-1.0903245210647583,
-1.5974602699279785,
0.2858521640300751,
0.4721011817455292,
0.05975630506873131,
0.2683468759059906,
-0.7083362936973572,
0.04905441775918007,
0.8746278882026672,
0.4236993193626404,
-0.5241343975067139,
-0.5655017495155334,
0.1364246904850006,
0.642963707447052,
-1... |
def add ( self, rows : union [ namedtuple, iterable [ namedtuple ] ] ) - > none : self. tuples | = set ( rows ) | [
-1.2190603017807007,
1.5627094507217407,
0.29984524846076965,
0.1230258047580719,
0.6175771951675415,
0.3716660737991333,
-0.4596039950847626,
-0.4557226002216339,
0.7615517973899841,
-0.21575894951820374,
-0.002562696812674403,
-0.5759687423706055,
-0.26738348603248596,
0.5231320858001709... |
def test _ replace _ steps ( self ) : pass | [
0.33187344670295715,
0.4967588186264038,
0.07303168624639511,
1.0625861883163452,
0.6447276473045349,
0.4179514944553375,
1.3807785511016846,
0.2724118232727051,
-0.0297891553491354,
-1.2210652828216553,
-0.9028850793838501,
-0.3146759271621704,
-0.7686181664466858,
1.133897304534912,
-0... |
def create ( * self, host, port, str1, str2, str3, str4, path ) : from time import sleep as sleep red, blue, green, reset = colorama. fore. lightred _ ex, colorama. fore. lightblue _ ex, colorama. fore. lightgreen _ ex, colorama. fore. reset print ( " [ ", green + "! " + reset + " ] " + reset + " opening file to write ... | [
-0.5158558487892151,
-0.010683488100767136,
0.9168102145195007,
0.17102189362049103,
0.24547046422958374,
0.6840171813964844,
0.48187369108200073,
-0.18727655708789825,
-1.5388820171356201,
-0.31803494691848755,
-0.016931282356381416,
-0.011982979252934456,
-0.2605483829975128,
0.156375125... |
def arcgis _ table _ to _ dataframe ( in _ fc, input _ fields, query = " ", skip _ nulls = false, null _ values = none ) : oidfieldname = arcpy. describe ( in _ fc ). oidfieldname if input _ fields : final _ fields = [ oidfieldname ] + input _ fields else : final _ fields = [ field. name for field in arcpy. listfields ... | [
-0.7213020920753479,
0.037062887102365494,
0.4051201641559601,
0.2620214521884918,
-0.12017767876386642,
-0.22182630002498627,
0.405631422996521,
-0.10538966953754425,
-0.05652906745672226,
-0.17589759826660156,
0.4199064075946808,
0.4413127601146698,
0.2695539593696594,
-0.925461173057556... |
def trafficloadunit ( self ) : if self. force _ auto _ sync : self. get ('trafficloadunit') return self. _ trafficloadunit | [
-0.7214022278785706,
0.3671133816242218,
0.44855639338493347,
-1.1999828815460205,
0.1716526597738266,
0.6298825144767761,
0.3159538507461548,
-0.5797175765037537,
0.5476140975952148,
-0.4323773682117462,
-0.506629228591919,
1.0721317529678345,
-0.7619216442108154,
-1.146965742111206,
-0... |
def parse _ bam ( bam _ path, reference _ path ) : fasta _ handler = fastahandler ( reference _ path ) chromosome _ names = fasta _ handler. get _ contig _ names ( ) chromosomal _ cigar _ counts = defaultdict ( lambda : defaultdict ( int ) ) n _ alignments = 0 n _ primary = 0 n _ supplementary = 0 n _ secondary = 0 map... | [
0.8859453797340393,
-0.3842792510986328,
1.0498521327972412,
0.5525980591773987,
-0.08182952553033829,
-0.10170245915651321,
0.33039626479148865,
0.09932281821966171,
-0.7107692956924438,
0.15698562562465668,
-0.20125029981136322,
0.8527223467826843,
0.5255172252655029,
-0.1324955523014068... |
def main ( ) : long _ seq = input _ long _ sequence ( ) short _ seq = input _ short _ sequence ( ) ans = matching ( long _ seq, short _ seq ) print ('the best match sequence is :'+ ans ) | [
-0.06900615990161896,
-0.25285375118255615,
0.7357825040817261,
0.7203129529953003,
-0.7907593250274658,
0.41835272312164307,
-0.25929251313209534,
0.44166576862335205,
-0.25436025857925415,
-0.14532746374607086,
-0.4002322554588318,
0.7570650577545166,
0.4930441081523895,
-0.1425329446792... |
def train _ val _ split ( df, validation _ split ) : text = df ['text']. values. tolist ( ) # input text as list targets = df ['class _ label _ cat']. values. tolist ( ) # targets # preparing the training / validation datasets seed = random. randint ( 1, 50 ) # random integer in a range ( 1, 50 ) rng = np. random. rand... | [
-1.358665943145752,
0.6167946457862854,
0.5058386325836182,
-0.08510609716176987,
-0.1575271189212799,
-0.09987609088420868,
-0.07866310328245163,
0.4892192482948303,
-0.2583472430706024,
0.12864841520786285,
0.36152321100234985,
-0.17662832140922546,
0.011948704719543457,
-0.5099910497665... |
def update _ settings ( ) : user _ id = session [ " uid " ] project _ id = request. form [ " pid " ] endpoint = request. form [ " endpoint " ] project _ config _ path = get _ project _ config _ path ( user _ id, project _ id ) project = project ( project _ config _ path ) project. update _ sparql _ endpoint ( endpoint ... | [
-0.7838692665100098,
-0.4067525267601013,
0.37490129470825195,
0.16495051980018616,
-0.04666756093502045,
0.16681641340255737,
-0.6503907442092896,
-0.303486168384552,
-0.4550494849681854,
1.2000303268432617,
-0.2775334417819977,
0.5153889060020447,
-1.0261002779006958,
-0.7564117908477783... |
def runfigures ( self, functions, names = none, * * kwargs ) : if names is none : names = [ none ] * len ( functions ) title = self. skymodel +'-'+ self. _ _ class _ _. _ _ name _ _ htmldoc = _ html. header ( title ) # htmldoc ='< head >'+ html. htmlindex. style +'\ n < title > % s < / title > \ n'% title htmldoc + ='<... | [
-0.9683589935302734,
0.3470573127269745,
1.037314534187317,
0.10964503139257431,
0.1944248080253601,
0.4279351234436035,
0.675925076007843,
-0.01356195192784071,
-0.36383211612701416,
-0.5564978718757629,
-0.9703661203384399,
-0.06341242045164108,
-0.047508373856544495,
1.0664944648742676,... |
def start1 ( ) : return render _ template ('start1. html') | [
0.49666133522987366,
-0.039710674434900284,
0.43978261947631836,
1.2483294010162354,
-0.09874607622623444,
0.5013293027877808,
0.7293121218681335,
1.2265762090682983,
-0.6808749437332153,
0.45091643929481506,
-0.008505748584866524,
0.16613580286502838,
-0.15773802995681763,
-0.156522214412... |
def delete _ all _ entries ( self ) : conn = self. conn sql ='delete from { entries } '. format ( entries = self. table _ name ) cur = conn. cursor ( ) cur. execute ( sql ) conn. commit ( ) | [
1.055463433265686,
-0.471701443195343,
0.5591004490852356,
0.8006201982498169,
1.2382540702819824,
-0.026205433532595634,
-0.4426579773426056,
0.8256851434707642,
-0.4356944262981415,
0.009977234527468681,
-0.040565136820077896,
-0.05298718065023422,
-0.03851022943854332,
1.055617570877075... |
def _ _ call _ _ ( self, * args, * * kwargs ) - > typing. union [ torch. tensor, typing. tuple [ torch. tensor,... ] ] : inputs = self. _ create _ inputs ( * args, * * kwargs ) response = self. client. infer ( model _ name = self. model _ name, inputs = inputs ) result = [ ] for output in self. metadata ['outputs'] : t... | [
-1.245012640953064,
0.27978071570396423,
0.7160097360610962,
0.8327763676643372,
1.1776134967803955,
-0.2516741454601288,
-0.34557753801345825,
-0.7681035399436951,
-1.0089073181152344,
-0.06179321929812431,
0.22660817205905914,
-0.06590161472558975,
-0.6767439246177673,
0.0287426542490720... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.