text
stringlengths
25
2.19k
embedding
listlengths
768
768
def _ _ len _ _ ( self ) - > int : return len ( self. _ st )
[ 0.07818468660116196, -0.019269296899437904, 0.27369824051856995, -1.6110460758209229, -0.026170428842306137, 0.11788979172706604, 0.6000702977180481, 0.2803044617176056, 0.5627186894416809, -0.6277275085449219, -1.2612011432647705, -0.39684832096099854, 0.6881682872772217, -0.7137110829353...
def check _ correct _ handshake ( client _ handshake ) : # the opening handshake must be a get request and be at least http 1. 1 if not client _ handshake. find ( " get / " ) > = 0 : return false if not client _ handshake. find ( " http / " ) > = 0 : return false else : http _ version = float ( client _ handshake. spli...
[ -0.42372483015060425, -0.4739909768104553, 0.7704471945762634, 0.33614426851272583, -0.42501458525657654, 1.1631481647491455, -0.3182094097137451, 0.44123220443725586, -0.5740716457366943, -0.6537861824035645, 0.25578799843788147, -0.5194453597068787, -0.9577732086181641, 0.492622792720794...
def parse _ allele ( self, allele ) : if '.'not in allele : raise invalidhgvsname ( allele,'allele ','expected kind " c. ", " p. ", " g. ", etc') # determine hgvs name kind. kind, details = allele. split ( '. ', 1 ) self. kind = kind self. mutation _ type = none if kind = = " c " : self. parse _ cdna ( details ) elif k...
[ -0.17421045899391174, 0.2346898764371872, 0.5599762797355652, 0.48602500557899475, -0.23316170275211334, -0.12976643443107605, -0.3274598717689514, -0.16421975195407867, -0.013954764232039452, 0.2606275975704193, 0.15485304594039917, 0.6939535140991211, 0.22396127879619598, 0.5328484773635...
def decision ( self, * * kwargs ) - > list : cpu = self. cpu _ info cpu _ detail = " p % d % s % s % dmhz % d cores " % ( cpu. cpu _ class, cpu. vendor, cpu. model, cpu. speed, cpu. cores ) return [ { " component " : self. get _ component _ type ( ), " result " : self. cpu _ info. cpu _ class > = 5, " message " : cpu _...
[ -0.43865343928337097, 0.004998371936380863, 0.47952955961227417, -0.16165302693843842, 0.5712112188339233, 0.17768128216266632, 0.15382003784179688, 0.1414719820022583, -0.5117098689079285, 0.48508426547050476, -0.5995338559150696, 0.06123889610171318, -0.8895658850669861, 1.03727781772613...
def clear _ gateway ( self ) : self. gateway = none self. afdeling. clear _ gateway ( )
[ 0.4005981683731079, -0.1492377668619156, 0.27522149682044983, -0.0026369791012257338, -0.7207608819007874, -0.4912031590938568, -0.4263346493244171, -0.22969651222229004, 0.1412096917629242, 0.634706437587738, 0.6290944218635559, 1.6052519083023071, -0.12152236700057983, 1.8089590072631836...
def to _ get _ request _ information ( self, request _ configuration : optional [ calendarpermissionsrequestbuildergetrequestconfiguration ] = none ) - > requestinformation : request _ info = requestinformation ( ) request _ info. url _ template = self. url _ template request _ info. path _ parameters = self. path _ pa...
[ -0.7768896818161011, -0.09757563471794128, 0.7636079788208008, 0.03638659417629242, -0.41664671897888184, 0.007051204331219196, -0.3454219102859497, -0.2077641785144806, -0.11078961193561554, -0.47532257437705994, 0.4587623178958893, -0.03231852501630783, 0.11373037099838257, -0.2843239605...
def class _ name ( cls ) : return cls. _ _ name _ _. replace ( '. ','_')
[ -0.5843877196311951, -0.7092260718345642, 0.6468911170959473, -0.6852361559867859, -0.657431423664093, 0.5982565879821777, -0.37865138053894043, -0.10495580732822418, 0.21072934567928314, 0.4162982404232025, -0.36902400851249695, -0.08752243965864182, 1.1503381729125977, -0.535624086856842...
def transform _ global ( f, p ) : a _ f = f [ 2 ] t _ f = f [ 0 : 2 ] r = np. array ( [ [ cos ( a _ f ), - sin ( a _ f ) ], # rotation matrix [ sin ( a _ f ), cos ( a _ f ) ] ] ) p _ w = r. dot ( p ) + t _ f x, y = p j _ f = np. array ( [ [ 1, 0, - y * cos ( a _ f ) - x * sin ( a _ f ) ], [ 0, 1, x * cos ( a _ f ) - y ...
[ 0.046956926584243774, 0.216814324259758, 0.7897477149963379, -0.7234428524971008, 0.5857029557228088, 0.46950632333755493, 0.4726862907409668, 1.062278389930725, -1.1491734981536865, 1.419392704963684, -0.43112611770629883, -0.0994560718536377, -0.37892958521842957, -0.17894166707992554, ...
async def delete _ file ( self, file _ key : str ) : loop = asyncio. get _ running _ loop ( ) func = functools. partial ( self. delete _ file _ sync, file _ key = file _ key ) return await loop. run _ in _ executor ( self. executor, func )
[ -0.008017819374799728, 0.2650980055332184, 0.5702397227287292, 0.2999837398529053, 0.5582666993141174, -0.9474675059318542, 0.07159120589494705, 0.5963886976242065, -0.903529167175293, 0.25384190678596497, 0.7499828934669495, -0.28490474820137024, 0.21191266179084778, 0.5600703358650208, ...
def _ _ init _ _ ( _ _ self _ _, *, id : optional [ str ] = none, location : optional [ str ] = none, name : optional [ str ] = none, plan : optional ['outputs. armplanresponse'] = none, properties : optional ['outputs. apientityresponse'] = none, sku : optional ['outputs. skudescriptionresponse'] = none, tags : option...
[ -0.06931110471487045, -0.08205922693014145, 0.6400942206382751, -0.20223435759544373, 0.6213243007659912, 0.05561050400137901, -1.4629905223846436, 0.09658670425415039, 0.6854476928710938, 0.4495294690132141, -0.905835747718811, 0.35336142778396606, 0.5844420194625854, -0.8262884616851807,...
def movetaskdown ( self, label ) : rowid = self. lookuprowid ( label ) trace = self. deletetask ( rowid ) root = trace. list [ 0 ] [ 0 ] root. task. position + = 1 # todo : should check if at bottom already self. readdatabase ( ) newlabel = self. inserttrace ( trace ) return newlabel
[ -0.07389766722917557, 0.07844870537519455, 0.8314366936683655, 0.48980072140693665, 0.017560597509145737, 0.08910912275314331, 1.0535401105880737, -0.22051993012428284, 0.5511068105697632, 0.7777666449546814, -0.34035855531692505, -0.5234906077384949, -0.9418843984603882, -0.15693451464176...
def is _ an _ adj ( word ) : # it is a noun verb pronoun or determinant so we have to return 0 if word in resourcepool ( ). special _ nouns + resourcepool ( ). special _ verbs : return 0 # for the regular adjectives for k in resourcepool ( ). adjective _ rules : if word. endswith ( k ) : return 1 # for adjectives creat...
[ -0.8550683259963989, -0.12736862897872925, 0.4772658050060272, -0.7329725623130798, -0.8325182199478149, 0.8021513819694519, 0.16255082190036774, 0.12967757880687714, -0.04844065383076668, -0.09873920679092407, 0.7488625049591064, 0.7196536660194397, -0.8794636130332947, 1.1719014644622803...
def get _ pwm _ settings ( self ) : msg = self. device. send ( " get - pwm - settings " ) if msg. iserror ( ) : raise exception ( msg. geterror ( ) ) return { " pwm _ pulse " : msg. getintparam ( 0 ), " pwm _ min " : msg. getintparam ( 1 ), " pwm _ max " : msg. getintparam ( 2 ), " pwm _ on " : msg. getparam ( 3 ), }
[ -0.5847088694572449, 0.3510517477989197, 0.7247326374053955, 0.1751323938369751, -0.13288217782974243, -0.3969823122024536, -1.16045343875885, -0.8361429572105408, -0.1535753756761551, -0.011042029596865177, -1.5022212266921997, 0.3769506514072418, -1.315945029258728, 0.6531470417976379, ...
def parse _ date ( str _ input ) : # patterns = [ # yyyy _ mm _ dd, # mm _ dd _ yyyy, # month _ dd _ yyyy # ] patterns = [ r'(? p < year > [ \ d ] { 4 } ) [ - / ]?'r'(? p < month > [ \ d ] { 1, 2 } ) [ - / ]?'r'(? p < day > [ \ d ] { 1, 2 } ) ', r'(? p < month > [ \ d ] { 1, 2 } ) [ - / ]?'r'(? p < day > [ \ d ] { 1, 2...
[ -0.003355917055159807, -0.3027380406856537, 0.912929117679596, -0.49561718106269836, -1.2301243543624878, 0.08694219589233398, 0.15835073590278625, -0.35538747906684875, -0.2631744146347046, -0.22918446362018585, -0.8277373909950256, -0.027962343767285347, 0.027493702247738838, 0.239208638...
def encode _ caption ( caption, word _ map, max _ caption _ len ) : return ( [ word _ map [ token _ start ] ] + [ word _ map. get ( word, word _ map [ token _ unknown ] ) for word in caption ] + [ word _ map [ token _ end ] ] + [ word _ map [ token _ pad ] ] * ( max _ caption _ len - len ( caption ) ) )
[ -0.0104609914124012, -0.8313233852386475, 0.43238696455955505, 0.12835058569908142, -0.082523874938488, 0.22761473059654236, -0.5240386724472046, 0.6294858455657959, 0.41788655519485474, 0.8269598484039307, -1.1395798921585083, 1.0650908946990967, 0.0776861310005188, -0.37589433789253235, ...
def getcdf ( self, x ) : # - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | return binomialdistbase. getcdf ( self, x )
[ -0.44279083609580994, -0.21190094947814941, 0.43512162566185, 0.1058475598692894, -0.6897948980331421, -0.39620354771614075, -0.2204553633928299, -0.4510987102985382, -0.07189372926950455, -0.924796998500824, -1.113472580909729, 0.4510096609592438, -0.5224058628082275, -0.3998083770275116,...
def extractcolorfeature ( self, image ) : # mu = [ m / 2 for m in image. shape [ : 2 ] ] # s = [ m / 2 for m in mu ] # s = [ [ s [ 0 ], 0 ], [ 0, s [ 1 ] ] ] # idx = np. random. multivariate _ normal ( mu, s, self. nrsamples ). astype ( int ) hue = image [ :, :, 0 ]. flatten ( ) sat = image [ :, :, 1 ]. flatten ( ) sam...
[ -1.314428448677063, -0.7362772822380066, 0.6317298412322998, 0.1745644062757492, 0.019566426053643227, -0.17793159186840057, 0.8917297720909119, 0.021979056298732758, 0.08384623378515244, -0.2634831666946411, 0.09757012873888016, 0.6022839546203613, -0.003985140938311815, 1.057767033576965...
def total _ pnl ( self ) : return self. realised _ pnl + self. unrealised _ pnl
[ -0.11979646980762482, -0.6141414046287537, 0.34043067693710327, -0.7154237627983093, 0.5299118161201477, 1.1468234062194824, -0.35997235774993896, 0.8100970983505249, 0.7934761047363281, 0.033461663872003555, -1.0049428939819336, -0.8847572207450867, 0.08411507308483124, -0.273469060659408...
def _ _ init _ _ ( self :'linked _ list ', head : plc _ node = none, size : int = 0 ) : plc _ list. _ _ setattr _ _ ( self, " head ", head ) plc _ list. _ _ setattr _ _ ( self, " size ", size )
[ 0.685817539691925, -0.5298758745193481, 0.4837793707847595, -0.4675602316856384, -0.1805488020181656, 0.16891799867153168, -0.34161117672920227, 0.42214712500572205, 0.9405375719070435, -0.7938578724861145, -1.1088900566101074, -0.05647779628634453, 0.007534767501056194, 0.2357386201620102...
def test _ interface _ 1 ( ) : tcex _ instance = utility. init _ tcex ( ) owner = tcex _ instance. args. api _ default _ org batch = tcex _ instance. batch ( owner ) batch _ ind _ creation _ interface _ 1. address _ create ( batch ) batch _ ind _ creation _ interface _ 1. email _ address _ create ( batch ) batch _ ind ...
[ -0.40435072779655457, 1.2010666131973267, 0.41177865862846375, 0.6282936334609985, 0.47012847661972046, 1.4781543016433716, 0.7923585176467896, 0.2073134183883667, -1.1631113290786743, -0.03612207621335983, -0.7079458236694336, -0.4442713260650635, -0.5799936056137085, 0.4963647425174713, ...
def adjust _ learning _ rate ( original _ lr, optimizer, epoch ) : if epoch > 120 : lr = original _ lr * ( 0. 1 ) for param _ group in optimizer. param _ groups : param _ group ['lr'] = lr elif epoch > 160 : lr = original _ lr * ( 0. 01 ) for param _ group in optimizer. param _ groups : param _ group ['lr'] = lr # elif...
[ 0.05841527134180069, -0.2381029725074768, 0.669490396976471, -0.5724263787269592, -0.7757863402366638, 0.35748350620269775, -0.716293215751648, 0.521149218082428, -0.5386933088302612, 0.3050108850002289, 0.6198583245277405, 0.8752002120018005, 0.28890106081962585, 0.6781749129295349, -0....
def parse _ args ( argv ) : parser = argparse. argumentparser ( ) parser. add _ argument ('- - verbose ', default = false, action ='store _ true ', dest ='verbose ', help = " whether to give extra information at run time. " ) parser. add _ argument ('- - src - dir ', default = '. ', dest ='src _ dir ', help = " the loc...
[ -0.17754343152046204, 0.43926680088043213, 0.8840848803520203, -0.4395277798175812, 1.1371445655822754, 0.3451591432094574, 1.0054572820663452, -0.2727658748626709, -0.2976160943508148, 0.2895859181880951, -0.7725828886032104, 0.1930898278951645, -0.570035457611084, 1.0468031167984009, 1...
def prev _ inorder ( self ) : current _ node = self. _ node if current _ node. is _ end _ node ( ) : # current node is a composite node and current focus is on end _ widget last _ child = current _ node. get _ last _ child ( ) if last _ child is not none : if hasattr ( last _ child, " has _ children " ) : # first _ chi...
[ 0.48488491773605347, 0.04884755238890648, 1.1979900598526, -0.6463548541069031, -0.461762011051178, -0.27177858352661133, 1.0759421586990356, 0.5365051031112671, -0.42446693778038025, -0.4397432804107666, 0.5653936862945557, 0.1171797513961792, -1.1053215265274048, 0.35382649302482605, -...
def raw _ history ( board, history ) : a = np. zeros ( ( board. side, board. side ) ) time = 0 for history _ move in history : color, move = history _ move. colour, history _ move. move time + = 1 assert move is not none # first move should have 1 a [ move ] = time empty, full = a = = 0, a! = 0 # the first one now will...
[ -0.254329115152359, 0.9735721349716187, 0.6872957348823547, -0.10256041586399078, 0.3469615578651428, -0.9843536615371704, 0.8614760041236877, 0.39959535002708435, 0.6447946429252625, 0.39998748898506165, -0.5086692571640015, 0.2104710340499878, 0.38744720816612244, 0.5613628625869751, -...
def requirement ( request ) : if request. method = ='post': # fetch customer data customer = customer. objects. get ( id = request. post. get ('pk') ) if'btn _ delete'in request. post : # delete the current customer and all his data customer. delete ( ) messages. warning ( request,'customer { } was deleted. '. format (...
[ 0.28536975383758545, -1.171008825302124, 1.099600911140442, 0.524261474609375, -0.5975785255432129, 0.39201557636260986, -0.23504112660884857, 0.28186503052711487, -0.3441377580165863, 0.31987473368644714, 0.7268304228782654, 0.4759376645088196, 0.11100399494171143, 1.0345396995544434, 0...
def selector ( self ) : if localexplanation. _ does _ quack ( self ) : return localexplanation. selector. _ _ get _ _ ( self ) nan _ predicted = np. empty ( ( 1, 1 ) ) nan _ predicted [ : ] = np. nan feature _ types = [ " numeric " ] * len ( self. features ) return gen _ global _ selector ( nan _ predicted, self. featu...
[ -0.24999099969863892, 0.10087915509939194, 0.36037373542785645, -0.2348480224609375, 0.44812944531440735, 0.48790445923805237, 0.9555951952934265, 0.5839521288871765, 0.4275062084197998, -0.2059592455625534, 0.2563929855823517, 0.9886806607246399, -0.6031098961830139, 0.41192150115966797, ...
def confirm _ reset _ password ( cls, pending _ action : pendingaction, plain _ password : str ) : cls. set _ pasword ( pending _ action. user, plain _ password ) pending _ action. delete ( )
[ 0.20111992955207825, -0.6685968637466431, 0.4049464464187622, 0.46285027265548706, 0.36539414525032043, 0.15632811188697815, 0.48150256276130676, 0.590606153011322, 0.23644055426120758, 0.8082049489021301, -0.44135576486587524, 1.128047227859497, 0.22254261374473572, 0.24852119386196136, ...
def approve ( self, object ) : status = contentflag. objects. add _ flag ( object, contentflag. accept _ flag ) return status
[ -0.30778437852859497, -0.09169148653745651, 0.5671236515045166, -0.4267411530017853, -0.6732805967330933, 0.9601652026176453, -0.20933927595615387, -0.0921919196844101, -0.8977287411689758, -0.04266557842493057, -0.8891146183013916, -0.03248509019613266, -0.9585912823677063, -0.05550489574...
def cfn _ parameters ( self ) : parameters = copy. deepcopy ( self. parameters ) parameters. update ( self. blueprint. get _ cfn _ parameters ( ) ) return parameters
[ -1.0933146476745605, -0.5097978115081787, 0.3791130781173706, 0.3997522294521332, 0.9296205043792725, -0.13155989348888397, -0.3163090646266937, 0.10713838040828705, -0.4673854410648346, 0.15467365086078644, -0.4108465313911438, 0.07568922638893127, -0.7182939052581787, 0.5501343607902527,...
def get _ translation _ entries _ per _ locale ( self ) : result = [ ] for locale _ code, locale _ name in settings. languages : # @ unusedvariable try : transl = self. translations. filter ( locale = locale _ code ). defer ('text'). latest ('timestamp') except cmstranslation. doesnotexist : transl = none result. appen...
[ -0.05960205942392349, 0.01617906242609024, 0.4541985094547272, -0.3684121370315552, 0.5638073086738586, -0.5888729691505432, -0.45746925473213196, 0.1939782053232193, -0.2352268248796463, 0.5626552700996399, -0.5288369059562683, -0.9454187154769897, 0.23572200536727905, 1.2470742464065552,...
def getdelay ( self, write : bool = false ) : if write : thisdelay = self. writedelay else : thisdelay = self. delay # we're checking for multiple processes if time. time ( ) > self. checktime + self. checkdelay : self. checkmultiplicity ( ) multiplied _ delay = self. mindelay * self. next _ multiplicity if thisdelay <...
[ -0.12390056252479553, -0.014936905354261398, 0.7120440006256104, -0.521176815032959, -0.319413423538208, 0.15107028186321259, 0.8452196717262268, 0.2979734539985657, 0.09329095482826233, -1.2872165441513062, 0.6030540466308594, 0.2256544828414917, -0.9210644364356995, 0.3278636038303375, ...
def deletens ( self, nsid ) : osm _ url = f " https : / / { self. ip } : 9999 / osm / nslcm / v1 / ns _ instances _ content / " \ + nsid while true : headers = {'content - type':'application / yaml ','accept':'application / json ','authorization': f'bearer { self. token } ', } response = requests. delete ( osm _ url, h...
[ -0.41487613320350647, -0.058594975620508194, 0.5577223300933838, 0.02659202367067337, 0.04810752347111702, -0.3601573407649994, -0.9856709241867065, -1.052202820777893, 0.6689562201499939, 0.1055397093296051, -0.530817449092865, 0.9741679430007935, -0.28874051570892334, 0.4880672097206116,...
def create _ compressor ( self, * * kwargs ) : kwargs [ " quiet " ] = true return marshacompressor ( * * kwargs )
[ 0.3054603934288025, -0.08408308029174805, 0.5482561588287354, -0.09612561762332916, -0.13859732449054718, -0.3185397982597351, -0.43906545639038086, -1.1084449291229248, -0.22723878920078278, -0.6576743125915527, -0.5285073518753052, 0.38538309931755066, -1.3772512674331665, 0.810342490673...
def set _ motor _ one ( self, level ) : self. _ set _ motor ( level, self. command _ set _ a _ fwd, self. command _ set _ a _ rev )
[ -1.0019896030426025, -0.35740557312965393, 0.3483118712902069, -0.3663161098957062, 0.8771102428436279, -0.42691439390182495, 1.0189223289489746, 0.19437339901924133, -0.4555037319660187, -0.8770555853843689, 0.07180777192115784, 0.9125469923019409, -0.7141658067703247, 1.1806713342666626,...
def pyramid ( n ) : result = [ ] if n is none or n = = 0 : return result for n in range ( 1, n + 1 ) : result. append ( [ 1 ] * n ) return result
[ -1.3267053365707397, 1.4756147861480713, 0.32243460416793823, 1.1052595376968384, 0.4257582724094391, -1.2276978492736816, 1.0517466068267822, 0.12664705514907837, 1.1258586645126343, -0.2565910518169403, -1.579481840133667, -0.23546718060970306, -0.7039135694503784, 0.981892466545105, 0...
def sample ( self, num _ items : int, * * kwargs ) - > optional [ samplebatchtype ] : # if we don't have any samples yet in this buffer, return none. if len ( self ) = = 0 : return none idxes = [ random. randint ( 0, len ( self ) - 1 ) for _ in range ( num _ items ) ] sample = self. _ encode _ sample ( idxes ) # update...
[ 0.3379613757133484, -0.05896404758095741, 0.5741075873374939, 0.3006753921508789, -0.044309817254543304, -0.6204686164855957, -0.5405277013778687, -1.0100587606430054, 0.9608243703842163, -0.7604901790618896, -0.561046838760376, 0.01578281819820404, -0.8051652908325195, -0.2554313838481903...
def substitute _ entry ( dict _ list, new _ entry, criteria, allowed _ addition = false ) : entry _ exists = len ( [ x for x in dict _ list if x [ criteria ] = = new _ entry [ criteria ] ] ) > 0 print ('entry exists ', entry _ exists,'allowed addition ', allowed _ addition ) if allowed _ addition and not entry _ exists...
[ 0.10517677664756775, -0.661638081073761, 0.5344862341880798, 0.2416767179965973, 0.08238120377063751, 0.44688114523887634, -1.0623462200164795, 0.7299112677574158, 0.5250530242919922, 0.893357515335083, 0.6416819095611572, 0.7287862300872803, 0.11756075173616409, 0.5184739828109741, 0.01...
def prepare _ ucf _ and _ kinetics ( opt, spatial _ transform, temporal _ transform, target _ transform ) : combined _ dataset = ucf _ with _ kinetics ( opt. l _ vids _ path, opt. l _ annotation _ path, opt. ul _ vids _ path, opt. ul _ annotation _ path,'training ', 1, spatial _ transform = spatial _ transform, tempora...
[ 0.25129514932632446, -0.3203638792037964, 0.3215583860874176, -0.3454103171825409, 0.5106989145278931, 0.0342210978269577, 0.21851441264152527, 1.1729103326797485, 0.01783810742199421, -0.13758596777915955, 0.4739822745323181, 0.49202102422714233, 0.43330201506614685, -1.2621476650238037, ...
def process _ bit _ mem _ address _ part2 ( mask, address _ bit ) : idx, mask _ arr = process _ mask ( mask ) idx0, idx1, idxx = idx # apply basic mask # address _ bit = relabel _ bit ( address _ bit, idx0, mask _ arr [ idx0 ] ) address _ bit = relabel _ bit ( address _ bit, idx1, mask _ arr [ idx1 ] ) # apply floating...
[ -0.495883047580719, -0.8875575065612793, 0.6896029114723206, 0.30983492732048035, 0.04359476640820503, -0.7257795929908752, 0.4148661494255066, -0.6424720883369446, 0.8997313380241394, 0.5853728652000427, 0.17601215839385986, 0.8859072923660278, 0.0011881727259606123, 0.04442319646477699, ...
async def test _ form _ invalid _ auth ( hass, smarttub _ api ) : result = await hass. config _ entries. flow. async _ init ( domain, context = { " source " : config _ entries. source _ user } ) smarttub _ api. login. side _ effect = loginfailed result2 = await hass. config _ entries. flow. async _ configure ( result [...
[ -0.5867087841033936, 0.4059123396873474, 0.332680344581604, 0.39464491605758667, 0.3212451636791229, 0.1079343929886818, -0.30997008085250854, 0.32845330238342285, 0.6981703639030457, -1.0274971723556519, -0.483856737613678, 0.40649423003196716, 0.3586632013320923, 0.307896226644516, 1.3...
def update _ v ( v _ current _ l, a _ current _ l, a _ new, dt _ l ) : v _ new = v _ current _ l + 0. 5 * ( a _ current _ l + a _ new ) * dt _ l return v _ new
[ -0.08152074366807938, -1.1250110864639282, 0.4061536490917206, -0.24434830248355865, -0.7463017106056213, -0.08255771547555923, -0.017552504315972328, 0.03930874541401863, -0.2354886382818222, 0.775771975517273, 0.216648131608963, 0.844886839389801, 0.5664295554161072, 0.001584482379257679...
def addangularvelocity ( self, yaw, pitch, roll ) : self. angularvelocity + = vector3 ( yaw, pitch, roll )
[ 0.2511751055717468, -0.006259098649024963, 0.44320690631866455, -0.020969059318304062, 0.758776068687439, 1.2855442762374878, -0.5486276149749756, -0.42750173807144165, 0.32269975543022156, -0.30866697430610657, -0.4800572991371155, 0.3701096177101135, 0.3981071412563324, -0.06881199777126...
def mat _ to _ xyz ( foci, mat _ dims = none, xyz _ dims = none ) : foci = np. hstack ( ( foci, np. ones ( ( foci. shape [ 0 ], 1 ) ) ) ) mat = np. array ( [ [ - 2, 0, 0, 90 ], [ 0, 2, 0, - 126 ], [ 0, 0, 2, - 72 ] ] ). t result = np. dot ( foci, mat ) [ :, : : - 1 ] # multiply and reverse column order return np. round...
[ 0.03551055118441582, -0.5022715330123901, 0.5243338942527771, -0.2555265724658966, -0.09245802462100983, -0.729340672492981, 0.7941441535949707, -0.25145193934440613, 0.04159950464963913, 0.9729365706443787, -0.1903703361749649, -0.3850901424884796, 0.46744176745414734, -0.6206449270248413...
def glorot ( shape, name = none ) : init _ range = np. sqrt ( 6. 0 / ( shape [ 0 ] + shape [ 1 ] ) ) # initial = tf. random _ uniform ( shape, minval = - init _ range, maxval = init _ range, dtype = tf. float32 ) # return tf. variable ( initial, name = name ) # init = torch. doubletensor ( shape [ 0 ], shape [ 1 ] ). u...
[ 0.37876251339912415, -0.3856981694698334, 0.6139657497406006, -1.3099766969680786, -0.19037771224975586, 0.3194843828678131, 0.03607266768813133, -1.1258150339126587, -0.18227463960647583, 0.5672017335891724, -1.2766640186309814, 0.5792653560638428, 0.5173917412757874, -0.9790793061256409,...
def check _ header ( file, location, header ) : file. seek ( location ) sig = file. read ( 8 ) return int ( codecs. encode ( sig,'hex'), 16 ) = = header
[ 0.3988158106803894, -0.5947569012641907, 0.32942482829093933, 0.3291947841644287, -0.16988644003868103, 0.31892117857933044, -1.1618751287460327, 0.24868807196617126, -0.5366430878639221, 0.2634677588939667, -0.7826611399650574, -0.022429196164011955, -0.31529709696769714, -0.7335534691810...
def pick _ wm _ 2 ( probability _ maps ) : import sys import os if ( isinstance ( probability _ maps, list ) ) : if ( len ( probability _ maps ) = = 1 ) : probability _ maps = probability _ maps [ 0 ] for file in probability _ maps : print file if file. endswith ( " seg _ 2. nii. gz " ) : return file return none
[ -0.10980716347694397, -1.6274948120117188, 0.7381517291069031, 0.9525224566459656, 0.23657001554965973, -0.15722285211086273, 0.6049529910087585, -0.5780566334724426, -0.6915669441223145, -0.24271583557128906, 1.0660226345062256, -0.4381771981716156, -1.2506829500198364, 0.2063968032598495...
def _ get _ storage ( self, storage _ uri = none ) : try : # use a lock since this storage object will be requested by thread pool threads, so we need to make sure # any singleton initialization will occur only once self. _ storage _ lock. acquire ( ) storage _ uri = storage _ uri or self. _ storage _ uri return storag...
[ -0.3717515170574188, 0.13277611136436462, 0.43599972128868103, 0.6283623576164246, 0.7710909247398376, -0.9438571929931641, 0.647734522819519, -1.1902650594711304, -0.27792078256607056, -0.9491269588470459, 0.8547263741493225, -0.31917673349380493, -0.7426929473876953, -0.2627086341381073,...
def voltage ( self, value ) : # verify that the voltage to be set is within span if value < = self. span _ limits [ 0 ] or value > = self. span _ limits [ 1 ] : raise valueerror ( " voltage { 0 } is out of the allowed span { 1 }. ( note : span excludes end points ) ". format ( value, self. span _ limits ) ) # verify th...
[ -0.4343051612377167, -0.20427186787128448, 0.38352134823799133, 0.08753706514835358, -0.08735570311546326, 0.369426965713501, 0.8572052121162415, -0.7489821314811707, 0.5166630148887634, -0.5635679364204407, 0.3323434591293335, 0.8130888938903809, -0.5802717804908752, 0.32151660323143005, ...
def existing _ transaction ( self, address ) : for transaction in self. transaction _ map. values ( ) : if transaction. input. get ('address') = = address : return transaction
[ 0.3276970684528351, -0.6529136896133423, 0.5382846593856812, -0.7701878547668457, -0.10536883771419525, -0.5743974447250366, -0.1190522164106369, -0.15211060643196106, 0.6003798246383667, 0.9027609825134277, 0.11002471297979355, 0.4690984785556793, 0.0831742212176323, -0.08130168914794922,...
def build ( self, vtkpolydata, vtkdataarray ) :...
[ -0.25818899273872375, -1.5214107036590576, 0.29711154103279114, 0.33087801933288574, 0.03376644849777222, 0.7273050546646118, -0.11370033770799637, -0.2687608003616333, 0.5974894165992737, 0.12222138047218323, 0.038737211376428604, 0.3424623906612396, -0.29823046922683716, -0.9515987038612...
def _ handlelargetext ( self, data : str ) - > str : if len ( data ) < = 2048 : return data return typeclozehander. re _ remaining _ text. sub ( r'\ 1 ', data, re. dotall ) # apply it again
[ 0.21124571561813354, 0.1624339371919632, 0.4580047130584717, -0.22533181309700012, -0.759334146976471, -0.6391360759735107, -0.7044100165367126, 0.8193597793579102, 1.4572230577468872, 0.14368872344493866, -0.4994008541107178, -0.6791790723800659, -1.2266429662704468, -0.06571736931800842,...
def _ _ init _ _ ( self, apps ) : try : apps = list ( apps. items ( ) ) except attributeerror : pass # sort the apps by len ( path ), descending def by _ path _ len ( app ) : return len ( app [ 0 ] ) apps. sort ( key = by _ path _ len, reverse = true ) # the path _ prefix strings must start, but not end, with a slash. ...
[ -0.17534978687763214, 0.20905527472496033, 0.38513654470443726, 0.7816509008407593, -0.15251046419143677, -0.05715455114841461, -0.01868581399321556, 0.26836830377578735, 0.472464919090271, 0.23157566785812378, 0.21907702088356018, -0.7984017133712769, 0.27794960141181946, 0.44597214460372...
def get _ media _ requests ( self, item, info ) : return [ request ( self. _ prefix _ url _ scheme ( x ), meta = {'fallback _ url': self. _ prefix _ url _ scheme ( item. get ('ffffound _ img _ url') ) } ) for x in item. get ( self. images _ urls _ field, [ ] ) ]
[ -0.7807387709617615, -0.10093016177415848, 0.29375842213630676, 0.8713234663009644, 1.1896827220916748, -1.0860881805419922, -0.5537960529327393, -0.4680899679660797, 0.700735867023468, 0.12408820539712906, 0.059028510004282, -0.047669075429439545, 0.5891991853713989, 0.8082138895988464, ...
def status ( ) : if production : print " run'/ etc / init. d / rabbitmq - server status'to check status " else : # bug rabbit _ mqenv not defined local ( " sudo { rabbitmqctl } status ". format ( * * rabbit _ env ) )
[ -0.45912790298461914, -1.4244344234466553, 0.5050948858261108, 0.4740259647369385, 0.050705686211586, 1.0396255254745483, -0.7486254572868347, 1.102568507194519, -0.16505631804466248, 0.3265504837036133, -0.9329782128334045, 1.825939655303955, -0.404416024684906, 1.0902211666107178, -0.1...
def _ _ eq _ _ ( self, other ) : if not isinstance ( other, policiesperipheralsdeviceredirectionprinterredirectionoptions ) : return false return self. _ _ dict _ _ = = other. _ _ dict _ _
[ -0.31679654121398926, -0.15396399796009064, 0.3726617991924286, -0.8526976108551025, 0.15195006132125854, 1.2787549495697021, 0.3250206410884857, -0.6335783004760742, 1.9602056741714478, -0.28733474016189575, -0.2721152901649475, -0.18944816291332245, -0.5444684624671936, -0.31164294481277...
def setpinkslips ( self, pinkslips ) : distributedtoon. distributedtoon. setpinkslips ( self, pinkslips ) self. inventory. updatetotalpropstext ( )
[ -1.2658590078353882, -0.5335074067115784, 0.25835248827934265, -0.21908731758594513, -0.4212418496608734, 1.0504156351089478, -0.6062220931053162, -0.29925212264060974, 0.8299362659454346, -0.44870054721832275, -1.51726233959198, -0.6309788823127747, 0.4412607252597809, 0.00791608262807130...
def pop ( self ) : if self. _ size > 0 : no = self. top self. top = self. top. next self. _ size = self. _ size - 1 return no. valor raise indexerror ( " the stack is empty! " )
[ -0.4128115475177765, 1.0575934648513794, 0.9085043668746948, 0.3700525164604187, -0.6857214570045471, -0.20122531056404114, 0.5976629257202148, -0.4032551944255829, -0.5021923184394836, 0.40451744198799133, -0.49332863092422485, -0.3404001295566559, -0.8017091751098633, -0.1905199736356735...
def filterstories ( stories, trigger ) : trigger = str ( trigger ) trigger = trigger. lower ( ) filteredstories = [ ] c = 0 for s in stories : try : titlelow = s. title. lower ( ) subjectlow = s. subject. lower ( ) summarylow = s. summary. lower ( ) if trigger in titlelow or trigger in subjectlow or trigger in summaryl...
[ -0.03283366188406944, -0.5268121361732483, 0.4775897264480591, 0.2569373846054077, -0.09875062108039856, 0.2109987586736679, 0.07820555567741394, 0.22601355612277985, -0.09530879557132721, -0.39245766401290894, 0.24235175549983978, 0.4029700458049774, -0.09561210125684738, 0.08265820145606...
def _ _ init _ _ ( self, x0, mu, sig ) : self. b = lambda x, t : mu * x # drift term, a function b ( x, t ) self. sigma = lambda x, t : sig * x # diffusion term, a function sigma ( x, t ) self. dsigma = lambda x, t : sig # deriv of diffsn term, a function sigma'( x, t ) self. soln = ( lambda x0, dt, dw : x0 * np. exp (...
[ 0.6733174324035645, 0.03440913185477257, 0.5374255776405334, 0.9737412333488464, 0.16619858145713806, -0.14268508553504944, 0.2922991216182709, 0.2357715219259262, 0.3434843122959137, -0.0005915573565289378, -0.4457828998565674, 0.4822385311126709, 0.5040582418441772, 0.5357977747917175, ...
def is _ on ( self ) - > bool : return self. state = = state _ on
[ -0.008654773235321045, -0.6146673560142517, 0.29629695415496826, 1.0690699815750122, 0.27488046884536743, -0.2502553462982178, -1.3115984201431274, 0.49239498376846313, 0.7699577808380127, 0.14656884968280792, -0.7468014359474182, 0.5132898688316345, -0.529387891292572, -0.3147360384464264...
def set _ hist _ fire _ seasons _ firms ( self, df _ firms, centr _ res _ factor = 1. 0, centroids = none, hemisphere = none, year _ start = none, year _ end = none, keep _ all _ fires = false ) : logger. info ('setting up historical fires for year set.') self. clear ( ) # read and initialize data df _ firms = self. _ ...
[ -0.14569415152072906, -0.0024265111424028873, 0.6763267517089844, 0.3663589656352997, 0.4027441740036011, -0.2593470513820648, 0.41057297587394714, 0.3685958683490753, -0.0014858675422146916, 0.012684764340519905, -0.6960003972053528, 0.40221187472343445, -0.05971158295869827, 0.5835077166...
def test _ f _ transform _ and _ inverse ( self ) : cells, _, _ = data _ utils. load _ cells ( ) curve = cells [ 0 ] metric = self. elastic _ metric f = metric. f _ transform ( curve ) f _ inverse = metric. f _ transform _ inverse ( f, curve [ 0 ] ) result = f. shape expected = ( curve. shape [ 0 ] - 1, 2 ) self. asser...
[ 0.0016097638290375471, 0.0680512860417366, 0.5508926510810852, 0.13165532052516937, 1.0179227590560913, 0.013607618398964405, 0.35587987303733826, 0.1835690587759018, -1.0090824365615845, -0.39338862895965576, -0.8025473952293396, -0.01921824924647808, 0.34767788648605347, -0.9300365447998...
def _ _ mul _ _ ( self, other ) : if self. source! = other. dest : raise valueerror ( " destination frame of first rotation { } is not the same as source frame of second rotation { }. ". format ( other. dest, self. source ) ) if isinstance ( other, constantrotation ) : new _ rot = self. _ rot * other. _ rot return cons...
[ -0.8809036612510681, 0.7858971357345581, 0.9716534614562988, 0.04769334942102432, -0.4574677348136902, -0.04714241996407509, 0.4495146870613098, -0.9487131834030151, 0.7829174399375916, 0.3818010687828064, -0.5120002627372742, -0.4054214060306549, -0.13874466717243195, -0.5295141339302063,...
def test _ microvm _ boottime _ no _ network ( test _ microvm _ with _ boottime ) : boottime _ us = _ test _ microvm _ boottime ( test _ microvm _ with _ boottime, none ) print ( " boot time with no network is : " + str ( boottime _ us ) + " us " )
[ 0.3498038649559021, 0.24026396870613098, 0.4121409058570862, 1.251342535018921, -0.32868054509162903, 0.07305851578712463, 0.03309670463204384, -0.9505870342254639, -0.24428504705429077, -0.9208536148071289, -0.49058589339256287, -0.03923292085528374, -0.8470775485038757, 1.186706066131591...
def test _ readback _ mode _ off ( self ) : receiver = streamingbodyreceiver ( readback = false ) d = deferred ( ) receiver. finished = d receiver. content _ length = 5 fd = receiver. _ fd receiver. datareceived ('hello') why = failure ( responsedone ('done') ) receiver. connectionlost ( why ) self. assertidentical ( d...
[ -0.21439076960086823, -0.0673278197646141, 0.625146210193634, -0.64481520652771, 0.13282501697540283, 1.0156784057617188, 0.07771888375282288, -0.6832318902015686, -0.012609765864908695, -1.1123713254928589, -0.413840115070343, -0.1268194317817688, -0.9239526391029358, 0.6005942821502686, ...
def uuid _ to _ source ( uuid ) : return os. path. join ( image _ path, uuid )
[ -0.7450891733169556, -0.5028173923492432, 0.35621076822280884, -1.118221640586853, -0.5125194191932678, -0.08082862943410873, 0.9979797601699829, 1.0178300142288208, 0.44036561250686646, 0.3217119872570038, -0.2027283012866974, 0.1274871975183487, 0.08262722194194794, -0.5121431350708008, ...
def remove _ node _ modules ( self ) : for filename in [ " package - lock. json ", " yarn. lock " ] : if os. path. exists ( base _ path ( filename ) ) : os. remove ( filename ) shutil. rmtree ( base _ path ( " node _ modules " ), ignore _ errors = true )
[ -0.15502069890499115, -0.3182944357395172, 0.4871959090232849, -0.5892686247825623, 1.0655289888381958, 0.21280434727668762, 0.3121522068977356, -0.6073116660118103, -0.3614102005958557, 0.39231669902801514, -0.16244329512119293, -0.3721691071987152, -0.05581958591938019, 0.413134425878524...
def _ log _ iteration _ status ( * * kwargs ) : for key, value in kwargs. items ( ) : logging. info ( " % s = % s " % ( key, value ) )
[ -0.9202245473861694, -0.48917049169540405, 0.45815783739089966, -0.6237626075744629, -0.4730070233345032, 0.3484705984592438, -1.1685079336166382, -0.2895476222038269, -1.4375076293945312, 0.9989786744117737, -0.4363301396369934, 0.15209585428237915, 0.3738081455230713, 1.2131717205047607,...
def compute _ ne _ star _ top ( u _ star, g, use _ movement _ constraints = true, * * solver _ args ) : u = np. vstack ( u _ star ) z = cp. variable ( len ( u _ star ) ) z _ vec = cp. variable ( len ( u ) ) w = cp. variable ( ) x _ cat = cp. variable ( len ( u ) ) y _ joint = cp. variable ( u. shape [ 1 ] ) constraints...
[ -0.901566207408905, -0.1397959440946579, 1.0372132062911987, 0.18417182564735413, -0.8469430804252625, -0.21124857664108276, 0.4649578034877777, 0.6322325468063354, 0.08201770484447479, 1.1100475788116455, -0.17295798659324646, 0.11863952875137329, -0.023782437667250633, 0.5655345320701599...
def add _ system _ from _ fasta ( self, fasta ) : base = os. path. abspath ( fasta ). split ( '.') [ 0 ] mol _ id = base. split ('/') [ - 1 ] oemol = oechem. oemol ( ) ifs = oechem. oemolistream ( fasta ) # after a lot of working on a single example # this seems to be the right combination # of calls to get an oemol fr...
[ 0.05365478992462158, -0.6609482169151306, 0.843676745891571, -0.16634556651115417, 0.4359806478023529, 0.07733461260795593, 0.10863778740167618, -0.13389664888381958, 1.6060479879379272, -0.27084100246429443, 0.28249794244766235, -0.3143308758735657, -0.11951028555631638, 0.327435553073883...
def test _ _ _ init _ _ ( image _ config : imageconfig, image _ config _ signed : imageconfig ) : assert image _ config assert image _ config _ signed
[ -0.14553241431713104, -0.4898209869861603, 0.3209671974182129, 0.804627001285553, -0.15799997746944427, 0.3074706494808197, -0.11974041163921356, 0.287884920835495, 0.6753135919570923, 0.3971765339374542, -0.681667149066925, -0.13160856068134308, 0.4188309609889984, 1.0248464345932007, 1...
def job _ kick _ if _ inactive ( self, bot : bot, job : job ) : with self. db _ session ( ) as session : user _ id = job. context quizpass = get _ active _ quizpass ( session, user _ id ) if not quizpass : self. logger. info ( " user ( id = % s ) was kicked for not starting the quiz ", user _ id ) bot. kick _ chat _ me...
[ 0.34827160835266113, -0.7998449206352234, 0.20076803863048553, 0.46553075313568115, -0.8424136638641357, 0.17345651984214783, 0.16848115622997284, 0.05349578335881233, -0.27924293279647827, 0.1867717206478119, -0.5618523359298706, -0.18120594322681427, -1.415137529373169, 0.012929097749292...
def test _ check _ input _ castlandmap ( ) : chmap, landmap, bv, tw, dim0 = mob. check _ inputs ( chmask, basevalues _ idx = [ 0 ], window _ idx = 1, landmap = landmask [ 0 ]. mask [ :, : ] ) assert np. shape ( chmap ) = = np. shape ( landmap )
[ -0.19776789844036102, -0.9247446656227112, 0.3734455108642578, 0.5912520885467529, 0.5732668042182922, 1.4413341283798218, 0.578324019908905, -0.6827402710914612, 0.2620374262332916, -0.43521419167518616, 0.00024111817765515298, 0.857936680316925, -0.8036916851997375, 0.6487687230110168, ...
def fit _ transform ( self, x, y = none, * * fit _ params ) : xt = check _ array ( x, ensure _ 2d = false ) validate _ params ( self. get _ params ( ), self. _ hyperparameters ) if xt. ndim = = 2 : _ check _ has _ one _ column ( xt ) else : xt = xt [ :, none ] xt = self. _ fit _ transform ( xt ) xt = _ remove _ empty _...
[ -0.20324309170246124, -0.01836310885846615, 0.5302526354789734, 1.0689855813980103, 0.016755834221839905, -0.11958297342061996, -0.28409266471862793, -0.7652919888496399, 0.07416566461324692, -0.21008512377738953, -0.9372701048851013, 0.9141413569450378, 0.039148349314928055, -0.3894026279...
def _ wikilink _ parse ( text ) : subs = _ links. split ( text ) return [ _ pipes. split ( s ) [ - 1 ] for s in subs ]
[ -0.9788391590118408, -0.6522037982940674, 0.6816856861114502, -0.2239833027124405, 0.5805755257606506, -0.6874923706054688, -0.36066940426826477, 1.87052321434021, -0.3055066466331482, -0.09796186536550522, -0.34437671303749084, 0.28918540477752686, -1.1021108627319336, -0.2411666065454483...
def new ( * args, * * kargs ) : obj = itkimageserieswriteriul3iul2. _ _ new _ orig _ _ ( ) import itktemplate itktemplate. new ( obj, * args, * * kargs ) return obj
[ -0.24384945631027222, -0.329941987991333, 0.17789749801158905, 0.020614244043827057, -0.5570449829101562, 0.14889664947986603, -0.5868673920631409, 0.27845942974090576, -0.3737497329711914, 0.5476380586624146, -0.5085484981536865, 0.44692733883857727, 1.0300921201705933, -1.021577596664428...
def get _ layer _ fields ( self, layer _ name ) : layer _ path = os. path. join ( self. path, layer _ name ) return ordereddict ( [ ( f. name, f ) for f in arcpy. listfields ( layer _ path ) ] )
[ -0.43689587712287903, -0.441771537065506, 0.3751743733882904, -1.317221999168396, -0.6875177025794983, -0.32097548246383667, -0.1154017522931099, -0.5858519077301025, -0.3254103660583496, -0.15985338389873505, -1.593719244003296, -0.36456117033958435, 0.0875602588057518, -0.134451717138290...
def temp _ encoded _ video ( num _ frames : int, fps : int, height = 10, width = 10, prefix = none ) : # lossless options. video _ codec = " libx264rgb " options = { " crf " : " 0 " } data = create _ dummy _ video _ frames ( num _ frames, height, width ) with tempfile. namedtemporaryfile ( prefix = prefix, suffix = ". ...
[ 0.8828136920928955, -0.22327060997486115, 0.5040175318717957, 0.2830904424190521, 0.03487194702029228, -1.1165162324905396, 0.043336402624845505, -0.5863135457038879, 0.7089420557022095, -0.15222786366939545, -1.0163264274597168, 0.3215772807598114, 0.27392253279685974, 0.44659608602523804...
def check _ if _ file _ is _ empty ( in _ file ) : import nibabel as nb import numpy as np nii = nb. load ( in _ file ) data = nii. get _ data ( ) if data. size = = 0 or np. all ( data = = 0 ) or np. all ( data = = np. nan ) : raise valueerror ('file % s is empty. use a lower threshold or turn off regressors'% ( in _ f...
[ 0.8220028877258301, -0.08203701674938202, 0.4218226373195648, 0.09472187608480453, 0.9209681749343872, 0.42369401454925537, -0.06433473527431488, 0.05607166141271591, -0.8439561724662781, 0.2536202669143677, 0.45729130506515503, 0.0998971089720726, -0.3007237911224365, 0.3914930820465088, ...
def created _ time ( self ) - > optional [ str ] : return pulumi. get ( self, " created _ time " )
[ 1.287079095840454, 0.10403472930192947, 0.352389931678772, 0.5019747614860535, 1.8558186292648315, 1.231903076171875, -0.7506310343742371, -0.5635002255439758, 0.11803507804870605, 0.057911500334739685, -0.12744548916816711, 0.43213337659835815, 0.5433894395828247, -0.7810656428337097, -...
def update ( self ) - > none : src = self. _ section. polygon section _ width = self. _ section _ width section _ height = self. _ section _ height self. _ pixels _ per _ unit = self. _ base _ width / section _ width self. _ units _ per _ pixel = 1. 0 / self. _ pixels _ per _ unit dst = np. array ( [ [ section _ width ...
[ 0.04505079239606857, -0.8969253301620483, 0.48808395862579346, -0.5005578994750977, -0.7392174601554871, -0.0684710144996643, -0.11587231606245041, -0.6015810966491699, 0.09169892221689224, 0.6662378311157227, -0.0810619443655014, 0.2713538110256195, 0.7823426127433777, -0.0404247976839542...
def clear _ cache ( self ) : # pragma : no cover # overwite with an empty dictionary with open ( self. cachefile, " wb " ) as f : pkl. dump ( { }, f ) return
[ -0.22123762965202332, -0.18585829436779022, 0.3311774730682373, 0.009202861227095127, -0.19368934631347656, 0.8702564835548401, 0.031670380383729935, 0.4107338488101959, -0.5861842036247253, 0.34490764141082764, -0.25268614292144775, -0.18031956255435944, 0.34221601486206055, 0.27407488226...
def sample ( preds, temperature = 1. 0 ) : preds = np. asarray ( preds ). astype ('float64') preds = np. log ( preds ) / temperature exp _ preds = np. exp ( preds ) preds = exp _ preds / np. sum ( exp _ preds ) idx = np. random. choice ( range ( vocab _ size ), p = preds ) return idx
[ -0.4716372787952423, -0.5421966314315796, 0.6452544927597046, -0.6168442964553833, -1.3001774549484253, 0.18469597399234772, 0.027706414461135864, 0.444734126329422, 0.4599984288215637, 0.5985196232795715, 0.771589457988739, 0.6875736713409424, -0.3547683358192444, -0.08680112659931183, ...
def _ _ contextmenucloseothers ( self ) : index = self. contextmenuindex for i in ( list ( range ( self. count ( ) - 1, index, - 1 ) ) + list ( range ( index - 1, - 1, - 1 ) ) ) : editor = self. widget ( i ). geteditor ( ) self. vm. closeeditorwindow ( editor )
[ -1.2144309282302856, -0.20679055154323578, 0.7931560277938843, -0.36309948563575745, 0.27694791555404663, 0.03644580766558647, 0.8539546132087708, -0.15218566358089447, -0.6410044431686401, 0.27469050884246826, 0.8203535079956055, -0.2886756658554077, -0.9853606224060059, 0.446864366531372...
def add _ parts ( self, dom, design ) : for ci in design. component _ instances : dom. part. append ( self. make _ part ( ci ) )
[ -0.10201770067214966, 0.7539182901382446, 0.34391242265701294, -0.44801124930381775, 0.5694366097450256, 1.0748604536056519, -0.8551979064941406, -0.11090075224637985, 0.5494869351387024, -0.918424129486084, 0.33331498503685, -0.000848686380777508, 0.1614750325679779, 0.1272045075893402, ...
def fromtifffile ( cls, path, channel _ names : sequence [ str ], from _ frame : int = 0, to _ frame : int = 999999, n _ channels : int = 1, ) - > sequence _ t : # # channel name = ='_ _ _'= > discarded # instance = cls ( ) for name in channel _ names : if name! = " _ _ _ " : name = name. upper ( ) instance. frames [ n...
[ -0.24233265221118927, -0.7254132628440857, 0.9303814172744751, -0.6936511397361755, -0.8574579954147339, -0.7940140962600708, -0.20437748730182648, -0.43389734625816345, -0.491737961769104, 0.45800161361694336, -0.25086313486099243, -0.3133479952812195, -0.08368165045976639, -0.00798793230...
def make _ prediction ( text ) : file _ path = os. path. abspath ( _ _ file _ _ ) package _ dir = os. path. dirname ( os. path. dirname ( file _ path ) ) path = os. path. join ( package _ dir, " models ", " sgdclassifier _ adv. pickle " ) model = load _ model ( path ) temp _ df = pd. dataframe ( [ text ], columns = ['q...
[ 0.03848863020539284, -0.20792299509048462, 0.5008980631828308, -0.0902196541428566, -1.017440915107727, 0.5371048450469971, 0.13069118559360504, 0.14394216239452362, -0.5026252269744873, 0.49332281947135925, -0.2124049961566925, -0.13578665256500244, -0.06367243826389313, -0.63429224491119...
def py _ to _ any ( self, a, val, t ) : cyt = self. possibly _ shared _ cython _ type ( t ) cpp = self. var _ to _ cpp ( val, t ) rtn ='{ a }. assign [ { cyt } ] ( { cpp } ) '. format ( a = a, cyt = cyt, cpp = cpp ) return rtn
[ -0.19410470128059387, -0.8863534331321716, 0.44012346863746643, -0.7532603740692139, 0.709974467754364, -0.6977498531341553, -0.010542529635131359, -0.6084712147712708, -0.2990878224372864, 0.8524160385131836, 0.4189797341823578, 0.6769878268241882, 0.5857395529747009, 0.6290380358695984, ...
def master _ audit ( masters, output, opts ) : # return value. will be set to 1 the first time we see an error. ret = 0 # look for masters using the wrong ports for their port types. bad _ port _ masters = [ ] for master in masters : for port _ type, port _ range in port _ range _ map. iteritems ( ) : if not port _ ran...
[ -0.18603336811065674, -0.529466986656189, 0.8951306939125061, -0.4070795178413391, 0.13381753861904144, -0.3255622982978821, 1.1088577508926392, 0.6796325445175171, 0.502178966999054, 0.2675573527812958, 0.07924723625183105, 0.7200234532356262, -0.23927929997444153, 0.7036073803901672, 0...
def get _ value ( self ) - > int : reg _ val = int. from _ bytes ( self. parent. get _ value ( ), " big " ) value = reg _ val > > self. offset mask = ( ( 1 < < self. width ) - 1 ) value = value & mask return value
[ -0.27400636672973633, 0.6634641289710999, 0.6549372673034668, -0.19898706674575806, -0.18562233448028564, -0.09184053540229797, 1.0689350366592407, -0.33083122968673706, 0.20566460490226746, -0.42334190011024475, -0.05956057459115982, 0.9818781018257141, 0.037893980741500854, 0.09730299562...
def plot _ confusion _ matrix ( cm, classes, normalize = false, title ='confusion matrix ', cmap = plt. cm. greys ) : if normalize : cm = cm. astype ('float') / cm. sum ( axis = 1 ) [ :, np. newaxis ] # print ( " normalized confusion matrix " ) else : print ('confusion matrix, without normalization') cm1 = cm. astype (...
[ -0.07072048634290695, 0.24787944555282593, 1.0416231155395508, 0.5768380165100098, -0.6289257407188416, -0.2830636501312256, 1.4908461570739746, -0.4626343250274658, 0.8590236306190491, 0.49658623337745667, 0.4460527300834656, 0.6408650279045105, -0.4293249249458313, 0.4237523078918457, ...
def get _ work _ backlog ( self, path _ to _ backlog _ csv _ file, scraping _ results _ path = " fullsearchresult. csv " ) : if not ( path _ to _ backlog _ csv _ file ) or not ( os. path. isfile ( path _ to _ backlog _ csv _ file ) ) : scraping _ result _ path = os. path. join ( self. cwd, scraping _ results _ path ) p...
[ -0.5578345656394958, -0.0026684554759413004, 0.7196492552757263, 0.10496468842029572, 0.13147476315498352, 0.0030077053233981133, 0.9284189939498901, -0.5784662365913391, -0.7053924202919006, -0.06584091484546661, -0.031196577474474907, 0.1082773208618164, -0.5534610748291016, -0.947874784...
def _ datetime _ to _ python ( self, v, dsc = none ) : pv = none try : ( sd, st ) = v. split ('' ) if len ( st ) > 8 : ( hms, fs ) = st. split ( '.') fs = int ( fs. ljust ( 6,'0') ) else : hms = st fs = 0 dt = [ int ( v ) for v in sd. split ('-') ] + \ [ int ( v ) for v in hms. split (':') ] + [ fs, ] pv = datetime. da...
[ -0.47575318813323975, 0.0797058567404747, 0.7101042866706848, -0.760506808757782, -0.42137110233306885, -0.6551785469055176, -0.8451831936836243, -0.004238561727106571, 0.46943724155426025, 0.6821606159210205, -0.49508094787597656, 0.4739533066749573, 0.355069637298584, -1.114062786102295,...
def send _ payload ( self, params ) : return urllib. urlopen ( self. service _ url, dumps ( { " jsonrpc " : self. version, " method " : self. service _ name,'params': params,'id': str ( uuid. uuid1 ( ) ) } ) ). read ( )
[ -1.1705142259597778, -0.2260761559009552, 0.691962718963623, -0.6749658584594727, 0.05880727991461754, 0.15371569991111755, -0.9872129559516907, -0.9096462726593018, -0.8456858396530151, 0.8808139562606812, -0.21265889704227448, 0.7013115286827087, -1.202376365661621, 0.36579999327659607, ...
def generate _ key ( message _ ) : length = sum ( len ( line ) for line in message _ ) return [ random. randint ( 0, 93 ) for _ in range ( length ) ]
[ -0.7015231251716614, 0.5010621547698975, 0.40987491607666016, -0.5980563163757324, 0.5833439826965332, 0.38087281584739685, -0.0990535169839859, 0.4519081711769104, -0.2753814160823822, 0.6775891184806824, -0.46797847747802734, -0.0974365845322609, -0.9740030169487, 0.6570005416870117, -...
def build _ discriminator ( self ) : # weight initialization init = randomnormal ( stddev = 0. 02 ) # image input in _ image = input ( shape = self. in _ shape ) # downsample to 14x14 fe = conv2d ( 32, ( 3, 3 ), strides = ( 2, 2 ), padding ='same ', kernel _ initializer = init ) ( in _ image ) fe = leakyrelu ( alpha = ...
[ -0.3302834928035736, -0.4397731125354767, 0.8835724592208862, 0.4849655032157898, -0.04216276481747627, 0.13339772820472717, 0.20744061470031738, 0.7161605358123779, 0.014973278157413006, -0.4276317358016968, -0.046029362827539444, -0.25543832778930664, 0.6068744659423828, 0.58999490737915...
def clear _ gateway ( self ) : self. gateway = none self. sectie. clear _ gateway ( )
[ 0.3703502118587494, -0.5937871932983398, 0.27895691990852356, -0.14801470935344696, -0.5882192850112915, -0.6146054267883301, -0.30462172627449036, -0.4013788402080536, -0.24085485935211182, 0.602119505405426, 0.5373075604438782, 0.9424777626991272, -0.6696012616157532, 1.2611300945281982,...
def open _ evtx ( input _ file ) : with evtx. evtx ( input _ file ) as open _ log : header = open _ log. get _ file _ header ( ) properties = ordereddict ( [ ('major _ version ','file version ( major )'), ('minor _ version ','file version ( minor )'), ('is _ dirty ','file is ditry'), ('is _ full ','file is full'), ('ne...
[ 0.10240332782268524, -0.9481008648872375, 0.7634342908859253, -0.5385555028915405, -0.6714235544204712, 0.47943219542503357, 0.2605106234550476, 0.794269859790802, -0.9980190992355347, -0.3668178915977478, -0.03692999854683876, 0.33188533782958984, 0.3381333351135254, -0.1970987617969513, ...
def get _ project _ samples ( self, sample _ prj ) : self. log. debug ( " retrieving samples subset by sample _ prj'{ }'". format ( sample _ prj ) ) sample _ ids = self. get _ project _ sample _ ids ( sample _ prj ) return [ self. db. get ( x ) for x in sample _ ids ]
[ -0.2352815419435501, 0.41801705956459045, 0.14161938428878784, 0.4637247323989868, 0.0897221639752388, 0.39949578046798706, -0.12448742985725403, 0.041001658886671066, -0.009217562153935432, -0.11368054151535034, 0.19671666622161865, 0.29234716296195984, -0.6276707053184509, 0.161960750818...
def stage ( self ) : return self. _ stage
[ -0.19796115159988403, -0.6777212619781494, 0.30290839076042175, 0.5044481158256531, -0.26291292905807495, 0.7356338500976562, 0.9789657592773438, -0.6087245941162109, 0.0537487268447876, -1.0641608238220215, 0.513933539390564, 0.09712788462638855, -0.24254725873470306, -0.08744556456804276...