text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def reset _ loads _ to _ nominal ( self ) : path = r " c : \ users \ olive \ pycharmprojects \ power _ factory \ nominal _ loads " # read nominal active loads from directory active _ reader = csv. reader ( open ( path + r'\ active _ nominal. csv ','r') ) active _ loads = { } for k, v in active _ reader : active _ loads... | [
0.3783615827560425,
-1.3026682138442993,
0.453746497631073,
-0.7697924971580505,
-0.06492055207490921,
0.7256584167480469,
-0.7674604058265686,
-1.1839137077331543,
-0.9764280319213867,
0.4724573791027069,
0.2577057480812073,
0.7079364061355591,
0.2927561402320862,
0.010261277668178082,
... |
def getsourcefiles ( source _ dir ) : def issourcedir ( d ) : return d! = '. git'source _ files = [ ] for root, dirs, files in os. walk ( source _ dir ) : dirs = filter ( issourcedir, dirs ) files = filter ( issourcefile, files ) # strip leading source _ dir from root. root = root [ len ( source _ dir ) : ] source _ fi... | [
0.2885739207267761,
0.66288822889328,
0.4009857773780823,
0.4339871406555176,
-0.17275658249855042,
-0.21126919984817505,
0.5406763553619385,
0.37739700078964233,
1.2466477155685425,
0.6437718868255615,
-0.6919583082199097,
0.37466368079185486,
-0.5095220804214478,
0.8067294359207153,
-0... |
def test _ proper _ parenthetics ( test _ str, result ) : from proper _ parenthetics import proper _ parenthetics assert proper _ parenthetics ( test _ str ) = = result | [
0.0580279566347599,
-0.7328962683677673,
0.18173734843730927,
0.1860075443983078,
-0.6781074404716492,
0.8907408118247986,
0.07962863147258759,
-0.19801340997219086,
-0.23675289750099182,
-0.2300289273262024,
-0.03584492579102516,
-0.4534130096435547,
-1.0487643480300903,
-0.57361119985580... |
def create _ simple _ temp _ table ( cursor, temp _ table, source _ table, source _ column, new _ column, grade, source _ schema ='clean') : sql _ tmp _ table = " " " drop table if exists { tmp } ; create temporary table { tmp } as select student _ lookup, max ( { sc } ) as { nc } from { ss }. { st } where grade = { gr... | [
0.16843192279338837,
-0.030145933851599693,
0.5065093636512756,
-0.08053117245435715,
-0.4809781312942505,
0.10446662455797195,
0.39026957750320435,
0.24602802097797394,
-0.1940600872039795,
0.6997237205505371,
-0.7062059640884399,
-0.20002272725105286,
0.09682366251945496,
0.2481787353754... |
def print _ welcome ( self ) : print ( " \ n \ nyou are playing tic - tac - toe " ) for idx, player in enumerate ( self. players ) : print ( f " player { idx + 1 } : { player. _ _ class _ _. _ _ name _ _ }, value of negamax : { self. values _ for _ negamax [ idx ] }, char : { self. available _ chars [ idx + 1 ] } " ) | [
-0.13976207375526428,
-0.4257930517196655,
0.5935572981834412,
-0.45329076051712036,
0.49137449264526367,
0.2690047025680542,
-0.5956806540489197,
-0.48247265815734863,
-0.751088559627533,
0.9815571308135986,
-0.1318858563899994,
1.2031131982803345,
-0.026917466893792152,
0.135373473167419... |
def polar _ cartesian _ box ( cls, vertices ) : if len ( vertices ) > 2 : global _ x _ box = [ np. infinity, - np. infinity ] global _ y _ box = [ np. infinity, - np. infinity ] # decompose into edges and join back up. for start, end in zip ( vertices [ : - 1 ], vertices [ 1 : ] ) : x _ box, y _ box = cls. polar _ cart... | [
-1.0192172527313232,
-0.7104343175888062,
0.9304642081260681,
0.07856293767690659,
0.12702926993370056,
0.005671668332070112,
-0.11778361350297928,
-0.5169845819473267,
-0.30125653743743896,
-0.1764182597398758,
-0.8222808241844177,
0.3714933693408966,
-0.5369642376899719,
-0.4137364625930... |
def _ train _ or _ eval ( self, model _ properties, num _ steps, is _ training ) : if self. _ ncf _ dataset is not none : epoch _ metadata, record _ dir, template = data _ preprocessing. get _ epoch _ info ( is _ training = is _ training, ncf _ dataset = self. _ ncf _ dataset ) batch _ count = epoch _ metadata [ " batc... | [
-0.2953886389732361,
0.6279656291007996,
0.6104373335838318,
-0.2826595604419708,
0.1949845403432846,
-0.6045824885368347,
0.5894953608512878,
0.22772878408432007,
-0.4293155074119568,
0.4189226031303406,
0.7366282939910889,
-0.18307508528232574,
0.5287968516349792,
0.2830604016780853,
-... |
def thumbed _ delete _ handler ( sender, instance, * * kwargs ) : entity _ object = getattr ( instance,'content _ object ', none ) thumbing = instance. thumbing if ( entity _ object and hasattr ( entity _ object,'thumbsup _ count') and hasattr ( entity _ object,'thumbsdown _ count') ) : # re - sum count if thumbing is ... | [
0.061227668076753616,
-0.3282705545425415,
0.8359869718551636,
0.1349809169769287,
0.6804877519607544,
0.5006956458091736,
1.6321667432785034,
0.7302966713905334,
0.3048151731491089,
0.6264219880104065,
-0.28959232568740845,
-0.7466976642608643,
0.8447867631912231,
0.7874858975410461,
0.... |
def errors _ handler ( self, exception = none, func = none ) : def decorator ( callback ) : self. register _ errors _ handler ( callback, exception = exception, func = func ) return callback return decorator | [
-0.46291494369506836,
0.2856598198413849,
0.4770040810108185,
0.10662443935871124,
-0.20984314382076263,
-0.2225983738899231,
-0.4079723060131073,
1.1838949918746948,
0.9100109934806824,
-0.20726583898067474,
0.25499409437179565,
0.5449331998825073,
0.4171830713748932,
-0.02303262241184711... |
def readcsv ( self, route ) : i = 0 data = { } with open ( route ) as csvfile : lines = csv. dictreader ( csvfile ) for line in lines : data [ i ] = line i = i + 1 return data | [
-1.2626433372497559,
-0.26177939772605896,
0.4036724269390106,
-0.6414582133293152,
-0.475848913192749,
0.07147456705570221,
-0.5403253436088562,
0.6215153336524963,
-0.5958559513092041,
-0.10092271864414215,
-0.1319490373134613,
-0.4157748520374298,
0.23124496638774872,
-0.426333576440811... |
def addg ( self, g ) : self. gs. append ( g ) | [
-0.41346389055252075,
0.9222503304481506,
0.26877161860466003,
0.25009405612945557,
0.2451702207326889,
1.7962265014648438,
-0.6107641458511353,
-0.5149834156036377,
-0.256663054227829,
-0.47964444756507874,
-0.31825459003448486,
0.830463171005249,
-0.7356616258621216,
1.389951229095459,
... |
def _ here ( * args ) : here _ dir = os. path. dirname ( os. path. realpath ( _ _ file _ _ ) ) return os. path. abspath ( join ( here _ dir, * args ) ) | [
-0.3236464858055115,
-0.9844131469726562,
0.8747808933258057,
0.005572154652327299,
0.34572866559028625,
0.5830793380737305,
0.7002061009407043,
-0.5097745060920715,
-1.5989296436309814,
0.35929790139198303,
1.0763499736785889,
-0.13556838035583496,
-0.08908078074455261,
-0.175887301564216... |
def run _ min _ cut ( memo _ adj _ list, n _ iterations = 1 ) : # set the minimum cut to be the maximum number of cuts calculated for this # size of adjacency list memo _ min _ cut = 2 * * len ( memo _ adj _ list ) # iterate the min _ cut algorithm for i in xrange ( n _ iterations ) : # create a new list object adj _ l... | [
-0.2142590433359146,
-0.1326938271522522,
0.6604263186454773,
0.44538888335227966,
-0.382021427154541,
-0.3706134259700775,
0.44724223017692566,
-0.6873155832290649,
0.8848475813865662,
1.0318148136138916,
0.1782495379447937,
0.632135808467865,
-0.9257988929748535,
0.4297068119049072,
0.... |
def calculate _ system _ inertia ( self, study _ case _ name ) : # if i. i _ mot = = 0 : h _ i = [ ] s _ bi = [ ] s _ b _ wind = [ ] generators = self. app. getcalcrelevantobjects ('*. typsym') wind _ generators = self. app. getcalcrelevantobjects ('*. elmgenstat') for gen in generators : if " sc " not in gen. loc _ na... | [
-0.2259056270122528,
-0.47932231426239014,
0.684115469455719,
0.5694335103034973,
-0.06571222096681595,
0.29480212926864624,
1.0244319438934326,
0.06716182082891464,
-0.46100133657455444,
0.1370640993118286,
0.05976036936044693,
-0.4945324957370758,
-0.9503428339958191,
0.766247570514679,
... |
def copy ( self, src, dst ) : pass | [
-0.8955714702606201,
-0.5222374200820923,
0.2743273377418518,
0.455465167760849,
-0.8477218151092529,
1.3830132484436035,
-0.6206652522087097,
-0.18056385219097137,
-0.7240291237831116,
0.3689956068992615,
0.04192757233977318,
1.0885440111160278,
0.7628191709518433,
-0.28588709235191345,
... |
def get _ address ( self ) : cmd = { " method " : " getaddress " } r = utils. curl ( cmd ) self. address = r [ " address " ] | [
-0.8106095194816589,
-0.5961294770240784,
0.5949558019638062,
0.6176689267158508,
0.691128134727478,
-0.04086694121360779,
-0.43503037095069885,
0.4061252772808075,
0.4377148151397705,
-0.4065254032611847,
-0.02137531153857708,
1.5340434312820435,
-0.5900673866271973,
-0.5299822092056274,
... |
def regex _ type _ 2 ( line, mots ) : original _ line = deepcopy ( line ) temp _ list _ solutions = [ ] for idx, mot in enumerate ( mots ) : temp _ list _ solutions. append ( regex _ type _ 1 ( line = line, mot = mot ) ) # eliminer le premier match de la phrase comme ca on peut aller chercher le 2eme line = line. repla... | [
0.6561195254325867,
-0.4235747754573822,
0.7269366383552551,
0.8114550709724426,
0.9323049783706665,
-0.6511890292167664,
-0.46655386686325073,
0.37756893038749695,
-0.5957577228546143,
0.606911838054657,
-0.39015766978263855,
0.4475213289260864,
-0.7400906085968018,
0.054559268057346344,
... |
def train _ model ( arguments, dump _ directory ) : data _ directory = arguments. data _ directory num _ features = arguments. num _ features split _ ratio = arguments. split _ ratio train _ features, train _ labels, test _ features, test _ labels = \ get _ train _ and _ test _ data ( data _ directory, num _ features, ... | [
-0.9708378911018372,
0.5925785303115845,
0.8532733917236328,
-0.15008461475372314,
0.9207803606987,
0.04134573042392731,
0.6692601442337036,
0.5343213677406311,
-0.28273627161979675,
0.33500567078590393,
-0.16660352051258087,
-0.007554374635219574,
0.25587132573127747,
0.4757155478000641,
... |
def print _ cities ( road _ map ) : road _ map _ lists = [ ] for row in road _ map : list _ row = list ( row ) list _ row [ 2 ] = str ( list _ row [ 2 ] ) list _ row [ 3 ] = str ( list _ row [ 3 ] ) road _ map _ lists. append ( list _ row ) for i in range ( len ( road _ map _ lists ) ) : road _ map _ lists [ i ] = ", "... | [
-0.4261813163757324,
-0.4640307128429413,
0.6750920414924622,
-0.45027726888656616,
0.05226379260420799,
0.36219537258148193,
-0.8457067012786865,
0.10977376252412796,
0.19208572804927826,
0.4378316402435303,
0.11500836908817291,
-0.013806444592773914,
-0.9420478940010071,
0.69600963592529... |
def get _ embedded _ object ( self ) : if hasattr ( self,'embedded _ object') : return self. embedded _ object ( ) else : klass = self. get _ form _ class ( ) return klass. meta. document ( ) | [
0.6652389764785767,
-0.3782740831375122,
0.9274516105651855,
0.5047742128372192,
-0.404989629983902,
1.0405499935150146,
0.356707900762558,
-0.5763965845108032,
0.5959641933441162,
-0.8634036779403687,
0.4559788703918457,
0.15449325740337372,
0.055918287485837936,
0.07926356792449951,
-0... |
def save _ checkpoint ( self, val _ loss, model ) : if self. verbose : print ( f'validation loss decreased ( { self. val _ loss _ min :. 6f } - - > { val _ loss :. 6f } ). saving model...') torch. save ( model. state _ dict ( ), self. save _ folder +'/ checkpoint. pt') self. val _ loss _ min = val _ loss | [
0.06598541140556335,
-0.7737773656845093,
0.2710566222667694,
0.8472905158996582,
0.251773864030838,
0.8300154805183411,
-0.32969582080841064,
0.04347830265760422,
-0.5105266571044922,
-0.2434254288673401,
-0.779779851436615,
-0.34515658020973206,
0.16926786303520203,
-0.07638999819755554,... |
def set _ tournament _ id ( t _ id = 0 ) : new _ tournament ( t _ id ) global tournament _ id tournament _ id = t _ id return t _ id | [
-0.3188275992870331,
-0.4274643659591675,
0.5285142660140991,
-0.7574806809425354,
0.767859160900116,
0.2776223421096802,
-0.08135247230529785,
0.8997974991798401,
0.02253134921193123,
0.5416263937950134,
-0.8347196578979492,
0.5794287919998169,
-0.0067670345306396484,
0.2253812849521637,
... |
def start _ all ( wiimotes, configfile ) : i = 1 started = [ ] for new _ wiimote in wiimotes : w = start ( new _ wiimote, i, configfile ) if w is not none : i + = 1 started. append ( w ) return started | [
-0.8470109105110168,
-0.5178565979003906,
0.26347216963768005,
0.7257066965103149,
0.6464664340019226,
0.018735215067863464,
0.19589698314666748,
0.48304715752601624,
-0.047382235527038574,
0.6446418166160583,
-0.8764926791191101,
-0.1874852180480957,
-0.8521366715431213,
1.084808945655822... |
def cscs _ fit ( y, l, maxitr = 100, tol = 1e - 4, warmstart = false, debug = false ) : n, p = y. shape l = np. identity ( p ) s = np. matmul ( y. t, y ) / n l [ 0, 0 ] = 1 / np. sqrt ( s [ 0, 0 ] ) for i in range ( 1, p ) : if ( debug ) : print ('variable : { } '. format ( i + 1 ) ) l [ i, 0 : ( i + 1 ) ] = _ hk ( i, ... | [
0.2109135240316391,
0.2787459194660187,
0.4660476744174957,
0.4561467170715332,
-0.4830479025840759,
-0.1913980394601822,
-0.10471539944410324,
-0.04315271973609924,
0.04895045980811119,
0.1163654550909996,
-0.3092316687107086,
-0.25148338079452515,
-0.16072961688041687,
0.2452323138713836... |
def cidr _ block ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " cidr _ block " ) | [
0.9625480771064758,
0.7049767374992371,
0.5016529560089111,
0.6080074310302734,
0.807632565498352,
1.488462209701538,
0.14203034341335297,
-0.08752342313528061,
0.42568281292915344,
-0.1699112206697464,
-0.0793202742934227,
0.3238859474658966,
-0.7156955003738403,
-1.5762217044830322,
0.... |
def _ format _ json _ str ( data : str ) - > str : return json. dumps ( data, sort _ keys = true, indent = 2, separators = ( ', ',':') ) | [
0.11715221405029297,
-1.544201374053955,
0.4401452839374542,
-1.2452092170715332,
-1.3095412254333496,
-0.03499853238463402,
-0.4963381290435791,
-1.282932162284851,
-0.17175264656543732,
0.23994167149066925,
1.0528723001480103,
0.6464699506759644,
0.4222969114780426,
-0.05429600924253464,... |
def parse _ args ( ) : parser = argparse. argumentparser ( description ='test a fast r - cnn network') parser. add _ argument ('- - dataset ', help ='training dataset') parser. add _ argument ('- - cfg ', dest ='cfg _ file ', required = true, help ='optional config file') parser. add _ argument ('- - load _ ckpt ', hel... | [
0.8860576748847961,
-0.03174017369747162,
0.8565117120742798,
0.10467541217803955,
0.7154049277305603,
-0.28224611282348633,
0.6741731762886047,
0.48595544695854187,
-0.5325142741203308,
0.24608086049556732,
-0.5138797760009766,
-0.529251217842102,
-0.36161354184150696,
0.6415451765060425,... |
def create _ absence _ wkd _ type _ temp _ table ( cursor, temp _ table, source _ table, new _ column, type _ str, grade, wkd, source _ schema ='clean') : sql _ create _ agg _ temp = " " " drop table if exists { tmp } ; create temporary table { tmp } as select student _ lookup, count ( * ) as { nc } from { ss }. { st }... | [
-0.07913605123758316,
-0.22973129153251648,
0.602001428604126,
-0.8310448527336121,
-0.5263668894767761,
0.5199509263038635,
0.8291440010070801,
0.12148667871952057,
-0.33701667189598083,
0.8813573122024536,
0.5355246663093567,
0.5198240280151367,
-0.026834018528461456,
0.7683960199356079,... |
def compute _ ascs ( data, params, supply, starting _ values, convergence _ criterion = 1e - 6 ) : # utilities without the ascs if isinstance ( params, pd. series ) : baseutilities = ( data [ params. index ]. multiply ( params, axis = " columns " ). sum ( axis = " columns " ) ) else : # assume numpy array baseutilities... | [
-0.09538402408361435,
-0.26909831166267395,
0.7063170075416565,
-0.37301406264305115,
-0.35761746764183044,
-0.4073300361633301,
0.34303173422813416,
0.13841664791107178,
0.14256250858306885,
0.7994076013565063,
0.8668991327285767,
0.518969714641571,
0.8219553828239441,
0.18381211161613464... |
def _ get _ results ( self, results : list [ any ] ) - > any : if self. result = = simplugresult. all : return results results = [ result for result in results if result is not none ] if self. result = = simplugresult. first : return results [ 0 ] if results else none if self. result = = simplugresult. last : return re... | [
-0.5386880040168762,
-0.29836714267730713,
0.643714964389801,
0.8753503561019897,
0.9504138231277466,
-1.5832735300064087,
-0.05867258459329605,
-0.03398013487458229,
0.9323965907096863,
-0.34823593497276306,
-0.803153395652771,
-0.5669075846672058,
-0.7969261407852173,
0.2186402529478073,... |
def mainsyntacticanalyser ( pentadlist = [ ], debugmode = false ) : if ( debugmode ) : print ( ) if ( debugmode ) : print ( " — — — — — — — — — — — — — — — — — — — — — — — — — — — syntactic analysis — — — — — — — — — — — — — — — — — — — — — — — — — — " ) if ( debugmode ) : print ( ) if ( debugmode ) : print ( " main pr... | [
0.21341027319431305,
-0.7128900289535522,
1.0980217456817627,
0.637757420539856,
-0.5020045042037964,
0.18272806704044342,
0.25772830843925476,
-0.48950523138046265,
-0.19690395891666412,
0.014593654312193394,
-0.10366807878017426,
0.09251460433006287,
-0.6913038492202759,
1.45460236072540... |
def get _ posting ( self, posting _ id ) : response = self. session. get ( self. _ endpoint ( f'/ v0 / postings / { self. site _ name } /'+ posting _ id ) ). json ( ) if'ok'in response. keys ( ) and response ['ok'] is false : raise levererror ( response ['error'] ) return posting ( * * response ) | [
-0.1447596698999405,
0.20136980712413788,
0.2919083535671234,
0.20627334713935852,
0.41677695512771606,
-0.40363678336143494,
-1.135911464691162,
-0.4005466103553772,
0.430484801530838,
0.3804764449596405,
0.2932582199573517,
0.8191117644309998,
-0.7387169599533081,
-0.2880810797214508,
... |
def set _ media _ properties ( self, media _ id, query : dict = none ) : return self. bynder _ request _ handler. post ( endpoint ='/ api / v4 / media / { 0 } / '. format ( media _ id ), payload = query or { } ) | [
-1.096138834953308,
-0.41391482949256897,
0.19540660083293915,
-0.09989771246910095,
0.32230672240257263,
-0.562507152557373,
-0.4861770570278168,
-0.4117804169654846,
0.467986524105072,
0.09354644268751144,
0.04439267888665199,
1.3157446384429932,
-1.0247560739517212,
0.8688747882843018,
... |
def large _ logfile ( ) : with tempfile. namedtemporaryfile ( " w ", delete = false ) as logfile : # write 1 million lines of'blah'followed by one line'match me! '. logfile. writelines ( " blah \ n " for _ in range ( int ( 1e6 ) ) ) logfile. write ( " match me! \ n " ) logfile. flush ( ) filepath = logfile. name yield ... | [
1.0015912055969238,
0.17772763967514038,
0.7386401891708374,
-0.3241259455680847,
-0.1823442280292511,
0.020670898258686066,
0.15445692837238312,
0.1977997124195099,
-0.09470049291849136,
0.11843675374984741,
-0.48067307472229004,
-0.7723149657249451,
0.08507496118545532,
-0.06827393174171... |
async def play _ downloaded ( self, ctx, *, query ) : source = discord. pcmvolumetransformer ( discord. ffmpegpcmaudio ( query ) ) ctx. voice _ client. play ( source, after = lambda e : print ( f'player error : { e }') if e else none ) await send ( ctx, f'now playing : { query }') | [
0.08495470136404037,
-0.2420259267091751,
0.5308842658996582,
0.03610772639513016,
0.18249957263469696,
0.2358684539794922,
-0.7900134921073914,
-0.38665851950645447,
0.6269654035568237,
-0.5307736992835999,
0.39238476753234863,
0.7536198496818542,
-0.7395226955413818,
-0.04952746629714966... |
def fit _ transform ( self, x, y = none, * * fit _ params ) : xt = check _ array ( x, ensure _ 2d = false ) validate _ params ( self. get _ params ( ), self. _ hyperparameters ) # reshape filter function values derived from functiontransformer if xt. ndim = = 1 : xt = xt [ :, none ] if self. kind = ='uniform': xt = sel... | [
-0.4987332224845886,
-0.2941780388355255,
0.7116498351097107,
1.0954148769378662,
-0.4045553207397461,
-0.24607039988040924,
0.24285830557346344,
-0.7474055290222168,
0.09073643386363983,
-0.4073447287082672,
-0.5807973742485046,
0.1748649626970291,
0.2695789635181427,
0.38854044675827026,... |
def unset _ schema _ template ( self, template _ name, prefix _ path ) : request = tsunsetschematemplatereq ( self. _ _ session _ id, prefix _ path, template _ name ) status = self. _ _ client. unsetschematemplate ( request ) logger. debug ( " set schema template to path { } template name : { }, path : { } ". format ( ... | [
-1.063965082168579,
-0.3117406368255615,
0.5681987404823303,
-0.6296456456184387,
-0.9461134672164917,
-0.36445778608322144,
0.09824880212545395,
0.8520443439483643,
-0.15299053490161896,
0.8945965766906738,
-0.6582431793212891,
0.5520285367965698,
-0.8693551421165466,
-1.1840993165969849,... |
def _ set _ port _ area ( self, v, load = false ) : if hasattr ( v, " _ utype " ) : v = v. _ utype ( v ) try : t = yangdynclass ( v, base = restrictedclasstype ( base _ type = long, restriction _ dict = {'range': ['0.. 4294967295'] }, int _ size = 32 ), is _ leaf = true, yang _ name = " port - area ", rest _ name = " p... | [
-0.34879863262176514,
0.5040518641471863,
0.6540961265563965,
-0.5250682234764099,
-0.33122768998146057,
0.17844900488853455,
1.0899276733398438,
-0.505884051322937,
0.5302558541297913,
0.205725759267807,
0.03255961835384369,
-0.4678490459918976,
-0.9359352588653564,
1.1867650747299194,
... |
def testhastaginstancenotexists ( self ) : tagapi ( self. user ). create ( [ ( u'username / bar ', u'description') ] ) objectid = uuid4 ( ) self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transact ) as session : results = yield self. facade. hastaginstance ( session, u'username / bar ', str ( object... | [
-0.6633914709091187,
0.7628408670425415,
0.3438001275062561,
-0.21129220724105835,
0.8253600001335144,
1.1523292064666748,
0.10782092809677124,
-0.39201971888542175,
-0.6697026491165161,
-0.7386380434036255,
-0.9324029684066772,
-0.7183005213737488,
-0.3763028681278229,
0.8997949361801147,... |
def _ translate _ _ interfaces _ state _ interface _ ipv6 _ neighbor ( input _ yang _ obj, translated _ yang _ obj = none ) : if input _ yang _ obj. link _ layer _ address. _ changed ( ) : input _ yang _ obj. link _ layer _ address = input _ yang _ obj. link _ layer _ address if input _ yang _ obj. origin. _ changed ( ... | [
-0.5659466981887817,
-0.6443517804145813,
0.48637810349464417,
-0.3451945185661316,
-0.6347030401229858,
0.35226500034332275,
1.0625791549682617,
-0.6633393168449402,
0.6936659216880798,
0.18829570710659027,
-0.5511137247085571,
0.1248631700873375,
-0.31045231223106384,
-0.1734677106142044... |
def test _ stat _ freebsd12 ( self ) : self. assertequal ( jc. parsers. stat. parse ( self. freebsd12 _ stat, quiet = true ), self. freebsd12 _ stat _ json ) | [
1.022038459777832,
-0.17609603703022003,
0.2022925317287445,
-0.7345595359802246,
-0.6376644968986511,
0.6040554642677307,
-0.6800245642662048,
-1.254425287246704,
0.1275315135717392,
-0.9626549482345581,
-0.124344602227211,
0.06499630212783813,
0.2762235105037689,
0.6357464790344238,
0.... |
def test _ update _ skill ( self ) : skill = skill. objects. create ( date = [ 2, 2022 ], name = { " en " : " test skill ", " fr " : " skill de test " }, description = { " en " : [ " test desc " ], " fr " : [ " desc test " ] } ) payload = { " date " : [ 3, 2022 ] } detail _ url = reverse ('rest : skill - detail ', kwar... | [
0.3062298595905304,
0.08303805440664291,
0.5186952948570251,
-0.18956756591796875,
0.3472145199775696,
1.137492060661316,
-0.21172209084033966,
-0.5118165612220764,
0.18266361951828003,
-0.14487065374851227,
-0.9203939437866211,
0.8526026010513306,
0.5843648314476013,
-0.05508103221654892,... |
def _ parse _ vcf _ cyvcf ( self, thread _ id ) : df _ list = [ ] # global is to track which variants are to be processed # by current thread id across all regions global _ variant _ idx = 0 # go through all regions assigned to reader for region in self. _ regions : # go through variants and add to list vcf = cyvcf2. v... | [
0.17202067375183105,
-1.0995419025421143,
0.5145247578620911,
-0.08450188487768173,
0.35769790410995483,
-0.7020690441131592,
0.5259926915168762,
-0.06718342751264572,
-0.30185431241989136,
-0.06437339633703232,
0.18134327232837677,
0.24256573617458344,
-0.5711237192153931,
-0.088376514613... |
def resample ( self ) : indices = indresample ( self. xweights, self. n ) self. xparticles [... ] = self. xparticles [ :, indices ] self. thetaparticles [... ] = self. thetaparticles [ :, indices ] | [
-0.25152772665023804,
-0.3590243458747864,
0.12453767657279968,
-1.5584404468536377,
-0.195468932390213,
-0.3474460542201996,
-0.580599308013916,
-0.05582638084888458,
-0.02008906938135624,
0.0887860432267189,
-0.41398173570632935,
0.07265319675207138,
-0.30937471985816956,
-1.136648416519... |
def do _ add ( args : argparse. namespace ) - > none : in _ file = sys. stdin. buffer out _ file = sys. stdout. buffer data _ file = none if args. data _ file : # - - data is a file path if args. data = = " - " : # read data from stdin assert args. input, " must specify - - input if - - data is stdin " data _ file = sy... | [
0.3247416615486145,
-0.3704196810722351,
1.0749404430389404,
0.0619816891849041,
0.7845903635025024,
0.979835033416748,
0.37102627754211426,
-0.1916286051273346,
-0.21154621243476868,
-0.5040333271026611,
0.5173125863075256,
1.0578778982162476,
-0.25490912795066833,
0.6492624282836914,
0... |
def is _ over ( self ) - > bool : return not self. possible _ moves ( ) or self. lose ( ) | [
-1.2435318231582642,
-0.023152589797973633,
0.6309634447097778,
0.8659766912460327,
-0.27031227946281433,
0.1415795385837555,
-0.5026375651359558,
-0.142568439245224,
0.4167286455631256,
0.45344313979148865,
-0.066072978079319,
0.018295852467417717,
0.062339331954717636,
0.2257562875747680... |
def update _ item ( self, user, id _, new _ data ) : pass | [
-1.5966992378234863,
-0.6859135031700134,
0.28662025928497314,
1.0181639194488525,
-0.5706522464752197,
1.1364307403564453,
-0.9625040888786316,
0.047497399151325226,
-0.6492674350738525,
0.30168434977531433,
-1.2252593040466309,
0.7673014402389526,
0.12531578540802002,
-0.6885637640953064... |
def test _ put ( ) : with patch. object ( swift, " _ auth ", magicmock ( ) ) : assert swift. put ( " mycontainer " ) assert swift. put ( " mycontainer ", path = " myfile. png ", local _ file = " / tmp / myfile. png " ) assert not swift. put ( " mycontainer ", path = " myfile. png " ) | [
-0.13652050495147705,
0.4998556971549988,
0.499110609292984,
-0.859991729259491,
0.6671161651611328,
0.9415274262428284,
0.4712527394294739,
0.38410207629203796,
0.241387739777565,
-0.24460668861865997,
-0.24778839945793152,
-0.1079142838716507,
-0.4045313894748688,
-0.06520833820104599,
... |
def test _ gf _ write _ step _ result _ without _ failure _ report ( step _ state, expected _ color, world _ default _ config, disabled _ colors, capsys, mocker ) : # given step = mocker. magicmock ( spec = step ) step. keyword = " given " step. used _ keyword = " given " step. text = " there is a step " step. state = ... | [
0.09720029681921005,
0.08398856222629547,
0.25773298740386963,
0.08082219958305359,
0.9285409450531006,
-0.1317775696516037,
0.06189001351594925,
0.09697287529706955,
-0.45483219623565674,
-1.2452446222305298,
-0.7540670037269592,
-0.6912235021591187,
-0.4968334138393402,
1.041410565376281... |
def test _ logfilegetsclosed ( self ) : oldsetuplogfile = self. runner. _ setuplogfile l = [ ] def setuplogfile ( ) : oldsetuplogfile ( ) l. append ( self. runner. _ logfileobject ) self. runner. _ setuplogfile = setuplogfile self. runner. run ( self. test ) self. assertequal ( len ( l ), 1 ) self. asserttrue ( l [ 0 ]... | [
-0.20175237953662872,
-0.05570043623447418,
0.5805270075798035,
-0.20238558948040009,
0.36356109380722046,
1.1075886487960815,
0.3995535671710968,
-0.5411840081214905,
-0.388447642326355,
-0.4091571271419525,
-0.6166670918464661,
0.27813586592674255,
-0.305408775806427,
0.5131610035896301,... |
def state ( self ) : return [ self. a ( ), self. b ( ) ] | [
-1.3536152839660645,
-1.0197875499725342,
0.5419842004776001,
-0.3529787063598633,
0.46853652596473694,
0.11463508754968643,
-0.08372266590595245,
0.0010879546171054244,
0.8636051416397095,
-0.04130644351243973,
-0.7556513547897339,
0.03494134545326233,
-0.07651151716709137,
0.428037941455... |
def remove _ nontranslatable _ cgenes ( self, translator ) : print ( " removing non - translatable genes : input { 0 } ". format ( len ( self. cgenes ) ) ) self. cgenes = set ( [ x for x in self. cgenes if ( len ( translator. translate ( x ) ) > 0 ) ] ) print ( "... { 0 } were translatable. ". format ( len ( self. cgen... | [
0.489372581243515,
0.22412870824337006,
0.2663341462612152,
-0.04736633598804474,
-1.6211384534835815,
-0.07169173657894135,
0.03150344267487526,
0.8475048542022705,
-0.6731452345848083,
0.18955905735492706,
-0.8824089765548706,
-0.2759067714214325,
-0.9184315800666809,
0.07154342532157898... |
def _ _ div _ _ ( self, other ) : if isinstance ( other, array ) : result = self. _ new _ like _ me ( _ get _ common _ dtype ( self, other, self. queue ) ) self. _ div ( result, self, other ) else : if other = = 1 : return self. copy ( ) else : # create a new array for the result common _ dtype = _ get _ common _ dtype... | [
-0.2488718032836914,
0.36888501048088074,
0.927865207195282,
1.0222469568252563,
-0.5660014152526855,
0.25808200240135193,
0.7771880626678467,
-1.1986610889434814,
0.8432117700576782,
-0.1877257078886032,
-0.1460694819688797,
0.6238402128219604,
-0.9701677560806274,
0.6221364140510559,
0... |
def test _ create _ game _ and _ add _ too _ many _ players ( self ) : # make create request and parse response response = self. c. post ( reverse ('api - ajax - game'), {'max _ players': 2 } ) response _ dict = json. loads ( response. content ) # switch user accounts self. testbed. setup _ env ( user _ email ='another... | [
-0.13970611989498138,
0.6026793718338013,
1.06270432472229,
0.5195754766464233,
1.0742886066436768,
0.8535513281822205,
0.10652437806129456,
-0.7781643867492676,
-0.534087598323822,
0.770652174949646,
0.11995195597410202,
-0.060174617916345596,
-0.35670003294944763,
0.16064362227916718,
... |
def test _ main ( ) : client = ccpclient ( ('', 5000 ), ('localhost ', 5001 ), false ) def chaffling ( ) : # print " sending chaff! " client. send _ chaff ( 10 ) loop = loopingcall ( chaffling ) loop. start ( 5 ) reactor. run ( ) | [
0.482717901468277,
0.8616771697998047,
0.3655346632003784,
-0.6510920524597168,
0.6626003980636597,
0.5667933821678162,
0.11149643361568451,
-0.19513538479804993,
-0.9789292216300964,
-0.4534837305545807,
-0.6558905839920044,
1.0338636636734009,
-0.6668640971183777,
0.3163006901741028,
0... |
def get _ overlay _ dir ( overlays _ path, environment, region ) : for name in gen _ overlay _ dirs ( environment, region ) : overlay _ dir = os. path. join ( overlays _ path, name ) if os. path. isfile ( os. path. join ( overlay _ dir, " kustomization. yaml " ) ) : return overlay _ dir return overlay _ dir # fallback ... | [
0.5294747352600098,
0.11176545917987823,
0.7140063047409058,
0.26557478308677673,
-0.40747153759002686,
-0.04565807431936264,
0.7310322523117065,
-0.8651891350746155,
0.430012583732605,
-0.17913390696048737,
0.8212171196937561,
0.15589632093906403,
0.17752332985401154,
0.2671003043651581,
... |
def unique _ id ( self ) : return self. _ unique _ id. replace ( " ", " _ " ) | [
0.7492684721946716,
-0.32739928364753723,
0.5959098935127258,
-1.2737936973571777,
-0.1541902869939804,
0.721250057220459,
-0.4885466694831848,
0.8546791076660156,
0.6889218091964722,
-0.14364901185035706,
-0.4349100589752197,
0.8334750533103943,
-0.06516837328672409,
-1.010921835899353,
... |
def _ _ eq _ _ ( self, other ) : if isinstance ( other, filemeta ) : return self. _ id = = other. id return false | [
-0.1289811134338379,
-1.0341850519180298,
0.7754620909690857,
0.13336779177188873,
0.6253446340560913,
0.5650478005409241,
-0.30218639969825745,
-0.4964834153652191,
0.19880877435207367,
-0.4073677062988281,
-0.44494813680648804,
0.6891054511070251,
-0.477571576833725,
0.20011240243911743,... |
def get _ pump _ params ( self, pump ) : msg = self. device. send ( " get - pump - info ", pump ) if msg. iserror ( ) : raise exception ( msg. geterror ( ) ) return { " pump _ direction " : msg. getintparam ( 0 ), " pump _ on " : msg. getboolparam ( 1 ), " pump _ valves " : msg. getintparam ( 2 ), " pump _ flow " : msg... | [
-1.2777022123336792,
0.6482020020484924,
0.7772364020347595,
-0.27514421939849854,
-0.7934487462043762,
-0.13578374683856964,
-0.2932048439979553,
-0.5625773072242737,
-0.1536300629377365,
0.3237442076206207,
-1.534849762916565,
0.23505163192749023,
-0.6575595140457153,
0.48553216457366943... |
def list _ in _ list ( list1, list2, index = false, dataset _ to _ index = none ) : items = [ ] booln = [ ] for i in range ( 0, len ( list1 ) ) : item = list1 [ i ] if not any ( [ word in item for word in list2 ] ) : booln. append ( true ) else : booln. append ( false ) items. append ( item ) if index = = false : retur... | [
-0.14072057604789734,
0.14802294969558716,
0.7961847186088562,
0.12671303749084473,
-0.8768026828765869,
0.13710959255695343,
-1.2216358184814453,
1.5799939632415771,
-0.06667023152112961,
0.5538545846939087,
-0.4946357011795044,
1.141784906387329,
-0.4826437830924988,
-0.3307235836982727,... |
def get _ perm _ content _ type ( obj, perm ) : if isinstance ( obj, model ) : cls = none # try and get the content type via object perms # if not via object perms it should be on a class try : cls = perms _ dict [ obj. _ _ class _ _ ]. object _ perms [ perm ]. cls except keyerror : cls = perms _ dict [ obj. _ _ class ... | [
0.5781066417694092,
-0.6169125437736511,
0.8573664426803589,
0.6300099492073059,
-0.9849331378936768,
-0.16388213634490967,
0.5497406721115112,
-0.7787342071533203,
0.2659253776073456,
0.5130460262298584,
0.37379810214042664,
0.8899968862533569,
-1.4294207096099854,
-0.4498012661933899,
... |
def get _ spock _ profiles ( ipython _ profiles = none ) : ret = [ ] ipydir = get _ ipython _ dir ( ) if not os. path. isdir ( ipydir ) : return ret if ipython _ profiles is none : ipython _ profiles = get _ ipython _ profiles ( ) ret = [ ] for profile in ipython _ profiles : profile _ f = os. path. join ( ipydir, " ip... | [
-0.42615124583244324,
0.6335084438323975,
0.929070234298706,
0.6838688254356384,
1.2175939083099365,
0.340504914522171,
0.6177833676338196,
-0.1250927448272705,
0.3094821274280548,
0.5516483783721924,
-0.7410950660705566,
-0.1729346662759781,
-0.9833646416664124,
-0.0819130465388298,
-0.... |
def make _ stat _ dict ( rel _ path, private _ data, cloud, user _ id, parent _ permissions = none ) : # type : ( relativepath, privatedata, cloud, int ) - > optional [ dict [ str, any ] ] if rel _ path is none : return none full _ path = rel _ path. to _ absolute ( cloud. root _ directory ) if not os. path. exists ( f... | [
0.4861075282096863,
-0.34542709589004517,
0.7102590799331665,
-0.8763836026191711,
-0.9285035133361816,
-0.20345260202884674,
0.3038219213485718,
-0.3600832521915436,
-0.7746341824531555,
-0.6497417092323303,
-0.46437740325927734,
0.2875045835971832,
0.3561244010925293,
-0.0166615843772888... |
def build _ feature _ matrix ( self, look _ back ) : self. log. info ( " extract features for patient { } ". format ( self. patient _ id ) ) result = list ( ) # generate one instance per glucose value, starting with the second labels = list ( ) for i in range ( 1, self. n _ samples ) : # time of predicted value next _ ... | [
-0.6364750862121582,
-0.16015297174453735,
0.9372959733009338,
0.1691834181547165,
0.34727808833122253,
-0.16701270639896393,
0.9016960859298706,
0.7960612177848816,
-1.0996712446212769,
0.14986753463745117,
0.08973701298236847,
0.8209214210510254,
-0.16890084743499756,
0.3597762882709503,... |
def load _ test _ data ( file _ name = " data / test _ data. txt " ) : with open ( file _ name ) as f : lines = f. readlines ( ) all _ dat = list ( ) for i, l in enumerate ( lines ) : l = gensim. utils. any2unicode ( l ) all _ dat. append ( l ) return all _ dat | [
-0.05895759165287018,
-0.26249685883522034,
0.43528637290000916,
-0.3122960925102234,
-0.12935374677181244,
0.6884966492652893,
-0.6601119041442871,
1.446147084236145,
-0.207039475440979,
-0.09394613653421402,
-0.6147304177284241,
0.01684839464724064,
-0.1846034675836563,
0.208682954311370... |
def get _ widget ( self, name ) : return self. _ dock _ widgets [ name ] | [
-0.21326380968093872,
0.24692410230636597,
0.06187967211008072,
-0.329743355512619,
-0.5248256921768188,
-0.554731547832489,
0.47558724880218506,
-0.5835831165313721,
-0.4614422917366028,
-0.39863213896751404,
-0.21407194435596466,
0.5986743569374084,
-0.3666410744190216,
0.240150704979896... |
def calcforcedistribution ( self ) : difference _ secondperiodic1d ( self. nb, self. hb, self. x, self. f ) self. f * = self. s return self. f | [
0.8972020149230957,
-0.5791154503822327,
0.20990023016929626,
1.1772723197937012,
0.2115136682987213,
-0.010529542341828346,
0.7264750599861145,
0.011384994722902775,
-0.07663191109895706,
-1.7654131650924683,
0.3959476053714752,
-0.3721254765987396,
-0.633079469203949,
0.22788898646831512... |
def _ _ repr _ _ ( self ) : return'resizingarraystack ( [ { } ] ) '. format ( ', '. join ( repr ( i ) for i in self ) ) | [
-0.4454563856124878,
0.05558198317885399,
0.6219233870506287,
-0.5968526601791382,
-0.02970646508038044,
0.025969302281737328,
-0.03282583877444267,
-0.22493848204612732,
0.19081273674964905,
1.0816174745559692,
0.007655406836420298,
-0.13323761522769928,
0.3021477460861206,
0.027599882334... |
def custom _ heuristics ( game, player, choice ) : def strategy _ 1 ( ) : " " " evaluation function : ( 1 ) favors spots closer to opponent ( 2 ) favors spots farther away from the edges that opponent is not cloasest too. ( ie if opponent is in top left quandrant - favor moves that put us farther away from the bottom a... | [
-0.1151810735464096,
-0.43975716829299927,
0.968781590461731,
-0.9126412272453308,
-0.5602150559425354,
0.2944945693016052,
0.6884742975234985,
0.24764201045036316,
0.19514650106430054,
0.875906765460968,
0.4610150456428528,
0.15373347699642181,
0.9186328649520874,
-0.3854564130306244,
0... |
def get _ object ( self, object _ id : str ) - > t : raise notimplementederror | [
0.02017883211374283,
-0.7215203642845154,
0.25664380192756653,
-0.024113642051815987,
0.6796576380729675,
0.05164312943816185,
-0.34623733162879944,
-0.8784888386726379,
0.1474209427833557,
0.13712036609649658,
-0.6147775053977966,
1.0960636138916016,
1.0704606771469116,
-0.939369320869445... |
def type _ group _ macros ( self ) : for g in self. arg _ type _ groups : expression = [ " % s ( t ) " % t. macro _ check ( ) for t in g. types ( self. arg _ types ) ] if not expression : expression = [ g. hard _ predicate ] yield " # define % s _ type ( t ) ( % s ) " % ( g. name. upper ( ), " | | ". join ( expression ... | [
-0.17404869198799133,
0.3556067645549774,
0.370299369096756,
0.5507164001464844,
0.6248692870140076,
-0.23475049436092377,
-0.1525973379611969,
-0.6350842118263245,
-1.6385055780410767,
1.1982773542404175,
0.256109356880188,
0.9372431635856628,
0.015683021396398544,
1.4489915370941162,
-... |
def find _ largest _ prime _ factor _ 1 ( number ) : largest _ factor = 0 # going through all numbers from 2 to square root of the input number to check if # they are the factors for i in range ( 2, int ( math. sqrt ( number ) ) ) : # if the number is a divisor if number % i = = 0 : factor1 = number / / i factor2 = i #... | [
-0.5476037859916687,
-0.06730848550796509,
0.7069577574729919,
0.3131149113178253,
-0.4306088984012604,
-0.25039926171302795,
-0.37271103262901306,
-0.31724780797958374,
0.5066577792167664,
-0.21688413619995117,
0.0858505442738533,
0.14968745410442352,
-0.6733700633049011,
1.35760605335235... |
def string _ similarity ( string1 : str, string2 : str, method = 0, rearrange _ allowed = false, drop _ duplicates = false, clean _ string = false, filter _ ascii = false ) : assert method in [ 0, 1 ], " invalid mode " if drop _ duplicates and not clean _ string and string1 = = string2 : return 100 if clean _ string : ... | [
-0.5159114599227905,
0.2437773197889328,
0.6279303431510925,
0.08526766300201416,
-0.4210975468158722,
-0.21478921175003052,
0.031618449836969376,
-0.4862845838069916,
-0.23314446210861206,
0.42345932126045227,
0.48883628845214844,
0.895753800868988,
-0.05091932415962219,
-0.36618575453758... |
def build ( ) : test ( ) lint ( ) | [
0.7075626254081726,
-1.2048336267471313,
0.14826475083827972,
0.8311297297477722,
1.145739197731018,
1.3005013465881348,
0.9665713310241699,
-0.05787143111228943,
0.3213828504085541,
-0.761162281036377,
0.10987606644630432,
0.9198079109191895,
-0.3683665692806244,
0.32685673236846924,
-0... |
def analyze ( self ) : self. check _ firewall _ processes ( ) | [
0.8453890085220337,
0.31758004426956177,
0.2699441909790039,
0.8373371362686157,
1.2304089069366455,
-0.2687177062034607,
0.9732439517974854,
-0.6695247888565063,
0.027758970856666565,
-0.815453827381134,
-0.07285651564598083,
0.3952515721321106,
0.06529408693313599,
1.4589557647705078,
... |
def nonworderror ( word ) : inidial _ candidates = edits1 ( word. lower ( ) ) nonwords _ pruned = [ ] validwords = wordcounter ( ). keys ( ) for i in inidial _ candidates : if i in validwords : nonwords _ pruned. append ( i ) if len ( nonwords _ pruned ) = = 0 : corrected _ word = word else : distances = { } for i in n... | [
0.015608611516654491,
-0.4860997200012207,
0.6993438601493835,
0.15143339335918427,
-0.7870528101921082,
0.6332189440727234,
0.5147402882575989,
0.45463305711746216,
0.22445474565029144,
0.7688612341880798,
0.6351706385612488,
0.8877066969871521,
-1.5529896020889282,
0.43332964181900024,
... |
def construct _ well _ level _ df ( input _ file, plate _ dims = [ 16, 24 ], exclude _ outer = 1, cell _ lines = [ ] ) : df _ spec = pd. read _ csv ( input _ file ) df _ spec = df _ spec. fillna ('' ) if'exclude _ doses'not in df _ spec. columns. tolist ( ) : df _ spec ['exclude _ doses'] = ['' ] * len ( df _ spec ) df... | [
0.42005035281181335,
-0.03627422824501991,
0.7537137269973755,
-0.891843318939209,
-0.6098324656486511,
-0.3787412941455841,
0.5160835385322571,
0.5636968612670898,
-0.9378420114517212,
-0.04475514218211174,
0.048573751002550125,
0.44374239444732666,
0.783647358417511,
0.34781086444854736,... |
def test _ replace _ vcs _ root _ entries ( self ) : pass | [
0.9774542450904846,
-0.28056973218917847,
0.05645492672920227,
0.9691097140312195,
0.4882090985774994,
-0.3714638650417328,
0.9742230176925659,
0.5959200859069824,
0.8197043538093567,
-0.7009629011154175,
-1.2592451572418213,
0.6593155860900879,
-1.4209166765213013,
0.31750428676605225,
... |
def _ delete _ dvpg ( gt, dvs, pg _ ref, pg _ name, ignore _ in _ use ) : dvs. _ delete _ port _ group ( pg _ ref, pg _ name, ignore _ in _ use ) | [
-0.7443667054176331,
1.0854334831237793,
0.5043348670005798,
-0.4071764647960663,
-0.07890540361404419,
-0.3048427999019623,
-0.2810860872268677,
-0.5459590554237366,
-0.6222888231277466,
1.0751413106918335,
1.1507182121276855,
0.4407338798046112,
-0.5999705195426941,
-0.3774908185005188,
... |
def split _ blends ( driven1 = none, driven2 = none, sealdriver1 = none, sealdriver2 = none, sealdrivermid = none, nameseal1 ='left ', nameseal2 ='right ', namesealmid ='center ', maxvalue = 10. 0, intangent ='auto ', outtangent ='auto ', settingscontrol = none, buildnetwork = true ) : try : _ str _ func ='split _ blen... | [
-0.924243688583374,
-0.5344560146331787,
0.8822652101516724,
0.7014986872673035,
0.22512437403202057,
0.2341250777244568,
1.1647467613220215,
-0.1063811182975769,
-0.460391640663147,
0.2894161343574524,
-0.8460671901702881,
0.24164237082004547,
-1.2480698823928833,
0.3662254214286804,
1.... |
def donemessage ( self ) : self. trap. turns = 1 self. pkmn. secondaryeffects. append ( self. trap ) messages = self. trap. afterturn ( self. pkmn ) assert len ( messages ) = = 2, " should have two messages " assert messages [ 1 ] = = self. pkmn. getheader ( ) + self. donemessage, " done message should be returned. " | [
-0.21493619680404663,
-0.1891254484653473,
0.4736320972442627,
-0.3131932318210602,
1.0054851770401,
-0.32342615723609924,
0.17090097069740295,
-1.2655203342437744,
-0.08539547026157379,
-0.6469371318817139,
-0.8466611504554749,
-0.08305323868989944,
-0.5570545792579651,
-0.166517406702041... |
def set _ due _ date ( days = 0, weeks = 0 ) : today = datetime. date. today ( ) due _ date = today + datetime. timedelta ( days = days, weeks = weeks ) return due _ date | [
0.18648384511470795,
0.7000749111175537,
0.6937936544418335,
-1.1837339401245117,
-0.006502673961222172,
0.15772923827171326,
-1.3979731798171997,
-0.9181422591209412,
-0.2649604082107544,
-0.7474485635757446,
0.8303370475769043,
0.14393822848796844,
0.3881978690624237,
0.5798428058624268,... |
def modeling ( df, model : model ) : x _ train, x _ test, y _ train, y _ test = train _ test _ split ( df. drop ( ['relevant'], axis = 1 ), df ['relevant'], test _ size = 0. 3, random _ state = 1 ) # inicializamos el modelo md = model ( ) # lo entrenamos md. fit ( x _ train, y _ train ) # vemos el arbol que se ha cread... | [
0.42990005016326904,
0.14602793753147125,
0.7512557506561279,
0.39329439401626587,
0.3855823278427124,
-0.046823274344205856,
-0.1544117033481598,
0.17524559795856476,
-0.33245372772216797,
0.21464942395687103,
0.04803773760795593,
0.7346060276031494,
0.7144092917442322,
-0.194828793406486... |
def test _ synchronizefailure ( self ) : deferred = synchronousdeferred ( synchronousfailure ( runtimeerror ( ) ) ) self. assertraises ( runtimeerror, deferred. synchronize ) | [
0.7904482483863831,
1.0245850086212158,
0.3735046982765198,
0.794852077960968,
-0.10446013510227203,
-0.2588129937648773,
-0.5916973948478699,
0.3176518678665161,
-0.23741595447063446,
-1.2753218412399292,
-1.077863097190857,
0.2661729156970978,
-0.1941496729850769,
1.0855011940002441,
1... |
def set _ size ( self, intv ) : self. size = _ check _ arg _ interval ( intv, " intv " ) | [
-0.533968448638916,
0.8864210844039917,
0.3805502951145172,
-0.3788171708583832,
0.40908119082450867,
0.647436797618866,
1.052786946296692,
-0.5511816143989563,
-0.6622794270515442,
0.1343173235654831,
-0.9784215092658997,
0.07526126503944397,
-1.1254249811172485,
0.6083966493606567,
0.5... |
def placements ( self ) - > list [ move ] : return [ move. from _ sgf ( sgf _ coords, player = pl, board _ size = self. board _ size ) for pl in move. players for sgf _ coords in self. get _ list _ property ( " a " + pl, [ ] ) ] | [
-0.2741761803627014,
-0.05994514375925064,
0.374535471200943,
0.3481769263744354,
1.0575848817825317,
0.3856205642223358,
0.20100270211696625,
0.3738509714603424,
0.5186383128166199,
0.4045986831188202,
0.28181594610214233,
-0.3374934494495392,
-0.0042757922783494,
0.10644284635782242,
-... |
def parse _ ansi _ string ( sql, config ) : linter = linter ( config = config ) return linter. parse _ string ( sql ). tree | [
1.3407407999038696,
-0.37957853078842163,
0.15897054970264435,
0.19613666832447052,
-1.8414427042007446,
-0.21979039907455444,
-1.082725167274475,
-0.15752249956130981,
0.10527466982603073,
0.6659196615219116,
-0.6237323880195618,
-0.042251117527484894,
-0.22940272092819214,
0.602588593959... |
def test _ find _ series ( self ) : nodes = [ node. name for node in self. finder. find _ nodes ( query ( self. series1 ) ) if node. is _ leaf ] expected = [ self. nodes [ 0 ] ] self. assertequal ( nodes, expected, msg = " got node list % s - wanted % s " % ( nodes, expected, ) ) | [
-0.25360700488090515,
0.3834434151649475,
0.3049217760562897,
0.4541085660457611,
0.9611631631851196,
0.28024399280548096,
-0.006644190289080143,
-0.8817917108535767,
0.20784157514572144,
0.1446097493171692,
0.2005728930234909,
0.6951642632484436,
-0.22893847525119781,
0.0319913811981678,
... |
def discrepancies ( r ) : ret = [ ] for i in xrange ( 2, r + 1 ) : if r % i = = 0 : ret. append ( ( i - 1 ) * r / i ) return ret | [
-0.6865882873535156,
0.5838842391967773,
0.26586198806762695,
0.5157344937324524,
-0.005167205817997456,
0.3640120029449463,
1.5628387928009033,
0.7954904437065125,
0.5368776917457581,
-0.05725470557808876,
-0.8738763332366943,
-0.7244125604629517,
-0.9031160473823547,
0.8558810353279114,
... |
def construct _ result ( avg _ gpu _ metric _ values, avg _ non _ gpu _ metric _ values, comparator, value _ step = 1, model _ name = none, model _ config = none ) : num _ vals = 10 # construct a result model _ result = modelresult ( model _ name = model _ name, model _ config = model _ config, comparator = comparator ... | [
-0.5263502597808838,
0.9535348415374756,
0.6715754270553589,
0.18735194206237793,
-0.047302547842264175,
0.21165555715560913,
0.5463631749153137,
-0.15861497819423676,
-1.2759068012237549,
0.4823521375656128,
-0.007202368229627609,
-0.6077376008033752,
0.7462418079376221,
0.675845146179199... |
def available ( self ) : return self. _ available | [
-0.9286884069442749,
-0.7599573731422424,
0.20638307929039001,
0.2071574181318283,
-0.40241172909736633,
1.9196068048477173,
0.33284232020378113,
0.6646935939788818,
0.10761445015668869,
0.8078754544258118,
-0.3974049389362335,
0.6467297673225403,
-0.18759775161743164,
-0.23670421540737152... |
def summary _ op ( self ) : return tf. summary. merge _ all ( scope = self. scope ) | [
-0.20669400691986084,
0.6861653923988342,
0.5157137513160706,
-0.38601386547088623,
0.2619515657424927,
-0.23846137523651123,
0.0738970935344696,
0.054923105984926224,
0.5935233235359192,
0.838918149471283,
0.2255975753068924,
0.2740989923477173,
0.39929625391960144,
-0.9605396389961243,
... |
def project ( self ) : return self. _ data. get ('summary _ fields ', { } ). get ('project') | [
-0.4913803040981293,
1.1587505340576172,
0.2585718333721161,
-0.11114415526390076,
0.3321631848812103,
1.0638427734375,
0.4051249325275421,
-0.015796339139342308,
0.28854021430015564,
0.25265443325042725,
0.5016291737556458,
-0.3838714063167572,
-0.11306210607290268,
-1.2722723484039307,
... |
def dict _ change ( a : dict, b : dict ) : return { * * { k : v for k, v in b. items ( ) if k not in a or a [ k ]! = v }, * * { k : none for k in a if a [ k ] is not none and k not in b }, } | [
-0.4786390960216522,
-0.8855502605438232,
0.8622667193412781,
-0.8914861083030701,
-0.8836702108383179,
-0.6009801626205444,
-0.6735031604766846,
0.9553784728050232,
-0.06957360357046127,
1.0845444202423096,
-0.2103775292634964,
1.2533973455429077,
0.6337042450904846,
0.29105904698371887,
... |
def get _ modified _ by ( self ) : return self. _ _ modified _ by | [
-0.5709879994392395,
-0.7154572010040283,
0.5029791593551636,
-0.02037755586206913,
-0.11912543326616287,
-0.07013718783855438,
0.8018829822540283,
0.23166635632514954,
-0.0805056244134903,
-0.45147228240966797,
0.13465139269828796,
0.424984335899353,
0.173545241355896,
0.01861108653247356... |
def _ wrap _ paragraphs ( self, text ) : return'\ n '. join ( textwrap. fill ( paragraph ) for paragraph in text. splitlines ( ) ) | [
0.01008076686412096,
-0.3426440358161926,
0.18760961294174194,
-0.6467912197113037,
-0.787776529788971,
1.0188149213790894,
-1.6950992345809937,
0.26591911911964417,
0.36821335554122925,
0.9141265749931335,
1.0137757062911987,
-0.1933039426803589,
-0.19322454929351807,
-0.26088300347328186... |
def has _ enums ( self ) - > bool : return len ( self. _ enums ) > 0 | [
-0.5266889333724976,
0.5946152806282043,
0.42929807305336,
-0.40799471735954285,
1.1918590068817139,
0.2119976282119751,
-0.913573682308197,
0.7675805687904358,
-0.21036650240421295,
-0.004130174871534109,
-0.7316768765449524,
0.27549687027931213,
-0.18765996396541595,
1.3666101694107056,
... |
def showscore ( score ) : scoredigits = [ int ( x ) for x in list ( str ( score ) ) ] totalwidth = 0 # total width of all numbers to be printed for digit in scoredigits : totalwidth + = images ['numbers'] [ digit ]. get _ width ( ) xoffset = ( screenwidth - totalwidth ) / 2 for digit in scoredigits : screen. blit ( ima... | [
-0.38292956352233887,
-0.0648537427186966,
0.6722438931465149,
-0.584402322769165,
-0.11030960828065872,
-0.10674747824668884,
0.8537483811378479,
0.09024044871330261,
1.2592933177947998,
0.921179473400116,
0.3602380156517029,
0.20751738548278809,
-0.12921930849552155,
0.8571496605873108,
... |
def select _ port ( ) - > serial : ser : serial = serial. serial ( ) ser. baudrate = 9600 # same as serial. begin in arduino ser. timeout = 0. 1 print ('[ serial device ]') print ('checking serial devices... ( baudrate : { }, timeout : { } ) '. format ( ser. baudrate, ser. timeout ) ) ports = list _ ports. comports ( )... | [
-0.16772669553756714,
-0.874142587184906,
0.7607913613319397,
0.12027498334646225,
0.1339859515428543,
-0.2667447328567505,
1.278214693069458,
-0.3983304500579834,
0.7308306097984314,
-0.5206029415130615,
0.7123293280601501,
0.8996462225914001,
-0.3021211326122284,
-0.7255969643592834,
0... |
def releasepid ( self ) : return self. expiry | [
0.2602098882198334,
-0.9519391655921936,
0.5336540937423706,
-1.255048155784607,
-0.4863543212413788,
1.1102198362350464,
-1.2379341125488281,
0.06927450001239777,
0.9111578464508057,
0.5353110432624817,
-0.11581390351057053,
0.31891900300979614,
-1.257111668586731,
-1.0164179801940918,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.