text
stringlengths
25
2.19k
embedding
listlengths
768
768
def _ _ init _ _ ( self, bindings = { }, parent = none ) : self. bindings = bindings self. parent = parent
[ 0.3825324475765228, -0.14832964539527893, 0.5240047574043274, 0.7432337403297424, -1.1273235082626343, -0.34676218032836914, -0.23656195402145386, 0.6636797785758972, 0.47440412640571594, -1.1051745414733887, -0.4401220679283142, 0.21796606481075287, -0.3030620813369751, 1.1043176651000977...
def symbolize ( x, m ) : x = np. array ( x ) if m > = len ( x ) : raise valueerror ( " length of the series must be greater than m " ) dummy = [ ] for i in range ( m ) : l = np. roll ( x, - i ) dummy. append ( l [ : - ( m - 1 ) ] ) dummy = np. array ( dummy ) symx = [ ] for mset in dummy. t : rank = stats. rankdata ( m...
[ -0.5540017485618591, 0.4093879163265228, 0.5330966711044312, -0.07251391559839249, -0.33424583077430725, -0.39367029070854187, -0.07558862119913101, -0.322261244058609, 0.4404856562614441, 0.8999202847480774, -0.720635175704956, 1.259182095527649, 0.44832706451416016, 0.02047658897936344, ...
def _ connectivity ( self ) : while true : # if exit flag received, we stop the thread if self. _ exit : self. disconnect ( ) time. sleep ( 1 ) break # if connection established, we check connection status periodically if self. connection _ status : try : # request influx db connection status self. client. ping ( ) exc...
[ -0.034549590200185776, -1.1422985792160034, 0.8824880123138428, 0.4529070258140564, 1.1737079620361328, 0.2987036406993866, 0.06126042827963829, -0.30495521426200867, -0.3603767156600952, -0.6032000780105591, 1.0630704164505005, -0.09823081642389297, -0.41156116127967834, 0.396269112825393...
def dispatch ( self, stanza, session = none, direct = 0 ) : if not session : session = self session. stream. _ mini _ dom = none name = stanza. getname ( ) if not direct and self. _ owner. _ route : if name = ='route': if stanza. getattr ('error') = = none : if len ( stanza. getchildren ( ) ) = = 1 : stanza = stanza. g...
[ -0.5986549854278564, -0.8673481345176697, 0.8699860572814941, 0.7215464115142822, -0.2637173533439636, -0.39999404549598694, 0.6079091429710388, 0.0425989031791687, 0.5093541145324707, -0.4511381983757019, -0.2942197918891907, 0.031816523522138596, 0.6890214681625366, 0.5681951642036438, ...
def propagate _ state ( state, excl, oldstate, oldexcl ) : old _ row = { y : x for x, y in enumerate ( oldstate [ " location " ] ) } copyexcl = set ( ) copycols = list ( ) for col in state. colnames : if col in oldstate. colnames : copycols. append ( col ) for r in range ( len ( state ) ) : loc = state [ r ] [ " locati...
[ 0.34835493564605713, 0.19221703708171844, 0.9149031639099121, -0.4831240177154541, -1.3470689058303833, -0.06446772068738937, -0.056590184569358826, 1.332521677017212, 0.5406200289726257, 0.8520337343215942, 0.2600356936454773, 0.8582086563110352, 0.6968604326248169, -0.584263801574707, ...
def get _ version _ data ( session, url, authenticated = none, version _ header = none ) : headers = {'accept':'application / json'} if version _ header : headers ['openstack - api - version'] = version _ header try : resp = session. get ( url, headers = headers, authenticated = authenticated ) except exceptions. unaut...
[ -0.9836727380752563, -0.40026071667671204, 0.7716927528381348, 0.4452100992202759, -0.04555905610322952, -0.36897748708724976, -1.0935959815979004, -0.39643383026123047, 0.23964667320251465, 0.4807044565677643, -0.8127741813659668, 0.11799345165491104, 0.17018024623394012, 0.09205648303031...
def get _ imdbcompanyid ( self, companyid ) : name = getcompanyname ( companyid,'% scompanies. index'% self. _ _ db,'% scompanies. data'% self. _ _ db ) if not name : return none return self. company2imdbid ( name )
[ -0.9025174975395203, -0.4596097767353058, 0.48073092103004456, -0.32723554968833923, -0.24563559889793396, 0.1533215492963791, 0.030631477013230324, -0.6754387617111206, 0.8506345152854919, 1.0013456344604492, -0.12379768490791321, 0.6709111928939819, -1.7031657695770264, 1.044869661331176...
def pad _ lines _ list ( s _ words, max _ width ) : # todo : s _ words [ : - 1 ] = > islice ( s _ words, 0, len ( s _ words ) - 1 ) adj _ words = ( distribute _ spaces ( line, max _ width, i % 2 = = 0 ) for i, line in enumerate ( s _ words [ : - 1 ] ) ) return chain ( adj _ words, [''. join ( s _ words [ - 1 ] ) ] )
[ 0.34522557258605957, 0.2966834306716919, 0.7179490327835083, 0.09356620907783508, 0.2041814774274826, 0.12385352700948715, -0.4027175307273865, 0.9481286406517029, 0.8799971342086792, 0.43070924282073975, 0.7379326820373535, -0.15421585738658905, -0.23666127026081085, 1.1386638879776, -0...
def macd ( self, df, a = 10, b = 20, c = 10 ) : df = df. copy ( ) df [ " ma _ fast " ] = df [ " close " ]. ewm ( span = a, min _ periods = a ). mean ( ) df [ " ma _ slow " ] = df [ " close " ]. ewm ( span = b, min _ periods = b ). mean ( ) df [ " dif " ] = df [ " ma _ fast " ] - df [ " ma _ slow " ] df [ " macd " ] = d...
[ 0.12217947840690613, 0.4284006655216217, 0.7669972777366638, -1.2718920707702637, -0.2254178375005722, 0.836223304271698, 0.6393131613731384, 0.5397543907165527, 0.2610531449317932, 0.17523260414600372, 0.9237467050552368, 0.578594446182251, 0.5617341995239258, 0.6150722503662109, 1.5149...
def incoming ( self, ciphertext ) : self. ciphertext = ciphertext self. cleartext = ciphersaber2. decrypt ( ciphertext, key ) self. parse _ headers ( ) return self
[ 0.08887319266796112, 0.13324858248233795, 0.23247113823890686, -0.35112500190734863, -1.132811188697815, -0.4533712565898895, -0.42632707953453064, -0.6151703000068665, 0.4841634929180145, -0.25964418053627014, -0.7246732115745544, -0.3686853051185608, -0.36008623242378235, -0.231761068105...
def update _ volume ( self, sentence ) : myid = self. model. rate ( sentence ) modifier = " " num = 10 if myid = = 0 : if self. get _ current _ volume ( )! = 0 : self. volume _ before _ mute = self. get _ current _ volume ( ) num = 0 elif myid = = 1 : modifier = " - " elif myid = = 2 : modifier = " + " elif myid = = 3 ...
[ -0.30727964639663696, -0.6824288964271545, 0.8319887518882751, 0.09069077670574188, -0.08119270205497742, -0.8651072978973389, -0.2665781080722809, -0.15512704849243164, 0.2837543189525604, 0.08766759932041168, 0.25706911087036133, -0.5939143896102905, -0.8208127617835999, 0.53161704540252...
def errors ( self ) : global _ errors = self. _ global _ errors if self. _ global _ errors is not none else [ ] schema _ errors = self. find _ schema _ errors ( ) parsing _ errors = self. find _ parsing _ errors ( ) return [ * global _ errors, * parsing _ errors, * schema _ errors ]
[ -0.7956412434577942, 0.03798726201057434, 0.23942208290100098, 0.35132795572280884, 1.5090724229812622, 0.709679126739502, 0.3656103312969208, 0.5041379332542419, -0.32693547010421753, -0.07779991626739502, -0.719714879989624, 0.5958277583122253, -0.29003527760505676, 0.6324373483657837, ...
def set _ end _ min ( self, mn ) : assert _ is _ cpo _ interval _ value ( mn ), " interval min should be an integer in [ interval _ min, interval _ max ] " assert mn < = self. end [ 1 ], " interval min should be lower or equal to interval max " self. end = ( mn, self. end [ 1 ] )
[ -0.636991560459137, -0.5020337104797363, 0.5465068817138672, 0.4246155619621277, -0.40564754605293274, 1.4933338165283203, -0.5286814570426941, -0.27792149782180786, -0.6531941890716553, 0.3177136480808258, -0.7280824184417725, 1.1056164503097534, -1.4085299968719482, 0.10371934622526169, ...
def test _ get _ recipe _ by _ tag ( self ) : pass
[ 0.7502487897872925, 0.288072407245636, -0.02529759332537651, 1.5650526285171509, 0.22311322391033173, -1.196663737297058, 1.0418392419815063, 0.4766771197319031, -0.4436323344707489, -0.47752827405929565, -0.6062822341918945, -0.11434902995824814, -0.3500147759914398, 0.30155321955680847, ...
def delete ( request, pk ) : provider = models. provider. objects. get ( pk = pk ) provider. delete ( ) return redirect ( reverse ('provider - list') )
[ -0.7683568000793457, 0.7122750282287598, 0.41675299406051636, 0.2980104982852936, 0.05607268214225769, 0.9783503413200378, 0.44580116868019104, 1.0802499055862427, 1.1135740280151367, 0.6032043695449829, -0.12482950836420059, -0.21355247497558594, 0.36185887455940247, 0.5461626052856445, ...
def error _ to _ reward ( error, pmb = 0, mode = default _ control _ mode, bias = control _ reward _ bias ) : if mode = ='min - rpe': reward = ( 40 - error [ 0 ] ) * 3 elif mode = ='max - rpe': reward = error [ 0 ] * 10 elif mode = ='min - spe': reward = ( 1 - error [ 1 ] ) * 150 elif mode = ='max - spe': reward = erro...
[ -0.37780845165252686, -0.5268500447273254, 0.7843512296676636, -0.41354823112487793, -0.15178212523460388, -0.23776817321777344, -0.46741923689842224, 0.14314047992229462, 1.3415412902832031, 0.9101613163948059, -0.7607215642929077, 0.26472339034080505, -0.6901813745498657, -0.510293602943...
def main _ menu ( self ) : while true : choice = menu. make ( menu. main ) if choice = = 1 : # add new entry task = entry. entry ( ). enter _ all ( ) self. task _ list. add ( task ) return self. main _ menu ( ) elif choice = = 2 : # search existing entries if not self. task _ list : print ( " cannot search, no entries ...
[ -0.2571326792240143, -0.1733354777097702, 0.659848690032959, 0.9040650129318237, 0.26103001832962036, 1.044407606124878, 0.4504844844341278, -0.0619325265288353, 0.0019415303831920028, 0.061228107661008835, 0.24398173391819, -0.6746766567230225, -0.5718609690666199, 0.30540022253990173, ...
def between ( n, tuple ) : smaller, larger = minmax ( tuple [ 0 ], tuple [ 1 ] ) return smaller < = n < = larger
[ -1.2984392642974854, 0.01324098277837038, 0.5962503552436829, 0.1744701862335205, 0.3114711046218872, 0.1288362592458725, -1.4178667068481445, -1.0845435857772827, -0.8349199295043945, -0.44827720522880554, -0.018627457320690155, -0.45025724172592163, -0.7525044679641724, -0.72087466716766...
def global _ dial _ in _ countries ( self, global _ dial _ in _ countries ) : self. _ global _ dial _ in _ countries = global _ dial _ in _ countries
[ -0.8437937498092651, -0.2888759970664978, 0.19884194433689117, 0.23608340322971344, -0.666861355304718, 2.4519436359405518, 0.5784836411476135, 0.621411144733429, -0.9052332639694214, 0.25031936168670654, -0.6884491443634033, -0.5405672192573547, -0.6155941486358643, 0.412664532661438, -...
def key _ pair _ destroy _ all _ by _ user ( context, user _ id ) : return impl. key _ pair _ destroy _ all _ by _ user ( context, user _ id )
[ -1.2637479305267334, 0.07859586179256439, 0.35401085019111633, 1.272987723350525, -1.2772325277328491, 0.02760038524866104, 0.47612014412879944, -0.25327205657958984, -0.17168356478214264, 0.40609925985336304, -0.3646396994590759, 0.030759498476982117, -0.21936030685901642, 1.1072435379028...
def ip _ list _ sort ( ret ) : for region in ret : for ip _ list in ret [ region ] : if ip _ list = = " all _ ips " : # remove any duplicates ret [ region ] [ ip _ list ] = list ( set ( ret [ region ] [ ip _ list ] ) ) ret [ region ] [ ip _ list ]. sort ( ) return ret
[ -0.785524845123291, -0.6255826950073242, 0.5229215025901794, -0.8543064594268799, -0.5534736514091492, -0.38171088695526123, -0.33308032155036926, 0.6741905808448792, 0.49395352602005005, 0.8256744146347046, -0.46697548031806946, -0.6314520239830017, -0.21760468184947968, -0.60412579774856...
def get _ config ( param, type = str, mandatory = false, section ='dq2 - victor') : _ lock. acquire ( ) try : if section in _ params and param in _ params [ section ] : return _ params [ section ] [ param ] value = none try : value = _ config. get ( section, param ) except exception as e : pass if not value and mandato...
[ -0.115287184715271, -0.36619749665260315, 0.8697959780693054, -0.1476891189813614, -0.40527546405792236, -0.41878610849380493, -0.20161376893520355, -0.24172461032867432, -0.8981248736381531, 1.0072709321975708, 0.20911680161952972, 0.7855899333953857, -0.32323700189590454, 0.8243080377578...
def regnety _ 080 _ tv ( pretrained = false, * * kwargs ) - > regnet : return _ create _ regnet ('regnety _ 080 _ tv ', pretrained, * * kwargs )
[ -0.32054075598716736, 0.18628667294979095, 0.4131790101528168, -0.0643467977643013, 0.820704996585846, -1.0393637418746948, 0.00984194502234459, -0.3607032895088196, 0.41632530093193054, -0.40563929080963135, -1.2051000595092773, 1.0697699785232544, -0.33206382393836975, -0.019562771543860...
def build _ connection _ string ( params ) : return " ; ". join ( [ " % s = % s " % ( k, v ) for k, v in params. items ( ) ] )
[ -0.7534894943237305, -0.9275627732276917, 0.38377171754837036, -0.08379878103733063, 0.24445194005966187, 0.3658624291419983, -0.9706314206123352, 0.2947632372379303, -0.916962742805481, 0.9822096228599548, 0.775084912776947, -0.4455045163631439, -0.21095618605613708, -0.34348198771476746,...
def edit _ menu ( self, found _ tasks ) : ed _ tasks = edit. edit ( found _ tasks ) while true : utils. clear ( ) try : ed _ tasks. print _ task ( ) except indexerror as err : print ( err ) utils. wait ( ) return self. search _ menu ( ) choice = menu. make ( menu. edit ) try : if choice = = 1 : # next ed _ tasks. next ...
[ -0.9771614670753479, 0.22043593227863312, 0.8111768364906311, 0.35629403591156006, 0.5073543787002563, -0.06124214082956314, 1.3875420093536377, -0.16428068280220032, -0.08218810707330704, 0.08335540443658829, -0.16046299040317535, -0.1422097533941269, -0.21543720364570618, 0.1432503014802...
def test _ oembed _ rich ( self ) - > none : self. lookups [ " publish. twitter. com " ] = [ ( ipv4address, " 10. 1. 2. 3 " ) ] result = { " version " : " 1. 0 ", " type " : " rich ", # note that this provides the author, not the title. " author _ name " : " alice ", " html " : " < div > content preview < / div > ", } ...
[ 0.023936914280056953, 0.2446640133857727, 0.6205776929855347, -0.278959721326828, 0.3792228102684021, -0.26736709475517273, -0.40951085090637207, -0.170779287815094, -0.0937909334897995, -0.06874293088912964, -0.3431868553161621, 0.9839266538619995, -0.3354358673095703, 0.14992357790470123...
def findap ( key ) : from scipy. stats import gaussian _ kde key = key [ 0 ] start = int ( max ( ( 0, key - regwindow / 2 ) ) ) stop = int ( min ( ( len ( globaltc _ bc. value ), key + regwindow / 2 ) ) ) y1 = globaltc _ bc. value [ start : stop ] y2 = y1 [ np. logical _ not ( np. isnan ( y1 ) ) ] if np. any ( y2 ) : i...
[ -0.36152568459510803, -0.5097547173500061, 0.7671307325363159, -0.6401031613349915, -0.998440146446228, 0.3539201021194458, 0.9092854857444763, -0.19840185344219208, 0.6064470410346985, 1.2732962369918823, 1.0663608312606812, 0.7455982565879822, -0.686400294303894, 0.6974411606788635, -0...
def train _ newton _ op ( self ) : update _ ops = [ ] steps _ and _ vars = list ( zip ( self. newton _ step, self. w ) ) for s, w in reversed ( steps _ and _ vars ) : with tf. control _ dependencies ( update _ ops ) : update _ ops. append ( tf. assign ( w, w + s ) ) training _ op = tf. group ( * update _ ops ) return t...
[ -0.2074844241142273, -0.17145490646362305, 0.5654290914535522, -0.06559881567955017, -0.2944733202457428, -0.3586977422237396, 0.2860056757926941, -0.29515713453292847, -0.49986428022384644, 0.43679025769233704, -0.3156766891479492, -0.1493900716304779, -0.28712040185928345, -0.25847810506...
def _ _ eq _ _ ( self, other ) : if isinstance ( other, commandparameters ) : return ( self. _ name = = other. name and ( self. _ command = = other. command ) or ( self. _ cmd = = other. cmd ) ) or ( self. _ id is not none and other. id is not none and self. _ id = = other. id ) return false
[ -0.5454660058021545, -0.8938758373260498, 0.727636456489563, -0.17513668537139893, 0.2900608479976654, 0.2750695049762726, -0.16912373900413513, -0.9218965172767639, 0.4960584044456482, 0.2810762822628021, -0.3309679329395294, 0.3047339916229248, -0.8404393196105957, 0.905846893787384, -...
def test _ enum ( self ) : band = self. band band. insert ( band ( id = self. band. id, name = self. band. name, popularity = self. band. popularity, ) ). on _ conflict ( action = onconflictaction. do _ nothing ). run _ sync ( ) self. assertlistequal ( band. select ( ). run _ sync ( ), [ { " id " : self. band. id, " na...
[ -0.723812460899353, 0.37359970808029175, 0.5695624947547913, -0.2613835036754608, 1.339643120765686, 0.6348530650138855, -0.5366774797439575, -0.8608397245407104, 0.9001924395561218, 0.7392135262489319, -1.4424442052841187, 0.1030399277806282, -0.5425258874893188, -0.3551490604877472, -0...
def plot _ frontier _ area ( w _ frontier, nrow = 25, cmap = " tab20 ", height = 6, width = 10, ax = none ) : if not isinstance ( w _ frontier, pd. dataframe ) : raise valueerror ( " w must be a dataframe " ) if ax is none : ax = plt. gca ( ) fig = plt. gcf ( ) fig. set _ figwidth ( width ) fig. set _ figheight ( heigh...
[ 0.12297053635120392, 1.0520191192626953, 0.9576957821846008, -1.1256593465805054, -1.026595115661621, -0.272488534450531, 0.851182758808136, -0.318996399641037, 0.5584433078765869, 0.396991491317749, 1.2748311758041382, 0.6584226489067078, 0.10018377751111984, 0.19030077755451202, 0.9152...
def _ normalize ( self, value, * * options ) : return value. replace ('','' )
[ 0.43701592087745667, 0.18724586069583893, 0.39743003249168396, -0.7772819995880127, -0.6093840003013611, -0.3872434198856354, -0.27022576332092285, 0.4946691393852234, 0.9556631445884705, 0.3409353494644165, 0.2891535460948944, 0.04666619002819061, -0.7852096557617188, -0.4155138432979584,...
def getboxbyx ( x, grid = 50, padding = true ) : if x. shape [ 1 ] > 2 : print'we can only get the grid in 2 - d dimension!'return none else : minx = min ( x [ :, 0 ] ) maxx = max ( x [ :, 0 ] ) miny = min ( x [ :, 1 ] ) maxy = max ( x [ :, 1 ] ) padding _ x = 0. 05 * ( maxx - minx ) padding _ y = 0. 05 * ( maxy - miny...
[ -0.4182811379432678, 0.5115441083908081, 0.8494408130645752, -0.13541992008686066, -0.8017222285270691, -0.5936517119407654, -0.5398885011672974, -0.9232982993125916, 0.32387417554855347, -0.10916949063539505, -0.5106815695762634, 1.051328420639038, 0.15379388630390167, 0.3589721620082855,...
def addexons ( exonrf, trans ) : for exon in trans. exons : exonrf. add ( trans. chrom, exon. start, exon. end, exon, trans. strand )
[ 0.05421905592083931, -0.6775366067886353, 0.4632496237754822, 0.4051647186279297, 0.19872386753559113, -0.2752516269683838, -1.6136897802352905, 0.8973259925842285, -0.030910132452845573, 0.26854637265205383, -1.3095064163208008, -0.3433634042739868, 0.26957711577415466, -0.373621255159378...
def estimate _ s ( votes ) : votes, counts = fill _ in _ vote ( votes ) uvotes = np. array ( [ x for x in set ( tuple ( x ) for x in votes ) ] ) p = np. zeros ( ( uvotes. shape [ 0 ] ) ) i = 0 for v in uvotes : ix = np. sum ( v = = votes, 1 ) = = votes. shape [ 1 ] p [ i ] = np. sum ( counts [ ix ] ) i + = 1 p / = np. ...
[ 0.07081558555364609, -0.09798233211040497, 0.5868895053863525, 0.3147561252117157, -0.23572894930839539, -0.45886027812957764, -0.38450944423675537, 0.3506178855895996, 0.5334135890007019, 1.861233115196228, -0.39549702405929565, 0.5103411078453064, -0.2544502317905426, -0.1175491064786911...
def v _ std _ from _ pos ( self, z _ sup _ std ) : # sigma of velocities = sqrt ( sigma ( x1 ) * * 2 + sigma ( x2 ) * * 2 ) v _ std = torch. sqrt ( z _ sup _ std [ :, 1 :, :, 2 : ] * * 2 + z _ sup _ std [ :, : - 1, :, 2 : ] * * 2 ) z _ sup _ std _ full = torch. cat ( [ z _ sup _ std [ :, 1 : ], v _ std ], - 1 ) zeros =...
[ 0.8937426209449768, -0.4662894904613495, 0.5419573783874512, 0.3115876317024231, -0.8695732951164246, 0.15500320494174957, 0.13521941006183624, 0.828571617603302, 0.46962764859199524, 0.5265106558799744, -1.1564944982528687, 0.5241512060165405, 0.39004701375961304, -0.4925355315208435, 0...
def test _ number _ nodes ( gr ) : gr. add _ node ('val1') gr. add _ node ('val2') assert sorted ( gr. nodes ( ) ) = = ['val1 ','val2']
[ -0.15148314833641052, 1.2424806356430054, 0.4859330654144287, 0.05957277491688728, 1.1629667282104492, -0.02085350640118122, 0.38767826557159424, -0.6524930596351624, -0.8705607056617737, -0.3344579041004181, -0.07194291800260544, -0.10929141193628311, 0.4290432333946228, -0.19455535709857...
def cardinality _ report ( df ) : # get only categorical features from df columns = df. describe ( exclude ='number'). columns # evaluate cardinality qualities for each feature for col in columns : print ( f " column : { col } " ) print ( f " nunique : { df [ col ]. nunique ( ) } " ) print ( f " perc uniq : { df [ col ...
[ 0.7416860461235046, 0.051627758890390396, 0.483189195394516, -0.17056506872177124, 0.5418189167976379, -0.26484909653663635, 0.5299015045166016, 0.9394201040267944, -0.9032161235809326, -0.9636334180831909, 0.1011194959282875, 0.5353702306747437, 0.8135226368904114, 0.319828599691391, 0....
def find _ trailer ( id _ movie ) : url _ trailer ='https : / / www. youtube. com / watch? v = { }'connection = urllib. urlopen ( url _ video. format ( id _ movie, api _ key ) ) data _ json = json. loads ( connection. read ( ) ) for video in data _ json ['results'] : if video ['type'] = ='trailer': connection. close ( ...
[ -0.38545113801956177, -0.7822304964065552, 0.6122934222221375, -0.31100115180015564, 0.20741420984268188, -0.8800804018974304, -0.9320744872093201, -0.9399476647377014, -0.37473803758621216, 0.4676075279712677, -0.32680580019950867, 0.6604073643684387, -0.6126781702041626, 0.44147115945816...
def get _ groups ( name _ config = none, group _ file = none, cloud _ id ='src ', validate _ users _ group = false ) : cfglib. collector _ configs _ plugins ( ) cfglib. init _ config ( name _ config ) group = grouping. grouping ( cfglib. conf, group _ file, cloud _ id ) group. group ( validate _ users _ group )
[ 0.13592195510864258, 0.7843616604804993, 0.22002966701984406, 0.7024951577186584, 0.545681893825531, 0.051140692085027695, 0.07481416314840317, -0.012140415608882904, -1.144388198852539, 0.2958318591117859, -0.26164737343788147, 0.5169571042060852, -0.1396627575159073, 0.34924840927124023,...
def prediction _ metrics ( filepath, y _ pred, y _ test, b _ cutoff = 240, outdir = '. / outputs /') : from preprocess import read _ tiff, rgb _ preprocess from feature _ extraction import calc _ pct _ yellow from classification _ model _ metrics import calc _ accuracy from accessory import write _ csv import os try : ...
[ -0.2064860314130783, -0.11959896236658096, 0.7972568869590759, 0.48190903663635254, -0.5682022571563721, 0.6705887913703918, 1.5409334897994995, 0.2337597757577896, -0.3184249997138977, 0.8047931790351868, 0.5005751848220825, -0.20724862813949585, 0.9001810550689697, 1.0524762868881226, ...
def quota _ usage _ update ( context, project _ id, resource, in _ use, reserved, until _ refresh ) : return impl. quota _ usage _ update ( context, project _ id, resource, in _ use, reserved, until _ refresh )
[ -1.0708272457122803, -0.5731467008590698, 0.4366814196109772, -0.06982444226741791, -0.36848464608192444, -0.3335268199443817, -0.017172304913401604, -0.5860069394111633, -0.18516342341899872, 0.730678141117096, 0.7397527694702148, 0.5121515989303589, 0.09759160131216049, -1.56791675090789...
def upload _ to ( instance, filename ) : now = timezone. now ( ) base, extension = os. path. splitext ( filename. lower ( ) ) timestemp = timezone. now ( ). strftime ( " % y - % m - % d - % h % m % s " ) milliseconds = now. microsecond / / 1000 return f " user / { instance. pk } / { timestamp } - { milliseconds } { ext...
[ -0.4924963116645813, -0.2983618676662445, 0.7904990911483765, -0.6632193922996521, -0.2844570279121399, 0.16211773455142975, 0.06123652681708336, -0.04834131896495819, -0.7206571102142334, 0.9256212711334229, 0.12138420343399048, 0.38975217938423157, 0.2536924481391907, -0.2713479399681091...
def _ _ set _ name _ _ ( self, owner, name ) : event = self. event _ type # to avoid having a single event _ types version in the subclasses # for more information check this : # https : / / www. toptal. com / python / python - class - attributes - an - overly - thorough - guide if owner. event _ types = = { } : owner....
[ -0.26226383447647095, -0.044459208846092224, 0.8013349175453186, 0.05784456431865692, 0.0018686800030991435, -0.32409417629241943, 0.06938385218381882, -0.2619616687297821, 0.22083139419555664, 0.8639286756515503, -0.8897669315338135, 0.2681530714035034, 0.8572733402252197, 0.6029882431030...
async def post _ request _ handler ( request ) : return web. response ( text = await request. text ( ) )
[ -0.6025030612945557, -0.37631210684776306, 0.3072502315044403, 0.10891866683959961, -0.603905975818634, -0.007945052348077297, -0.6607223749160767, -0.03139214590191841, -0.3195161819458008, -0.8851971626281738, -0.018411394208669662, -0.5097082853317261, -0.447757363319397, -0.15290129184...
def any _ item ( d ) : return next ( iter ( viewitems ( d ) ) )
[ -0.6889036893844604, 0.5604844689369202, 0.18756762146949768, 0.007081565447151661, -1.02850341796875, -0.3057793378829956, -0.24709129333496094, -0.2567908465862274, -0.07198558002710342, -1.5046935081481934, 1.4287986755371094, -0.09910278022289276, 0.1680222600698471, -0.076501362025737...
def write _ lammps _ data ( self, f ) : f. write ( f. name +'( written by mpinterfaces ) \ n \ n') symbols = self. atoms. get _ chemical _ symbols ( ) n _ atoms = len ( symbols ) f. write ('% d \ t atoms \ n'% n _ atoms ) if self. specorder is none : species = [ tos. symbol for tos in self. structure. types _ of _ spec...
[ 0.22085846960544586, -0.24149776995182037, 0.6268244385719299, -1.0685607194900513, 0.5871979594230652, 0.6093949675559998, -0.08460762351751328, -0.3887471556663513, -0.4028294086456299, -0.10145208984613419, -0.08031981438398361, 0.09952151775360107, -0.5113810300827026, -0.0966209620237...
def change _ total _ money ( player _ posn, amount ) : print ( " \ n { }'s previous total money : $ { :. 2f } ". format ( get _ name ( player _ posn ), players [ player _ posn ] ['money'] ) ) players [ player _ posn ] ['money'] + = ceil ( float ( amount ) * 100 ) / 100 print ( " { }'s current total money : $ { :. 2f } ...
[ -0.2836836278438568, -1.0263137817382812, 0.8014658093452454, -1.2880818843841553, 0.052176740020513535, -0.5764732360839844, 0.09911622107028961, 0.24376344680786133, 0.05220382288098335, 1.1582010984420776, -0.45963814854621887, 0.7570496797561646, 0.222003772854805, -0.23504513502120972...
def test _ get _ alumno _ curso _ docente ( self ) : self. client. force _ authenticate ( user = self. user _ docente ) response = self. client. get ( f " / api / alumnos / curso / { self. curso _ 1. id } / " ) self. assertequal ( response. status _ code, status. http _ 200 _ ok )
[ 0.37485837936401367, -0.029485447332262993, 0.46537601947784424, 0.32511159777641296, -0.15987443923950195, 0.9509138464927673, -0.19600991904735565, 0.3825477361679077, 0.089931920170784, -0.003203087951987982, 0.04207514971494675, 1.5860795974731445, 1.0848286151885986, -0.60313063859939...
def sat _ inc ( id, value ) : return put _ state ( id, { " sat _ inc " : value } )
[ -0.6050698757171631, 0.5413512587547302, 0.16518041491508484, 0.13125170767307281, -1.1013624668121338, 0.9006869792938232, 0.019239870831370354, -0.27546364068984985, 0.1646503508090973, 0.27336975932121277, -0.6314704418182373, 0.1697564274072647, 0.17645691335201263, -0.5101500153541565...
def fix _ metadata ( self, cubes ) : for cube in cubes : latitude = cube. coord ('latitude') if latitude. bounds is none : latitude. guess _ bounds ( ) latitude. points = latitude. points. astype ( np. float32 ). astype ( np. float64 ) latitude. bounds = latitude. bounds. astype ( np. float32 ). astype ( np. float64 ) ...
[ 0.0634002685546875, -0.8850942254066467, 0.5839948058128357, -0.37755176424980164, 0.46078094840049744, 1.0450758934020996, -0.681289792060852, 0.3656529486179352, -0.5307673215866089, 0.8688920140266418, 0.07427211105823517, 0.8573886752128601, 0.6083669066429138, 0.4616451561450958, 0....
def get _ recipes ( self, * ids ) : if not ids : ids = self. get _ recipes _ ids ( ) else : ids = ids [ 0 ] if isinstance ( ids, int ) : return self. _ request ( " recipes ", ids = str ( ids ) ) elif len ( ids ) < = 200 : return self. _ request ( " recipes ", ids = ', '. join ( str ( id ) for id in ids ) ) else : retur...
[ -1.568430781364441, 0.6828934550285339, 0.4432013928890228, 0.3373701572418213, 1.0110251903533936, -1.2689980268478394, -0.8923386931419373, 0.39528706669807434, 0.46248987317085266, -0.13197481632232666, 0.047504208981990814, 0.0887732282280922, -0.203840434551239, 0.21462510526180267, ...
def is _ overflow _ position ( dimension, position ) : if position [ 1 ] = = dimension + 1 : return true return false
[ -0.017272254452109337, 0.07709618657827377, 0.6946529746055603, 0.9483317732810974, -0.891078770160675, 0.6207309365272522, -0.4016590118408203, -1.3595491647720337, 0.5225422978401184, -0.262412965297699, -0.04631517454981804, 0.03296450525522232, -0.6236934661865234, -0.33417215943336487...
def main ( ) : parser = argparse. argumentparser ( description ='generates a cloudformation region map for amis') parser. add _ argument ('images ', nargs ='* ', help ='( list of ) valid ami image id ( s )') parser. add _ argument ('- r ','- - region ', help ='specify the region if " image " is not in your default regi...
[ 0.19503481686115265, -0.3625425696372986, 1.1720994710922241, -0.4564005136489868, -0.15312089025974274, -0.1808215081691742, 0.15496990084648132, -0.0035118793603032827, -0.29141563177108765, 0.17501746118068695, -0.3430140018463135, 0.37035590410232544, 0.23394469916820526, -0.0530733838...
def create _ user ( self, * * create _ user _ json ) : new _ user = user ( is _ hashing _ password _ required = true, * * create _ user _ json ) self. database. insert _ user _ document ( new _ user _ document = new _ user. document ( ) ) return new _ user. client _ response ( )
[ -0.9896807074546814, 0.566890299320221, 0.5419732332229614, 1.2328646183013916, 0.5107772350311279, 0.7217649221420288, 0.36717137694358826, -0.8977671265602112, -0.365116149187088, 0.4213234484195709, -1.303576946258545, -1.4063146114349365, -0.5364315509796143, -0.029488559812307358, -...
def test _ parse _ inform ( self ) : # example tr - 069 cpe - > acs rpc call. copied from : # http : / / djuro82. blogspot. com / 2011 / 05 / tr - 069 - cpe - provisioning. html cpe _ string = b'''< soapenv : envelope soapenv : encodingstyle = " http : / / schemas. xmlsoap. org / soap / encoding / " xmlns : soapenv = "...
[ 0.6321696043014526, 0.111454539000988, 0.8445804715156555, -0.4277797341346741, 0.09471947699785233, 0.10273696482181549, 0.2702179551124573, -0.04175734519958496, -0.12460113316774368, -0.44080111384391785, 0.0022815915290266275, -0.4023112654685974, -0.2657070457935333, 0.394548475742340...
def get _ keep _ score ( source _ counts, prediction _ counts, target _ counts ) : source _ and _ prediction _ counts = source _ counts & prediction _ counts source _ and _ target _ counts = source _ counts & target _ counts true _ positives = sum ( ( source _ and _ prediction _ counts & source _ and _ target _ counts ...
[ 0.12343314290046692, -0.5006062984466553, 0.4195284843444824, -0.24354612827301025, 0.5330950021743774, -0.03271866589784622, 0.05751330032944679, -0.6109501719474792, -1.166661262512207, -0.09647271037101746, 0.8566407561302185, 0.1846076399087906, 0.10453051328659058, -0.336343914270401,...
def get _ connection ( self ) : return connection. s3connection ( settings. exams _ audit _ aws _ access _ key _ id, settings. exams _ audit _ aws _ secret _ access _ key )
[ 0.6146733164787292, -0.79692542552948, 0.4417998492717743, 0.30972275137901306, 0.1260157972574234, 0.31107768416404724, -0.010612046346068382, 0.2973044812679291, 0.9833230972290039, -0.044319260865449905, 1.3730747699737549, 0.8902287483215332, 0.4176003932952881, -0.8202481269836426, ...
def retarget ( songs, duration, music _ labels = none, out _ labels = none, out _ penalty = none, volume = none, volume _ breakpoints = none, springs = none, constraints = none, min _ beats = none, max _ beats = none, fade _ in _ len = 3. 0, fade _ out _ len = 5. 0, * * kwargs ) : # get song analysis if isinstance ( so...
[ -0.24640381336212158, 0.21073010563850403, 0.885075569152832, 0.31505483388900757, -0.033940255641937256, 0.04968447610735893, 0.21327868103981018, -0.22378937900066376, -0.6365482211112976, 1.0906953811645508, 0.5709730982780457, 1.075413703918457, -0.4015728235244751, -1.258086085319519,...
def testnonflatw0wa ( self ) : h0 = 60. 0 for om0 in numpy. arange ( start = 0. 15, stop = 0. 76, step = 0. 3 ) : for ok0 in numpy. arange ( start = - 0. 1, stop = 0. 11, step = 0. 2 ) : for w0 in numpy. arange ( start = - 1. 1, stop = - 0. 89, step = 0. 2 ) : for wa in numpy. arange ( start = - 0. 1, stop = 0. 15, ste...
[ 0.38247382640838623, -0.37309688329696655, 0.8230500817298889, -0.5675739645957947, -0.07635881006717682, 0.4650757908821106, 1.0687282085418701, -0.6040468811988831, 0.45595693588256836, -0.5678593516349792, -0.3996109664440155, -0.26155710220336914, -0.20810739696025848, 1.52092766761779...
def _ ne _ compare ( env : pgquerybuilder, prop : property, column, value ) : if prop. list is none : return column! = value main _ table = env. backend. get _ table ( prop. model ) list _ table = env. backend. get _ table ( prop. list, tabletype. list ) # check if at liest one value for field is defined subqry1 = ( sa...
[ -0.1957850605249405, -0.29757145047187805, 0.7459778785705566, 0.09929608553647995, 0.2463662326335907, 0.47388407588005066, 0.1329600214958191, -0.07563435286283493, -0.8539755940437317, 0.4002070426940918, -0.12608233094215393, -0.28046485781669617, -0.0638754740357399, 0.444179266691207...
def matrixcompletion ( n = 200, p = 100, d = 3, sigma = 0. 1, niter = 100, prob = 0. 2, lam = 0. 1 ) : # # fill code here w _ true = np. random. normal ( 0, 1, d * p ). reshape ( p, d ) z _ true = np. random. normal ( 0, 1, n * d ). reshape ( d, n ) epsilon = np. random. normal ( 0, 1, p * n ). reshape ( p, n ) x = np....
[ -0.5543251633644104, -0.09296441823244095, 1.016063928604126, -0.6425539255142212, -0.630485475063324, 0.01347366627305746, 1.0090529918670654, 0.3927905857563019, 0.6221916079521179, 0.42521587014198303, 0.068092942237854, 0.08257202804088593, 0.053629737347364426, 0.4620848298072815, -...
def corner _ to _ surfaces _ 3d _ jit ( corners ) : # box _ corners : [ n, 8, 3 ], must from corner functions in this module num _ boxes = corners. shape [ 0 ] surfaces = np. zeros ( ( num _ boxes, 6, 4, 3 ), dtype = corners. dtype ) corner _ idxes = np. array ( [ 0, 1, 2, 3, 7, 6, 5, 4, 0, 3, 7, 4, 1, 5, 6, 2, 0, 4, 5...
[ 0.2763167917728424, -0.6205341219902039, 1.049193263053894, -0.43337541818618774, 0.634027361869812, 0.1625978946685791, 0.8484922647476196, -0.9055337905883789, 0.3415459990501404, 0.4274594783782959, -0.360312819480896, -0.34987011551856995, 0.011753390543162823, -0.19323191046714783, ...
def test _ remove _ 1 ( test _ name, cloud _ provider, rke _ client, kubectl ) : rke _ template ='cluster _ install _ config _ 1. yml. j2'nodes = cloud _ provider. create _ multiple _ nodes ( 3, test _ name ) create _ and _ validate ( cloud _ provider, rke _ client, kubectl, rke _ template, nodes ) rke _ client. remove...
[ -0.0543503612279892, 1.089782953262329, 0.3867771029472351, 0.2876681685447693, 0.9381552934646606, -0.05548679083585739, 0.38276904821395874, 1.0732051134109497, -0.1300760805606842, 0.9497236609458923, -0.7287660837173462, -0.08428694307804108, -0.7372763752937317, 0.06544456630945206, ...
def extend _ to _ sentence ( self, selection ) : selection. collapse ( ) selection. extend ( ) selection. extend ( ) selection. extend ( ) return selection
[ -0.06597404181957245, -0.14830240607261658, 0.682307779788971, 0.007009848020970821, 0.2775580883026123, -0.6610721349716187, 0.20089398324489594, 0.142891064286232, 1.3270952701568604, 1.0654900074005127, -0.4772433042526245, -0.4005376696586609, -0.6163806319236755, -0.0199802964925766, ...
def get _ nodes ( self, request ) : nodes = [ ] nodes. append ( navigationnode ( _ ('objecttypes'), reverse ('objectapp _ objecttype _ list'),'objecttypes') ) for objecttype in objecttype. objects. all ( ) : nodes. append ( navigationnode ( objecttype. title, objecttype. get _ absolute _ url ( ), objecttype. pk,'object...
[ -1.406826376914978, 0.4929138123989105, 0.5669286251068115, -0.07190414518117905, 1.2888352870941162, 0.6878083348274231, -0.10465474426746368, -0.6638510227203369, 0.37753167748451233, 0.7704794406890869, -0.12702637910842896, 0.079311802983284, 0.6389180421829224, 0.16465473175048828, ...
def load _ delta _ functions ( self, delta _ functions ) : self. delta _ functions = [ ] lines = delta _ functions. splitlines ( ) for line in lines : line = line. strip ( ) if not line or line. startswith ('#') : continue # print " line : % s " % line d = deltafunc ( self ) d. init _ from _ string ( line ) # print d s...
[ 0.008903481997549534, -0.7724350690841675, 0.5518500208854675, 0.2943221628665924, 0.14385779201984406, 0.46029701828956604, 0.12537920475006104, 0.571597695350647, 0.09021054953336716, -1.1154356002807617, -1.1542292833328247, 0.1645529717206955, -0.5227064490318298, -0.15564757585525513,...
def complete _ setup ( ) : for afile in glob ( " static / data / networkdata - *. json " ) : os. remove ( afile ) homenetwork. hasync ( )
[ 0.3136327564716339, 0.08698374032974243, 0.47074607014656067, 0.19857707619667053, 0.9310904145240784, 0.22141581773757935, 0.684566080570221, -0.11798042058944702, -0.429813027381897, 0.8175333142280579, -0.7628589272499084, -0.9703976511955261, 0.6717719435691833, 0.3184003531932831, -...
def init ( self ) : # pygame. init ( ) # pygame. joystick. quit ( ) while true : pygame. init ( ) self. check _ connection = pygame. joystick. get _ count ( ) if self. check _ connection = = 1 : break else : print ( self. check _ connection ) pygame. joystick. quit ( ) time. sleep ( 1 ) pygame. joystick. init ( ) self....
[ 0.2884538471698761, -0.975916862487793, 0.8813727498054504, 0.33246687054634094, 0.7102144360542297, 0.4699954092502594, 0.3106323778629303, -0.04569802060723305, -0.5360096096992493, -0.7852830290794373, -1.020407795906067, -0.3957514762878418, -0.0350625142455101, 0.3524165749549866, 1...
def _ run ( ) : file _ system _ utils. mkdir _ recursive _ if _ necessary ( directory _ name = output _ dir _ name ) # interpolation with merger. figure _ object, axes _ object = _ plot _ interp _ two _ times ( storm _ object _ table = _ get _ data _ for _ interp _ with _ merger ( ) [ 0 ], tornado _ table = _ get _ dat...
[ -0.4770849347114563, 0.12021484225988388, 1.1179484128952026, -0.20930294692516327, 0.34392836689949036, -0.189912810921669, 1.6413848400115967, -0.18416541814804077, -0.2897149920463562, -0.2581459879875183, -0.7024696469306946, -0.17293091118335724, 0.026738425716757774, 0.56540048122406...
def move _ to ( self, angle, rpm = none, shortest _ path = true ) : angle % = 360 diff _ angle = angle - self. angle if shortest _ path and diff _ angle > 180 : diff _ angle * = - 1 self. rotate ( steps = diff _ angle / self. step _ angle, rpm = rpm )
[ -0.5761301517486572, 0.060050252825021744, 0.38756969571113586, 0.05790676176548004, 0.3658062815666199, -0.26191452145576477, 0.7265814542770386, -0.32141584157943726, -0.12334740906953812, -0.4661986827850342, -0.6655073761940002, -0.4810231626033783, -0.2647470235824585, -0.478998571634...
def _ _ hash _ _ ( self ) : return _ topods. topods _ shape _ _ _ hash _ _ ( self )
[ 0.5681512355804443, -0.12412768602371216, 0.6130245327949524, -0.6157159805297852, 0.05678148940205574, 0.9282392859458923, 0.6195688843727112, -0.687405526638031, 0.12144070118665695, -0.2510334253311157, -0.6463343501091003, -0.48370692133903503, 0.2249382734298706, -0.5041873455047607, ...
def init _ toolbar ( self, orientation ='horizontal ', size = ( 16, 16 ), separation = 5 ) : # use the wxframe internals to create the toolbar and associate it all # in one tidy method call. if orientation = ='horizontal': self. toolbar = self. createtoolbar ( wx. tb _ horizontal | wx. no _ border | wx. tb _ flat | wx....
[ -0.49184486269950867, 0.9337738752365112, 0.4634554088115692, -0.5738666653633118, -0.056460365653038025, 0.2465088665485382, 0.5878171324729919, -1.099945068359375, -0.7286626696586609, -0.5952933430671692, -1.071081280708313, -0.8269757628440857, -0.06226104497909546, 0.7439510226249695,...
def update _ received _ message ( conn : sqlite3. connection, sent _ timestamp, * * kwargs ) : fields = [ * filter ( lambda f : f in received _ message _ fields and received _ message _ fields [ f ] ['editable'], kwargs ) ] if fields : values = [ kwargs [ field ] for field in fields ] values. append ( sent _ timestamp ...
[ -0.6697717308998108, 0.002248756354674697, 0.46390771865844727, -0.5931208729743958, 0.35713309049606323, -0.5442762970924377, -0.32360175251960754, -0.45018887519836426, -0.4625810980796814, 0.6940521001815796, -0.6950762271881104, 0.19280029833316803, -0.583187997341156, -0.0982700586318...
def rescale _ boxes ( boxes, current _ dim, original _ shape ) : orig _ h, orig _ w = original _ shape # the amount of padding that was added pad _ x = max ( orig _ h - orig _ w, 0 ) * ( current _ dim / max ( original _ shape ) ) pad _ y = max ( orig _ w - orig _ h, 0 ) * ( current _ dim / max ( original _ shape ) ) # ...
[ -0.19170475006103516, -0.8915016055107117, 0.8898887038230896, -0.3594023287296295, -0.820419430732727, -0.20768532156944275, -0.21364963054656982, 0.4170261323451996, -0.9138517379760742, 0.7036858201026917, 0.3183196187019348, -0.03598842769861221, 0.17686443030834198, -0.105534076690673...
def fixed _ ip _ get _ all ( context ) : return impl. fixed _ ip _ get _ all ( context )
[ -0.8122999668121338, -0.16157054901123047, 0.2598637044429779, 1.0954928398132324, -0.04943600669503212, -0.40147942304611206, -0.31682029366493225, -0.3805980384349823, 0.011774287559092045, -0.5617343187332153, 0.20229850709438324, -0.2249276340007782, 0.24332691729068756, -0.26446488499...
def load _ embedding _ matrix ( embedding, words, embedding _ size, save _ to _ path = none ) : # model = gensim. models. keyedvectors. load _ word2vec _ format ( embedding, binary = true ) embedding _ matrix = torch. zeros ( len ( words ), embedding _ size ) for i, word in enumerate ( words ) : # if word = ='pad'or wo...
[ -0.3128402829170227, -0.09565342217683792, 0.7161458134651184, -0.37190407514572144, -0.04022042453289032, 0.7255110144615173, 0.6092022061347961, 0.15165288746356964, 0.22036485373973846, 0.750211238861084, -0.2658136785030365, 0.03567405045032501, -0.20399919152259827, 0.1259350925683975...
def displaymediaitem ( self ) - > list : try : # get all media items query _ obj = models. media. objects. all ( ) result, ret _ val = list ( ), dict ( ) # iterate through the list of media items. for media _ item in query _ obj : result. append ( {'timestamp': datetime. strftime ( media _ item. created _ at, " % d / %...
[ -0.8053993582725525, -0.9238484501838684, 0.5256273746490479, 0.3119264543056488, -0.25311800837516785, 0.21436673402786255, -0.45356833934783936, 0.021690597757697105, -0.07459762692451477, 1.086479663848877, 0.2974940538406372, -0.28980085253715515, -0.3806252181529999, 0.996690571308136...
def add _ from _ log ( self, log ) : for frame, positions in log. items ( ) : for position, units in log [ frame ]. items ( ) : x _ position = int ( position [ : len ( position ) / / 2 ] ) y _ position = int ( position [ len ( position ) / / 2 : ] ) if self. check _ in _ range ( x _ position, y _ position ) : list _ po...
[ -0.5242979526519775, -0.23985356092453003, 0.6998013854026794, 0.0371854305267334, 0.25204241275787354, -0.2595929801464081, -0.27110493183135986, -0.30130356550216675, 0.02781563624739647, 0.17516572773456573, -0.05025211349129677, -0.25336483120918274, 0.5309895873069763, 0.4353021979331...
def intersect ( f, g ) : res = f. copy ( ) res. conjunct ( g ) res. minimize ( ) return res
[ -0.0031720080878585577, 0.16852335631847382, 0.4170410931110382, 1.057367205619812, -0.8142248392105103, -0.5710120797157288, -0.30002886056900024, 0.8827863931655884, -0.8223763704299927, 0.7550780177116394, 1.1065747737884521, -0.5832262635231018, -0.2850721478462219, -1.0326123237609863...
def get _ first _ config ( config _ paths : list [ str ] ) - > optional [ pyrrigateconf ] : for path in config _ paths : conf = _ try _ parse _ pbt ( path ) if conf : return conf return none
[ 0.8130144476890564, -0.33750301599502563, 0.5283664464950562, 0.9201496243476868, 0.9793962836265564, -0.42686647176742554, -0.6130232810974121, -0.06595726311206818, -0.714556872844696, 0.22315168380737305, 0.0921720489859581, -1.168760895729065, -0.5581256747245789, 0.7352553009986877, ...
def sample _ and _ marginalize ( self, fnx, f, measure, verbose = false, adaptive = false, sort _ by _ parameter = true, sort _ by _ weight = false, neff = default _ sampling _ neff ) : # mcsampler * requires * parameter names tied to the function - - incredibly irritating. hence'x ','y'sampler = mcsampler. mcsampler (...
[ 0.23598279058933258, -0.34986940026283264, 0.7489306926727295, -0.11789166182279587, -1.330005168914795, -0.7078768610954285, -0.689205527305603, -0.20372243225574493, 0.5063380599021912, 0.2019875943660736, 0.9698612093925476, 0.4444778263568878, 0.39967238903045654, 0.8190934658050537, ...
def get _ colors ( self, * ids ) : return self. _ request ( " colors ", ids = ', '. join ( str ( id ) for id in ids ) )
[ -1.3055485486984253, 0.26673224568367004, 0.08681020140647888, 0.18641649186611176, 1.1747301816940308, -0.34598180651664734, -1.454080581665039, -1.058111548423767, 0.0009167249663732946, -0.06841105967760086, -0.4831177890300751, 0.9607329964637756, -0.9699109196662903, -0.00638508936390...
def count _ total _ trials ( self ) : total _ states = [ base. job _ state _ done, base. job _ state _ error, base. job _ state _ cancel, ] return self. count _ by _ state _ unsynced ( total _ states )
[ 0.6265634894371033, 0.46410536766052246, 0.6974690556526184, -0.3874976336956024, 0.826873779296875, -0.5155990123748779, 0.5330538749694824, 0.274888277053833, -0.25732162594795227, 0.2640490233898163, -0.5403231382369995, -0.48402220010757446, 0.7298744916915894, 0.20211176574230194, -...
def process _ traffic _ lights ( self ) : if ( self. pose is not none ) and ( self. has _ image ) and ( self. base _ waypoints is not none ) : tl _ idx = self. get _ closest _ wp _ idx ( self. pose. pose, self. lights ) if tl _ idx > = 0 : # convert stop _ line to pseudo pose object for easier handling stop _ line = se...
[ -0.7822384834289551, -0.568545937538147, 0.658291220664978, -0.5321428775787354, -0.09718823432922363, -0.38219401240348816, 0.10225950926542282, -0.07028472423553467, -0.6294412612915039, -0.17320555448532104, -0.8584655523300171, -0.5649962425231934, 0.48465976119041443, -0.1007639691233...
def write _ json ( msdf : mappingsetdataframe, output : textio, serialisation = " json " ) - > none : if serialisation = = " json " : data = to _ json ( msdf ) json. dump ( data, output, indent = 2 ) else : raise valueerror ( f " unknown json format : { serialisation }, currently only json supported " )
[ -1.1235988140106201, -0.6334757804870605, 0.2564190924167633, -0.2733345031738281, -0.6001661419868469, -0.7649711966514587, 0.4235331416130066, -0.13142137229442596, 0.13794668018817902, -0.36485978960990906, 0.38087794184684753, 0.36826929450035095, 0.40361031889915466, 0.263039261102676...
def set _ transform ( self, transform : optional [ callable ], columns : optional [ list ] = none, output _ all _ columns : bool = false, ) : self. set _ format ( " custom ", columns = columns, output _ all _ columns = output _ all _ columns, transform = transform )
[ -0.2638683021068573, 0.145829439163208, 0.347360759973526, 0.06657756865024567, 0.03803824633359909, -1.2625031471252441, -0.3573946952819824, 0.1637309342622757, 0.059048671275377274, -0.7616056799888611, -1.086240291595459, 0.6680124998092651, 0.8184464573860168, 0.40199267864227295, -...
def values ( self ) - > future [ typing. list [ valuetype ] ] : def handler ( message ) : data _ list = multi _ map _ values _ codec. decode _ response ( message ) return deserialize _ list _ in _ place ( data _ list, self. _ to _ object ) request = multi _ map _ values _ codec. encode _ request ( self. name ) return s...
[ -1.0222018957138062, 0.42855241894721985, 0.6772249937057495, 0.5789188146591187, 0.4566754400730133, -0.7170743346214294, -1.0950669050216675, 0.11540788412094116, 0.3420238792896271, -0.7931207418441772, -1.3124161958694458, 0.2949080169200897, 0.6428211331367493, 0.9063752889633179, -...
def network ( correlations, output, threshold, table ) : sparcc _ z = pd. read _ csv ( correlations, sep ='\ t ', index _ col = 0 ) with open ( output + '. edges ','w') as fp : _ format _ edges ( fp, sparcc _ z, threshold ) with open ( output + '. nodes ','w') as fp : _ format _ nodes ( fp, table )
[ -0.060393162071704865, -0.3142636716365814, 0.3679826557636261, -0.175013467669487, 0.3421632945537567, -0.15804129838943481, 0.8934274911880493, 0.3597809672355652, -0.09828783571720123, -0.15921813249588013, 0.641239583492279, 0.3758566081523895, 0.5588250756263733, -0.8295155763626099, ...
def caller _ name ( skip = 2 ) : def stack _ ( frame ) : framelist = [ ] while frame : framelist. append ( frame ) frame = frame. f _ back return framelist stack = stack _ ( sys. _ getframe ( 1 ) ) start = 0 + skip if len ( stack ) < start + 1 : return'' parentframe = stack [ start ] module = getmodule ( parentframe ) ...
[ -0.8171162009239197, 0.36841848492622375, 1.2167088985443115, 0.5458481311798096, -0.7192885279655457, -0.3436990976333618, 0.8077347874641418, -0.9937818050384521, -0.011845321394503117, 0.5817907452583313, -0.29875001311302185, -0.005956819746643305, -0.09100238233804703, 0.4416874945163...
def enable _ backups ( self ) : self. _ client. post ( " { } / backups / enable ". format ( instance. api _ endpoint ), model = self ) self. invalidate ( ) return true
[ -0.525459349155426, 0.49220001697540283, 0.6231906414031982, 0.7637519836425781, 1.0822138786315918, 0.8823477625846863, -0.019660191610455513, -0.01550226379185915, 0.22274817526340485, -0.5610175728797913, -1.6653223037719727, 0.03942393511533737, -0.8948251605033875, -0.4298712313175201...
def get ( self, key, default = _ unset ) : if not self. cf. has _ option ( self. main _ section, key ) : if default is _ unset : raise nooptionerror ( key, self. main _ section ) return default return str ( self. cf. get ( self. main _ section, key ) )
[ 0.06235896423459053, 0.41643771529197693, 0.5624807476997375, 0.061720263212919235, 0.2233920842409134, -0.2689696252346039, -0.4285968542098999, -0.8636789917945862, -0.6830525398254395, 0.7638885974884033, 1.1588459014892578, -0.19828853011131287, -0.5691302418708801, 0.14129400253295898...
def test _ source _ zenith ( time _ location, zenith _ skymodel ) : time, array _ location = time _ location zenith _ skymodel. update _ positions ( time, array _ location ) zenith _ source _ lmn = zenith _ skymodel. pos _ lmn. squeeze ( ) assert np. allclose ( zenith _ source _ lmn, np. array ( [ 0, 0, 1 ] ) )
[ -0.8990504741668701, -0.3723689317703247, 0.22216902673244476, -0.3229040503501892, 0.4988976716995239, 0.7622278332710266, 0.06430076062679291, 0.2737785875797272, 1.1872279644012451, -0.11876185238361359, -1.372786045074463, -0.3133239448070526, 0.027616580948233604, 0.48143622279167175,...
def hit ( self ) : if self. health is not none : self. health - = 1 if self. health < = 0 : self. scorchandremove ( )
[ 0.4518944025039673, 0.323700487613678, 0.7014061808586121, 0.6122062802314758, 0.8634078502655029, 0.49761858582496643, 0.42629578709602356, 0.6748148798942566, -0.4315219819545746, 0.1867380440235138, 0.5194552540779114, -0.025491775944828987, -0.7630926966667175, -0.571753740310669, 0....
def test _ init _ inventory ( self ) : inventory = inventory ( " 3 ", " rope ", " 50 ", " 1 " ) self. asserttrue ( inventory ) self. assertequal ( inventory. product _ code, " 3 " ) self. assertequal ( inventory. description, " rope " ) self. assertequal ( inventory. market _ price, " 50 " ) self. assertequal ( invento...
[ -0.6069157719612122, -0.9468212127685547, 0.32369574904441833, 0.2892768681049347, 0.7758399248123169, 0.9763689637184143, -0.013326882384717464, -0.018037229776382446, -0.41235265135765076, -0.2856226861476898, -0.7653524279594421, -0.13258548080921173, -0.19442692399024963, -0.5438845157...
def box _ overlaps ( box1, box2 ) : return ( interval _ overlaps ( box1 [ 0 ], box2 [ 0 ] ) and interval _ overlaps ( box1 [ 1 ], box2 [ 1 ] ) )
[ -1.1052440404891968, 0.24762748181819916, 0.9520252346992493, 0.8103042244911194, -0.687414288520813, 0.5893256068229675, -1.283432960510254, -0.5274314880371094, -0.7597371935844421, 0.5571220517158508, -0.7619277238845825, 0.12668481469154358, -0.1868540495634079, -0.30341392755508423, ...
def test _ create _ account ( self ) : url = reverse ('asset : asset') data = self. data response = self. client. post ( url, data, format ='json') self. assertequal ( response. status _ code, status. http _ 201 _ created ) self. assertequal ( asset. objects. count ( ), 1 ) self. assertequal ( asset. objects. get ( ). ...
[ 0.1847764104604721, 0.3650732636451721, 0.28011900186538696, -0.12337175756692886, 1.0170211791992188, 1.2211922407150269, 0.5028724670410156, -0.45542290806770325, -0.23390930891036987, -0.4687458574771881, -0.3468902111053467, 0.09215397387742996, 0.22496744990348816, -0.1634652614593505...
def _ _ testdataselectors ( self, container, dataselectors ) : if not dataselectors : return true try : logger. debug ( " on container % s applying selectors : % r ", container. getname ( ), dataselectors ) for cs in dataselectors : csdl = self. _ _ sd. getdataselectors ( cs ) for csd in csdl : tn = csd [ " category _ ...
[ -1.121415138244629, -0.05292670056223869, 0.5056986808776855, -0.7946656346321106, 0.49909335374832153, 0.11907099932432175, -0.24587365984916687, -0.07007137686014175, 0.3165190815925598, -0.8372461795806885, -0.023197535425424576, -0.6672388911247253, 0.21711894869804382, 0.4983917772769...
def get _ all ( self ) : # se definie el query de la consulta. sql _ string = " " " select id, id _ tipo _ dispositivo, codigo, descripcion, fecha from muestras " " " # se construye el diccionario que contiene los parametros del query. cursor = self. db. query ( sql _ string ) return self. db. to _ dict ( cursor )
[ -0.31566232442855835, -0.22811034321784973, 0.29274415969848633, -0.0910981148481369, -0.49796873331069946, -0.7037819623947144, -1.5162104368209839, -0.40879255533218384, -0.1285862773656845, -0.2887231409549713, 0.2440001517534256, 0.3733789920806885, -0.21262474358081818, 1.023390293121...
def open _ in _ editor ( self, cli ) : if self. read _ only ( ) : raise editreadonlybuffer ( ) # write to temporary file descriptor, filename = tempfile. mkstemp ( self. tempfile _ suffix ) os. write ( descriptor, self. text. encode ('utf - 8') ) os. close ( descriptor ) # open in editor # ( we need to use ` cli. run _...
[ -0.24697862565517426, -0.08181983977556229, 0.5580950379371643, -0.19958177208900452, -0.4104561507701874, 0.29918232560157776, 0.5714662671089172, 0.4787151515483856, -0.4012402892112732, -0.011876465752720833, 0.3186357915401459, 0.3302765488624573, -0.06547173112630844, 0.45869272947311...