text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ post _ github _ redeploy ( self ) : pass
[ -0.2265319526195526, -0.08658105134963989, 0.24691888689994812, 0.6638780832290649, 0.5775086283683777, 0.22098013758659363, 0.5101563930511475, 1.1517950296401978, 0.351081520318985, -0.0002774728636723012, -1.010419249534607, 0.00582505576312542, -0.9175373911857605, 0.4228975474834442, ...
def _ _ init _ _ ( self, lab, cat, a, i, ia = 1 ) : partitionelement. _ _ init _ _ ( self, lab, a, i, ia ) self. _ cats = dict ( ) cs = cat. split (';') for c in cs : d = c. split (':') if len ( d ) = = 2 : self. _ cats [ d [ 0 ] ] = float ( d [ 1 ] )
[ 0.8343015313148499, 0.2731584310531616, 0.49243277311325073, 0.1459852010011673, -0.2073136270046234, -0.09807337075471878, -0.2712846100330353, 0.2548660933971405, -0.827534556388855, -0.5593655109405518, 0.1490202695131302, -0.9234734177589417, 0.2535511553287506, -0.3264535069465637, ...
def test _ escape ( self ) : self. assertraises ( valueerror, escape, b " i am a string type. not a unicode type. " ) self. assertequal ( escape ( " i am a unicode type. " ), " i % 20am % 20a % 20unicode % 20type. " )
[ 0.00862281583249569, 0.46074455976486206, 0.18318501114845276, 0.3972170352935791, 0.5615773797035217, 0.11577915400266647, -0.2933846116065979, -0.34641191363334656, 0.31833189725875854, -0.01972646452486515, -0.665266752243042, 0.1964023858308792, -0.988735556602478, -0.7482654452323914,...
def _ _ repr _ _ ( self ) : return self. urlstr
[ -0.9965222477912903, -1.4647539854049683, 0.30338165163993835, -1.6454975605010986, -0.8724557161331177, 0.937002420425415, -0.03569098189473152, 0.17599421739578247, 0.564018726348877, -0.355798602104187, 0.49227792024612427, 0.7580195069313049, 0.28108981251716614, -0.5831961631774902, ...
def is _ blacklisted ( self, chat _ id ) : self. get _ logger ( ). debug ('checking whether { } is blacklisted '. format ( chat _ id ) ) # todo : getting default params or list params at all doesn't seem to # work in the way i expect at least. if the value is defined as [ ] in yaml, # still returns none here blacklist ...
[ -0.024640293791890144, -0.6791848540306091, 0.6714100241661072, 0.11966812610626221, 0.7876490950584412, -0.8478171825408936, -0.5854406952857971, 0.1399121731519699, 0.5838099122047424, 0.6660799980163574, -0.48678234219551086, 1.1612616777420044, -0.9635745286941528, 1.7627416849136353, ...
def _ _ init _ _ ( self, schedule _ pattern = none ) : if not schedule _ pattern : self. _ pattern = {'freq _ type':'init'} else : self. _ pattern = schedule _ pattern
[ 0.037093643099069595, 0.3926597833633423, 0.5811071991920471, 0.16479086875915527, 0.3246687054634094, 0.1607142984867096, 0.3057657480239868, 0.8164635896682739, 0.3695206940174103, -0.4561850428581238, -0.03499825298786163, 0.09548396617174149, -0.08847587555646896, 0.19191540777683258, ...
def get _ actor _ data ( actor ) : name = raw _ input ( " actor name [ { } ] : ". format ( actor ['name'] ) ) if name : actor ['name'] = name desc = raw _ input ( " actor description [ { } ] : ". format ( actor ['desc'] ) ) if desc : actor ['desc'] = desc while true : exe = raw _ input ( " executable to run actor ( pyt...
[ -1.0350098609924316, -0.7360168695449829, 0.734113335609436, -0.4075203835964203, -0.3699929416179657, 0.32434049248695374, 0.9723287224769592, 0.2617320418357849, 0.3526332378387451, -0.7743164896965027, -0.5637153387069702, 1.491649866104126, 0.09431283175945282, 0.916099488735199, 1.5...
def testresolveenvironmentvariables ( self ) : xml _ string = ('< configuration > < envvar name = " hostname " / >'' < envvar name = " nn " / > < / configuration >') resolved _ conf ='< configuration > foo - hostbar - host < / configuration >'env _ var _ store = {'hostname':'foo - host ','nn':'bar - host'} conf = xml _...
[ -0.33934980630874634, -0.0565173402428627, 0.3546800911426544, -0.23265133798122406, 0.06167464330792427, 0.019448313862085342, -0.47466719150543213, 0.22397078573703766, -0.5515812635421753, -0.3641877770423889, -1.0650311708450317, -0.6844186782836914, 0.11726618558168411, 0.007321021519...
def observed _ values ( individual, num, gene _ to _ cases ) : # construct the table k = len ( individual ) mutated _ patients = set ( patient for gene in individual for patient in gene _ to _ cases [ gene ] ) tbl = [ 0 ] * 2 * * k exclusive, overlap = 0, 0 for patient in mutated _ patients : # determine the binary ind...
[ 0.27974873781204224, 0.3946218490600586, 0.6083126068115234, 0.6216524839401245, -0.6867407560348511, -0.6489099264144897, 0.7708683013916016, 1.0635040998458862, -0.3109268546104431, 0.46978282928466797, -0.33354175090789795, 0.6418123245239258, 1.0930054187774658, 0.2296999990940094, -...
def first _ differential ( self, n _ dim, deg ) : # handle trivial cases if self. page _ dim _ matrix [ 1, deg, n _ dim ] = = 0 : return np. array ( [ ] ) # generate chains for sending to cech _ diff _ and _ lift domain _ chains = local _ chains ( self. nerve _ spx _ number [ n _ dim ] ) # compute array of initial radi...
[ -0.4074746370315552, -0.3401219844818115, 0.7025614976882935, -0.14146199822425842, 0.7236966490745544, 0.21021878719329834, 0.15166138112545013, -0.7013059258460999, -0.5193060040473938, -0.3727447986602783, 0.05809447169303894, 0.6386914253234863, 0.48056790232658386, 0.7339251637458801,...
def _ _ neg _ _ ( self ) : ts = filestoragemanagersingleton. get ( self. _ id ) return smtimeseries ( ts. times ( ), - ts. values ( ) )
[ -0.743861198425293, -0.0027114609256386757, 0.5026184320449829, -0.30429941415786743, -0.2637775242328644, 0.03417610749602318, -1.029817819595337, -0.12343571335077286, 0.3489733040332794, 0.0737677738070488, -0.35643160343170166, 0.49537914991378784, -0.03482409194111824, 0.6941282153129...
def itertimes ( self ) : ts = filestoragemanagersingleton. get ( self. _ id ) return ts. itertimes ( )
[ -0.10866302996873856, 0.15355169773101807, 0.4462551772594452, -0.29503026604652405, 0.44839102029800415, -0.7058513760566711, -0.31170225143432617, -0.3902655243873596, -0.0009126986842602491, 0.6276176571846008, 0.17414402961730957, 0.10588626563549042, 0.10549183934926987, 0.73207122087...
def getprofileimageurl ( self ) : return self. _ profile _ image _ url
[ -0.6246437430381775, 0.08992500603199005, 0.33656835556030273, 1.1907893419265747, 0.18542863428592682, 0.3767208755016327, 0.34565621614456177, 0.5148130059242249, -0.12525051832199097, 0.2698548138141632, -0.24528780579566956, 0.15718664228916168, -0.20115427672863007, 0.1595457941293716...
def test _ list _ decimal _ max _ length _ 3 _ nistxml _ sv _ iv _ list _ decimal _ max _ length _ 4 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - maxlength - 4. xsd ", instance = " nistdata / list / ...
[ -0.2551305294036865, -0.17215579748153687, 0.34859520196914673, 0.5506944060325623, -0.37863433361053467, -0.09455370903015137, -0.853678286075592, 0.25831687450408936, 0.590323269367218, 0.06694629043340683, -1.2786802053451538, -0.5549509525299072, 0.16626666486263275, 0.2247120440006256...
def test _ delete _ comment ( self ) : self. login ( ) data = {'comment _ id': self. text _ entry. comments [ 0 ]. id,'csrfmiddlewaretoken': self. get _ csrf _ token ( ), } delete _ url ='/ admin / delete - comment /'response = self. client. post ( delete _ url, data ) redirect _ url = self. text _ entry. get _ absolut...
[ 0.10162591934204102, 0.19858476519584656, 0.30088579654693604, -0.0037975325249135494, 1.6511672735214233, 0.4900937080383301, 0.27057191729545593, 0.12560629844665527, 0.6806852221488953, -0.4519749581813812, 0.04613839462399483, 0.26979103684425354, -0.4174129068851471, 0.402630984783172...
def take _ tag _ name ( line ) : t _ tag = line. split ('>') [ 0 ]. rpartition ('<') [ - 1 ] return t _ tag
[ 0.67238450050354, -0.07506857812404633, 0.6503067016601562, -0.09245242923498154, 0.6113876104354858, -0.09300107508897781, -0.4146515727043152, 0.150146484375, -0.8365073800086975, 0.35407957434654236, -0.7766543626785278, -0.7494296431541443, 0.03513457998633385, -0.4854944050312042, 0...
def _ _ init _ _ ( self, mass _ centre : ( float, float ) = none ) : self. mass _ centre = mass _ centre
[ 1.1094081401824951, -0.8978723287582397, 0.540434718132019, -0.3292410373687744, 0.2996567487716675, 0.17089802026748657, -0.5368512272834778, 0.17544302344322205, 0.4372828006744385, -0.451314240694046, -0.30927079916000366, -0.16679592430591583, -0.05087289586663246, 1.092665195465088, ...
def window _ cover ( self, window _ shape, pad = true ) : size _ y, size _ x = window _ shape [ 0 ], window _ shape [ 1 ] _ ndepth, _ nheight, _ nwidth = self. shape nheight, _ m = divmod ( _ nheight, size _ y ) nwidth, _ n = divmod ( _ nwidth, size _ x ) img = self if pad is true : new _ height, new _ width = _ nheigh...
[ 0.06956828385591507, 0.8138242363929749, 0.8772784471511841, 0.21746744215488434, -1.0152446031570435, 0.24962812662124634, 0.5031771659851074, -0.8423681259155273, 0.6629776954650879, 0.09402932971715927, 0.3306386470794678, 0.9379127025604248, -0.1615612804889679, 0.9967564940452576, -...
def light _ centre _ tag ( self ) - > str : if self. light _ centre is none : return " " else : y = " { 0 :. 2f } ". format ( self. light _ centre [ 0 ] ) x = " { 0 :. 2f } ". format ( self. light _ centre [ 1 ] ) return f " _ _ { conf. instance ['notation'] ['setup _ tags'] ['light'] ['light _ centre'] } _ ( { y }, { ...
[ 0.9212757349014282, -1.6004825830459595, 0.5591557621955872, -0.9988580346107483, 0.37025636434555054, -0.40052396059036255, -0.03403792902827263, -0.4901379942893982, -0.1312454491853714, 0.6635844111442566, -0.12051340937614441, -0.4326995313167572, 0.5272457003593445, 0.5009782910346985...
def _ setup _ context ( self, request, slug, proposal _ id ) : context = { } context ['conference'] = conference = get _ object _ or _ 404 ( conference. objects, slug = slug ) context ['proposal'] = proposal = get _ object _ or _ 404 ( conference. proposals, id = proposal _ id ) context ['opinions'] = proposal. opinion...
[ -0.8503081202507019, -0.11899473518133163, 0.7456626892089844, -0.6227569580078125, -0.02947339043021202, 0.3204355537891388, -0.3455110192298889, -0.13682182133197784, 0.5512056946754456, 0.6463373899459839, 0.29253923892974854, -0.3787071108818054, 0.1389634758234024, 0.35619333386421204...
def format ( self ) : return self. _ root. get _ attr ( " format " )
[ 0.802731990814209, 0.04131482541561127, 0.19168268144130707, 0.7258552312850952, 0.36352404952049255, -0.06980902701616287, 1.1435497999191284, -0.6207112073898315, 0.5565080046653748, -1.1120914220809937, 1.244098424911499, 0.3658091127872467, 0.11935504525899887, 1.2912622690200806, -0...
def find ( self, x ) : if ( self. padre [ x ]! = x ) : self. padre [ x ] = self. find ( self. padre [ x ] ) return self. padre [ x ]
[ -0.39442187547683716, 0.19585181772708893, 0.648544430732727, -0.35523173213005066, -0.7256290316581726, 0.5416853427886963, -0.673051118850708, -1.9783358573913574, 0.9250515699386597, -0.04581030458211899, -0.011540012434124947, 0.06931472569704056, -1.7645376920700073, -0.22165879607200...
def flufluqueue ( qin, rin, qout, rout, srv0stop, * argv ) : # parse options prec = 1e - 14 needst = false needql = false q0 = [ ] eaten = [ ] for i in range ( len ( argv ) ) : if type ( argv [ i ] ) is str and argv [ i ] = = " prec " : prec = argv [ i + 1 ] eaten. append ( i ) eaten. append ( i + 1 ) elif type ( argv ...
[ -0.5930060744285583, -0.4859881103038788, 0.9307951331138611, -0.28589388728141785, -0.016804179176688194, -0.10225784778594971, 0.19666634500026703, 0.00943108182400465, -0.3618483543395996, -0.5932524800300598, 0.27903610467910767, 0.6013506650924683, -0.623725175857544, 0.63368934392929...
def forward ( self, x : torch. tensor ) - > torch. tensor : # normalize the prototypes with torch. no _ grad ( ) : w = self. prototypes. weight. data. clone ( ) w = nn. functional. normalize ( w, dim = 1, p = 2 ) self. prototypes. weight. copy _ ( w ) embedding, output = x, self. prototypes ( x ) embedding = embedding....
[ -0.378596693277359, 0.2752728760242462, 0.8204594254493713, 0.2852344512939453, -0.5490986704826355, -0.22747674584388733, 0.9332278966903687, -0.32377856969833374, -0.04767454043030739, 0.5217293500900269, 0.4232497215270996, 0.6191186308860779, 0.07631418108940125, 0.7704324722290039, ...
def _ _ eq _ _ ( self, other : block ) - > bool : if self. _ _ class _ _! = other. _ _ class _ _ : return false return ( self. namespaced _ name = = other. namespaced _ name and self. properties = = other. properties and self. extra _ blocks = = other. extra _ blocks )
[ 0.24188704788684845, -0.5074990391731262, 0.8261312246322632, 0.4684198796749115, -0.2594935894012451, 0.8110687136650085, -0.5530537962913513, -1.2992706298828125, 0.5052062273025513, -0.3304871916770935, -1.2841427326202393, 0.8079864382743835, -0.1882721483707428, 0.723734974861145, 0...
def _ zeros _ like _ tensor ( x ) : return f. zeros _ like ( x )
[ -0.24279670417308807, -0.2823439836502075, 0.21941624581813812, -0.7803043127059937, -1.0405527353286743, 0.1207021176815033, -0.2758773863315582, -0.11657028645277023, -0.02566545084118843, -0.4495420455932617, -0.17672592401504517, 0.42602482438087463, 1.569966435432434, -1.5011284351348...
def main ( ) : parser = argparse. argumentparser ( ) parser. add _ argument ('- - image ','- i ', help ='path to the image ', default = ". /.. / resource / lenna. png ", type = str ) parser. add _ argument ('- - output ','- o ', help ='path to the output ', default = ". /.. / results ", type = str ) parser. add _ argum...
[ 0.7641671895980835, 0.12840025126934052, 1.1423496007919312, 0.6026277542114258, 0.34449613094329834, -0.24100351333618164, 0.3701724112033844, -0.10071321576833725, -0.984595537185669, -0.4381886124610901, 0.18564528226852417, 0.426015704870224, -0.12596851587295532, 0.5946562886238098, ...
def begin _ delete _ environment ( self, project _ name : str, environment _ name : str, user _ id : str = " me ", * * kwargs : any ) - > lropoller [ none ] : _ headers = kwargs. pop ( " headers ", { } ) or { } _ params = kwargs. pop ( " params ", { } ) or { } cls : clstype [ none ] = kwargs. pop ( " cls ", none ) poll...
[ 0.27776846289634705, -0.01697447896003723, 1.0110805034637451, -0.14000001549720764, -0.5670524835586548, 0.11359933018684387, -0.09774113446474075, -0.2861432135105133, -0.49472320079803467, 0.5234454274177551, 0.4973807632923126, 0.6694037914276123, -0.09325016289949417, -0.1562112122774...
def predict ( self, x ) : if len ( x. shape ) = = 1 : x = x. reshape ( - 1, 1 ) r = x. shape [ 0 ] proba = self. predict _ proba ( x ) predictions = [ ] for i in range ( r ) : predictions. append ( np. argmax ( proba [ i ] ) ) return np. array ( predictions )
[ -1.0086205005645752, -0.3327734172344208, 0.6977022886276245, 1.7338370084762573, 0.10786217451095581, -0.08121003955602646, -0.936720073223114, 0.13467510044574738, -0.1068473681807518, 0.4376717805862427, -0.07449677586555481, 0.12756602466106415, -0.09225422143936157, 0.4714406430721283...
def zeo _ connection ( ) : storage = clientstorage. clientstorage ( ('localhost ', 50001 ) ) db = db ( storage ) conn = db. open ( ) try : yield conn. root ( ) except exception as ex : logger. error ('could not connect to zeo. exception : { 0 } '. format ( ex ) ) finally : conn. close ( ) db. close ( )
[ 0.26815807819366455, -0.3271429240703583, 0.4865383803844452, 0.46603986620903015, -0.1669585108757019, -0.7004598379135132, -0.20969484746456146, -0.11197721213102341, -0.20722098648548126, 0.003112569684162736, -0.058542076498270035, -0.08091417700052261, -0.3165716826915741, 0.252237439...
def cat _ dog ( string : str ) : # wastes # if len ( string ) < 3 : # return true # else : # cat _ cnt = dog _ cnt = 0 # for i in range ( len ( string ) - 2 ) : # if string [ i : i + 3 ] = = " cat " : # cat _ cnt + = 1 # elif string [ i : i + 3 ] = = " dog " : # dog _ cnt + = 1 # # if cat _ cnt = = dog _ cnt : # return...
[ -0.1181803047657013, -0.0498541034758091, 0.3679727613925934, 0.02517419308423996, 0.3126273453235626, 0.6847277283668518, -0.19520510733127594, -0.15440401434898376, -0.903146505355835, -0.6945250034332275, -0.42107534408569336, 0.1776595115661621, -0.35792076587677, 0.07958396524190903, ...
def validate _ values ( self ) : # pylint : disable = too - many - statements stmt = " " " select ` req _ id ` from ` request _ info ` where ` pan ` = % ( pan _ number ) s " " " mycursor. execute ( stmt, {'pan _ number': self. pan } ) rows = mycursor. fetchall ( ) row = list ( rows [ len ( rows ) - 1 ] ) # row = [ 2 ] ...
[ 0.007282560225576162, -0.3356398642063141, 0.9057949781417847, 0.6339620351791382, 0.34108981490135193, 0.772512674331665, 0.6920024752616882, -0.9849752187728882, 0.16176803410053253, -0.9361651539802551, -0.2201719433069229, -0.7089896202087402, -0.6460127234458923, 0.6783304810523987, ...
def notify _ server ( self, address ) : if self. watching : raise notifiererror ( " notifier in watch mode ; cannot send notifications " ) channel _ server = self. _ channel ( self. server, address ) log. debug ( " publish % s ", channel _ server ) yield from self. _ connection. publish ( channel _ server, str ( addres...
[ -0.3759675621986389, -0.056193187832832336, 0.5187963247299194, -0.4365767240524292, -0.43014851212501526, -0.12693724036216736, 0.07752273976802826, -0.10259602218866348, -0.09863906353712082, 0.5091108083724976, -0.3982328772544861, 1.7957462072372437, 0.12071724981069565, 0.916249394416...
def merge ( line ) : result = [ 0 ] * len ( line ) index = 0 for num in [ num for num in line if num ] : if result [ index ] = = num : result [ index ] + = num index + = 1 else : index + = ( result [ index ]! = 0 ) result [ index ] = num return result
[ -0.6695410013198853, 0.45807281136512756, 0.7749876976013184, 0.7635824680328369, 0.7771286964416504, -0.8392978310585022, 0.13371434807777405, 0.610458254814148, 0.5371631383895874, -1.0037462711334229, -1.3565871715545654, -0.7380858063697815, -0.6408640742301941, 0.2075754851102829, -...
def find _ protein _ fna _ by _ id ( db : session, id : optional [ list [ str ] ] ) : if id : log. info ( " searching nt sequence by proteinids in the database... " ) query = db. query ( protein. id, protein. nt _ seq ) return query. filter ( protein. id. in _ ( id ) ). all ( ) else : log. error ( " no ids were given. ...
[ -0.520247220993042, -0.24145828187465668, 0.15876291692256927, 0.30551278591156006, 0.5279973149299622, -0.7722797989845276, -1.630524754524231, -0.6775146722793579, -0.0935102179646492, 0.2601352632045746, -0.5890445709228516, -0.38513895869255066, -0.9207249879837036, 0.7337324619293213,...
def download _ video ( video _ id, tester _ id ) : persistor = videopersisor ( ) if not persistor. ensure _ tester _ is _ valid ( tester _ id ) : return io. bad _ request ('tester must have at least one image and video.') video = persistor. get _ video ( video _ id ) if not video : return io. bad _ request ( f'video no...
[ 0.10451491922140121, -0.7161937355995178, 0.48469841480255127, 1.4191203117370605, -0.22249293327331543, -0.965280294418335, 0.2796933352947235, -0.2323300987482071, 1.4938125610351562, -0.3792577087879181, 0.7292719483375549, 0.5157454013824463, -0.7486887574195862, 0.6320422887802124, ...
async def verify _ sms ( self, request _ id : str, code : str ) - > int : params = {'api _ key': self. api _ key,'request _ id': request _ id,'code': code } try : async with clientsession ( ) as session : async with session. get ( self. verify _ url, params = params ) as resp : resp _ json = await resp. json ( ) if'sta...
[ -0.08634041994810104, 0.15204252302646637, 0.7170377373695374, 0.10364357382059097, 0.013117966242134571, -0.778419554233551, -0.30712562799453735, -0.4739242196083069, 1.1860836744308472, -0.3345717489719391, -0.47633329033851624, 0.9076319336891174, -0.5598121881484985, 0.092977970838546...
async def communicate ( self, input = b'' ) : stdout _ task = await spawn ( self. stdout. readall ) if self. stdout else none stderr _ task = await spawn ( self. stderr. readall ) if self. stderr else none try : if input : await self. stdin. write ( input ) await self. stdin. close ( ) stdout = await stdout _ task. joi...
[ 0.12182403355836868, -0.6274009346961975, 1.0521860122680664, 0.736973226070404, -0.2450026571750641, -0.061270926147699356, -0.24189068377017975, 0.04691700637340546, 0.2181365191936493, -0.02056802622973919, 0.7593398094177246, 0.06052609160542488, -0.3144895136356354, 0.4112532734870910...
def activate ( self, appname ) : for app in self. _ applications : if app. getname ( ) = = appname : app. activate ( ) self. appactivated. emit ( appname, application. activeapplication ) return raise nextruntimeerror ( f " application'{ appname }'not found. " )
[ -0.2519126236438751, -0.6784088015556335, 0.39272668957710266, 0.7398992776870728, -0.0006155840819701552, -0.5640281438827515, -0.05592561140656471, 0.07523909211158752, 0.1675061732530594, 0.6756327748298645, -0.8677791357040405, 0.3474920392036438, -0.10621091723442078, 0.13065792620182...
async def create _ product _ version _ with _ options _ async ( self, request : servicecatalog _ 20210901 _ models. createproductversionrequest, runtime : util _ models. runtimeoptions, ) - > servicecatalog _ 20210901 _ models. createproductversionresponse : utilclient. validate _ model ( request ) body = { } if not ut...
[ -1.3000869750976562, -0.2363499253988266, 0.7466486096382141, 0.07704006880521774, -0.029064036905765533, 0.38848385214805603, 0.3158097565174103, -1.4249112606048584, 0.359235942363739, 0.8173626065254211, -0.5319145321846008, 0.6766242384910583, -0.30247870087623596, 0.24997824430465698,...
def test _ zip _ archive _ zip _ extract ( self ) : pass
[ -0.06078489497303963, -0.46065452694892883, 0.25157400965690613, 0.6401911377906799, 0.0758049488067627, -0.5724754929542542, 1.102545976638794, 0.814926266670227, 1.0369782447814941, -1.3009490966796875, -0.5588079690933228, -0.40646347403526306, -0.48358356952667236, 0.17321456968784332,...
def kinetic _ energy ( self, p ) : return 0. 5 * np. dot ( p, p )
[ 0.5085945725440979, -0.4068164527416229, 0.03441053628921509, 0.14525680243968964, -0.5801398158073425, 0.7192065119743347, -0.1285768300294876, 0.9265077114105225, -0.4940931797027588, 0.4538410007953644, 0.09651269763708115, -0.24584467709064484, -0.3257659375667572, -0.3853221535682678,...
def takeactionf ( state, action ) : import numpy position = findblank _ 8p ( state ) sqrt = squareofstate ( state ) arrstate = numpy. reshape ( state, ( sqrt, sqrt ) ) if not legalaction ( arrstate, action, position, sqrt ) : return " could not move that direction " if action = = " left " : return swap ( arrstate, posi...
[ -0.3570716083049774, -0.6464064121246338, 0.646141767501831, -0.12733504176139832, -0.28042855858802795, -0.20406275987625122, 0.34665438532829285, -0.2863094210624695, 1.1117497682571411, 0.4325259327888489, -0.07363912463188171, -0.0015251522418111563, 0.060471177101135254, -0.5779971480...
def calculate _ itj ( vfr, vfj, vtr, vtj, y _ matrix ) : itj = y _ matrix ['itj ','vfr'] * vfr + y _ matrix ['itj ','vfj'] * vfj + \ y _ matrix ['itj ','vtr'] * vtr + y _ matrix ['itj ','vtj'] * vtj return itj
[ 0.21746708452701569, -0.18250274658203125, 0.49485698342323303, -0.24975615739822388, 0.2330571711063385, -0.15822447836399078, 0.5225415229797363, 0.3306652307510376, -0.8413087129592896, 0.5073504447937012, 0.7840337157249451, -0.6717453002929688, -1.1639434099197388, 0.00293392525054514...
def _ makewordlink ( word, words _ category _ index ) : category = _ getwordcategory ( word, words _ category _ index ) if not category : raise exception ('failed to look up category for word { } '. format ( word ) ) return'rc : / / * / tw / dict / bible / { } / { } '. format ( category, word )
[ 0.3682061433792114, 0.06738072633743286, 0.3489049971103668, -1.2802890539169312, 0.30207398533821106, 0.07544838637113571, 0.09497835487127304, -0.13528962433338165, -0.4414869546890259, -0.1835625171661377, 0.946491539478302, 0.5424244403839111, 0.1304200142621994, -0.09072902053594589, ...
def items ( self, path = none ) : items = list ( self. iteritems ( ) ) if path is not none : path + ='$'regex = re. compile ( path ) items = [ i for i in items if regex. match ( i. path ) ] return items
[ -0.7781817317008972, -0.47245851159095764, 0.42358583211898804, 0.6706693172454834, -0.013871829025447369, 0.20766785740852356, -0.29882341623306274, 1.1052920818328857, -0.11665912717580795, 0.09605669230222702, -0.1501690000295639, -0.16588537395000458, -0.619779109954834, -0.48923701047...
def _ _ init _ _ ( self, input _ files = none ) : super ( ). _ _ init _ _ ( ) self. input = input _ files self. dictionary = dictionary ( prune _ at = 5000000 ) self. metadata = false if input _ files is not none : self. dictionary. add _ documents ( self. get _ texts ( ), prune _ at = 5000000 ) else : self. logger. wa...
[ 0.2843577563762665, 0.4466928541660309, 0.5101338028907776, 0.04336445778608322, -0.3358928859233856, -0.10352162271738052, 0.1313401609659195, 0.34617289900779724, -0.46057116985321045, -0.16949883103370667, 0.11330877244472504, -0.4925108253955841, -0.7199149131774902, 0.9039043188095093...
def get _ images ( self, * * kwargs ) : return images _ fig. get _ images ( exp _ list = self. exp _ list, savedir _ base = self. savedir _ base, verbose = self. verbose, * * kwargs )
[ -0.5609675049781799, 0.2627486288547516, 0.17926065623760223, 0.5932420492172241, 0.45308917760849, -0.42438963055610657, -0.2716156244277954, 0.3072567880153656, -0.29907500743865967, -0.1918075680732727, -0.1400376260280609, 0.5412982106208801, -0.03600271791219711, 0.4464982748031616, ...
def getvelocitylimits ( self ) : active _ indices = self. getindices ( ) or _ velocity _ limits = self. getrobot ( ). getdofvelocitylimits ( ) [ active _ indices ] return or _ velocity _ limits
[ 0.28422001004219055, -0.18718287348747253, 0.45844194293022156, 0.9832327365875244, 0.3680981397628784, -0.33472201228141785, -0.735818088054657, -0.7711367607116699, 0.9766137599945068, 0.7439220547676086, -0.10470303148031235, -0.008722661063075066, -0.20859192311763763, -0.3064766526222...
def query4 ( connection ) : current = time. time ( ) cursor = connection. cursor ( ) cursor. execute ( " " " select beer _ brewery. avail _ beers, beer _ brewery. brewery _ name, beer _ brewery. address from ( select b. name as avail _ beers, br. name as brewery _ name, br. city | | ','| | br. state | | ','| | br. coun...
[ 0.2006131112575531, -0.2684546411037445, 0.6717199087142944, 0.7448510527610779, -0.12831643223762512, -0.21787472069263458, 0.4655557870864868, 0.17215532064437866, -0.8323806524276733, 0.6343851685523987, -0.05725613236427307, 0.23206569254398346, -0.9066715836524963, 0.11249739676713943...
def uninstall ( policy ) : for switch, config in policy : if not switch in inst. concrete _ policy : inst. concrete _ policy [ switch ] = defaultdict ( lambda : [ ] ) for rule in config : priority = inst. installed _ priority [ switch ] [ rule. pattern ] delete _ rules ( switch, rule. pattern. to _ dict ( ), priority )...
[ -0.18637314438819885, -0.2521982491016388, 0.3562620282173157, -0.6520753502845764, 0.5936896800994873, 0.6696993708610535, 0.2479722797870636, 1.6759099960327148, 0.4667678773403168, 1.157280683517456, -0.015721378847956657, -0.7747218012809753, -0.3744659423828125, 0.7802932858467102, ...
def conditionwise _ statistics ( self ) : if self. _ conditionwise _ statistics is none : self. _ conditionwise _ statistics = self. ecephys _ session. conditionwise _ spike _ statistics ( self. stim _ table. index. values, self. unit _ ids ) return self. _ conditionwise _ statistics
[ 0.303856760263443, 0.5540704131126404, 0.2833654582500458, -0.21192313730716705, 0.20373912155628204, 0.1272856444120407, 0.994871973991394, -0.909163773059845, 0.6330917477607727, -0.06824751943349838, 0.026060128584504128, 0.15293197333812714, -0.1668148934841156, -0.03786073252558708, ...
def test _ entry _ detail ( self ) : response = self. client. get ( self. text _ entry. get _ absolute _ url ( ) ) self. assertcontains ( response, self. text _ entry. rendered _ content, status _ code = 200 )
[ 1.1698408126831055, 0.14640618860721588, 0.3520907759666443, -0.5098038911819458, 1.120092511177063, 0.914031982421875, -0.5746570825576782, 0.6229659914970398, 0.04073339328169823, -0.7462465763092041, 0.025238661095499992, 0.4589320123195648, 0.5711881518363953, 0.6586012840270996, -1....
def deletematches ( ) : # connect to the database conn = connect ( ) curs = conn. cursor ( ) # delete matches all matches from the tournament query = " delete from matches where tournament _ id = 1 " curs. execute ( query ) # commit the changes and then close the connection conn. commit ( ) conn. close ( )
[ 0.7011299729347229, -0.168084517121315, 0.8837144374847412, 0.3726494014263153, 0.40098610520362854, 0.612824022769928, 0.17642271518707275, 0.8919107913970947, -0.3154797852039337, 0.06813590973615646, 0.17806385457515717, -1.2684894800186157, -0.9464971423149109, -0.1918007731437683, 0...
def adddeltasanddeltadeltas ( data ) : deltas = librosa. feature. delta ( data = data, order = 1 ) dds = librosa. feature. delta ( data = data, order = 2 ) return np. vstack ( ( data, deltas, dds ) )
[ 0.026074232533574104, -0.06874996423721313, 0.8101630210876465, 0.2683383822441101, 0.45142662525177, 1.085644245147705, -0.24448969960212708, -0.011761965230107307, 0.6204809546470642, -0.4829646944999695, -0.3905828595161438, 0.39748629927635193, 0.47863465547561646, 0.2718217372894287, ...
def water _ initial _ mash ( self ) : ratio = float ( app _ settings. water _ l _ per _ grain _ kg ) grain = float ( self. get _ total _ grain ( ) ) return ratio * grain
[ 1.306423306465149, -0.11898955702781677, 0.40054306387901306, -0.7610780596733093, 0.04208089038729668, 0.6427569389343262, 0.19548769295215607, -0.005567870102822781, 0.180005744099617, -0.26703622937202454, 0.41382452845573425, 0.6388347744941711, -0.09886205196380615, 0.8676226139068604...
def test _ single _ instance _ failure ( self ) : self. expect _ get _ statuses ( ) self. expect _ health _ check ( 0, false ) self. expect _ health _ check ( 1, true ) self. expect _ health _ check ( 2, true ) self. replay _ mocks ( ) self. assert _ watch _ result ( [ 0 ] ) self. verify _ mocks ( )
[ -0.3720354735851288, 0.7600204944610596, 0.5784665942192078, 0.3209703862667084, 1.620267629623413, 0.9944919347763062, 1.0117430686950684, 0.5077601075172424, -0.5692890882492065, -0.9259750247001648, -0.03135039657354355, 0.24024173617362976, -0.17922784388065338, 0.09303869307041168, ...
def employee _ edit ( id ) : employee = user. query. get ( id ) if request. method = ='post': if current _ user = = employee : employee. first _ name = request. form. get ('firstname') employee. date = request. form. get ('date') employee. salary = request. form. get ('salary') try : db. session. commit ( ) flash ( " s...
[ -0.7852491736412048, 0.20310547947883606, 0.7386348247528076, 0.5316625833511353, -0.13661055266857147, 0.737076461315155, 0.2214374542236328, 0.23303839564323425, -0.5380746722221375, 0.11496283859014511, -0.04406442120671272, -0.4990904927253723, 0.4020686149597168, 0.7197076678276062, ...
def _ ros _ image _ callback ( self, msg ) : cv2 _ img = self. _ cv _ bridge. imgmsg _ to _ cv2 ( msg,'bgr8') caption = msg. header. frame _ id if self. _ caption _ as _ frame _ id else'' photo = bytesio ( cv2. imencode ( '. jpg ', cv2 _ img ) [ 1 ]. tobytes ( ) ) self. _ telegram _ updater. bot. send _ photo ( self. _...
[ -0.1879480481147766, -0.5336596965789795, 0.5442240238189697, 0.6566869020462036, -0.05245433747768402, -0.13683106005191803, 0.5249689817428589, -0.2554026246070862, 0.28917816281318665, 0.7885937094688416, -0.5941628813743591, 0.9410901069641113, 0.5563787817955017, 0.44764944911003113, ...
def group _ title ( self ) : return'< label id = " % s " > % s < / label >'% ( self. id, net. websafe ( self. description ) )
[ 0.3515723645687103, -0.18449991941452026, 0.3810848891735077, -0.6292973160743713, -0.1903296858072281, 0.7261397838592529, -1.277333378791809, -0.28934815526008606, 0.08412949740886688, 0.20484085381031036, 0.3659648001194, 0.3600369393825531, -0.638908326625824, 0.3813464045524597, -0....
def vgg16 _ imagenet ( pretrained = false, * * kwargs ) : model = vgg _ imagenet ( make _ layers ( cfg _ imagenet ['d'] ), * * kwargs ) if pretrained : model. load _ state _ dict ( model _ zoo. load _ url ( model _ urls ['vgg16'] ) ) return model
[ -0.3300398588180542, 0.8964082598686218, 0.20001010596752167, 0.5065279603004456, -0.009477835148572922, -0.08544857800006866, 0.1143692284822464, 0.1414881944656372, -0.5572903752326965, 0.03563448041677475, -0.568071722984314, -0.15586288273334503, 0.08940663933753967, -0.136071011424064...
def keeptimeline ( method ) : @ functools. wraps ( method ) def namespace ( * args, * * kw ) : mintime = cmds. playbackoptions ( mintime = true, query = true ) maxtime = cmds. playbackoptions ( maxtime = true, query = true ) animationstarttime = cmds. playbackoptions ( animationstarttime = true, query = true ) animatio...
[ -0.2057361751794815, 0.16598866879940033, 0.8221285939216614, -0.009013851173222065, -0.5674018859863281, 0.17980356514453888, 0.10257219523191452, -1.1258981227874756, 0.6259206533432007, 0.3909238278865814, 0.19372104108333588, -0.030421528965234756, -0.036977969110012054, 0.371931791305...
def cursor _ visible ( self, value ) : if self. _ cursor _ visible! = value : self. _ cursor _ visible = value if self. _ cursor _ visible : self. _ group. append ( self. _ cursor _ tilegrid ) else : self. _ group. pop ( )
[ 0.40885135531425476, -0.02307930588722229, 0.5804995894432068, -0.6831911206245422, -1.022857666015625, 0.08492261171340942, 0.6238182783126831, -0.37295904755592346, -0.16116556525230408, 1.9936659336090088, -0.887367844581604, 0.6796501874923706, -0.3429417908191681, 0.6500200033187866, ...
def modify ( self, par, * * kwargs ) : if not ( par in self. pars ( ) ) : self. warning ( " parameter \ " % s \ " not present " % ( par ) ) return # self. _ _ parhandle [ par ] = parameter ( par, * * kwargs ) for key, value in list ( kwargs. items ( ) ) : self. _ _ parhandle [ par ] [ key ] = value
[ -0.8444433808326721, -0.1429528146982193, 0.6885906457901001, -0.7358325123786926, -0.1257595270872116, 0.9673059582710266, -0.4790378510951996, -0.03132516145706177, 0.39212533831596375, -0.2292999029159546, 0.30454641580581665, 0.36495283246040344, -1.3881661891937256, 0.2877908349037170...
async def author _ group ( self, ctx : context ) - > none : await ctx. send ( " this command is not meant to be used on its own! " )
[ -0.30444198846817017, 0.4568862020969391, 0.25853976607322693, 0.8414861559867859, 0.4526316225528717, 0.19077646732330322, 0.6546043157577515, 0.4749457836151123, -1.0139334201812744, -0.3900362253189087, 0.8297651410102844, 2.034092426300049, -1.0445096492767334, 0.10935981571674347, -...
def _ get _ file _ format ( self, file _ path : str ) - > optional [ str ] : # in case the caller gives us a file path file _ path = os. path. basename ( file _ path ) file _ extension = file _ path. split ( ". " ) [ - 1 ] return self. file _ format _ dict. get ( file _ extension, none )
[ 0.7592101693153381, -0.5056314468383789, 0.3978681266307831, -0.38739386200904846, -0.43326547741889954, -0.7409510016441345, -0.26064521074295044, -0.19716167449951172, -0.26103270053863525, 0.03781681880354881, 0.6434019804000854, -0.04295320808887482, -0.1992483139038086, 0.386852532625...
def register ( klass ) : assert ( isinstance ( klass, type ) ) name = klass. _ _ name _ _. lower ( ) if name in optimizer. opt _ registry : print ('warning : new optimizer % s. % s is overriding'' existing optimizer % s. % s'% ( klass. _ _ module _ _, klass. _ _ name _ _, optimizer. opt _ registry [ name ]. _ _ module ...
[ -0.2889803349971771, 0.5228495001792908, 0.8331218361854553, -0.29646649956703186, 0.14209002256393433, -0.07050634920597076, -0.019210729748010635, -0.4170970320701599, 0.5874437689781189, 0.2638970613479614, -0.6437973380088806, 0.2147190272808075, -0.6346883773803711, 0.4226218760013580...
def _ get _ competition _ class ( competition _ type ) : if competition _ type = = " playoff " : from gomill import playoffs return playoffs. playoff elif competition _ type = = " allplayall " : from gomill import allplayalls return allplayalls. allplayall elif competition _ type = = " ce _ tuner " : from gomill import...
[ 0.013577369973063469, -0.20617909729480743, 0.5485909581184387, 0.01098618470132351, 0.269015371799469, 0.19414614140987396, 0.34105372428894043, -1.0903258323669434, 0.3942837119102478, 0.3058984875679016, 0.10983683913946152, 0.6799200773239136, -0.14739099144935608, 0.061778366565704346...
def test _ list _ integer _ min _ length _ 4 _ nistxml _ sv _ iv _ list _ integer _ min _ length _ 5 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - minlength - 5. xsd ", instance = " nistdata / list / ...
[ -0.26431918144226074, -0.5928659439086914, 0.25316429138183594, 0.12257770448923111, -0.6863871812820435, -0.3616783618927002, -0.1276097297668457, -0.5010718703269958, 0.8324883580207825, 0.5374148488044739, -1.3137176036834717, -0.18314243853092194, -1.1508959531784058, 0.684974431991577...
def error _ popup _ selections ( self ) : messagebox. showwarning ( " warning ", " please select word embedding model and classifier " )
[ 0.1347590535879135, -0.19279298186302185, 0.24858294427394867, -0.05362017825245857, 0.614341139793396, 0.2578514516353607, 0.4531368911266327, -0.08019685000181198, -0.5641558766365051, 0.9445073008537292, -0.04414384812116623, 0.9249160885810852, 0.032837364822626114, 0.7114628553390503,...
def execute _ local _ histogram _ equalization ( img0, batch, restrict = false, scale = 3, threshold = 3. 0, method = " average ", luminance _ type = " ycbcr " ) : # ycbcr pattern if luminance _ type = = " ycbcr " : # transform the colored image to ycbcr pattern img _ ycbcr = cv2. cvtcolor ( img0, cv2. color _ bgr2ycr ...
[ 1.160203218460083, 0.09176324307918549, 1.0416254997253418, 0.88615483045578, 0.4802323579788208, -0.39490291476249695, 0.17315107583999634, 0.21223735809326172, 0.13208146393299103, -0.2951925992965698, -0.4192563593387604, 0.4437788426876068, 0.20429106056690216, 1.1414120197296143, 0....
def testupdateoptionaladdandremove ( self ) : conf = xml _ configuration. configuration. emptyconfiguration ( ) properties _ to _ update = { } optional _ properties _ to _ add = {'key1':'value1 ','key2':'value2 ', } conf. update ( properties _ to _ update, optional _ properties _ to _ add ) self. assertequal ('value1 '...
[ 0.1354890912771225, -0.4045126736164093, 0.6958074569702148, -0.4459632635116577, 0.39053240418434143, -0.12350364774465561, -0.352272093296051, 0.536166787147522, 0.32689738273620605, 0.23032411932945251, -0.2689272165298462, -0.4905799329280853, 0.310600221157074, -0.46199899911880493, ...
def main ( inargs ) : # check if pre - processed file exists if ( pp _ exists ( inargs ) is false ) or ( inargs. recompute is true ) : print ('compute preprocessed file :'+ get _ pp _ fn ( inargs ) ) # call preprocessing routine with arguments compute _ variance ( inargs ) else : print ('found pre - processed file :'+ ...
[ 0.06267448514699936, 0.0924530178308487, 1.0318082571029663, 0.5267006158828735, 0.41187965869903564, 0.7450646758079529, 0.9978498816490173, 0.35431718826293945, -0.4204842150211334, -0.02030034177005291, 0.6183894276618958, 0.8986658453941345, -0.4273501932621002, 0.5670214891433716, 0...
def get _ headers ( self, ep ) : return dict ( [ ( item [ 0 ], self. getheader ( item [ 1 ] ) ) for item in ep. items ( ) ] )
[ -1.671908974647522, -0.7046297788619995, 0.42559292912483215, -0.4035385847091675, -0.49710890650749207, -0.4655085802078247, -1.0483540296554565, -0.27396926283836365, -0.1456732153892517, 0.6159089803695679, -0.2917274236679077, -1.1563808917999268, 0.06721199303865433, -0.08542209118604...
def lerpcolors ( coloroptions, amt ) : if ( len ( coloroptions ) = = 1 ) : return coloroptions [ 0 ] spacing = 1. 0 / ( len ( coloroptions ) - 1 ) lhs = floor ( amt / spacing ) rhs = ceil ( amt / spacing ) try : return lerpcolor ( coloroptions [ lhs ], coloroptions [ rhs ], amt % spacing / spacing ) except : return ler...
[ 0.7290697693824768, 0.17454613745212555, 0.7188118696212769, -1.0152177810668945, 0.1419505625963211, 0.02196394093334675, -0.1406080722808838, -0.6603299975395203, 0.9360848069190979, 0.6676279902458191, 0.3471192717552185, -0.1349448710680008, -0.7596778273582458, 0.4099292755126953, -...
def _ super _ feed _ reader ( self, data ) : # feed reader copied from superclass indebug _ s ( " in : % r ", data ) if data : try : r = self. _ reader. feed ( data ) while r : r = self. _ reader. feed ( " " ) if r is none : indebug ('r was none, setting eof + disconnect') self. eof = 1 self. disconnect ( ) except stre...
[ 0.181197389960289, -0.15074528753757477, 0.6261085867881775, -0.5794326066970825, -0.5490509867668152, -0.5920998454093933, -0.36829233169555664, -0.4062495529651642, -0.22407706081867218, -0.3800821602344513, 0.5244814157485962, 0.13652807474136353, -0.2820734977722168, 0.308536171913147,...
def parsehttpresult ( url, response, content ) : logging. getlogger ( ). debug ('- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -') logging. getlogger ( ). debug ('status = % d'% response. status ) logging. getlogger ( ). debug ('- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -...
[ -0.20253422856330872, -0.31861841678619385, 0.6830562949180603, 0.42512863874435425, -0.9594945311546326, -0.40191006660461426, -0.23288454115390778, -0.47054529190063477, -0.4859403073787689, 0.7558144927024841, -0.011598890647292137, 0.07866866886615753, 0.09651820361614227, -0.557590425...
def install ( user = true ) : name ='splash - py3'folder = os. path. join ( os. path. dirname ( _ _ file _ _ ),'kernels ', name ) install _ kernel _ spec ( folder, kernel _ name = " splash ", user = user, replace = true )
[ 0.31683868169784546, 0.6985979080200195, 0.5280036330223083, 0.5166841745376587, -0.08784544467926025, 1.0730738639831543, 0.40598273277282715, 0.29929107427597046, -0.06360378116369247, -0.12363691627979279, -0.7118808031082153, 0.05474928393959999, -0.1885174810886383, 0.6996206045150757...
def get _ top _ tracks _ from _ artist ( self, artist, market = none ) : q = { " country " : market or self. user _ market ( ) } url = " artists / { } / top - tracks ". format ( artist ['id'] ) result = self. get _ api _ v1 ( url, q ) return tuple ( track ( t ) for t in result [ " tracks " ] )
[ -0.7518613338470459, 0.7162498831748962, 0.40749064087867737, -0.06291055679321289, -0.4941609501838684, 0.1953004002571106, -0.9678215384483337, -0.7544847130775452, -0.1183178573846817, 0.4483914375305176, -0.39313942193984985, 0.022612962871789932, -0.4596097469329834, -0.17486116290092...
def check _ unique ( self, cr, uid, ids, context = none ) : for rec in self. browse ( cr, uid, ids, context = context ) : # if rec. fuel _ amount < = 0. 0 : # raise osv. except _ osv ( _ ('error'), _ ('fuel amount should be greater than zero!') ) idss = self. search ( cr, uid, [ ('fuel _ distance _ id ','= ', rec. fuel...
[ -0.5243529081344604, -0.553575873374939, 0.732883870601654, 0.09135621041059494, 0.28048384189605713, -0.2722930908203125, -0.01902444288134575, 0.9086022973060608, -0.1875610202550888, -0.1934654414653778, 0.6421579122543335, -0.20929592847824097, 0.059617042541503906, 0.9765833616256714,...
def test _ delete _ no _ token ( client, session, model ) : response = client. delete ( " / models / 1 " ) assert response. status _ code = = 401
[ -0.2738565504550934, -0.16587397456169128, 0.15451458096504211, 0.5038593411445618, 0.43547067046165466, 0.5956278443336487, -0.15156547725200653, -0.07985509932041168, 0.6786521077156067, -0.713760256767273, -1.0845658779144287, -0.12932339310646057, 0.3114904761314392, -0.435461610555648...
def loadcalibrationfile ( filename, cname ) : ci = camerainfo ( ) try : f = open ( filename ) calib = yaml. load ( f ) if calib is not none : if calib ['camera _ name']! = cname : rospy. logwarn ( " [ " + cname + " ] does not match name " + calib ['camera _ name'] + " in file " + filename ) # fill in camerainfo fields ...
[ 0.913410484790802, -1.120034098625183, 0.6527972221374512, 0.14687035977840424, -0.7272757291793823, 0.8312568068504333, -0.13828733563423157, 0.041111964732408524, -0.4004603326320648, 0.5868071913719177, -0.2954050302505493, -0.8583278059959412, -0.4634172022342682, 0.28454336524009705, ...
def answers _ count ( post ) : cursor. execute ('''select posts. pid from posts, answers where answers. pid =?'' ', ( post [ 0 ], ) ) if _ answer = cursor. fetchall ( ) conn. commit ( ) if if _ answer = = [ ] : pass else : post [ 7 ] ='n / a'return post
[ 0.42927315831184387, -0.21051886677742004, 0.5752764940261841, 0.1032041534781456, 0.48536375164985657, -0.019497552886605263, 0.3961833119392395, -0.26683130860328674, -0.24414610862731934, 0.8051033616065979, 0.3177149295806885, -1.3230208158493042, -0.2522605061531067, 0.218737199902534...
def partial _ fit ( self, x, y = none, classes = none, sample _ weight = none ) : if len ( x. shape ) = = 1 : x = x. reshape ( - 1, 1 ) if len ( y. shape ) = = 1 : y = y. reshape ( - 1, 1 ) r = x. shape [ 0 ] if y is not none : r _ t = y. shape [ 0 ] if r! = r _ t : raise valueerror ( " batch size of x is different fro...
[ -0.043900616466999054, -0.5264280438423157, 0.9661316871643066, 0.47953179478645325, -0.5659536719322205, 0.1532374769449234, 0.3614041805267334, -0.3520700931549072, -0.03584018349647522, 0.16983658075332642, 0.335586279630661, 1.0479896068572998, -0.6874662041664124, 1.0204665660858154, ...
def get _ first _ element ( future = first _ value _ future ) : try : yield future. result ( ) except stopiteration : return
[ -0.32918259501457214, 0.5574089884757996, 0.5541229844093323, 0.3825312852859497, 0.4159732162952423, -0.4622424244880676, -0.8053832650184631, -0.12451930344104767, -0.496172696352005, -1.004267930984497, 0.46914348006248474, -0.2900136411190033, 0.1428118646144867, 0.5021829605102539, ...
def _ _ pos _ _ ( self ) : res = matrix ( self. m, self. n ) for i in range ( self. m ) : for j in range ( self. n ) : val = + self [ i, j ] res [ i, j ] = val return res
[ -0.5911988615989685, -1.047243595123291, 0.4505445063114166, -0.5775940418243408, -0.1370241492986679, -0.40680059790611267, 0.0770820677280426, 0.21243508160114288, -0.08179584890604019, -0.5896208882331848, 0.15524603426456451, -0.7792240381240845, -0.2688538134098053, -0.135098651051521...
def keypressevent ( self, event ) : if event. key ( ) = = ( qtcore. qt. controlmodifier and qt. key _ z ) : cif = self. frame _ dapi _ 2d _ sgm. currentindex hh = self. frame _ dapi _ 2d _ sgm. view. viewrange ( ) self. nucs _ 2d _ sgm [ cif, :, : ] = self. bufframe self. frame _ dapi _ 2d _ sgm. setimage ( self. nucs ...
[ -0.6262491345405579, -0.1254187673330307, 0.6477417945861816, 0.029789160937070847, -0.0024471799843013287, 0.2198178470134735, 0.48470425605773926, -0.5991235375404358, 0.7003233432769775, -0.47393473982810974, -0.10250268876552582, 0.4846836030483246, 0.07357383519411087, 0.8192521333694...
def find _ activity _ with _ id ( self, activity _ id, schedule ) : activities = schedule. activities activity _ type = activity _ id. type date _ time = to _ datetime ( activity _ id. when, timezone ) date = date _ time. date ( ) if date _ time else none search _ by _ type = date _ time is none search _ by _ date = no...
[ 0.03425997495651245, -0.35735970735549927, 0.8670840263366699, 0.36248230934143066, 0.7794269919395447, -0.9400447010993958, 0.45855650305747986, -0.8112152218818665, -0.030163995921611786, 0.5615177750587463, 0.8832662105560303, 0.8187583684921265, -0.24754618108272552, 0.0598122850060462...
def test _ display _ formatted ( ) : pytest. debug _ func ( ) fmt = " % h : % m % p on % b % d, % y " now = time. time ( ) exp = xtime ( fmt = fmt, when = now ) wobj = nldt. moment ( now ) # payload assert wobj ( fmt ) = = exp
[ 0.5374636054039001, -0.6481204032897949, 0.5553905367851257, -0.5840352177619934, -0.32451507449150085, 0.26782190799713135, -1.1957876682281494, -1.3354310989379883, 0.20368005335330963, 0.18113678693771362, 0.34779515862464905, 0.21773207187652588, -0.15959754586219788, 0.883150756359100...
def get _ error _ matrix ( hypes, result, gt _ image _ path ) : img = scipy. misc. imread ( gt _ image _ path, mode ='rgb') conf _ dict = { } # map colors to classes default = 0 for i, cl in enumerate ( hypes [ " classes " ] ) : for color in cl [ " colors " ] : conf _ dict [ color ] = i if color = = " default " : defau...
[ -1.4271742105484009, 0.06863687932491302, 0.6166288256645203, 0.213408961892128, 0.6420034170150757, -0.4116022288799286, 0.28603389859199524, -0.2149277776479721, -0.902942419052124, 0.4657438099384308, 0.4580717980861664, 0.007161294110119343, -0.010340803302824497, -0.08433268964290619,...
def separate _ int ( filename ) : return int ( filename [ : len ( filename ) - len ( ext ) ] )
[ -0.18346382677555084, -0.47960731387138367, 0.5442506670951843, -0.6907179355621338, -0.6494536995887756, 0.3545084297657013, 0.7746122479438782, 0.25760164856910706, -0.5770617723464966, -0.273833304643631, -0.5973435640335083, -0.15449975430965424, -1.0322186946868896, -0.745083510875701...
def display ( self ) : for parts in self. messages [ self. state ] : print ( * parts, sep = '.')
[ 0.6702374219894409, -0.9382880926132202, 0.33511948585510254, -0.6369450092315674, 0.22173115611076355, 0.5506289601325989, -0.003935982473194599, -1.0222501754760742, -0.34599047899246216, 0.1717410683631897, 0.8856639266014099, 1.0570333003997803, -0.38475239276885986, 0.7748807668685913...
def test _ sla _ delete _ sla ( self ) : pass
[ 0.4727458357810974, -1.0218477249145508, 0.18867315351963043, 0.6438737511634827, 0.20761150121688843, 0.09495627135038376, 1.407926321029663, 0.5992960929870605, 1.9100029468536377, -0.5158200263977051, -0.173257976770401, 0.6617627143859863, -0.782526969909668, 0.8415302038192749, -0.4...
def validate _ route _ tag ( route _ tag ) : route _ tag = str ( route _ tag ) try : route = route. objects. get ( tag = route _ tag ) except route. doesnotexist : raise validationerror ( message ='route with tag % ( route _ tag ) s does not exist ', params = {'route _ tag': route _ tag } ) else : return route _ tag
[ 0.3729819357395172, -0.8416145443916321, 0.14711129665374756, -0.19860966503620148, 0.528501570224762, 0.4916278123855591, -0.3508474826812744, 0.12994804978370667, -0.6604351997375488, 0.7582053542137146, 0.4958209991455078, -0.3312612771987915, -0.08172183483839035, 0.9848715662956238, ...
def load _ samples _ and _ items ( sample _ data, session, sample _ type, object _ type, location ) : new _ samples = [ ] for s in sample _ data : s [ " sample _ type " ] = sample _ type attr = { } for a in [ " name ", " sample _ type ", " description ", " project " ] : attr [ a ] = s. pop ( a ) attr [ " properties " ]...
[ -0.42163702845573425, -1.4777483940124512, 0.6584089398384094, -0.24217747151851654, -0.0059476587921381, 0.27879753708839417, -0.6795611381530762, 0.04884254187345505, 0.3218272626399994, 0.6430999040603638, -0.47376322746276855, -0.47286558151245117, 0.4464821219444275, -0.02117705158889...
def get _ user _ details ( email : str ) : user = accountprocessor. get _ user ( email ) if not user [ " status " ] : raise validationerror ( " inactive user please contact admin! " ) bot = accountprocessor. get _ bot ( user [ " bot " ] ) account = accountprocessor. get _ account ( user [ " account " ] ) if not bot [ "...
[ 0.5263797044754028, 0.5835599899291992, 0.5775559544563293, 0.3082275390625, -0.20596684515476227, 0.7743398547172546, 0.6753743886947632, -0.21559369564056396, -0.1737126111984253, 0.18923673033714294, 0.3070574700832367, 0.35450223088264465, -0.05843575671315193, 0.16749081015586853, 1...
def vis _ square ( visu _ path, data, type ) : # normalize data for display data = ( data - data. min ( ) ) / ( data. max ( ) - data. min ( ) ) # force the number of filters to be square n = int ( np. ceil ( np. sqrt ( data. shape [ 0 ] ) ) ) padding = ( ( ( 0, n * * 2 - data. shape [ 0 ] ), ( 0, 1 ), ( 0, 1 ) ) # add ...
[ -0.21162769198417664, 0.06320969015359879, 1.072951078414917, -0.6892116069793701, -0.6256333589553833, -0.16661542654037476, 0.7044073939323425, 0.012701248750090599, 0.8859717845916748, 0.7582144737243652, 0.24555997550487518, 1.1737477779388428, 0.09382814913988113, 0.30259010195732117,...
def answerscreen ( self, question, uinput, correct ) : self. canvas. delete ( " all " ) # clear the screen if correct : # if user is correct, display the correct background and text self. canvas. create _ image ( 300, 300, image = self. correctimage ) self. canvas. create _ text ( 300, 50, text = " you were right! ", f...
[ 0.4513167142868042, 0.2016635686159134, 0.8340211510658264, -0.2857673764228821, -0.37180787324905396, 0.8159946799278259, 0.6501579880714417, -1.1829358339309692, 0.48735299706459045, -0.06348863244056702, 1.0354347229003906, 0.5278650522232056, -0.08059987425804138, 1.31218421459198, -...
def add _ token ( self, uri, http _ method ='get ', body = none, headers = none, token _ placement = none, * * kwargs ) : if not is _ secure _ transport ( uri ) : raise insecuretransporterror ( ) token _ placement = token _ placement or self. default _ token _ placement case _ insensitive _ token _ types = dict ( ( k. ...
[ -0.6209578514099121, -0.14914236962795258, 0.6576085090637207, -0.07817462831735611, 0.13199010491371155, 0.1548256129026413, -0.31411212682724, -0.23125672340393066, 0.0711708664894104, -0.8214051723480225, 0.5067232251167297, 0.7992554903030396, -0.5481029748916626, -0.5214334726333618, ...
def rot90ccw ( mat ) : # rotation matrix rot = np. array ( [ [ 0, 1 ], [ - 1, 0 ] ] ) # matrix coordinates coord = [ i for i in np. ndindex ( mat. shape ) ] nbp = mat. shape [ 0 ] # initialisations coord _ rot = [ ] mat _ rot = np. zeros ( ( mat. shape ) ) # apply the transformation on each pixel's coordinates for ii i...
[ -0.011159276589751244, 0.34846049547195435, 0.4680536389350891, -0.511730968952179, 0.3152722120285034, -0.2878764867782593, 0.5716098546981812, -0.5726150870323181, 0.3121013343334198, 0.5030344724655151, 0.4221482574939728, 0.04535336792469025, -0.48290061950683594, -0.2251918762922287, ...