text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def compute _ total _ distance ( road _ map ) : total _ distance = 0 for i in range ( len ( road _ map ) - 1 ) : delta _ lat = road _ map [ i + 1 ] [ 2 ] - road _ map [ i ] [ 2 ] delta _ long = road _ map [ i + 1 ] [ 3 ] - road _ map [ i ] [ 3 ] distance = math. sqrt ( delta _ lat * * 2 + delta _ long * * 2 ) total _ d... | [
-0.36344558000564575,
-0.7383249402046204,
0.798796534538269,
-0.5969201922416687,
0.6418720483779907,
0.1087161973118782,
0.36981847882270813,
0.013713128864765167,
-0.18817894160747528,
0.5771794319152832,
-0.29511702060699463,
-0.6539531946182251,
-1.2403169870376587,
-0.237657696008682... |
def getoxygen ( self, amount ) : return self. getsupply ( amount ) | [
-0.4846430718898773,
0.7935240268707275,
0.3616918623447418,
-0.10953953117132187,
-0.25432631373405457,
-1.1588622331619263,
-0.40822428464889526,
-1.336154580116272,
0.06286606192588806,
-0.4126453399658203,
-0.09278382360935211,
-0.7027929425239563,
-0.2550664246082306,
-0.3889255523681... |
def update _ name ( name, mapping ) : m = street _ type _ re. search ( name ) not _ good _ type = m. group ( ) try : name = name. replace ( not _ good _ type, mapping [ not _ good _ type ] ) return name except : return false | [
-1.1537251472473145,
-0.25704026222229004,
0.7662097215652466,
-0.1336713284254074,
-1.2042253017425537,
0.6039736270904541,
-0.6233932971954346,
0.09968703240156174,
-0.17928150296211243,
1.0197418928146362,
-0.30722135305404663,
-0.3855096399784088,
-0.9611647725105286,
-0.15825834870338... |
def insert _ sort ( num _ list ) : for i in range ( 1, len ( num _ list ) ) : for j in range ( i, 0, - 1 ) : if num _ list [ j ] < num _ list [ j - 1 ] : # if the previous number num _ list [ j - 1 ] is larger, swap the two temp = num _ list [ j ] num _ list [ j ] = num _ list [ j - 1 ] num _ list [ j - 1 ] = temp retu... | [
-0.3822188675403595,
0.6524289846420288,
0.5320786237716675,
0.43761375546455383,
0.08706226199865341,
0.2811813950538635,
1.052208662033081,
0.2615530490875244,
0.1638190746307373,
0.2678007185459137,
-1.1780638694763184,
0.14823953807353973,
-1.3934640884399414,
1.0005192756652832,
-0.... |
def test _ l2 _ metric _ log _ and _ exp ( self ) : tangent _ vec = self. l2 _ metric _ s2. log ( point = self. curve _ b, base _ point = self. curve _ a ) result = self. l2 _ metric _ s2. exp ( tangent _ vec = tangent _ vec, base _ point = self. curve _ a ) expected = self. curve _ b self. assertallclose ( result, exp... | [
1.3074012994766235,
-1.1237847805023193,
0.38963446021080017,
0.12455236911773682,
-0.030864663422107697,
1.0352299213409424,
-0.03496913984417915,
-0.33668094873428345,
-0.5434396266937256,
-0.5345253348350525,
0.220690056681633,
0.6563282608985901,
0.4670616388320923,
-0.4106709957122803... |
def process ( self, frame ) : self. _ handler ( frame ) | [
0.1289679855108261,
0.05131525918841362,
0.14928852021694183,
-0.21310046315193176,
0.3679046630859375,
-0.003953051753342152,
0.4593779742717743,
-0.10494227707386017,
0.3549358546733856,
-1.2035192251205444,
-0.960396945476532,
0.44661471247673035,
0.5070464015007019,
0.6292036175727844,... |
def loader _ cc ( data ) : if isinstance ( data, list ) : with namedtemporaryfile ('w + t ', suffix = '. cpp') as f : f. write ('\ n '. join ( data ) ) f. seek ( 0 ) index = cc. index. create ( ) tu = index. parse ( f. name ) else : index = cc. index. create ( ) tu = index. parse ( data ) return packer _ cc ( tu. curso... | [
0.7433383464813232,
-0.2501016855239868,
0.352639764547348,
0.268413782119751,
-1.0709587335586548,
0.02616494707763195,
-0.12349270284175873,
-0.15953804552555084,
0.3380022346973419,
0.429496169090271,
-0.06974967569112778,
-0.6722159385681152,
-0.4985978305339813,
-0.06703083217144012,
... |
def longpoll _ open ( self, timeout ) : # type : ( float ) - > str poll _ end = time. time ( ) + timeout with self. state _ cond : while not self. _ should _ open ( ) and time. time ( ) < = poll _ end : self. state _ cond. wait ( timeout = poll _ end - time. time ( ) ) if self. _ should _ open ( ) : if self. state = = ... | [
-1.149113416671753,
0.16000577807426453,
0.6925345063209534,
-0.626159131526947,
-0.9305969476699829,
1.3523043394088745,
-0.685117244720459,
0.5144593119621277,
0.37739062309265137,
0.939378559589386,
0.7589906454086304,
-0.4660915732383728,
0.01750013418495655,
-0.5299652218818665,
-0.... |
def createoperationsdocument ( documentstatus, messagetype, documentid, \ statusexplanation, xml, documenttype, \ settlementorconfirmation ) : document = none try : document = acm. foperationsdocument ( ) document. status ( documentstatus ) document. documentid ( documentid ) document. statusexplanation ( statusexplana... | [
0.2707487642765045,
0.6227027177810669,
0.6830742955207825,
-0.16242912411689758,
-0.8101159334182739,
-0.6597705483436584,
0.09086883068084717,
-0.5917357206344604,
0.3085756003856659,
-0.10595282912254333,
1.135027527809143,
-1.0859800577163696,
-0.12646719813346863,
0.22891837358474731,... |
def get _ total _ entries ( self ) : return self. get _ classified _ finish ( ) + self. get _ total _ dnf ( ) | [
-0.7703378796577454,
-0.11184117197990417,
0.5641332864761353,
-0.22905538976192474,
0.8683235049247742,
0.007253281772136688,
0.19507071375846863,
-0.11629538238048553,
-0.7008780241012573,
0.19568631052970886,
-0.509620189666748,
0.7118581533432007,
0.13602441549301147,
0.88236403465271,... |
def chance _ homophily ( chars ) : marginal _ probs = marginal _ prob ( chars ) return np. sum ( np. square ( list ( marginal _ probs. values ( ) ) ) ) | [
0.36808449029922485,
-0.8764601349830627,
0.44289979338645935,
-0.09742742776870728,
0.00967374537140131,
0.2700212001800537,
0.3004961907863617,
0.5898362994194031,
0.001256532035768032,
0.28672119975090027,
0.30604082345962524,
0.7493402361869812,
-1.1139473915100098,
-0.8446829319000244... |
def delete _ list _ item ( list _ id, id ) : # make sure the user is logged in if check _ if _ user _ logged _ in ( ) : user _ email = session ['user _ email'] # remove list item from dictionary try : # find list with item to delete mylist = shopping _ list _ app. get _ shopping _ list ( list _ id, user _ email ) # rem... | [
-0.5172470808029175,
-0.16446158289909363,
0.29976099729537964,
0.7670989036560059,
0.1856909692287445,
0.49291297793388367,
-0.24256795644760132,
1.199910283088684,
1.457108497619629,
0.11426753550767899,
-0.5193266272544861,
-0.25851258635520935,
-0.15230579674243927,
0.68401038646698,
... |
def status _ unfavourite ( self, id : union [ status, idtype ] ) - > status : id = self. _ _ unpack _ id ( id ) return self. _ _ api _ request ('post ', f'/ api / v1 / statuses / { id } / unfavourite') | [
-0.9377953410148621,
0.24994048476219177,
0.14356860518455505,
-0.029763607308268547,
-0.7194745540618896,
-0.2696707248687744,
-0.813636302947998,
0.17259979248046875,
0.24231144785881042,
0.24654245376586914,
-0.8069899082183838,
0.8844493627548218,
-0.4729193449020386,
-0.76002824306488... |
def distinguish _ mip _ infeasible _ or _ unbounded ( m, config ) : tmp _ args = deepcopy ( config. mip _ solver _ args ) if config. mip _ solver = ='gurobi': # this solver option is specific to gurobi. tmp _ args ['options'] = tmp _ args. get ('options ', { } ) tmp _ args ['options'] ['dualreductions'] = 0 mipopt = so... | [
-0.3335968255996704,
-0.23559768497943878,
0.6445939540863037,
0.28452828526496887,
0.1797408163547516,
0.04868817329406738,
-0.20869950950145721,
-0.12891000509262085,
0.4640437960624695,
0.10822676122188568,
-0.3247138559818268,
-0.07589806616306305,
-1.013150930404663,
0.384325861930847... |
def copy _ exception ( exc, backend = none ) : backend = backend or exc. backend new = exc. _ _ class _ _ ( * exc. args, tried = exc. tried, backend = backend, chain = exc. chain ) if hasattr ( exc,'template _ debug') : new. template _ debug = exc. template _ debug return new | [
0.7528836727142334,
-0.7312340140342712,
0.6440620422363281,
0.22118443250656128,
-0.7433869242668152,
-0.35503828525543213,
-0.21055229008197784,
0.09707636386156082,
1.0623122453689575,
0.587006688117981,
-0.2365283966064453,
0.6433641314506531,
-0.034939706325531006,
-0.2485558986663818... |
def get _ complete _ command _ paths ( self ) - > list [ str ] : return [ self. base _ command + " " + command for command in self. all _ commands ] | [
-0.11668109893798828,
-1.0983431339263916,
0.8131760358810425,
1.741981863975525,
1.2627146244049072,
0.3459998071193695,
-0.10049255192279816,
0.15171656012535095,
0.03008981980383396,
-0.07568152993917465,
0.035053372383117676,
-0.5528818964958191,
-0.09812622517347336,
1.217045307159423... |
def deal ( self ) : res = self. cards. pop ( ) return res | [
-0.28423872590065,
-0.1261928826570511,
0.5940293669700623,
-0.778810441493988,
0.3046988248825073,
-0.286894291639328,
-0.5396595001220703,
0.21011395752429962,
-0.08594854921102524,
0.015066669322550297,
-0.2375926971435547,
-0.6838675141334534,
-1.4280767440795898,
-1.4767487049102783,
... |
def analyze _ state ( self, ind, time, state ) : if self. store _ states : self. states. append ( state. copy ( ) ) if self. print _ final : if ind % self. final _ every = = 0 : self. print _ final _ state ( state ) print _ basic ( " last state printed : % d, %. 8f " % ( ind, time ) ) if self. print _ states : if ind %... | [
-0.5820542573928833,
-0.16688577830791473,
0.7842567563056946,
0.24147185683250427,
0.1210804209113121,
-0.27721309661865234,
0.6952393054962158,
-0.4006803631782532,
0.06109628081321716,
-0.32811421155929565,
1.0191775560379028,
-0.12779808044433594,
0.5576410889625549,
0.7706315517425537... |
def command _ line _ parser ( ) : parser = argparse. argumentparser ( ) parser. add _ argument ( " - a ", " - - assertz ", type = str, help = " assertions file " ) parser. add _ argument ( " - q ", " - - queries ", type = str, default = " - ", help = " queries file, - to read from stdin " ) parser. add _ argument ( " -... | [
0.6868024468421936,
-1.2139500379562378,
0.7860798239707947,
-0.8788114190101624,
-0.23078231513500214,
0.5505965352058411,
-0.15319915115833282,
-0.2735223174095154,
-0.5119261145591736,
0.352673202753067,
0.05479030683636665,
-0.20205561816692352,
-0.4796123206615448,
0.7335028648376465,... |
def save _ call ( command ) : ex _ code = subprocess. call ( shlex. split ( command ) ) if ex _ code! = 0 : sys. exit ( ex _ code ) | [
0.4568074941635132,
0.5741761922836304,
0.7823653221130371,
0.5184357762336731,
0.32257288694381714,
1.1217584609985352,
-0.9107146263122559,
-0.024376392364501953,
0.17629112303256989,
0.621397078037262,
-0.4497447907924652,
0.08170885592699051,
-0.8916271924972534,
0.6212685704231262,
... |
def return _ mean _ energies ( * args ) : df1v20 _ x, df2v20 _ x = extract. extract _ def ( args [ 0 ] ) df1v20 _ y, df2v20 _ y = extract. extract _ def ( args [ 1 ] ) df1v20 _ z, df2v20 _ z = extract. extract _ def ( args [ 2 ] ) df1v20 _ x2, df2v20 _ x2 = extract. extract _ def ( args [ 3 ] ) df1v20 _ y2, df2v20 _ y2... | [
-0.09254325181245804,
0.06685575842857361,
1.0152294635772705,
-0.45494338870048523,
0.4944343864917755,
-0.12958075106143951,
0.622735857963562,
0.3218795359134674,
-0.7936941981315613,
0.6138986945152283,
-0.4269540309906006,
-0.0194153543561697,
-0.22141152620315552,
-0.3681840002536773... |
def _ download _ file ( self, fname, update ) : destination = path ( self. abspath, fname ) source = " ". join ( [ self. base _ url, fname ] ) if update : action = " updating " else : action = " downloading " warn ( " { } data file'{ }'from remote data store'{ }'to'{ } '. ". format ( action, fname, self. base _ url, st... | [
0.6572257280349731,
0.28824663162231445,
0.6907883882522583,
-0.038994200527668,
-0.26466578245162964,
0.34210914373397827,
0.037955764681100845,
0.4308461546897888,
-0.4261936843395233,
0.1770029515028,
-0.015053010545670986,
-0.3739694356918335,
0.25554633140563965,
-0.35003456473350525,... |
def set _ null _ as _ 0 ( cursor, column, schema ='clean ', table ='absence') : sqlcmd = " " " update { schema }. { table } set { column } = 0 where { column } is null ; " " ". format ( schema = schema, table = table, column = column ) cursor. execute ( sqlcmd ) return none | [
0.4257747232913971,
-0.9432674646377563,
0.5092909932136536,
0.24750544130802155,
-0.321675181388855,
-0.18772540986537933,
-0.1687108725309372,
0.3734348714351654,
0.009537567384541035,
0.8094000816345215,
-0.30153888463974,
0.9741072058677673,
-0.21839764714241028,
0.3776546120643616,
... |
def analyze ( path _ to _ yml _ file, use _ gsheet = false, upload _ source _ metrics = false ) : config, exp, path _ to _ yml _ file = load _ experiment ( path _ to _ yml _ file ) paths = glob. glob ( os. path. join ( config ['info'] ['output _ folder'],'results ','* *. yml'), recursive = true ) results = [ ] for _ pa... | [
-0.3687998950481415,
0.8364431262016296,
0.7366740703582764,
-0.1987798660993576,
0.4120814800262451,
-0.28588905930519104,
0.9304398894309998,
-0.02557620406150818,
-0.9872546792030334,
0.5285436511039734,
-0.02303100749850273,
0.053313735872507095,
0.270628958940506,
0.9290170669555664,
... |
def parsedbserror ( data ) : elem = " " try : elem = et. fromstring ( data ) except : print " \ n # # # parsedbserror ", data traceback. print _ exc ( ) sys. _ _ stdout _ _. flush ( ) data = data. replace ( " < ", " & lt ; " ). replace ( " > ", " & gt ; " ) msg = " fail to parse dbs xml, please see server log \ n " + d... | [
-0.13522832095623016,
0.3688485622406006,
0.7205899953842163,
-0.7189080715179443,
-0.5394385457038879,
0.002787564182654023,
-0.38880181312561035,
-0.13627029955387115,
0.34587451815605164,
-0.14406010508537292,
0.054305605590343475,
-0.042929425835609436,
-1.045807123184204,
0.1852435767... |
def freq _ plot ( nfreqs, spectrum, freq _ step, max _ freq, title = none, logdb = false, fmin = 0. 0, fmax = 10000. 0, ylo = - 60. 0, yhi = 0. 0 ) : freqs = np. arange ( 0, max _ freq, freq _ step ) plt. xlim ( fmin, fmax ) plt. plot ( freqs, spectrum ) if ( title = = none ) : if ( logdb ) : plt. title ('frequency dom... | [
0.3715175986289978,
0.9320027828216553,
0.5127807855606079,
0.33528944849967957,
-0.5089911222457886,
-0.6059741377830505,
-0.5116201043128967,
0.14588531851768494,
0.158762589097023,
-0.8096976280212402,
0.774064838886261,
1.0427870750427246,
-0.040627121925354004,
0.7995602488517761,
0... |
def update _ table ( self, conn, record, sql ) : cur = conn. cursor ( ) cur. execute ( sql, record ) conn. commit ( ) logger. info ( " update record successfully " ) | [
0.3895469009876251,
-0.25021493434906006,
0.6760016083717346,
1.14696204662323,
-0.44902947545051575,
0.11792386323213577,
-0.5851439833641052,
0.9115319848060608,
-1.2691782712936401,
0.9722894430160522,
0.08748522400856018,
0.5660557150840759,
0.005431612953543663,
0.09354767203330994,
... |
def reverse ( word ) : if word = ='' : return word else : return word [ - 1 ] + reverse ( word [ : - 1 ] ) | [
-0.04533902928233147,
1.1693490743637085,
0.45651018619537354,
0.3056814670562744,
0.5205392837524414,
-0.23536276817321777,
-0.6638177633285522,
0.37276124954223633,
-0.46648263931274414,
0.2377655804157257,
0.5301356315612793,
1.319610834121704,
-1.1688454151153564,
-0.44448912143707275,... |
def affichageftp ( ftp ) : print ( ftp. dir ( ftp ) ) | [
0.3983600437641144,
-0.2515409290790558,
0.48302143812179565,
-0.6889678835868835,
-0.21197842061519623,
0.9838772416114807,
0.2600485384464264,
-0.7876074314117432,
0.031477849930524826,
-0.2035181075334549,
0.695443332195282,
0.972690761089325,
0.29270386695861816,
0.5616559386253357,
... |
def lazygo ( watchfolder = '.. / abfs / ', reanalyze = false, rebuildsite = false, keepgoing = true, matching = false ) : abfsknown = [ ] while true : print ( ) pagesneeded = [ ] for fname in glob. glob ( watchfolder + " / *. abf " ) : id = os. path. basename ( fname ). replace ( ". abf ", " " ) if not fname in abfskno... | [
-0.41370680928230286,
-0.261743426322937,
0.7686268091201782,
0.19283373653888702,
0.3696431815624237,
0.05787963420152664,
0.8525832891464233,
-0.23887275159358978,
0.08246340602636337,
-0.44481340050697327,
-0.08647892624139786,
0.3152674734592438,
-0.554743230342865,
0.4728298485279083,... |
def get _ files _ types ( self ) : try : import magic except importerror : # no lib magic! for i in self. get _ files ( ) : buffer = self. _ zip. read ( i ) self. files _ crc32 [ i ] = crc32 ( buffer ) self. files [ i ] = " unknown " return self. files if self. files! = { } : return self. files builtin _ magic = 0 try ... | [
0.1796916425228119,
-0.0470728762447834,
0.8304736018180847,
-0.3345089852809906,
0.7301983833312988,
-0.46511146426200867,
0.3764566481113434,
0.013038654811680317,
0.2805691659450531,
-0.8757922053337097,
0.1636010706424713,
-0.2025970071554184,
-0.4997657835483551,
0.7004656195640564,
... |
def test _ load _ kerning ( ufo _ module ) : font = generate _ minimal _ font ( ) # generate classes'a': ['a ','a'] and'v': ['v ','v'] for glyph _ name in ( " a ", " a ", " v ", " v " ) : glyph = add _ glyph ( font, glyph _ name ) glyph. rightkerninggroup = glyph _ name. upper ( ) glyph. leftkerninggroup = glyph _ name... | [
-0.987891674041748,
0.46965429186820984,
0.6952325701713562,
-0.29777348041534424,
0.041033461689949036,
-0.18003275990486145,
0.04867647960782051,
-0.2898429334163666,
0.5424765348434448,
-0.17505349218845367,
-0.865154504776001,
0.37085583806037903,
0.24160978198051453,
0.740981638431549... |
def test _ check _ input _ list _ wrong _ shape ( ) : in _ list = [ np. zeros ( ( 5, 2, 1, 1 ) ), np. zeros ( ( 5, 2, 2, 2 ) ) ] with pytest. raises ( valueerror ) : mob. check _ inputs ( in _ list, basevalues _ idx = [ 0 ], window _ idx = 100 ) | [
-0.4085664451122284,
0.26261603832244873,
0.5394636392593384,
1.0375765562057495,
0.9103177785873413,
0.17996299266815186,
0.0641384944319725,
-0.08758866041898727,
-0.0026995979715138674,
0.43767601251602173,
-0.5428343415260315,
0.3396000564098358,
-0.8232002854347229,
1.2116564512252808... |
def email _ subject _ template _ id ( self, email _ subject _ template _ id ) : self. _ email _ subject _ template _ id = email _ subject _ template _ id | [
-0.14922109246253967,
-0.7925630807876587,
-0.15054212510585785,
-1.0926437377929688,
-0.3684000074863434,
1.2109689712524414,
-0.7192147970199585,
0.33377858996391296,
0.010770970024168491,
1.2396165132522583,
-0.8393255472183228,
-0.1935851126909256,
0.1294458955526352,
0.482485711574554... |
def round _ it ( number ) : return round ( number, 10 ) | [
-0.030651072040200233,
0.8107731938362122,
0.1854441910982132,
-1.8072854280471802,
1.5348821878433228,
-0.08100052922964096,
0.8314256072044373,
-0.11466524749994278,
-0.34086310863494873,
-0.013253632932901382,
0.7345724105834961,
-0.07342977821826935,
0.19724591076374054,
-0.24397927522... |
def field ( name ) : return lambda d : d [ name ] | [
-0.9792764782905579,
0.2383294403553009,
0.18432767689228058,
-2.099543333053589,
-0.7944175601005554,
-0.10327134281396866,
-0.10317889600992203,
-0.03745705634355545,
-0.18687555193901062,
-0.2822018265724182,
-0.9956038594245911,
-0.20347151160240173,
1.2340142726898193,
-1.310923457145... |
def bt _ read _ inquiry _ mode ( sock ) : # save current filter old _ filter = sock. getsockopt ( bluez. sol _ hci, bluez. hci _ filter, 14 ) # setup socket filter to receive only events related to the # read _ inquiry _ mode command flt = bluez. hci _ filter _ new ( ) opcode = bluez. cmd _ opcode _ pack ( bluez. ogf _... | [
-0.3796757757663727,
0.07351213693618774,
0.7762317657470703,
-0.3248947560787201,
0.023904994130134583,
0.4945908784866333,
0.5281399488449097,
-0.5307530164718628,
-0.3909233808517456,
0.09808368980884552,
0.7188906073570251,
0.448569118976593,
-1.290077805519104,
-0.5242834687232971,
... |
def maketestsuitev201003 ( ) : suite = unittest. testsuite ( ) suite. addtests ( unittest. makesuite ( geolocationservicetestv201003 ) ) return suite | [
-0.29391324520111084,
-0.06899067014455795,
0.43838056921958923,
0.22955957055091858,
0.048179320991039276,
0.6239437460899353,
-0.49795618653297424,
0.4871882200241089,
1.2938227653503418,
0.4450545310974121,
0.3318597078323364,
-0.13744275271892548,
0.3806511163711548,
-0.734525859355926... |
def _ _ eq _ _ ( self, other ) : if not isinstance ( other, releasedmodelitem ) : return false return self. _ _ dict _ _ = = other. _ _ dict _ _ | [
-0.8399810791015625,
-0.6497647166252136,
0.7483817934989929,
-0.05417725816369057,
-0.1701895296573639,
0.3303433954715729,
-0.18780417740345,
-0.5491272807121277,
1.0017153024673462,
0.30417686700820923,
-1.494282603263855,
-0.3487214148044586,
-0.1440681517124176,
-0.10164013504981995,
... |
def test _ quotation _ to _ pure _ activity ( self, * _ ) : status = models. quotation. objects. create ( quote = " a sickening sense ", content = " test content ", user = self. local _ user, book = self. book, ) activity = status. to _ activity ( pure = true ) self. assertequal ( activity [ " id " ], status. remote _ ... | [
-0.37465670704841614,
-0.9807594418525696,
0.460006982088089,
-0.3481399714946747,
0.5504178404808044,
0.46592363715171814,
0.37585151195526123,
-0.382877379655838,
0.6116421818733215,
0.2077796310186386,
-0.565014123916626,
0.5089594125747681,
-0.1400613784790039,
-0.7338399887084961,
0... |
def get _ provider ( self, provider _ name ) : if self. providers is none : self. providers = { } for provider _ class in self. _ _ subclasses _ _ ( ) : provider = provider _ class ( ) self. providers [ provider. name ] = provider return self. providers [ provider _ name ] | [
-0.8952717781066895,
0.7426387667655945,
0.44402092695236206,
0.12577418982982635,
-0.32070568203926086,
0.12544317543506622,
-0.5407562255859375,
-0.929095447063446,
1.0098333358764648,
-0.1271054744720459,
-0.5641950964927673,
0.5428338646888733,
-0.7262623906135559,
0.052407000213861465... |
def name ( cls ) : return " library _ content _ randomize " | [
-0.051145926117897034,
-0.9192735552787781,
0.16282567381858826,
-0.5488772392272949,
0.3503296971321106,
0.9762310981750488,
0.13786298036575317,
-0.4609600305557251,
0.34445297718048096,
0.14418357610702515,
-0.09185130149126053,
-0.6024135947227478,
-0.174282044172287,
0.148683890700340... |
async def room _ owner ( self, ctx ) : if not await self. bot. has _ perm ( ctx ) : return channel = ctx. message. channel _ mentions [ 0 ] if ctx. message. channel _ mentions else ctx. channel result = self. bot. get _ temp _ room ( room _ id = channel. id ) if not result : await ctx. send ( f " { channel. mention } i... | [
0.18468359112739563,
-0.1697651445865631,
0.6610566973686218,
1.4424378871917725,
0.48986145853996277,
-0.14188696444034576,
0.19802378118038177,
0.004227557685226202,
-0.2671743929386139,
-0.41439640522003174,
-0.033821459859609604,
1.4735019207000732,
-0.5330734252929688,
0.4005126059055... |
def test _ cant _ update _ driver _ invalid _ requests ( self ) : res = self. client. post ('/ driver / update') self. assertequal ( res. status _ code, 405 ) res = self. client. delete ('/ driver / update') self. assertequal ( res. status _ code, 405 ) res = self. client. put ('/ driver / update') self. assertequal ( ... | [
-0.9225747585296631,
-0.5201214551925659,
0.8003167510032654,
0.7325813174247742,
0.20731490850448608,
0.6204603910446167,
-0.2761119604110718,
0.3564510643482208,
0.22389338910579681,
-0.1083403080701828,
0.021611802279949188,
-0.68494713306427,
-0.7989780902862549,
0.4196714162826538,
... |
def query ( cls, args ) : return ( true, none ) | [
-0.8036001920700073,
-0.250515341758728,
0.16615056991577148,
-0.3929861783981323,
0.6699330806732178,
0.3285353183746338,
-0.37899625301361084,
0.3461037874221802,
-0.43366527557373047,
0.1640017330646515,
-0.21726450324058533,
-0.6112552285194397,
-1.2721354961395264,
-0.0541228242218494... |
def get _ users ( self, email ) : email _ field _ name = usermodel. get _ email _ field _ name ( ) active _ users = usermodel. _ default _ manager. filter ( * * {'% s _ _ iexact'% email _ field _ name : email,'is _ active': true, } ) return ( u for u in active _ users if u. has _ usable _ password ( ) and _ unicode _ c... | [
-0.25603416562080383,
-0.30689382553100586,
0.7034198045730591,
0.21314886212348938,
0.1256706565618515,
0.21587277948856354,
-0.009941967204213142,
0.1779775768518448,
-0.17375904321670532,
1.0459115505218506,
-0.6554239392280579,
0.1864607334136963,
-0.7268592119216919,
-0.42397609353065... |
def get _ user _ obj ( field = " " ) : return getattr ( g. userobj, field, g. userobj ) | [
-0.06866674870252609,
-0.49934399127960205,
0.2685093283653259,
0.5994166731834412,
-0.8336032629013062,
0.3176347315311432,
1.3367434740066528,
-1.3988120555877686,
-0.5987682938575745,
-0.782379150390625,
-0.4288692772388458,
0.1946941316127777,
0.12781235575675964,
-0.7246357202529907,
... |
def f ( self, x ) : return self. act. activation ( self. logit ( x ) ) | [
-1.050766944885254,
-0.7313191890716553,
0.21315421164035797,
-0.32803627848625183,
-0.4325930178165436,
-0.025030730292201042,
0.0921412780880928,
-0.6415309309959412,
0.9700869917869568,
-0.7975629568099976,
-0.7903261780738831,
0.8715856671333313,
0.3963167071342468,
-1.79345703125,
-... |
def requires ( self, req _ handle ) : assert isinstance ( req _ handle, handle ) with self. _ _ rlock, req _ handle. _ _ rlock : if not self. _ _ valid : raise invalidhandle ('cannot require a new handle if already destroyed') if req _ handle. _ _ valid : self. _ _ required _ handles. append ( req _ handle ) req _ hand... | [
-0.5455679893493652,
-0.7800981998443604,
0.5739820003509521,
0.3285534083843231,
0.6205912232398987,
1.5804812908172607,
0.23886390030384064,
0.12817594408988953,
-0.08926993608474731,
-1.6061956882476807,
0.27745136618614197,
0.39398953318595886,
-0.8358129858970642,
1.1340099573135376,
... |
def output _ tasks ( self, group = none ) : if group is not none : group = query ( ) data = self. db. search ( group. group = = group ) else : data = self. fetch _ task ( ) self. formatted _ print ( data ) return data | [
-0.8264533281326294,
0.789537787437439,
0.38403645157814026,
0.39290544390678406,
-0.47474056482315063,
-0.8951510190963745,
0.3083944022655487,
-1.1083834171295166,
-0.915437638759613,
0.5354977250099182,
0.727036714553833,
-0.10336115956306458,
-0.30366453528404236,
0.6656047105789185,
... |
def _ _ get _ token _ list ( self ) : for line in self. _ _ input _ file : line = self. _ _ parse _ strings ( line ) line = remove _ comments _ and _ stuff ( line ) line = remove _ multiple _ line _ comments ( line ) if not line : continue line _ separated _ array = line. split ( space _ char ) for element in line _ se... | [
-0.4455455541610718,
-0.7000322937965393,
0.509063720703125,
-0.5013578534126282,
-0.3473559021949768,
-0.4787725508213043,
1.0092250108718872,
1.0166563987731934,
-0.39844077825546265,
-0.5153794288635254,
-0.1863374263048172,
0.008850689977407455,
-0.37486302852630615,
0.6031969785690308... |
def add1 ( ) : @ register _ verb ( int, context = context. eval ) def add ( a : int, b : int = 1 ) : return a + b return add | [
-0.5603432655334473,
0.03443752974271774,
0.4978700578212738,
0.16097235679626465,
-0.026013875380158424,
-0.5043250322341919,
-0.09143626689910889,
-0.16879287362098694,
0.725110650062561,
-0.16605393588542938,
0.16597643494606018,
1.011435866355896,
0.057060617953538895,
0.12343883514404... |
def get ( self ) : if self. user : self. render ('add _ blog. html ', user = self. user ) else : cookie _ error = " your session has expired please login again to continue! " self. render ('login. html ', error = cookie _ error ) | [
0.07657690346240997,
1.077602744102478,
0.587335467338562,
1.2236592769622803,
-0.3104473948478699,
0.29766204953193665,
-0.5154196619987488,
0.18751516938209534,
0.4186648428440094,
0.13877427577972412,
0.6264764666557312,
0.5312327742576599,
-0.39040350914001465,
0.07213413715362549,
0... |
def test _ result ( self, request _ info ) : logger. info ( f " [ 전처리 테스트 ] 요청 id [ { self. original _ data _ pk } ] 의 테스트 결과 생성 중... " ) user _ request _ dict = request _ info [ " request _ test " ] for get _ request _ dict in user _ request _ dict : field _ name = get _ request _ dict [ " field... | [
-1.3420692682266235,
0.28190499544143677,
0.922151505947113,
-0.8594447374343872,
-0.02280479669570923,
-0.5314459800720215,
1.2042014598846436,
-0.4264111816883087,
0.03824654966592789,
0.16280697286128998,
-0.541490912437439,
-0.29301920533180237,
0.32486361265182495,
-0.3334346413612366... |
def test _ view _ event ( self ) : role = role. query. filter _ by ( name = " event organizer " ). first ( ) user = testmodelfactory. create _ user ( ) user. role = role venue = testmodelfactory. create _ venue ( ) event = testmodelfactory. create _ event ( " test event ", " live " ) event. user = user event. venue = v... | [
0.0728522390127182,
0.2592446208000183,
0.8132614493370056,
0.1305382251739502,
0.7068532109260559,
0.8227683305740356,
0.15576432645320892,
0.6853379011154175,
0.2861686050891876,
-0.7948974370956421,
-0.16314548254013062,
-0.06721928715705872,
0.37327840924263,
-0.048462796956300735,
0... |
def max _ request _ length ( self ) - > int : return self. max _ sequence _ length + 1 | [
-0.8840652704238892,
0.3062830865383148,
0.5520343780517578,
0.5281826853752136,
-0.22742773592472076,
0.6727432608604431,
-0.7968501448631287,
-0.020489076152443886,
1.0565568208694458,
-0.7439369559288025,
0.22983136773109436,
0.4093620479106903,
-0.24552534520626068,
0.17523008584976196... |
def generator ( self, batchsize = 16, norm = true, sample ='train') : return self. _ aux _ generator ( batch _ size = batchsize, normalize = norm, sample _ set = sample ) | [
0.027445532381534576,
0.2957916557788849,
0.5585269927978516,
0.49134841561317444,
-2.1549246311187744,
-0.09523595869541168,
0.04257742688059807,
0.3608921468257904,
0.41668832302093506,
-0.7294266223907471,
-0.11410865932703018,
0.3632957935333252,
0.023259621113538742,
-0.12882646918296... |
def traced ( * args, * * keywords ) : obj = args [ 0 ] if args else none if obj is none : # treat ` @ traced ( )'as equivalent to ` @ traced'return traced if isclass ( obj ) : # ` @ traced'class return _ install _ traceable _ methods ( obj, exclude = keywords. get ( " exclude ", false ) ) elif isroutine ( obj ) : # ` @... | [
0.01374961156398058,
0.06988567113876343,
1.002882719039917,
-0.001598167116753757,
-0.26776859164237976,
0.32719725370407104,
0.5741691589355469,
-0.729135274887085,
1.2023441791534424,
-0.2772170901298523,
-0.5358851552009583,
0.4523926377296448,
0.0007718531414866447,
0.1226911395788192... |
def doi ( self ) - > str : # remark : doi might be part of the metadata return self. _ get _ detail ( " doi " ) | [
0.07933130860328674,
0.36069798469543457,
0.34394705295562744,
0.2002839893102646,
0.9446651935577393,
0.5429470539093018,
0.44740718603134155,
-0.23885032534599304,
-0.03479068726301193,
0.21361073851585388,
0.47897768020629883,
0.672706127166748,
0.6604882478713989,
-0.5518760681152344,
... |
def toggle _ observation _ cycle ( self, node _ uuid : nodeid, disable : bool ) - > bool : if node _ uuid not in self. _ inverse _ search _ mapping : raise dynamicsidecarnotfounderror ( node _ uuid ) service _ name = self. _ inverse _ search _ mapping [ node _ uuid ] service _ task = self. _ service _ observation _ tas... | [
-1.0768077373504639,
1.0885701179504395,
0.975641131401062,
0.07706782221794128,
-0.14596770703792572,
0.49077528715133667,
0.5928124189376831,
0.4763035774230957,
-0.7456826567649841,
1.0863566398620605,
0.10770191252231598,
0.502388060092926,
-0.6275916695594788,
-0.02298990823328495,
... |
def d _ three ( x, eps ) : return ( 2 * fun ( x + eps ) + 3 * fun ( x ) - 6 * fun ( x - eps ) + fun ( x - 2 * eps ) ) / ( 6 * eps ) | [
0.31022337079048157,
1.3991507291793823,
0.45729562640190125,
0.030013369396328926,
-0.5564615726470947,
0.2887416183948517,
-1.2894456386566162,
-0.042430534958839417,
0.7548514604568481,
-0.556176483631134,
-0.6765758991241455,
-0.45482349395751953,
1.318190336227417,
-1.5819846391677856... |
def set _ start _ min ( self, mn ) : assert _ is _ cpo _ interval _ value ( mn ), " interval min should be an integer in [ interval _ min, interval _ max ] " assert mn < = self. start [ 1 ], " interval min should be lower or equal to interval max " self. start = ( mn, self. start [ 1 ] ) | [
-0.26904410123825073,
-0.8472877740859985,
0.3706715703010559,
0.551361620426178,
-0.3567958176136017,
1.214579463005066,
-0.005000897217541933,
-0.29051873087882996,
-0.14314165711402893,
0.15291623771190643,
-0.7331082224845886,
1.459335446357727,
-0.9104111194610596,
-0.2226397842168808... |
def collect _ data ( self ) - > none : read _ data = none try : read _ data = self. perform _ read ( ) except exception as e : logging. error ( f'read from read _ client failed with exception : { e }') if read _ data : try : self. perform _ store ( store _ data = read _ data ) logging. info ( f'datacollectiontask { sel... | [
-0.1329774707555771,
0.15651361644268036,
0.5325520634651184,
-0.2207217961549759,
0.09574081748723984,
0.5233539938926697,
0.7733266353607178,
-0.34429460763931274,
-0.24920998513698578,
0.18943531811237335,
0.7351107001304626,
0.750582218170166,
0.8038022518157959,
0.23719504475593567,
... |
def comparisons _ to _ ref ( self, k, l ) : pass | [
0.060777612030506134,
-0.3369912803173065,
0.3072724938392639,
-0.5388164520263672,
0.949291467666626,
0.14510367810726166,
-0.00030791759490966797,
0.0045238216407597065,
-0.28290244936943054,
0.8855054974555969,
0.22849375009536743,
0.2806679904460907,
-0.10479702800512314,
0.87793594598... |
def fromfile ( cls, filepath, unk02 = 0 ) : with open ( filepath,'rb') as f : return cls ( f. read ( ), unk02 = 0 ) | [
1.1824243068695068,
-1.0294997692108154,
0.3242360055446625,
0.2137952744960785,
-0.5059820413589478,
0.648389995098114,
0.1467943787574768,
0.12951526045799255,
-0.7412424683570862,
-0.21773363649845123,
-0.09637667238712311,
-0.2941156029701233,
0.09472006559371948,
0.16012632846832275,
... |
def saveconfig ( name, config ) : # set path path ='config /'+ name + '. json'# dump json - file with open ( path,'wb') as fp : json. dump ( config, fp ) | [
-1.0582207441329956,
-0.9901493787765503,
0.30518049001693726,
-0.612586259841919,
-0.46788182854652405,
0.23198579251766205,
-0.13103799521923065,
-0.059530891478061676,
-0.6223456859588623,
1.6899513006210327,
-2.3876988887786865,
-0.3378872573375702,
0.252864271402359,
0.799404621124267... |
def _ _ process _ hdf5 ( self, input _ file _ and _ path, verbose = false ) : # specifies the base column names for the processed arxiv categories file category _ cols = ['abstract ','acm _ class ','arxiv _ id ','author _ text ','categories ','comments ','created ','doi ','num _ authors ','num _ categories ','primary _... | [
-0.2694096863269806,
-0.5707656145095825,
0.4626074433326721,
0.027569258585572243,
0.3527158796787262,
0.08394353836774826,
0.07509058713912964,
-0.03272603452205658,
-1.286319375038147,
-0.5949904918670654,
1.3420201539993286,
0.42048314213752747,
-0.12652799487113953,
-0.359970599412918... |
def recognize _ main ( ) : print ( " recognizing main... " ) while true : pandora _ speak ('hello sir. i \'m here.') req = record _ audio ( ) print ('you :'+ req ) x = commands ( req ) if x = = - 1 : # if x = = - 1 it means that the user won't need the program for hour, so the program will enter in sleep mode break # b... | [
-0.0527019202709198,
-0.07848673313856125,
0.49947941303253174,
1.4232635498046875,
-0.042413417249917984,
1.0024628639221191,
-0.15319417417049408,
-0.34198570251464844,
-0.299787700176239,
-0.1526082307100296,
-0.45614010095596313,
0.4326880872249603,
-0.5554111003875732,
-0.392512977123... |
def generate _ actions ( pdf, path _ pdf ) : global _ id with pdfplumber. open ( path _ pdf ) as f _ pdf : # # open pdf progress = tqdm. tqdm ( unit = " page ", total = len ( f _ pdf. pages ) ) for page in f _ pdf. pages : doc = { " _ id " : _ id, " name " : pdf, " page " : page. page _ number, " content " : page. extr... | [
-0.13844448328018188,
-0.5035689473152161,
0.6550678610801697,
-0.3550577759742737,
0.4044508934020996,
-0.09790275245904922,
0.3236313760280609,
0.25157803297042847,
-0.03288131579756737,
-0.17442472279071808,
0.28388503193855286,
-0.7585880160331726,
0.27755966782569885,
-0.3272239565849... |
def _ _ init _ _ ( self, backoff = 15, retry _ total = 3, retry _ to _ secondary = false, random _ jitter _ range = 3, * * kwargs ) : self. backoff = backoff self. random _ jitter _ range = random _ jitter _ range super ( linearretry, self ). _ _ init _ _ ( retry _ total = retry _ total, retry _ to _ secondary = retry ... | [
1.2312873601913452,
0.12748058140277863,
0.5108085870742798,
-0.7722217440605164,
-0.07501351088285446,
0.19499339163303375,
-0.31206533312797546,
0.36847594380378723,
0.10728655010461807,
0.19448445737361908,
-1.5963038206100464,
-0.057657890021800995,
-0.1699574887752533,
-0.664007008075... |
def collapse _ literal ( node, ctxt, give _ raw _ result = false ) : result = _ collapse _ literal ( node, ctxt ) if give _ raw _ result : return result result = make _ ast _ from _ literal ( result ) if not isinstance ( result, ast. ast ) : return node return result | [
-0.2653995752334595,
0.47863632440567017,
0.4905203580856323,
-0.46849822998046875,
-1.5299835205078125,
-0.4848407506942749,
-0.3910820782184601,
0.5998579263687134,
0.24950535595417023,
0.3760935366153717,
0.08644583821296692,
-0.3570162355899811,
-0.012283139862120152,
-0.41369962692260... |
def test _ warn _ no _ version ( caplog, ufo _ module ) : font = generate _ minimal _ font ( ) font. appversion = " 0 " to _ ufos ( font, ufo _ module = ufo _ module ) assert len ( [ r for r in caplog. records if " outdated version " in r. msg ] ) = = 1 | [
-0.3082219660282135,
-0.026137595996260643,
0.3289238214492798,
0.28465211391448975,
0.388876736164093,
0.6844121217727661,
-0.3234219551086426,
0.47909775376319885,
0.5090495944023132,
-0.052099213004112244,
-0.47236084938049316,
0.34479624032974243,
0.2842625677585602,
0.6385850310325623... |
def clean _ vm _ name ( vm _ name ) : # suffix part defined in conf suffix = os. getenv ( " vmsuffix " ) if suffix : vm _ name = re. sub ( suffix, " ", vm _ name ) # proxmox uses kvm with - name parameter parts = vm _ name. split ('\ x00') if ( parts [ 0 ]. endswith ('kvm') ) : try : return parts [ parts. index ('- nam... | [
-0.32091090083122253,
-0.4360417425632477,
0.7044090628623962,
-0.040325261652469635,
-0.858902096748352,
0.30707356333732605,
-1.4231988191604614,
-0.03648769110441208,
-0.21040527522563934,
0.9247480034828186,
0.004778251051902771,
0.3153969645500183,
0.2030165195465088,
0.57099479436874... |
def filter _ dict ( pred, d, exclude = false ) : if pred is none : return d. copy ( ) if exclude else { } pred = to _ predicate ( pred ) filtered = { } for k, v in viewitems ( d ) : if ( ( not exclude ) and pred ( k ) ) or ( exclude and not pred ( k ) ) : filtered [ k ] = v return filtered | [
-0.2224801927804947,
0.3904460370540619,
0.7637386322021484,
-0.288095086812973,
-3.1398911476135254,
0.0931435376405716,
-0.1504492610692978,
1.3963963985443115,
-0.06848758459091187,
0.42079195380210876,
0.03856084495782852,
0.9902237057685852,
0.35731300711631775,
0.2700139284133911,
... |
def check _ ending _ move ( ) - > [ [ int ] ] : # game - ending moves # step 1 : attack 4 blocked 1 or unblocked, yes move that wins the game for player + return that move, no - > next step # step 2 : defend 4 blocked 1, yes - > only valid move that saved the game + return that move, no - > next step # step 3 : attack ... | [
-0.5173864960670471,
0.5619412064552307,
1.125573754310608,
0.8118574619293213,
-0.005131655838340521,
-0.35570502281188965,
0.6019464135169983,
-0.4099043011665344,
-1.091213583946228,
0.7934927940368652,
-0.9229648113250732,
-0.669248640537262,
-0.10014724731445312,
0.0032572615891695023... |
def test _ non _ vel3d _ l _ sio _ block ( self ) : log. info ( " = = = = = = = = = = = start integ non vel3d _ l sio block = = = = = = = = = = = = = = = = " ) # generated telemetered file has 3 sio blocks. # first sio block is not a vel3d _ l sio block. # second sio block has 3 instrument records and 1 metadata record... | [
1.4866151809692383,
0.030302314087748528,
0.6329962611198425,
0.08582653850317001,
0.4588744342327118,
1.0050333738327026,
-0.21927937865257263,
0.29915183782577515,
-0.15477494895458221,
0.28512269258499146,
-1.034699559211731,
0.031103024259209633,
-0.525088369846344,
0.319919228553772,
... |
def media _ download _ url ( self, media _ id, query : dict = none ) : return self. bynder _ request _ handler. get ( endpoint ='/ api / v4 / media / { 0 } / download / '. format ( media _ id ), params = query or { } ) | [
-0.3621712625026703,
-0.43211567401885986,
0.3457498550415039,
0.28282713890075684,
0.07478559762239456,
-0.40827786922454834,
-0.19952775537967682,
-0.24612167477607727,
0.2841512858867645,
-0.07960671931505203,
0.4332949221134186,
0.9247446060180664,
-0.4914819598197937,
1.21936118602752... |
def from _ dict ( cls, dikt ) - >'businessfiletype': return util. deserialize _ model ( dikt, cls ) | [
-0.011860844679176807,
0.3635048568248749,
0.3680516183376312,
-0.48671963810920715,
0.015504325740039349,
0.08913480490446091,
-0.7332340478897095,
0.334181547164917,
-0.3129628002643585,
-0.8256610631942749,
-0.8377000689506531,
-0.6355831027030945,
0.15134750306606293,
-0.61091083288192... |
def clear _ interfaces ( self, context, resource _ data ) : self. _ send _ event ( context, resource _ data, gen _ cfg _ const. event _ clear _ interfaces ) | [
-0.5985460877418518,
1.1685396432876587,
0.2097076028585434,
0.09044472873210907,
0.20438741147518158,
0.7132724523544312,
1.026958703994751,
-1.0249677896499634,
0.15352869033813477,
0.4435003399848938,
-0.38877150416374207,
0.8006961941719055,
-0.4263586699962616,
-0.1361384093761444,
... |
def add _ angles ( self, sys, mol _ id ) : # todo raise error if mol _ id not in mol _ dict for an in sys. angles : angle _ str = " %. 3f \ t %. 3f " % ( an. type. k, an. type. theteq ) angle _ params = [ an. type. uk, an. type. utheteq ] self. angle _ dict. add _ param ( angle _ str, angle _ params ) self. angle _ dic... | [
-0.2773047983646393,
-0.06353854387998581,
0.31797662377357483,
-0.9486850500106812,
0.4889896810054779,
-0.0488918162882328,
-0.2328948676586151,
0.4351370632648468,
0.4045566916465759,
0.696821928024292,
-0.5111947655677795,
-0.07266402244567871,
-0.21765460073947906,
0.5433629751205444,... |
def closest _ color ( r, g, b, * * kwargs ) : min _ distance _ sq = 0 min _ color = none for color in kwargs : r2, g2, b2 = kwargs [ color ] distance _ sq = ( r - r2 ) * * 2 + ( g - g2 ) * * 2 + ( b - b2 ) * * 2 if min _ color is none : # first color min _ color = color min _ distance _ sq = distance _ sq elif distance... | [
0.7540906071662903,
-1.2746597528457642,
1.0477652549743652,
0.050967540591955185,
-0.5350034236907959,
0.4986927807331085,
-0.33410021662712097,
-1.21274733543396,
-0.7883288264274597,
-0.18327613174915314,
0.05527978390455246,
0.2799956202507019,
-0.7160886526107788,
0.48581141233444214,... |
def run _ test _ examples ( self, examples, return _ loss = true, return _ words = false, negative _ examples = none, return _ all _ losses = false ) : feed _ dict = self. _ examples _ to _ feeddict ( examples, negative _ examples ) feed _ dict [ self. keep _ ph ] = 1. to _ run = { } if return _ loss : to _ run [ " los... | [
-1.1956034898757935,
-0.11773503571748734,
0.7359789609909058,
-0.10947971045970917,
-0.2818153500556946,
-0.11547147482633591,
-0.2685719132423401,
-0.052782583981752396,
0.06346223503351212,
0.6872231364250183,
-0.21666589379310608,
0.29951608180999756,
-0.4512452781200409,
-0.1639596074... |
def _ configure ( self ) : self. _ configure _ aws _ command ( ) self. _ configure _ aws _ resources ( ) self. _ configure _ aws _ kops ( ) | [
-0.5608935952186584,
0.28675928711891174,
0.2922087013721466,
0.5681459307670593,
0.7616546750068665,
-0.5519188642501831,
0.3005915880203247,
-0.5383740067481995,
0.564246416091919,
-0.34732386469841003,
-0.4655420780181885,
-0.6662089228630066,
1.6307096481323242,
0.7304149270057678,
0... |
def clean _ dname ( df ) : indices = df. index df ['dname'] = df ['disease name']. apply ( isalpha ) allas = df ['disease name'] = ='a.'ind = allas [ allas = = true ]. index to _ drop = ind - 1 for n in range ( len ( indices ) ) : i = indices [ n ] if ( isalpha ( df. ix [ i,'disease name'] ) ) : df. ix [ i,'disease nam... | [
-1.10141921043396,
0.19425514340400696,
0.9852723479270935,
-0.9379690885543823,
-0.6102362275123596,
0.29059863090515137,
0.5307637453079224,
0.6314342617988586,
0.77302086353302,
1.0247858762741089,
0.5414894223213196,
0.4557141363620758,
0.8261164426803589,
-0.27647864818573,
1.480660... |
def download ( self, mavenlib ) : pom = mavenpom ( self. _ maven _ pom _ downloader, mavenlib ) if pom : deps = pom. get _ all _ dependencies ( ) base _ url = pom. get _ lib _ base _ url ( mavenlib ) if base _ url : self. _ do _ download ( base _ url, mavenlib ) self. _ downloaded _ libraries. append ( mavenlib ) for d... | [
-0.3263366222381592,
-0.5656160712242126,
0.5283677577972412,
0.7473166584968567,
-0.001527993124909699,
0.26611214876174927,
-0.38178208470344543,
-0.1101904809474945,
0.7477253079414368,
-0.4396817684173584,
-0.6761788129806519,
-0.906991720199585,
-0.8220435380935669,
0.9804000854492188... |
def get _ part _ details ( self, e ) : item = self. part _ list. getselection ( ) row = self. part _ list. itemtorow ( item ) if row = = - 1 : return part = self. part _ list. gettextvalue ( row, 0 ) dialog = partdetailsdialog ( self, part ) dialog. show ( ) | [
0.6570501923561096,
0.11819595843553543,
0.31629788875579834,
-0.11269118636846542,
-0.07495558261871338,
0.24873289465904236,
-0.11510581523180008,
0.28722816705703735,
0.6449294686317444,
0.05783504992723465,
-0.22177721560001373,
0.34765785932540894,
-0.3802714943885803,
0.1480820626020... |
def get _ updates ( local _ path : str, update _ name : str, download _ url : str, file _ count : int ) - > int : # create folders if they're missing pathlib. path ( local _ path ). mkdir ( parents = true, exist _ ok = true ) # get the hash. json eprint ( f'* checking for updated { update _ name }...') download ( f'{ d... | [
0.7958741188049316,
-1.0920898914337158,
1.0489592552185059,
-0.1148761659860611,
0.32010456919670105,
-0.15385164320468903,
-0.010787528939545155,
0.41172152757644653,
-0.864128828048706,
0.2534800171852112,
-0.04423670470714569,
-0.198029026389122,
-0.20818403363227844,
0.629887700080871... |
def _ has _ excuse ( self, node ) : node _ start = node. lineno # find the index of first token which starts at the same line as the node token _ index = - 1 for i, t in enumerate ( self. tokens ) : if t. start [ 0 ] = = node _ start : token _ index = i - 1 break # iterate downwards on token index # ( i. e., skip token... | [
-0.3449035584926605,
-0.2266141027212143,
1.004612684249878,
-1.1674920320510864,
-0.4849003255367279,
-0.30663391947746277,
0.16872622072696686,
0.6900283694267273,
-0.6516327857971191,
0.636434018611908,
0.6474577784538269,
0.5313735604286194,
-0.653467059135437,
0.5368446111679077,
-0... |
def registerdefaulthandler ( self, handler ) : self. _ defaulthandler = handler | [
-0.5673427581787109,
0.9663208723068237,
0.01764359325170517,
0.27587857842445374,
1.113507628440857,
0.8599763512611389,
-0.2003229707479477,
0.2368895262479782,
-0.42726653814315796,
-1.5352731943130493,
-1.3341634273529053,
-0.006627590861171484,
-0.7734189629554749,
1.1844278573989868,... |
def test _ update _ check _ is _ called ( ) : app = create _ ctfd ( ) with app. app _ context ( ) : assert get _ config ( " version _ latest " ) is none | [
0.8243976831436157,
0.048721760511398315,
0.1926017850637436,
1.2754088640213013,
1.4112392663955688,
1.0034443140029907,
-0.5709801912307739,
0.3447260558605194,
-0.44073715806007385,
0.15900197625160217,
-0.44390299916267395,
-0.0843956246972084,
-0.14989174902439117,
0.12009332329034805... |
def challenge _ id ( self ) : return self. _ challenge _ id | [
1.4165232181549072,
-0.5917268991470337,
0.23966951668262482,
0.7724935412406921,
0.8999670743942261,
0.6804973483085632,
0.5396015644073486,
0.5975860953330994,
0.9223859310150146,
-0.11965702474117279,
0.04655993729829788,
0.13915634155273438,
-0.09493482857942581,
0.3880254626274109,
... |
def getfilename ( self ) : filenum = 0 while os. path. isfile ( self. filetemplate % filenum ) : filenum + = 1 return self. filetemplate % filenum | [
-0.6239743232727051,
-0.5884564518928528,
0.9477096199989319,
-0.04962245747447014,
-0.03541748970746994,
-0.41428226232528687,
0.7860152125358582,
0.8853870630264282,
-0.9511898159980774,
-0.6278741955757141,
0.1621585339307785,
-1.2583729028701782,
-0.22097745537757874,
0.510049819946289... |
def get _ form _ kwargs ( self ) : kwargs = super ( documentformmixin, self ). get _ form _ kwargs ( ) kwargs. update ( {'instance': self. object } ) return kwargs | [
-1.048425316810608,
-0.22655317187309265,
0.5961320996284485,
-1.0561641454696655,
-0.060121309012174606,
0.45704755187034607,
-0.756803035736084,
0.1264995038509369,
0.41938892006874084,
-0.27443456649780273,
-1.0722110271453857,
-0.36035385727882385,
-0.13072341680526733,
1.2656172513961... |
def _ get _ neighbor _ route _ map ( self ) : return self. _ _ neighbor _ route _ map | [
-0.8919327855110168,
-0.7825136780738831,
0.6090994477272034,
0.0718904659152031,
-0.4464004337787628,
1.5433588027954102,
1.003700852394104,
-0.4821696877479553,
-0.4924429953098297,
-0.20802220702171326,
-0.5845295190811157,
-0.0330856554210186,
-0.18003591895103455,
0.1109895184636116,
... |
def gtp ( self ) : if self. is _ pass : return " pass " return move. gtp _ coord [ self. coords [ 0 ] ] + str ( self. coords [ 1 ] + 1 ) | [
-0.35769233107566833,
-0.3966033160686493,
0.726759672164917,
-0.2638239860534668,
-0.05875677987933159,
1.1290030479431152,
-0.44372138381004333,
-0.6386116147041321,
-0.2544228434562683,
1.1539143323898315,
0.6042158007621765,
0.10963691771030426,
-0.3595985472202301,
-1.3539289236068726... |
def dti _ qc ( fpath, qchtml, cur ) : filename = os. path. basename ( fpath ) directory = os. path. dirname ( fpath ) add _ headercompare _ note ( headerlog, fpath, qchtml ) # # # also need to add bval bvec compare # load in bvec file bvec = filename. split ( '.') try : bvec. remove ('gz') except : pass try : bvec. rem... | [
0.5302481055259705,
-0.37327104806900024,
0.7057756781578064,
0.005206237081438303,
-0.47738105058670044,
0.23989266157150269,
0.7801426649093628,
-0.6342740654945374,
0.03920475393533707,
0.6430971026420593,
0.3253534734249115,
-0.5855452418327332,
-0.07444159686565399,
0.3052534162998199... |
def add _ event _ to _ db ( calendar _ id, master _ event _ id, created _ event _ id ) : conn = sqlite3. connect ( ces _ settings ['sqlitedb'] ) add _ event _ sql = " insert into added _ events values ( null,?,?,?, current _ timestamp ) ; " with conn : logging. info ( " adding calendar - event entry to db. calendar : %... | [
0.2724682092666626,
0.11679328233003616,
0.5445638298988342,
0.1591470092535019,
0.4351113438606262,
1.0775433778762817,
-0.45108234882354736,
0.16862064599990845,
0.03819004073739052,
-0.09733378887176514,
-0.47641077637672424,
0.011243232525885105,
-0.23775877058506012,
0.168845802545547... |
def read _ score _ matrix ( input _ matrix ) : with open ( input _ matrix,'r') as file : string _ lines = file. read ( ). splitlines ( ) if input _ matrix = ='blosum50. txt': string _ lines = [ string. split ('\ t') for string in string _ lines ] reduced _ lines = [ ] for string _ list in string _ lines : stripped = [ ... | [
0.2963264286518097,
-0.3971211016178131,
0.5520980954170227,
-0.5573058724403381,
-0.32947978377342224,
-0.07798465341329575,
0.5742855668067932,
0.591766357421875,
0.00510668009519577,
0.9093137383460999,
0.7132708430290222,
0.45013871788978577,
-0.2273501604795456,
-0.5411818027496338,
... |
def create _ ring _ topology ( particles ) : for i in range ( 1, len ( particles ) - 1 ) : particles [ i ]. connections. append ( particles [ i - 1 ] ) particles [ i ]. connections. append ( particles [ i + 1 ] ) particles [ 0 ]. connections. append ( particles [ - 1 ] ) particles [ 0 ]. connections. append ( particles... | [
-0.5282338857650757,
-0.2806648313999176,
0.8307996392250061,
-1.0269163846969604,
1.091298222541809,
0.6375100612640381,
0.21786834299564362,
-0.9119797348976135,
-0.3284289538860321,
0.9373990297317505,
-0.33358851075172424,
-0.595653772354126,
-1.0312416553497314,
-0.8134089112281799,
... |
def test _ discovery ( self ) - > none : # this would throw if some metadata were invalid metadata = self. get _ success ( self. provider. load _ metadata ( ) ) self. fake _ server. get _ metadata _ handler. assert _ called _ once ( ) self. assertequal ( metadata. issuer, self. fake _ server. issuer ) self. assertequal... | [
-0.4793848991394043,
0.697985827922821,
0.43536609411239624,
0.18307176232337952,
0.9406372308731079,
0.7337343692779541,
0.17707467079162598,
-0.6122386455535889,
0.10732536017894745,
-0.4996946454048157,
-0.5705536603927612,
0.0647163838148117,
0.1995084434747696,
0.5181245803833008,
0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.