text
stringlengths
25
2.19k
embedding
listlengths
768
768
def reduce _ number ( num ) : tensor = torch. cuda. floattensor ( [ num ] ). cuda ( ) dist. all _ reduce ( tensor ) return tensor. item ( )
[ -0.03325263783335686, 0.8781310319900513, 0.5214429497718811, 0.6183602809906006, 0.03979533165693283, -0.4118221402168274, 0.9747797846794128, 0.5775635242462158, 0.20227591693401337, 0.03343285247683525, -0.46850112080574036, -0.4706469178199768, -0.24506798386573792, -0.4635646343231201...
def get _ chrom _ lens ( in _ len ) : ret = { } with open ( in _ len,'r') as handle : lines = handle. read ( ). rstrip ( " \ n " ). split ( " \ n " ) for line in lines : length, chrom = line. split ( " " ) assert chrom not in ret,'it appears there is a duplicate name in this set of chroms and lens'\'{ name } has appear...
[ 0.020635955035686493, -1.0048432350158691, 0.4559808671474457, -0.8946850895881653, -1.3502594232559204, -0.31966227293014526, 0.5198946595191956, -0.30239295959472656, -0.04709937423467636, 0.18939107656478882, -1.6086485385894775, 0.03621089830994606, -0.32056495547294617, 0.318734258413...
def hillclimb ( startstate, maxrounds = 1000 ) : curr = startstate value = startstate. getvalue ( ) maxvalue = startstate. getmaxvalue ( ) count = 0 if verbose : print ( " = = = = = = = = = = = = = = = = = = = = = start = = = = = = = = = = = = = = = = = = = = = = " ) while value < maxvalue and count < maxrounds : if ve...
[ 1.005103588104248, -0.11721886694431305, 0.6725176572799683, 0.6945617198944092, -0.6298163533210754, 0.4103119671344757, 0.6734975576400757, -0.224593847990036, -0.7896274924278259, 0.020901253446936607, -0.5171322822570801, 0.38651251792907715, 0.05986865609884262, 0.4436730742454529, ...
def find _ short _ path ( aux _ structures, loc1, loc2 ) : nodes, edges, dic = aux _ structures nodes1 = nearest ( dic, loc1 ) nodes2 = nearest ( dic, loc2 ) agenda = [ [ [ nodes [ nodes1 ] ], 0, great _ circle _ distance ( loc1, loc2 ) ] ] # agenda = [ [ [ nodes [ nodes1 ] ], 0 ] ] empty = set ( ) count = 0 while agen...
[ 1.0217540264129639, -0.5221314430236816, 0.8648739457130432, -0.26793912053108215, -0.7711426615715027, 0.16329145431518555, 0.23267321288585663, -0.7090116739273071, -0.3682340383529663, 0.40378710627555847, 0.36650416254997253, 0.3079219460487366, 0.1478358805179596, -0.7086817026138306,...
def test _ edit _ profile _ with _ validation _ failure ( authn _ policy, form _ validator ) : authn _ policy. authenticated _ userid. return _ value = " johndoe " form _ validator. return _ value = ( { " errors " : " boom! " }, none ) request = dummyrequest ( method ='post') profile = profilecontroller ( request ) res...
[ -0.36951643228530884, 0.3413045406341553, 0.20008902251720428, 0.37895911931991577, 0.5602137446403503, 0.8318740725517273, 0.27917027473449707, -0.6366066932678223, 0.3997768759727478, -0.2754400968551636, -1.199280858039856, -0.6239643096923828, 0.12242147326469421, 0.3477564752101898, ...
def isdir ( self ) : return os. path. isdir ( self. path )
[ -0.20385633409023285, -0.9967134594917297, 0.5583641529083252, 0.9606152772903442, 0.14858205616474152, 0.43232545256614685, 0.5713931322097778, 0.044349305331707, 1.0387126207351685, -1.5167317390441895, 0.26686161756515503, 0.3923417627811432, -0.36970460414886475, 0.059999726712703705, ...
def get _ domain _ max ( d ) : if isinstance ( d, ( tuple, list ) ) : d = d [ - 1 ] if isinstance ( d, ( tuple, list ) ) : d = d [ - 1 ] return d
[ -1.386793851852417, 1.6173847913742065, 0.6917058825492859, 1.0267401933670044, 0.29413506388664246, -0.10460148006677628, -0.45811727643013, 0.0820733979344368, 0.6215399503707886, -0.1136852279305458, 0.6306137442588806, 0.9885722994804382, 0.35962724685668945, 0.24390093982219696, 0.5...
def grad _ uv ( self, sv, gtype ='tri') : if gtype = ='tri': assert ( len ( sv ) = = self. n _ tverts ), " length of array passed to grad is not tri _ verts length " gs = np. dot ( self. delta _ tri _ 0, sv ) # grad with respect to tri mesh gradsx = ( 1 / self. tri _ edge _ len ) * gs * self. tri _ tang [ :, 0 ] gradsy...
[ -0.40474259853363037, 0.15236268937587738, 0.6873857378959656, -0.1371113806962967, -0.8050122261047363, 0.3893142640590668, 0.5853243470191956, -0.08084552735090256, 0.1887124627828598, 0.5795412659645081, 0.06869634985923767, 0.6330425143241882, -0.3016858696937561, 0.8006311058998108, ...
def find _ constraint _ errors ( self, table, constraint ) : if constraint. foreign _ table _ name not in self. tables : return " constraint error for foreign key ` % s ` : ` % s `. ` % s ` references ` % s `. ` % s `, but table ` % s ` does not exist " % ( constraint. name, table. name, constraint. column _ name, cons...
[ -0.2878413796424866, -0.3342464864253998, 0.650048017501831, -0.322937548160553, -0.034311797469854355, -0.4470323622226715, 0.7865962982177734, -0.4678802490234375, -0.6312226057052612, 0.9980069994926453, -0.08619704097509384, -0.3536379337310791, 0.4734772741794586, -0.1650257408618927,...
def installdir ( self ) : return mxs. pathconfig. resolvepathsymbols ('$ max')
[ -0.3511030375957489, 0.5883322954177856, 0.4271202087402344, 0.3621201515197754, 0.14631640911102295, -0.3439607620239258, 0.5895532965660095, 1.3047891855239868, -0.05846484377980232, 0.1571967452764511, -0.08394457399845123, -0.3612408936023712, 0.06266342848539352, 0.5320611000061035, ...
def avancer ( self ) : new _ position = np. array ( self. position ) + np. array ( self. direction ) if new _ position [ 0 ] > = 0 and new _ position [ 0 ] < 10 and \ new _ position [ 1 ] > = 0 and new _ position [ 1 ] < 10 : self. position = new _ position else : self. tourner ( ) self. avancer ( )
[ 0.04753299430012703, -0.4222967028617859, 0.787665843963623, -0.008185396902263165, 0.45731067657470703, -0.14865261316299438, 0.1928381621837616, 0.4029639661312103, 0.5221543908119202, 1.524051547050476, 0.43479469418525696, 0.4089973270893097, 0.2824766933917999, 0.37559667229652405, ...
def prepare _ input ( self, dirty ) : dirty = " ". join ( [ c. upper ( ) for c in dirty if c in string. ascii _ letters ] ) clean = " " if len ( dirty ) < 2 : return dirty for i in range ( len ( dirty ) - 1 ) : clean + = dirty [ i ] if dirty [ i ] = = dirty [ i + 1 ] : clean + = " x " clean + = dirty [ - 1 ] if len ( c...
[ -1.1829795837402344, 0.1538749486207962, 0.7551882266998291, 0.03668458014726639, -0.9398469924926758, 0.20914211869239807, -0.10106025636196136, -1.0903692245483398, 0.7347987294197083, 0.4909377098083496, -0.3102930784225464, 0.4835415780544281, -0.3801534175872803, 0.113839291036129, ...
def user _ screen _ navigation ( self ) : user _ role = self. mainwindow. app. user. role _ id # user _ role = 3 # the user you want to be. only used for testing. if user _ role : if user _ role = = 1 : self. set _ borrower _ navigation ( ) elif user _ role = = 2 : self. set _ investor _ navigation ( ) elif user _ role...
[ -0.5676981806755066, 0.31470221281051636, 0.68318110704422, 1.249025583267212, 0.7854654788970947, 0.46978411078453064, 0.8146801590919495, -0.867688000202179, 0.7176045179367065, -0.1120913177728653, 0.3029424846172333, 0.313384085893631, 0.6028822660446167, 0.0032722712494432926, 0.241...
def min _ max _ mean ( ) : prng = warandpeacepseudorandomnumbergenerator ( 552 ) num _ lst = [ ] count = 0 for i in range ( 10000 ) : count + = 1 num _ lst. append ( prng. random ( ) ) sort _ lst = sorted ( num _ lst ) return sort _ lst [ 0 ], sort _ lst [ count - 1 ], ( sum ( sort _ lst ) / count )
[ -0.4566499888896942, 0.36998364329338074, 0.42183706164360046, 0.3145544230937958, -0.05727146938443184, 0.681891143321991, -0.08247845619916916, 0.7342545986175537, 0.20530018210411072, 0.7659744620323181, -1.1715706586837769, 0.4730628430843353, -0.3615459203720093, 0.5796914100646973, ...
def generate _ query _ id ( self ) : query _ id = self. time _ start. strftime ( " % y - % m - % d " ) +'-'+ self. time _ end. strftime ( " % y - % m - % d " ) +'-'+ str ( self. latitude _ max ) +'-'+ str ( self. latitude _ min ) +'-'+ str ( self. longitude _ max ) +'-'+ str ( self. longitude _ min ) +'-'+ self. platfo...
[ -0.36123108863830566, -0.9918527603149414, 0.658125102519989, -0.29596295952796936, -0.2094011753797531, 1.1223225593566895, -0.8548858165740967, -0.20794978737831116, -0.02622082829475403, 0.5505725145339966, 0.008180290460586548, 0.7696426510810852, -0.3750194311141968, 0.166280224919319...
def test _ increment _ self _ with _ diff _ vector ( self ) : self. vector - = vector ( [ 0, 1, 2 ] ) self. assertequals ( [ 1, 1, 1 ], self. vector ) self. vector - = [ 1, 1, 0 ] self. assertequals ( [ 0, 0, 1 ], self. vector ) self. assertraises ( nonnumericerror, self. vector. _ _ isub _ _, [ 1, 2,'a'] ) self. asser...
[ -1.181025743484497, -0.20552951097488403, 0.7309572100639343, 0.7605697512626648, -0.19919730722904205, 0.8664553165435791, 1.0473558902740479, 0.05134556069970131, 0.01114661805331707, -0.9538460373878479, -0.7335848808288574, 0.36506351828575134, 0.3832254111766815, 0.6376327276229858, ...
def expand _ charclass ( patt, alias = r'\ w ', expansion = none ) : # patt = patt. replace ('[ ] ', r'\') if expansion is none : expansion = regex _ aliases [ alias ] patt = patt. replace ( alias,'['+ expansion +']') # clean up any nested square - brackets patt = regex. sub ( r'(. * ) \ [ ( [ ^ \ [ \ ] ] * ) \ ['+ exp...
[ 0.26841744780540466, -0.07294545322656631, 1.1161142587661743, -0.43779221177101135, -0.5233643054962158, 0.09987704455852509, 0.2235456258058548, 0.9547082781791687, 0.5301927328109741, -0.08081676065921783, 0.03738679736852646, 0.04013478383421898, 0.7243351340293884, -0.2069856822490692...
def exportinvertedindextodirectory ( self, pathtofile ) : self. ii. exportinvertedindextodirectory ( folder )
[ -1.6640794277191162, -0.054992448538541794, 0.32635894417762756, 0.34314775466918945, 0.044445380568504333, 0.6845418810844421, 1.702618956565857, -0.5507779717445374, 0.22477012872695923, -0.48665207624435425, -0.5780404806137085, 0.9719511270523071, -1.2360848188400269, -0.01135719288140...
def django _ db _ reset _ sequences ( request, django _ db _ setup, django _ db _ blocker ) : _ django _ db _ fixture _ helper ( request, django _ db _ blocker, transactional = true, reset _ sequences = true )
[ -1.1276313066482544, 0.9344627261161804, 0.3673666715621948, 0.6654784083366394, 0.32105445861816406, -1.13411283493042, 0.8796244263648987, -0.0940198004245758, -0.2777263820171356, 1.4058889150619507, -0.9772667288780212, 0.2535439133644104, -0.08401673287153244, -0.1207989826798439, -...
def reverse _ dots ( name ) : a = name. split ( '.') a. reverse ( ) return '. '. join ( a )
[ 0.07651082426309586, -0.35306021571159363, 0.5432815551757812, -1.2394015789031982, -0.38186436891555786, 0.046579137444496155, -0.529291033744812, -0.10403057932853699, -0.18873021006584167, 0.38283437490463257, -0.19451448321342468, 0.306758850812912, 0.5557585954666138, -1.3017475605010...
def show _ histogram ( currency, start _ date, end _ date ) : url = requests. get ( f'https : / / api. exchangerate. host / timeseries? base = usd & symbols = { currency } & start _ date = { start _ date } & end _ date = { end _ date } & places = 2'). json ( ) index = url ['rates']. keys ( ) data = [ ] for k in url ['r...
[ 0.4236881136894226, 1.199105143547058, 0.7176345586776733, -1.2330658435821533, 0.08992084860801697, -0.027308503165841103, -0.17140457034111023, 0.18339604139328003, -0.6532827019691467, 0.4820486307144165, 0.003157920204102993, 1.078318476676941, -0.38095468282699585, -0.1015765294432640...
def get _ config _ default ( args ) : # return a clone so that the defaults will not be altered # this is for the " local variable " use pattern config = _ c. clone ( ) return config
[ 0.04066800698637962, 0.41826894879341125, 0.358542263507843, 0.7191541790962219, 0.9855032563209534, -0.17728297412395477, 0.24075010418891907, 0.04497317597270012, -0.753145694732666, 0.1763826608657837, -0.2625040113925934, -0.1561882346868515, -0.849065899848938, 0.37074708938598633, ...
def main ( date, time, modelid ) : # if int ( time ) < 12 : # fulldata = date +'00'# else : # fulldata = date +'12'# fulldata = date +'00'nextday = date [ : - 2 ] + str ( int ( date [ - 2 : ] ) + 1 ) print " fulldata : { } ". format ( fulldata ) print " next day : { } ". format ( nextday ) # prerun ( ) # downloadfiles ...
[ -0.22666829824447632, 0.13925112783908844, 0.7079219818115234, 0.3929872214794159, -0.5546454191207886, 0.4211863577365875, 0.29519784450531006, -0.9309354424476624, -0.4188750088214874, -0.4594821333885193, 0.08816121518611908, 0.22378189861774445, 0.708514392375946, 0.8166511654853821, ...
def _ _ init _ _ ( self, timeout = 60 ) : self. timeout = timeout self. entries = { }
[ 0.43259432911872864, 0.1492822915315628, 0.48106104135513306, -0.42521926760673523, -0.913468599319458, 0.12689068913459778, -0.8820896744728088, 1.2639050483703613, -0.19896726310253143, 0.3488590717315674, -0.5385029315948486, 0.26007917523384094, 0.034159544855356216, 0.7931929230690002...
def cube _ cut ( self, cube _ file, coordinates, cutout _ size, product = " spoc ", target _ pixel _ file = none, output _ path = ". ", threads : union [ int, literal [ " auto " ] ] = 1, verbose = false, ) : if verbose : start _ time = time ( ) # declare the product type being used to make the cutouts self. product = p...
[ 0.30160456895828247, -0.25333133339881897, 0.7528047561645508, 0.5569270253181458, -0.27434685826301575, 0.04384620487689972, 0.4160873591899872, 0.629084050655365, -0.33967289328575134, 0.32912737131118774, 0.20194442570209503, 0.8333035707473755, -0.5408198237419128, -0.1467723697423935,...
def _ _ show ( labels, sizes ) : fig1, ax1 = plt. subplots ( ) ax1. pie ( sizes, labels = labels, autopct ='% 1. 1f % % ', startangle = 90 ) ax1. axis ('equal') plt. show ( )
[ 0.7665818929672241, 0.4063614308834076, 0.47959649562835693, -0.9741389751434326, -1.190360426902771, 0.713958740234375, 0.6018744111061096, 0.44723212718963623, -0.41508451104164124, 0.8209406733512878, 0.5951650142669678, 0.42396050691604614, -0.01688688062131405, -0.8191670179367065, ...
def private ( self, user _ id ) : return chat ( self, user _ id, " private " )
[ 0.30653446912765503, 0.006268241908401251, 0.3212352395057678, 0.5657232999801636, -1.0086957216262817, 0.09011045843362808, 0.1657446324825287, -1.6774070262908936, -0.06026601418852806, -1.1959320306777954, 0.10135279595851898, 1.3391410112380981, 0.2357344776391983, 0.36788079142570496,...
def test _ write _ chgcar ( vasp _ calc, vasp _ inputs, vasp _ chgcar, sandbox _ folder ) : chgcar, _ = vasp _ chgcar inputs = vasp _ inputs ( parameters = {'gga':'pe ','gga _ compat': false,'lorbit': 11,'sigma': 0. 5,'magmom':'30 * 2 * 0. ','icharg': 1 } ) inputs. charge _ density = chgcar calc = vasp _ calc ( inputs ...
[ 0.041492823511362076, 0.01493922434747219, 0.4262937009334564, 0.0846906378865242, 0.4549650549888611, 0.49319028854370117, 0.5323614478111267, -0.21730934083461761, -0.4409756064414978, -0.44196850061416626, -0.0950310081243515, 0.022744061425328255, -0.048179879784584045, 0.4236136674880...
def labels ( self, labels ) : self. _ instructions _ setter ('label ', labels )
[ -1.3557658195495605, 0.3333647549152374, 0.2892344295978546, -0.019118357449769974, 0.3864256739616394, 1.0862189531326294, 0.1338631957769394, -0.2250184565782547, 0.7143566608428955, 0.13782498240470886, -0.6322203874588013, -0.47625744342803955, -0.3871261775493622, 1.1877856254577637, ...
def f _ per _ particle ( m, alpha ) : total _ features = 2151 x _ subset = x # get the subset of the features from the binary mask # perform classification and store performance in p multi _ layer _ classificator. fit ( x _ subset, y ) p = ( multi _ layer _ classificator. predict ( x _ subset ) = = y ). mean ( ) # comp...
[ 0.09109960496425629, 0.16935476660728455, 0.6996331214904785, -0.0017671458190307021, -0.3811286687850952, -0.412924200296402, 0.7239594459533691, 0.7212750911712646, -0.7180638313293457, 0.040164414793252945, 0.11173452436923981, 0.38941892981529236, 0.02771439403295517, 0.189256861805915...
def time _ passed ( self ) : return time. time ( ) - self. start
[ 0.05544423311948776, 0.006857951637357473, 0.5578839778900146, -0.19646184146404266, 0.539480447769165, 0.74527508020401, 0.5963612198829651, 0.08392930030822754, -0.5120477676391602, 0.2328587919473648, -0.8190980553627014, 0.008547537960112095, -0.5176470279693604, -0.036302343010902405,...
def app ( monkeypatch ) : _ app = create _ app ( testconfig ) _ app. config ['login _ disabled'] = true # not working monkeypatch. setattr ( " app. services. auth _ service. authservice. verify _ token ", fake _ verify _ token ) with _ app. app _ context ( ) : pass ctx = _ app. test _ request _ context ( ) ctx. push ( ...
[ 0.5228667259216309, -0.19452182948589325, 0.5651051998138428, 0.5234692096710205, 0.2178533524274826, 0.6347145438194275, 0.043098084628582, -0.4493643045425415, 1.6932772397994995, -0.17375756800174713, -0.20834824442863464, 0.3919961452484131, -0.05787995457649231, -0.46503525972366333, ...
def set _ config _ var ( self, text, valuetype, key ) : if not self. config. has _ key ( key ) : appuifw. note ( u " configutation key'% s'is not defined " % ( key ),'error') return value = appuifw. query ( text, valuetype, self. config [ key ] ) if value is not none : self. config [ key ] = value self. save _ config (...
[ -0.8913175463676453, 0.011893361806869507, 0.408050537109375, 0.581781804561615, -0.32588234543800354, -0.4343355596065521, -0.16112038493156433, -0.03458062931895256, -0.4097856879234314, 1.1999058723449707, -0.23904617130756378, -0.3042965829372406, -0.8873623609542847, 1.032491087913513...
def add _ content ( self, label, widget ) : widget. viewport = cocoaviewport ( widget. native ) for child in widget. interface. children : child. _ impl. container = widget item = nstabviewitem. alloc ( ). initwithidentifier ( len ( self. interface. content ) - 1 ) item. label = label # turn the autoresizing mask on th...
[ 0.23682436347007751, 0.4590604305267334, 0.509390652179718, 0.3658888339996338, 0.2704598903656006, 0.6599088907241821, -0.5276788473129272, -0.3923724293708801, -0.3090200424194336, -0.3658028244972229, -0.29839494824409485, -1.2396056652069092, 0.135178804397583, 0.02904984913766384, -...
def storage _ location ( self ) - > optional [ pulumi. input ['networkpacketcapturestoragelocationargs'] ] : return pulumi. get ( self, " storage _ location " )
[ -0.3427356779575348, -0.46748271584510803, 0.3587963879108429, 0.599957287311554, 0.6544498801231384, 0.7900307774543762, 0.7402554154396057, -0.4149134159088135, 1.0840133428573608, -0.5024052262306213, -0.872081458568573, -0.5250335931777954, 0.29169002175331116, -0.2579960227012634, -...
def plotscatterplot ( self, plot _ fn, x _ vals, y _ vals, x _ val _ limit = none, y _ val _ limit = none, x _ std _ limit = none, y _ std _ limit = none, figure _ title = " title ", x _ title = " x - axis ", y _ title = " y _ axis ", x _ log _ scale = false, y _ log _ scale = false, plot _ std _ x _ axis = true, plot ...
[ 0.6384774446487427, 0.26906225085258484, 0.9728589653968811, 0.6856077909469604, -0.33310696482658386, 0.5948446989059448, -0.09068068861961365, 0.06632594019174576, 0.06535284966230392, -0.8991448879241943, 0.2484731674194336, 0.881710410118103, 0.6862089037895203, -0.35943788290023804, ...
def created _ by ( self ) - > optional [ str ] : return pulumi. get ( self, " created _ by " )
[ 1.3367326259613037, 0.0975368544459343, 0.5204702615737915, 1.037229299545288, 1.3087869882583618, 1.077280044555664, 0.6376705169677734, -0.25356829166412354, -0.35050779581069946, -0.4510301947593689, 0.07989814132452011, 0.3638870418071747, 1.2332472801208496, -0.9871128797531128, -0....
def predict ( self, stats _ layout = none, sampler = none, stat _ aliases = none, metric _ per _ sample = false, print _ progress = false ) : if self. _ model is none : raise exception ('model wasn \'t set in engine class') logger _ fn = logger. info if print _ progress else logger. debug callback _ layout, stat _ name...
[ -0.37988489866256714, 0.18523816764354706, 0.5513396859169006, 0.5359916687011719, -0.29005229473114014, -0.14072181284427643, 1.1089519262313843, -0.473552942276001, -0.4490008056163788, -0.1531076729297638, 0.38049831986427307, -0.8026823401451111, 0.9508630633354187, 0.4909810423851013,...
def fit _ predict ( self, train _ x _ with _ time _ df, plot _ clusters = false, dim _ reduction _ method = dim _ reduction _ method _ tsne, perplexity = 30 ) : train _ x _ without _ time _ df = train _ x _ with _ time _ df. copy ( ) ret = train _ x _ with _ time _ df. copy ( ) del train _ x _ without _ time _ df [ " t...
[ -0.6365456581115723, 0.12472254782915115, 0.7086424231529236, 1.0459567308425903, -0.49067187309265137, -0.1281965672969818, 0.24600303173065186, -0.23304753005504608, -0.18104121088981628, 0.07530683279037476, 0.10310692340135574, 0.5550343990325928, 0.2943432927131653, 0.2737469673156738...
def csv _ to _ dict ( csv ) : tests = [ ] file _ path ='fwd _ start / tests / fwd _ start _ tests. csv'input _ file = csv. dictreader ( open ( file _ path ) ) for row in input _ file : tests. append ( row ) return tests
[ -0.4971854090690613, -0.9320307374000549, 0.2437620609998703, -0.6248103976249695, -0.6523874402046204, 0.48160693049430847, 0.5919033288955688, 0.39456260204315186, 0.600044846534729, -0.0929001048207283, -0.5636063814163208, -0.4153328537940979, 0.042674094438552856, 0.28240635991096497,...
def pre _ order ( self, node ) : if node is none or node = = float ('inf') : return else : yield node left, right = self. _ nodes [ node ] [ 0 : 2 ] for i in self. pre _ order ( left ) : yield i for i in self. pre _ order ( right ) : yield i
[ -0.486873984336853, 0.7347365617752075, 0.8361299633979797, 0.1516401320695877, -0.6675823926925659, -0.4887418746948242, 0.3392385244369507, -0.40664422512054443, 0.02244604006409645, -0.029985522851347923, -0.6764748692512512, -0.38278108835220337, -0.2344580888748169, 0.6817850470542908...
def cast ( * args ) : return _ itksmoothingrecursivegaussianimagefilterpython. itksmoothingrecursivegaussianimagefilterid2id2 _ cast ( * args )
[ -0.6544788479804993, -1.238703727722168, 0.213556706905365, -0.4664716422557831, 0.03306995704770088, 0.4574868083000183, -0.10076676309108734, -1.0606025457382202, -0.09941238164901733, 0.38883209228515625, 0.020931653678417206, 1.5041615962982178, -0.4658169448375702, 1.0353679656982422,...
def plot _ phase _ 3d ( states ) : from mpl _ toolkits. mplot3d import axes3d fig = plt. figure ( ) ax = fig. gca ( projection ='3d') ax. plot ( states [ 0, : ], states [ 1, : ], states [ 2, : ],'ko -') ax. set _ xlabel ('q [ 0 ]') ax. set _ ylabel ('q [ 1 ]') ax. set _ zlabel ('q [ 2 ]') ax. set _ title ('phase space'...
[ 0.20164841413497925, -0.14022406935691833, 0.6320525407791138, -0.7144179940223694, -0.8848708868026733, 0.6709055304527283, -0.8280721306800842, 0.2105104923248291, 0.5616427659988403, 0.57929527759552, -0.12047263979911804, -0.13712584972381592, -0.21261435747146606, -0.22136448323726654...
def choose _ initial _ placement ( self, structure _ type, game _ state, choice _ set = none ) : return
[ -0.29602134227752686, -0.5968149304389954, 0.5375785231590271, -0.34558552503585815, 0.4777200222015381, 0.5673027038574219, 0.582548975944519, -0.2910023629665375, 0.5424257516860962, -0.07049115002155304, 0.4523359537124634, 0.256702721118927, -0.09060296416282654, 0.3001478314399719, ...
def getevaluationfreqsize ( fs : float, numfreq : int ) - > np. ndarray : fmax : float = fs / 4 freq : list = [ ] i : int = 1 f : float = fmax while i < = numfreq : f = fmax / math. pow ( 2, ( i - 1. 0 ) / 2. 0 ) freq. append ( f ) i = i + 1 return np. array ( freq )
[ -0.2701573967933655, 0.706213116645813, 0.4318806231021881, 0.018260285258293152, -0.10661043226718903, -0.9206175208091736, 0.4090837240219116, 0.28875571489334106, -0.08294462412595749, -0.4195098578929901, 0.10647173225879669, -0.3966492712497711, -0.38144171237945557, 0.154897436499595...
def _ is _ instance _ in _ criteria ( instance, query _ params ) : criteria _ list = ['term _ 1 ','term _ 2 ','term _ 3 ','term _ 1 _ next _ year ','summer ','is _ summer _ school ','session _ 1 ','session _ 2 ','lsr ','year _ long ','is _ undergraduate ','fheq _ level'] comparator = { } for i in range ( len ( criteria...
[ -1.1373012065887451, -0.3455006778240204, 0.7580754160881042, -0.7950221300125122, -0.23291178047657013, 0.7489516735076904, -0.3723299503326416, 0.3099399507045746, -0.13824576139450073, 0.4852944016456604, 0.32492390275001526, 0.7912852168083191, -0.4649346172809601, 0.2922462821006775, ...
def build _ settlement ( self, open _ locations, game _ state ) : return
[ -0.9974713921546936, -0.9229979515075684, 0.07803367078304291, -0.1893811821937561, 0.2964238226413727, 0.19391219317913055, 0.04999038949608803, 1.0007025003433228, 0.7510478496551514, -0.3525703549385071, 0.0033817430958151817, -0.5869786739349365, 0.2612650692462921, -1.291691780090332,...
def format _ img _ channels ( img, cfg ) : img = img [ :, :, ( 2, 1, 0 ) ] img = img. astype ( np. float32 ) img [ :, :, 0 ] - = cfg ['img'] ['channel _ mean'] [ 0 ] img [ :, :, 1 ] - = cfg ['img'] ['channel _ mean'] [ 1 ] img [ :, :, 2 ] - = cfg ['img'] ['channel _ mean'] [ 2 ] img / = cfg ['img'] ['scaling _ factor']...
[ -0.4365677535533905, 0.10050990432500839, 0.5914085507392883, -1.129064679145813, 0.04582056403160095, -0.22162817418575287, 0.16909949481487274, -0.5115172266960144, -0.3941710889339447, 1.2983282804489136, 1.365555763244629, 0.26337555050849915, 0.3752359449863434, 0.8844671845436096, ...
def load _ image ( filename : str, cv2 _ read _ param : int = 0 ) - > np. ndarray : filename = filename. split ( " / " ) filepath = purepath ( path. cwd ( ). parent,'res') for f in filename : filepath = filepath. joinpath ( f ) # print ( " filepath : " + str ( filepath ) ) assert ( path ( filepath. as _ posix ( ) ). ex...
[ -0.6315895915031433, -0.6986508369445801, 0.9182184934616089, 0.19193214178085327, 0.529704213142395, 0.166706845164299, 0.47182589769363403, -0.10499106347560883, -0.6701290607452393, 0.6354503035545349, 0.9583902359008789, -0.2390117347240448, -0.5403644442558289, 0.004725932143628597, ...
def comp ( self, save = false, texcmd = false ) : tables = [ ['ben05'], ['luckstars'] ] offset = [ [ 0 ], [ 8. 5 ] ] literr = [ [ 0. 06 ], [ 0. 1 ] ] lines = [ 6300, 6587 ] color = ['blue ','red ','green'] f = plt. figure ( figsize = ( 6, 8 ) ) ax1 = plt. subplot ( 211 ) ax2 = plt. subplot ( 212 ) ax1. set _ xlabel ('[...
[ -0.019005464389920235, -0.5282672643661499, 0.8701916337013245, -0.008737524040043354, -0.5377765893936157, 0.6495109796524048, 1.0766233205795288, -0.45537763833999634, 0.31346678733825684, -0.1491583287715912, 0.505710780620575, 0.739084780216217, 0.22145894169807434, 0.8134278655052185,...
def unpacking _ table ( string, number, date ) : result = [ ] date = date. strftime ( " % y _ % m _ % d " ) source _ code = html. fromstring ( string ) tbodys = source _ code. xpath ('/ / table [ @ id = " trip _ % s _ date _ % s " ] / tbody'% ( number, date ) ) # print ( " trip _ % s _ date _ % s " % ( number, date ) )...
[ -0.6297932863235474, 0.9049244523048401, 1.024493932723999, 0.03599981591105461, -0.5614279508590698, -0.3582809865474701, 0.08779086917638779, 0.15887565910816193, -0.2802979648113251, 0.796671450138092, -0.1677199900150299, -0.780325710773468, 0.6015967130661011, 0.1951063573360443, 0....
def ispalindrome ( head ) : slow = fast = head if not head : return true while fast. next! = none and fast. next. next! = none : slow = slow. next fast = fast. next. next ll = reverselinkedlistiterative ( slow. next ) slow. next = ll fast = slow. next slow = head while fast! = none : if slow. val! = fast. val : return ...
[ -0.20904740691184998, 0.12112387269735336, 0.8886795043945312, -0.000313129072310403, -0.7877820134162903, -0.42884013056755066, 0.5465996861457825, 0.26336798071861267, 0.4398421049118042, -0.4010198712348938, -0.6902174949645996, -0.1337663233280182, -2.4669783115386963, 0.58791464567184...
def test _ 020 _ numerical _ jacobian _ avg ( caplog ) : def f ( x : np. ndarray ) : return np. average ( x ) # caplog. set _ level ( logging. debug, logger = logger. name ) u : type _ float = gradient _ diff _ acceptance _ value for _ in range ( num _ max _ test _ times ) : # batch input x of shape ( n, m ) n = np. ra...
[ -0.2721959054470062, 0.3110668659210205, 0.5830034613609314, 0.5438710451126099, -0.259379118680954, 0.8733501434326172, 1.1122090816497803, -0.413266122341156, -1.2172280550003052, 0.7601074576377869, -0.17096373438835144, 0.6728881597518921, 0.5490397810935974, 0.8967204093933105, -0.0...
def test _ check _ passes _ intragenic _ dup ( self ) : gene = " test " inh = " monoallelic " cnv = self. create _ variant ( " female " ) # set parameters that will pass the function cnv. child. genotype = " dup " cnv. position = " 5200 " cnv. child. info [ " end " ] = " 5800 " gene _ inh = { " inh " : { " monoallelic ...
[ -0.478722482919693, -0.03361600264906883, 1.01711106300354, 0.7225266098976135, 0.046742040663957596, 1.1434926986694336, 0.7054558396339417, 0.13161423802375793, -0.7111299633979797, 0.05904829874634743, -1.4195741415023804, 0.5012410879135132, -0.21933431923389435, -0.4249550700187683, ...
def test _ no _ product ( self ) : createitem ( ). create _ product ('iphone ', " best smart phone ", 3, 5 ) createitem ( ). create _ product ('nokia ', " best smart phone ", 3, 5 ) createitem ( ). create _ product ('sony ', " best smart phone ", 3, 5 ) req = createitem ( ). client ( ). get ('/ api / v1 / products / 10...
[ -0.9589892625808716, 0.6033363342285156, 0.449763685464859, 0.6502429842948914, 1.5626451969146729, 1.5406376123428345, 0.7445006966590881, -0.4053155183792114, -0.39204737544059753, -0.25558605790138245, -0.43595820665359497, 0.1393069624900818, -0.5374475121498108, -0.3699464201927185, ...
def _ sample _ groups ( parameter _ space, n, num _ levels = 4 ) : if len ( parameter _ space ['groups'] )! = parameter _ space ['num _ vars'] : raise valueerror ( " groups do not match to number of variables " ) group _ membership, _ = compute _ groups _ matrix ( parameter _ space ['groups'] ) if group _ membership is...
[ -0.3514825403690338, 0.681304931640625, 0.5730101466178894, -0.1698748618364334, -0.46609795093536377, -0.8384089469909668, 0.001580910524353385, -0.7289732694625854, -0.2686794102191925, 0.85670405626297, 0.8418716788291931, 0.26801353693008423, -0.42944660782814026, 0.21692432463169098, ...
def make _ single _ cell _ points ( self ) : logs. log _ info ( " creating single cell points " ) angles = [ ( 2 * n * np. pi ) / self. single _ cell _ sides for n in range ( self. single _ cell _ sides ) ] xenv = 2 * self. cell _ radius * np. cos ( angles ) yenv = 2 * self. cell _ radius * np. sin ( angles ) noisex = ...
[ 0.6638520359992981, 0.7230848073959351, 0.4960489273071289, 0.03885509446263313, 1.2389295101165771, 0.6367613673210144, 0.39483267068862915, 0.2566783130168915, 0.1492409110069275, 0.4695577621459961, 0.09655367583036423, -0.04040078818798065, 0.3117575943470001, -0.0614902637898922, -0...
def make _ absolute ( relative _ url ) : return urljoin ( settings. base _ url, relative _ url )
[ -0.39507877826690674, -0.5480326414108276, 0.450971782207489, 0.604428768157959, 0.008535494096577168, 0.7026576399803162, -0.271740198135376, -0.3684794306755066, -0.8765857219696045, -0.019173895940184593, -0.16707831621170044, -0.41956743597984314, 0.06313548982143402, -0.14828750491142...
def get _ page ( self ) : if self. _ page : return self. _ page page _ class = self. _ _ class _ _. get _ page _ class ( ) return page _ class ( self )
[ -0.01236044056713581, -0.22757771611213684, 0.5448611974716187, 0.14642158150672913, 0.9265826940536499, -0.05528805032372475, -0.41480645537376404, -0.4332973062992096, 1.0871148109436035, -0.7900900840759277, 1.340563178062439, 0.399053692817688, -0.27143239974975586, 0.2523278594017029,...
def saveimage ( tensor, save _ name = " test " ) : if video : save _ name = " output / video / { } / { } - v { : 04d }. png ". format ( content _ name, save _ name, num _ frame ) else : if os. path. exists ('output / { }. png '. format ( save _ name ) ) : i = 0 while os. path. exists ('output / { } - { : d }. png '. fo...
[ -0.5301547050476074, -0.015702400356531143, 0.6228246092796326, 0.8044410347938538, 0.038868166506290436, -0.06685888022184372, 0.7239881753921509, -0.22636574506759644, -0.47937512397766113, 0.9932127594947815, -1.302884817123413, -0.03717855364084244, 0.21884243190288544, 0.2265973389148...
def convolutional _ layer _ direct ( imagesize, filtersize, padding ='same ', stride = ( 1, 1 ), ingflop = true, result _ format ='mac') : image _ height, image _ width, in _ channels = imagesize assert in _ channels = = filtersize [ 2 ], " image size and filter size must have the same depth. " filter _ height, filter ...
[ -0.5483913421630859, 0.6348675489425659, 1.039137601852417, 0.2049756497144699, -1.206100344657898, -0.6623822450637817, 0.9481884241104126, -0.6819342374801636, 0.21369820833206177, 0.5720499753952026, 0.26883500814437866, 0.7216010093688965, 0.29227113723754883, 0.2578563988208771, 0.2...
def to _ binary ( num, bitsnum ) : return format ( num,'0 >'+ bitsnum +'b')
[ 0.4258720278739929, -0.43207645416259766, 0.5334062576293945, 0.5876132845878601, 0.29827991127967834, 0.2609561085700989, -0.796640932559967, -1.4221100807189941, -0.10893785953521729, 0.16360872983932495, 0.41370823979377747, 1.390809416770935, 0.2860925793647766, -0.8383270502090454, ...
def setup _ service _ codes ( ) : codes = servicecodes ( ) @ utils. xslt _ text _ func def service _ code ( _, line, description ) : return codes. service _ code ( line, description )
[ 0.5870513319969177, 0.3442370593547821, 0.2798145115375519, -0.29650744795799255, -0.5415117740631104, -0.9799812436103821, 0.09153017401695251, -0.19274750351905823, -0.4964008033275604, -0.16990970075130463, -0.024867575615644455, 0.7245386242866516, 0.47175171971321106, 0.63856542110443...
def key _ vault _ properties ( self ) - >'outputs. keyvaultpropertiesresponse': return pulumi. get ( self, " key _ vault _ properties " )
[ 0.3356141448020935, -0.7224718928337097, 0.33555153012275696, 1.182956576347351, 0.07313929498195648, 0.5933486223220825, -0.7177035212516785, -0.3429044187068939, 0.7206164598464966, -0.4488353729248047, -0.3209374248981476, 0.21880042552947998, 0.3601008355617523, -0.9044042229652405, ...
def model _ inputs ( image _ width, image _ height, image _ channels, z _ dim ) : real _ input = tf. placeholder ( tf. float32, ( none, image _ width, image _ height, image _ channels ), name = " real _ inputs " ) fake _ input = tf. placeholder ( tf. float32, ( none, z _ dim ), name = " fake _ inputs " ) lr = tf. place...
[ 0.02412860281765461, -0.004280205816030502, 0.3096703886985779, -0.9158061742782593, 0.29969191551208496, 0.2258455455303192, 0.2697647213935852, -0.21049310266971588, -0.9290329217910767, 0.3014143109321594, -0.5415562391281128, -0.8206205368041992, 0.07345622777938843, 0.2051797360181808...
def config ( config _ file = none ) : global _ config global _ config _ read if not _ config _ read : print ( " configuration has not yet been loaded. doing it now. ", file = stdout ) _ config = _ get _ config ( config _ file = config _ file ) _ config _ read = true return _ config
[ 0.48351263999938965, -0.3906759023666382, 0.6067450046539307, 0.3441130816936493, 0.10920601338148117, -0.032170459628105164, 0.9495165348052979, 0.6843752861022949, -1.0857561826705933, 0.21683961153030396, 0.09065833687782288, -0.15158595144748688, -0.4159523844718933, 0.6531190276145935...
def winbio _ winbioenrolldiscard ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " sessionhandle " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value )
[ 0.14367352426052094, -0.1504465490579605, 0.6842970252037048, 0.7418649196624756, -0.7405445575714111, 1.5815047025680542, 1.271424651145935, -0.4417971968650818, 0.5241671204566956, 0.5078376531600952, -0.24143646657466888, 0.3265908658504486, -1.1196095943450928, 0.773055374622345, 0.0...
def create _ airfoil _ file ( airfoils ) : # check that type of reynolds data is consistent across all airfoils if len ( airfoils ) = = 0 : return reyn _ type = airfoils [ 0 ]. airfoil. reynolds _ data _ type for af in airfoils : if af. airfoil. reynolds _ data _ type! = reyn _ type : raise valueerror ( " all airfoils ...
[ 0.42876824736595154, -0.7139207720756531, 0.847412109375, -0.9302711486816406, 0.061843130737543106, 0.717941164970398, 0.6429110765457153, -0.7070366144180298, -0.19941425323486328, -0.5637004375457764, 0.07221692055463791, 0.4191615581512451, 0.1905711144208908, 0.13610951602458954, 0....
def build _ helper ( target, context, headerfile ) : # don't reprocess a file that has been processed. if headerfile. processed : return else : headerfile. mark _ processed ( ) f = open ( headerfile. get _ path ( ) ) l = f. readlines ( ) f. close ( ) m = re. compile ( include _ regex _ string ) for line in l : include ...
[ 0.4775603711605072, -0.7969569563865662, 0.7128181457519531, 0.3054456412792206, 0.23588447272777557, -0.16211235523223877, 0.42907479405403137, 0.7024174928665161, -0.3996029496192932, -0.0010527605190873146, 0.4813291132450104, 0.15317831933498383, -0.10782366245985031, -0.13940307497978...
async def get _ me ( self ) : json _ result = await self. api _ call ( " getme " ) return json _ result [ " result " ]
[ -1.545466423034668, 0.8625532388687134, 0.6015374660491943, 0.7965598106384277, 0.1524835079908371, -0.7107070088386536, -0.9672151803970337, -0.7499248385429382, -0.5312859416007996, -0.0546918660402298, -0.30856212973594666, 0.39325398206710815, -1.2257851362228394, -0.6097295880317688, ...
def create _ history _ record ( self ) : history _ record = aspecd. history. processinghistoryrecord ( package = self. dataset. package _ name, processing _ step = self ) return history _ record
[ 1.1923633813858032, 0.7692587971687317, 0.22873274981975555, -1.0365346670150757, 0.2681848704814911, 0.4013917148113251, -0.2218037098646164, 0.5751115679740906, -0.5427858233451843, -0.27005383372306824, 0.5133609175682068, 0.23741813004016876, 0.18775290250778198, 0.8553261756896973, ...
def index ( ) : # handle post request if request. method = = " post " : return _ user _ data ( " data / usernames. txt ", request. form [ " username " ] + " \ n " ) return _ user _ data ( " data / online. txt ", request. form [ " username " ] + " \ n " ) return redirect ( request. form [ " username " ] ) return render ...
[ -0.05174358934164047, 0.2621299922466278, 0.5471269488334656, 0.3527708053588867, -0.47546854615211487, 1.2453864812850952, 0.42065000534057617, 0.9772332906723022, -0.6934170126914978, -0.4068982005119324, 0.21249663829803467, -0.048927191644907, -0.24370938539505005, -0.19627849757671356...
def gcd ( a, b ) : _ gcd, tmp = a, b while tmp! = 0 : _ gcd, tmp = tmp, _ gcd % tmp return _ gcd
[ 0.6039690971374512, 0.5453353524208069, 0.48795607686042786, -0.8620584607124329, 0.09518882632255554, 0.3944019377231598, -0.06710447371006012, -0.3870050311088562, -0.5692588686943054, 0.17727544903755188, 0.9429143071174622, 0.608311116695404, -0.7327244877815247, -0.07137805223464966, ...
def _ authorize ( self, group, rule ) : return self. _ modify _ sg ( group, rule, authorize = true )
[ -0.5076518058776855, 0.5125535726547241, 0.29927170276641846, 0.44124341011047363, -0.2485889196395874, -0.9747871160507202, 0.483076274394989, 0.4641176760196686, -0.22121669352054596, 1.0773041248321533, 1.2371397018432617, 1.0702627897262573, -0.578063428401947, 0.30312514305114746, 0...
def register _ subscription ( self, plan _ id, pe _ id ) : action = " register subscription for subscriber # % s with plan # % s " % ( pe _ id, plan _ id ) db = current. db s3db = current. s3db # lookup subscription plan sptable = s3db. fin _ subscription _ plan query = ( sptable. id = = plan _ id ) & \ ( sptable. stat...
[ 0.9212586879730225, -0.07702881842851639, 0.7551968693733215, 0.1380739063024521, 0.124137282371521, -0.05383295565843582, -0.2625654339790344, -0.5639503598213196, -0.09243275970220566, 0.13580068945884705, 0.007493322249501944, 0.36715659499168396, -0.15660995244979858, 0.009861231781542...
def to _ word _ align ( src, tgt, subword _ align, subword _ align _ scores, m _ src = " joiner ", m _ tgt = " joiner " ) : assert m _ src in [ " joiner ", " spacer " ], " invalid value for argument m _ src! " assert m _ tgt in [ " joiner ", " spacer " ], " invalid value for argument m _ tgt! " src, tgt = src. strip ( ...
[ 0.4221748411655426, -0.6454578042030334, 0.8613236546516418, -0.667664110660553, -0.8395458459854126, 0.0676807165145874, -0.060390155762434006, 0.12102379649877548, -0.5212199091911316, 1.1600412130355835, 0.2010294646024704, 0.48544618487358093, 0.14353889226913452, 0.9185697436332703, ...
def delete ( self, request, slug ) : try : article = article. objects. get ( slug = slug ) except exception : response = { " message " : " the article was not found ", } return response ( response, status = status. http _ 404 _ not _ found ) user = request. user if user in article. favorited. all ( ) : # remove user fr...
[ 0.19582338631153107, -0.3725977838039398, 0.46886420249938965, 0.5987462997436523, -0.17136938869953156, -0.32935869693756104, 0.3334704637527466, 0.8891499042510986, 0.06402938067913055, 0.6762921214103699, 0.015487592667341232, 0.787052571773529, -0.4922546148300171, 0.3056192994117737, ...
def matrix _ transpose ( matrix ) : l1 = len ( matrix ) l2 = len ( matrix [ 0 ] ) new _ matrix = [ [ matrix [ j ] [ i ] for j in range ( l1 ) ] for i in range ( l2 ) ] return new _ matrix
[ -0.2032105177640915, -0.2043781280517578, 0.6953291296958923, 0.028450004756450653, -0.12803427875041962, -0.4709026515483856, -0.3201199173927307, 0.2457050234079361, 0.2882861793041229, 1.1006405353546143, -0.34223514795303345, 0.09134819358587265, -0.36009278893470764, 0.199985042214393...
def update _ last _ login ( sender, user, * * kwargs ) : user. last _ login = timezone. now ( ) user. save ( update _ fields = ['last _ login'] )
[ -0.7978896498680115, -0.6910778880119324, 0.5685797929763794, 0.02965780906379223, -0.1144828051328659, 0.26993754506111145, -0.6210615634918213, 0.49224168062210083, 0.5620685815811157, 0.6904537677764893, -1.0799663066864014, -0.26792407035827637, -0.020488033071160316, -0.63427168130874...
def test _ unknown _ parameters ( ) : yank ( store _ directory ='test ', wrong _ parameter = false )
[ -0.35118567943573, 0.5688995718955994, 0.3478456139564514, 0.246557354927063, 0.9805787801742554, 0.8444393873214722, 0.30146077275276184, 0.2374567985534668, -0.2409386783838272, -0.17021839320659637, -0.342629611492157, 0.806868314743042, -0.05379105731844902, 0.4627626836299896, -1.08...
def update _ time _ matrix ( self, current _ frame, log ) : for i in range ( self. columns ) : for j in range ( self. rows ) : map _ cell = self. emission _ matrix [ i ] [ j ] if len ( map _ cell ) > 0 : for k in range ( len ( map _ cell ) - 1, - 1, - 1 ) : n _ units _ frame = map _ cell [ k ] prob _ units = self. calc...
[ -0.22184905409812927, -0.6844562292098999, 0.9097865223884583, -0.19075100123882294, -0.554357647895813, -0.11987311393022537, 0.25117725133895874, -0.9646363854408264, -0.40502291917800903, 1.2547414302825928, 1.1526192426681519, 0.24938298761844635, 0.07897874712944031, 0.566837847232818...
def dump _ empty ( schema _ or _ field ) : if isinstance ( schema _ or _ field, ( schema, ) ) : schema = schema _ or _ field return { k : dump _ empty ( v ) for ( k, v ) in schema. fields. items ( ) } if isinstance ( schema _ or _ field, schemameta ) : # note : nested fields can pass a schema class ( schemameta ) # or ...
[ -1.2349504232406616, 0.3329417109489441, 0.6587556600570679, -0.40715786814689636, -0.16893060505390167, -0.3187655508518219, 0.08546674251556396, -0.47413888573646545, 0.5154472589492798, -0.7052757740020752, -0.7944920063018799, 0.38018301129341125, -0.208323672413826, 0.4927886128425598...
def update _ configuration ( conn : sqlite3. connection, * * kwargs ) : fields = [ * filter ( lambda f : f in configuration _ fields and configuration _ fields [ f ] ['editable'], kwargs ) ] if fields : values = [ kwargs [ field ] for field in fields ] statement = f " update configuration set {'=?, '. join ( fields ) }...
[ -1.153416633605957, 0.25822174549102783, 0.25165894627571106, -0.016849255189299583, -0.5099412202835083, -0.4948626458644867, -0.4950321912765503, -0.031848300248384476, -1.3437449932098389, 1.1326125860214233, -0.5087934732437134, -0.7980621457099915, -0.7381249666213989, -0.155660271644...
def skipped _ datapoint _ count ( self ) - > float : return pulumi. get ( self, " skipped _ datapoint _ count " )
[ 0.16212044656276703, 1.0736184120178223, 0.42710772156715393, 0.31232303380966187, -0.20802980661392212, 1.6263225078582764, 0.9286947250366211, 0.38277724385261536, -0.11986401677131653, -0.02609967812895775, -0.7262818813323975, 0.879787027835846, 0.43046167492866516, -0.9363291263580322...
def copy ( self ) : # zwraca nowa instancje return rectangle ( self. pt1, self. pt2 )
[ -0.5576726198196411, -1.3387442827224731, 0.3790862262248993, 0.4187176525592804, -1.1722296476364136, 1.3375002145767212, 0.8505777716636658, -0.4557685852050781, -0.4621964693069458, -0.3168286085128784, -0.0026456990744918585, 0.8728685975074768, -0.48920583724975586, -0.673282384872436...
def notes ( self ) : cursor = self. _ db. cursor ( ) cursor. execute ( " select * from zsfnote " ) for note in cursor. fetchall ( ) : yield self. _ row _ to _ note ( note )
[ -0.2205827534198761, -0.04295564070343971, 0.5331668853759766, -0.3829159140586853, 0.5077719688415527, -0.43013086915016174, -0.14662079513072968, -0.7006434798240662, -0.5252208113670349, 0.13127128779888153, 0.49736082553863525, -0.2812937796115875, 0.1718338429927826, 0.531494855880737...
def findcard ( cards, * * props ) : try : return next ( c for c in cards if all ( getattr ( c, k, none ) = = v for k, v in props. items ( ) ) ) except stopiteration : return false
[ -0.4134822487831116, -0.6910430192947388, 0.7235203981399536, -0.049946319311857224, -0.1816837042570114, -0.016092119738459587, -1.1688916683197021, -0.2033243179321289, -1.2430733442306519, 0.21529319882392883, 0.8336896896362305, -0.803788959980011, -0.49013251066207886, -0.090475723147...
def rot _ center ( image, angle ) : orig _ rect = image. get _ rect ( ) rot _ image = pygame. transform. rotate ( image, angle ) rot _ rect = orig _ rect. copy ( ) rot _ rect. center = rot _ image. get _ rect ( ). center rot _ image = rot _ image. subsurface ( rot _ rect ). copy ( ) return rot _ image
[ -0.10930658131837845, -0.07639455795288086, 0.5524383783340454, -0.8125903010368347, 0.07931146025657654, 0.05755984038114548, 0.5516237616539001, -0.24573270976543427, 0.714664876461029, 0.554538905620575, 0.84979248046875, 0.20055679976940155, -0.6904566287994385, -0.11492080241441727, ...
def has _ vowel ( s ) : if'a'in s or'e'in s or'i'in s or'o'in s or'u'in s : return true return false
[ 0.03239002451300621, -0.3202310800552368, 0.44194164872169495, -0.10839816927909851, -0.3867468237876892, -0.45711416006088257, -0.3515187203884125, 1.2330330610275269, 0.9842352867126465, -0.3049926459789276, -0.1363508552312851, 0.0565912239253521, 0.24396111071109772, -0.138471648097038...
def mousepressevent ( self, event ) : # modifiers = event. modifiers ( ) self. item = self. itemat ( event. scenepos ( ), qtransform ( ) ) self. state = self. machine. property ( " state " ) self. move = false if event. button ( ) = = qt. leftbutton and hasattr ( self. item,'tile') : cell = none if self. state in [ " s...
[ -0.015489261597394943, 0.08008532971143723, 0.5614364743232727, -0.227642223238945, -0.1995294690132141, 0.06775924563407898, 0.4659581184387207, -0.22728706896305084, 0.33710506558418274, 0.16549137234687805, -0.8053564429283142, -0.4416559040546417, 0.5281697511672974, 0.4723437130451202...
def test _ init ( gr ) : from simple _ graph import simplegraph assert isinstance ( gr, simplegraph )
[ -0.0767863318324089, 0.6326745748519897, 0.24909250438213348, 0.7761722803115845, 0.00857491698116064, 0.8063222169876099, 0.9791207909584045, -0.4401903748512268, 0.854103147983551, -0.5252305269241333, -1.1554806232452393, 0.8850612640380859, -0.6842507719993591, -0.4987611770629883, -...
def apply _ erosion _ and _ dilatation ( self, img ) : erosion _ kernel = cv2. getstructuringelement ( cv2. morph _ rect, self. erosion _ kernel _ size ) dilatation _ kernel = cv2. getstructuringelement ( cv2. morph _ rect, self. dilatation _ kernel _ size ) erosion = cv2. erode ( img, erosion _ kernel, iterations = 1 ...
[ -0.29498350620269775, -0.2038087397813797, 0.7816674113273621, 0.46107664704322815, 0.11896341294050217, -0.5451830625534058, 0.1640785038471222, 0.8467746376991272, 1.5159032344818115, -0.16749833524227142, 0.08916612714529037, -0.6575257182121277, 0.17536038160324097, 1.7119770050048828,...
def c2f ( c ) : return 1. 8 * _ np. asanyarray ( c ) + 32
[ 0.7526063919067383, -0.7295982837677002, 0.32460641860961914, -0.3451870381832123, 0.33943668007850647, -0.4644286632537842, 0.2717835605144501, -0.8951876759529114, -0.26709794998168945, -0.2321140021085739, -0.17439180612564087, 0.18226230144500732, 0.1403113156557083, -0.029081219807267...
def _ reduce ( im, filter _ vec ) : # size of new image. im = convolve ( im, filter _ vec ) im = convolve ( im, filter _ vec. t ) return im [ : : 2, : : 2 ]
[ -0.514845609664917, -0.07084953039884567, 0.6266629695892334, 0.3869953155517578, -0.21384193003177643, -0.8129750490188599, 0.68259596824646, 0.37223201990127563, -0.5819752812385559, 0.5840163230895996, -0.2480096071958542, 0.9098386764526367, 0.9992966055870056, 0.1425677090883255, 0....
def register ( self, sender = none, dispatch _ uid = none ) : self. signal. connect ( self. receive, sender = sender, dispatch _ uid = dispatch _ uid ) subscribed _ instances. append ( self )
[ 0.3138166666030884, 0.7749429941177368, 0.48879387974739075, 0.20108889043331146, 0.5479688048362732, 0.4751654863357544, -0.6545777916908264, 0.26212602853775024, 0.24748119711875916, -1.298742651939392, -1.6425458192825317, 0.8684977889060974, 0.08837215602397919, 0.7549601197242737, -...
def parse ( line ) : tokens = [ ] words = line. split ( ) for word in words : if not re. match ( " ( ^ http ) | ( ^ @ ) ", word ) : t = word. lower ( ). strip ( string. punctuation ) # because we strip punctuation above, we may be left with empty # strings that need not be included. if t! = u'' : tokens. append ( t ) r...
[ 0.3822833299636841, -0.5656060576438904, 0.3834227919578552, 0.053670164197683334, -0.1583249717950821, 0.023761283606290817, -0.4899601340293884, 1.107780933380127, 0.015810230746865273, -0.09365542232990265, -0.4423080086708069, 0.5062724947929382, -0.5602848529815674, 0.6811728477478027...
def testrun ( self ) : manager = multiprocessing. manager ( ) inp = manager. queue ( ) output = manager. queue ( ) process = pipeline _ process. pipelineprocess ( 2,'testing ', { }, test _ stage, inp, mockhelper, mockworker, output ) process. start ( ) inp. put ( mocktask ( test _ stage, 1 ) ) inp. put ( mocktask ( tes...
[ 0.32212719321250916, -0.026214253157377243, 0.5354504585266113, -0.16385798156261444, 0.65278559923172, 0.26483407616615295, 0.7594525814056396, 0.1395801305770874, -0.39302465319633484, -0.5922242403030396, -1.0761070251464844, -0.22158560156822205, -0.8675983548164368, -0.158896401524543...
def parse _ requirements ( filename ) : with open ( filename ) as file : parsed _ requirements = file. read ( ). splitlines ( ) parsed _ requirements = [ line. strip ( ) for line in parsed _ requirements if not ( ( line. strip ( ) [ 0 ] = = " # " ) or line. strip ( ). startswith ('- - find - links') ) ] return parsed _...
[ -0.11032864451408386, -0.8954241275787354, 0.6220621466636658, 0.32137542963027954, 0.22746825218200684, 0.6640909314155579, -0.09042619168758392, 0.6562672853469849, -0.02729807235300541, 0.4146922826766968, 0.2957186996936798, -0.16815565526485443, -0.30535292625427246, 0.906148254871368...
def run ( w, steps = 10, r = np. array ( [ 0, 0, 0 ] ), u = np. array ( [ 0, 0 ] ), q = np. array ( [. 01,. 01 ] ), s = np. array ( [. 05, 1 * pi / 180 ] ) ) : q = np. diag ( q * * 2 ) # noise system cov s = np. diag ( s * * 2 ) # noise landmark cov state = state ( r = r ) # run simulation for t in np. arange ( 0, step...
[ 0.20082317292690277, 0.4705201983451843, 0.6587816476821899, -0.24983914196491241, -0.5393386483192444, 0.46082162857055664, 0.2511380612850189, -0.5045273303985596, 0.111516073346138, 0.3125790059566498, -0.16320696473121643, 0.43900400400161743, 0.6387447118759155, 0.8862940073013306, ...
async def set _ comment _ on _ task ( self, task : task ) - > mythicresponse : url = " { } { } : { } / api / v { } / tasks / comments / { } ". format ( self. _ http, self. server _ ip, self. _ server _ port, self. _ server _ api _ version, task. id ) if task. comment = = " " or task. comment is none : resp = await self...
[ -0.6677029132843018, -0.6113184094429016, 0.6226718425750732, -0.27635014057159424, 0.4629722237586975, -0.9893255829811096, 0.2663074731826782, 0.34501343965530396, 0.10235445201396942, 0.9094226360321045, -0.8718749284744263, 0.15808595716953278, -0.25853514671325684, 0.45669206976890564...