text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def template _ correlate ( observed _ spectrum, template _ spectrum, lag _ units = _ kms, apodization _ window = 0. 5, resample = true ) : # resample if the user requested to log wavelength if resample : if resample is true : resample _ kwargs = dict ( ) # use defaults else : resample _ kwargs = resample log _ spectrum... | [
0.4388197958469391,
-0.17054583132266998,
0.6658796072006226,
-0.7699289917945862,
-1.063503384590149,
-0.6136407256126404,
-0.2598520815372467,
0.9626067280769348,
0.220854252576828,
0.24367080628871918,
0.40370872616767883,
0.8292170763015747,
-0.003727247240021825,
0.3701096475124359,
... |
def test _ user _ fd ( self ) : user _ fd = stringio ( ) receiver = streamingbodyreceiver ( user _ fd ) self. assertidentical ( receiver. _ fd, user _ fd ) | [
0.8329291343688965,
-0.2044273018836975,
0.2937307357788086,
-0.14475806057453156,
-0.5826716423034668,
0.4160219728946686,
0.4897553324699402,
-0.6607381701469421,
0.9062812924385071,
-1.5610848665237427,
-0.44033151865005493,
0.39849981665611267,
-0.12496130913496017,
-0.1570984572172165... |
def label _ fingerprint ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " label _ fingerprint " ) | [
0.5888150930404663,
-0.5521093606948853,
0.3519518971443176,
0.2784457802772522,
0.5546332597732544,
2.12154483795166,
0.24182036519050598,
0.1445697396993637,
0.32839760184288025,
0.48260223865509033,
0.13459128141403198,
0.32333993911743164,
-0.26992031931877136,
-0.6752708554267883,
-... |
def live _ data2csv ( dat, sep, header = true ) : # define columns and assemble header cols = ( " date ", " weekday ", " time ", " value ", " rawvalue ", " unit ", " range ", " mode ", " hold ", " apo ", " power ", " view ", " memstat ", " mem _ no ", " read _ no ", ) csv = [ ] if header : csv = [ sep. join ( cols ) ] ... | [
0.10018264502286911,
-0.5309364199638367,
0.7320196628570557,
0.7092073559761047,
-0.5123342871665955,
-0.06996163725852966,
-0.9380793571472168,
0.13591310381889343,
0.082863949239254,
-0.7033907175064087,
0.12270528823137283,
0.21884416043758392,
0.8026422262191772,
-0.23588553071022034,... |
def test _ mr _ job _ succeeded _ 3 ( self ) : r _ fact = 0. 46 r _ free = 0. 44 data = simbad. rotsearch. mr _ job _ succeeded ( r _ fact, r _ free ) self. assertfalse ( data ) | [
0.47758758068084717,
0.8298855423927307,
0.23686577379703522,
0.4535636901855469,
0.13946817815303802,
1.9720323085784912,
-0.39306241273880005,
-0.13457193970680237,
-0.4161488115787506,
-0.7666966319084167,
-0.532082200050354,
-0.18870249390602112,
-1.0363551378250122,
0.1750060021877288... |
def test _ serve _ build _ type _ field ( self ) : pass | [
-0.7601526975631714,
0.3301249146461487,
0.5394296050071716,
0.7013367414474487,
0.5861762166023254,
1.742911458015442,
2.033069133758545,
-0.410410612821579,
-0.6186417937278748,
-0.23517805337905884,
-1.3890198469161987,
0.6148282885551453,
-1.359129548072815,
0.07879486680030823,
0.39... |
def bonded _ beads _ distance _ whole ( simname, coord _ loc = [ 3, 6 ], save = false ) : bonded _ beads _ distance _ list = [ ] df, boxsize _ whole = extract. extract _ unwrapped ( simname, boxsize _ whole = true ) for key in df : coord = df [ key ] coord. sort _ values ( by = ['id'], inplace = true ) chains = coord [... | [
0.0360192134976387,
-0.6038281321525574,
0.9544873833656311,
-0.3922174870967865,
0.3345029950141907,
0.0538044348359108,
0.9996044635772705,
-0.01462049875408411,
0.2066473513841629,
0.6392893195152283,
-0.848314106464386,
0.2992599308490753,
-0.7985607385635376,
0.6107011437416077,
0.6... |
def create _ model ( metadata, clusters ) : # arbitrary dimension for all embeddings embedding _ dim = 10 # quarter hour of the day embedding embed _ quarter _ hour = sequential ( ) embed _ quarter _ hour. add ( embedding ( metadata ['n _ quarter _ hours'], embedding _ dim, input _ length = 1 ) ) embed _ quarter _ hour... | [
0.20485790073871613,
0.6385039687156677,
0.6472615599632263,
-0.36087486147880554,
0.2145034521818161,
0.8635021448135376,
0.09397483617067337,
-0.18496273458003998,
-0.4053010642528534,
0.1029893010854721,
-0.3234284520149231,
-0.5017808079719543,
0.7556836605072021,
-0.537894070148468,
... |
def rodrigues ( self, r ) : theta = np. linalg. norm ( r, axis = ( 1, 2 ), keepdims = true ) # angle is the magnitude of the vector # avoid zero divide theta = np. maximum ( theta, np. finfo ( np. float64 ). tiny ) r _ hat = r / theta cos = np. cos ( theta ) z _ stick = np. zeros ( theta. shape [ 0 ] ) m = np. dstack (... | [
-0.4504793584346771,
-0.2955377697944641,
0.8538607358932495,
-0.43914979696273804,
-0.2307058870792389,
-0.10430300980806351,
1.3941915035247803,
0.2121209353208542,
0.16606222093105316,
1.2172253131866455,
-0.053954288363456726,
0.05056634917855263,
-0.4713951051235199,
-0.12421554327011... |
def closed _ mill ( self, player ) : if self. can _ capture = = false : return 0 elif self. player _ to _ move = = player : return 1 else : return - 1 | [
-1.57565438747406,
-0.9308871030807495,
0.5506237745285034,
0.7218009233474731,
-0.5466068983078003,
0.6223713755607605,
0.568990170955658,
-0.14001739025115967,
0.39515313506126404,
0.23808756470680237,
0.3092586100101471,
0.09799987077713013,
-0.6202629208564758,
0.48043712973594666,
0... |
def getroles ( self ) : if self. thebackingmachine = = none : return none try : return self. thebackingmachine. getroles ( ) except exception as e : self. failgracefully ( e, none ) except threaddeath as d : raise d except outofmemoryerror as e : raise e except error as e : self. failgracefully ( none, e ) return self.... | [
0.8105818033218384,
0.6235834956169128,
0.7055721879005432,
0.05583752319216728,
1.2450511455535889,
-0.5030698180198669,
-0.522868275642395,
-0.8795817494392395,
0.3328612148761749,
-0.34288814663887024,
1.0800862312316895,
0.11232128739356995,
-1.1748641729354858,
-0.016701258718967438,
... |
def get _ content ( config, key ) : if config [ key ] = = " none " : location _ content = none else : location _ content = read _ json ( '.. / data /'+ config [ key ] ) return location _ content | [
-0.5626406073570251,
-0.6255061030387878,
0.525508463382721,
0.0049761077389121056,
-0.5587636232376099,
-0.3143083453178406,
-0.48673802614212036,
-0.1704915463924408,
-0.39871150255203247,
1.0485515594482422,
0.370134174823761,
0.02105668932199478,
0.053298283368349075,
-0.56309318542480... |
def test _ type ( self ) : self. asserttrue ( type ( storage ) is filestorage ) | [
0.4266957938671112,
-0.18633106350898743,
0.3133109211921692,
1.0043606758117676,
1.5231139659881592,
0.7279277443885803,
0.535578191280365,
-0.6291269659996033,
0.7315758466720581,
-0.20713205635547638,
0.061183806508779526,
-0.33028289675712585,
-0.4362805485725403,
0.3971474766731262,
... |
def process _ bytes _ output ( self, df ) : df. set _ index ('referer ', inplace = true ) fncn = lambda d : issubclass ( np. dtype ( d ). type, np. number ) df ['gbytes'] / = ( 1024 * * 3 ) format = {'gbytes':'{ :,. 1f } ','percentage':'{ :. 1f } ', } styles = [ dict ( selector ='table ', props = [ ('border - collapse ... | [
0.3153175413608551,
1.194016456604004,
1.0554381608963013,
-0.6587629318237305,
-0.03731187805533409,
-0.34453025460243225,
0.8929610252380371,
-0.2779649496078491,
-0.4183751046657562,
0.2489762306213379,
0.4544026851654053,
0.549530565738678,
0.21822689473628998,
1.1269350051879883,
0.... |
def forward ( self, x ) : y = self. sig ( self. out ( self. relu ( self. hidden _ unit ( x ) ) ) ) return y | [
-0.16903246939182281,
0.4478335976600647,
0.5094464421272278,
-0.29974451661109924,
-0.8227685689926147,
0.5643323659896851,
0.08932452648878098,
-1.0803132057189941,
-0.04529399052262306,
-0.7208303809165955,
-1.0282723903656006,
0.5407356023788452,
0.26308101415634155,
-0.323952287435531... |
def array _ from _ conditions ( df, cols, * col _ conds ) : col _ names = list ( df. columns ) [ 0 : cols ] # use itertools product to get all conditions dict _ arr = { } for el in itertools. product ( * col _ conds ) : # print ( el ) print elements for debugging df _ filter = df [ ( df [ col _ names [ 0 ] ] = = el [ 0... | [
-0.647563636302948,
-0.2917361855506897,
0.593813955783844,
0.5849871635437012,
-0.5370604395866394,
-0.24546849727630615,
0.6298810243606567,
0.0221870020031929,
-1.2511247396469116,
0.48556405305862427,
-0.18322427570819855,
0.40461280941963196,
0.667930006980896,
0.3166370689868927,
0... |
def encode _ auth _ token ( self, id ) : try : payload = {'exp': datetime. datetime. utcnow ( ) + datetime. timedelta ( days = 0, seconds = 50000 ),'iat': datetime. datetime. utcnow ( ),'sub': id } return jwt. encode ( payload,'secret ', algorithm ='hs256') except exception as e : return e | [
-0.36851704120635986,
-0.1412818431854248,
0.5629307627677917,
0.1546868085861206,
-0.7111561894416809,
0.13222934305667877,
-0.9810100793838501,
-0.6367226243019104,
0.4157222807407379,
0.33852288126945496,
-0.9695284962654114,
1.220455288887024,
0.10228259861469269,
0.10795396566390991,
... |
def get _ model ( pcs1, pcs2, is _ training, bn _ decay = none ) : batch _ size = pcs1. get _ shape ( ) [ 0 ]. value end _ points = { } with tf. variable _ scope ( " siamese " ) : embedding _ output1, center _ mean1, s1 _ pred _ center1, s2 _ pred _ center1, s2 _ pred _ angle _ logits1 = get _ embedding _ net ( pcs1, i... | [
0.5978070497512817,
-0.18074235320091248,
0.7945433855056763,
-0.021082978695631027,
0.10169396549463272,
0.7123541235923767,
-0.07222957164049149,
0.24423640966415405,
0.004714655224233866,
0.10757653415203094,
0.16683535277843475,
0.7588440775871277,
0.06334778666496277,
-0.5134190917015... |
def on _ open ( self, * args, * * kwargs ) : cls = self. _ _ class _ _ self. log. info ('incoming connection % s to channels " % s "'% ( self. connection _ id, ', '. join ( self. channels ) ) ) cls. _ connections [ self. connection _ id ] = self # send something to the client to let it know that the connection has been... | [
-0.26356881856918335,
-0.5817083716392517,
0.9376582503318787,
-0.5803660750389099,
0.19952990114688873,
-0.51723313331604,
0.14878679811954498,
-0.13086602091789246,
-0.0037225978448987007,
-0.017823049798607826,
-0.14343534409999847,
0.09787038713693619,
-0.6001514196395874,
0.4486200213... |
def configure _ interfaces ( self, context, resource _ data ) : self. _ send _ event ( context, resource _ data, gen _ cfg _ const. event _ configure _ interfaces ) | [
-0.8708018660545349,
0.7625178098678589,
0.48671820759773254,
0.10885797441005707,
0.6949605941772461,
0.03266509994864464,
1.101751446723938,
-0.3582004904747009,
-0.055320244282484055,
-0.10776098072528839,
-0.9171227812767029,
-0.09811268746852875,
-0.15809452533721924,
0.60664016008377... |
def forward ( self, sentence1, sentence1 _ len _ old, sentence2, sentence2 _ len _ old, threshold = 0. 5, is _ train = 0 ) : # step1 : embed the words into vectors [ batch _ size x max _ length x emsize ] embedded _ x1 = self. embedding ( sentence1 ) embedded _ y1 = self. embedding ( sentence2 ) # # # # # # # # # # # #... | [
0.3083551824092865,
-0.151748925447464,
0.8020129799842834,
0.6237340569496155,
-0.35918673872947693,
-0.4114348590373993,
0.6310094594955444,
-0.019925711676478386,
-0.1453922688961029,
0.33009907603263855,
-0.4766741394996643,
0.592214047908783,
0.2552103102207184,
0.08478915691375732,
... |
def test _ adjacent _ true ( gr ) : gr. add _ edge ('a ','b') assert gr. adjacent ('a ','b') | [
0.5072034597396851,
0.3993067145347595,
0.5359015464782715,
0.058729372918605804,
0.127324178814888,
1.221962571144104,
-0.01671028509736061,
0.5151494145393372,
-0.6379499435424805,
-0.09872439503669739,
0.4762600064277649,
-0.1356106400489807,
-0.5618008971214294,
-0.06559263169765472,
... |
def w _ ml ( tag, messages ) : if not isinstance ( messages, list ) : raise typeerror for message in messages : if message = = " " : continue w ( tag, message ) | [
0.06523000448942184,
0.14063392579555511,
0.38467562198638916,
0.32274195551872253,
0.7293325066566467,
-0.2641464173793793,
0.4086931347846985,
-0.7044637799263,
-0.47486764192581177,
-0.0058759478852152824,
0.2584267556667328,
-0.20050807297229767,
-0.8278506994247437,
1.8791476488113403... |
def log _ date _ time _ string ( self ) : now = time. time ( ) year, month, day, hh, mm, ss, x, y, z = time. localtime ( now ) s = " % 02d / % 3s / % 04d % 02d : % 02d : % 02d " % ( day, self. monthname [ month ], year, hh, mm, ss ) return s | [
0.14895382523536682,
-1.000369906425476,
1.0090605020523071,
-0.5749403238296509,
-0.326603502035141,
1.2495704889297485,
-1.2695152759552002,
-0.4728807806968689,
-0.45231157541275024,
0.15392164885997772,
-0.11277994513511658,
0.11872714757919312,
-0.13791772723197937,
-0.167125806212425... |
def to _ json ( self ) : def encode _ dict _ data ( record _ data ) : data = dict ( ) for k, v in record _ data. iteritems ( ) : if isinstance ( v, archetypeinstance ) : data [ k ] = v. to _ json ( ) elif isinstance ( v, dict ) : data [ k ] = encode _ dict _ data ( v ) elif isinstance ( v, list ) : data [ k ] = encode ... | [
-0.9258728623390198,
-0.4004954397678375,
0.7996737360954285,
-0.723688006401062,
0.5553930997848511,
-0.6426655650138855,
-0.07516266405582428,
0.36957067251205444,
0.22586171329021454,
-0.03900706768035889,
-1.005618691444397,
1.4314045906066895,
0.4305712580680847,
0.7116910815238953,
... |
def sync ( self ) : print ( text _ type ( self ) ) if not self. to _ be _ synced : return if not list ( self. settings. modules _ settings. values ( ) ) = = [ false, false, false ] : self. add _ modules ( ) # todo : include " other files " folder for child in self : child. sync ( ) | [
-0.6453717947006226,
0.09610943496227264,
0.522032618522644,
0.556553065776825,
1.143293023109436,
0.44936075806617737,
0.3583051562309265,
-1.3278465270996094,
-0.11513938754796982,
0.7149880528450012,
-0.2582738399505615,
0.05930285528302193,
-0.1374129354953766,
0.9579436182975769,
-1... |
def assertvalidjson ( self, response, expected _ status = 200 ) : self. assertequal ( response. status _ code, expected _ status ) try : data = json. loads ( response. content. decode ( " utf - 8 " ) ) except json. jsondecodeerror as exc : self. fail ( msg = f " response content failed to decode : { exc } " ) raise ret... | [
-0.13960056006908417,
-1.2360491752624512,
0.4926310181617737,
-0.6414124965667725,
-0.606782078742981,
0.1963842660188675,
-0.8337178826332092,
-0.1706528216600418,
0.8758785724639893,
-0.010788772255182266,
-0.45634734630584717,
-0.1825738549232483,
-0.4593876302242279,
-0.52933961153030... |
def testwithnormalisedcounts ( self ) : self. traja = trajcorehelp. trajectoryinmemory ( [ self. stepa, self. stepa ] ) expbinobj = self. _ getexpectedbinobjcasea ( ) # note we only increase counts ; not normalised counts expbinobj. binvals [ " counts " ] [ 0 ] [ 0 ] * = 2 expbinobj. binvals [ " counts " ] [ 0 ] [ 1 ] ... | [
0.5016075372695923,
-0.2862720787525177,
0.44741860032081604,
0.8882193565368652,
-0.08250249177217484,
0.4864732027053833,
0.7906820178031921,
0.04197095334529877,
-0.1835745871067047,
-0.721704363822937,
0.23464159667491913,
-0.1639406979084015,
-0.25758954882621765,
0.6947224736213684,
... |
def train _ nn ( sess, epochs, batch _ size, get _ batches _ fn, train _ op, cross _ entropy _ loss, input _ image, correct _ label, keep _ prob, learning _ rate ) : # todo : implement function pass | [
0.04207532852888107,
0.24638117849826813,
0.452995240688324,
1.8535569906234741,
0.5931268334388733,
-1.0408059358596802,
0.11616651713848114,
0.8711127638816833,
-0.18000586330890656,
0.6914992332458496,
-0.7715324759483337,
0.023528100922703743,
0.9672768712043762,
-0.9945915937423706,
... |
def _ _ init _ _ ( self, dictionary, embedding _ index, args ) : super ( selector, self ). _ _ init _ _ ( ) self. config = args self. dictionary = dictionary self. embedding = embeddinglayer ( len ( self. dictionary ), self. config. emsize, self. config. emtraining, self. config ) self. embedding. init _ embedding _ we... | [
-0.1829114556312561,
0.011628110893070698,
0.543839693069458,
-0.6114062666893005,
0.6714069247245789,
0.2861693501472473,
0.2566549479961395,
0.522515594959259,
0.02433321624994278,
0.4322010576725006,
-0.31584471464157104,
-0.38344454765319824,
-0.15224014222621918,
0.6315972805023193,
... |
def test _ get _ bytes _ canonical ( image _ config : imageconfig, image _ config _ signed : imageconfig, json _ bytes _ canonical : bytes, json _ bytes _ signed _ canonical : bytes, ) : assert image _ config. get _ bytes _ canonical ( ) = = json _ bytes _ canonical assert image _ config _ signed. get _ bytes _ canonic... | [
-0.05438270792365074,
-0.14933235943317413,
0.5083199739456177,
0.0711163803935051,
0.3092535734176636,
0.48508381843566895,
0.18300336599349976,
-0.9346054196357727,
0.1330692321062088,
-0.287960946559906,
-0.6240976452827454,
0.554725706577301,
0.31676527857780457,
0.4736870229244232,
... |
def modified _ merge _ sort ( self, a, start, end ) - > int : if start < end : mid = ( start + end ) / / 2 left _ count = self. modified _ merge _ sort ( a, start, mid ) # getting left subcount right _ count = self. modified _ merge _ sort ( a, mid + 1, end ) # getting right subcount return self. modified _ merge ( a, ... | [
-0.18670251965522766,
0.07781298458576202,
0.6424672603607178,
0.14361487329006195,
-0.7284374237060547,
-0.8455343246459961,
-0.03488035500049591,
0.5098225474357605,
0.26657357811927795,
-0.26887238025665283,
-0.10421064496040344,
0.37016627192497253,
-0.6942739486694336,
0.9698978066444... |
def count ( nested _ list : list, target : int ) - > int : total = 0 for element in nested _ list : if type ( element ) is list : total + = count ( element, target ) elif element = = target : total + = 1 return total | [
-0.3696039617061615,
-0.3167920410633087,
0.4856414198875427,
0.9148622751235962,
0.6385514736175537,
-0.10622190684080124,
0.17259971797466278,
0.6484468579292297,
1.0913877487182617,
0.23093466460704803,
-0.8088603615760803,
0.3469162583351135,
0.0688282921910286,
0.6488680839538574,
-... |
def tweet _ dataset _ preprocessor _ 2 ( ) : # import the dataset. slo _ dataset = \ pd. read _ csv ( " tbl - datasets / tbl _ kvlinden. csv ", sep = ", " ) # shuffle the data randomly. slo _ dataset = slo _ dataset. reindex ( pd. np. random. permutation ( slo _ dataset. index ) ) # rename columns to something that mak... | [
0.4852150082588196,
0.11019935458898544,
0.6996659636497498,
-0.5923681855201721,
-0.11466977745294571,
-0.30414488911628723,
0.4393085837364197,
0.553891658782959,
-0.26583078503608704,
0.44490882754325867,
-0.5131672620773315,
0.996836245059967,
0.7582026720046997,
-0.6164488196372986,
... |
def setup ( self ) : self. user1 = user. objects. create ( * * newuser1 ) self. user2 = user. objects. create ( * * newuser2 ) self. skill1 = skill. objects. create ( * * skill1 ) self. skill2 = skill. objects. create ( * * skill2 ) self. skill3 = skill. objects. create ( * * skill3 ) self. user1. skills. add ( self. s... | [
-0.5055162310600281,
0.2551315128803253,
0.6774634718894958,
0.07691463828086853,
0.37708643078804016,
1.2069216966629028,
0.5484462380409241,
-0.14498242735862732,
-0.4156406819820404,
-0.02524711564183235,
-0.6097795963287354,
-1.3207539319992065,
-0.1154368445277214,
-0.5145133137702942... |
def rename ( self, src, dst ) : assert isinstance ( src, unicode ), src assert isinstance ( dst, unicode ), dst if os. path. abspath ( os. path. join ( self. parent. home _ dir,'reboot') ) \! = src and \ os. path. abspath ( os. path. join ( self. parent. home _ dir,'reboot') ) \! = dst : os. rename ( src, dst ) else : ... | [
-0.6274521946907043,
0.012812386266887188,
0.6018073558807373,
1.0292103290557861,
-0.668951153755188,
0.059047259390354156,
0.006334610283374786,
-0.593770444393158,
0.31835058331489563,
0.37965309619903564,
0.06055257096886635,
0.5813026428222656,
-0.1266569197177887,
0.43977752327919006... |
def is _ wrappable ( lit ) : return isinstance ( make _ ast _ from _ literal ( lit ), ast. ast ) | [
-1.1313685178756714,
-0.3085845112800598,
0.4738827049732208,
-0.682686984539032,
-1.597875714302063,
0.6059761643409729,
-0.27079689502716064,
-0.3005731701850891,
1.1286206245422363,
0.6817710995674133,
-0.14759604632854462,
-0.15653444826602936,
-0.06948120146989822,
-0.0961527228355407... |
def show _ overview ( ) : posts = psblog. get _ all _ posts ( ) comments _ num = 0 for p in posts : comments _ num + = len ( p [ " comments " ] ) o = [ html. h ( 2, " overview " ), html. p ( html. a ( "? page = list ", str ( len ( posts ) ) + " posts " ) ), html. p ( html. a ( " # todo ", str ( comments _ num ) + " com... | [
0.8552412986755371,
0.7203980684280396,
1.1541575193405151,
-0.48521479964256287,
-0.6982635259628296,
0.25089937448501587,
0.3237982988357544,
0.23410126566886902,
-0.6782304048538208,
0.12863938510417938,
0.409640908241272,
0.7570525407791138,
0.2240007072687149,
0.5631974339485168,
0.... |
def add _ indirect _ outputs ( self ) : indirect _ outputs _ list = get _ indirect _ outputs _ path ( self. working _ dir ) for name, indirect _ output in read _ files _ list ( indirect _ outputs _ list ). items ( ) : # treat indirect outputs like explicit outputs path = get _ absolute _ path ( indirect _ output ) self... | [
-0.2957436442375183,
-1.1740261316299438,
0.549462080001831,
-0.22204089164733887,
-0.054344259202480316,
0.6839304566383362,
0.6492617130279541,
0.3385603427886963,
-0.9052355289459229,
-0.08984894305467606,
-0.05269351974129677,
0.1175074502825737,
0.7896850109100342,
0.5946699380874634,... |
def configure ( self, opts, ports ) : # check if there's already a conf variablex # if using sparkmonitor, this is defined but is of type sparkconf conf = sparkconf ( ). setmaster ( " k8s : / / https : / / kubernetes : 443 " ) \. setappname ( " notebook " ) \. set ( " spark. executor. memory ", " 1g " ) \. set ( " spar... | [
0.43136706948280334,
0.14943143725395203,
0.9105576276779175,
0.4447614252567291,
0.8785935640335083,
-0.5001882910728455,
-0.15436993539333344,
0.29774588346481323,
0.7813971042633057,
-0.31232431530952454,
-0.5671218037605286,
-0.20393697917461395,
-0.25370699167251587,
0.787783145904541... |
def create _ user ( self, request ) : if user. query ( user. name = = request. user _ name ). get ( ) : raise endpoints. conflictexception ('a user with that name already exists!') user = user ( name = request. user _ name, email = request. email ) user. put ( ) return stringmessage ( message ='user { } created! '. for... | [
-0.720513641834259,
0.18832911550998688,
0.4774545133113861,
0.44842997193336487,
0.577600359916687,
0.3273293673992157,
0.11936619877815247,
-1.0227713584899902,
0.09175354987382889,
-0.2834099233150482,
-0.625659167766571,
-0.601002037525177,
-0.36513668298721313,
-0.5507581233978271,
... |
def segments _ in _ bbox ( bbox, v _ segments, h _ segments ) : lb = ( bbox [ 0 ], bbox [ 1 ] ) rt = ( bbox [ 2 ], bbox [ 3 ] ) v _ s = [ v for v in v _ segments if v [ 1 ] > lb [ 1 ] - 2 and v [ 3 ] < rt [ 1 ] + 2 and lb [ 0 ] - 2 < = v [ 0 ] < = rt [ 0 ] + 2 ] h _ s = [ h for h in h _ segments if h [ 0 ] > lb [ 0 ] -... | [
0.1062953770160675,
-0.9788756966590881,
0.9645508527755737,
0.227602019906044,
0.6228014826774597,
0.4507923722267151,
-0.7554168105125427,
-0.44130939245224,
0.03099595569074154,
0.7308924794197083,
-0.1340392380952835,
0.1803836226463318,
-0.4658438265323639,
-0.4517369866371155,
-0.5... |
def thermoviewer ( mode, inputpath, exportpath, rotation, prefix, frame _ start, frame _ end, exportformat = " csv ", colorpalette = " iron ", meta = " csvfa ", close = true ) : app _ link = " / applications / thermoviewer. app / contents / macos / thermoviewer " if mode = = " file " : calllist = [ app _ link, " - i ",... | [
-0.20736122131347656,
-0.2018100917339325,
0.9270855188369751,
0.0913802832365036,
-0.6722070574760437,
0.26634135842323303,
-0.10413587093353271,
0.32249701023101807,
-0.23099537193775177,
0.041477836668491364,
0.1591336727142334,
0.677706241607666,
-0.3615601062774658,
0.6703976988792419... |
def loglikelihood ( posprob, negprob, x _ test, y _ test ) : n, d = x _ test. shape loglikelihood = np. zeros ( n ) # your code here positive = ( y _ test = = 1 ) negative = ( y _ test = = - 1 ) loglikelihood [ positive ] = x _ test [ positive ] @ np. log ( posprob ) + ( 1 - x _ test [ positive ] ) @ np. log ( 1 - posp... | [
0.7599818706512451,
-1.0245130062103271,
0.5542970299720764,
0.2269558608531952,
0.10271211713552475,
0.7915585041046143,
-1.2575359344482422,
-0.21233084797859192,
0.4309864640235901,
0.032314203679561615,
-0.08397267758846283,
0.1470082402229309,
-0.472339391708374,
-0.2558912932872772,
... |
def setup _ recents ( self, id, region ) : self. log. log ('setting up recent table for \'{ } _ { } \''. format ( region, id ) ) names, types = stat _ list. game _ db _ fields ( ) self. recent _ db. create _ table ('{ } _ { } '. format ( region, id ), names, types, stat _ list. primary _ key ) | [
0.06241753324866295,
0.5893503427505493,
0.4688803553581238,
-1.1134785413742065,
0.9506711363792419,
0.025355810299515724,
-0.09833265841007233,
-0.5627668499946594,
-0.6133007407188416,
0.3988135755062103,
-0.46666136384010315,
-0.21934863924980164,
-0.33572083711624146,
0.44972124695777... |
def compute _ bond _ angle ( position1 : np. ndarray, position2 : np. ndarray, position3 : np. ndarray ) - > float : position2 _ 1 = poistion2 - position1 position3 _ 2 = position3 - position2 bond _ angle = ( np. arccos ( np. dot ( position2 _ 1, position3 _ 2 ) / np. real ( np. sqrt ( np. dot ( position2 _ 1, positio... | [
0.19056184589862823,
-0.6771752834320068,
0.7318771481513977,
0.15700684487819672,
0.368375301361084,
0.978484034538269,
-0.6126176714897156,
1.1561777591705322,
-0.5411533713340759,
1.123299241065979,
0.20418284833431244,
-0.39008864760398865,
-0.911060094833374,
-1.6560609340667725,
0.... |
def flip _ cakes ( cakes, flipper, index ) : return cakes [ : index ] +''. join ( map ( flip _ cake, cakes [ index : index + flipper ] ) ) + cakes [ index + flipper : ] | [
-0.6048702001571655,
-0.030528539791703224,
0.29828476905822754,
-0.060888588428497314,
-1.6790505647659302,
0.8057153224945068,
-0.2572581171989441,
1.0368945598602295,
-0.2526852488517761,
0.690933883190155,
-0.8189218640327454,
0.8672760725021362,
0.3956748843193054,
-0.0475511141121387... |
def _ _ init _ _ ( self, data ) : self. _ demands = data. demands | [
0.05967292934656143,
-0.49801427125930786,
0.3262677490711212,
-0.02648192271590233,
-0.4690914750099182,
0.16917264461517334,
-1.0562862157821655,
-0.6409065127372742,
0.2711775004863739,
-0.8981839418411255,
-0.3741239905357361,
-0.6374536156654358,
0.6560835838317871,
0.1189788952469825... |
def to _ dict ( self ) : result = { } for attr, _ in six. iteritems ( self. swagger _ types ) : value = getattr ( self, attr ) if isinstance ( value, list ) : result [ attr ] = list ( map ( lambda x : x. to _ dict ( ) if hasattr ( x, " to _ dict " ) else x, value ) ) elif hasattr ( value, " to _ dict " ) : result [ att... | [
-0.8508338928222656,
-0.19400116801261902,
0.8766857385635376,
-0.6038662195205688,
-0.8398827910423279,
-0.8113275766372681,
0.3325798809528351,
-0.3786769211292267,
0.058340027928352356,
0.4712701737880707,
-0.7804978489875793,
-0.25131499767303467,
-0.049084946513175964,
0.6267663240432... |
def test _ min _ max _ zoom ( ) - > none : m = sm. sepalmap ( ) zoom _ control = next ( c for c in m. controls if isinstance ( c, sm. zoomcontrol ) ) # click 40 times on plus and then 40 times on minus [ zoom _ control. zoom ( zoom _ control. plus ) for i in range ( 40 ) ] assert m. zoom = = 24 [ zoom _ control. zoom (... | [
0.04603143036365509,
-0.1334046572446823,
0.6070874929428101,
0.5840838551521301,
-0.9098867774009705,
0.2261129468679428,
-0.8956848382949829,
-0.34732070565223694,
1.1958074569702148,
-1.3051255941390991,
-1.1588817834854126,
-0.1199565902352333,
0.11214824765920639,
-0.0453752763569355,... |
def clean _ integer ( num ) : ntmp = num. replace ( '. ','' ) return int ( ntmp ) | [
0.24601612985134125,
-0.009736399166285992,
0.23524148762226105,
-0.5595585703849792,
-0.8064239621162415,
-0.17858776450157166,
0.47104156017303467,
-0.09456221759319305,
-0.07266316562891006,
0.031740643084049225,
-0.26701706647872925,
0.1182340607047081,
-0.9119265079498291,
-0.61622411... |
def process ( user _ input ) : global user _ name normalized _ user _ input = " ". join ( normalize _ and _ tokenize ( user _ input ) ) # clean input # evaluate input against rules for regex, rule in rules. items ( ) : matches = re. match ( regex, normalized _ user _ input, re. ignorecase ) if matches : # formulate eli... | [
-0.18792274594306946,
-0.4080151319503784,
0.6068544387817383,
-0.3848617374897003,
-0.4341394603252411,
-0.3991888761520386,
0.6481335163116455,
-0.05760945752263069,
0.3894382417201996,
0.41430631279945374,
0.10643807053565979,
-0.7298427820205688,
-0.6441149711608887,
-0.170167654752731... |
def pre _ tests _ message ( self ) : # in order to give the tests some context, a pre tests message is displayed # on the testing facade prior to the tests starting. this communicates any # pre - requisites or setup required by the test user. the pre tests message # will vary depending on whether or not unicast dns - s... | [
-0.05698588117957115,
0.8848544359207153,
0.5059630274772644,
0.09945636242628098,
0.2515976130962372,
0.37947043776512146,
1.707585096359253,
-0.47132039070129395,
0.837082028388977,
-0.053697485476732254,
0.08382531255483627,
0.48717066645622253,
-0.965586245059967,
0.6487446427345276,
... |
def get _ target _ alias ( self ) : return self. target _ alias | [
-1.2417140007019043,
-1.355788230895996,
0.6102347373962402,
-0.2239963412284851,
0.8108537793159485,
0.8645782470703125,
-0.02301609143614769,
0.3598002791404724,
-0.42233186960220337,
-0.2605937719345093,
-0.03942245990037918,
1.2845686674118042,
0.6071770191192627,
-0.2552824020385742,
... |
def delete _ scale _ set ( self, name : str, resourceadapterprofile : str ) : config = self. get _ config ( resourceadapterprofile ) session = azuresession ( config = config ) session. compute _ client. virtual _ machine _ scale _ sets. delete ( session. config ['resource _ group'], name ) | [
0.0067442343570292,
-0.052857402712106705,
0.3715952932834625,
0.07365245372056961,
-1.2874184846878052,
0.10274255275726318,
-0.5369393825531006,
-1.1491103172302246,
-0.5784047842025757,
0.6931406855583191,
0.20426249504089355,
0.45709842443466187,
-1.2259962558746338,
-0.012545702047646... |
def _ getcreatefuncname ( interface ) : return'create % s'% _ getshortname ( interface, ['dev'] ) | [
-0.396599680185318,
0.5164145231246948,
0.41079050302505493,
0.05939025804400444,
0.41648054122924805,
-0.22440658509731293,
1.2620162963867188,
-1.2915244102478027,
-0.4349691867828369,
0.26352429389953613,
0.13011440634727478,
-0.4908997714519501,
0.7240686416625977,
0.7111502885818481,
... |
def nextpow2 ( x : int ) - > int : v = 1 while v < x : v = v * 2 return v | [
-0.3709195852279663,
0.1771576851606369,
0.47267013788223267,
0.050787702202796936,
-1.7077933549880981,
0.1450892835855484,
-0.7384306788444519,
-0.6064480543136597,
-0.36112290620803833,
-0.778404712677002,
-1.0731209516525269,
0.3476460576057434,
0.3598586320877075,
0.25203385949134827,... |
def hv _ def ( self, grads, vec ) : grad _ v = [ tf. reduce _ sum ( g * v ) for g, v in zip ( grads, vec ) ] hv = tf. gradients ( grad _ v, self. w, stop _ gradients = vec ) hv = [ hv for hv, v in zip ( hv, vec ) ] return hv | [
-0.4002592861652374,
0.7149478793144226,
0.745485246181488,
0.6634852290153503,
0.666919469833374,
0.6205756068229675,
-0.009622075594961643,
0.1327161192893982,
-0.8908917307853699,
1.161263346672058,
-0.877082109451294,
0.5206372141838074,
0.2950010895729065,
0.7112833857536316,
-0.564... |
def includeme ( config ) : settings = config. get _ settings ( ) store _ url = settings. get ('redis _ store. url ','redis : / / 127. 0. 0. 1 : 6379') store _ prefix = settings. get ('redis _ store. url ','redis _ store') rstore = redisstore ( store _ url, store _ prefix ) rstore [ " paddle _ blue _ v " ] = 0. 0 ; rsto... | [
0.2199864685535431,
1.0098472833633423,
0.5046525597572327,
0.08826537430286407,
-0.1577489674091339,
0.7851271033287048,
-0.28735682368278503,
0.8581377863883972,
1.3046640157699585,
-0.29738786816596985,
-0.3265553116798401,
0.4221731722354889,
-0.5894033908843994,
0.5413525700569153,
... |
def get _ num _ gen ( self, barnobar = none, is _ particle = none, flav _ or _ flavint = none, include _ physical _ fract = true ) : nargs = sum ( [ ( not barnobar is none ), ( not is _ particle is none ), ( not flav _ or _ flavint is none ) ] ) if flav _ or _ flavint is not none : if ( flav _ or _ flavint not in self.... | [
-0.699332058429718,
0.5357974171638489,
0.8793345093727112,
0.5015674233436584,
0.489664226770401,
-0.09926588833332062,
0.6119399070739746,
-0.0809611901640892,
-1.1542792320251465,
-0.9044336676597595,
-0.08851175755262375,
-0.49023163318634033,
-0.6716996431350708,
0.25557079911231995,
... |
def simplify _ modules _ diff ( first, second, fun _ first, fun _ second, var, suffix = none, control _ flow _ only = false, verbose = false ) : stderr = none if not verbose : stderr = open ( os. devnull, " w " ) first _ out _ name = add _ suffix ( first, suffix ) if suffix else first second _ out _ name = add _ suffix... | [
0.3709237277507782,
-0.41345736384391785,
1.1093722581863403,
0.6765949726104736,
0.23317384719848633,
-0.16925159096717834,
0.0788939818739891,
-0.029785528779029846,
0.1434846967458725,
-0.06992856413125992,
-0.9442439675331116,
0.559018611907959,
0.3953423798084259,
0.770228922367096,
... |
def get _ stream _ versions ( self, stream _ name : str ) - > list : return self. rawdata. nosql. get _ stream _ versions ( stream _ name ) | [
-0.15973509848117828,
0.050244469195604324,
0.3861921429634094,
0.611443281173706,
-0.04689769074320793,
0.10509460419416428,
-0.8717061281204224,
-0.9325894713401794,
0.101626455783844,
1.0908989906311035,
-1.3114030361175537,
1.4929213523864746,
0.06532957404851913,
0.6707785725593567,
... |
def median _ absolute _ error ( a, f ) : mae _ result = abs ( a - f ) with warnings. catch _ warnings ( ) : warnings. simplefilter ( " ignore ", category = runtimewarning ) mae _ result = np. nanmedian ( mae _ result, axis = 0 ) return mae _ result | [
0.1338886022567749,
-0.07666844129562378,
0.499417781829834,
0.16855661571025848,
-0.2832389175891876,
0.3427971303462982,
-0.6565491557121277,
0.35858792066574097,
-0.2659895718097687,
0.5374364852905273,
1.5438019037246704,
1.1564464569091797,
0.5326718091964722,
-0.06683676689863205,
... |
def compute _ probs ( self, targ _ seq ) : npos = len ( targ _ seq ) wts = np. zeros ( npos ) for read _ pos in range ( self. max _ offset, npos - self. read _ len ) : if not has _ ambiguity ( targ _ seq, read _ pos - self. max _ offset, self. read _ len + self. max _ offset ) : log _ bias = 0. 0 for j in range ( - sel... | [
-0.34225526452064514,
-0.8701097369194031,
0.6548229455947876,
-1.309666633605957,
-0.04723411053419113,
-0.22170229256153107,
-0.046754397451877594,
1.2295013666152954,
0.3535904288291931,
1.5357035398483276,
0.6699313521385193,
0.17331857979297638,
-0.06263867020606995,
-0.34717547893524... |
def gather _ extension _ files ( root ) : extension _ files = set ( ) for child in os. listdir ( root ) : abs _ path = os. path. join ( root, child ) if os. path. isdir ( abs _ path ) : extension _ files | = gather _ extension _ files ( abs _ path ) elif child. endswith ( ". html " ) : extension _ files. add ( abs _ pa... | [
0.9862297773361206,
0.738639771938324,
1.1736849546432495,
1.23026704788208,
-0.8938097953796387,
-0.49640709161758423,
0.438281387090683,
-0.26037564873695374,
0.6242260336875916,
0.06943139433860779,
-0.233831524848938,
0.41640082001686096,
0.23569588363170624,
1.3968268632888794,
-0.9... |
def current _ user _ following ( self, current _ user _ following ) : self. _ current _ user _ following = current _ user _ following | [
-0.5906522274017334,
-0.5321846604347229,
-0.30064165592193604,
1.356298804283142,
-0.4410156309604645,
1.5862045288085938,
0.6530885100364685,
0.6701297760009766,
-0.49603262543678284,
-0.3140001893043518,
-0.4416384994983673,
-0.7499827146530151,
-0.17613306641578674,
0.07050135731697083... |
def fetchdocuments ( self, locatorobjlist, styletype = " rowwise _ by _ id ", filtertype = " none ", dataselectors = none, slicefilter = none, usenameflag = true, collectionname = none ) : schemadatadictlist = [ ] containernamelist = [ ] rejectlocatorobjlist = [ ] for locator in locatorobjlist : schemadatadictbyid, cnl... | [
-1.1394424438476562,
-0.2795223891735077,
0.5153206586837769,
-0.22125715017318726,
-0.6982399821281433,
0.10737337917089462,
-0.3533814251422882,
0.06846750527620316,
0.7870646715164185,
0.3659476637840271,
-0.6561961770057678,
0.08891092240810394,
0.49009189009666443,
0.8047822713851929,... |
def check ( email, tryallservers = false, returnstateinstring = true ) : state = 0 status = " " message = " " domain = email [ email. find ('@') + 1 : ] # 1. check email is valid using regex regexok = verifyregex ( email ) if not regexok : # 1 has failed, no need to do further checks. return retgenerator ( state, statu... | [
-0.06141887605190277,
0.7956535816192627,
0.9347832202911377,
0.06577137857675552,
-0.5095246434211731,
-0.1251164972782135,
0.11311473697423935,
0.10100292414426804,
-0.11953989416360855,
0.6553036570549011,
-0.5154617428779602,
-0.1512194126844406,
-0.5925474762916565,
-0.225937277078628... |
def random _ unique _ camel ( ) : while true : camel = random _ word ( 2 ). title ( ) + random _ word ( 2 ). title ( ) if not camel in _ random _ unique _ camels : break _ random _ unique _ camels. append ( camel ) return camel | [
-0.851026177406311,
-0.44424980878829956,
0.46078553795814514,
-0.4107896387577057,
-0.35823798179626465,
0.983272135257721,
0.014846699312329292,
-0.5325087308883667,
0.8838425874710083,
-0.5644833445549011,
-0.4644775390625,
0.5614981055259705,
-0.567343533039093,
-0.22720198333263397,
... |
def weather _ unit ( self ) - > float : return self. unit | [
-0.3073602616786957,
-0.2378193736076355,
0.29232850670814514,
-0.2311507612466812,
0.46644699573516846,
1.183978796005249,
0.8906898498535156,
0.5169897675514221,
0.01797769032418728,
-0.8426188230514526,
0.08446072041988373,
0.5892300009727478,
-0.535322904586792,
-0.07517825067043304,
... |
def pop ( self ) : i = self. _ index. pop ( ) v = self. _ value. pop ( ) return i, v | [
-1.177965760231018,
-0.5054232478141785,
0.8136842250823975,
-0.6462066173553467,
-0.5346314311027527,
0.09948346018791199,
0.5731552243232727,
-0.08511196076869965,
-0.561837911605835,
0.9127939939498901,
-0.3423922657966614,
0.09715966880321503,
-0.36159655451774597,
-1.3284703493118286,... |
def _ _ init _ _ ( self, receiver : receiver, a : str, b : str ) - > none : self. _ receiver = receiver self. _ a = a self. _ b = b | [
-0.20984508097171783,
-0.5904445052146912,
0.4087737202644348,
-1.1718844175338745,
-0.15004128217697144,
-0.8064384460449219,
-0.4786503314971924,
0.22727584838867188,
0.15617094933986664,
-0.4857783019542694,
0.08145559579133987,
0.3012569844722748,
0.5309352278709412,
-0.324347317218780... |
def _ _ init _ _ ( self, * args, * * kwargs ) : template _ choices = kwargs. pop ('template _ choices ', [ ] ) super ( ). _ _ init _ _ ( * args, * * kwargs ) templates = template. get _ form _ choices ( template _ choices ) if templates : self. fields ['template']. choices = templates else : self. fields ['template']. ... | [
-0.5740660429000854,
0.48107972741127014,
0.5566380023956299,
-0.2684876620769501,
0.35453352332115173,
-0.3783242404460907,
-0.5296016931533813,
0.46274998784065247,
0.11984740197658539,
-0.0014523104764521122,
-0.8620876669883728,
-0.23450739681720734,
0.221269428730011,
0.85085833072662... |
def _ _ init _ _ ( self, ns ) : # plugin sources are specified, so when the plugin is loaded it will not # try and discover an index. js next to this file. # self. script _ src = s # as script _ src is specified, a path is not necessary. this is simply an # example of an alternate method to load a frida script self. sc... | [
0.5742146372795105,
0.32642287015914917,
0.489121675491333,
-0.2729184329509735,
0.006466014310717583,
-1.0541375875473022,
0.33231067657470703,
-0.3101872503757477,
0.6530580520629883,
-0.34274259209632874,
-0.6620962023735046,
0.2391812652349472,
0.7549061179161072,
0.6900222897529602,
... |
def _ parse _ line ( self, bline, parse _ ext = true ) : cols = bline. replace ('\ n ','' ). split ( ',') utc = self. _ adjust _ time ( int ( cols [ 0 ] ) ) cols = np. array ( cols ). astype ( float ) basic = self. _ basic _ cols ( cols ) ext = none if parse _ ext and basic is not none : ext = self. _ ext _ cols ( cols... | [
0.17365306615829468,
0.23674656450748444,
0.7455076575279236,
0.22672097384929657,
0.2411677986383438,
-0.7248361706733704,
-1.186121940612793,
0.36343222856521606,
-0.919903039932251,
0.7230802774429321,
-0.658819854259491,
-0.3848300278186798,
-0.257839173078537,
-0.6715725064277649,
0... |
def main ( ) : for filename in find _ snowball _ sources ( ) : print filename make _ algorithm ( filename ) | [
0.6956475377082825,
0.7255525588989258,
0.3573921024799347,
0.51121985912323,
0.2008827030658722,
0.8200240731239319,
1.5298500061035156,
0.2863444685935974,
-0.7051886916160583,
0.6989806294441223,
-0.6962266564369202,
0.06743084639310837,
0.4804665148258209,
0.4038272798061371,
-0.1527... |
def _ _ eq _ _ ( self, other ) : if not isinstance ( other, createkeypairaction ) : return false return self. _ _ dict _ _ = = other. _ _ dict _ _ | [
-1.0411851406097412,
-0.44367432594299316,
0.6714892387390137,
0.22715356945991516,
-0.18994444608688354,
0.3114405572414398,
0.1381368786096573,
-0.9608813524246216,
0.859583854675293,
0.6136653423309326,
-0.7750338912010193,
-0.17707088589668274,
-0.4819677174091339,
0.023136474192142487... |
def find _ timestamp ( self, text = none ) : # pylint : disable = no - self - use timestamp = none if not text is none : timestamp = self. extract _ timestamp ( text ) if timestamp is none and not self. dataset _ metadata is none : if'name'in self. dataset _ metadata : timestamp = self. extract _ timestamp ( self. data... | [
0.2132253348827362,
0.469869464635849,
0.6269872188568115,
-0.08489387482404709,
0.17014525830745697,
-0.16720741987228394,
-0.22411294281482697,
0.06909041106700897,
0.026196591556072235,
0.7846288084983826,
0.628688633441925,
-0.5913705825805664,
-0.4570038914680481,
0.5451770424842834,
... |
def filterwordembedding ( inputfilepath, s _ filterwords, outputfilepath ) : keptwords = [ ] with open ( inputfilepath,'r ', encoding = " utf8 " ) as f1, open ( outputfilepath,'w ', encoding = " utf8 " ) as f2 : for line in f1 : word = line. split ( ) [ 0 ] if word in s _ filterwords : f2. write ( line ) keptwords. app... | [
0.8527320027351379,
-0.5119280219078064,
0.7041175961494446,
1.1076414585113525,
-0.6462026834487915,
0.5847782492637634,
0.5340707898139954,
0.46009233593940735,
-0.4147535562515259,
1.2658360004425049,
-0.41339045763015747,
0.4172338545322418,
-0.7426920533180237,
0.31444355845451355,
... |
def test _ delete ( self ) : risk = factories. riskfactory ( ) url = " / api / risks / % s " % risk. id response = self. api. delete ( url ) self. assert403 ( response ) risk = all _ models. risk. query. get ( risk. id ) self. assertisnotnone ( risk ) | [
0.5425350069999695,
0.25951075553894043,
0.4577031135559082,
-0.10219095647335052,
1.7793937921524048,
0.36266693472862244,
-0.615817129611969,
-0.10143236815929413,
0.5420742034912109,
-0.24694053828716278,
-0.46408820152282715,
-0.15212731063365936,
-0.43460381031036377,
-0.6993705630302... |
def get _ stream ( self, stream _ name : str, version : str = " all ", user _ id : str = none, data _ type = dataset. complete ) - > datastream : if user _ id : version = " latest " return self. rawdata. get _ stream ( stream _ name = stream _ name, version = version, user _ id = user _ id, data _ type = data _ type ) | [
-0.11669132113456726,
-0.06751196831464767,
0.37516263127326965,
0.9618316888809204,
-0.543635904788971,
-0.24862919747829437,
-1.0220632553100586,
-0.09803051501512527,
0.024107802659273148,
-0.4793349504470825,
-0.5572826266288757,
1.640222191810608,
0.060767363756895065,
0.1656198650598... |
def test _ 503 _ kruskal _ matched _ single _ argument ( self ) : np. random. seed ( 987654321 ) x _ parms = [ 1. 7 ] x _ input _ array = st. weibull _ min. rvs ( * x _ parms, size = 100 ) a = 0. 05 self. assertraises ( nodataerror, lambda : kruskal ( x _ input _ array, alpha = a, display = false ). p _ value ) | [
-0.25479599833488464,
0.5129991769790649,
0.31382694840431213,
-0.5125898718833923,
-0.27861109375953674,
0.9281676411628723,
0.6357665657997131,
-0.04035076126456261,
0.4431925415992737,
0.036846861243247986,
0.044970087707042694,
0.25643032789230347,
-0.18679705262184143,
1.3912944793701... |
def in _ process _ executor ( init _ context ) : return _ core _ in _ process _ executor _ creation ( init _ context. executor _ config ) | [
0.8493674397468567,
-0.702915608882904,
0.35699862241744995,
0.005492101889103651,
0.26980188488960266,
-0.5751381516456604,
-0.37390440702438354,
0.24336259067058563,
-0.1305387318134308,
-0.31142154335975647,
0.2929462790489197,
0.751521110534668,
-0.5331472754478455,
-0.0259201079607009... |
def organize _ files _ by _ pk ( sender, instance, created, * * kwargs ) : # todo : not tested with more than one ancestor for field in instance. _ meta. fields : if type ( field ) in [ models. filefield, models. imagefield ] : instance _ field = getattr ( instance, field. name ) try : source _ path = instance _ field.... | [
-0.12303836643695831,
-0.07622270286083221,
0.9411718249320984,
-0.6385646462440491,
-0.21388201415538788,
0.3613314628601074,
1.457775354385376,
0.037095874547958374,
-0.3905956745147705,
0.6239464282989502,
-0.5975483059883118,
-0.724615216255188,
0.4455384612083435,
0.4552691876888275,
... |
def _ rows _ check _ key ( by : stringoriter, x : dataframe, y : dataframe ) - > list [ str ] : if by is none : by = y. columns [ 0 ] logger. info ( " matching, by = % r ", by ) if is _ scalar ( by ) : by = [ by ] # type : ignore for by _ elem in by : if not isinstance ( by _ elem, str ) : raise valueerror ( " ` by ` m... | [
-0.24420426785945892,
0.5910293459892273,
0.5383983254432678,
0.6077536344528198,
0.24535323679447174,
-0.9837260246276855,
-0.3093757927417755,
0.13224178552627563,
-0.4068339765071869,
0.9977499842643738,
0.6814507246017456,
0.28237324953079224,
-0.007272550370544195,
0.5207296013832092,... |
def qfillup ( self ) : for q in self. qlst : compt = [ ] compoft = [ ] for qn in q. comp : compt. append ( self. qsearch ( qn ) ) for qn in q. compof : compoft. append ( self. qsearch ( qn ) ) q. comp = compt [ : ] q. compof = compoft [ : ] | [
-0.48906946182250977,
-0.7078395485877991,
0.34747594594955444,
-0.7251144647598267,
0.47217267751693726,
0.9272350072860718,
0.35549014806747437,
-0.21874192357063293,
0.49523523449897766,
-0.333221435546875,
-0.5438784956932068,
-0.17697837948799133,
-0.2673676013946533,
0.95030087232589... |
def div ( self, input1, input2 ) : a, b = self. _ _ parseinput ( input1, input2 ) c = bin ( int ( a, 2 ) / / int ( b, 2 ) ) if c [ 0 ] = ='-': return c [ 3 : ] else : return c [ 2 : ] | [
-0.4575325846672058,
0.2290765345096588,
0.801242470741272,
1.228231430053711,
-0.1811794936656952,
0.6319966316223145,
-0.5434337258338928,
-0.7925893664360046,
-0.8206304907798767,
-0.6989760994911194,
-0.2011941373348236,
0.7180010080337524,
-0.4667375385761261,
-0.24031268060207367,
... |
def post _ individual _ v2 ( seg _ img ) : # notes : # upgrade from v1 ( hopefully? ). we dilute the patches a lot more before doing canny detection # not good # move back to v1 but don't perform dilution.. # okay i like this.... seg _ cp = np. copy ( seg _ img ) # gaus = cv2. gaussianblur ( seg _ cp, ( 5, 5 ), 0 ) med... | [
-0.23894968628883362,
-1.2241606712341309,
0.5511093735694885,
0.3291180431842804,
-0.12978482246398926,
0.6028143763542175,
0.16119112074375153,
0.3208482265472412,
0.46831557154655457,
0.054801683872938156,
0.06744851917028427,
0.47186848521232605,
0.3283922076225281,
0.01523033715784549... |
def rmspe ( y, yhat ) : # assume that y > 0 is fulfilled return np. sqrt ( np. mean ( ( yhat / y - 1 ) * * 2 ) ) | [
0.45299822092056274,
-0.4737595319747925,
0.5148985981941223,
0.02281740866601467,
0.28552210330963135,
0.13314490020275116,
-0.7805637121200562,
-0.25571081042289734,
0.05253039300441742,
1.0064045190811157,
-0.20498940348625183,
-0.18342134356498718,
-0.5362181067466736,
1.18024301528930... |
def cellfeatureevolution ( self, root _ cell : cell _ t, feature : str ) - > list : if self. tracking is none : raise runtimeerror ( " tracking - related function called before tracking " ) # self. segm _ channel is necessarily not none evolution = [ ] track = self. tracking. trackcontainingcell ( root _ cell ) # call ... | [
-0.23596054315567017,
0.4458131790161133,
0.49889782071113586,
1.2443962097167969,
0.39265450835227966,
-0.6679971814155579,
-0.08005111664533615,
0.27946561574935913,
-0.6982066035270691,
0.9279643893241882,
-0.6376525163650513,
0.006845403462648392,
0.16812516748905182,
0.574659407138824... |
def add _ result ( self, result : str ) : if result = ='win': self. _ wins + = 1 elif result = ='lose': self. _ losses + = 1 | [
-1.3943581581115723,
0.28121474385261536,
0.6474167108535767,
-0.3167160749435425,
-0.19338369369506836,
-0.4039473533630371,
0.090983085334301,
-0.6797487735748291,
0.5099318027496338,
-0.6893730163574219,
-1.2020113468170166,
-0.3519129455089569,
-0.05655200779438019,
-0.149948850274086,... |
def new ( * args, * * kargs ) : obj = itksmoothingrecursivegaussianimagefilteriul2iul2. _ _ new _ orig _ _ ( ) import itktemplate itktemplate. new ( obj, * args, * * kargs ) return obj | [
0.0053888605907559395,
-0.038740772753953934,
0.16082452237606049,
-0.015508920885622501,
-1.4899238348007202,
0.34992581605911255,
0.178414449095726,
0.05709593743085861,
-0.5417888164520264,
-0.6787503361701965,
-0.6287092566490173,
0.7356886267662048,
0.6371537446975708,
0.5270470976829... |
def balance _ of ( self, owner = none ) : if owner = = none : owner = self. contract. account return call ( self. contract. balance _ of ( owner ) ) | [
-0.27017807960510254,
0.6728540658950806,
0.5283171534538269,
1.1183886528015137,
0.40482422709465027,
-1.047518253326416,
-0.14538727700710297,
-1.0413068532943726,
0.9616388082504272,
-0.5638149976730347,
0.4226246774196625,
0.2872724235057831,
-0.015218756161630154,
-0.09453635662794113... |
def plot _ inv _ para ( fo, ts, param, low _ limit = 1e - 10, save = false, sfile = " " ) : atom _ grid = np. zeros ( ( 113, 173 ) ) for nuc in fo. timestep _ data [ ts - 1 ]. inventory : if nuc [ 0 ] [ - 1 ] = = " n " : nuc [ 0 ] = nuc [ 0 ] [ : - 1 ] a = nucname. anum ( nuc [ 0 ] ) z = nucname. znum ( nuc [ 0 ] ) n =... | [
-0.3748394548892975,
0.6471846103668213,
0.7406777143478394,
-0.8147962689399719,
0.35499340295791626,
-0.2528627812862396,
0.09217864274978638,
0.559582531452179,
-0.24045433104038239,
0.5703228116035461,
-0.3678399622440338,
1.217634677886963,
0.246419295668602,
-0.6914157867431641,
0.... |
def is _ solved ( self ) : return self. from _ grid = = self. to _ grid | [
-0.6091187596321106,
-0.26589465141296387,
0.5828987956047058,
0.6270387768745422,
0.9762008190155029,
-0.4530407190322876,
-0.11320612579584122,
-0.6538413763046265,
0.008172341622412205,
-0.07983721792697906,
-0.8426905870437622,
0.27449268102645874,
0.15269620716571808,
-0.4410294890403... |
def testupdatevaluesforquerieswithemptyqueryresults ( self ) : securetagapi ( self. user ). create ( [ ( u'username / bar ', u'description') ] ) objectid = uuid4 ( ) # fixme replace this with securetagvalueapi once the index is # integrated values = { objectid : { u'username / bar': 42 } } valuesapi = securetagvalueapi... | [
-0.4213409721851349,
0.18354946374893188,
0.3515755236148834,
-0.34514525532722473,
0.5538377165794373,
0.5965526103973389,
-0.14442120492458344,
-0.45228680968284607,
-0.10449597239494324,
-0.8587438464164734,
-0.6989362239837646,
-0.3044324517250061,
-0.06196020171046257,
-0.016377722844... |
def change _ cow _ direction ( cow ) : cow. x _ direction = random. randint ( - 1, 1 ) cow. y _ direction = random. randint ( - 1, 1 ) | [
-1.4437872171401978,
-0.3146906793117523,
0.5228874683380127,
0.2005426287651062,
0.1689603477716446,
0.3209863007068634,
0.9165284037590027,
-0.5866664052009583,
0.09477011859416962,
0.0829756036400795,
-1.3936119079589844,
0.9300751686096191,
0.8451888561248779,
0.9053950309753418,
0.8... |
def key _ protection ( self, key _ protection ) : self. _ key _ protection = key _ protection | [
-0.30252450704574585,
0.982556939125061,
-0.04439086839556694,
1.1231067180633545,
-0.9454472064971924,
0.16284286975860596,
-0.5889843106269836,
0.2540576159954071,
-0.44985753297805786,
0.6784418225288391,
-0.9098861813545227,
-1.7816447019577026,
-0.8851158618927002,
-0.6981971859931946... |
def compute _ newton _ step ( self, x, y, x _ batch, y _ batch, x _ batch2, y _ batch2 ) : q = [ ] deltas = [ ] gammas = [ ] grad _ vals = self. sess. run ( self. grads, feed _ dict = { x : x _ batch, y : y _ batch } ) t = grad _ vals q _ prev = [ np. zeros ( t. shape ) for t in t ] for i in range ( self. lanczos _ max... | [
0.5009570717811584,
-0.5075564980506897,
0.774519145488739,
0.39883267879486084,
-0.1628130078315735,
0.236270472407341,
-0.6020790338516235,
-0.015548963099718094,
-0.9391516447067261,
0.2742641568183899,
-0.9314696788787842,
0.44325190782546997,
0.25748422741889954,
0.27352699637413025,
... |
def vocabcoursesubject ( self ) : return subject _ credit | [
0.9180926084518433,
-0.03775453567504883,
0.37705880403518677,
-0.4373314082622528,
-0.23477375507354736,
0.8685713410377502,
-0.3442467749118805,
-1.1990593671798706,
0.8020687699317932,
0.39771515130996704,
0.4537213146686554,
0.7734237909317017,
-0.40755558013916016,
-0.4562956094741821... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.