text
stringlengths
25
2.19k
embedding
listlengths
768
768
def learn ( self, mapping = none ) : mapping = [ ] if mapping is none else mapping for pattern _ template in mapping : if pattern _ template is none : continue patt, template = pattern _ template [ 0 ], pattern _ template [ 1 ] patt = expand _ globstar ( patt ) if isinstance ( patt, str ) : self. exact _ strs [ patt ] ...
[ -0.43580546975135803, -0.8134505152702332, 0.6393948793411255, -0.808351457118988, -0.5140730142593384, 0.46244287490844727, 0.727153480052948, 0.9768021702766418, 0.4682115912437439, -0.5131769180297852, -0.1494307965040207, 0.12313602864742279, 0.2823842465877533, 0.781067430973053, -0...
def _ _ init _ _ ( self, method, model _ task, model _ type = none, explanation _ id = none, * * kwargs ) : super ( baseexplanation, self ). _ _ init _ _ ( * * kwargs ) self. _ logger. debug ('initializing baseexplanation') self. _ method = method self. _ model _ task = model _ task self. _ model _ type = model _ type ...
[ 0.2818247079849243, 0.4182586967945099, 0.5964394211769104, 1.0096899271011353, 0.23559391498565674, -0.4021528959274292, 0.4331325888633728, 0.751261830329895, -0.13288673758506775, 0.42242395877838135, -0.540269136428833, 0.1285928338766098, 0.05726340413093567, 0.8238350749015808, 0.4...
def change _ sheet ( ) : if'uid'in session : response = { " tabledata " : dict ( ), " wikifierdata " : dict ( ), " yamldata " : dict ( ), " error " : none } project _ meta = dict ( ) user _ id = session ['uid'] new _ sheet _ name = request. form ['sheet _ name'] project _ id = request. form ['pid'] project _ config _ p...
[ -0.4752211272716522, -0.8503742814064026, 0.8852802515029907, 0.1989884376525879, -0.07011827081441879, 0.4450693130493164, -0.21222391724586487, 0.5006546378135681, -0.973469614982605, 0.2811588644981384, -0.23407234251499176, 0.987997829914093, 0.34215644001960754, 1.1122486591339111, ...
def get _ here _ start _ url ( app _ id, app _ code, search, latitude, longitude ) : url = " https : / / places. cit. api. here. com / places / v1 / browse? " if search : url + = " & q = { } ". format ( search ) if latitude and longitude : url + = " & at = { }, { } ". format ( latitude, longitude ) url + = " & app _ id...
[ -0.252239465713501, -1.0832152366638184, 0.6317684650421143, 0.02050570584833622, 0.6842045783996582, 0.7414869666099548, -0.5703522562980652, 0.3971234858036041, -0.15518881380558014, 0.8312082290649414, 0.2313690483570099, 0.8734292984008789, -0.7123667597770691, 0.20001435279846191, -...
async def test _ setup ( hass : homeassistant ) - > none : assert await async _ setup _ component ( hass, " telegram _ bot ", { " telegram _ bot " : { " platform " : " broadcast ", " api _ key " : " 1234567890 : abc ", " allowed _ chat _ ids " : [ 1 ], } }, ) await hass. async _ block _ till _ done ( ) assert hass. ser...
[ 0.1171184852719307, 0.8208134770393372, 0.4870038628578186, 0.19164982438087463, 1.1058142185211182, 0.20194277167320251, -0.01218456868082285, -0.10934650152921677, -0.2980691194534302, 0.2738749086856842, -0.3062399625778198, 0.21224522590637207, 0.33508867025375366, 0.5230028629302979, ...
def test _ collect _ from _ data _ source ( self ) : with pytest. raises ( notimplementederror ) : self. strategy. collect _ from _ data _ source ( )
[ 0.39900127053260803, 0.19545264542102814, 0.12968091666698456, -0.6329129338264465, 0.13584308326244354, 0.5745349526405334, 0.3264935612678528, -0.4431155025959015, 0.39002034068107605, 0.14259783923625946, -0.7913092970848083, 0.30882084369659424, 1.530114769935608, 0.9051542282104492, ...
def _ _ camera _ aa _ update _ ui ( self ) : if self. _ _ camera _ aa _ combo _ box. current _ index ( ) : self. _ _ camera _ aa _ slider. set _ enabled ( true ) else : self. _ _ camera _ aa _ slider. set _ enabled ( false ) self. _ _ camera _ aa _ slider. set _ value ( self. output. origin _ aa _ samples, self. output...
[ -0.41564255952835083, -1.614646077156067, 0.40498918294906616, -0.007506710477173328, -0.6043509244918823, -0.09750360250473022, 0.8471037745475769, 0.3414364159107208, 0.7448093295097351, 0.6633560657501221, 0.2879543900489807, 0.04677226021885872, -0.4108825623989105, 1.0807241201400757,...
def plot _ sjeos ( self, filename = none, show = none, title ='sjeos') : import matplotlib. pyplot as plt if self. v0 is none : self. fit ( ) if filename is none and show is none : show = true x = 3. 95 f = plt. figure ( figsize = ( x * 2. 5 * * 0. 5, x ) ) ax = f. add _ subplot ( 111 ) ax. plot ( self. v, self. e, mar...
[ 0.8878089785575867, -0.1529732048511505, 0.8674114942550659, -0.33619368076324463, -0.6945970058441162, 0.4361385703086853, 0.8352078795433044, 0.8495575189590454, 0.20989330112934113, 0.194503515958786, 0.1917407512664795, 0.37323564291000366, -0.05201341211795807, -0.15149106085300446, ...
def save ( self, domain _ override = none, subject _ template _ name ='registration / password _ reset _ subject. txt ', email _ template _ name ='registration / password _ reset _ email. html ', use _ https = false, token _ generator = default _ token _ generator, from _ email = none, request = none, html _ email _ te...
[ -1.09195077419281, 0.9065043330192566, 0.690483808517456, 0.3612155020236969, 0.11005929112434387, 0.017745187506079674, 0.38329362869262695, -0.3136381208896637, -0.6418052315711975, 0.4621278941631317, -0.7680607438087463, 1.2983819246292114, -0.1190105453133583, -0.07289823144674301, ...
def chroma _ matrix _ horizontal _ size ( self ) : # type : ( ) - > int return self. _ chroma _ matrix _ horizontal _ size
[ 0.8708268404006958, 0.11619076132774353, 0.33926713466644287, 0.8209273219108582, -0.24396474659442902, 1.3590894937515259, 1.148802638053894, 0.5000091195106506, -0.18300200998783112, -0.45900508761405945, -0.33384042978286743, 0.20846247673034668, -0.874649703502655, 0.1998780071735382, ...
def accepts ( * types, * * kwtypes ) : def decorator _ accepts ( func ) : @ wraps ( func ) def wrapped _ func ( * args, * * kwargs ) : log = [ ] bullet = u'( # ` д´ )'# get args and kwargs into a dict of kwargs kwargs. update ( zip ( func. _ _ code _ _. co _ varnames, args ) ) # get types and kwtypes into a dict of kwt...
[ -0.7573538422584534, 0.04137655720114708, 0.8549038171768188, -0.6979843974113464, -0.9243131279945374, 0.43267515301704407, -0.2905677855014801, -0.2946498692035675, -0.11329242587089539, 0.40827158093452454, 0.8832982778549194, 1.1539514064788818, -0.23851081728935242, 0.4933170974254608...
def _ _ call _ _ ( self, inputs, state, scope = none ) : # run the rnn as usual output, new _ state = self. _ cell ( inputs, state, scope ) # add the residual connection output = tf. add ( output, inputs ) return output, new _ state
[ -0.5312374830245972, -0.41458258032798767, 0.556891679763794, 0.001759398728609085, 0.29524141550064087, -0.45723795890808105, -0.3302365839481354, 0.05187661945819855, 0.008401244878768921, -0.15358303487300873, -0.11297395825386047, -0.3272310793399811, -0.27419155836105347, -1.072096824...
def get _ projections ( in _ array : np. ndarray, fun : callable = np. max ) - > iterable [ np. ndarray ] : projections = map ( lambda ax : fun ( in _ array, axis = ax ), range ( in _ array. ndim ) ) return projections
[ -0.09861893951892853, 0.23403871059417725, 0.5843016505241394, 1.5955305099487305, -0.15709680318832397, -0.6230810880661011, -0.5947199463844299, -0.07612393796443939, -0.2374240607023239, 0.9601385593414307, 0.8251163959503174, 0.7238548994064331, -0.030347269028425217, -0.38708415627479...
def pseudo _ voigt ( x, hwhm _ g, hwhm _ l ) : sigma = hwhm _ g / np. sqrt ( 2 * np. log ( 2 ) ) return np. real ( wofz ( ( x + 1j * hwhm _ l ) / sigma / np. sqrt ( 2 ) ) ) / sigma / np. sqrt ( 2 * np. pi )
[ 0.8961175084114075, 0.038134507834911346, 0.341121643781662, -0.04633154720067978, -0.9271875023841858, -0.06077104061841965, -0.506328284740448, 0.2550649642944336, -0.1084122508764267, 0.2475375086069107, -0.7527785897254944, 0.1973557323217392, -0.18969957530498505, 0.4558771252632141, ...
def _ get _ context _ info _ from _ url ( url _ string ) : if url _ string. endswith ( " / builddata " ) : return " - builddata " # other " helpful " patterns would show up here. return " "
[ 0.2378464788198471, -0.09368357807397842, 0.5176213979721069, -0.19448299705982208, 0.01547156274318695, 0.4334859251976013, 0.5667867660522461, 0.022912168875336647, -0.15209919214248657, -0.0983605608344078, 0.0330619290471077, 0.2960941195487976, 0.6652706265449524, -0.6472035646438599,...
def test _ insert _ quarterly _ numbers ( tas _ balances _ data ) : sub1 = submissionattributes. objects. get ( previous _ submission _ id _ _ isnull = true ) sub2 = submissionattributes. objects. get ( previous _ submission _ id _ _ isnull = false ) # we start with an empty quarterly table quarters = appropriationacco...
[ 0.2988587021827698, 0.048966847360134125, 0.82741379737854, -0.8111425638198853, 0.0479426309466362, 0.0625998005270958, 0.24816958606243134, -0.33337679505348206, 0.18137887120246887, -0.6521451473236084, -0.5667129755020142, -0.1539352387189865, -0.02477409690618515, 0.0836605355143547, ...
def diagonal _ cursor ( self, k ) : n = self. width - 1 - k return max ( n, 0 ), abs ( min ( n, 0 ) )
[ -1.142531394958496, -0.9520147442817688, 0.6794218420982361, 0.19692717492580414, -0.5916775465011597, -0.17794600129127502, 0.04634539783000946, 0.32221317291259766, 0.693352460861206, 0.6653692126274109, -0.4291402995586395, -0.5297735333442688, -0.32616400718688965, 0.7521737813949585, ...
def test _ queue _ enqueue _ while _ two _ node ( ) : # # 9 queue = queue ( ) queue. enqueue ( 1 ) queue. enqueue ( 2 ) queue. enqueue ( 3 ) assert queue. front. value = = 1 assert isinstance ( queue. front. next, node ) assert queue. rear. value = = 3 assert queue. rear. next = = none
[ 0.2604583203792572, -0.3622279763221741, 0.6366804838180542, -0.38198116421699524, 1.0570298433303833, 0.05589807778596878, -0.4210582971572876, -0.6354373693466187, -0.3007710576057434, -0.355450838804245, -0.7784300446510315, 0.8960500955581665, 0.31412142515182495, 0.3852609395980835, ...
def testsuite _ base0010 ( ) : # parse testsuite. conf configuration file config = configparser. configparser ( ) config. read ('/ etc / testsuite. conf') # create test suite suite = unittest. testsuite ( ) suite. addtest ( testblockstorage ('test _ storage _ device ','usb2 / 2 - 1 / 2 - 1 ','test usb otg : check for t...
[ 0.23327016830444336, -0.6633157730102539, 0.9989684820175171, 1.3661572933197021, 0.6898350715637207, 0.1665661782026291, 1.50751793384552, 0.29379236698150635, -0.3089904189109802, -0.19276566803455353, -0.28438735008239746, 0.3064824342727661, -0.6099869608879089, -0.09553506225347519, ...
def delete ( self, request, project ) : if request. get. get ('id') and ( request. access. has _ scope ('project : write') ) : with transaction. atomic ( ) : debug _ file = projectdebugfile. objects. filter ( id = request. get. get ('id'), project = project, ). select _ related ('file'). first ( ) if debug _ file is no...
[ -0.3101204037666321, 0.44100192189216614, 0.7479289770126343, 0.22733964025974274, 1.323115587234497, 0.2639952003955841, 0.4630817770957947, -0.3621094822883606, -0.6993522644042969, -0.0809985101222992, 0.43838757276535034, -0.013833004049956799, -0.7882492542266846, 0.7320481538772583, ...
def indexsize ( analyzer ) : return lt. size ( analyzer )
[ 0.35088562965393066, 0.23794177174568176, 0.09178361296653748, -0.22629214823246002, -0.2559738755226135, -0.5381385684013367, 1.2494701147079468, -0.8040437698364258, 0.19785386323928833, -1.0200400352478027, -0.11231658607721329, -0.29610443115234375, -0.0027585765346884727, -0.251784741...
def _ _ call _ _ ( self, preds : np. ndarray ) - > np. ndarray : clip _ min = 1e - 9 clip _ max = 1. 0 - clip _ min def sigmoid ( var _ z ) : return 1. 0 / ( 1. 0 + np. exp ( - var _ z ) ) preds _ clipped = np. clip ( preds, clip _ min, clip _ max ) if preds. shape [ 1 ] > 1 : perturbation _ r = self. beta * ( sigmoid ...
[ 0.010888136923313141, -0.8484563827514648, 0.9423476457595825, -0.416390597820282, -0.5356981158256531, 0.07873586565256119, 0.5192264318466187, 0.5082218050956726, 0.000777272623963654, 0.7595205307006836, 0.7722693681716919, 0.7189279198646545, -0.5197696685791016, 0.23030254244804382, ...
def _ verifystate ( self, state ) : try : verifier. verify ( self. _ config. states [ state ] ) except assertionerror as e : # if an assertionerror occurs, we intercept it and add the state name # to the error message so that we know where the test fails. raise assertionerror ( " in state'% s ', % s " % ( state, e ) )
[ 0.13564002513885498, 0.40172526240348816, 0.3162557780742645, -0.07188823819160461, 0.5617289543151855, 0.38018599152565, 0.06713048368692398, 0.13665392994880676, 0.5790830850601196, -0.19400501251220703, -0.46426868438720703, 0.2872653305530548, -0.4512937068939209, 1.2122920751571655, ...
def is _ bracket _ done ( self ) : return ~ self. is _ pending ( ) and ~ self. is _ waiting ( )
[ -1.1781904697418213, -0.2554801106452942, 0.5998565554618835, 0.2954952120780945, 0.32019805908203125, 0.47087857127189636, -0.31200483441352844, -0.4615526795387268, -0.49147674441337585, 0.19148433208465576, -0.498575896024704, 0.9291361570358276, -0.7674919366836548, 1.675984501838684, ...
def test _ write ( self ) : message = streamrequestmessage ( request _ id = " 0001 ", operation = " echo ", payload = " hello world " ) m _ bytes = write _ message ( message ) self. assertequal ( m _ bytes,'s0001004echo0000000bhello world')
[ -0.6488431692123413, 0.38301435112953186, 0.4682260751724243, 0.5394588112831116, 0.7543778419494629, 0.4569438695907593, -0.1614803820848465, -0.8919761776924133, -0.26800596714019775, -0.9746860861778259, 0.22108367085456848, 0.03897535055875778, -1.1147927045822144, 0.35677653551101685,...
async def get _ latest _ pastes ( self ) - > list [ paste ] : pastes = [ paste async for paste in self. iter _ lastest _ pastes ( ) ] pastes. sort ( key = operator. attrgetter ( " timestamp " ), reverse = true ) return pastes
[ -0.5410488247871399, 0.13095562160015106, 0.7089699506759644, 0.3354533016681671, 0.005032935179769993, 0.24331992864608765, -0.7708631157875061, -0.037749648094177246, 0.21028456091880798, 1.3107482194900513, 0.1646793931722641, 0.42955148220062256, 0.1349317729473114, 0.5126156210899353,...
def tree _ to _ json ( self, out _ json ) : tree _ names = [ ] # clf _ tree. feature is a list of indices, e. g. [ 0, 3, - 2, 1,... ] # each index of the list corresponds to a node in the tree # - 2 means the node is a leaf and hence does not have a feature # numbers other than - 2 are indices of self. feature _ names,...
[ -0.747204601764679, -0.692004919052124, 0.7640247941017151, -0.2638963460922241, 0.48316237330436707, -0.2662946879863739, -0.2262430191040039, 0.6767455339431763, -0.9427881240844727, 1.0298268795013428, -0.024731725454330444, 0.9280554056167603, 0.6788963079452515, 0.7069258093833923, ...
def is _ cyclic ( self ) : # track colors of nodes. black nodes are in neither set. # do not need to track black nodes because are complement of ( white, grey ) white = set ( self. adj _ list. keys ( ) ) grey = set ( ) while white : if self. is _ cyclic _ helper ( white. pop ( ), white, grey ) : return true return fals...
[ -0.6614049077033997, 0.8269357085227966, 0.6764669418334961, -0.05450579151511192, 0.22847455739974976, -0.19502195715904236, 0.5884397029876709, -0.7510933876037598, 0.13915719091892242, 0.8521619439125061, 0.37070757150650024, 1.0469311475753784, -0.5994126796722412, 0.6554979085922241, ...
def is _ intstr ( v ) : return re. match ( r'^ [ 0 - 9 ] + $ ', v ) is not none
[ -0.20325908064842224, -0.4920003414154053, 0.28931593894958496, -0.09134404361248016, -0.11413110047578812, 0.4629635810852051, -0.6274259686470032, 0.3020596504211426, 0.8506712913513184, 0.4004957377910614, -0.03271603584289551, -0.21381506323814392, -0.7859141826629639, -0.9115974307060...
def label2on ( self ) : # noqa : n802 return self. _ label2on and self. _ need _ upper ( )
[ -0.9946287870407104, -1.0704747438430786, 0.46888867020606995, 0.636533796787262, -0.015686262398958206, 1.0072104930877686, -0.4395768642425537, -0.25406670570373535, -0.052777573466300964, 0.6962870955467224, -0.32128652930259705, 0.3735232651233673, -0.5481218695640564, 0.12584960460662...
def make _ patch ( src, dst ) : return jsonpatch. from _ diff ( src, dst )
[ -0.34089431166648865, -0.4370545446872711, 0.5407028794288635, -1.2746338844299316, -2.028541088104248, 0.6292553544044495, -1.3121614456176758, 0.12748141586780548, -0.10696128010749817, -0.3114936649799347, -0.020595325157046318, 1.282500982284546, 0.8343530893325806, -1.7668699026107788...
def target _ containing _ phase ( self, source _ build _ phase _ ref : str ) - > optional [ pbxnativetarget ] : for native _ target in self. fetch _ type ( pbxnativetarget ). values ( ) : for build _ phase in native _ target. build _ phases : if build _ phase. object _ key = = source _ build _ phase _ ref : return nati...
[ -0.1796567738056183, -0.7140238285064697, 0.4749753475189209, 0.06798847019672394, -0.3259097635746002, 0.2467634677886963, -0.47825658321380615, -0.907518744468689, 0.2725414037704468, 0.08297499269247055, 0.4370882511138916, 0.6732679605484009, -0.6222224831581116, 0.18035036325454712, ...
def show _ landmarks _ batch ( sample _ batched ) : rgb _ batch, depth _ batch = sample _ batched ['rgb'], sample _ batched ['depth'] batch _ size = len ( rgb _ batch ) im _ size = rgb _ batch. size ( 2 ) rgb _ grid = utils. make _ grid ( rgb _ batch ) plt. figure ( ) plt. subplot ( 2, 1, 1 ) plt. imshow ( rgb _ grid. ...
[ 0.47543761134147644, 0.1156415268778801, 0.8168309926986694, -0.30292537808418274, -0.7481291890144348, 0.6731422543525696, 0.9685574769973755, 0.5343008637428284, -0.6667496562004089, -0.26859238743782043, -0.2915738523006439, 2.0320754051208496, 0.9776707291603088, 1.1539998054504395, ...
def solidity _ compiler ( ) : compiler = soliditycompiler ( test _ contract _ dir = str ( constants. test _ contracts _ dir ) ) yield compiler
[ 0.27832794189453125, -0.2601468861103058, 0.4977989196777344, -0.13528034090995789, -0.019832508638501167, -0.1851452738046646, 0.5671960711479187, 0.8211198449134827, 0.7358378767967224, -1.0579949617385864, -0.30374136567115784, -0.23272137343883514, -0.5123715400695801, 0.28897646069526...
def insert _ restaurent _ detail ( self ) : res _ list = self. get _ data _ from _ csv ( ) resdata. objects. bulk _ create ( res _ list, batch _ size = 100 )
[ -0.3116220533847809, 0.9659003615379333, 0.4798988997936249, -0.2114124298095703, 1.776057243347168, 0.426493376493454, -0.4540424346923828, 1.588362693786621, -0.30935564637184143, 0.42862939834594727, -1.469618797302246, -0.3521408140659332, -0.48801085352897644, -0.7895853519439697, -...
def get _ beat _ synced _ hpcps ( audio, fs, hop _ size = 256, frame _ size = 2048, zp _ factor = 1, window ='hann ', perform _ norm = true ) : # todo : params are given in sampels, take then in seconds and based on fs do a computation. # for now check if the audio is 44100 else exit # fs = 44100 # temp, should be read...
[ -0.08485434949398041, -0.24552422761917114, 0.9803180694580078, 1.099321722984314, 0.10876370221376419, -0.26642951369285583, -0.1335938274860382, 0.4792529046535492, 0.06533233076334, 0.23202739655971527, 0.09348659217357635, 0.15802305936813354, -0.07823951542377472, 0.7901083827018738, ...
def get _ successors ( state ) : # get the info of cars of the current state cars = state. board. cars size = state. board. size grid = state. board. grid successors = [ ] # check every car if it is movable and create successors for i in range ( len ( cars ) ) : if cars [ i ]. orientation = = " v " : x = cars [ i ]. fi...
[ -0.0039573549292981625, -0.039376839995384216, 1.052903413772583, 0.008502352982759476, -0.7043079137802124, -0.21541541814804077, -0.020188450813293457, 0.4427458941936493, 0.12190642952919006, -0.20616021752357483, -0.7333930730819702, -0.17520514130592346, 0.15223881602287292, 0.4160961...
def infinity _ norm ( self ) : n = len ( self. _ a _ original ) max _ = - 1. 0 for i in range ( n ) : s = np. sum ( np. abs ( self. _ a _ original [ i, : ] ) ) if s > max _ : max _ = s return max _
[ 0.4680495262145996, 0.1340956836938858, 0.6624202728271484, 1.0388926267623901, -0.01790262944996357, -0.1725553721189499, 0.12662243843078613, 0.8548988103866577, 0.10446890443563461, 0.24835363030433655, -0.018024997785687447, 0.34567055106163025, -0.23513832688331604, 0.5937110781669617...
def share _ terms ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " share _ terms " )
[ 1.2556328773498535, 0.0517420619726181, 0.6455771923065186, 0.24111299216747284, 0.9486568570137024, 0.7623910307884216, 0.6149547100067139, 0.19497811794281006, 0.3411974310874939, 0.3139449954032898, -0.45823541283607483, 0.8598248958587646, -0.14831236004829407, -1.0327348709106445, -...
def setstartindex ( self, * args ) : return _ itkimageserieswriterpython. itkimageserieswriteriul3iul2 _ setstartindex ( self, * args )
[ -0.8072102665901184, -0.5387583374977112, 0.5304779410362244, -0.0018261525547131896, -0.3758469521999359, 1.1478632688522339, 0.02404455840587616, 0.3939107656478882, 0.059878330677747726, -0.18602804839611053, -1.6371805667877197, 0.8837943077087402, -0.39839157462120056, -0.782414078712...
def show _ message ( self ) : self. master. show _ message _ popup ('hello! ','this is a message popup. you can also spawn warnings and errors.') # below is the syntax for warning and error popups. feel free to experiment with these # self. master. show _ warning _ popup ('warning! ','this is a warning popup. you can a...
[ 0.5593189001083374, 0.32802605628967285, 0.6893107295036316, 0.9677384495735168, 0.24303390085697174, -0.33777323365211487, 0.03116355650126934, 0.6894906759262085, -0.07073244452476501, -0.05779426544904709, 0.02946225367486477, 0.8481754064559937, -0.043397340923547745, 0.688290059566497...
def addtaskresourceargs ( parser ) : arg _ specs = [ presentation _ specs. resourcepresentationspec ('task ', gettaskresourcespec ( ), ('the batch task resource. if not specified,'' the current batch / location is used.'), required = true, ), ] concept _ parsers. conceptparser ( arg _ specs ). addtoparser ( parser )
[ 0.13045088946819305, -0.40769192576408386, 0.5654109716415405, -0.14373169839382172, 0.8802739381790161, 0.5836087465286255, 0.2747580409049988, 1.1744872331619263, -0.6648187041282654, 0.6925463676452637, -0.07740895450115204, -0.15086190402507782, 0.8082042932510376, 1.0867912769317627, ...
def _ build _ caption _ consistency _ net ( caption _ 1 _ rep, caption _ 2 _ rep, reuse = true, keep _ ph = none ) : net = slim. layers. fully _ connected ( tf. concat ( [ caption _ 1 _ rep, caption _ 2 _ rep ], - 1 ), config [ " hidden _ size " ], activation _ fn = tf. nn. relu ) net = slim. dropout ( net, keep _ prob...
[ -0.3035966455936432, -0.4077112674713135, 0.8016717433929443, 0.23275308310985565, 0.5448710322380066, 0.5729277729988098, 0.30568015575408936, 0.6192383766174316, 0.5114055871963501, 0.21542993187904358, -0.27339479327201843, 0.3791401982307434, 0.06423166394233704, -0.4673547148704529, ...
def rebuild ( self, features, list _ ids ) : assert ( len ( features ) = = len ( list _ ids ) ) assert ( len ( list _ ids ) = = len ( set ( list _ ids ) ) ) new _ index = hnswlib. index ( space ='cosine ', dim = self. dim ) new _ index. init _ index ( max _ elements = self. max _ elements ) log. debug ('rebuilding inde...
[ -1.0332329273223877, -0.5780884027481079, 0.13784953951835632, -0.007312773261219263, 0.2618463337421417, 0.2805367708206177, -0.24095699191093445, 0.8857222199440002, 0.1204390898346901, -0.13349108397960663, -0.6162747144699097, 0.4047071635723114, -0.4186757504940033, -0.546079993247985...
def stress _ pattern ( self ) - > sequence [ stress ] : return [ word. pf. stress _ pattern for word in self. words ]
[ -0.3409777581691742, 0.021576443687081337, 0.48707059025764465, 0.29018938541412354, 0.5725585222244263, 0.7551606893539429, 0.19159571826457977, -0.5040631294250488, 0.10585121810436249, 0.912132740020752, -1.1446623802185059, 0.11729303747415543, -1.0135613679885864, -0.18186835944652557...
def extract _ subclip ( filename, t1, t2, targetname = none ) : name, ext = os. path. splitext ( filename ) if not targetname : t1, t2 = [ int ( 1000 * t ) for t in [ t1, t2 ] ] targetname = name + " % ssub % d _ % d. % s " ( name, t1, t2, ext ) return [ " ffmpeg ", " - y ", " - i ", filename, " - ss ", " % 0. 2f " % t...
[ -0.6231419444084167, -0.42449134588241577, 0.9063840508460999, 0.671583890914917, -0.6274241209030151, -0.6471326947212219, -0.08968770503997803, 0.28529515862464905, -0.6631985306739807, 1.2088450193405151, -0.5359988808631897, 0.5949646830558777, 1.3382172584533691, -0.3996501564979553, ...
def plot _ double _ array ( x _ array, hat _ double _ array, true _ array, title, x _ label, par _ list, axis ='column ', true _ label ='true value ', y _ label ='value') : file _ name, caption = plot _ preparations ( title = title, par _ list = par _ list ) if axis = ='row': hat _ double _ array = hat _ double _ array...
[ 0.1878158450126648, 0.15797600150108337, 0.8214840888977051, 0.0491061806678772, 0.17852722108364105, 0.6796619296073914, 0.15429532527923584, 0.3286212682723999, 0.007617339491844177, 0.8239871263504028, -0.8419960141181946, 1.4138447046279907, 1.045691728591919, 0.5313353538513184, 0.9...
def test _ startserviceremovemultipleroutes ( self ) : self. component. domains. add ('component2') self. component. startservice ( ) self. component. stopservice ( ) self. assertnotin ('component ', self. router. routes ) self. assertnotin ('component2 ', self. router. routes )
[ -0.08003611117601395, -0.5240554809570312, 0.4090324342250824, 0.16645123064517975, 0.9619521498680115, 0.08904518187046051, -0.12482906132936478, 0.46060946583747864, 0.07488033920526505, -0.5916951298713684, -0.6337875127792358, -0.4710767865180969, -0.8547999858856201, 0.909889459609985...
def test _ christoffels _ vectorization ( self ) : points = self. beta. random _ point ( self. n _ samples ) christoffel = self. metric. christoffels ( points ) result = christoffel. shape expected = gs. array ( [ self. n _ samples, self. dim, self. dim, self. dim ] ) self. assertallclose ( result, expected )
[ 1.010367512702942, 0.6364214420318604, 0.13167817890644073, 0.16335268318653107, 1.3011283874511719, 0.6132780909538269, 0.9051502346992493, -0.38281184434890747, -0.6110926866531372, 0.03694276884198189, -0.026705479249358177, -0.6440238356590271, -0.6586340665817261, 0.5321430563926697, ...
def clearextension ( self, * args, * * kwargs ) : # real signature unknown pass
[ 0.17080581188201904, 0.005151707213371992, 0.545315682888031, 1.3654468059539795, -0.24834251403808594, 0.07124712318181992, -0.030078276991844177, -0.5537571907043457, 0.6226089596748352, 0.6940909624099731, -0.5959038734436035, 1.6252411603927612, -0.6154669523239136, -0.1869923174381256...
def cpt ( bn, evidence, vars ) : # if all ( str ( keys ) in evidence for keys in vars ) : # if all the vars in evidence, then prob = 1 # final _ cpt = [ 1 ] # else : bn _ new = copy. copy ( bn ) new _ sample = copy. copy ( evidence ) l _ vars = len ( vars ) ct = 0 for rv in vars : rv = str ( rv ) f = factor ( bn _ new,...
[ 0.6289722323417664, -0.5367123484611511, 0.7803561687469482, 0.4229366183280945, 0.4846746623516083, -0.07214538007974625, 0.1311836987733841, 1.1161408424377441, 0.0063948193565011024, 1.105050802230835, -0.07656276226043701, 0.04807450994849205, -0.8912843465805054, 0.7734097838401794, ...
def score ( self, x, z ) : return self. apply _ minibatches _ function ( super ( cnn, self ). score, x, z )
[ 0.8780072331428528, -0.627009391784668, 0.25350069999694824, 1.1229385137557983, -0.043831292539834976, -0.11086225509643555, -0.3564692735671997, -0.12775632739067078, 0.4799421429634094, 0.14925600588321686, -0.8693817257881165, -0.22340524196624756, -0.7307989001274109, -0.5808924436569...
def get _ user _ input ( player, token, grid ) : is _ valid = false while not is _ valid : try : input _ square = int ( input ( player + " ( " + token + " ) " + ', select from 1 - 9 the spot you would like to choose :') ) - 1 if not is _ valid _ number ( input _ square ) : print ( " that's not a valid number on the gam...
[ -0.2596568167209625, 0.0411665104329586, 0.5120067000389099, 0.19856062531471252, -0.19816336035728455, -0.16259749233722687, 0.5501531958580017, -0.8046020269393921, 0.034033749252557755, -0.4122465252876282, 0.3683251738548279, 0.3773561716079712, -0.6775942444801331, -0.8961854577064514...
def initialize _ rules ( ) : rules = { } for direction in [ " inbound ", " outbound " ] : for protocol in [ " tcp ", " udp " ] : rules [ ( direction, protocol ) ] = [ [ ] for _ in range ( 65536 ) ] return rules
[ -0.15142889320850372, 0.7000252604484558, 0.36830127239227295, -0.831191897392273, 0.2856729030609131, 0.5685782432556152, 0.03139481320977211, 0.16382916271686554, -0.4034774601459503, 0.302797794342041, -0.9959064722061157, 0.13189417123794556, -0.21151643991470337, 0.6083713173866272, ...
def load _ data ( self, path ='data / patches _ 48 / data. npz') : path = project + path imgs, gt _ imgs, labels = pc. load _ from _ file ( path ) self. x = imgs self. y = labels
[ -0.3240988254547119, -0.7657667994499207, 0.3411716818809509, -0.94757479429245, -0.4906064569950104, 1.5560636520385742, 0.2435452789068222, 0.38534119725227356, 0.038824502378702164, -0.6569710373878479, -0.14886485040187836, 0.4069434404373169, -0.42198097705841064, -0.4060458242893219,...
def generate _ feedback _ sequence ( self, input _ tensors, batch _ size, output _ dim, sequence _ length, num _ hidden, num _ layers, start _ vector _ arg, embedding _ matrix _ arg, visual _ input _ mode, return _ type = defs. return _ type. argmax _ index ) : with tf. name _ scope ( " lstm _ net " ) as namescope : # ...
[ -0.1795308142900467, -0.06664038449525833, 0.8125208020210266, 0.44396328926086426, -0.3426697254180908, 0.06539115309715271, 0.6349676251411438, -0.5449917912483215, -0.004107379354536533, 0.3690840005874634, -0.506883442401886, -0.16451801359653473, 0.7171044945716858, -0.181756794452667...
def transform _ tensor ( in _, trans ) : endx = len ( in _ ) inter _ trans = torchvision. transforms. compose ( [ torchvision. transforms. topilimage ( ), ] ) _ storage = [ inter _ trans ( in _ [ indx ] ) for indx in range ( endx ) ] _ out = [ trans ( _ storage [ indy ] ) for indy in range ( len ( _ storage ) ) ] retur...
[ -0.469046950340271, 0.7115331888198853, 0.35855329036712646, -0.1323283612728119, -0.24331487715244293, -0.7551013231277466, 0.026136737316846848, 0.6916292309761047, -0.89823317527771, 0.8644118309020996, -1.139380931854248, 0.005900548305362463, 0.16506554186344147, -1.4617689847946167, ...
def get _ properties ( self ) : self. _ check _ exists ( ) params = { } params [ " cmd " ] = " getprops " params [ " id " ] = self. id soup, resp = get _ soup ( self. wwt. wwt _ url, params ) handle _ response ( resp ) return soup. layer. attrs
[ -0.6828246116638184, -0.49566301703453064, 0.5413901209831238, -0.14775410294532776, 0.509606659412384, 0.16205769777297974, -0.46600833535194397, -0.9312504529953003, 0.16820649802684784, -0.44419151544570923, -0.12032142281532288, 0.32130423188209534, -0.8442271947860718, 0.4584227502346...
def start ( self ) : self. reset ( ) r = reply ( self. script ['greeting'] ) return r
[ 0.02469422109425068, 0.3173827528953552, 0.38909661769866943, -0.008718050085008144, 0.08049169182777405, -0.5119673013687134, 0.08122029900550842, -0.8831125497817993, 0.5522435903549194, 0.17953597009181976, -0.28866487741470337, 1.5510632991790771, -0.9336982369422913, -0.27618482708930...
def model _ to _ resource ( obj, resource = none, fields = none, depth = 0 ) : from restlib. resources import modelresource if resource is none or not ( isinstance ( resource, modelresource ) or issubclass ( resource, modelresource ) ) : resource, created = get _ resource _ for _ model ( obj. _ _ class _ _, fields = fi...
[ -0.13412149250507355, -0.233428955078125, 0.4693967401981354, -0.6565090417861938, -0.8673272728919983, -0.5624139308929443, 0.47031569480895996, -0.4162057936191559, 0.21160978078842163, -0.03569354489445686, -0.8877422213554382, -0.28914734721183777, 0.04459255561232567, 0.13395741581916...
def test _ 01 _ buildobjects ( self ) : # print ( prettyformatany. form ( self. m _ xml. irrigation _ sect,'a1 - 01 - a - irrigation') ) self. assertequal ( self. m _ pyhouse _ obj. house. irrigation, { } )
[ -0.6267343759536743, -0.7715407013893127, 0.35614827275276184, -0.32126328349113464, 0.2568768858909607, 0.5563492774963379, 0.34209808707237244, -0.5955463647842407, 0.7255053520202637, -1.468729019165039, 0.07717214524745941, -0.32632753252983093, -0.07138904184103012, -0.427059948444366...
def int _ positive ( string ) : try : integer = int ( string ) except valueerror : raise argparse. argumenttypeerror ('{ } cannot be converted into an integer. '. format ( string ) ) if integer < 0. : raise argparse. argumenttypeerror ('{ } is not positive. '. format ( integer ) ) else : return integer
[ -0.1342155486345291, -0.9183262586593628, 0.5977200269699097, -0.09921609610319138, -0.036889512091875076, 1.1871721744537354, -0.17831870913505554, -0.0642591342329979, -1.4854809045791626, 0.12852494418621063, 1.0576807260513306, 0.12474650144577026, -0.7625670433044434, -0.1667591482400...
def two _ to _ n _ power ( n ) : value = 2 for i in range ( n - 1 ) : value = value * value return value
[ -0.926594614982605, 0.08198007196187973, 0.3562421202659607, 0.9116096496582031, 0.2841498851776123, -1.0294818878173828, -0.39353716373443604, -0.6529209017753601, -1.548971176147461, -0.3547114133834839, -1.0226616859436035, -0.11048643290996552, 1.1045645475387573, 0.5070416331291199, ...
def plural ( word, quantifier, determinant ) : # if the word ends with's'it is not a special one if word. endswith ('s') : for n in resourcepool ( ). nouns _ end _ s : if n = = word : return 0 return 1 # if it is a pronoun in plural if word = ='we'or word = ='i'or word = ='you'or word = ='they': return 1 for k in resou...
[ -0.25061389803886414, -0.6601883769035339, 0.7385348081588745, -0.09669841825962067, -0.767344057559967, 0.08869320899248123, -0.9464530348777771, 0.19466044008731842, -0.14890249073505402, -0.554736852645874, 0.01808021031320095, 0.48297393321990967, -0.6784212589263916, 0.281878620386123...
def test _ batch ( self, batch ) : return sum ( ( 1 if np. argmax ( self. forward _ prop ( x ) ) = = np. argmax ( y ) else 0 for x, y in batch ) )
[ 0.08369191735982895, -0.4764280915260315, 0.4016304016113281, 0.6161033511161804, 0.7630236148834229, 0.5591787695884705, -0.01950581930577755, -0.0828118771314621, 0.2182343751192093, -0.35895246267318726, 0.34656524658203125, 0.2588483691215515, -0.5895373821258545, 0.1878080517053604, ...
def extract _ tty _ phone ( service _ center ) : tty _ phones = [ p for p in service _ center ['phone'] if'tty'in p ] if len ( tty _ phones ) > 0 : return tty _ phones [ 0 ]
[ -0.42768439650535583, -0.5228561758995056, 0.3005702495574951, -0.04953279346227646, 0.45510798692703247, -0.46053728461265564, -1.2612544298171997, -0.3075717091560364, 0.46682316064834595, 1.308587670326233, 0.4710266888141632, -1.2794066667556763, -0.2512435019016266, 0.572282612323761,...
def rebalance ( self ) : if not self. parami ('access _ phase ', 0 ) : return else : self. log. info ( " started rebalance thread " ) time. sleep ( self. parami ( " rebalance _ after ", 3600 ) ) server = " { 0 } : { 1 } ". format ( self. input. servers [ 0 ]. ip, self. input. servers [ 0 ]. port ) bucket = self. params...
[ 0.735246479511261, -0.4229285418987274, 0.7638896107673645, -0.10072673857212067, 1.5526632070541382, -0.07279999554157257, 0.700198769569397, -0.537809431552887, -0.15357983112335205, -0.20734502375125885, 0.6748411059379578, 0.8258585333824158, -0.7415975332260132, -0.11718320101499557, ...
def get _ target _ refs ( self ) : refs = [ ] relations = self. get _ relations ( ) for relation in relations : refs + = relation. get _ set _ refs ( ) return refs
[ -0.7980878949165344, -0.5640314817428589, 0.6333224773406982, 0.18373854458332062, 1.1715304851531982, 0.23902353644371033, -0.05043541267514229, -0.26024675369262695, -0.003530908143147826, 0.008157235570251942, 0.2996726334095001, 0.9232870936393738, -0.2678484320640564, 0.05797930434346...
def avgprecision ( self, resultsids, relevantids ) : psum = 0 for relid in relevantids : if relid not in resultsids : continue else : k = resultsids. index ( relid ) + 1 psum + = self. precisionatk ( resultsids, relevantids, k ) return psum / len ( relevantids )
[ -0.016591614112257957, -0.5288867950439453, 0.49705636501312256, -1.0186089277267456, -0.04609795659780502, -0.08726000785827637, 0.19657935202121735, -0.00021747224673163146, -0.08099500834941864, 1.1459461450576782, 0.7281662821769714, 0.7373660802841187, -0.6424146890640259, -0.22251264...
def distance ( p0, p1 ) : return int ( p0 [ 0 ] ) ^ int ( p1 [ 0 ] )
[ 0.2767118513584137, -0.5429143905639648, 0.45361560583114624, -0.15512807667255402, -0.4591140151023865, 0.9880021810531616, -0.7311469316482544, 0.7031811475753784, -0.17751553654670715, 0.9552602767944336, -0.4619413912296295, -0.3599715232849121, -0.4019295871257782, -0.3654629290103912...
def resolve _ path ( self, path, relative _ to ) : if path. startswith ('~') : path = os. path. expanduser ( path ) elif path. startswith ('/') : path = os. path. abspath ( path ) else : path = os. path. abspath ( os. path. join ( relative _ to, path ) ) return path
[ 0.2911321520805359, -0.25627201795578003, 0.9665493369102478, 0.46614164113998413, -0.26716479659080505, 0.7716931700706482, -0.12866878509521484, -0.27674224972724915, -0.7107146978378296, -0.595501720905304, 1.2250562906265259, -0.4454745948314667, 0.013463474810123444, -0.98107218742370...
def time _ year _ plus _ frac ( ds, time _ name ) : # this is straightforward if time has units ='days since 0000 - 01 - 01'and calendar ='noleap'# so convert specification of time to that representation # get time values as an np. ndarray of cftime objects if np. dtype ( ds [ time _ name ] ) = = np. dtype ('o') : tval...
[ -0.4383624494075775, 0.8549736142158508, 0.7100286483764648, -0.9303951263427734, -0.7720127105712891, -0.4237692356109619, -0.4350121319293976, -0.5708526968955994, 0.4233105182647705, 0.23991620540618896, 0.45494306087493896, -0.5120136141777039, 0.8961861729621887, 1.0388513803482056, ...
def test _ pixel _ origin _ sample _ from _ image ( img ) : tracks = track _ greedy ( _ kymo _ from _ array ( img, " r ", 0. 2 ), " red ", pixel _ threshold = 10 ) np. testing. assert _ equal ( tracks [ 0 ]. sample _ from _ image ( 0, correct _ origin = true ), [ 100, 100, 100 ] )
[ 0.6251422166824341, -0.2319580316543579, 0.4487350881099701, 0.37299758195877075, 0.03476974368095398, 0.7868670225143433, -0.37403079867362976, -0.009136003442108631, -0.2728710174560547, 0.13158726692199707, 0.18871061503887177, 0.19479826092720032, 1.0031471252441406, 0.1039468869566917...
def solmatrixsup ( m, b ) : n = len ( m ) m = len ( m [ 0 ] ) x = [ ] if m < n : n = m for i in range ( n - 1, - 1, - 1 ) : x. append ( ( b [ i ] - sum ( m [ i ] [ n - j - 1 ] * x [ j ] for j in range ( len ( x ) ) ) ) / m [ i ] [ i ] ) x. reverse ( ) return x
[ 0.23959238827228546, 0.4433463513851166, 0.9674404859542847, 0.6313547492027283, -0.21344198286533356, -0.15751482546329498, 0.24480067193508148, 0.6452251672744751, 0.16109664738178253, 0.9038124084472656, -0.07602039724588394, -0.17775824666023254, -0.6303786039352417, -0.683357059955596...
def position _ of _ blanks ( state ) : current _ position = 0 for n in state : if n = = " _ " : return current _ position else : current _ position + = 1
[ -1.2407242059707642, -0.18221038579940796, 0.4569145441055298, -0.8899722099304199, 0.18524576723575592, -0.6459811925888062, 0.6115189790725708, 0.006622202694416046, -0.003723900532349944, 0.5038785934448242, -1.1727042198181152, -0.08971851319074631, -0.24484555423259735, 0.098521195352...
def change _ edge _ map ( self, edge, end, vertexconjugator ) : # end should be 0 for origin or 1 for terminus if end : self [ self. origin ( edge ) ] [ self. terminus ( edge ) ] [ edge ] ['tmap'] = compose ( group. innerautomorphism ( self. terminus ( edge ). group, vertexconjugator ), self. gettmap ( edge ) ) else : ...
[ -1.343591570854187, -1.106547474861145, 0.6893502473831177, -0.23791484534740448, -0.47378095984458923, 0.15656618773937225, 0.16969561576843262, 1.5760037899017334, -0.18562455475330353, 0.7818807363510132, 0.4717489182949066, 0.0725727453827858, -0.00032401926000602543, -0.02567879296839...
def get _ system _ url ( base _ url, system _ id, redfish _ obj ) : # get serviceroot resource response _ base _ url = redfish _ obj. get ( base _ url, none ) if response _ base _ url. status! = 200 : raise exception ( " % s response code % s, % s " % ( base _ url, response _ base _ url. status, str ( response _ base _...
[ -0.6663908958435059, -0.2123698592185974, 0.9098515510559082, 0.05176277831196785, 0.5703655481338501, 0.25335973501205444, -0.5625954866409302, -0.2807096838951111, 0.2477564513683319, -0.1470794379711151, 0.28736966848373413, 0.40652817487716675, -1.0641038417816162, 1.3587751388549805, ...
def test _ change _ password ( self ) : response = self. app. post ('/ api / v1 / auth / login ', data = json. dumps ( self. data ), content _ type ='application / json') response1 = self. app. post ('/ api / v1 / auth / reset - password ', data = json. dumps ( self. data6 ), content _ type ='application / json') resul...
[ -0.5991339683532715, 0.192789688706398, 0.6357080936431885, 0.505980372428894, 0.9346075654029846, -0.05346235632896423, -0.2108829915523529, 0.06912744045257568, 0.08795078098773956, 0.33008047938346863, -1.0788984298706055, 1.4259908199310303, -0.17043988406658173, 0.014090722426772118, ...
def create _ package _ file ( package, package _ type, package _ id, args ) : # skip over types that weren't requested if package _ type not in args. outtypes : return text = format _ heading ( 1,'% s % s'% ( typedict [ package _ type ], package ) ) text + = format _ directive ( package _ type, package, args. project )...
[ -0.39335212111473083, 0.04154348000884056, 0.3237031400203705, 0.0336538702249527, 1.1127210855484009, 0.40838661789894104, -0.11013287305831909, 0.06803521513938904, -0.8529239892959595, 0.347261518239975, 0.7888357639312744, 0.1279192864894867, 0.1712212860584259, 0.20119793713092804, ...
def test _ cancel _ unpaid _ rebooking ( self ) : event = baker. make _ recipe ('booking. future _ pc') booking = baker. make _ recipe ('booking. booking ', event = event, user = self. user, paid = false, date _ rebooked = datetime ( 2018, 1, 1, tzinfo = dt _ timezone. utc ) ) self. assertequal ( booking. objects. all ...
[ 0.6692503690719604, 0.5125946402549744, 0.4566490650177002, 1.500144362449646, -0.425665020942688, 0.9231343865394592, 0.10541318356990814, 1.518933653831482, -0.19688944518566132, -0.25690290331840515, -0.5281295776367188, -0.620862603187561, -0.2523767054080963, 0.7949434518814087, 0.0...
def partial _ fit ( self, x, y = none, classes = none, sample _ weight = none ) : r, c = x. shape if self. i < 0 : self. x _ window = np. zeros ( ( self. window _ size, c ) ) self. y _ window = np. zeros ( self. window _ size ) self. i = 0 for j in range ( r ) : self. x _ window [ self. i ] = x [ j ] self. y _ window [...
[ -0.25319191813468933, -0.5860498547554016, 0.7472938299179077, 0.5282830595970154, -0.2703830897808075, -0.29594871401786804, 0.1898261159658432, -0.15496759116649628, -0.07848963886499405, -0.2923860549926758, -0.07321387529373169, 1.0475473403930664, -0.29817795753479004, 0.5013256669044...
def bootstrap ( config ) : upper _ alpha = re. compile ('[ a - z ]') registry. set ('np _ upper _ alpha _ regex ', upper _ alpha )
[ -0.5190316438674927, -0.26320552825927734, 0.47273626923561096, 0.2610800266265869, 1.2776806354522705, 0.7162486910820007, 1.268154501914978, 1.1212002038955688, 0.8256520628929138, 0.06177850812673569, -0.7135505676269531, 0.8724197745323181, 0.3475009799003601, 0.5427789092063904, 0.4...
def train _ svd ( self, vectorized _ corpus _ data ) : svd = truncatedsvd ( n _ components = self. train _ params [ " svd _ n _ components " ], algorithm = self. train _ params [ " svd _ algorithm " ], n _ iter = self. train _ params [ " svd _ n _ iter " ], random _ state = self. train _ params [ " svd _ random _ state...
[ 0.6874880194664001, 0.14453427493572235, 0.6967830061912537, -0.18177905678749084, -0.2233295887708664, 0.2952088713645935, -0.004532765131443739, 0.7340652942657471, -0.015217800624668598, 0.3904109001159668, -0.19665393233299255, 0.34867677092552185, -0.22305068373680115, -0.600967586040...
def cond _ exp _ tree _ plot ( self, model, data, s, nb, plot ) : if model is none : tree _ model = decisiontreeregressor ( ) tree _ model = self. fit _ model ( tree _ model ) else : tree _ model = model e _ monte _ carlo, e _ exact, e _ shap, e _ plugin, e _ plugin _ sal = [ ], [ ], [ ], [ ], [ ] for i in tqdm ( range...
[ 0.6322689652442932, 0.025716429576277733, 0.752016007900238, 0.024931367486715317, 0.02245176024734974, 0.24903994798660278, 0.21507678925991058, 0.8325412273406982, 0.06567784398794174, 0.5476503968238831, -0.12229538708925247, -0.008969411253929138, 0.3445608913898468, 1.0011273622512817...
def send _ and _ recv _ data ( self, app : screens, server _ socket ) : while app. running : data = pickle. dumps ( app. positions _ lst ) app. positions _ lst = [ ] server _ socket. send ( data ) # receive the screen data from the server friend _ screen = self. recv _ data _ in _ chunks ( server _ socket ) if friend _...
[ -0.37015023827552795, -0.24002523720264435, 0.5358412861824036, 0.07671377807855606, 0.778880774974823, 0.5530509352684021, -0.5009428262710571, -0.9173941016197205, 0.20210160315036774, 0.1392526626586914, -0.23202010989189148, -0.06101636961102486, 0.07829112559556961, 0.9654170274734497...
def azure _ cluster _ creator _ step3 ( request ) : if request. method = ='post': form _ past = createclusterstep2 ( request. post or none ) if form _ past. is _ valid ( ) : image _ id = form _ past. cleaned _ data ['image _ id'] vm _ size = form _ past. cleaned _ data ['vm _ size'] name = form _ past. cleaned _ data [...
[ -0.045237280428409576, 0.38439545035362244, 0.6981183886528015, 0.29233598709106445, 0.07475870847702026, 0.5358049273490906, 0.02483467012643814, -0.3505384922027588, -0.657616376876831, -0.2497258484363556, 0.5185291171073914, -0.17334423959255219, -0.4232431650161743, 0.4527376890182495...
def test _ directory _ clean _ require _ in _ with _ id ( modules, tmp _ path, state _ tree ) : name = tmp _ path / " a - directory " name. mkdir ( ) good _ file = name / " good - file " wrong _ file = name / " wrong - file " wrong _ file. write _ text ( " foo " ) sls _ contents = f " " " some _ dir : file. directory :...
[ -0.10040512681007385, -0.5272033214569092, 0.5205432772636414, -0.3096788823604584, 0.007834670133888721, 0.4904191195964813, -0.12712419033050537, 0.08362845331430435, 0.40779566764831543, 0.2036803662776947, -0.496099054813385, 0.30036988854408264, 0.2756219506263733, 0.8643116354942322,...
def _ _ init _ _ ( self, num _ layers, input _ dim, hidden _ dim, output _ dim ) : super ( mlp, self ). _ _ init _ _ ( ) self. linear _ or _ not = true # default is linear model self. num _ layers = num _ layers self. output _ dim = output _ dim if num _ layers < 1 : raise valueerror ( " number of layers should be posi...
[ 1.0614635944366455, -0.4264739751815796, 0.7473304867744446, 0.9927560687065125, -0.885769784450531, 0.32988739013671875, -0.5993066430091858, 0.524738609790802, -0.1298428475856781, 0.3590778708457947, -0.2802019715309143, -0.6377138495445251, -0.18011681735515594, -0.059604138135910034, ...
def validate _ status ( code : int ) : def decorator ( func ) : @ functools. wraps ( func ) def wrapper ( * args, * * kwargs ) : response = func ( * args, * * kwargs ) actual _ code = response. status _ code if actual _ code! = code : msg = f'function { func. _ _ name _ _! r } returned status code : { actual _ code }, ...
[ -0.06694293022155762, -0.9684910774230957, 0.6151490211486816, -0.3507736921310425, -0.31315863132476807, 0.10558187961578369, -0.17114394903182983, 0.2034156322479248, 1.036940574645996, -0.002935092430561781, 0.3591887950897217, -0.10984402894973755, 0.16458815336227417, 0.12921220064163...
def hasdefault ( self ) : return self. _ impl. hasdefault ( )
[ 0.5163496732711792, 0.7882596850395203, 0.3302886188030243, 0.9238636493682861, 2.031696319580078, -0.6009307503700256, 0.19591069221496582, 0.1967039555311203, -0.3172849714756012, -0.831366777420044, -1.1652387380599976, -0.44007548689842224, -0.9325191974639893, 1.0352383852005005, -1...
def exists ( self, path ) : pass
[ -0.8249952793121338, -0.9381885528564453, 0.30037009716033936, 0.16421076655387878, 1.3594568967819214, 1.3798468112945557, -0.4444356858730316, 0.5201022028923035, -0.5272786021232605, -0.47856342792510986, -0.3882152736186981, -0.4575616121292114, 0.19452936947345734, -0.1078423410654068...
def _ get _ newest _ modification _ timestamp ( self ) : query = self. query ( ) # also include repository root : query ['object _ provides'] + = ('opengever. repository. repositoryroot. irepositoryroot ', ) query ['sort _ on'] ='modified'query ['sort _ order'] ='reverse'query ['sort _ limit'] = 100 brains = gettoolbyn...
[ 0.07678203284740448, 0.10950332134962082, 0.6105151176452637, -0.7323673367500305, -0.11552108079195023, -0.5809510946273804, -0.4068780839443207, -1.43445885181427, 0.6630063056945801, 0.13737809658050537, 0.4236849248409271, 0.1881944090127945, -0.4896935522556305, 0.12185394018888474, ...
def partition _ mounted ( partition _ path ) : try : mounts = open ( " / proc / mounts ", " r " ) except ioerror as e : return none for line in mounts : # / proc / mounts line fmt : # device - mountpoint - mountopts if line. split ( ) [ 0 ] = = partition _ path : return line. split ( ) [ 1 ] return none
[ 1.5359336137771606, -1.1715139150619507, 0.713661253452301, 0.3061860203742981, -0.23095908761024475, -0.8580108284950256, -0.24986861646175385, -0.9665541648864746, -0.15699590742588043, -0.3794325590133667, 1.3170291185379028, 0.11889620125293732, -0.5983973741531372, -0.0888564884662628...
def index ( self, request, extra _ context = none ) : app _ list = self. get _ app _ list ( request ) models _ objects _ count = { } for k, v in self. _ registry. items ( ) : models _ objects _ count [ v. opts. object _ name ] = v. model. objects. count ( ) for app in app _ list : for model in app ['models'] : model ['...
[ -0.6181222796440125, 0.2935476005077362, 0.4568959176540375, 0.04257521778345108, 0.35783651471138, 0.24682971835136414, 0.8367785215377808, 0.34018582105636597, 0.534058690071106, 0.8595402240753174, -0.022480402141809464, 0.3257158100605011, 0.29421770572662354, 0.21907903254032135, -0...
def get _ security _ panel _ device _ id ( self, location ) : deviceid = false # for device in location ['devicelist'] ['deviceinfobasic'] : # if device ['devicename'] = ='security panel': # deviceid = device ['deviceid'] if deviceid is false : raise exception ('no security panel found') return deviceid
[ -0.30894407629966736, -0.5265021920204163, 0.5186589360237122, 0.35886427760124207, 0.004301460925489664, 0.9366810321807861, 0.7434162497520447, -0.3319982886314392, 0.3098951280117035, 0.2776028513908386, -0.2883143723011017, -0.3818468153476715, -1.0087292194366455, 0.5018150210380554, ...
def samplefree ( self, num ) : freesamp = [ ] ; freesampcount = 0 ; while ( freesampcount < num ) : irand _ 1 = randrange ( 0, self. mworld. mwidth ) ; irang _ 2 = randrange ( 0, self. mworld. mheight ) ; if not self. mobstmgr. isconfiginobstacle ( ( irand _ 1, irang _ 2 ) ) : freesamp + = [ ( irand _ 1, irang _ 2 ) ] ...
[ -0.5875347852706909, 0.08851637691259384, 0.4802689254283905, -0.2994556427001953, -1.061652660369873, 0.41293931007385254, 0.6945012807846069, -1.7224359512329102, 0.501189649105072, 0.07802809029817581, -0.13589903712272644, -0.00941721722483635, -0.8377591371536255, 0.6496052145957947, ...
def test _ prompt _ login _ parameter ( self, logout _ function ) : data = {'client _ id': self. client. client _ id,'response _ type': next ( self. client. response _ type _ values ( ) ),'redirect _ uri': self. client. default _ redirect _ uri,'scope':'openid email ','state': self. state,'prompt':'login'} response = s...
[ -1.013213038444519, -0.13198256492614746, 0.45852363109588623, -0.2531411051750183, 0.8649671077728271, -0.017050551250576973, 0.4618445932865143, -0.607494056224823, 1.0311236381530762, -0.4072840213775635, -0.47615376114845276, 0.5360539555549622, -0.10449104011058807, -0.600910305976867...
def to _ python ( self, value ) : cache = none if value is none : return none if isinstance ( value, datadescriptor ) : return value elif isinstance ( value, dict ) : # allow pre - hydrated data objects. cache = value try : value = cache [ " _ _ id " ] except keyerror : raise validationerror ( " dictionary must contain...
[ -0.4532700181007385, 0.15578699111938477, 0.4738803505897522, -0.9580134153366089, -0.3762664794921875, 0.06531885266304016, -0.5591391921043396, -0.19218434393405914, 0.2131512314081192, -0.6021783947944641, -0.2846812903881073, 0.721010684967041, 0.4700813591480255, 0.3100074827671051, ...
def hash _ block ( block ) : logger. info ( " computing hash of the block " ) hashable _ block = block. _ _ dict _ _. copy ( ) # create a copy as it would # otherwise change the prev dict while hashing # convert transaction objects within a block to dictionaries as well hashable _ block ['transactions'] = [ tx. to _ or...
[ -0.054216641932725906, -0.18685752153396606, 0.5253673195838928, 0.018642902374267578, -0.2466367930173874, -0.9171602129936218, 0.20852814614772797, -0.15139180421829224, 0.0027640466578304768, 0.1583031266927719, -0.5464569926261902, -0.029472816735506058, -0.20544834434986115, 0.1445784...
def set _ text ( ax, coordinate _ from, coordinate _ to, fontsize = 25, color ='black') : message = str ( coordinate _ from ) +'- >'+ str ( coordinate _ to ) ax. text ( coordinate _ from, coordinate _ to, message, ha ='center ', va ='center ', rotation = 315, fontsize = fontsize, color = color )
[ 0.4785943329334259, -0.39537420868873596, 0.5796252489089966, -0.9720495343208313, -0.40236762166023254, 0.29395952820777893, -0.3370843231678009, 0.19155701994895935, -0.7595162391662598, 0.661681056022644, 0.07183815538883209, 1.3827991485595703, 0.27116766571998596, -1.1666043996810913,...