text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def pseudofeaturefusionnetwork ( feature _ map _ list ) : return feature _ map _ list [ 2 ] | [
-1.04988431930542,
-0.4402522146701813,
0.11866094917058945,
1.2586749792099,
0.4635227620601654,
-0.36117154359817505,
0.11290713399648666,
0.5714209079742432,
-0.12018335610628128,
-1.1255816221237183,
-0.6362696290016174,
-0.6549900770187378,
-0.6166266798973083,
0.36215323209762573,
... |
def test _ duplicate _ objectives ( self ) : # validate a form with duplicate ` ` objective ` ` values form = self. form _ data ( deadline _ 1 = " 2020 - 06 - 22 ", objective _ 1 = " objective 1 ", deadline _ 2 = " 2020 - 06 - 22 ", objective _ 2 = " objective 1 ", ) errors = form. errors [ 1 ] [ " objective " ]. as _ ... | [
-0.34732356667518616,
0.3298942744731903,
0.521073043346405,
-0.04998629167675972,
0.31013578176498413,
0.7151978015899658,
-0.10607636719942093,
-0.5157841444015503,
-0.2669970989227295,
0.48569416999816895,
-0.5744250416755676,
-0.17984813451766968,
1.4966504573822021,
-0.262223720550537... |
def main ( ) : game _ baru : game filename : str = " data game idle " print ( " tekan y untuk ya. " ) print ( " tekan apapun yang lain untuk tidak. " ) load _ data : str = input ( " apakah anda mau load data yang tersimpan? " ) if load _ data = = " y " : try : game _ baru = pickle. load ( open ( filename, " rb " ) ) pr... | [
0.13915152847766876,
-0.001184035325422883,
1.1081773042678833,
0.17322403192520142,
0.15760400891304016,
0.5994146466255188,
0.571047306060791,
-0.5114838480949402,
-1.037310242652893,
0.12188713252544403,
-0.455845445394516,
-0.9166098237037659,
-0.6054177284240723,
0.3402356505393982,
... |
def in _ edges ( self ) : return [ edge ( self. graph, e ) for e in self. graph. redis. smembers ('{ } : ie '. format ( self. name ) ) ] | [
-0.13366995751857758,
-0.2326226383447647,
0.3868913948535919,
0.021012773737311363,
0.5248274207115173,
-0.10646960884332657,
-1.6061711311340332,
0.5134822726249695,
0.8505953550338745,
0.5647099018096924,
-0.19431892037391663,
0.2129562795162201,
-1.2631239891052246,
-0.2226093709468841... |
def _ _ init _ _ ( self, address = " localhost : 8888 ", path = " ws ", trace = false, header = { }, * * kwargs ) : self. target = " ws : / / { address } / { path } ". format ( address = address, path = path ) self. header = header self. trace ( trace ) self. socket = self. connect ( * * kwargs ) | [
0.2775968015193939,
-0.11166464537382126,
0.682582676410675,
-0.13687658309936523,
-0.6892685294151306,
0.0360298827290535,
-0.19787606596946716,
-0.37772515416145325,
0.8482915759086609,
-0.1860560029745102,
-0.4699169397354126,
1.1385817527770996,
-0.22312001883983612,
-0.030284086242318... |
def invalidate _ all ( confirm = true ) : # record all tasks that run and their output vs files present raise notimplementederror ( ) | [
0.15912194550037384,
-0.24844805896282196,
0.33406582474708557,
1.2908427715301514,
0.18592268228530884,
0.47606387734413147,
0.8933992981910706,
0.2374550700187683,
-0.8156678080558777,
0.2531653642654419,
-0.48147860169410706,
0.6467903852462769,
-0.36471882462501526,
1.1645623445510864,... |
def load _ jhu _ global _ time _ series ( branch = " master " ) : cases = pd. read _ csv ( cases _ url. format ( branch ) ) deaths = pd. read _ csv ( deaths _ url. format ( branch ) ) recovered = pd. read _ csv ( recovered _ url. format ( branch ) ) # melt cases id _ vars, dates = parse _ columns ( cases ) cases _ df =... | [
-0.4991387128829956,
0.2635519504547119,
0.7740191221237183,
-0.8144808411598206,
-0.31257814168930054,
0.3865017294883728,
-0.6204862594604492,
-0.3000029921531677,
-0.0035170125775039196,
0.0903935581445694,
0.42131534218788147,
0.7575773000717163,
0.026291659101843834,
-0.34063103795051... |
def take _ turn ( board, players, turn, victory, orders ) : print ('> > > > > turn ', turn,'< < < < <') # print ( board ) print ( players ) check = 0 # # for ter in board : # # if ter. owner = = none : # # check + = 1 # # if check = = 0 : # # return board if turn > 200 : return [ players, board ] # print ( board ) for ... | [
-0.3563050627708435,
-0.5303710699081421,
0.6955929398536682,
1.0868256092071533,
0.1916022002696991,
-0.4661714732646942,
0.47889626026153564,
0.453193336725235,
0.011854137293994427,
0.8906934261322021,
0.017246359959244728,
-0.05922110378742218,
-0.16755549609661102,
0.00935548078268766... |
def test _ proper _ error _ response _ on _ employee _ not _ found ( self ) : resp = self. client. put ('/ employee / xxxxxxxxxx @ xxxxxxxxxxx. com / update / ', data ='{ " name " : " new _ name " }') self. assertequal ( resp. json ( ), employee _ not _ found _ json ) | [
-0.8804614543914795,
-1.4638581275939941,
0.480903297662735,
-0.9459580779075623,
0.4711754620075226,
1.0761991739273071,
-0.3869788348674774,
-0.5955662131309509,
0.1675165295600891,
0.6775042414665222,
-1.2762155532836914,
-0.09505092352628708,
-0.509777307510376,
-0.481404572725296,
0... |
def test _ l2 _ metric _ log _ and _ squared _ norm _ and _ dist ( self ) : tangent _ vec = self. l2 _ metric _ s2. log ( point = self. curve _ b, base _ point = self. curve _ a ) log _ ab = tangent _ vec result = self. l2 _ metric _ s2. squared _ norm ( vector = log _ ab, base _ point = self. curve _ a ) expected = se... | [
0.7102068662643433,
-1.674495816230774,
0.4582866132259369,
0.1725466400384903,
-0.20973336696624756,
0.6062817573547363,
-0.045707955956459045,
-0.5501729846000671,
-0.3407658040523529,
-0.7685734033584595,
-0.3481626808643341,
0.6367526054382324,
0.8077713847160339,
-0.5753872394561768,
... |
def signal _ handler ( signal, frame ) : if push _ to _ talk : gpio. cleanup ( ) for t in threading. enumerate ( ) : # print ( t. name ) if t. name! ='mainthread': t. shutdown _ flag. set ( ) print ('goodbye!') sys. exit ( 1 ) | [
0.04584893211722374,
0.3512299954891205,
0.36970260739326477,
0.5528795123100281,
0.20509439706802368,
0.5470393896102905,
-0.09187164157629013,
-0.20971816778182983,
0.5449231863021851,
0.8354045748710632,
-0.1384248435497284,
-0.5269868969917297,
-0.7133698463439941,
1.1041501760482788,
... |
def test _ config _ build _ localizer ( ) : config _ fpaths = _ get _ config _ path _ for _ localizer ( ) # test all config file in ` configs / localization ` directory for config _ fpath in config _ fpaths : config _ mod = mmcv. config. fromfile ( config _ fpath ) print ( f'building localizer, config _ fpath = { confi... | [
-0.6752144694328308,
-0.3858483135700226,
0.37667372822761536,
0.8402344584465027,
0.12295574694871902,
0.4135420620441437,
0.22831374406814575,
0.1649247407913208,
0.23046888411045074,
0.06852938234806061,
-0.8936519026756287,
-0.393627792596817,
0.42166146636009216,
0.558421790599823,
... |
def _ _ call _ _ ( self, word ) : # append begin and end characters word = word. lower ( ) word = " { } { } { } ". format ( self. begin _ char, word, self. end _ char ) grams = [ ] # create and store all ngrams for n from min _ len to max _ len # for cur _ len in range ( self. min _ len, self. max _ len + 1 ) : # for o... | [
-0.26171764731407166,
0.074274942278862,
0.8076528310775757,
-0.21504077315330505,
-0.7512611150741577,
0.2586694359779358,
-0.3532520532608032,
-0.8255937099456787,
-0.3444722592830658,
0.24312032759189606,
-0.4189243018627167,
0.8272028565406799,
-1.0394091606140137,
0.16511839628219604,... |
def topordering ( self ) : self. parseinput ( ) candidates = [ ] # all nodes with no incoming edges # add all nodes with no input edges to the candidates list for node in self. nodes. keys ( ) : if len ( self. nodes [ node ]. inedges ) = = 0 : candidates. append ( node ) # loop through all candidate nodes while len ( c... | [
-1.3390278816223145,
-0.3254014551639557,
0.9782531261444092,
-0.42781275510787964,
-0.619991660118103,
0.47101348638534546,
0.7694129347801208,
0.5182002782821655,
0.6020362973213196,
0.21635815501213074,
0.2149745672941208,
0.2185577005147934,
-0.4733004868030548,
-0.2783648371696472,
... |
def set _ transaction ( self, transaction ) : self. transaction _ map [ transaction. id ] = transaction | [
-0.5203805565834045,
-0.2783457636833191,
0.2989773452281952,
-0.34324824810028076,
1.103393316268921,
-0.18757034838199615,
-0.889922559261322,
0.3633973002433777,
0.27826106548309326,
0.1384986788034439,
-1.6217544078826904,
-0.1134086325764656,
0.33339783549308777,
-0.12819267809391022,... |
def test _ phase _ creation ( ) : phase _ name ='my - solvent - phase'toluene = testsystems. tolueneimplicit ( ) protocol = absolutealchemicalfactory. defaultsolventprotocolimplicit ( ) atom _ indices = find _ components ( toluene. system, toluene. topology,'resname tol') phase = alchemicalphase ( phase _ name, toluene... | [
0.3199198544025421,
0.23814865946769714,
0.3993343412876129,
-0.6293222308158875,
0.5797482132911682,
0.6326236128807068,
0.03054795227944851,
-0.28752726316452026,
0.07920154929161072,
-0.840243935585022,
-0.001769972499459982,
-0.899367094039917,
0.09104939550161362,
-0.515236496925354,
... |
def instance _ interruption _ behavior ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " instance _ interruption _ behavior " ) | [
0.29125431180000305,
-0.004504462704062462,
0.6550682187080383,
0.5072754621505737,
0.44037145376205444,
1.9219613075256348,
1.1888686418533325,
0.03141164034605026,
0.8009377717971802,
0.3850301206111908,
0.05083398148417473,
0.7581397294998169,
-0.9847002625465393,
-1.500092625617981,
... |
def tweet _ dataset _ preprocessor _ 1 ( ) : # import the dataset. slo _ dataset = \ pd. read _ csv ( " tbl - datasets / tbl _ training _ set. csv ", sep = ", " ) # shuffle the data randomly. slo _ dataset = slo _ dataset. reindex ( pd. np. random. permutation ( slo _ dataset. index ) ) # rename columns to something th... | [
0.3607919216156006,
0.2658061683177948,
0.4878314435482025,
-0.33808302879333496,
-0.1496802270412445,
0.09499629586935043,
0.40082141757011414,
0.46232956647872925,
-0.30305883288383484,
0.8250727653503418,
-0.1797732412815094,
0.527825117111206,
0.7550913095474243,
-0.21207092702388763,
... |
def distance _ pbc ( x0, x1, dimensions ) : d = np. abs ( x0 - x1 ) d = np. where ( d > 0. 5 * dimensions, dimensions - d, d ) return np. sqrt ( ( d * * 2 ). sum ( axis = - 1 ) ) | [
0.8653531670570374,
0.22207072377204895,
0.5755860805511475,
0.5143507122993469,
-0.4468356966972351,
0.6597094535827637,
-0.21374012529850006,
0.023810449987649918,
-0.4686671793460846,
0.9016925096511841,
0.2422502189874649,
0.5239109992980957,
-1.014727234840393,
-0.07492071390151978,
... |
def test _ merge _ defaults _ base ( self ) : application _ conf = configfactory. from _ dict ( { " facade " : { " base _ url " : " http : / / config1. url " }, " logging " : { " config " : " config1. yaml " } } ) reference _ conf = configfactory. from _ dict ( { " facade " : { " base _ url " : " http : / / config2. ur... | [
-0.3069117069244385,
0.15639209747314453,
0.7277098298072815,
1.0880426168441772,
1.328042984008789,
0.1589767187833786,
-0.04392583668231964,
0.4295163154602051,
-0.13453586399555206,
-0.3426770269870758,
-1.0403966903686523,
-0.3365878760814667,
0.05411674454808235,
0.6020855903625488,
... |
def test _ does _ not _ overflow _ with _ large _ factor _ value ( self ) : pol = backoffpolicy ( 1. 0, 60. 0, 1e10, jitter = lambda : 1 ) self. assertequal ( pol ( 1751 ), 61 ) | [
1.103954792022705,
0.4961518347263336,
0.513462483882904,
-0.7321307063102722,
0.3213302195072174,
1.4336040019989014,
0.16782276332378387,
-0.012855656445026398,
1.0137616395950317,
-0.5803771615028381,
-0.3475746810436249,
-0.6473478674888611,
-0.5759254693984985,
-0.10017508268356323,
... |
def test _ write _ file _ fail ( attempt _ file _ write : magicmock, sleep : magicmock ) : attempt _ file _ write. return _ value = ioerror ('fake') success, error = writer. write _ file ('fake ','fake ', retry _ count = 5 ) assert not success assert error is not none assert 5 = = attempt _ file _ write. call _ count a... | [
-0.6719983220100403,
0.114756740629673,
0.3335634469985962,
0.6702520251274109,
1.4089322090148926,
0.4637337923049927,
0.6366029381752014,
-0.26298442482948303,
-1.2920609712600708,
-0.39296606183052063,
-0.21603479981422424,
-1.0453243255615234,
-0.22020158171653748,
0.26092344522476196,... |
def reduceconditionallogic ( source _ set ) : conditionreduction = collections. namedtuple ('conditionreduction ','condition, matches') reduced _ conditions = set ( ) for condition in source _ set. conditions : condition _ dict = condition. _ asdict ( ) for attribute in attr : # set attribute value to wildcard and find... | [
-0.37126001715660095,
0.47930774092674255,
0.6791988611221313,
-0.09342789649963379,
-0.9601724743843079,
-1.0868979692459106,
0.6765867471694946,
0.3371182978153229,
0.20563209056854248,
0.01568678393959999,
0.19620630145072937,
-0.41627463698387146,
0.23524247109889984,
0.524607896804809... |
def ok ( results ) : return all ( [ result ['data']. ok for result in results ] ) | [
0.2361217737197876,
0.007814571261405945,
0.3591867983341217,
0.45578598976135254,
0.1795777678489685,
0.3677856922149658,
-0.49636897444725037,
0.028198758140206337,
-0.39731404185295105,
0.05568127706646919,
-0.5364925861358643,
-0.77357417345047,
-0.05776244401931763,
0.1389384865760803... |
def np _ simul _ integerizer _ cvx ( sub _ int _ weights, parent _ countrol _ importance, parent _ relax _ ge _ upper _ bound, sub _ countrol _ importance, sub _ float _ weights, sub _ resid _ weights, lp _ right _ hand _ side, parent _ hh _ constraint _ ge _ bound, sub _ incidence, parent _ incidence, total _ hh _ rig... | [
0.9383426904678345,
0.3682708442211151,
0.7832550406455994,
0.4551868438720703,
-0.14373436570167542,
0.33853739500045776,
0.22685720026493073,
-0.1788763701915741,
-0.2984527051448822,
0.29382169246673584,
-0.49611228704452515,
-0.4525895118713379,
0.37558525800704956,
-0.4134986996650696... |
def get _ token _ count ( self, key ) : try : return self. _ buckets [ key ] [ 0 ] except keyerror : pass return 0 | [
-0.5287712216377258,
0.01769605092704296,
0.5111823081970215,
-0.07530757039785385,
-0.07299483567476273,
-0.2815000116825104,
-0.09366437792778015,
-0.04287369176745415,
-0.4178847670555115,
-0.39141884446144104,
-0.4198022484779358,
-0.12789039313793182,
0.1958969086408615,
0.10513389855... |
def a _ star _ heuristic ( graph, src, dest, parents ) : distance = sqrt ( ( src. get _ latitude ( ) - dest. get _ latitude ( ) ) * * 2 + ( src. get _ longitude ( ) - dest. get _ longitude ( ) ) * * 2 ) return distance | [
-0.08748679608106613,
-0.341813325881958,
0.4070286154747009,
-0.5475703477859497,
-1.0784744024276733,
0.5257850289344788,
-0.8130515217781067,
0.8720865249633789,
-0.15184080600738525,
0.7334706783294678,
-0.2185162603855133,
0.2093978226184845,
0.3454713821411133,
0.23596829175949097,
... |
def places _ data ( self, p, game, results ) : if results [ 0 ] = = p : self. _ players [ p ]. add _ result ('win') self. _ games [ game. name ]. players [ p ]. add _ result ('win') if results [ - 1 ] = = p : self. _ players [ p ]. add _ result ('lose') self. _ games [ game. name ]. players [ p ]. add _ result ('lose') | [
-0.6855381727218628,
-0.23654627799987793,
0.6002879738807678,
-0.7321386933326721,
0.6276924014091492,
0.4927612841129303,
-0.05870348960161209,
-0.32256054878234863,
0.35914912819862366,
0.2131422758102417,
-0.20447193086147308,
0.30135276913642883,
-0.6499192714691162,
0.160869121551513... |
def find _ source ( cat ) : source _ ra = float ( td. coord _ lookup ( cat, ra _ dict ) ) * 15. 0 source _ dec = float ( td. coord _ lookup ( cat, dec _ dict ) ) os. chdir ( config. blazar _ photometry ) try : cat _ data = fits. open ( cat ) except : raise cat _ len = len ( cat _ data [ 2 ]. data ) closest = 1e10 for k... | [
-0.11950951814651489,
-0.4527164399623871,
0.599075973033905,
-0.6514464020729065,
0.3064846098423004,
0.05539826303720474,
0.45983293652534485,
-0.012197418138384819,
-1.0681796073913574,
-0.27304807305336,
-0.8833693265914917,
0.13027505576610565,
0.4580848217010498,
0.9364650845527649,
... |
def _ display _ available _ purges ( self ) : purge _ tasks = self. active _ purge _ tasks if purge _ tasks : self. stdout. write ( ngettext ('the following application can be purged : ','the following applications can be purged : ', len ( purge _ tasks ) ) ) self. stdout. write ('\ n') for purge _ task in purge _ task... | [
0.23345200717449188,
-0.17802251875400543,
0.7125169634819031,
0.41821742057800293,
0.208196222782135,
0.42740970849990845,
-0.0816550999879837,
-0.3046841621398926,
0.11706192046403885,
1.275559425354004,
0.2565220594406128,
1.1071007251739502,
-0.03777593746781349,
0.14662770926952362,
... |
def advance _ user ( self, userid ) : if assignmentprogress. objects. all ( ). filter ( assignment _ key _ id = self. id, user _ info _ key _ id = userid ). exists ( ) : progress = assignmentprogress. objects. all ( ). get ( assignment _ key _ id = self. id, user _ info _ key _ id = userid ) if alternateprogress. objec... | [
-0.8124627470970154,
-0.5070124268531799,
1.0119061470031738,
-0.3544243574142456,
-0.8253063559532166,
1.0089287757873535,
1.1239006519317627,
-0.2289351522922516,
-0.5635983943939209,
0.4130125641822815,
0.27705836296081543,
-0.162245973944664,
-0.4798130691051483,
0.6582373976707458,
... |
def _ solve _ all _ parallel ( self, use _ cache = true ) : self. generate _ test _ instances ( ) # workers = multiprocessing. cpu _ count ( ) / 2 workers = 8 # create two queues : one for files, one for results work _ queue = multiprocessing. queue ( ) done _ queue = multiprocessing. queue ( ) processes = [ ] # add fi... | [
-0.52000492811203,
0.05198090523481369,
0.7672785520553589,
-0.1592281609773636,
0.9572142958641052,
0.2969141900539398,
0.6895791888237,
0.0663999542593956,
0.01090638805180788,
0.2366563230752945,
-0.32345956563949585,
-0.6906332969665527,
-1.0584782361984253,
0.697762668132782,
-0.628... |
def depth ( self ) - > int : if self. _ depth is none : if self. is _ root : self. _ depth = 0 else : self. _ depth = self. parent. depth + 1 return self. _ depth | [
-0.07327999174594879,
0.6373121738433838,
0.6998199224472046,
0.6108682751655579,
0.14877088367938995,
0.21672873198986053,
1.4051955938339233,
-0.0967179536819458,
0.3762386739253998,
-1.53131103515625,
-0.5778395533561707,
0.7160532474517822,
-0.0673418939113617,
1.1514617204666138,
0.... |
def _ _ navigationmenutriggered ( self, act ) : index = act. data ( ) if index is not none : self. setcurrentindex ( index ) | [
-1.2250252962112427,
-0.8178698420524597,
0.24069644510746002,
-0.3734193444252014,
0.5113616585731506,
-0.4493471384048462,
0.8617863059043884,
0.16716516017913818,
0.7703306078910828,
0.0902150422334671,
-0.34368860721588135,
0.29396384954452515,
0.08144234120845795,
-1.1936908960342407,... |
def test _ write ( self ) : message = retryresultmessage ( request _ id = " 0001 ", wait = 0, payload ='" service restarting "') m _ bytes = write _ message ( message ) self. assertequal ( m _ bytes,'e00010000000000000014 " service restarting "') | [
-0.17008991539478302,
0.19856610894203186,
0.382035493850708,
0.25656312704086304,
1.508043646812439,
-0.17379263043403625,
0.1181698590517044,
-0.3079509437084198,
-0.07773323357105255,
-0.6745117902755737,
-0.2640793025493622,
-0.028537163510918617,
-1.507068157196045,
-0.297368824481964... |
def gettrilinearformentry ( self, gs, gpk, basisk, gpi, basisi, gpj, basisj ) : ans, err = 1. 0, 0. 0 # run over all dimensions for d in xrange ( gpi. getdimension ( ) ) : # compute linear form for one entry available, keyd = self. hasvalue ( gpk, gpi, gpj, d ) if not available : # there is no information available for... | [
0.5660098791122437,
-0.09278220683336258,
0.3607354462146759,
-0.3493584990501404,
0.12560969591140747,
-0.19598764181137085,
0.2622969448566437,
0.1244417130947113,
-0.44777315855026245,
-0.044189367443323135,
0.12033355981111526,
-0.15403062105178833,
0.009072033688426018,
0.187907934188... |
def calculate _ mae _ 5 ( y _ true, y _ pred ) : return k. mean ( k. abs ( y _ true [ :, :, :, :, 0 ] - y _ pred [ :, :, :, :, 0 ] ) ) | [
0.14653797447681427,
-0.6990597248077393,
0.7728346586227417,
-0.1328572928905487,
-0.8525803685188293,
0.4054774343967438,
0.42760127782821655,
0.5420765280723572,
-0.2652280330657959,
1.4681386947631836,
0.12070072442293167,
0.739460825920105,
0.6345202922821045,
0.9260221123695374,
0.... |
def is _ present ( self ) : return self. presence = = _ pres _ present | [
-0.44414931535720825,
-1.1752907037734985,
0.6227729916572571,
0.6732763051986694,
0.755470871925354,
1.0963815450668335,
-0.45123159885406494,
0.6094544529914856,
0.8997372984886169,
0.48417985439300537,
0.19724883139133453,
-0.3148844242095947,
-0.3460376560688019,
0.20116494596004486,
... |
def _ _ has _ direct _ los ( self, start, goal, room ) : # check if los for i in range ( len ( room. corners ) ) : # two corners define a wall which can be intersected ir = i + 1 if ir > len ( room. corners ) - 1 : ir = 0 if self. _ _ line _ intersects ( start, goal, room. corners [ i ], room. corners [ ir ] ) : return... | [
0.4373927116394043,
-0.07392525672912598,
0.7891685366630554,
0.2557494640350342,
-0.21230852603912354,
0.613981306552887,
-0.43567684292793274,
-0.030215507373213768,
-1.4614287614822388,
0.21060238778591156,
0.1297059804201126,
-0.12006473541259766,
0.40087321400642395,
0.361002713441848... |
def get _ command ( self ) : command _ input = input ( " enter your command : " ) # the 1st command in list must always be the printunknowncommand, which is used # as default command. self. command _ names = [ printunknowncommand ( self. viewer ), exitapplication ( ), gobackmenu ( self. _ app, self. viewer, " turns ", ... | [
-0.4160809814929962,
-0.02234015427529812,
0.3755820095539093,
0.9579208493232727,
1.249544382095337,
-0.40057793259620667,
0.37418264150619507,
-0.6961982250213623,
0.27600428462028503,
-1.047008752822876,
-0.2992308735847473,
1.0258921384811401,
-0.1628156453371048,
0.4607705771923065,
... |
def volume _ type ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " volume _ type " ) | [
1.2016445398330688,
0.16508065164089203,
0.44352397322654724,
0.7553740739822388,
1.5753638744354248,
0.9156180620193481,
-0.17892025411128998,
-0.41096174716949463,
0.8183565139770508,
-0.33677130937576294,
0.5157095193862915,
1.275992751121521,
-0.22978465259075165,
-0.7286611795425415,
... |
def matrix _ clean _ up ( mat ) : dim = mat. nrows ( ) l = list ( ) mat _ space = matrixspace ( combinatorialscalarring ( ), dim ) prnt = mat _ space. base _ ring ( ) for i in range ( dim ) : l. append ( list ( ) ) for j in range ( dim ) : l [ i ]. append ( combinatorialscalarwrapper ( mat [ i, j ]. get _ cleaned _ up ... | [
0.21011507511138916,
0.4227531850337982,
0.5283066034317017,
0.36931902170181274,
-0.7761711478233337,
0.4695439040660858,
0.6629779934883118,
-0.38809704780578613,
1.2529104948043823,
-0.03178787976503372,
0.4493825435638428,
0.017267582938075066,
0.33067062497138977,
0.45487481355667114,... |
def _ _ execute _ test _ on _ file ( self, jsc _ file _ body ) : in _ file _ path = os. path. join ( self. test _ dir, f " test _ file _ { datetime. datetime. utcnow ( ). timestamp ( ) }. jsc " ) with open ( in _ file _ path, " w ", encoding = " utf - 8 " ) as in _ file _ w : in _ file _ w. write ( jsc _ file _ body ) ... | [
0.008449285291135311,
-1.0763808488845825,
0.6915131211280823,
-1.0063837766647339,
0.6042404174804688,
0.2461206465959549,
-0.1684870570898056,
-0.84575355052948,
-0.4286807179450989,
0.4041014015674591,
-0.24392935633659363,
-0.3167252242565155,
-0.20467431843280792,
-0.30430713295936584... |
def users ( self ) - > sequence ['outputs. getusersuserresult'] : return pulumi. get ( self, " users " ) | [
-0.34190234541893005,
0.5921540260314941,
0.4042566418647766,
0.9477872252464294,
1.3488067388534546,
0.1375376135110855,
0.4716050326824188,
-0.08336235582828522,
0.6148449182510376,
-0.47829896211624146,
-0.5347878336906433,
0.42512840032577515,
0.06228068470954895,
-0.6553648710250854,
... |
def parse _ cdna ( self, details ) : for regex in hgvsregex. cdna _ allele _ regexes : match = re. match ( regex, details ) if match : groups = match. groupdict ( ) # parse mutation type. if groups. get ('delins') : self. mutation _ type ='delins'else : self. mutation _ type = groups ['mutation _ type'] # parse coordin... | [
-0.11766412854194641,
-0.044273197650909424,
0.7041898369789124,
-0.2607170045375824,
-0.24763523042201996,
-0.2509353756904602,
-0.09564848244190216,
-0.023419808596372604,
0.08424676209688187,
-0.5345083475112915,
-0.35261762142181396,
0.5052323341369629,
0.9025856852531433,
0.3248401880... |
def binary _ ip _ to _ dec ( binary _ ipv4 : str ) : return ". ". join ( str ( int ( binary _ ipv4 [ i : i + 8 ], 2 ) ) for i in range ( 0, 32, 8 ) ) | [
0.17376263439655304,
-0.7747059464454651,
0.6895635724067688,
-0.3094142973423004,
0.10900774598121643,
-0.2731750011444092,
0.20383019745349884,
-0.056264910846948624,
0.08298778533935547,
-0.3133653402328491,
-0.4330849051475525,
-0.3283427655696869,
-0.1213967576622963,
-1.1068303585052... |
def generate _ join _ sample ( self, single _ table = none, relationship _ list = none, min _ start _ table _ size = 1, sample _ rate = 1, drop _ redundant _ columns = true, max _ intermediate _ size = math. inf, split _ condition = none ) : # drop _ redundant _ columns = false # hyper - parameter assert single _ table... | [
-0.10718527436256409,
0.8449861407279968,
0.66865074634552,
0.8060221076011658,
-0.4115985929965973,
0.14185337722301483,
0.887552797794342,
1.2863783836364746,
0.11147253215312958,
0.21998625993728638,
0.2796628475189209,
-0.1033041700720787,
-0.6952689290046692,
-0.18675532937049866,
0... |
def authenticate ( self, session ) : username = session. user try : tiki _ user = tikiuser. objects. get ( login = username ) user = user. objects. get ( pk = tiki _ user. userid ) except user. doesnotexist : user = create _ django _ user ( tiki _ user ) except tikiuser. doesnotexist : session. delete ( ) return none r... | [
-0.23057076334953308,
-0.5378914475440979,
0.31995970010757446,
0.6228094696998596,
0.3548298478126526,
-0.4193187654018402,
0.4591686725616455,
-0.7481057047843933,
1.1572706699371338,
0.27436548471450806,
-0.13108347356319427,
-0.6717581152915955,
0.1268758326768875,
-0.43133512139320374... |
def inputvector ( m ) : n = len ( m ) print'ingrese los elementos del vector b'b = [ 0 ] * n temp = raw _ input ( ) ; b = temp. split ( ) for i in range ( n ) : b [ i ] = float ( b [ i ] ) return b | [
-0.5554083585739136,
0.2505321502685547,
0.5813778042793274,
1.3391032218933105,
0.30961742997169495,
0.19080305099487305,
-0.04029260203242302,
0.12026847898960114,
-0.4564701318740845,
0.05880873650312424,
-0.5908524990081787,
0.21070563793182373,
-1.0229811668395996,
0.7771335244178772,... |
def set _ selected _ row _ type ( self, rtype : rowtype ) - > bool : # selected rows [ selection _ row _ start, selection _ row _ end, selection _ col _ start, selection _ col _ end ] = self. get _ selected _ range ( ) if ( selection _ row _ start < 0 ) or ( selection _ row _ end < 0 ) : return false # current row type... | [
-0.6767095327377319,
-0.3045521080493927,
0.8690533638000488,
-0.1372734159231186,
-0.2928946912288666,
-0.6188872456550598,
0.7137408256530762,
-1.0760376453399658,
0.5663043856620789,
0.31773051619529724,
-0.10676872730255127,
0.8385159373283386,
-0.14108870923519135,
0.8924944996833801,... |
def simulate _ discrete _ distribution ( distribution ) : subtotal = 0. 0 r = np. random. rand ( ) j = 0 while ( subtotal < = r ) : subtotal = subtotal + distribution [ j ] j + = 1 return j - 1 | [
-0.46811360120773315,
0.9956618547439575,
0.6515394449234009,
0.10121678560972214,
-0.1022864505648613,
0.3972938656806946,
0.5671327710151672,
-0.1103525161743164,
1.355660080909729,
-0.16993173956871033,
-0.12931519746780396,
-0.39450111985206604,
-0.02040519192814827,
-0.609502196311950... |
def _ trapezoidal _ function _ table ( ) : # v1, v2, v3, v4 return {'cr': ( 0., 1000., 2200., 2500. ),'ag': ( 0., 500., 2000., 2500. ),'lr': ( - 2500., - 2200., - 300., 0. ),'rn': ( - 2500., - 2200., - 300., 0. ),'rp': ( 0., 500., 2000., 2200. ),'vi': ( 0., 1000., 2200., 2500. ),'ws': ( - 500., - 300., 300., 500. ),'mh... | [
-0.2198054939508438,
-0.5709076523780823,
0.6271464824676514,
-0.6210938692092896,
-0.8876978754997253,
-0.993716299533844,
0.3905688226222992,
-1.0305792093276978,
-0.6789437532424927,
0.5147351622581482,
-1.1202116012573242,
-0.2501043677330017,
0.38229769468307495,
-0.34139907360076904,... |
def f2k ( f ) : return c2k ( f2c ( _ np. asanyarray ( f ) ) ) | [
-0.3654932975769043,
-0.5332838892936707,
0.35361164808273315,
0.8525465726852417,
-0.2286491096019745,
-1.211472749710083,
0.5226224660873413,
0.2589416801929474,
-0.7729835510253906,
0.02247716672718525,
0.49365076422691345,
-0.35333994030952454,
1.597063422203064,
-0.5912543535232544,
... |
def mean _ absolute _ differential _ error ( a, f, order : int = 1, df _ train = none, scaler = none ) : # scaler = np. mean ( a, axis = 0 ) # debate over whether to make this scaled if df _ train is not none : last _ of _ array = np. nan _ to _ num ( df _ train [ df _ train. shape [ 0 ] - 1 : df _ train. shape [ 0 ], ... | [
-0.7718538641929626,
-0.0370933972299099,
1.292149305343628,
-0.06007411330938339,
-0.4763725697994232,
-0.3321988880634308,
-0.1090046614408493,
-0.22553874552249908,
-0.16627860069274902,
0.3829587697982788,
0.5660610198974609,
1.0741238594055176,
1.0953394174575806,
0.39810872077941895,... |
def numeropoints ( analyzer ) : cont = mp. size ( analyzer ['landing _ points'] ) return cont | [
0.47247937321662903,
0.48992815613746643,
0.051935095340013504,
0.7173043489456177,
-0.3995368182659149,
0.19795094430446625,
0.6052737236022949,
0.7713090181350708,
-0.15347926318645477,
0.22604092955589294,
0.16430765390396118,
-0.984734296798706,
0.3371809124946594,
-0.10431967675685883... |
def check0 ( self, spf, recursion ) : if not spf : return ('none ', 250, explanations ['none'] ) # split string by whitespace, drop the'v = spf1'spf = spf. split ( ) # catch case where spf record has no spaces. # can never happen with conforming dns _ spf ( ), however # in the future we might want to give permerror # f... | [
0.42034077644348145,
0.49402564764022827,
0.666564404964447,
-0.010852693580091,
-0.891503632068634,
-0.4438377916812897,
1.0646991729736328,
0.9037355780601501,
0.8074560761451721,
-0.46594148874282837,
-0.3641105592250824,
0.15482419729232788,
-0.6522389054298401,
0.3639114797115326,
0... |
def dump ( self ) : self. _ file. close ( ) self. _ file = open ( str ( self. _ file _ path ),'a + t') self. _ writer = csv. writer ( self. _ file, delimiter = ',') | [
-0.20974712073802948,
-0.6814093589782715,
0.24982549250125885,
-0.6750906109809875,
0.7309039831161499,
0.7014079689979553,
0.6590082049369812,
1.3515973091125488,
-0.7060377597808838,
-0.3592400550842285,
-0.06625444442033768,
0.20869703590869904,
0.6764962673187256,
0.34281209111213684,... |
def main ( ) : parser = get _ parser ( ) args = parser. parse _ args ( ) if not ( 1 < = args. port < = 65535 ) : parser. error ('port must be 1 - 65535') ban _ list _ filename = args. banlist if args. banlist else args. banlist. default token _ list _ filename = args. tokens if args. tokens else args. tokens. default b... | [
0.3100488483905792,
0.1710725724697113,
0.8419185280799866,
0.2002147138118744,
0.6029577255249023,
0.08496475219726562,
-0.1817930042743683,
0.8807438611984253,
-1.2203999757766724,
0.06384588032960892,
-0.3596602976322174,
0.6170217394828796,
-0.7816928625106812,
0.13845616579055786,
0... |
def get _ pix _ in _ poly ( poly ) : indices = [ ] # get the bounds of the poly vertices px = np. array ( poly ) [ :, 0 ] py = np. array ( poly ) [ :, 1 ] px _ min = int ( m. floor ( min ( px ) ) ) px _ max = int ( m. ceil ( max ( px ) ) ) py _ min = int ( m. floor ( min ( py ) ) ) py _ max = int ( m. ceil ( max ( py )... | [
-1.120111346244812,
-0.9060408473014832,
0.872377872467041,
-0.21490125358104706,
-1.0063613653182983,
0.04366758093237877,
0.3112385869026184,
-0.1289277970790863,
1.1126441955566406,
0.41213807463645935,
-0.8089753985404968,
0.18391436338424683,
-0.9317122101783752,
-0.4080614447593689,
... |
def fold _ on _ first ( t, period ) : tf = np. empty ( len ( t ), dtype = float ) tf [ : ] = np. nan t0 = min ( t ) t _ length = max ( t ) - min ( t ) num _ folds = int ( t _ length / / period ) + 1 for i in range ( num _ folds + 1 ) : mask = ( ( t - t0 ) < ( i + 1 ) * period ) & ( ( t - t0 ) > = i * period ) if isinst... | [
0.23787115514278412,
-0.21631696820259094,
0.6972965598106384,
0.6521548628807068,
-0.0653800219297409,
0.025678860023617744,
0.9604908227920532,
0.18864406645298004,
-0.24522392451763153,
0.3718533217906952,
-0.7968158721923828,
0.7985828518867493,
0.9212794899940491,
-0.41744357347488403... |
def update ( self, transaction ) : cursor = self. _ cnx. cursor ( ) command = " update transactions " + " set sourceaccount = % s, targetaccount = % s, amount = % s where id = % s " data = ( transaction. get _ source _ account ( ), transaction. get _ target _ account ( ), transaction. get _ amount ( ), transaction. get... | [
-0.5842129588127136,
-0.16358497738838196,
0.43607696890830994,
-0.7953951358795166,
-0.38074415922164917,
-0.30053651332855225,
-0.2267971783876419,
-0.26983243227005005,
-0.14346443116664886,
0.49791568517684937,
-0.6846582889556885,
-0.6020998358726501,
-0.060215726494789124,
-0.6386788... |
def test _ readbkg ( self ) : file _ name, file _ path ='test _ bkg. fit ','data _ for _ tests'# test that we fail if we try a non - existent file self. assertraises ( ioerror, background,'nonexistent. fit') # test that we fail if we read a non - fits file self. assertraises ( ioerror, background,'% s / testconfig. yam... | [
0.6483454704284668,
0.0020141133572906256,
1.009528636932373,
0.08724605292081833,
0.35184842348098755,
0.18908476829528809,
1.0409979820251465,
-0.36200642585754395,
-0.3567163348197937,
-0.12741941213607788,
0.2611786723136902,
0.4690878391265869,
-0.32848742604255676,
0.2261921018362045... |
def update _ model ( ) : # task = asyncio. create _ task ( async _ update _ model ( ) ) thread = threading. thread ( target = async _ update _ model ) thread. start ( ) | [
-0.5901154279708862,
-0.6248259544372559,
0.5067065358161926,
0.5743389129638672,
0.7716223001480103,
0.46260666847229004,
-0.18880389630794525,
0.48007211089134216,
-1.049859642982483,
0.4701971113681793,
-0.5721262097358704,
0.75067538022995,
0.2899312973022461,
-0.7554212212562561,
0.... |
def centroids _ iter ( features _ matrix, iteration, rg, weight = ( 1., 1., 1., 1., 0. 75 ), var _ names = ('dbz ','zdr ','kdp ','rhohv ','h _ iso0'), hydro _ names = ('ag ','cr ','lr ','rp ','rn ','vi ','ws ','mh ','ih / hdg'), nsamples _ iter = 20000, external _ iterations = 30, internal _ iterations = 10, alpha = 0.... | [
0.4271171987056732,
0.022983023896813393,
0.755761981010437,
1.1157504320144653,
-0.6181140542030334,
0.17336085438728333,
0.53596431016922,
-0.028550302609801292,
-0.13663363456726074,
0.755609393119812,
0.9529393911361694,
0.31192830204963684,
0.1503552347421646,
0.5095912218093872,
-0... |
def check ( self, value ) : raise notimplementederror ( ) | [
-0.5219426155090332,
-0.09896112233400345,
0.4197843372821808,
0.5939434766769409,
-0.2870701551437378,
1.3330562114715576,
0.6264995336532593,
-0.48366641998291016,
0.17655466496944427,
-0.11143869906663895,
0.19383253157138824,
-0.09943105280399323,
0.14210690557956696,
1.133137702941894... |
def test _ write _ conflict ( self ) : work _ entry _ 1 = self. create _ work _ entry ( datetime ( 2018, 10, 10, 9, 0 ), datetime ( 2018, 10, 10, 12, 0 ) ) work _ entry _ 2 = self. create _ work _ entry ( datetime ( 2018, 10, 10, 12, 0 ), datetime ( 2018, 10, 10, 18, 0 ) ) self. assertnotequal ( work _ entry _ 1. state... | [
-0.20649200677871704,
-0.23963209986686707,
0.8090097308158875,
0.13321030139923096,
1.1539452075958252,
0.7055854201316833,
0.6783778667449951,
0.36010757088661194,
-0.14489784836769104,
0.1835523098707199,
-0.6265576481819153,
-1.1168208122253418,
-0.5081919431686401,
-0.7275125980377197... |
def get _ service _ types _ view ( request ) : return ax. valid _ http ( httpsuccess = httpok, content = { u " service _ types " : list ( sorted ( service _ type _ dict. keys ( ) ) ) }, detail = s. servicetypes _ get _ okresponseschema. description ) | [
-0.42866262793540955,
0.6948264837265015,
0.23652546107769012,
-0.43820756673812866,
-0.0025611906312406063,
-0.10855597257614136,
0.40634965896606445,
-0.5429359078407288,
-0.1208929494023323,
0.05153186246752739,
0.624077320098877,
0.9444358348846436,
-0.2544756233692169,
0.1704913228750... |
def delete _ object ( db _ model, db _ object ) : with session _ manager ( ) as db _ session : obj = db _ session. query ( db _ model ). filter _ by ( id = db _ object ). first ( ) db _ session. delete ( obj ) db _ session. commit ( ) | [
0.344382643699646,
-0.26229748129844666,
0.5224958658218384,
0.6669283509254456,
0.5642409920692444,
0.40604567527770996,
0.6616899967193604,
-0.338490754365921,
0.4224257469177246,
0.5822767019271851,
-0.7152060270309448,
-0.37900105118751526,
-0.202301487326622,
-0.32291606068611145,
-... |
def timestamp _ to _ td ( seconds ) : try : td = timedelta ( seconds = float ( seconds ) ) except ( attributeerror, valueerror, typeerror ) : td = none return td | [
0.469791978597641,
-0.027577437460422516,
0.3703312873840332,
0.1124817356467247,
-0.4480111002922058,
-0.9263447523117065,
-0.32579728960990906,
-1.8417426347732544,
0.12138515710830688,
0.20565491914749146,
0.12694214284420013,
-0.5479691028594971,
0.8255637884140015,
-0.7510735392570496... |
def untaint _ node ( node _ name, effect, key ) : # get the client. kube _ client = get _ client ( ) # retrieve the node to access any existing taints. response = kube _ client. read _ node ( node _ name ) remove _ taint = false taints = response. spec. taints if taints is not none : for taint in taints : # taints must... | [
-0.4948669970035553,
-0.44074317812919617,
0.484244704246521,
-1.6960333585739136,
-0.35189715027809143,
0.011326508596539497,
0.19716332852840424,
0.2837156057357788,
0.022267747670412064,
0.9694995284080505,
0.5289648175239563,
0.8238638639450073,
-0.844171941280365,
-0.8201145529747009,... |
def _ time _ to _ gbase ( self, value ) : if value. microsecond : return value. strftime ('% h : % m : % s. % % 06d') % value. microsecond return value. strftime ('% h : % m : % s') | [
0.03669918328523636,
0.2485266476869583,
0.8202739953994751,
-0.22602581977844238,
-0.047842882573604584,
0.356799453496933,
-1.0434799194335938,
-0.9501873850822449,
-0.5186055898666382,
2.016979455947876,
0.28649258613586426,
-0.6324902772903442,
-0.7155660390853882,
0.696353018283844,
... |
def create _ ast _ component ( self, node, type _ ) : node. name = pyposast. extract _ code ( self. lcode, node ) return self. create _ code _ component ( node, type _, " n " ) | [
-0.7044644355773926,
-0.5193272233009338,
0.39033597707748413,
-1.0934288501739502,
-0.29768845438957214,
0.08219056576490402,
-0.6510559320449829,
-0.31205445528030396,
0.608722984790802,
0.3647441565990448,
-0.11849819868803024,
-0.427307665348053,
1.01598060131073,
0.595867395401001,
... |
def solved _ after ( benchmark _ data, reward _ threshold, minimum _ episodes = 1, report _ steps = false ) : # also accept a single experiment _ data object if not isinstance ( benchmark _ data, list ) : benchmark _ data = [ benchmark _ data ] array = np. array ( [ experiment _ data ['results'] ['episode _ rewards'] f... | [
0.2888723909854889,
0.3852577805519104,
0.45816805958747864,
0.3484456241130829,
0.8876017332077026,
-0.39993715286254883,
-0.4621838927268982,
0.3886941373348236,
-0.1651901751756668,
0.14239619672298431,
-0.2930346131324768,
0.38374951481819153,
-0.2512458562850952,
-0.19304870069026947,... |
def post ( self, request ) : try : refresh _ token = request. data ['refresh _ token'] token = refreshtoken ( refresh _ token ) token. blacklist ( ) return response ( status = status. http _ 205 _ reset _ content ) except : return response ( status = status. http _ 400 _ bad _ request ) | [
0.3756760060787201,
-0.3420402705669403,
0.5586835741996765,
1.4225449562072754,
0.19603918492794037,
-0.17213478684425354,
-0.6007049083709717,
-1.0923185348510742,
0.22398467361927032,
0.5193276405334473,
-0.3503590226173401,
0.6023823618888855,
-0.13449303805828094,
-0.3040778636932373,... |
def admin _ accounts ( self, admin _ accounts ) : self. _ admin _ accounts = admin _ accounts | [
0.5175109505653381,
0.20206572115421295,
-0.4869346618652344,
0.3670177459716797,
-0.0662621408700943,
0.8190272450447083,
-0.018246250227093697,
-0.8892205953598022,
-0.4206681549549103,
0.1833305060863495,
-0.26873326301574707,
-0.05965069308876991,
-0.576341450214386,
0.3424334824085235... |
def get _ namespaces ( color ) : namespaces = [ ] # spawn 50 vehicles for i in range ( 1, 51 ) : # valid mav _ sys _ ids 1 to 250 # blue uses 1 to 50 # gold uses 101 to 150 mav _ sys _ id = i if color = ='gold': mav _ sys _ id + = 100 # the first 25 vehicles per team are iris # the second 25 vehicles per team are delta... | [
-1.0147922039031982,
0.1077418252825737,
0.5383259654045105,
-0.34858638048171997,
0.12161708623170853,
0.0758444145321846,
-0.501201868057251,
-1.1119660139083862,
1.0484148263931274,
0.8742861151695251,
-0.8299833536148071,
-0.18624946475028992,
0.7692096829414368,
1.1558488607406616,
... |
def acronym _ heuristic ( doc ) : nps = doc. nps. getlist ( ) for i in range ( len ( nps ) - 1, 1, - 1 ) : anaphor = nps [ i ] if not anaphor. getattr ( " is _ proper " ) : continue for j in range ( i - 1, 0, - 1 ) : antecedent = nps [ j ] if not antecedent. getattr ( " is _ proper " ) : continue if string _ match. isa... | [
0.20586150884628296,
0.22201432287693024,
0.6609950065612793,
-0.4152800142765045,
-0.08236607164144516,
0.44770872592926025,
0.5487108826637268,
0.9790694713592529,
0.7027154564857483,
0.6203513741493225,
1.0278561115264893,
0.21188834309577942,
0.6619173884391785,
0.5031319260597229,
0... |
def updateinputs ( self, * inputs ) : self. clear ( true ) if len ( inputs ) < 1 : raise exception ( " error : too few inputs given. " ) if len ( inputs ) > self. max _ inp - self. leninputs : raise exception ( " error : maximum inputs exceeded " ) try : for i in inputs : if not ( isinstance ( i, tuple ) and isinstance... | [
-1.9338983297348022,
-1.006178617477417,
0.6658919453620911,
-0.18365824222564697,
-0.11886513978242874,
0.8546419739723206,
0.06706865131855011,
-0.7447222471237183,
-0.010518069379031658,
0.057073526084423065,
0.9218288064002991,
-0.24142299592494965,
-1.0968329906463623,
0.3074489533901... |
def test _ invalid _ slack ( self ) : # provide a slack channel without ` ` # ` ` form = self. form _ data ( start _ date = " 2020 - 06 - 22 ", end _ date = " 2020 - 06 - 27 ", note = " some note content from test ", slack _ channel = " slack ", project _ type = self. project _ type. pk, client = self. client. pk, ) er... | [
0.5157800316810608,
0.5091179609298706,
0.40771231055259705,
-0.9736614227294922,
1.191730260848999,
0.6287036538124084,
-0.3592900037765503,
-0.2635677754878998,
-0.3523315191268921,
-1.1936838626861572,
-0.06793145090341568,
1.0215775966644287,
0.034571271389722824,
0.16545000672340393,
... |
def tee ( self, num = 2 ) : if isinstance ( self. response, sequence ) : return ( replybuffer ( self. response ), ) * num return tuple ( replybuffer ( t ) for t in itertools. tee ( self. response, num ) ) | [
-1.1522353887557983,
0.5184165835380554,
0.6951848268508911,
-0.3845469355583191,
0.34639912843704224,
-0.5254812836647034,
0.48837360739707947,
-0.9326910972595215,
0.8515623211860657,
-0.5673627257347107,
-0.7509723901748657,
-0.41200312972068787,
-0.6589576601982117,
-0.5815553665161133... |
def getaction ( self, gamestate ) : " * * * your code here * * * " def pacman _ move ( state, depth ) : if state. iswin ( ) or state. islose ( ) : # if the game is over we won't need to check the state return state. getscore ( ) # we can just return the score for that state it is our terminal node pac _ actions = state... | [
-0.34090712666511536,
-0.35774803161621094,
0.7458112835884094,
0.2872433662414551,
0.6890445351600647,
-0.6788307428359985,
0.38030388951301575,
-0.2362033873796463,
-0.11612674593925476,
0.14338499307632446,
0.38898056745529175,
0.7478152513504028,
0.1082882434129715,
0.38106393814086914... |
def no _ autoflush ( fn ) : @ wraps ( fn ) def wrapper ( * args, * * kwargs ) : with db. session. no _ autoflush : return fn ( * args, * * kwargs ) return wrapper | [
-0.6216626763343811,
0.09486521035432816,
0.5286476016044617,
0.018441641703248024,
-0.8875691890716553,
0.14310522377490997,
0.7907009124755859,
-0.25147518515586853,
0.6447210907936096,
-0.7406678795814514,
-0.01478163804858923,
-0.0039893388748168945,
0.4577344059944153,
0.4230440855026... |
def problem4 _ 3 ( product, cost ) : print ( " { 0 : < 23 } $ { 1 : 6. 2f } ". format ( product, cost ) ) | [
0.9569235444068909,
-0.7029401063919067,
0.4525648355484009,
0.9729437828063965,
-0.234648197889328,
0.708503246307373,
-0.6345975995063782,
-0.1089637279510498,
-0.07319319993257523,
0.43557843565940857,
-0.27764710783958435,
0.41306689381599426,
-0.1994124948978424,
-0.6115937829017639,
... |
def insert _ records _ of _ one _ device _ sorted ( self, device _ id, times _ list, measurements _ list, types _ list, values _ list ) : # check parameter size = len ( times _ list ) if ( size! = len ( measurements _ list ) or size! = len ( types _ list ) or size! = len ( values _ list ) ) : raise runtimeerror ( " ins... | [
-1.2101240158081055,
1.5992671251296997,
0.7387316823005676,
0.34569051861763,
0.9764106273651123,
0.7030752897262573,
0.7223697900772095,
-1.1274991035461426,
0.12381217628717422,
0.07591582089662552,
-0.5037880539894104,
-0.1591772586107254,
-1.5325628519058228,
1.2410309314727783,
-0.... |
def _ radix _ sort ( l, i = 0 ) : if len ( l ) < = 1 : return l done _ bucket = [ ] buckets = [ [ ] for x in range ( 255 ) ] for s in l : if i > = len ( s ) : done _ bucket. append ( s ) else : buckets [ ord ( s [ i ] ) ]. append ( s ) buckets = [ _ radix _ sort ( b, i + 1 ) for b in buckets ] return done _ bucket + [ ... | [
-0.647773265838623,
0.7472773790359497,
0.5406880974769592,
-0.17407925426959991,
-1.043493628501892,
0.19988638162612915,
0.2622149884700775,
-1.0483747720718384,
0.21808108687400818,
-0.19226056337356567,
-1.3197858333587646,
-0.455558717250824,
-0.8791374564170837,
-0.013931529596447945... |
def load _ constants ( self, _ dict ) : for k, v in _ dict. items ( ) : self. load _ constant ( k, v ) | [
-0.8030717372894287,
0.09362734854221344,
0.2609049379825592,
-0.1510740965604782,
-0.2757175862789154,
0.6184646487236023,
-1.1323332786560059,
0.1837100237607956,
-0.7788756489753723,
1.4919770956039429,
-0.7806482315063477,
-0.7623962759971619,
-0.009006470441818237,
0.5846629738807678,... |
def _ translate _ _ interfaces _ interface _ encapsulation ( input _ yang _ obj, translated _ yang _ obj = none ) : innerobj = _ translate _ _ interfaces _ interface _ encapsulation _ dot1q _ vlan ( input _ yang _ obj. dot1q _ vlan, translated _ yang _ obj ) return translated _ yang _ obj | [
-0.7095831632614136,
0.34670501947402954,
0.11317047476768494,
-0.18465547263622284,
-0.6612939238548279,
0.6906511187553406,
1.5841844081878662,
-1.0743731260299683,
1.2782963514328003,
0.35964760184288025,
-0.1917836219072342,
-0.15338996052742004,
-0.3569808006286621,
0.4568976759910583... |
def cal _ mse _ loss _ with _ order ( source, estimate _ source, source _ lengths ) : assert source. size ( ) = = estimate _ source. size ( ) b, c, t = source. size ( ) # mask padding position along t mask = get _ mask ( source, source _ lengths ) estimate _ source * = mask # step 1. zero - mean norm num _ samples = so... | [
0.1635463386774063,
-0.09843837469816208,
0.5667284727096558,
0.517450213432312,
-0.382272332906723,
-0.9409022927284241,
-0.1201910749077797,
0.021313786506652832,
0.2915843725204468,
0.8365789651870728,
-0.685256838798523,
0.4815579056739807,
0.22618770599365234,
0.44294244050979614,
0... |
def rotation _ matrix ( self ) : return self. _ rot. as _ matrix ( ) | [
-1.016024112701416,
0.13722611963748932,
0.10095355659723282,
-0.11992496252059937,
1.053178071975708,
-0.604579746723175,
0.8233586549758911,
-0.5964060425758362,
0.7230321168899536,
-1.4398390054702759,
0.3770923316478729,
0.5779388546943665,
-0.7045591473579407,
-1.1507189273834229,
-... |
def post ( self ) : title = self. request. get ( " title " ) content = self. request. get ( " content " ) if self. user : if title and content : user _ obj = user. get _ by _ id ( int ( self. user ) ) # adding publish date directly for now post = post ( title = title, content = content, user = user _ obj, published _ a... | [
-0.39927929639816284,
0.39245960116386414,
0.8180397152900696,
1.225338339805603,
-0.19639597833156586,
1.2563377618789673,
-0.12457446753978729,
0.31193724274635315,
-0.2730754017829895,
-0.3563322126865387,
0.10194601118564606,
0.1970929205417633,
-0.5508991479873657,
0.3301973342895508,... |
def purge ( self ) : request = taskqueue _ service _ pb2. taskqueuepurgequeuerequest ( ) response = taskqueue _ service _ pb2. taskqueuepurgequeueresponse ( ) request. queue _ name = six. ensure _ binary ( self. _ _ name ) if self. _ app : request. app _ id = six. ensure _ binary ( self. _ app ) try : apiproxy _ stub _... | [
-0.764314591884613,
0.014099224470555782,
0.6513164639472961,
0.4433969259262085,
0.11710274964570999,
-0.054733555763959885,
-0.2356335073709488,
-0.43306776881217957,
-0.18085812032222748,
0.23630736768245697,
-0.1447770744562149,
0.9813921451568604,
-0.007742934860289097,
0.159443691372... |
def normalized _ reconstruction _ error ( y _ true, y _ pred, sample _ weights = none, multioutput = " raw _ values " ) : if y _ true. ndim = = 1 : y _ true = y _ true. reshape ( ( - 1, 1 ) ) if y _ pred. ndim = = 1 : y _ pred = y _ pred. reshape ( ( - 1, 1 ) ) numerator = ( ( y _ true - y _ pred ) * * 2 ). sum ( axis ... | [
0.29942187666893005,
-0.2906554937362671,
0.728951096534729,
0.5051541328430176,
-0.6827036142349243,
-0.7858451008796692,
0.6394126415252686,
0.6499089598655701,
-0.2764878571033478,
0.2585531175136566,
0.6449168920516968,
-0.042743902653455734,
0.03395441174507141,
0.2344336211681366,
... |
def test _ init _ checks _ x _ min _ max ( self, xmin, xmax ) : assume ( xmax < = xmin ) with pytest. raises ( valueerror ) as err : rectangulardomain ( xmin, xmax, 0, 1 ) self. assertin ( " must be strictly less than ", str ( err. value ) ) self. assertin ( " xmin ", str ( err. value ) ) self. assertin ( " xmax ", str... | [
0.2329922467470169,
0.15930308401584625,
0.5079354643821716,
-0.22484563291072845,
0.330794095993042,
0.7099141478538513,
-0.9877440333366394,
-0.2702374756336212,
-0.09007834643125534,
-1.1209040880203247,
-0.626729428768158,
0.8952112197875977,
0.4635973274707794,
0.24104830622673035,
... |
def is _ nonempty _ analysis ( self, path ) : if not os. path. exists ( path ) : return false empty _ prefix = self. empty _ prefix ( ) with open ( path,'r') as infile : prefix = infile. read ( len ( empty _ prefix ) ) return prefix! = empty _ prefix | [
0.03252223879098892,
-0.16586366295814514,
0.6319061517715454,
-0.5206887722015381,
0.08286985009908676,
0.022126073017716408,
0.25520506501197815,
-0.03489917889237404,
0.43028783798217773,
0.01984558254480362,
-0.2884507477283478,
-0.33646395802497864,
-0.0225210003554821,
-0.17522595822... |
def _ rotate ( self ) : if ( self. steps > 0 ) : self. steps - = self. step _ resolution self. validate ( ) updated _ state = self. get _ next _ state ( ) if self. direction = = 1 else self. get _ prev _ state ( ) self. _ update _ leads ( updated _ state ) time. sleep ( float ( 60 ) / float ( self. rpm * 360 ) ) self. ... | [
-0.23721131682395935,
0.2709202170372009,
0.5221424102783203,
-0.08951779454946518,
0.5666763782501221,
-0.30259087681770325,
0.2963566780090332,
0.1025746613740921,
-0.20622585713863373,
-0.35421594977378845,
0.009906175546348095,
-0.4418047070503235,
-1.2141382694244385,
-0.3276545405387... |
def _ arrivals _ today _ handler ( self, icao : str ) - > list [ flightconnection ] : return self. _ flight _ connections _ today ( icao, callback = self. client. get _ flight _ arrivals ) | [
-0.7973853945732117,
-0.7756092548370361,
0.5755529999732971,
0.3834306299686432,
0.4041329324245453,
-0.28286993503570557,
-0.2949502468109131,
-0.27424925565719604,
-0.2624114155769348,
-0.21401560306549072,
0.20728076994419098,
-0.4561418890953064,
0.8139033317565918,
0.6863223314285278... |
def randomminload ( self ) : if self. force _ auto _ sync : self. get ('randomminload') return self. _ randomminload | [
-1.179436206817627,
0.01892532967031002,
0.4248993694782257,
0.025599980726838112,
-0.535049319267273,
1.0879371166229248,
0.06788493692874908,
-1.8108099699020386,
1.3988510370254517,
-0.8005426526069641,
-0.7636592984199524,
0.7228341102600098,
-1.0480304956436157,
0.28059497475624084,
... |
def wal _ palatte ( ) : with ( cache _ dir /'colors. json'). open ( ) as file : hex _ p = json. load ( file ) ['colors'] rgb _ p = { name : tint. hex _ to _ rgb ( color ) for name, color in hex _ p. items ( ) } return tuple ( hex _ p. values ( ) ), tuple ( rgb _ p. values ( ) ) | [
-0.8596462607383728,
-0.423297643661499,
0.43255317211151123,
-1.718782663345337,
-0.31891995668411255,
0.2860628366470337,
-1.602057933807373,
-0.20158612728118896,
-0.6857044696807861,
0.8211314678192139,
-1.0579969882965088,
-0.08370321244001389,
0.21397478878498077,
0.12434656172990799... |
def common _ vars ( request ) : try : settings = settings. objects. get ( pk = 1 ) except objectdoesnotexist : settings = { } return {'site _ settings': settings,'domain': request. get _ host ( ), } | [
-1.0007481575012207,
0.6550398468971252,
0.41359588503837585,
0.4093143939971924,
0.6748196482658386,
0.22130905091762543,
1.0984714031219482,
-1.302500605583191,
-0.20086000859737396,
0.8187195062637329,
0.053703874349594116,
-0.4169473350048065,
-0.14700935781002045,
0.8054998517036438,
... |
def save ( self, dest _ fname ) : layers = [ ] net _ layers = len ( self. biases ( ) ) for i in range ( net _ layers ) : layers. append ( {'weights': self. weights ( ) [ i ]. tolist ( ),'biases': self. biases ( ) [ i ]. tolist ( ) } ) net _ params = {'layer _ sizes': self. layer _ sizes ( ),'layers': layers } with open... | [
-0.6785470843315125,
-0.3269232213497162,
0.5542665123939514,
-0.43052905797958374,
0.11246366798877716,
0.2603442072868347,
0.2438277155160904,
-0.041872501373291016,
-0.833112359046936,
0.8436367511749268,
-1.4998931884765625,
-0.2598216235637665,
0.5510015487670898,
1.1995396614074707,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.