text
stringlengths
25
2.19k
embedding
listlengths
768
768
def exomolqt ( self, path ) : # load pf self. empath = pathlib. path ( path ) t0 = self. empath. parents [ 0 ]. stem molec = t0 + " _ _ " + str ( self. empath. stem ) self. pf _ file = self. empath / pathlib. path ( molec + ". pf " ) if not self. pf _ file. exists ( ) : self. exomol _ pf _ download ( molec ) pf = exomo...
[ -0.16113784909248352, -0.762263298034668, 0.5560481548309326, -0.8381147980690002, 0.23968182504177094, 0.11236459761857986, -0.2528649866580963, -0.3352707028388977, -0.6549579501152039, 0.4402715265750885, -0.9017164707183838, 0.17149138450622559, 0.3572055697441101, -0.356655091047287, ...
def test _ nutch _ crawl ( self ) : response = self. get ('base : crawl _ space : crawl ', * * self. crawl _ slugs ) assert'crawl _ space / crawl. html'in response. template _ name crawl = get _ object ( response ) assert crawl. project = = self. test _ project response = self. post ('base : crawl _ space : crawl ', da...
[ 0.35917508602142334, -0.043451420962810516, 0.2251565009355545, 0.23968979716300964, 2.0240917205810547, 0.5410914421081543, 0.10881293565034866, 0.11023104190826416, -0.22509311139583588, -0.5546359419822693, -0.44030171632766724, 1.1594408750534058, -0.7212672233581543, 0.102201171219348...
def _ _ init _ _ ( self, vars, types = none, name = none ) : # check arguments if isinstance ( vars, cpovalue ) : assert vars. is _ kind _ of ( type _ intervalvararray ) vars = vars. value else : assert is _ array _ of _ type ( vars, cpointervalvar ), " argument'vars'should be an array of cpointervalvar " if types is n...
[ -0.6855405569076538, 0.10559192299842834, 0.48355552554130554, 0.8158443570137024, -0.28714385628700256, 0.2712884545326233, 0.5496797561645508, -0.29458385705947876, -0.19202782213687897, 0.8123845458030701, -0.5169264078140259, -0.40132662653923035, -1.153765320777893, 0.4894783198833465...
def sampling _ based _ sobol _ indices _ from _ gaussian _ process ( gp, variables, interaction _ terms, nsamples, sampling _ method ='sobol ', ngp _ realizations = 1, normalize = true, nsobol _ realizations = 1, stat _ functions = ( np. mean, np. median, np. min, np. max ), ninterpolation _ samples = 500, nvalidation ...
[ -0.2021757811307907, -0.02632676623761654, 0.6336239576339722, 0.22497576475143433, -0.5520087480545044, -0.3121667802333832, 0.4385170042514801, -0.46739012002944946, 0.09090138971805573, 0.924584686756134, 0.22163109481334686, 0.10775404423475266, 0.15085139870643616, -0.0168669614940881...
def get _ file _ filters ( self ) : file _ filters = none if self. get _ terraref _ metadata is none and self. experiment _ metadata : if'extractors'in self. experiment _ metadata : extractor _ json = self. experiment _ metadata ['extractors'] if self. sensor _ name in extractor _ json : if'filters'in extractor _ json ...
[ -0.344016432762146, -0.7827174663543701, 0.5415077805519104, -0.011744578368961811, 0.9181936383247375, -0.18817615509033203, -0.7988706827163696, -0.3547332286834717, -0.24953965842723846, 0.7228564023971558, 0.7921046018600464, 0.5574397444725037, 0.4279313385486603, 0.29008135199546814,...
def make _ minimum _ coin _ change ( options, target ) : result = [ ] for coin in sorted ( options, reverse = true ) : if target < coin : continue amount, target = divmod ( target, coin ) result + = [ coin ] * amount if target > 0 : # it can't create the amount return none return result
[ -0.9349664449691772, -0.2355078160762787, 0.5834158062934875, -0.10868964344263077, 0.05410512164235115, -1.0738270282745361, -0.30566123127937317, -1.3546171188354492, 0.2252867966890335, 0.6368038058280945, 0.04487753286957741, 0.7195122838020325, -0.5942803621292114, -0.941644012928009,...
def show _ category _ screen ( self, category _ id, is _ prev _ screen = false ) : if not is _ prev _ screen : self. _ push _ prev _ screen _ to _ history ( ) self. sm. transition. direction ='left'else : self. sm. transition. direction ='right'if self. sm. current = ='category': self. category _ screen, self. other _ ...
[ -0.0261760875582695, 0.661196231842041, 0.8106675148010254, -0.07291753590106964, 0.16234377026557922, 0.0010259003611281514, 1.0871944427490234, -0.15542039275169373, 0.994851291179657, 0.8454931378364563, 0.545885443687439, 0.8309987187385559, 0.9034772515296936, 1.920333981513977, -0....
def get _ free _ port ( initial _ port : optional [ int ] = none ) - > iterable [ port ] : return _ unused _ ports ( initial _ port = initial _ port )
[ 0.0937790498137474, -0.0150398975238204, 0.33135050535202026, 0.16143731772899628, 0.9851933717727661, -0.7685403227806091, 0.17227225005626678, -0.8499294519424438, -0.32004401087760925, -0.32449397444725037, -0.19005396962165833, 0.7121158838272095, -0.6999076008796692, -0.15349023044109...
def months ( self ) : return months _ hebr
[ 1.365372896194458, -0.5412738919258118, 0.32998502254486084, 0.15425243973731995, 0.6705560088157654, 1.8987822532653809, -0.5731868147850037, 0.6959291696548462, 0.7146692872047424, -1.4348864555358887, -0.010841147042810917, -1.0425134897232056, -0.5608165860176086, 0.6958717703819275, ...
def test _ campaign _ search ( self ) : pass
[ -0.3611146807670593, 0.01527662668377161, 0.061109304428100586, 0.6473561525344849, 0.8683993816375732, 0.7663834095001221, 0.8488781452178955, 0.16979318857192993, -0.21124142408370972, -1.0104260444641113, -0.04173799976706505, -0.27790215611457825, -1.4067050218582153, -0.15942344069480...
def _ _ init _ _ ( self, canvas, catalogue _ model ) : self. canvas = canvas self. catalogue _ model = catalogue _ model self. event _ feature _ ids = none self. sources = dict ( ) self. catalogue _ layer = make _ inmemory _ layer ( " catalogue " ) self. populate _ catalogue _ layer ( catalogue _ model. catalogue ) sel...
[ 0.2507728040218353, -0.27996861934661865, 0.46937739849090576, 0.02087615430355072, 0.3164178133010864, -0.4290868043899536, 0.47252127528190613, -0.4505580961704254, 0.20874735713005066, -0.7578860521316528, -0.33010241389274597, -0.19818948209285736, 0.03983783721923828, 0.92582696676254...
def exists _ fb _ event ( self, fb _ event _ id : str ) : event _ docs = self. eventcollectionref. where ( " fbeventid ", " = = ", fb _ event _ id ) \. get ( ) for doc in event _ docs : return doc. id return none
[ 0.7611024975776672, -0.5722065567970276, 0.5689393877983093, 0.35455626249313354, 0.6989186406135559, 0.1737598478794098, 0.2754962742328644, -0.48382464051246643, 0.01863076165318489, 0.5250394940376282, -0.08102704584598541, -0.20863381028175354, -0.7593910694122314, 0.5650059580802917, ...
def get _ distance ( block _ pos, pointer _ pos ) - > float : delta _ distance _ x = abs ( block _ pos [ 0 ] - pointer _ pos [ 0 ] ) * * 2 delta _ distance _ y = abs ( block _ pos [ 1 ] - pointer _ pos [ 1 ] ) * * 2 distance = math. sqrt ( delta _ distance _ x + delta _ distance _ y ) return distance
[ 0.8927098512649536, -1.045034646987915, 0.641338586807251, 0.2121092975139618, -0.47173917293548584, 0.2502921223640442, -0.3884179890155792, 0.44177237153053284, -0.7203183174133301, 0.8371039628982544, -0.6163212060928345, 0.6066334247589111, -0.8635966777801514, 0.25994282960891724, 1...
def _ on _ keyboard _ up ( self, keyboard : keyboard, key _ code : tuple ) - > none : self. pressed _ keys. remove ( key _ code [ 1 ] )
[ -0.7178136706352234, 0.3512774705886841, 0.5844483375549316, 0.6277785897254944, 0.02102278731763363, -0.508063018321991, 0.5702377557754517, 1.2318147420883179, -0.6252833604812622, 1.9916017055511475, -0.8668920397758484, 0.26821374893188477, -0.36377593874931335, -0.33734163641929626, ...
def test _ repeat _ query _ approved ( self ) : mission = missionfactory ( ) pages = pagefactory. create _ batch ( 3, mission = mission ) users = userfactory. create _ batch ( 2 ) page1 = mission. next _ page _ for _ user ( users [ 0 ] ) page. objects. filter ( pk = page1. pk ). update ( approved = true ) page2 = missi...
[ 0.029021870344877243, 0.04129083454608917, 0.5277453064918518, 0.7415407299995422, -0.28970733284950256, 0.8076921105384827, -0.9214890003204346, -0.3989490270614624, -0.5398481488227844, 0.44861698150634766, 0.46493014693260193, 0.34243306517601013, -0.09279285371303558, 0.026766795665025...
def get _ latest _ revision ( self, device : str ) - > str : return self. config [ " devices " ] [ device ] [ " latest " ]
[ -0.47088342905044556, 0.08601568639278412, 0.23718512058258057, -0.12521636486053467, -0.6136777997016907, 0.20098192989826202, -0.13124628365039825, 0.18318937718868256, 0.009790959767997265, 0.20649242401123047, 0.8285870552062988, 0.2751406729221344, 0.022694114595651627, -0.80515098571...
def test _ target _ string ( self ) : band = self. band constraint _ name = band. raw ( " " " select constraint _ name from information _ schema. constraint _ column _ usage where column _ name ='name'and table _ name ='band'; " " " ). run _ sync ( ) [ 0 ] [ " constraint _ name " ] query = band. insert ( band ( name = ...
[ -0.2910248339176178, 0.09057870507240295, 0.4166514575481415, -0.22058288753032684, 0.6454149484634399, 0.3641298711299896, 0.02957567200064659, -0.48992568254470825, 0.11436295509338379, 0.3662833571434021, -0.047277819365262985, 0.09512953460216522, -0.5953719019889832, -1.20709609985351...
def for _ y ( ) : row = 7 col = 5 for i in range ( row ) : for j in range ( col ) : if ( ( i - j = = 0 or i + j = = 4 ) and i < 3 ) or j = = 2 and i > 2 : print ( " * ", end = " " ) else : print ( " ", end = " " ) print ( )
[ 0.27711400389671326, 0.45763108134269714, 0.7440903782844543, 0.9984562397003174, -0.41425856947898865, 0.07384636253118515, 0.5042601823806763, -0.4139217436313629, -0.4473299980163574, 0.22397656738758087, 0.17921118438243866, 0.2905198931694031, -0.12674595415592194, 0.28811877965927124...
def fate ( self, row, col ) : line = self. fates. take ( row, axis = 0, mode ='wrap') fate = line. take ( col, mode ='wrap') return fate
[ 0.6079174876213074, -0.11353646218776703, 0.2855451703071594, 0.27256134152412415, 0.2576320469379425, -0.6305019855499268, -0.897872269153595, -0.24801282584667206, -0.415147602558136, -0.005754424259066582, 0.9625585675239563, 0.6057902574539185, 1.452197551727295, -0.36168795824050903, ...
def hint _ pose _ qy ( self, qy ) : if not number. is _ real _ number ( qy ) : raise validationerror ( " quarternion y component must be a number ( value is % s ) " % qy ) elif not number. is _ finite ( qy ) : raise validationerror ( " quaternion y component must be a finite number " " ( value is % s ) " % qy ) else : ...
[ -0.28368300199508667, -0.21408790349960327, 0.7564300894737244, -0.14023971557617188, -0.21521928906440735, 0.9150411486625671, 0.9643427133560181, -1.5839720964431763, 0.4679211378097534, -0.9635806679725647, -0.21484561264514923, -0.4888448119163513, -0.23763173818588257, 0.1684495955705...
def _ remove _ empty ( self, df ) : # 空 col, row # df. set _ index ('', inplace = true ) drop _ col = [ ] for col in df. columns : if " unnamed " in col : drop _ col. append ( col ) df. drop ( columns = drop _ col, inplace = true ) df. dropna ( how = " all ", inplace = true ) return df
[ -0.23874644935131073, 0.11806284636259079, 0.5035043358802795, -0.14716112613677979, 0.09218832105398178, 0.21056614816188812, 0.25766465067863464, 0.6677613854408264, -0.23126819729804993, 0.445398211479187, -0.45475104451179504, -0.25938093662261963, 0.7493422627449036, 0.070822618901729...
def processallframes ( self ) : print ('you chose frame all frames') print ( self. directorychosen ) if self. directorychosen : # temp addition self. processer. processframerange ( self. data, startframe = 1, endframe = 1, procstate = self. state, procall = true, writestate = true ) else : self. msgbox = qmessagebox ( ...
[ -0.11387264728546143, -0.5239937901496887, 0.6286675333976746, 0.4765705168247223, 0.3196057975292206, -0.7629389762878418, 1.2185758352279663, -0.5028315782546997, 0.8344647288322449, -0.8831784725189209, 0.10335425287485123, 0.5394333004951477, -0.30925068259239197, 1.4924290180206299, ...
def get _ tasks ( cls, src _ tasks : dict [ str, dict ] = src _ tasks ) - > union [ list [ basetask ], none ] : src _ tasks = deepcopy ( src _ tasks ) if not src _ tasks or type ( src _ tasks ) is not dict : logger. exception ( f " wrong tasks src _ tasks " ) return none tasks = [ ] for src _ task in src _ tasks. value...
[ -0.29949772357940674, 0.5259647369384766, 0.5828903317451477, 0.9294058084487915, 0.31239184737205505, 0.24287573993206024, -0.09508717805147171, 0.11837933212518692, 0.16826610267162323, 0.6242268681526184, -0.5463392734527588, 0.16860461235046387, 0.6309672594070435, 0.4315919876098633, ...
def save _ to _ json _ file ( my _ obj, filename ) : with open ( filename, " w ", encoding = " utf8 " ) as f : f. write ( json. dumps ( my _ obj ) )
[ -1.1953856945037842, -1.7138570547103882, 0.5133618116378784, -0.7213426232337952, -0.25400203466415405, 0.3210047781467438, 0.11071227490901947, 0.19448219239711761, -0.9996926188468933, 0.3365519344806671, -1.6311531066894531, 0.2706162631511688, 0.4658338129520416, 0.11781642585992813, ...
def intencode ( data, inttype, invalidvalue = false, rangemin = none, rangemax = none, keepsign = true, intfactor = false, invfactor = false, maxfactor = 0, forcefactor = 0, intround = true ) : # convert character code if isinstance ( inttype, str ) : inttype = np. dtype ( inttype ) # get integer type limits info = np....
[ -0.35675960779190063, -0.566709041595459, 0.9306889772415161, 0.05285770446062088, -0.7906452417373657, -0.32581576704978943, -0.18916983902454376, -0.7512990832328796, 0.1166905090212822, 0.17442959547042847, -0.5166058540344238, 0.9024007320404053, -0.554412305355072, 0.4516374170780182,...
def _ _ init _ _ ( self, voxel _ size ) : self. limits = [ none, none, none ] # convention : this is saved always in vox coordinates self. shape = np. array ( [ none, none, none ] ) self. voxel _ size = np. array ( voxel _ size ) self. id = none
[ 0.8620703816413879, -0.6808720231056213, 0.4599301517009735, 0.05382164195179939, 0.20860880613327026, -0.7814663052558899, -0.7482988834381104, 0.2855946719646454, 0.5543991327285767, -0.22633852064609528, -0.8819646239280701, -0.12471403926610947, -0.2929690182209015, 0.1903647631406784,...
def count ( self ) : names = [ ] for item in key _ value _ list ( self. playbook ) : # [ ( key, value ) ] if item [ 0 ] = ='name': item = re. sub ( r'\ s + ','', str ( item [ 1 ] ) ) names. append ( item. strip ( ) ) frequencies = counter ( names ). values ( ) # counts the elements'frequency unique = sum ( 1 for v in f...
[ -0.8259456157684326, 0.36220961809158325, 0.655258059501648, 0.055114489048719406, 0.05489295348525047, -0.20843903720378876, 0.6025713086128235, 0.34253737330436707, 0.2482733130455017, -0.1463296264410019, -0.9470174908638, -0.2673349678516388, -1.1936540603637695, 0.5966389179229736, ...
def simple _ graph ( problem _ based : str, aggregation _ mode : str ='average') - > graphobject : nodes = np. array ( [ [ 11, 21 ], [ 12, 22 ], [ 13, 23 ], [ 14, 24 ] ] ) arcs = np. array ( [ [ 0, 1, 10 ], [ 0, 2, 40 ], [ 1, 0, 10 ], [ 1, 2, 20 ], [ 2, 0, 40 ], [ 2, 1, 20 ], [ 2, 3, 30 ], [ 3, 2, 30 ] ] ) tn = {'n': n...
[ 0.04154307022690773, 0.4555220901966095, 0.8571904301643372, -0.14840549230575562, -0.006095625460147858, 0.014836288057267666, 0.44285404682159424, -0.15173013508319855, 0.2550657391548157, 0.14777682721614838, 0.7515493035316467, 0.5298929214477539, 0.7562771439552307, -0.922327160835266...
def _ change _ quantization _ scope ( self, model, original _ accuracy _ drop, fully _ quantized _ metrics _ per _ sample ) : model = self. _ quantize _ model ( model, quantize _ with _ low _ bitwidth = false ) all _ modified _ nodes _ names = [ ] acc _ drop _ lambda = lambda a : ( original _ accuracy _ drop [ a ] - se...
[ -0.7204002141952515, -0.1255793571472168, 0.7225853800773621, -0.44547954201698303, 0.1617308109998703, -1.0578149557113647, 0.8099629878997803, -0.6682818531990051, -0.6987109780311584, 0.5668283700942993, -0.08294375985860825, -0.02433786541223526, 0.4552876055240631, 0.28557276725769043...
def _ _ restart _ vm _ worker ( self, q ) : while true : try : azure _ session, vm _ name = q. get ( ) self. _ logger. info ('rebooting vm [ % s ] ', vm _ name ) response = \ azure _ session. compute _ client. virtual _ machines. restart ( azure _ session. config ['resource _ group'], vm _ name ) while not response. do...
[ -0.021438058465719223, 0.2524544596672058, 0.3372536301612854, 0.16537880897521973, -0.18754921853542328, -0.1123742014169693, -0.6274293661117554, -0.3201272785663605, -0.49145033955574036, 1.4813517332077026, -0.20713141560554504, 0.17494145035743713, -0.6041841506958008, -0.658585548400...
def from _ pb ( cls, pb ) : obj = cls. _ from _ pb ( pb ) obj. _ pb = pb return obj
[ 0.17012080550193787, -0.4088360667228699, 0.4715416431427002, 0.6962045431137085, -0.5200523138046265, 0.9105790257453918, -0.29938703775405884, -0.3546733260154724, 0.7127754092216492, -0.6453820466995239, -0.2557334303855896, -0.521204948425293, -0.743156909942627, -0.5874475240707397, ...
def _ mandatory _ key _ exists _ original _ patch ( element ) : mand _ key _ level _ one = " request _ test " mand _ key _ level _ two = [ " preprocess _ functions _ sequence _ pk ", " field _ name " ] if mand _ key _ level _ one not in element. keys ( ) : return mand _ key _ level _ one else : for request _ info _ dic...
[ -1.1077330112457275, -0.6115099191665649, 0.6326373815536499, -0.11718056350946426, -0.4132339656352997, 0.8328778743743896, -0.3835790753364563, -0.023974891752004623, -0.433224618434906, 0.11199016124010086, 0.39043018221855164, 0.07253573834896088, -0.1678050309419632, 0.743832588195800...
def add _ grade ( self, student, grade ) : try : self. grades [ student. get _ id _ num ( ) ]. append ( grade ) except keyerror : raise valueerror ( " student not in the grade book " )
[ -0.5535895824432373, 0.13001278042793274, 0.2061583250761032, 0.7016522288322449, 0.29836058616638184, 0.952873945236206, -1.600066900253296, 0.4012160003185272, -1.026124358177185, 0.032661791890859604, 0.1880890130996704, -0.23955200612545013, -1.383866786956787, 0.6769513487815857, -0...
def pythoncode ( self, directory, config = configuration ( ) ) : cmsisdsp. sdf. scheduler. pythoncode. gencode ( self, directory, config )
[ -0.8754255175590515, 0.1660015881061554, 0.2557636797428131, 0.06798914074897766, 0.15912827849388123, 0.0019600163213908672, -0.08562230318784714, 0.7468501329421997, 0.29525914788246155, -0.037504035979509354, -0.2359650433063507, 0.2518065571784973, 0.21200565993785858, 0.81619173288345...
def visibilities ( interferometer, include = none, plotter = none ) : plotter. plot _ grid ( grid = interferometer. visibilities )
[ 0.7540743350982666, 1.0865757465362549, 0.5067105293273926, 0.2663169801235199, -0.7403337359428406, -0.040674760937690735, 0.7269368171691895, 0.8499215841293335, 0.41228699684143066, 0.14573709666728973, 0.11915260553359985, 0.36327606439590454, -0.7652446627616882, 1.4400949478149414, ...
def token _ features ( tokens, feats ) : for k in counter ( tokens ). keys ( ) : feats [ " token = " + k ] = counter ( tokens ). get ( k ) pass
[ -0.3678440451622009, -0.7130476236343384, 0.26943716406822205, -0.1532345414161682, 0.2992957532405853, -0.8585542440414429, -0.6136278510093689, 0.9659956097602844, -0.6674575805664062, -0.47114261984825134, -1.9193495512008667, 0.414947509765625, 0.6928696036338806, 0.18133001029491425, ...
def _ get _ log ( ) : logger = logging. getlogger ('twitchbot') logger. setlevel ( logging. critical ) ch = logging. streamhandler ( ) ch. setlevel ( logging. debug ) ch. setformatter ( _ get _ formatter ( ) ) logger. addhandler ( ch ) logger. setlevel ( logging. debug ) return logger
[ 0.814903974533081, -0.46458345651626587, 0.4185553789138794, -0.4536127746105194, -0.13080084323883057, -0.3992025852203369, -1.136488676071167, 0.1623171865940094, -0.5833014249801636, -1.2770988941192627, 0.14968645572662354, 0.1361178159713745, -0.03430706635117531, 0.5966010093688965, ...
def random _ direction ( ) : return choice ( ( - 1, 1 ) )
[ -1.3630245923995972, -0.4203982353210449, 0.42776966094970703, 0.5836066007614136, -0.008440975099802017, 1.0538421869277954, 0.3803592622280121, -0.16519826650619507, 0.8926998376846313, -0.4400266706943512, 0.32368728518486023, 0.3952830135822296, -0.6602696776390076, -0.2312709242105484...
def encode ( self, value ) : return value
[ -0.29959020018577576, -0.32507258653640747, 0.15806080400943756, 0.36666402220726013, -0.316652774810791, 0.7254235744476318, 0.15477816760540009, -1.1376875638961792, 1.0800957679748535, -0.6919984817504883, -0.54703688621521, 0.3843827247619629, -0.4652893841266632, 0.15959443151950836, ...
def load _ data ( filename ) : try : with np. load ( filename ) as data : x _ train = data ['x _ train'] / 255 y _ train = data ['y _ train'] x _ test = data ['x _ test'] / 255 y _ test = data ['y _ test'] # reshaping the data for easier feed into the model x _ train = x _ train. reshape ( ( - 1, x _ train. shape [ 1 ]...
[ -0.20170210301876068, -0.21098367869853973, 0.6792813539505005, -0.8420931100845337, 0.5262697339057922, 0.41728413105010986, -0.12639719247817993, 0.20428405702114105, -0.7495363354682922, 0.15362165868282318, -0.2789188325405121, -0.036532364785671234, -0.07458549737930298, -0.3196022212...
def getcollectionsize ( self ) : return self. getcollectionsize
[ -0.283420592546463, -0.023371325805783272, 0.5450992584228516, -0.07233574986457825, 0.40274301171302795, 0.21118514239788055, 0.8525269627571106, -0.5177072286605835, -0.15957804024219513, -1.1011816263198853, -0.8008455038070679, -0.2787446975708008, -0.470392644405365, 0.437704890966415...
def main ( ) : setup ( ) calc _ matrix ( )
[ 0.7440185546875, 0.5100895762443542, 0.33346185088157654, 1.3150585889816284, 0.6792312264442444, -0.34731611609458923, 1.994665503501892, 0.8448788523674011, -0.05831671506166458, 0.2248840034008026, 0.007064368110150099, -0.3099066913127899, 0.27424517273902893, 0.19406826794147491, 0....
def listeners _ without _ writes ( listeners : dict [ str, int ] ) - > dict [ str, int ] : return { key : value for key, value in listeners. items ( ) if key! = event _ homeassistant _ final _ write }
[ -0.7483006119728088, -1.3896697759628296, 0.21860191226005554, -1.0410552024841309, -0.33046630024909973, 0.18321070075035095, 0.3889656066894531, -0.2512030601501465, -0.28162461519241333, 0.32591545581817627, 0.21532216668128967, -0.4895060360431671, -0.7580391764640808, 0.16879026591777...
def pytest _ report _ header ( config ) : if config. getoption ( " - - seq - config " )! = none and config. getoption ( " - - wooqi " ) is true : global _ var ['config'] = configtest ( config. getoption ( " - - seq - config " ) ) if global _ var ['config']. config _ file _ exists is false : print ( " \ n " ) print ( " ...
[ 0.6209772825241089, -0.14345774054527283, 1.0901556015014648, 0.005744589492678642, 0.49107125401496887, -0.04387979581952095, 0.49349597096443176, 0.28751009702682495, -0.31525537371635437, 1.3647706508636475, -0.08300916850566864, 0.06247686967253685, -1.0430907011032104, 0.5775724053382...
def dartmove ( self, context = none, residuelist = none ) : if residuelist = = none : residuelist = self. residuelist if context = = none : self. nc _ context stateinfo = self. context. getstate ( true, true, false, true, true, false ) olddartpos = stateinfo. getpositions ( asnumpy = true ) olddartpe = stateinfo. getpo...
[ -0.7565553784370422, -0.6149811148643494, 0.9165941476821899, -0.15792927145957947, -0.42748889327049255, 0.33422958850860596, -0.11357034742832184, 0.7886695265769958, 0.6295259594917297, 0.12753890454769135, 0.05747195705771446, -0.2365165501832962, -0.19866643846035004, 0.34922599792480...
def webpack _ async _ asset ( unique _ id ) : hook = hooks. webpackbundlehook. get _ by _ unique _ id ( unique _ id ) return hook. render _ to _ page _ load _ async _ html ( )
[ -0.05060788244009018, -0.27830439805984497, 0.46384233236312866, -0.9908133745193481, -0.15365192294120789, -0.7185221314430237, 0.3255365490913391, 0.5869658589363098, 0.5568620562553406, 0.7350395321846008, 0.8328089118003845, 0.4994499087333679, 0.34506893157958984, 0.12223296612501144,...
def test _ character _ name _ type ( self, mock _ stdout, mock _ user _ input ) : expected _ output = " welcome to the magical pokemon sud, helios! \ n " \ " before we begin, you will need to choose your pokemon. \ n " \ " from there, the adventure will begin. \ n \ n " character _ name ( ) self. assertequal ( mock _ s...
[ 0.10551438480615616, -0.4807300865650177, 0.4550926685333252, 0.5158981084823608, 0.13861584663391113, 0.09012601524591446, 0.14861787855625153, -0.7061473727226257, -0.10262803733348846, -0.2857007682323456, -0.5479146838188171, 0.4977787137031555, -0.0941249430179596, -0.2261549979448318...
def test _ list _ available _ locales ( self ) : test _ cases = ('af ','ar - sa ','de ','et ','pl ','ru ','pt - br ','zh - tw') locales = list _ available _ locales ( ). keys ( ) for language in test _ cases : self. assertin ( language, locales )
[ 0.15977193415164948, -0.584870457649231, 0.3036480247974396, 0.34685036540031433, 0.3391845226287842, 0.8635802268981934, -0.37869009375572205, 0.5492858290672302, 0.6049750447273254, 0.20624668896198273, -0.46428602933883667, -0.29548966884613037, -0.21734657883644104, 0.7272993326187134,...
def get _ continent _ floor _ regions ( self, continent _ id, floor _ id, * ids ) : return self. _ request ( " continents / { } / floors / { } / regions ". format ( continent _ id, floor _ id ), ids = ', '. join ( str ( id ) for id in ids ) )
[ -0.361552894115448, 0.015449903905391693, 0.15366341173648834, 0.42307400703430176, 1.0636065006256104, -0.03993874043226242, -0.33217987418174744, -0.28817009925842285, -0.9992879629135132, -0.38428401947021484, 0.5928239226341248, 0.18595491349697113, -1.0296473503112793, 1.3584102392196...
def process _ live _ data ( rec ) : # bcd decoding for key in [ " year ", " weekday ", " month ", " day ", " hour ", " minute ", " second " ] : rec [ key ] = bcd2int ( rec [ key ] ) stat0 = decode _ stat0 ( rec [ " stat0 " ] ) stat1 = decode _ stat1 ( rec [ " stat1 " ] ) # reassemble the record in a more practical form...
[ 0.5489968657493591, -0.9806987047195435, 0.773341715335846, -1.3126237392425537, -1.0111773014068604, -0.2836841344833374, 0.060171205550432205, 0.37281474471092224, -0.23275858163833618, -0.46096035838127136, -0.1919599324464798, 0.018672239035367966, -0.008648177608847618, 0.402483463287...
def add _ session ( self, session ) : start _ time = session. start _ time if start _ time! = self. current _ visit _ time : self. previousvisittime = self. current _ visit _ time self. current _ visit _ time = start _ time self. visit _ count + = 1
[ -0.7299692630767822, -0.29451778531074524, 0.6723885536193848, -0.12048133462667465, 0.49352315068244934, 0.1960642784833908, 0.887420654296875, -0.5247255563735962, 0.9213495850563049, 0.5539887547492981, -0.05945124104619026, 0.46212345361709595, -0.009010165929794312, 0.3618621826171875...
def get _ test _ scripts ( self ) - > list [ str ] : ctx = conda. base. context. context ( ) if ctx. root _ dir is none : raise packageerror ( " unable to locate the installed test scripts " f " of { self } because conda is not activated " ) conda _ root = path ( ctx. root _ dir ) test _ scripts = [ ] glob _ pattern = ...
[ 0.019221100956201553, -0.8779683113098145, 0.42429429292678833, 0.5142994523048401, 0.8861889243125916, 0.1594158113002777, 0.5406296849250793, -0.6419486999511719, 0.3024226427078247, 0.260252445936203, -0.0644143745303154, 0.7771195769309998, -0.39962238073349, 0.8911589980125427, -0.4...
def decode ( self, value ) : return super ( booleanfield, self ). decode ( {'0': false,'1': true } [ value ] )
[ -1.3857104778289795, -0.45967546105384827, 0.29193800687789917, -0.44917649030685425, -0.4246232509613037, 0.5364440679550171, -0.009112419560551643, 0.5151327252388, -0.01581759564578533, -0.03200840950012207, -0.9679945111274719, -0.3939393162727356, -0.7757047414779663, -0.3073680698871...
def single _ ray ( x, y, gamma, beta, tt, tc, fc ) : # # pulse parameters # dt = 1. 0 / ( 8. 0 * fc ) nt = int ( tt / dt ) nf = int ( ( nt - 1 ) / 2 ) df = 1 / ( nt * dt ) lif = df lff = df * nf fre = np. linspace ( lif, lff, nf, dtype = float ) desplaz = np. zeros ( len ( fre ), dtype = complex ) # nx1 = np. sin ( gam...
[ 0.3830941915512085, 0.3182660639286041, 0.7990543842315674, -0.21194107830524445, 0.19343097507953644, -0.2871682941913605, -0.10273228585720062, -0.05572160333395004, -0.09681086987257004, 0.9170016050338745, -0.6278613805770874, 0.18750503659248352, -0.23833662271499634, 0.39212849736213...
def split _ text _ logically _ on _ character _ limit ( text, character _ limit ) : text _ lines = [ ] if text : text _ list = text. split ('' ) temp _ text ='' old _ temp _ text ='' for text in text _ list : old _ temp _ text = temp _ text temp _ text + = text +'' if len ( temp _ text ) > character _ limit + 1 : text ...
[ 0.3673151135444641, -0.4952270984649658, 0.5666143894195557, -0.22964954376220703, -0.6492501497268677, -0.3466833531856537, -0.7765617966651917, 0.93208247423172, 0.8226150870323181, 0.8663930296897888, -0.1256343424320221, 0.3957662880420685, -0.36749568581581116, 0.34784847497940063, ...
def make _ lined _ polygon ( poly ) : line _ array = [ ] for i in range ( len ( poly ) ) : point0 = poly [ i - 1 ] point1 = poly [ i ] line = find _ line ( point0, point1 ) line _ array. append ( ( point0, point1, line ) ) return line _ array
[ -0.5260809659957886, -1.2409917116165161, 0.4892847537994385, 0.46984347701072693, 0.9447084665298462, 0.8077259063720703, -0.22303135693073273, -0.48895373940467834, 0.21977469325065613, -0.19690729677677155, -1.5473381280899048, -0.6426236033439636, -0.300791472196579, -0.361662179231643...
def transactions ( blockheight = directory _ block _ height ) : transactions = factomd. factoid _ block _ by _ height ( blockheight ) ['fblock'] tx _ dict = { } for tx in transactions ['transactions'] : tx _ dict. update ( tx ) tx _ dict. pop ('blockheight') tx _ dict. pop ('outecs') tx _ dict. pop ('rcds') tx _ dict. ...
[ 0.3978327810764313, 0.30813974142074585, 0.4884394109249115, -0.23390592634677887, -0.33215492963790894, -1.4223324060440063, 0.2800808548927307, -0.18629926443099976, -1.111911654472351, 0.8444463610649109, -1.0876638889312744, -0.2349182367324829, 0.14340519905090332, 0.43979933857917786...
def get _ user ( self, id : uuid ) - > optional [ users ] : user = select ( [ users ] ). where ( users. c. id = = id ). execute ( ). first ( ) return user
[ 0.09763965755701065, 0.33416426181793213, 0.24998818337917328, 0.5904720425605774, 1.0067795515060425, -0.9683805108070374, -0.5361916422843933, -0.5990076661109924, 0.12974365055561066, 0.2592988610267639, 0.12519465386867523, -0.0007438124157488346, -0.15489529073238373, -0.6196294426918...
def calc _ random _ walks ( g, max _ depth = none, use _ padding = false, legacy _ result _ type = true ) : assert g is not none g, _ = ensure _ cugraph _ obj _ for _ nx ( g, nx _ weight _ attr = " wgt " ) k = random. randint ( 1, 6 ) random _ walks _ type = " uniform " start _ vertices = g. select _ random _ vertices ...
[ -0.30249038338661194, 1.1132683753967285, 0.5187475681304932, 0.5990389585494995, -0.6048301458358765, -0.05929785221815109, 0.8668097257614136, -0.23374709486961365, 0.44736629724502563, 0.032299790531396866, -0.596531867980957, -0.36652672290802, -0.2876262962818146, 0.8087167739868164, ...
def get _ data ( wavs, id _ to _ text, maxlen = 50 ) : data = [ ] for w in wavs : id = w. split ( " / " ) [ - 1 ]. split ( ". " ) [ 0 ] if len ( id _ to _ text [ id ] ) < maxlen : data. append ( { " audio " : w, " text " : id _ to _ text [ id ] } ) return data
[ -0.6281570196151733, -0.3282318115234375, 0.4232495427131653, -0.9255216717720032, -0.654778778553009, -0.25214216113090515, -1.428860068321228, 0.0444684661924839, 0.46494343876838684, 0.42422419786453247, -1.189929723739624, -0.06361474841833115, -0.12688449025154114, -0.0214341506361961...
def test _ ingredient _ str ( self ) : ingredient = models. ingredient. objects. create ( name ='test ingredient ', user = sample _ user ( ) ) self. assertequal ( str ( ingredient ), ingredient. name )
[ 0.25299280881881714, -1.1464958190917969, -0.22519689798355103, -0.029392030090093613, -0.3116595447063446, 0.8703399300575256, -0.22156403958797455, -0.2634872794151306, 0.1523718237876892, 1.154153823852539, -0.3339868187904358, 0.03585611283779144, -0.28113049268722534, -0.6695827841758...
def test _ io _ should _ not _ print _ prefix _ if _ ouput _ prefix _ is _ false ( self ) : env. password = none env. no _ agent = env. no _ keys = true env. key _ filename = client _ privkey with password _ response ( ( client _ privkey _ passphrase, passwords [ user ] ), silent = false ) : with settings ( output _ pr...
[ -0.702014684677124, -0.6787881851196289, 0.4553132951259613, -0.19377148151397705, -0.5200961828231812, 0.1964317113161087, 0.39947453141212463, -0.044051095843315125, -0.0774109810590744, -0.26854729652404785, 0.06508544087409973, 0.24214069545269012, -0.3222220242023468, 0.30138990283012...
def _ abort ( self ) : try : self. _ finish ( ) except keyboardinterrupt : raise except baseexception : pass
[ 0.43655839562416077, 0.09166006743907928, 0.7215121984481812, 0.08507300913333893, -0.5713557004928589, 0.04066028445959091, -0.05955159664154053, -1.4851707220077515, -1.1389662027359009, 0.44749462604522705, 1.0127217769622803, -0.771837592124939, -0.9362751245498657, 0.37493476271629333...
def transform _ model _ levels _ to _ pressure ( path, field _ da, plevel = 85. 0, mm = true ) : # todo : do scipy. interpolate instead of np. interp ( linear ) # todo : add multiple plevel support import xarray as xr from aux _ functions _ strat import dim _ intersection import numpy as np if mm : pf = xr. open _ data...
[ -0.2420932501554489, 0.03760645538568497, 0.9089305996894836, -0.5531737208366394, 0.10401353985071182, 0.9712120890617371, 0.049666788429021835, 0.49073150753974915, -0.8977175354957581, 0.8708115816116333, -0.37904754281044006, -0.5524342060089111, 0.30429545044898987, 0.1656705737113952...
def linestring _ to _ points ( line ) : return line ['geometry']. coords
[ 0.12977692484855652, -0.947089672088623, 0.10729991644620895, -0.3946160078048706, 1.0637352466583252, 0.013603194616734982, -0.9240849614143372, 0.4937577545642853, -0.40713363885879517, 0.04377669841051102, -0.539609432220459, -0.06164166331291199, 0.06614895164966583, -1.801442384719848...
def wikiquery ( sqlquery ) : conn = pymysql. connect ( host ='enwiki. labsdb ', port = 3306, db ='enwiki _ p ', read _ default _ file ='~ /. my. cnf ', charset ='utf8') data = metaquery ( conn, sqlquery ) return data
[ -0.14212417602539062, -0.2301260381937027, 0.33106693625450134, -0.4842194616794586, -0.5406720638275146, -0.1257513463497162, -1.5865585803985596, 0.14397472143173218, -0.32291820645332336, 0.3514292538166046, 0.8686191439628601, 0.1571531891822815, -0.7026135921478271, 0.1429473459720611...
def add _ layer ( self, layer ) : if len ( self. layers ( ) ) > 0 and layer. weights ( ). shape [ 1 ]! = self. layers ( ) [ - 1 ]. weights ( ). shape [ 0 ] : raise self. badarchitecture ('incompatible layers') self. _ layers. append ( layer )
[ -0.15770293772220612, 0.9556029438972473, 0.5214504599571228, 0.6324715614318848, 0.5670569539070129, 0.6371233463287354, -0.014962958171963692, -1.1177161931991577, 0.8882725834846497, -0.43499448895454407, 0.1797671616077423, 0.12113774567842484, -0.6236679553985596, 1.2981129884719849, ...
def one _ sample ( x, y = none, reps = 10 * * 5, stat ='mean ', alternative = " greater ", keep _ dist = false, seed = none, plus1 = true ) : prng = get _ prng ( seed ) if y is none : z = x elif len ( x )! = len ( y ) : raise valueerror ('x and y must be pairs') else : z = np. array ( x ) - np. array ( y ) thepvalue = ...
[ -0.6514635682106018, 0.4376826882362366, 0.8034512996673584, -0.28239282965660095, -1.0093538761138916, 0.039864446967840195, 0.05520898103713989, 0.056464239954948425, 0.3999643921852112, 0.5143786668777466, 0.052929654717445374, 0.3348994255065918, 0.6498087644577026, -0.6901090741157532...
def _ _ init _ _ ( self, item _ list = none ) : if not item _ list : self. _ item _ list = [ ] else : self. _ item _ list = item _ list
[ -0.32124775648117065, 0.04995361343026161, 0.3278047740459442, 0.9370221495628357, 1.0867396593093872, -0.060055311769247055, -0.42759132385253906, 1.3282294273376465, 0.5326364040374756, -0.10038256645202637, -1.7000876665115356, -0.15483561158180237, -0.24846185743808746, 0.4892228841781...
def get _ field _ index ( self, field, table ) : if table = ='wp _ posts': field _ list = self. wp _ post _ fields elif table = ='page': field _ list = self. page _ fields else : raise systemerror ( f'unrecognized table : { table }') ndx = field _ list. index ( field ) return ndx
[ -0.6851212978363037, 0.3867030739784241, 0.3037351667881012, 0.11885516345500946, -0.2235620766878128, 0.3807843327522278, 0.22483518719673157, 0.22123154997825623, -0.7161831855773926, -0.23989029228687286, -0.5419368147850037, 0.4039861857891083, -0.021060653030872345, 0.2484701871871948...
def redirect _ stdout ( ) : orig _ out _ err = sys. stdout, sys. stderr try : sys. stdout, sys. stderr = map ( dummytqdmfile, orig _ out _ err ) yield orig _ out _ err [ 0 ] # relay exceptions except exception as exc : raise exc # always restore sys. stdout / err if necessary finally : sys. stdout, sys. stderr = orig _...
[ 0.7987651228904724, -0.6317281723022461, 0.7777204513549805, -0.6838775873184204, -0.6650018095970154, -0.25725117325782776, 0.547546923160553, -0.5403844714164734, 0.7534856200218201, -0.3707314431667328, 1.1457090377807617, 0.6127188205718994, 0.11275849491357803, -0.017289170995354652, ...
def set _ board ( self, configuration ) : # invert the board - > store is on the first self. _ mancala = list ( configuration ) [ : : - 1 ]
[ -0.7175567150115967, 1.1242189407348633, 0.15875399112701416, 0.9537745118141174, 0.43131762742996216, 0.1788618564605713, 0.46251097321510315, 1.2691280841827393, -0.06276565045118332, 0.3171752095222473, -1.2971394062042236, 0.1354261189699173, -0.9137356281280518, 0.7862120270729065, ...
def print _ menu ( ) : print ('''menu of options 1 ) display current products 2 ) add new product 3 ) save and exit''') print ( ) # add an extra line for looks
[ -0.3574451208114624, -0.28216663002967834, 0.527465283870697, 0.8117307424545288, 1.284356951713562, 0.7902069687843323, 0.35832953453063965, -0.48850640654563904, -0.10945317894220352, 0.3303312063217163, 0.19506019353866577, 0.48764002323150635, -0.06199618801474571, -0.02784362249076366...
def render _ content ( self, content, response _ code = 200, headers = [ ] ) : self. response. clear ( ) if len ( headers ) > 0 : for hn, hv in headers : self. response. headers [ hn ] = hv self. response. set _ status ( response _ code ) self. response. write ( content )
[ -0.6459466218948364, -0.30127644538879395, 0.3531356751918793, 0.03217928484082222, 0.45192962884902954, -0.0937483161687851, -0.9850952625274658, 0.462663859128952, 0.3042466342449188, 0.29493892192840576, -0.39846137166023254, -0.7229858636856079, -0.7514442205429077, -0.2680264711380005...
def partition ( array _ of _ stuff, start, end ) : pivot = array _ of _ stuff [ end ] p _ idx = start for i in range ( start, end ) : if array _ of _ stuff [ i ] < = pivot : swap ( array _ of _ stuff, i, p _ idx ) p _ idx + = 1 swap ( array _ of _ stuff, p _ idx, end ) return p _ idx
[ -0.7492468357086182, -0.4118904173374176, 0.7068870067596436, -0.34656980633735657, -0.3964898884296417, 0.12070727348327637, -0.7482907772064209, 0.17828603088855743, 0.1778758317232132, 0.4148551821708679, 0.14036066830158234, 0.09978282451629639, -0.701465904712677, -0.9700491428375244,...
def test _ load _ many _ conda2 ( self, build _ image _ for _ jupyterlab ) : lb, username = build _ image _ for _ jupyterlab [ 0 ], build _ image _ for _ jupyterlab [ 5 ] keys = [ " conda2 & cdutil ", " conda2 & python - coveralls ", " conda2 & nltk " ] loader = packagedataloader ( keys, lb, username ) promise1 = loade...
[ -1.172885775566101, 0.20751798152923584, 0.5542114973068237, 0.37497779726982117, 0.05479159578680992, 0.15933167934417725, -1.1272550821304321, -0.4422513246536255, -0.8980513215065002, 0.1219521313905716, -0.6447479724884033, -0.41963669657707214, 1.1601790189743042, 1.2383641004562378, ...
def on _ cbpais _ currentindexchanged ( self, index ) : if self. editmodel is not none : self. editmodel. idpais = self. paisesmodel. record ( index ). value ( " idpais " ). toint ( ) [ 0 ]
[ -0.48758143186569214, -0.27101290225982666, 0.4055638313293457, -0.5114749670028687, -0.2568402588367462, 0.574731171131134, 0.20202501118183136, -0.05406322702765465, 0.9648120999336243, 0.6909664273262024, 0.30274996161460876, -0.05997740849852562, -0.6312007904052734, -0.874604403972625...
async def async _ setup _ entry ( hass : homeassistant, config _ entry : configentry, async _ add _ entities : addentitiescallback, ) - > none : new _ entities = [ ] board = hass. data [ domain ] [ config _ entry. entry _ id ] for binary _ sensor in board. binary _ sensors : pin = binary _ sensor [ conf _ pin ] pin _ m...
[ -0.464672327041626, 0.15121598541736603, 0.5498971939086914, -0.0586504302918911, 1.2940877676010132, -0.27964961528778076, 0.3588294982910156, -0.3212112486362457, 0.3572779893875122, 0.3675945997238159, -0.5740147233009338, -0.15715879201889038, 0.4637666940689087, 1.0904830694198608, ...
def multiset _ permutations ( multiset ) : class node ( object ) : def _ _ init _ _ ( self, v, to = none ) : self. val = v self. to = to def visit ( n ) : vlist = [ n. val ] while n. to : n = n. to vlist. append ( n. val ) return vlist if len ( multiset ) = = 1 : yield multiset elif len ( multiset ) = = 2 : if multiset...
[ -0.6705620288848877, 0.39298781752586365, 1.0847266912460327, 0.3842332363128662, -1.665583610534668, -0.2218257486820221, 0.842816174030304, -0.42067813873291016, 0.7110393643379211, 0.54668128490448, -0.3702767491340637, -0.4206874966621399, -0.12074839323759079, 0.1374996304512024, -1...
def _ _ init _ _ ( self ) : self. words = collections. defaultdict ( set )
[ 0.4402366876602173, 0.7259638905525208, 0.2589012086391449, -0.9724355340003967, 0.5192434787750244, 0.07403088361024857, -0.4799593985080719, 0.5136176943778992, -0.6843642592430115, 0.1637187898159027, -0.527217447757721, -0.1938709318637848, -0.34287500381469727, 1.091342806816101, -0...
def load _ data _ from _ raw ( self, fendfilename, filelist, maxinsert ) : self. history + = " hicdata. load _ data _ from _ raw ( fendfilename ='% s ', filelist = % s, maxinsert = % i ) - " % ( fendfilename, str ( filelist ), maxinsert ) # determine if fend file exists and if so, load it if not os. path. exists ( fend...
[ -0.2679581642150879, 0.21322594583034515, 0.7785227298736572, -0.3115285038948059, -0.5058772563934326, -0.21717329323291779, 0.2548842430114746, 0.22797425091266632, -0.7216200828552246, -0.813264787197113, -0.5847997069358826, -0.010108762420713902, -0.4704778492450714, 1.215084671974182...
def test _ setup _ task _ execution ( self, resource _ group, location, storage _ account, storage _ account _ key ) : helpers. create _ cluster ( self. client, location, resource _ group. name, self. cluster _ name,'standard _ d1 ', 1, storage _ account. name, storage _ account _ key, setup _ task _ cmd ='echo $ greet...
[ 0.1837598830461502, 0.0307148490101099, 0.6780791878700256, 0.45121246576309204, 0.7451319694519043, -0.07204509526491165, 1.464403748512268, -0.16045983135700226, -0.5330837965011597, 0.8895426392555237, -0.015129921957850456, 0.20047032833099365, 0.20903564989566803, 0.02424514852464199,...
def superpixelize ( self, im, ierr, pix _ dtype = none ) : super _ pixel _ size = self. super _ pixel _ size s2 = super _ pixel _ size * * 2 nsuper = ( np. array ( im. shape ) / super _ pixel _ size ). astype ( int ) if not pix _ dtype : pix _ dtype = self. pix _ dtype superpixels = np. empty ( [ nsuper [ 0 ], nsuper [...
[ -0.4366275668144226, 0.76112300157547, 0.6803178787231445, 0.30225038528442383, -0.57066810131073, -0.7859641909599304, -0.381577730178833, 0.3556000888347626, 1.0200976133346558, 0.5662146210670471, -0.4201934039592743, 0.4585605561733246, -0.9043011665344238, -0.02855345793068409, -0.0...
def checkchange ( input _ api, output _ api ) : errors = [ ] for file in input _ api. affectedtextfiles ( ) : path = file. absolutelocalpath ( ) basename = input _ api. basename ( path ) if input _ api. os _ path. dirname ( path )! = input _ api. presubmitlocalpath ( ) : continue if basename = = structured _ xml : cwd ...
[ -0.2863391041755676, -0.7840080261230469, 0.5860539078712463, 0.13862244784832, 0.009630539454519749, 0.21889810264110565, 0.16092270612716675, 0.38294103741645813, -0.7989718914031982, 0.32066741585731506, 0.4576418399810791, 0.7228861451148987, -0.4563259780406952, 1.4111888408660889, ...
def create _ filterlst ( self, threshold ) : lst = [ ] nlst = [ ] for v in range ( self. dgraph. vcount ( ) ) : if self. dgraph. degree ( v ) > threshold : lst. append ( v ) nlst. append ( self. dgraph. vs ['name'] [ v ] ) print'number of elements to filter :'+ str ( len ( lst ) ) print nlst return nlst
[ -0.14985410869121552, -0.01985100843012333, 0.3199746012687683, 0.10952873528003693, -1.1498693227767944, 0.38065940141677856, -1.073813796043396, -0.13152720034122467, -0.10288447141647339, 0.30886122584342957, -0.8589897751808167, 0.4304923415184021, 0.42257222533226013, 0.30652850866317...
def all _ gaussian ( dataframe ) : dataframe ['gal _ sigma'] = [ gal. sigma for gal in dataframe ['original _ gal'] ] dataframe ['psf _ sigma'] = [ psf. sigma for psf in dataframe ['true _ psf'] ] dataframe ['gal _ psf _ ratio'] = dataframe ['gal _ sigma'] / dataframe ['psf _ sigma'] plot _ r _ elements ( dataframe,'ga...
[ -0.008088159374892712, 0.33643051981925964, 0.5620359778404236, 0.3605048358440399, -0.28740134835243225, 0.39870744943618774, 0.016052234917879105, 0.7809129357337952, -0.7043689489364624, 0.0003186726535204798, 0.37811279296875, 0.7708430886268616, 0.23028481006622314, 0.486528217792511,...
def write ( self, filename ='test1. ps ', output ='ps ', dpi = 72 ) : return _ write ( self. drawing, filename, output, dpi = dpi )
[ -0.7971140742301941, 0.2563830018043518, 0.37946757674217224, 0.257164865732193, -0.27655932307243347, 0.048270341008901596, 0.3204101026058197, -0.70595383644104, -0.6742793917655945, -0.6489838361740112, 0.3299015164375305, -0.7095351815223694, -0.7384387850761414, -0.596601665019989, ...
def errors ( self, errors ) : self. _ errors = errors
[ -0.6094726920127869, -0.2422889918088913, -0.17346911132335663, -0.06199931353330612, 0.23002219200134277, 1.1768568754196167, -0.09819619357585907, 0.38180288672447205, -0.035820119082927704, -1.0946816205978394, -1.1258625984191895, -0.7601780295372009, 0.12317652255296707, 0.37910455465...
def mytables ( self ) : self. do _ mytables ('', clear = false )
[ -0.35929736495018005, 0.12172044068574905, 0.307521790266037, 0.9329923391342163, -0.4638722538948059, -0.07809516787528992, 0.8726353645324707, -0.46931764483451843, -0.1923922300338745, -0.4590015411376953, -0.6433982849121094, 0.8841491937637329, -0.11971232295036316, 0.6536503434181213...
def encode _ unicode _ codepoints ( str ) : codepoint _ format ='\ \ u { 0 : 04x } '. format def codepoint ( m ) : return codepoint _ format ( ord ( m. group ( 0 ) ) ) return re. sub ('[ ^ \ x00 - \ x7f ] ', codepoint, str )
[ 0.29006773233413696, -0.8455902338027954, 0.06832268089056015, 0.003200030419975519, -0.6794203519821167, 0.05762173980474472, -0.04790593311190605, 0.6173714399337769, 0.7131345868110657, 0.17487703263759613, -0.8806859850883484, 0.31605201959609985, -0.3814394474029541, -0.74546462297439...
def get _ layer _ field ( packet : rawpacket, field _ uri : str ) - > any : assert isinstance ( packet, rawpacket ) secs = field _ uri. split ( '.') layer _ depth = 0 layer _ name = secs [ 0 ] if layer _ name. endswith ('inner') : layer _ name = layer _ name [ : - len ('inner') ] field _ uri = '. '. join ( [ layer _ na...
[ 0.1219802275300026, 0.3803720474243164, 0.708233118057251, -0.5376947522163391, -0.2839895784854889, -0.175754576921463, 0.0693826824426651, -0.8361597657203674, 0.29985034465789795, -1.2021267414093018, -0.13509255647659302, 0.1894979178905487, -0.2735035717487335, -0.10286653786897659, ...
def get _ leverage _ distance _ to _ action ( self ) : return self. get _ leverage ( ) - self. model. parameters. bank _ leverage _ buffer
[ 0.5123158693313599, -1.003648281097412, 0.7197322249412537, -0.5293869376182556, 0.9828317165374756, 1.5396003723144531, 0.7597045302391052, -0.4133819043636322, 0.36375972628593445, 0.3382590413093567, -0.4597203731536865, 0.7145676612854004, -1.6199486255645752, 0.18667489290237427, 0....
def _ _ is _ allowed ( self, url _ string ) : try : host = urlparse. urlparse ( url _ string ). hostname if ( not self. _ robotfiles. has _ key ( host ) ) : robo = robotparser. robotfileparser ( ) robo. set _ url ( " http : / / " + host + " / robots. txt " ) robo. read ( ) self. _ robotfiles [ host ] = robo return self...
[ -0.0037284246645867825, 0.3744332790374756, 0.5918556451797485, -0.003716452047228813, -0.6928622126579285, 0.5384887456893921, -0.09625670313835144, 0.12048417329788208, -1.1277813911437988, -0.48381587862968445, -0.05106786638498306, 0.12601961195468903, -0.8305641412734985, 0.2440716624...
def dataframify ( transform ) : @ wraps ( transform ) def new _ transform ( self, df ) : arr = transform ( self, df. values ) return pd. dataframe ( arr, columns = df. columns, index = df. index ) return new _ transform
[ -1.0106295347213745, 0.3788844347000122, 0.39687374234199524, -0.5985092520713806, 0.5017156600952148, -0.975485622882843, -0.19814330339431763, -0.5323903560638428, 0.39073771238327026, -1.7626585960388184, -0.17701253294944763, 0.16781404614448547, 0.3490754961967468, -0.4782529771327972...
def _ _ init _ _ ( self ) : device. _ _ init _ _ ( self ) self. _ _ emitter = eventemitter ( ) self. _ _ state = opener _ state. closed
[ -0.20117105543613434, -0.8073866367340088, 0.386049747467041, 0.2798687517642975, -0.7741606831550598, 0.5534816384315491, 0.8808842897415161, 1.6566258668899536, 0.4736497700214386, -1.6309980154037476, -0.0625704750418663, 0.2984250783920288, -0.16312120854854584, 0.8810338973999023, 1...
def test _ blocked _ ipv6 _ range ( self ) - > none : self. lookups [ " example. com " ] = [ ( ipv6address, " 2001 : 800 : : 1 " ) ] channel = self. make _ request ( " get ", " preview _ url? url = http : / / example. com ", shorthand = false ) self. assertequal ( channel. code, 502 ) self. assertequal ( channel. json ...
[ -0.633781373500824, 0.8683146238327026, 0.3171843886375427, 0.23546719551086426, -0.17457063496112823, 0.08923644572496414, -0.2352483719587326, -0.12382923811674118, 0.30922505259513855, -0.1526089906692505, -1.4252800941467285, 0.40848931670188904, 0.20187722146511078, -0.414484888315200...
def get _ selected _ range ( self ) - > tuple [ int, int, int, int ] : selected _ indexes = self. selectedindexes ( ) if selected _ indexes : row _ start = selected _ indexes [ 0 ]. row ( ) row _ end = selected _ indexes [ 0 ]. row ( ) col _ start = selected _ indexes [ 0 ]. column ( ) col _ end = selected _ indexes [ ...
[ -0.9769583940505981, -0.6443829536437988, 0.6979390978813171, 0.7862104177474976, 0.5782051682472229, -0.8391591906547546, 1.087741732597351, -0.41897132992744446, -0.418846994638443, 0.058641884475946426, -0.4531641900539398, 0.3013109266757965, -0.07597915828227997, -0.34171247482299805,...
def get _ num _ gen ( self, run, barnobar = none, is _ particle = none, flav _ or _ flavint = none, include _ physical _ fract = true ) : return self [ str ( run ) ]. get _ num _ gen ( barnobar = barnobar, is _ particle = is _ particle, flav _ or _ flavint = flav _ or _ flavint, include _ physical _ fract = include _ p...
[ -0.9980154037475586, 0.5632068514823914, 0.651239275932312, 1.0609132051467896, 0.12167935818433762, 0.022333631291985512, 0.3732943832874298, -0.45681527256965637, -1.2125521898269653, -0.8993242383003235, -0.5499452948570251, 0.43855583667755127, -0.6160286664962769, 0.4991801083087921, ...
def open _ settings _ dialog ( self ) : settings = self. getview ( ). get _ settings ( ) dlg = msui _ sv _ optionsdialog ( parent = self, settings = settings ) dlg. setmodal ( true ) if dlg. exec _ ( ) = = qtwidgets. qdialog. accepted : settings = dlg. get _ settings ( ) self. getview ( ). set _ settings ( settings, sa...
[ 0.1795961707830429, 1.093349814414978, 0.4336620569229126, -0.43673813343048096, -0.7428591847419739, -0.15163864195346832, 0.48574626445770264, 0.5785004496574402, 0.5259595513343811, 0.5831001996994019, 0.2859858274459839, 0.17077608406543732, -0.07191372662782669, 0.25773879885673523, ...
def parse _ symbol ( self, str _ symbol ) : base = super = sub = none str _ symbol = str _ symbol. strip ( ) if len ( str _ symbol ) = = 1 : base = str _ symbol elif len ( str _ symbol ) = = 3 : base = str _ symbol [ 1 ] super = str _ symbol [ 0 ] sub = str _ symbol [ 2 ] elif len ( str _ symbol ) = = 2 : first, second...
[ -0.6254546642303467, -0.11188244074583054, 0.383447527885437, 0.035813089460134506, -0.5564769506454468, -0.34054988622665405, 0.8120328783988953, -0.6766221523284912, -0.35492801666259766, -0.5085019469261169, -0.8302040696144104, 0.3675757050514221, -0.022047165781259537, -0.535852968692...