text
stringlengths
25
2.19k
embedding
listlengths
768
768
def make _ tempdir ( ) : global _ tempdir if not _ tempdir : _ tempdir = tempfile. mkdtemp ( ) return _ tempdir
[ 0.059806082397699356, -0.011248370632529259, 0.4393397271633148, -0.6124429702758789, 0.014699626713991165, 0.1147983968257904, 0.9719316959381104, 0.5532885789871216, -0.3309875726699829, -1.232857346534729, -0.34561988711357117, -0.7886613607406616, -0.7237749099731445, 0.232099249958992...
def get _ home _ and _ away _ team _ overall _ player _ rating _ avg ( match, all _ players ) : match _ date = match ['date'] home _ player _ ids = np. array ( match [ ['home _ player _ 1 ','home _ player _ 2 ','home _ player _ 3 ','home _ player _ 4 ','home _ player _ 5 ','home _ player _ 6 ','home _ player _ 7 ','hom...
[ -0.6333487033843994, -0.13487808406352997, 1.1078009605407715, -0.35209277272224426, 0.04345683753490448, -0.02356821298599243, -0.0923018753528595, 0.47998303174972534, -0.9242546558380127, 1.6505712270736694, 0.4866785407066345, 0.0566871203482151, -0.47058576345443726, 0.021078851073980...
def test _ write _ json _ fail ( attempt _ json _ write : magicmock, sleep : magicmock ) : attempt _ json _ write. return _ value = ioerror ('fake') success, error = writer. write _ json _ file ('fake ', { }, retry _ count = 5 ) assert not success assert error is not none assert 5 = = attempt _ json _ write. call _ cou...
[ -1.3385965824127197, -0.09009730815887451, 0.4034329354763031, 0.2492680549621582, 0.781349241733551, 0.04095372185111046, 0.4829736649990082, -0.7734621167182922, -0.8767220377922058, 0.05576075240969658, -0.9231444001197815, -0.6867193579673767, -0.1773790866136551, 0.1509600281715393, ...
def decodermodel ( prevbeamstatestuple, prevbeamsymbols ) : samplecount, beamcount = prevbeamsymbols. shape vocablen = self. symbolstensor. shape [ 0 ] bigsamplecount = samplecount * beamcount ( prevgruoutput, prevgrustate ) = prevbeamstatestuple # nodeinfopropagatedexpandedtensor. shape [ 1 ] represents the beam dimen...
[ 0.27008023858070374, 0.015451702289283276, 0.7631976008415222, -0.569643497467041, -0.3059104382991791, -0.31096962094306946, 1.5638023614883423, -0.03466713801026344, -0.22918559610843658, -0.17422500252723694, 0.15312200784683228, 0.6496281027793884, 0.26260632276535034, -0.1674097031354...
def test _ is _ ending _ soon _ with _ project _ ending _ soon ( self ) : project = project ( end _ date = timezone. now ( ) + datetime. timedelta ( days = 3 ) ) self. assertequal ( project. is _ ending _ soon ( ), true, " the project is ending within the week, but that isn't soon enough apparently. " )
[ -0.16296584904193878, 0.8736327886581421, 0.26441532373428345, 0.06015487387776375, 0.07582987844944, 0.8130636811256409, -1.3143359422683716, 0.0934898853302002, -0.20327965915203094, -0.10026262700557709, -0.15842820703983307, -0.2185247540473938, -0.37586140632629395, 0.564857006072998,...
def is _ string ( obj ) : try : basestring except nameerror : basestring = str return isinstance ( obj, basestring )
[ -0.5144637823104858, -0.5429394841194153, 0.04480668157339096, 0.8518400192260742, -0.3020854890346527, 0.629301905632019, -0.0006446483894251287, -1.3817987442016602, 1.3379621505737305, 0.1381833553314209, -0.2987833023071289, 0.6690146923065186, -0.6452127695083618, -0.2560799717903137,...
def display _ tensor ( t, name ) : print ( f'{ name } shape : { t. shape } \ n') print ( f'{ t } \ n')
[ 0.46979013085365295, -1.2394158840179443, 0.4480961561203003, -1.4950389862060547, -0.6892796754837036, 0.6757814884185791, -0.0936662033200264, -0.2444760948419571, -1.0252331495285034, 1.2750402688980103, -0.6088761687278748, 1.3974277973175049, 1.1841278076171875, -0.7781358957290649, ...
def wrapper ( self, * args, * * kargs ) : is _ bi _ xperf = isinstance ( self, xperftests ) and'bi'in self. id ( ) total _ clients = self. parami ('total _ clients ', 1 ) if is _ bi _ xperf : total _ clients * = 2 else : # limit number of workers during load phase if self. parami ('load _ phase ', 0 ) : total _ clients...
[ 0.28444376587867737, 0.0933508574962616, 0.6206406950950623, -0.36018985509872437, 0.44071370363235474, -0.364166796207428, 0.9779117107391357, 0.005483783781528473, 0.74190354347229, -0.06021497771143913, 0.44483745098114014, 0.11106400191783905, -0.9545614123344421, 0.07490396499633789, ...
def set _ hook _ as _ ready ( cls ) : if cls. _ is _ exc _ hook _ ready : return cls. _ is _ exc _ hook _ ready = true while cls. _ exc _ queue. qsize ( ) > 0 : e = cls. _ exc _ queue. get ( ) cls. _ send _ exception _ to _ crash _ reporter ( e )
[ 0.16474172472953796, -0.6531305909156799, 0.7297202348709106, -0.039320625364780426, 1.1042134761810303, -0.055439457297325134, -0.22303742170333862, 0.5023295879364014, -0.14327019453048706, 0.1860799938440323, -0.06470036506652832, 0.18204958736896515, 0.06308344006538391, 0.872888624668...
def activate ( self, request, context ) : context. set _ code ( grpc. statuscode. unimplemented ) context. set _ details ('method not implemented!') raise notimplementederror ('method not implemented!')
[ -1.8567323684692383, -0.5248918533325195, 0.5995452404022217, 0.39700502157211304, 0.8193855881690979, 0.2300492525100708, 0.7155634164810181, 0.3068276345729828, 0.25849011540412903, 0.027371391654014587, -0.3815304934978485, 1.2072315216064453, -0.7588515877723694, -0.43161165714263916, ...
def testgettaginstancewithunknownobjectid ( self ) : objectid = uuid4 ( ) tagapi ( self. user ). create ( [ ( u'username / tag ', u'description') ] ) self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transact ) as session : deferred = self. facade. gettaginstance ( session, u'username / tag ', str ( o...
[ 0.06348979473114014, 0.11975307017564774, 0.4005487561225891, -0.2723044753074646, 0.6625041365623474, 0.31340187788009644, 0.13759617507457733, -0.4718409776687622, -0.1555837243795395, -0.46409860253334045, -0.8450039029121399, 0.008228335529565811, 0.6216916441917419, 0.4966644942760467...
def inserttofile ( location, inorout ) : time = datetime. datetime. now ( ). replace ( microsecond = 0 ) time. strftime ('% y - % m - % d % h : % m : % s') datafile = open ( " data. txt ", " a + " ) datafile. write ( " % s % s % s \ n " % ( str ( time ), str ( location ), str ( inorout ) ) ) datafile. close ( )
[ -0.4885222613811493, -0.6878674626350403, 0.7911146879196167, -0.9555389881134033, 0.314859002828598, 1.2176064252853394, -0.058455660939216614, 1.444271445274353, -1.045807123184204, 0.29364341497421265, -0.948719322681427, 0.2687830924987793, -0.6791974902153015, -0.9490258693695068, -...
def display ( self, hypers ) : pass
[ 0.5920102000236511, -0.8666532635688782, -0.026544487103819847, 1.1479322910308838, 0.6942898631095886, 0.9076221585273743, 0.7013033032417297, -0.21334099769592285, -0.0743798092007637, -0.5548892021179199, 0.8759163022041321, 0.3255455791950226, -0.23820646107196808, 0.18412379920482635,...
def update _ zips ( row ) : row = list ( row ) row [ 3 ] [ " zip " ] = row [ 2 ] = int ( row [ 1 ] ) return row
[ -1.7054897546768188, 0.08206973969936371, 0.49325141310691833, -0.6300110220909119, -0.3022964596748352, -0.6021057367324829, -0.07485340535640717, 0.2849094271659851, 1.37771475315094, 0.6051036715507507, -0.8210955858230591, -0.4410979449748993, 0.36483296751976013, -0.6883661150932312, ...
def parse _ rate ( self, rate ) : num, multiplier, period = rate _ re. match ( rate ). groups ( ) num = int ( num ) multiplier = int ( multiplier or 1 ) period = {'s': 1,'m': 60,'h': 3600,'d': 86400 } [ period ] return ( num, ( multiplier * period ) )
[ -0.6815721988677979, -0.06299984455108643, 0.6405272483825684, -0.2629620134830475, -0.645491361618042, -0.4507908821105957, -0.33212798833847046, -0.0012173234717920423, 0.21979664266109467, 0.24980242550373077, -0.5960195660591125, -0.4688888192176819, -0.2607651650905609, -0.16628861427...
def create _ dummy _ computation _ tensorflow _ random ( ) : with tf. graph ( ). as _ default ( ) as graph : result = tf. random. normal ( [ ] ) result _ type, result _ binding = tensorflow _ utils. capture _ result _ from _ graph ( result, graph ) type _ signature = computation _ types. functiontype ( none, result _ t...
[ -0.40393194556236267, -0.09227379411458969, 0.6425611972808838, 0.09468637406826019, 0.4649510979652405, -0.16078051924705505, 0.8546305298805237, -0.37034380435943604, 0.0392770953476429, -0.02179918810725212, -1.0239800214767456, 0.35099178552627563, -0.4736418128013611, 0.15795563161373...
def require _ attribute ( self, attribute : str, typ : type = _ any ) - > none : self. require _ mapping ( ) attr _ nodes = [ value _ node for key _ node, value _ node in self. yaml _ node. value if key _ node. value = = attribute ] if len ( attr _ nodes ) = = 0 : raise recognitionerror ( ('{ } { } missing required att...
[ -0.5560919046401978, -0.8161954283714294, 0.5489098429679871, -0.2206333428621292, -0.09948241710662842, 0.13177341222763062, 0.20078980922698975, 0.34449028968811035, -0.42293429374694824, 0.12446564435958862, 0.3021160662174225, 0.7972710728645325, 0.6193205118179321, 1.1332594156265259,...
def per _ class _ rank ( self ) : return self. _ per _ class _ rank. tolist ( )
[ -1.4280418157577515, -0.18649017810821533, 0.43719443678855896, 0.44588926434516907, 0.9948031902313232, 0.606377363204956, 0.1838081032037735, 0.29329028725624084, 0.5134875774383545, 0.27234765887260437, -0.6208881735801697, 0.3787810802459717, 0.21495120227336884, 0.6253308653831482, ...
def get _ settings ( config _ file ) : stream = open ( config _ file,'r') settings = yaml. load ( stream, loader = yaml. loader ) return settings
[ 0.13462814688682556, -0.37767621874809265, 0.20587970316410065, 0.01987314410507679, -0.07514378428459167, -0.25344738364219666, 0.6752071380615234, 0.35519295930862427, -1.0247488021850586, 1.163690209388733, -0.8979862332344055, -0.2930329740047455, -0.21224598586559296, 0.36292022466659...
def on _ stop ( self ) : raise notimplementederror
[ -0.5931392908096313, -1.1180955171585083, 0.4348616898059845, 0.13342444598674774, 0.042547520250082016, 0.711796224117279, 0.01767157018184662, -0.20297741889953613, -0.618306577205658, 0.8260385990142822, -0.7125997543334961, -0.05411534383893013, 0.6803402900695801, 0.04968038946390152,...
async def connected _ callback ( self ) : for ch in self. _ channels : if ch = = " kline " : for symbol in self. _ symbols : channel = self. _ symbol _ to _ channel ( symbol, " kline " ) if not channel : continue kline = { " sub " : channel } await self. _ ws. send ( kline ) elif ch = = " orderbook " : for symbol in se...
[ -0.24191634356975555, -0.4379365146160126, 0.854155421257019, -0.39931124448776245, 0.49532219767570496, 0.1828954815864563, -0.4653783440589905, -1.1221818923950195, -0.29193925857543945, 0.5640242099761963, -0.2818070948123932, 0.5934047102928162, 0.2781416177749634, 0.4123338460922241, ...
def isreadingnews ( self ) : result = false if base. cr and base. cr. playgame and base. cr. playgame. getplace ( ) and hasattr ( base. cr. playgame. getplace ( ),'fsm') and base. cr. playgame. getplace ( ). fsm : fsm = base. cr. playgame. getplace ( ). fsm curstate = fsm. getcurrentstate ( ). getname ( ) if curstate =...
[ 0.027607610449194908, -0.32416680455207825, 0.5510120391845703, 0.5338083505630493, -0.857118546962738, 0.4809216260910034, -0.4709937870502472, -0.3629852831363678, -0.36918187141418457, -0.4217988848686218, 0.7673811316490173, -0.492482990026474, -1.36740243434906, 1.0775086879730225, ...
def fixed _ set _ evaluation ( category, mode, i _ episode, update ) : test _ keys _ path ='/ data3 / floraxue / cs294 / active - rl - data / pool / { } _ fixed _ keys. p '. format ( category ) method ='resnet'model _ file _ dir = join ( classifier _ root,'snapshots') test _ prefix ='{ } _ { } _ episode _ { : 04d } _ u...
[ -0.6305322051048279, -0.49812448024749756, 0.36413154006004333, -1.1205949783325195, -0.39738988876342773, -0.03485124185681343, 0.2869188189506531, -0.5945730805397034, -0.7100183367729187, 0.5092225670814514, 0.15708930790424347, 0.2724332809448242, -0.4633350372314453, -0.74035102128982...
def test _ project _ displays _ on _ project _ view ( self ) : project = create _ project _ and _ milestones ( " title ", 0 ) response = self. client. get ( reverse ('projects : project ', args = ( 1, ) ) ) self. assertnotequal ( response. status _ code, 404 ) self. assertcontains ( response, " title " ) self. asserteq...
[ 0.2815450429916382, 0.6181021928787231, 0.2583567500114441, -0.0254108514636755, 0.37454941868782043, 1.5679394006729126, 0.5058386921882629, 0.2538977563381195, 0.7197370529174805, -0.11934003978967667, 0.5724251866340637, 0.0879543349146843, -0.5772058367729187, -0.06974740326404572, -...
def reverse ( self ) : self. head = self. _ reverse ( self. head )
[ -0.7890445590019226, 0.831754207611084, 0.19432508945465088, -0.06645634025335312, 0.7493866682052612, -0.6376051902770996, 0.3852819800376892, 0.8475261330604553, -1.2621952295303345, -0.406907320022583, -0.887352705001831, 1.124554991722107, -0.7135311961174011, -0.2831445634365082, -0...
def truexor ( * args ) : return sum ( args ) = = 1
[ -0.30731576681137085, 1.1017802953720093, 0.48204663395881653, 1.1445585489273071, -0.020393000915646553, -0.12475503236055374, -0.764838457107544, 0.36988022923469543, -0.09744875878095627, 0.13536925613880157, -0.78531414270401, -0.7014840841293335, -1.1327569484710693, -0.48578202724456...
def _ _ init _ _ ( self, * args ) : # cannot find clr method pass
[ 0.4908009469509125, -0.46086224913597107, 0.5477728843688965, 0.7290319800376892, 0.9104951620101929, 0.35369330644607544, 0.3179588317871094, -0.7867974638938904, -0.38998934626579285, -0.2102825790643692, 0.5656036138534546, -0.3573014438152313, -0.30203676223754883, 1.3760462999343872, ...
def get _ gemeente _ by _ id ( self, id ) : def creator ( ) : url = self. base _ url + " / municipality / % s " % id h = self. base _ headers p = { " geometry " : " full ", " srs " : " 31370 " } res = capakey _ rest _ gateway _ request ( url, h, p ). json ( ) return gemeente ( res [ " municipalitycode " ], res [ " muni...
[ 0.0017055231146514416, 0.08592917025089264, 0.44361692667007446, -0.10717543214559555, -0.5156043767929077, -0.27597877383232117, -0.9798720479011536, -1.0597935914993286, 0.1653488725423813, 0.025777915492653847, -0.3296363353729248, 0.21011832356452942, -0.8010826110839844, 0.54139423370...
def type ( self ) : return self. category
[ -0.45884770154953003, 0.1686982661485672, 0.07997369021177292, 0.04522203281521797, 0.4627654552459717, 0.5122243762016296, 0.695315957069397, -0.7156633138656616, 0.6554344892501831, -1.0411262512207031, 0.8370625376701355, 1.0677577257156372, -0.0381896086037159, 0.5131052732467651, -0...
def test _ gf _ write _ feature _ header _ without _ tags _ without _ description _ without _ background ( disabled _ colors, capsys, mocker ) : # given feature = mocker. magicmock ( spec = feature ) feature. keyword = " feature " feature. short _ description = " my feature " feature. description = [ ] feature. tags = ...
[ 0.5651707649230957, -0.26186850666999817, 0.2900884747505188, 0.44045498967170715, 0.6188241839408875, 0.39862367510795593, -0.21209277212619781, -0.1556345820426941, -0.49282994866371155, -0.7577768564224243, -0.36551719903945923, 0.37959054112434387, -0.4313754737377167, 0.45136296749114...
def getaccountdays ( self ) : days = 0 defaultdays = base. cr. config. getint ('account - days ', - 1 ) if defaultdays > = 0 : days = defaultdays elif hasattr ( base. cr,'accountdays') : days = base. cr. accountdays return days
[ -0.40040549635887146, 1.1352592706680298, 0.4267862141132355, 0.5622493028640747, 0.6523049473762512, -0.1474912166595459, 0.6400982737541199, -0.44185301661491394, 0.472309410572052, -0.900180459022522, 0.6323606371879578, 0.35301926732063293, 0.11020049452781677, 0.8923075199127197, 0....
def serialize ( self ) : return {'name': self. name,'id': self. id }
[ -0.7426835894584656, -1.8705096244812012, 0.48870646953582764, -1.3436163663864136, -1.3778489828109741, 0.1241430938243866, -1.001487135887146, -0.3275962769985199, 0.22809511423110962, -0.22265541553497314, -2.049682855606079, 0.06952190399169922, -0.5897684693336487, 0.01212822925299406...
def quadratic _ program _ bnd ( self, c, q, lb, ub ) : if self. solver = = solver _ scipy : return _ scipy _ quadratic _ program _ bnd ( c, q, lb, ub ) elif self. solver = = solver _ gurobi : return _ gurobi _ quadratic _ program _ bnd ( c, q, lb, ub ) else : raise valueerror ('qp solver { } not available '. format ( s...
[ 0.7309489846229553, -0.7263863682746887, 0.5199797749519348, 0.4826498031616211, 0.29843297600746155, 1.5489245653152466, -0.7350174188613892, -1.5464273691177368, 0.0997280701994896, -0.3006982207298279, 0.40712010860443115, 0.7599939703941345, -1.1628868579864502, -0.2731240391731262, ...
def _ _ init _ _ ( self, figarray, name ) : if len ( figarray ) = = 2 : self. setfigure ( figarray [ 0 ] ) self. setfigurecanvas ( figarray [ 1 ] ) else : raise valueerror ( " stage init : invalid figarray " ) self. ax = none self. zerolist = [ ] self. polelist = [ ] self. assignedpolepair = none self. assignedzeropair...
[ -0.1841367930173874, -0.5692122578620911, 0.6094270348548889, 0.7946958541870117, -0.44819921255111694, 0.01192952785640955, 1.2005615234375, 0.0754711925983429, 0.05003741756081581, 0.01675424911081791, -0.540614664554596, -0.7272800207138062, -0.11586307734251022, 0.9188879132270813, 1...
def possible _ float ( arg ) : try : return float ( arg ) except valueerror : logging. info ( f'failed to parse { arg } as a float, treating it as a string') return arg
[ 0.938090980052948, 0.14200249314308167, 0.3992265462875366, -0.5053969621658325, -0.07595697790384293, 0.0055448864586651325, -0.35841068625450134, 0.641594409942627, -0.28779929876327515, -1.0141714811325073, 0.6412116885185242, -0.21726015210151672, -0.24986714124679565, 0.48550459742546...
def reset _ window ( self, size = none, title = none ) : if size is not none : self. resize ( size [ 0 ], size [ 1 ] ) if title is not none : self. setwindowtitle ( title )
[ -0.20833122730255127, -0.044900842010974884, 0.4517021179199219, 0.9709624648094177, 0.0885484591126442, -0.6180353164672852, -0.39316248893737793, -0.1776740998029709, 0.00043885663035325706, -0.15388888120651245, -0.5124779343605042, 1.5308282375335693, -0.8636809587478638, 0.07621572911...
def dice _ loss ( y _ true, y _ softmax _ conv ) : y _ true = tf. to _ float ( tf. reshape ( y _ true [..., 0 ], [ - 1 ] ) ) y _ conv = tf. to _ float ( tf. reshape ( y _ softmax _ conv [..., 1 ], [ - 1 ] ) ) intersection = tf. reduce _ sum ( y _ conv * y _ true ) union = tf. reduce _ sum ( y _ conv * y _ conv ) + tf. ...
[ -0.446574866771698, -0.36423370242118835, 0.7093344330787659, 0.8953750729560852, -0.23705503344535828, -0.25988221168518066, 0.5390526652336121, 0.9628208875656128, 0.2537170350551605, 0.756371796131134, -0.08098120987415314, 0.5568455457687378, 0.3705664277076721, 0.14329893887043, 0.0...
def state ( self ) : return self. _ state
[ -0.39295682311058044, -1.033605933189392, 0.10982108116149902, -0.3203376829624176, -0.2899828851222992, 0.7542568445205688, 0.9990419149398804, -0.2657981514930725, 0.679476261138916, -1.2502281665802002, -0.20985104143619537, 0.13979750871658325, -0.24261392652988434, -0.4114583730697632...
def query ( self, query _ text : str ) - > generator [ accommodation, none, none ] : with self. conn : self. curs. execute ( query _ text ) yield from map ( self. to _ accommodation, self. curs. fetchall ( ) )
[ -1.1439934968948364, -0.2502249777317047, 0.36135751008987427, -0.04092780128121376, -0.9264345169067383, -0.08124257624149323, -0.8242973685264587, 0.7481610774993896, -0.4208328425884247, 0.4767983555793762, 0.5739695429801941, -0.46642646193504333, -0.3451422452926636, -0.62579983472824...
def send _ keys ( self, locator, text, timeout = 20 ) : time. sleep ( 0. 5 ) element = webdriverwait ( self. driver, timeout ). until ( ec. presence _ of _ element _ located ( locator ) ) element. clear ( ) element. send _ keys ( text )
[ -0.4815775156021118, -0.3097103536128998, 0.3455679416656494, 0.03984219953417778, -0.21084658801555634, 0.038917090743780136, -0.29128819704055786, 0.060163211077451706, 0.18695753812789917, 1.9164286851882935, -0.9048493504524231, 0.18860915303230286, -0.3831692934036255, -0.159222856163...
def get _ project _ files ( ) : response = { " tabledata " : none, " yamldata " : none, " wikifierdata " : none, " settings " : { " endpoint " : none } } if'uid'in session : user _ id = session [ " uid " ] project _ id = request. form ['pid'] project _ config _ path = get _ project _ config _ path ( user _ id, project ...
[ -0.3707256317138672, -0.12883445620536804, 0.641053318977356, -0.05955587327480316, 0.035931117832660675, 0.18486861884593964, -0.29682376980781555, 0.47879037261009216, -1.4564299583435059, 0.33419886231422424, -0.4415372908115387, 0.3388079106807709, -0.06955168396234512, 0.4964961409568...
def _ _ add _ _ ( self, * args ) : # cannot find clr method pass
[ 0.18706069886684418, -0.5077176690101624, 0.7231117486953735, 0.34218963980674744, 0.9035381078720093, 0.5447417497634888, 0.17205320298671722, -1.4567270278930664, 0.01914672553539276, -0.17058685421943665, 0.6447610259056091, -0.02728675678372383, -0.23335587978363037, 1.2248644828796387...
def update _ place ( place _ id ) : user _ input = request. get _ json ( ) if user _ input is none : abort ( 400, {'message':'not a json'} ) obj = storage. get ( place, place _ id ) if obj is none : abort ( 404 ) for k, v in user _ input. items ( ) : if k not in ['id ','user _ id ','city _ id ','created _ at ','updated...
[ -1.3179479837417603, -1.036096453666687, 0.7771260142326355, 0.2512902319431305, -0.5239149332046509, 0.03161159157752991, -0.08460412174463272, -0.2581470310688019, 0.37069863080978394, 0.3620310425758362, -0.251188725233078, -0.11184529215097427, -0.5562073588371277, 0.5842249989509583, ...
def get _ address _ to _ workspace ( self ) - > str : addr = " " try : resp = self. api _ client. list _ namespaced _ service ( self. namespace, pretty = true ) addr = self. _ get _ address _ from _ service ( resp ) print ( f " this is the address to { self. name }'s workspace : { addr } " ) except apiexception as e : ...
[ -1.015736699104309, -0.27395564317703247, 0.7585055232048035, -0.1792457550764084, 0.13177530467510223, 0.23397782444953918, 0.348131388425827, -1.1295815706253052, 0.8983902335166931, 0.07971129566431046, 0.3230731189250946, 1.7550541162490845, -1.0098627805709839, -0.04358876869082451, ...
def enable ( self, name, auto _ value = none, * * parameters ) : if auto _ value is not none : parameters ['value'] = auto _ value if name = ='directional _ light': lights = parameters. get ('value ', default _ directional _ lights ) lights = np. atleast _ 2d ( lights ). astype ( np. float32 ) for prim in self. _ primi...
[ -0.6248539090156555, -0.08305952697992325, 0.7359270453453064, 0.41425469517707825, 0.052214860916137695, -0.6187134385108948, 0.41103509068489075, -0.059499338269233704, 0.26235637068748474, -0.13585110008716583, -1.0546748638153076, 0.2487938106060028, 0.010201088152825832, 0.67626065015...
def processing _ dictonary _ results ( self ) : return self. _ _ data _ dic
[ -0.7276261448860168, 0.08573532104492188, 0.3240783214569092, -1.9849461317062378, -0.5611603856086731, 0.5415627360343933, -0.306702196598053, -0.12282553315162659, -0.8850154876708984, -1.2936272621154785, -0.3025127649307251, 0.029693668708205223, 0.40340206027030945, 0.5827512145042419...
def test _ bad _ request ( self, test _ client ) : response = test _ client. post ( " / highscores " ) assert response. status _ code = = 405 assert response. status = = " 405 method not allowed "
[ 0.008174080401659012, 0.489724338054657, 0.6605459451675415, 0.7424467206001282, 1.2513717412948608, 1.2663841247558594, 0.29564008116722107, -0.8388426899909973, -0.7317063808441162, -0.47291678190231323, -0.43999794125556946, 0.4174238443374634, -0.08544399589300156, 0.2409457415342331, ...
def test _ empty _ geopackage _ overlap ( self ) : extract _ archive ( src = " tests / data / buil _ ab11 - wv02 - 20100926 - 1. zip " ) extract _ archive ( src = " tests / data / massachusetts _ buildings _ kaggle. zip " ) raster _ file = " tests / data / massachusetts _ buildings _ kaggle / 22978945 _ 15 _ uint8 _ cl...
[ -0.2966514527797699, -0.25290828943252563, 0.7371703386306763, 0.10170061141252518, 0.35093921422958374, 1.9456219673156738, 0.4867466986179352, -0.3663009703159332, 0.2504689395427704, 0.3665614724159241, 0.2554229199886322, -0.17961476743221283, 0.0069177825935184956, -0.4818877577781677...
def _ gen _ next ( self ) : old _ seed = self. _ seed self. _ seed = self. _ xor _ shift ( old _ seed ) self. _ seed ^ = self. _ lcg ( old _ seed ) self. _ seed - = self. _ mwc ( old _ seed ) # only keep the last 32 bits to prevent number becoming to large. self. _ seed & = self. _ uint32 _ max return abs ( self. _ see...
[ -0.19920207560062408, 0.8023819327354431, 0.7140614986419678, -0.7442904710769653, -1.330187439918518, 0.32828423380851746, 0.26205092668533325, 0.06538987904787064, -0.36464619636535645, -0.5264483690261841, 0.3113972246646881, 0.2813616991043091, -0.3182186186313629, -0.04572128877043724...
def make _ initial _ state ( number _ of _ players ) : player _ positions = str ( ) # string of current positions of players for x in range ( int ( number _ of _ players ) ) : player _ positions + ='t'player _ positions + ='a'player _ positions + ='_ _'return player _ positions
[ -1.073638916015625, -0.8054404258728027, 0.5849472880363464, -1.5934548377990723, -0.11109882593154907, 0.044210050255060196, 0.3567778170108795, -0.03944816067814827, -0.10540393739938736, 1.138492226600647, -0.18689145147800446, -0.8211008310317993, 0.4505254626274109, -0.892476737499237...
def setmenu ( self, menu ) : self. _ main. send ( " setmenu " ) pass
[ -0.9168798327445984, 0.3837091624736786, 0.39460161328315735, 1.7111082077026367, 0.8435975909233093, 0.14873497188091278, 0.09286802262067795, 0.47944697737693787, 0.38687142729759216, -1.0254102945327759, -0.40627655386924744, 0.8570626378059387, -1.116292119026184, 0.9905471801757812, ...
def on _ batch _ end ( self, net, batch = none, training = none, * * kwargs ) :
[ -0.007282385602593422, -0.24206113815307617, 0.46008211374282837, 0.922191321849823, 0.887726366519928, 0.5423758029937744, -0.7013235688209534, 0.41911986470222473, -0.29360058903694153, -0.18886436522006989, -0.9238846302032471, 0.1078200712800026, -0.14176808297634125, 0.785073816776275...
def clear ( self, line = none ) : cmd = 0x01 # clear screen if line = = none : self. _ write ( cmd ) time. sleep ( 2 * ms ) # max 1. 53ms else : space = " " * 40 # max width 40 char self. puts _ p ( space, line )
[ 0.18120689690113068, 0.9232748746871948, 0.4650115370750427, 1.0331447124481201, -0.019518937915563583, 0.5882830619812012, 0.22290973365306854, -0.8989406824111938, 0.6416289210319519, -0.3298596143722534, 0.3359857201576233, 0.8142637014389038, -0.4752286672592163, 0.8426067233085632, ...
def create _ batches ( self ) : args = self. args total _ batch _ size = len ( self. _ data _ x ) batch _ num = total _ batch _ size / / args. batch _ size if batch _ num = = 0 : assert false,'batch _ size is to large!'# c = list ( zip ( self. _ data _ x, self. _ data _ y, self. _ data _ target ) ) # shuffle ( c ) # se...
[ 0.35935837030410767, 0.12540219724178314, 0.831076443195343, -0.16589191555976868, 0.27544593811035156, 0.059472110122442245, 0.4673702120780945, -0.6444318294525146, 0.17701774835586548, -0.5190802812576294, -0.35497522354125977, 0.650752067565918, 0.6113559007644653, -0.03659303113818168...
def apply _ frame _ difference ( self, video ) : difference = cv2. absdiff ( video. gray _ frame, video. old _ gray _ frame ) blurred = cv2. blur ( difference, ( 20, 20 ) ) _, thresholded = cv2. threshold ( blurred, 20, 255, cv2. thresh _ binary ) self. _ canvas. canvas = ( cv2. addweighted ( self. _ canvas. canvas, 0....
[ 0.07376015931367874, -0.36917322874069214, 0.8247853517532349, 0.329332172870636, 0.02557489275932312, -0.06273621320724487, 0.8556809425354004, -0.39322537183761597, 1.0226892232894897, -0.26068034768104553, -0.24996033310890198, 0.6827712059020996, 0.5969662070274353, 1.1344298124313354,...
def _ _ init _ _ ( self, amsn _ core, parent ) : self. _ amsn _ core = amsn _ core self. _ main = parent pass
[ 1.2902591228485107, -0.07038134336471558, 0.4044543206691742, 0.2621648907661438, -0.626772940158844, 0.0941426008939743, -0.32074180245399475, -0.3779858946800232, 1.0752719640731812, -0.2758657932281494, -1.0201307535171509, 0.4890576899051666, 0.5033432245254517, 0.549907922744751, 1....
def test _ read _ function ( url ) : web _ data = datareader ( url ) data, columns = web _ data. read ( ) assert _ equals ( true, len ( data ) > 0 ) assert _ equals ( true, len ( columns ) > 0 ) assert _ equals ( 252, len ( data ) ) assert _ equals ( 15, len ( columns ) ) assert _ equals ( 23, data. loc [ 0,'age ( year...
[ -0.5235264301300049, 0.0832294225692749, 0.6638486385345459, -0.6482197642326355, 0.018196646124124527, 0.5885732769966125, -0.17357341945171356, 0.3847029507160187, -0.5313244462013245, -1.305184006690979, -0.5284948945045471, 0.35341528058052063, 0.4666215777397156, -0.5940840840339661, ...
def grid ( self ) : try : params = self. _ request. params offset = int ( params. get ('offset ', 0 ) if params. get ('offset')! ='nan'else 0 ) limit = int ( params. get ('limit ', - 1 ) if params. get ('limit')! ='nan'else - 1 ) search = params. get ('search ','' ). strip ( ) sort = params. get ('sort ','' ) order = p...
[ -0.7662132382392883, 0.9604065418243408, 1.1241827011108398, -0.49019116163253784, -0.3440150320529938, -0.5779567360877991, 0.15285076200962067, -0.17412477731704712, -0.21186141669750214, 1.0967477560043335, 0.5379336476325989, 0.37384817004203796, -0.4015149176120758, 0.5745965242385864...
def main ( ) : # get the logger logger = logging. getlogger ( _ _ name _ _ ) # print the pilot version pilot _ version _ banner ( ) # define threading events args. graceful _ stop = threading. event ( ) args. abort _ job = threading. event ( ) args. job _ aborted = threading. event ( ) # define useful variables args. r...
[ -0.1425214558839798, -0.5121304988861084, 1.0666519403457642, -0.14725342392921448, 0.7572463154792786, 0.00712341396138072, 0.16297288239002228, -0.41048240661621094, -0.18103966116905212, 0.7199169993400574, 0.3859030604362488, 0.29993391036987305, -0.3187146782875061, -0.144204363226890...
def convert _ video _ to _ data ( self, video _ file _ path ) : cap = cv2. videocapture ( video _ file _ path ) assert cap. isopened ( ) # can open file index = - 1 while true : returned _ value, frame = cap. read ( ) if not returned _ value : print ( " can't receive frame ( potentially stream end or end of file? ). ex...
[ -0.5245248675346375, -0.6266302466392517, 0.7614782452583313, 0.8544033765792847, -0.06356240063905716, -0.07881743460893631, 1.103054404258728, -0.31202057003974915, 0.33632799983024597, -0.2634045481681824, 0.06403086334466934, 0.7904547452926636, 0.8761877417564392, -0.177302286028862, ...
def set _ git _ paths ( repository _ basepath, repos ) : repos _ abspath = [ posixpath. join ( repository _ basepath, repo + bare _ extension ) for repo in repos ] return repos _ abspath
[ 0.4350906014442444, -0.07423015683889389, 0.4939326345920563, 0.7000141143798828, 0.5750685334205627, 0.6922900080680847, -0.9589465260505676, 0.1970149427652359, 0.1560749113559723, 0.5276169776916504, 0.0909046083688736, -0.5631211400032043, -0.15691444277763367, 0.4547309875488281, 0....
def process _ if _ needed ( volume, cfr _ part ) : version _ id = _ version _ id ( volume. year, cfr _ part ) annual _ entry = entry. annual ( volume. title, cfr _ part, volume. year ) tree _ entry = entry. tree ( volume. title, cfr _ part, version _ id ) notice _ entry = entry. notice ( version _ id ) deps = dependenc...
[ 0.2743777632713318, -0.4383983016014099, 0.6109280586242676, -0.9912033677101135, 0.5648032426834106, -0.1901811957359314, -0.26698294281959534, 0.20918528735637665, -0.10781780630350113, 0.2800699770450592, 0.21525709331035614, 0.23583576083183289, 0.2424113005399704, 0.9422993659973145, ...
def sse _ func ( x, y, w, b _ mat ) : errors _ vec = raw _ error ( x, y, w, b _ mat ) err _ squared = np. square ( errors _ vec ) sum _ squared _ error = sum ( err _ squared ) adjusted _ sse = 0. 5 * sum _ squared _ error return adjusted _ sse
[ 1.089209794998169, -0.23879067599773407, 0.296436607837677, -0.11831563711166382, -0.49239474534988403, -0.48345836997032166, 0.4678927958011627, 0.059932708740234375, 0.3765534460544586, 0.8293353319168091, -0.09258013218641281, 1.219941258430481, 0.30996960401535034, 0.23862600326538086,...
def sim _ absolute _ move ( self, positioner, position ) :
[ -0.43694305419921875, -0.6704120635986328, 0.4273034930229187, 1.2903177738189697, -0.5458050966262817, 0.31692472100257874, -0.5373769402503967, -0.48053789138793945, -0.3472432494163513, 1.1022742986679077, -0.3984222412109375, -0.7863950729370117, 0.6991679072380066, 0.18493637442588806...
def float _ converter ( x ) : if type ( x ) is str : try : if x [ 0 ] = ='<': x = x [ 1 : ] return float ( x ) except exception as e : # print ( e ) # print ( " except : x { } x ". format ( x ) ) return 0. 0 else : return x
[ 0.32754114270210266, -0.6522496342658997, 0.669430136680603, -0.0820879265666008, -0.24749474227428436, 0.5400515198707581, -0.9010168313980103, -0.17770245671272278, -0.14430353045463562, -0.5277212858200073, 0.27492058277130127, 0.7694566249847412, -0.15935967862606049, 0.879416048526763...
def get _ candidates _ alphanumeric ( ) : return string. ascii _ lowercase + " 0123456789 " + string. ascii _ uppercase
[ -0.1700497418642044, -1.9675952196121216, 0.4918016195297241, -0.1930629014968872, 0.11265876889228821, 0.6864761710166931, -0.2173215001821518, 0.6027487516403198, 0.7994619607925415, -0.3187207877635956, 0.2663251459598541, 0.3591906726360321, 0.12827856838703156, -0.2477705478668213, ...
def enhance _ payload ( self, diagnoses : list [ diagnosis ] ) - > list [ diagnosis ] : mondo = self. mondo config = textannotationconfiguration ( matches _ whole _ text = true ) if not isinstance ( mondo, textannotatorinterface ) : raise valueerror ( " mondo adapter must implement textannotatorinterface " ) for diagno...
[ -0.5128503441810608, -0.342053085565567, 0.6164995431900024, -0.6801905035972595, -0.21039853990077972, 0.07267910987138748, -0.8469647169113159, 0.4587450325489044, 0.9053323268890381, 0.396991491317749, 0.20641133189201355, -0.10034242272377014, 0.9298991560935974, 1.0542293787002563, ...
def listeners ( self ) - > dict [ str, list ] : return self. _ listeners
[ -0.47675463557243347, -1.105393409729004, 0.10941663384437561, -0.9521197080612183, -0.3115529716014862, 0.11023203283548355, -0.8104077577590942, 0.05153482407331467, 0.035383932292461395, 0.09437797963619232, -1.2407796382904053, 0.12688590586185455, -0.040550682693719864, 0.306349188089...
def child _ items ( self, item ) : if item is not none : nodeid = quote ( self. get _ nodeid ( item ) ) node _ indents = self. indents ( item ) return self. browser. elements ( self. child _ items. format ( id = nodeid, indent = node _ indents + 1 ), parent = self ) else : return self. browser. elements ( self. root _ ...
[ -0.052711717784404755, -0.3154483139514923, 0.4503074586391449, 0.7963438034057617, 0.21958349645137787, 0.11062956601381302, 0.18108917772769928, -0.5212406516075134, 1.0744694471359253, -0.3228762447834015, -0.2728874087333679, -0.19357991218566895, 0.050987694412469864, 0.10582174360752...
def test _ etcd _ client _ creation _ with _ get _ conn ( minion _ opts, profile _ name ) : get _ conn ( minion _ opts, profile = profile _ name )
[ 0.9192100763320923, -0.1527881622314453, 0.2982420325279236, 0.6266674399375916, 0.6834886074066162, 0.033025890588760376, -0.6211678385734558, -0.024803897365927696, -0.6439337134361267, -0.04105880856513977, -0.26028114557266235, 0.41592052578926086, 0.4225704073905945, -1.14459359645843...
def to _ core _ openapi _ response ( response : web. streamresponse ) - > openapiresponse : return openapiresponse ( data = to _ core _ openapi _ response _ data ( response ), status _ code = response. status, mimetype = response. content _ type, )
[ -0.27146008610725403, -1.8805588483810425, 0.3380476236343384, -0.9433406591415405, -0.759964644908905, -0.4648926556110382, 0.20815667510032654, -0.9181711077690125, 0.9765156507492065, 0.48014748096466064, -0.7979903817176819, -0.06541454046964645, -1.6934592723846436, -0.375189781188964...
def get _ button _ id ( self ) : return self. _ _ bt _ resolution
[ 1.1111605167388916, -0.14627808332443237, 0.7084662914276123, 0.6251132488250732, 0.8464771509170532, 1.0170201063156128, -0.09563858807086945, -0.1059400737285614, 0.3941132426261902, -0.35988500714302063, -0.5874602794647217, -0.31032484769821167, -1.3259752988815308, -0.4069333374500274...
def asyncsendsendingbuffer ( self, size = none, ondatasent = none, ondatasentarg = none ) :...
[ -0.46394169330596924, 0.6012861132621765, 0.3521289527416229, 0.08480888605117798, -0.20469261705875397, -0.2028799057006836, -0.40492844581604004, -0.5293418169021606, 0.30036112666130066, -0.15440744161605835, -1.561924695968628, 0.9133221507072449, -0.2634992301464081, 0.512063384056091...
def _ hit _ eval ( model, eval _ data ) : loss _ list = [ ] ci _ list = [ ] for d in eval _ data : pred _ d = model. predict ( d ) lossv = hit _ loss ( pred _ d, d ) [ 1 ] civ = hit _ tdci ( pred _ d, d ) [ 1 ] loss _ list. append ( lossv ) ci _ list. append ( civ ) return loss _ list, ci _ list
[ -0.6193512678146362, -0.2342090606689453, 0.32940325140953064, -0.34436896443367004, -0.2478538304567337, 0.4887470602989197, 0.11762718111276627, 0.8634240627288818, -0.8052417039871216, 1.0549710988998413, 0.004847644828259945, 0.41806626319885254, 0.5851312875747681, -0.0414495319128036...
def make _ window _ dirs ( window _ list, stash _ existing = false, path = ". / ", window _ dir _ name = " windows " ) : win _ dir = os. path. join ( path, window _ dir _ name ) if stash _ existing and os. path. isdir ( win _ dir ) : stash _ dir = os. path. join ( path, window _ dir _ name + " _ { : % y. % m. % d _ % h...
[ -0.3712635636329651, 0.27854040265083313, 1.0037480592727661, 0.8597652912139893, -0.3072737455368042, 1.0804589986801147, 1.0965478420257568, -0.13275858759880066, 0.4330731928348541, 0.6925128698348999, -0.8861678242683411, 0.32254162430763245, -0.07073546200990677, 0.47976139187812805, ...
def slice _ arrays ( arrays, indices, contiguous = true ) : converted _ to _ list = false if not isinstance ( arrays, list ) : converted _ to _ list = true arrays = [ arrays ] if any ( tensor _ util. is _ tf _ type ( x ) for x in arrays ) : if not contiguous : entries = [ [ x [ i : i + 1 ] for i in indices ] for x in a...
[ 0.08110000938177109, -0.08671557903289795, 0.5146819949150085, 0.8009613156318665, 0.4115261137485504, 0.3599735200405121, 0.14794760942459106, 0.4513857662677765, -0.02171822264790535, 1.4725377559661865, 0.7857879400253296, -0.07733970135450363, -0.0334557443857193, -0.0613182969391346, ...
def isempty ( self ) - > bool : if self. head = = self. tail : return true else : return false
[ -1.305537223815918, -0.15499036014080048, 0.5281805992126465, -0.20089317858219147, 1.3714970350265503, 0.5562686324119568, -0.41852036118507385, -0.2935293912887573, 0.3389100730419159, 0.1399732083082199, -0.7940317392349243, 1.2517755031585693, -1.0589889287948608, -0.08048969507217407,...
def eval _ pandas ( self, data _ map, *, eval _ env = none, data _ model = none ) : if not isinstance ( data _ map, dict ) : raise typeerror ( " data _ map should be a dictionary " ) if len ( data _ map ) < 1 : raise valueerror ( " data _ map should not be empty " ) if eval _ env is none : eval _ env = data _ algebra. ...
[ -0.6276665329933167, -0.10855558514595032, 0.754061222076416, -0.03569513559341431, 0.14695723354816437, 0.9536547660827637, 0.6119247078895569, 0.5813098549842834, -0.5813111066818237, -0.5011847019195557, -0.21164797246456146, 0.595815122127533, 0.20853400230407715, -0.4471707344055176, ...
def _ _ init _ _ ( self, lista _ canciones = [ ] ) : lista = listaenlazada ( ) for cancion in lista _ canciones : lista. insert ( cancion ) self. lista _ canciones = lista self. acciones _ tomadas = pila ( ) self. acciones _ deshechas = pila ( ) self. actual = 0
[ 0.15574733912944794, -0.26459306478500366, 0.5869107246398926, 1.2589118480682373, 0.4395017921924591, -0.00809305626899004, -0.10227836668491364, 1.0727123022079468, 0.860460638999939, -0.07103491574525833, -0.7598676085472107, -1.1644887924194336, -0.15280838310718536, 1.0706136226654053...
def mel _ spectrogram ( y, sr, nfilt = 64, log _ mel = true, * * kwargs ) : if log _ mel : return python _ speech _ features. logfbank ( signal = y, samplerate = sr, nfilt = nfilt, * * kwargs ) else : return python _ speech _ features. fbank ( signal = y, samplerate = sr, nfilt = nfilt, * * kwargs ) [ 0 ]
[ 0.48314929008483887, 0.8649612069129944, 0.6285426616668701, 0.876871645450592, -0.9228842854499817, -1.102340817451477, -0.8665074706077576, -0.6796668767929077, 1.0726442337036133, -0.32175353169441223, -0.06859074532985687, 0.5024738907814026, -0.24859990179538727, 0.9229011535644531, ...
def uni _ form _ setup ( context ) : if'static _ url'not in context : context ['static _ url'] = settings. static _ url return ( context )
[ -0.7863237261772156, 0.3886118531227112, 0.3253489136695862, -0.058993156999349594, 0.9535142779350281, 0.1479167640209198, 0.29659467935562134, 0.2411799430847168, 0.963975191116333, -0.010121776722371578, -0.6146252155303955, -1.034260630607605, 0.683149516582489, -0.1265137940645218, ...
def get _ position ( self ) : return ac. getposition ( self. _ _ window _ id )
[ 0.08715805411338806, -0.8676123023033142, 0.30852288007736206, 0.12530536949634552, 0.1869204193353653, -0.13885976374149323, 1.027794599533081, -0.3717866837978363, -0.14416629076004028, -0.2184569239616394, 0.5202724933624268, 0.33125239610671997, -1.0114853382110596, -0.0501806773245334...
def main ( ) : # # # # # parameters # # # # start _ cell = ( 4, 0 ) goal _ cell = ( 1, 3 ) cell _ width, cell _ height = 1, 1 aoi _ height, aoi _ width = 10, 10 obstacles = [ grid _ decomposition. obstacle ( location = ( 1. 0, 1. 0 ), radius = 0. 5 ), grid _ decomposition. obstacle ( location = ( 7. 2, 6. 8 ), radius =...
[ 0.2401600033044815, -0.362863153219223, 1.0366185903549194, 0.12296419590711594, 0.011310538277029991, -0.17947854101657867, 0.7685527801513672, 0.7148179411888123, -0.3549288213253021, -0.001934816362336278, 0.4251909554004669, 0.47715529799461365, -0.07667618989944458, -0.157037168741226...
def show ( self ) : self. _ main. send ( " showcontactlistwindow ", [ ] ) pass
[ 0.4149155914783478, -0.3974790871143341, 0.1267738938331604, 0.41895535588264465, -0.29351428151130676, 0.3855617046356201, 1.477074384689331, 1.0528790950775146, 0.4553857147693634, -0.31933656334877014, 0.08863223344087601, 1.167765498161316, -0.557003915309906, 0.9585774540901184, -0....
def getclosest ( point, candidates ) : return min ( candidates, key = lambda x : distance ( point, x ) )
[ 0.48600202798843384, -1.5825414657592773, 0.3781428635120392, 0.8824277520179749, -1.056920051574707, 0.37325307726860046, -1.0104659795761108, 0.32307401299476624, -0.29277104139328003, 0.13101771473884583, 0.4754623472690582, 0.24049043655395508, -1.0043678283691406, -0.6321749091148376,...
def create _ dataset ( features, labels, batch _ size ) : # convert the inputs to a dataset. dataset = tf. data. dataset. from _ tensor _ slices ( ( dict ( features ), labels ) ) # shuffle, repeat, and batch the examples. dataset = dataset. shuffle ( 1000 ). repeat ( ). batch ( batch _ size ) # return the dataset. retu...
[ 0.04212823137640953, 0.28619372844696045, 0.1778365820646286, -0.607207179069519, -0.1448320895433426, 0.16279247403144836, -0.6235548853874207, 0.4517766237258911, -0.2465803474187851, -0.7172665596008301, 0.27505531907081604, 0.40972900390625, 0.3586871922016144, -0.5859854221343994, -...
def is _ bundled _ app ( ) : lfd = os. path. dirname ( _ _ file _ _ ) cwd = os. getcwd ( ) if lfd = = cwd : return true else : return false
[ 0.30120277404785156, -1.4283536672592163, 0.5369781255722046, 0.5958805680274963, -0.2845067083835602, 1.3349831104278564, 1.6286630630493164, 0.45091375708580017, 0.5013204216957092, 0.2150915116071701, 0.22773781418800354, 0.6146991848945618, -0.22676394879817963, 0.799936056137085, -0...
def testangulardiameterdistance ( self ) : h0 = 56. 0 universe = cosmologyobject ( ) for om0 in numpy. arange ( start = 0. 15, stop = 0. 56, step = 0. 2 ) : for ok0 in numpy. arange ( start = - 0. 1, stop = 0. 11, step = 0. 2 ) : for w0 in numpy. arange ( start = - 1. 1, stop = - 0. 85, step = 0. 2 ) : for wa in numpy....
[ 0.1757992058992386, -0.3890010118484497, 0.7259066700935364, 0.010796265676617622, 0.0391414500772953, 0.7591909170150757, 0.6323983669281006, 0.0056539964862167835, 0.5401098132133484, -0.1823594570159912, -0.34853652119636536, -0.06691243499517441, -0.6191908717155457, 0.4715485572814941...
def try _ until _ resource _ status ( self, url, auth = none, status = " up ", trials = 5, * * kwargs ) : final _ status = false if status. upper ( ) = = " up " : expected _ result = true elif status. upper ( ) = = " down " : expected _ result = false i = 1 while i < = trials : pnote ( " trial : { 0 } ". format ( i ), ...
[ -0.6327539682388306, 0.04344800487160683, 0.5140673518180847, -0.004394135437905788, 0.11794012784957886, 0.6732041835784912, -0.3234443664550781, -0.6099252700805664, -0.4236544966697693, -0.23065340518951416, -0.5172584056854248, -0.46448665857315063, -0.7935479879379272, -0.144537627696...
def test _ makeconnection ( self ) : self. xmlstream. dispatch ( self. xmlstream, xmlstream. stream _ connected _ event ) self. assertequal ( 0, self. xmlstream. serial ) self. assertequal ( 1, self. factory. serial ) self. assertidentical ( none, self. xmlstream. rawdatainfn ) self. assertidentical ( none, self. xmlst...
[ -0.05723937973380089, -0.1770278364419937, 0.42800164222717285, -0.16557981073856354, 0.6077995300292969, 0.09462481737136841, -0.09175208956003189, -0.4966415762901306, 0.2965715825557709, -1.5628129243850708, -0.791525661945343, -0.41094425320625305, 0.9103711247444153, -0.44347998499870...
def generate _ schema ( pkg _ loader, context _ manager, class _ name, method _ names = none, class _ version = none, package _ name = none ) : if method _ names and not isinstance ( method _ names, ( list, tuple ) ) : method _ names = ( method _ names, ) version = helpers. parse _ version _ spec ( class _ version ) if...
[ -0.7318114042282104, 0.4028262495994568, 0.8424431681632996, 0.46352943778038025, -0.5147495865821838, -0.6068639755249023, -0.49904632568359375, 0.6680428981781006, 0.3112727999687195, 0.4875658452510834, -0.688676655292511, -0.8009173274040222, 0.7510251402854919, 0.3421439230442047, -...
def update ( self, image ) : self. original _ dimensions = image. shape [ 0 ] self. border _ size = 2 * int ( self. original _ dimensions / self. border _ proportion ) self. bounding _ box _ dimensions = self. original _ dimensions - self. border _ size
[ 0.14706353843212128, -0.13361148536205292, 0.3470040559768677, -0.1619352251291275, -0.20127831399440765, -0.032072898000478745, 0.7779023051261902, -0.010586601682007313, -0.11240077763795853, 0.07322926819324493, -0.023534908890724182, 0.43795451521873474, 0.26966026425361633, 1.06140780...
def test _ print _ event ( self ) : event = nuclio _ sdk. event ( body = datetime. datetime ( 2022, 1, 1 ) ) print ( event )
[ 0.7738667726516724, 0.019494371488690376, 0.4937373697757721, 0.38010406494140625, 0.4185752868652344, 0.6340680718421936, -0.7789653539657593, -0.46094009280204773, 0.16594354808330536, -0.7756839990615845, -0.4147337079048157, 1.3052276372909546, 0.9179369211196899, 0.04757259413599968, ...
def status _ mute ( self, id : union [ status, idtype ] ) - > status : id = self. _ _ unpack _ id ( id ) return self. _ _ api _ request ('post ', f'/ api / v1 / statuses / { id } / mute')
[ -1.2534780502319336, -0.589069664478302, 0.22628532350063324, 0.5698432922363281, 0.09568323194980621, -0.1630675345659256, -1.1827892065048218, -0.587441086769104, 1.8154574632644653, -0.341703861951828, -0.7521800398826599, 0.6359891295433044, -0.6751556992530823, -0.23151464760303497, ...
def get _ conn _ properties ( self ) - > dict : pass
[ -1.1949949264526367, -1.5964512825012207, 0.35345155000686646, 0.8224900364875793, -0.3250918984413147, -0.6412498950958252, -0.8447105288505554, 0.13834524154663086, -0.7294760942459106, -0.29186058044433594, -0.3883524239063263, 0.2476755976676941, -0.6202106475830078, -0.707723915576934...
def send _ message _ out _ sync ( self, msg : message ) : self. _ _ q _ out. put ( msg )
[ -0.26242056488990784, 0.8526892066001892, 0.3490235507488251, 0.1024387776851654, -0.15261118113994598, 0.09300538897514343, 0.7883116602897644, -0.6193033456802368, -0.6290796995162964, 0.18494448065757751, -0.20738831162452698, 0.941814661026001, -0.5728358626365662, 0.696925938129425, ...
def process _ event ( self, event, device _ id ) : print ( event ) self. process _ event _ lights ( event ) if ( event. type = = eventtype. on _ conversation _ turn _ finished and event. args and not event. args ['with _ follow _ on _ turn'] ) : print ('' ) if event. type = = eventtype. on _ device _ action : for comma...
[ 0.05990692600607872, -0.6165770292282104, 0.6896629333496094, 1.1410155296325684, 0.6494694352149963, -0.13994541764259338, 0.5549748539924622, -0.7858178019523621, 0.8436070680618286, 0.2928833067417145, 0.15123353898525238, 0.6421955227851868, 0.36051735281944275, 1.3147557973861694, 1...
def get _ image _ sizing ( image _ file _ path ) : picture = image. open ( image _ file _ path ) return picture. size
[ -0.2714137136936188, 0.5067772269248962, 0.5288751125335693, -0.5558037757873535, -0.06635817885398865, -0.16931644082069397, 1.0092071294784546, 0.0643053650856018, -0.6109945178031921, 1.0044690370559692, -0.28562691807746887, -0.8064719438552856, 0.12767252326011658, 0.506034791469574, ...
def selection _ data _ exchange ( self, options : str, payload : str ) : data _ recv ( options, payload )
[ -0.6716219186782837, 0.04172127693891525, 0.18777920305728912, -0.8086845874786377, 0.43288370966911316, -0.08978129178285599, -0.8573049306869507, -0.2841866612434387, 0.5307958722114563, -0.1699901819229126, -0.03384549915790558, 1.4748458862304688, -0.21958519518375397, -0.6743856668472...
def find _ most _ affected _ city ( self ) : most _ affected _ city = self. city most _ infected _ cases = self. city. infected for neighbour in self. city. neighbours : if neighbour. infected > most _ infected _ cases : most _ affected _ city = neighbour most _ infected _ cases = neighbour. infected return most _ affe...
[ 0.4010849893093109, -1.8444135189056396, 0.778211772441864, -0.25009214878082275, -0.4370517134666443, -0.32878053188323975, 0.27195748686790466, -0.21631519496440887, 0.2823294699192047, -0.5920963883399963, 0.61358642578125, 0.08372034877538681, -0.8199607729911804, 0.6343529224395752, ...