text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def train _ val _ test _ split ( data, val _ size = 0. 1, test _ size = 0. 1, random _ state = none ) : idx = np. arange ( data [ " imgs " ]. shape [ 0 ] ) idx _ train, idx _ valtest = train _ test _ split ( idx, test _ size = val _ size + test _ size, random _ state = random _ state, shuffle = true ) idx _ val, idx _ ... | [
-0.70670086145401,
0.4789489805698395,
0.41710835695266724,
-0.5025790929794312,
-0.46208783984184265,
-0.2942065894603729,
-0.03268617391586304,
-0.16329710185527802,
0.5615129470825195,
0.4662821590900421,
-0.030444882810115814,
-0.40349727869033813,
0.2609754502773285,
-0.15195445716381... |
def process _ text ( bot, message, quest ) : pass | [
-0.0329538956284523,
-0.6058321595191956,
0.2712573707103729,
0.19947804510593414,
-0.09147217869758606,
0.46448415517807007,
-0.6148422360420227,
0.10860712826251984,
-0.12560750544071198,
-0.15079213678836823,
-0.012286243960261345,
0.21020236611366272,
-0.8981678485870361,
0.17774090170... |
def reinitialize ( self ) : pass | [
-0.33838051557540894,
-1.3060545921325684,
0.16207817196846008,
0.44733840227127075,
0.5403268933296204,
-0.2446412295103073,
0.7453241348266602,
0.27480942010879517,
-0.4305824339389801,
-0.7433606386184692,
-1.1656049489974976,
0.9445169568061829,
-0.8319696187973022,
-0.1762465536594391... |
def test _ atomic _ boolean _ white _ space _ 3 _ nistxml _ sv _ iv _ atomic _ boolean _ white _ space _ 4 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - whitespace - 4. xsd ", instance = " nistdat... | [
-0.18353162705898285,
0.15016302466392517,
0.4283144474029541,
0.30997714400291443,
-0.22962018847465515,
0.3895854353904724,
0.3935588598251343,
-0.5435142517089844,
-0.23321831226348877,
0.8540093898773193,
-0.4997583329677582,
-0.013417058624327183,
-0.3382011353969574,
0.19047470390796... |
def inner _ product ( vector1, vector2 ) : result = 0 for i in range ( len ( vector1 ) ) : result = result + vector1 [ i ] * vector2 [ i ] return result | [
-0.5951614379882812,
0.4540935754776001,
0.42442724108695984,
0.04241083934903145,
0.1019195020198822,
-0.05620835721492767,
-0.24609622359275818,
-0.10635018348693848,
-0.34714576601982117,
0.04251731559634209,
-0.3686676323413849,
0.9785962700843811,
-1.6993293762207031,
0.12904018163681... |
def browse _ mib ( self, mib _ filepath, mib _ filename, browse ='yes') : status = true wdesc = " browse the mib file " utils. testcase _ utils. psubstep ( wdesc ) oid, label, suffix, mibview, mibbuilder = ws. get _ first _ node _ name ( mib _ filepath, mib _ filename ) temp _ modname, nodedesc, suffix = mibview. getno... | [
0.45677173137664795,
-0.37326186895370483,
0.756557822227478,
0.14664895832538605,
-0.2500089704990387,
0.1075422391295433,
1.0115303993225098,
-0.6996711492538452,
0.33052217960357666,
0.6842793226242065,
-0.013222500681877136,
1.071024775505066,
-1.217544674873352,
0.17147493362426758,
... |
async def ping ( self ) : request = request ( method ='get ', endpoint ='/ _ api / collection') resp = await self. send _ request ( request ) if resp. status _ code in { 401, 403 } : raise serverconnectionerror ('bad username and / or password') if not resp. is _ success : # pragma : no cover raise serverconnectionerro... | [
-0.9757240414619446,
-0.07958510518074036,
0.9008617997169495,
0.16468995809555054,
0.6199092268943787,
-0.09996461868286133,
-0.4771746098995209,
0.31406450271606445,
-0.6201845407485962,
0.27349045872688293,
0.7307648658752441,
0.05247073993086815,
-0.8954476714134216,
-0.014312040992081... |
def get _ empty _ cells ( grid ) : empty = [ ] for j, row in enumerate ( grid ) : for i, val in enumerate ( row ) : if not val : empty. append ( ( j, i ) ) return empty | [
-1.7304829359054565,
0.27594858407974243,
0.4660187363624573,
0.1875419318675995,
0.39547085762023926,
-0.08618969470262527,
0.32818639278411865,
-0.16747505962848663,
-1.0058661699295044,
0.22289182245731354,
-0.5929985642433167,
-0.6239373683929443,
-0.4556763172149658,
0.873901665210723... |
def test _ atomic _ base64 _ binary _ max _ length _ 1 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ max _ length _ 2 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - maxlength - 2. xsd ... | [
-0.07190442830324173,
-0.36722132563591003,
0.3390609622001648,
1.7520180940628052,
-0.16219718754291534,
0.0836712121963501,
-0.1318923979997635,
0.07198386639356613,
-0.2611615061759949,
0.4136045277118683,
-0.5688413977622986,
0.40973129868507385,
0.005277800839394331,
0.361373186111450... |
def charger _ actual _ current ( self ) - > int : return self. _ vehicle _ data. get ( " charge _ state ", { } ). get ( " charger _ actual _ current " ) | [
-0.8654531836509705,
-1.8589433431625366,
0.47048598527908325,
0.19267171621322632,
0.1814899444580078,
0.15843088924884796,
-0.09721372276544571,
-0.19318273663520813,
-0.8286520838737488,
0.46491342782974243,
0.05738944560289383,
0.04468580707907677,
0.48912981152534485,
0.38595461845397... |
def get ( self, request, * args, * * kwargs ) : self. offer = self. get _ object ( ) success _ url = self. get _ success _ url ( ) action = getattr ( self. offer, self. action ) action ( ) return redirect ( success _ url ) | [
-1.2450814247131348,
-0.40950828790664673,
0.6574440598487854,
0.40835216641426086,
0.15059222280979156,
0.4594661593437195,
0.5711585283279419,
0.15301792323589325,
0.706116259098053,
0.05275258049368858,
0.16411055624485016,
0.9603994488716125,
0.5946483612060547,
-0.0683552548289299,
... |
def get _ sts _ token ( self, role _ arn, principal _ arn, assertion, duration ) : try : # temporarily remove the profile envvar because it can cause first - time setup issues profile = os. environ. pop ( " aws _ profile ", none ) # connect to the govcloud sts endpoint if a govcloud arn is found. arn _ region = princip... | [
0.8233930468559265,
-0.4898821711540222,
0.4984334707260132,
-0.09126630425453186,
0.3397609293460846,
0.2990958094596863,
-0.4799768924713135,
0.005831525661051273,
0.38674330711364746,
0.06366155296564102,
0.21747563779354095,
1.146063208580017,
-0.3074430823326111,
-0.5449880361557007,
... |
def get _ head ( self ) : delay = 5 tmp = webdriverwait ( self. driver _ data, delay ). until ( ec. presence _ of _ element _ located ( ( by. id,'fqs - tabs') ) ) # tmp = self. driver _ data. find _ element _ by _ id ('fqs - tabs') tmp = tmp. text. split ('\ n') head _ dict = { } head _ dict ['best _ price'] = tmp [ 1 ... | [
-0.805455207824707,
-0.29924872517585754,
0.8544030785560608,
-0.0635886862874031,
-0.4735787808895111,
-0.07760055363178253,
-0.4308810532093048,
-0.4047393500804901,
-0.9984610676765442,
0.05873345583677292,
-1.0127424001693726,
0.561299204826355,
0.5603944659233093,
-0.16079802811145782... |
def load _ cifar10 ( root ) : xs = [ ] ; ys = [ ] ; for b in range ( 1, 6 ) : f = os. path. join ( root, " data _ batch _ % d " % ( b, ) ) ; x, y = load _ cifar _ batch ( f ) ; xs. append ( x ) ; ys. append ( y ) ; xtr = np. concatenate ( xs ) ; ytr = np. concatenate ( ys ) ; del x, y ; xte, yte = load _ cifar _ batch ... | [
0.4670362174510956,
-0.5091317296028137,
0.5355729460716248,
-0.23923714458942413,
0.2723918557167053,
-0.5447826385498047,
0.46151524782180786,
0.18085046112537384,
-0.48375776410102844,
0.25587034225463867,
-0.5662768483161926,
0.08415495604276657,
0.07999064773321152,
0.3559700250625610... |
def gaussian _ prior ( x, mean, sigma ) : return - 0. 5 * ( ( ( x - mean ) / sigma ) * * 2 + np. log ( 2 * np. pi * sigma * * 2 ) ) | [
0.4758516252040863,
-0.41767990589141846,
0.538949728012085,
-0.22691428661346436,
-1.3744072914123535,
-0.07438448816537857,
-0.49289119243621826,
-0.635947585105896,
0.07862773537635803,
0.2174694836139679,
0.3072779178619385,
1.406466007232666,
-0.12084365636110306,
-0.5546858310699463,... |
def get _ ligand _ chain ( self, ligand, hotspot _ result = none ) : prot = self. read _ protein ( hotspot _ result ) bs = protein. bindingsitefrommolecule ( prot, ligand, 5 ) ligand _ chains = list ( set ( [ r. identifier. split ( " : " ) [ 0 ] for r in bs. residues ] ) ) return ligand _ chains | [
-0.10707872360944748,
-0.471914678812027,
0.33664509654045105,
0.10432469844818115,
0.4585283696651459,
0.726626992225647,
-0.6551569104194641,
-0.2540604770183563,
0.30323347449302673,
-0.35332104563713074,
-1.194459319114685,
-0.2579832375049591,
-0.3758218288421631,
0.23597031831741333,... |
def getservicemanager ( chost = " localhost ", cport = " 2003 " ) : global goservicemanager if not goservicemanager : # get the uno component context from the pyuno runtime olocalcontext = uno. getcomponentcontext ( ) # create the unourlresolver on the python side. olocalresolver = olocalcontext. servicemanager. create... | [
-0.5033308267593384,
-0.07750807702541351,
0.6920822858810425,
-1.1745917797088623,
-0.2777964472770691,
0.2801510989665985,
-0.12984956800937653,
0.3222014307975769,
0.8010343909263611,
-1.0985841751098633,
0.01990417018532753,
0.5668660998344421,
-1.1720738410949707,
0.304861456155777,
... |
def send _ message ( * args, * * kwargs ) : if saq. message _ system is none : logging. error ( " send _ message was called but no message systems are defined " ) return none return saq. message _ system. send _ message ( * args, * * kwargs ) | [
-0.5184064507484436,
0.6189017295837402,
0.49784907698631287,
0.9527083039283752,
0.6986683011054993,
-0.37096473574638367,
-1.1573522090911865,
-0.882953405380249,
0.1403147429227829,
-0.291024386882782,
0.8707570433616638,
0.2913723587989807,
-1.047882080078125,
1.1661807298660278,
-0.... |
def whois _ request _ get _ response ( domain : str, server : str ) - > str : with socket. socket ( socket. af _ inet, socket. sock _ stream ) as sock : sock. connect ( ( server, 43 ) ) sock. send ( ( " % s \ r \ n " % domain ). encode ( " utf - 8 " ) ) buff = b " " while true : data = sock. recv ( 1024 ) if len ( data... | [
-0.5891092419624329,
-0.10781341046094894,
0.7984838485717773,
-0.15647506713867188,
-0.33630090951919556,
-0.0932936742901802,
-0.5554919838905334,
-1.1184742450714111,
0.7354855537414551,
-0.15934930741786957,
0.6582850813865662,
0.9611166715621948,
-1.1194523572921753,
-0.92744791507720... |
def run _ cmd _ sroot ( args, srootbase, * * kwargs ) : myprint ('cmd : ', args ) cmd ='eval $ ('+ os. path. join ( srootbase,'setup. sh') +') ;'cmd + =''. join ( args ) subprocess. check _ call ( cmd, shell = true, * * kwargs ) | [
0.021995434537529945,
-0.6798629760742188,
0.902972400188446,
0.3134769797325134,
0.1637665182352066,
0.1568850576877594,
0.3055134117603302,
-0.35499799251556396,
-0.20587854087352753,
0.3809405565261841,
0.10580117255449295,
0.7402921915054321,
-0.7854894995689392,
0.9023430347442627,
... |
def change _ progress ( self, p ) : if self. playing = = 0 : self. parent. pslider. setvalue ( 0 ) return pygame. mixer. music. load ( self. music [ self. currentindex ]. path ) pygame. mixer. music. play ( start = int ( p * self. music [ self. currentindex ]. length ) ) self. processedited. emit ( int ( p * self. musi... | [
-0.8780247569084167,
0.06658732146024704,
0.7577389478683472,
-0.7914223074913025,
-0.2208852767944336,
0.32362180948257446,
0.31619590520858765,
-0.04254261031746864,
-0.4322752356529236,
0.5782191157341003,
0.26179221272468567,
0.2621951103210449,
-1.525199294090271,
-0.21805326640605927... |
def generate _ client _ id ( length = 30, chars = client _ id _ character _ set ) : return generate _ token ( length, chars ) | [
-0.0698498785495758,
-0.4026128649711609,
0.1343930959701538,
-1.4160813093185425,
-0.7370477318763733,
0.08443012833595276,
-0.6711270213127136,
-0.4616515338420868,
0.32325565814971924,
-0.38710451126098633,
-1.0367404222488403,
1.1448694467544556,
-0.30112093687057495,
-1.23379981517791... |
def test _ get _ objects _ by _ user _ image _ file ( self ) : data = dict ( file = ( bytesio ( b'some file data'),'file. txt') ) response = self. client. open ('/ / objects ', method ='post ', data = data, content _ type ='multipart / form - data') self. assert200 ( response,'response body is :'+ response. data. decod... | [
-0.4382705092430115,
-0.020452121272683144,
0.7020463943481445,
0.21692292392253876,
0.1873359978199005,
1.1191548109054565,
0.9512667059898376,
-0.7940553426742554,
-1.0481364727020264,
-0.23579666018486023,
-1.2425516843795776,
-0.07538260519504547,
0.01928723230957985,
0.166590526700019... |
def utm2mgrs ( utm ) : utm =''. join ( e for e in utm if e. isalnum ( ) ) # removes spaces in the input grid izonenum = int ( utm [ : 2 ] ) strzonelet1 = utm [ 2 ]. lower ( ) dbleasting = float ( utm [ 3 : 9 ] ) dblnorthing = float ( utm [ 9 : ] ) # # check the zone number / letter are correct if izonenum < 1 or izonen... | [
-0.263044536113739,
-0.383879691362381,
0.6393921375274658,
-1.2809239625930786,
-0.32198837399482727,
-0.5629220604896545,
-0.21116076409816742,
-0.5623272061347961,
0.18606941401958466,
0.6694642305374146,
0.5850984454154968,
-0.21541239321231842,
-0.6795710921287537,
0.08787915855646133... |
def test _ module ( self ) : try : self. get _ endpoints ( limit = 1 ) except exception as err : if'api request unauthorized'in str ( err ) : # this error is received from the core server when the client clock is not in sync to the server raise demistoexception ( f'{ str ( err ) } please validate that your both'f'xsoar... | [
0.2744266390800476,
0.9312061071395874,
0.3508259952068329,
0.4551481604576111,
1.2889270782470703,
0.4599734842777252,
0.28291746973991394,
-0.3908170163631439,
0.11723034828901291,
0.03605236858129501,
0.4441724717617035,
0.9542719721794128,
-0.7794408798217773,
0.2218795269727707,
0.5... |
def loading _ plot ( output _ dir : str, ranks : skbio. ordinationresults, table : biom. table, sample _ metadata : qiime2. metadata, feature _ metadata : qiime2. metadata = none, extreme _ feature _ count : int = none, debug : bool = false, ) - > none : create _ q2 _ visualization ( output _ dir, rename _ loadings ( r... | [
0.2631700038909912,
0.265710711479187,
0.38658735156059265,
0.3871486485004425,
-1.3213777542114258,
0.21125663816928864,
0.0727006271481514,
0.33310046792030334,
-0.8338416218757629,
0.3278155028820038,
0.2039586454629898,
1.3602979183197021,
0.8720403909683228,
-0.2537344992160797,
0.1... |
def service _ ips _ changed ( ) : designate _ bind. reconfigure _ service _ ips ( ) | [
-0.5520687103271484,
-0.6410421133041382,
0.12533117830753326,
0.7625987529754639,
-0.49412572383880615,
-0.7959553003311157,
-0.11463116109371185,
0.9705816507339478,
0.1707361340522766,
0.02208697609603405,
0.3352014124393463,
1.3162449598312378,
0.9387723207473755,
-0.20501980185508728,... |
def can _ view _ project ( fn ) : def wrapper ( * args, * * kwargs ) : request = args [ 0 ] user = request. user pk = args [ 1 ] project = project. objects. get ( pk = pk ) if user in project. clients. all ( ) or user. has _ perm ( " projects. can _ view _ all " ) : return fn ( * args, * * kwargs ) # they can't access ... | [
-0.11139912158250809,
0.44423753023147583,
0.6486259698867798,
0.5063332319259644,
-1.2357988357543945,
0.9680431485176086,
0.5794447660446167,
0.1578819304704666,
0.34399306774139404,
-0.3864968419075012,
1.4192816019058228,
0.5530515909194946,
0.3460320830345154,
-0.04786837846040726,
... |
def next _ int ( address = none ) : if address is none : ins = pwndbg. disasm. one ( pwndbg. regs. pc ) if not ins : return none address = ins. next ins = pwndbg. disasm. one ( address ) while ins : if set ( ins. groups ) & jumps : return none if set ( ins. groups ) & interrupts : return ins ins = pwndbg. disasm. one (... | [
0.052469220012426376,
0.4142378866672516,
0.48862478137016296,
-0.22849947214126587,
-1.6165691614151,
-0.6446161866188049,
1.0979350805282593,
-0.5866681933403015,
0.7542222738265991,
-0.6647388339042664,
0.7070277333259583,
0.13017907738685608,
-1.7280163764953613,
-0.3021068274974823,
... |
def fuelcost ( mass ) : return ( math. floor ( mass / 3 ) - 2 ) | [
-0.14335869252681732,
-0.09502533823251724,
0.15454037487506866,
-0.020949868485331535,
-0.5686762928962708,
-0.39222466945648193,
-0.44770240783691406,
0.393435537815094,
-0.8448159098625183,
-0.30433040857315063,
0.27090781927108765,
-0.8515443205833435,
-0.05727372691035271,
0.389989763... |
def bib _ key ( self ) : # key for authors authors _ key = self. authors _ contracted # key for title # # remove most common propositions and articles to _ remove = ['a ','and ','in ','of ','on ','or ','the ','for'] title _ key = delete _ words ( self. title, to _ remove, case _ sensitive = false ) print ( title _ key ... | [
-0.04636248201131821,
-1.2071863412857056,
0.7312688827514648,
-0.1727222502231598,
-0.03881489858031273,
0.5920706391334534,
-0.468493789434433,
0.5928236246109009,
-0.6000507473945618,
0.8002426028251648,
0.33505070209503174,
0.8037653565406799,
-0.6308130025863647,
-0.7449527382850647,
... |
def test _ obfuscate _ header ( self ) : self. obfuscate _ header _ match ( " authorization ", " basic qwxhzgrpbjppcgvuu2vzyw1l ", " * * * * * * * * " ) self. obfuscate _ header _ match ( " authorization ", " basic qwxhzgrpbjppcgvuu2vzyw1l ", " * * * * * * * * " ) self. obfuscate _ header _ match ( " authorization ", "... | [
-0.23630057275295258,
0.2941204011440277,
0.9782768487930298,
0.7669715285301208,
0.13530685007572174,
0.0921710953116417,
-0.3522741496562958,
-1.4469678401947021,
-0.07277411967515945,
-0.2308855950832367,
-0.9432146549224854,
-0.3492896854877472,
-0.9037030935287476,
-0.1175119951367378... |
def test _ carnivores _ eat ( self ) : pop = [ {'species':'herbivore ','age': 0,'weight': 10 } for _ in range ( 40 ) ] self. cell. add _ population ( pop ) self. cell. animals. append ( self. carnivore ) self. carnivore. fitness = 1 self. carnivore. f = 100 ini _ weight = self. carnivore. weight self. cell. carnivores ... | [
0.19787883758544922,
-0.055496565997600555,
0.43986257910728455,
0.7848550081253052,
0.6449587345123291,
-0.28269845247268677,
-0.9796760082244873,
-0.027225907891988754,
-1.1140261888504028,
0.19369708001613617,
-0.30792927742004395,
-0.3271844685077667,
-0.17049092054367065,
-0.613089680... |
def clear ( self ) : self. board = ['* ','* ','* ','* ','* ','* ','* ','* ','*'] self. count = 0 | [
-0.31223195791244507,
0.3170725405216217,
0.5719289183616638,
-0.08674999326467514,
-0.42150694131851196,
0.7706032991409302,
0.09812846779823303,
0.3132597804069519,
-0.4495294392108917,
0.5039395689964294,
-0.10035797208547592,
1.4481364488601685,
-0.43725162744522095,
0.1175766140222549... |
def cmi _ 1d _ ggd ( x, y, z, biascorrect = true, demeaned = false ) : x = np. atleast _ 2d ( x ) y = np. atleast _ 2d ( y ) if x. ndim > 2 or y. ndim > 2 : raise valueerror ( " x and y must be at most 2d " ) if z. ndim > 1 : raise valueerror ( " only univariate discrete variables supported " ) if not np. issubdtype ( ... | [
0.211034893989563,
0.0074749416671693325,
0.5753377676010132,
-0.17747275531291962,
-1.1728631258010864,
0.47471264004707336,
0.3735083043575287,
-0.40271079540252686,
-0.2915896773338318,
0.5046887397766113,
0.24561837315559387,
0.60943603515625,
-0.9948982000350952,
0.9162954092025757,
... |
def extendright ( currenthit, cdsseq, geneseq ) : k = 0 for i, j in zip ( cdsseq [ currenthit [ 1 ] : ], geneseq [ currenthit [ 3 ] : ] ) : if i = = j : k = k + 1 else : break hit = [ currenthit [ 0 ], currenthit [ 1 ] + k, currenthit [ 2 ], currenthit [ 3 ] + k, currenthit [ 4 ], currenthit [ 5 ] ] return hit | [
-0.3299703299999237,
-0.2993259131908417,
0.6793602108955383,
-0.05151226744055748,
-0.288768470287323,
-0.3898715078830719,
-0.005541328806430101,
0.28086408972740173,
-0.2533820867538452,
0.8752729296684265,
-0.28325024247169495,
0.352180540561676,
-0.8901104927062988,
-0.329599320888519... |
def stalemate ( board ) : return false | [
-0.900567889213562,
0.3496014177799225,
0.3091455399990082,
0.9967929124832153,
-0.8464043736457825,
0.696678876876831,
-0.6346202492713928,
0.4104273319244385,
0.6601280570030212,
0.31529250741004944,
-0.2728714048862457,
-1.3564436435699463,
-1.5035778284072876,
0.02181876078248024,
-1... |
def _ prepare _ file _ arg ( file : union [ str, textio, path, binaryio ] ) - > union [ str, textio, path, binaryio ] : if _ is _ url ( file ) : if isinstance ( file, path ) : file = str ( file ) if isinstance ( file, str ) and file. startswith ( " http " ) : file = _ process _ http _ file ( file ) else : if isinstance... | [
-0.016898654401302338,
-0.331554651260376,
0.713563859462738,
-0.36806726455688477,
-0.04190562292933464,
0.3843417763710022,
0.1404998004436493,
0.2351706475019455,
-0.4004748463630676,
-0.07176894694566727,
0.4763089716434479,
-0.11580605804920197,
0.17851002514362335,
0.3002250492572784... |
def set _ mydocs ( self, value ) : super ( searchbycategoryinputset, self ). _ set _ input ('mydocs ', value ) | [
-0.9768355488777161,
0.5576192140579224,
0.31706497073173523,
-0.32033202052116394,
-0.4477834701538086,
-0.017443474382162094,
1.1413084268569946,
-1.3416471481323242,
-0.21997401118278503,
-0.7906445860862732,
-0.13020184636116028,
-0.37282076478004456,
-0.4171125888824463,
0.62809723615... |
def get _ force _ random _ fields _ for _ mixer ( self, model _ class, excluded _ fields = none, * * kwargs ) : excluded _ fields = {'id'} | set ( excluded _ fields or [ ] ) co _ fields = { field. name : self. mixer. random for field in model _ class. _ meta. fields if field. name not in excluded _ fields } for field _... | [
-0.7444408535957336,
0.35414859652519226,
0.4556273818016052,
-0.6274226903915405,
-0.5957856774330139,
0.52753084897995,
-0.14646324515342712,
-0.32180941104888916,
0.24036571383476257,
0.16824723780155182,
-1.6891590356826782,
-0.11610447615385056,
-0.5359954833984375,
0.2755396366119385... |
def get _ fs _ usages ( self, datetime = none, select ='*') : if not datetime : datetime ='( select max ( datetime ) from broad _ bitstore _ app. bits _ billing _ byfs _ bitstore _ historical )'dataset ='broad _ bitstore _ app'table _ name ='bits _ billing _ byfs _ bitstore _ historical'query _ string =''. join ( ['sel... | [
-1.0197184085845947,
0.6150763630867004,
0.9040899276733398,
0.34733352065086365,
-0.3040348291397095,
-1.3819873332977295,
-0.10692404210567474,
-0.39416980743408203,
-0.48567596077919006,
0.21199236810207367,
0.00011719809117494151,
0.18918448686599731,
0.02718604914844036,
0.60818481445... |
def evaluation _ rate ( self ) : rate = 0 rate _ count = 0 self. evaluationdetail _ set. all ( ) for evaluation in self. evaluationdetail _ set. all ( ) : if evaluation. eval _ item : rate _ count + = ( 1 * 1. 0 ) rate + = ( evaluation. eval _ value * 1. 0 ) ranking = rate / rate _ count if ranking < = 50 : self. ranki... | [
-0.370659202337265,
0.4637356996536255,
0.2624596655368805,
-0.6869871616363525,
0.48823413252830505,
-0.05298340693116188,
-0.18416205048561096,
0.6982093453407288,
-0.1938268393278122,
0.5875697731971741,
0.8828529715538025,
0.030088065192103386,
-0.36198973655700684,
0.4080290198326111,... |
def launch _ splign ( cdsseqfilename, geneseqfilename, cdsid, geneid ) : splignoutputname = os. getcwd ( ) +'/ src / results / splign _ results / cds _'+ cdsid +'vs _ gene _'+ geneid + ". splign " os. system ( os. getcwd ( ) + " / src / splign - query " + cdsseqfilename + " - subj " + geneseqfilename + " - disc - aln "... | [
0.8137267827987671,
-1.5254567861557007,
0.588348388671875,
0.018481900915503502,
-1.0971291065216064,
0.11389049887657166,
0.4726839065551758,
0.8858233690261841,
0.3257037103176117,
-0.4338918626308441,
-0.3843636214733124,
0.8130918145179749,
0.10920311510562897,
0.0000932342154555954,
... |
def trapezoidalrule ( f, n, a, b, tf ) : h = ( b - a ) / n if tf : print ( bcolors. fail, " error evaluation en = ", round ( trapezerror ( func ( ), b, a, h ), 6 ), bcolors. endc ) integral = 0. 5 * ( f ( a ) * f ( b ) ) for i in range ( n ) : integral + = f ( a + h * i ) integral * = h return integral | [
0.5342377424240112,
0.9484018087387085,
0.2312779575586319,
-0.1598808616399765,
0.480751097202301,
0.24436259269714355,
0.5666168928146362,
0.25722837448120117,
-1.0818867683410645,
0.5088974237442017,
0.14987628161907196,
-0.7455106973648071,
-0.34435516595840454,
0.19222934544086456,
... |
def _ build _ partition ( self, inventory ) : partition _ repository = objectrepository ( ) partition _ repository. _ store = inventory. _ store log. info ('identifying target sites.') partition = inventory. partitions [ self. policy. partition _ name ] partition. embed _ tree ( partition _ repository ) # ask each site... | [
0.14766043424606323,
0.10968560725450516,
0.4950774312019348,
-0.32889410853385925,
-0.05544625222682953,
-0.21676313877105713,
0.8634111285209656,
0.20812465250492096,
1.2350057363510132,
0.24230846762657166,
0.3277156949043274,
0.48367539048194885,
0.04269794374704361,
-0.572092115879058... |
def get _ file _ info ( file ) : dict = { } for info in get _ ghc _ info ( file ) : results = get _ info _ from _ ghc _ info ( info ) for key in results : if ( key in dict ) : dict [ key ]. append ( results [ key ] ) else : dict [ key ] = [ results [ key ] ] # print ( dict ) if len ( dict ) < 4 : dict = { " memory " : ... | [
0.3904714286327362,
-0.00832547340542078,
0.8696929216384888,
-0.7659942507743835,
-0.16034118831157684,
-0.11241774260997772,
0.04694724455475807,
-0.44401127099990845,
-1.2272815704345703,
0.25009867548942566,
-0.4359811842441559,
-0.03445873036980629,
0.009314664639532566,
1.34690880775... |
def coords _ from _ df _ iter ( df _ iter, pos _ columns, t _ column ) : ndim = len ( pos _ columns ) for df in df _ iter : if len ( df ) = = 0 : yield none, np. empty ( ( 0, ndim ) ) else : yield df [ t _ column ]. iloc [ 0 ], df [ pos _ columns ]. values | [
-0.5328279733657837,
-0.5506004095077515,
0.2516271471977234,
-0.4276251196861267,
0.6595869660377502,
-0.11264187097549438,
0.005750925745815039,
0.06939429044723511,
-1.5479083061218262,
0.2915956974029541,
0.26146188378334045,
-1.0998916625976562,
0.6060804128646851,
-0.1620916426181793... |
def reset ( ) : eventlist. simtime = 0. 0 eventlist. event _ list. clear ( ) for sim _ entity in eventlist. sim _ entities : if sim _ entity. persistent : sim _ entity. reset ( ) if hasattr ( sim _ entity,'run') : sim _ entity. schedule ('run ', 0. 0, priority = priority. highest ) else : eventlist. sim _ entities. rem... | [
0.31171631813049316,
0.1848173886537552,
0.5686848163604736,
0.5369258522987366,
0.349162220954895,
-0.07696780562400818,
0.431672066450119,
0.08538542687892914,
-0.1490306258201599,
0.5460643172264099,
-0.43142828345298767,
-0.01794704608619213,
0.18852108716964722,
0.4279296100139618,
... |
def process _ next _ decision _ task ( self ) : event = none for self. _ last _ event _ idx in range ( self. _ last _ event _ idx + 1, len ( self. events ) ) : event = self. events [ self. _ last _ event _ idx ] self. is _ replaying = event ['eventid'] < = self. previous _ started _ event _ id self. last _ event _ time... | [
0.734620213508606,
-0.18565337359905243,
0.7792472243309021,
0.2529321014881134,
-0.2451658844947815,
0.028298521414399147,
0.538577139377594,
0.35151636600494385,
0.4609023332595825,
0.624962329864502,
-0.05248894914984703,
1.012146234512329,
0.07043817639350891,
-0.531711757183075,
0.6... |
def crossmatch ( x, y ) : # check to make sure the second list is unique if len ( np. unique ( y ) )! = len ( y ) : msg = " \ nthe second array must only contain unique entries. " raise halotoolserror ( msg ) mask = np. where ( np. in1d ( y, x ) = = true ) [ 0 ] index _ x = np. argsort ( x ) sorted _ x = x [ index _ x ... | [
0.2263282984495163,
-0.1851973980665207,
0.7283737063407898,
0.3860982060432434,
-0.28754866123199463,
-0.1527981013059616,
0.044124115258455276,
-0.44929084181785583,
0.19460061192512512,
0.9680529832839966,
-0.4349982738494873,
1.0044218301773071,
-0.056616418063640594,
0.272324413061141... |
def test _ list _ decimal _ length _ 3 _ nistxml _ sv _ iv _ list _ decimal _ length _ 4 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - length - 4. xsd ", instance = " nistdata / list / decimal / schem... | [
-0.03996366634964943,
-0.06535086780786514,
0.42171353101730347,
0.2641648054122925,
0.2915309965610504,
-0.19596824049949646,
-0.24090155959129333,
0.3524625301361084,
0.8038512468338013,
-0.006769635248929262,
-1.1477537155151367,
-1.0806423425674438,
-0.28361913561820984,
0.221050038933... |
def to _ str ( self ) : # type : ( ) - > str return pprint. pformat ( self. to _ dict ( ) ) | [
-0.02507905103266239,
-0.6505337953567505,
0.5015242099761963,
-1.018258810043335,
-0.1121690422296524,
0.6268163323402405,
-0.9415467381477356,
-0.6236202716827393,
0.015478734858334064,
-0.07459699362516403,
0.9055070877075195,
0.6569955348968506,
0.013707230798900127,
-0.295526832342147... |
def test _ atomic _ qname _ pattern _ nistxml _ sv _ iv _ atomic _ qname _ pattern _ 1 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - pattern - 1. xsd ", instance = " nistdata / atomic / qname / schema... | [
-0.02656049281358719,
-0.5440123677253723,
0.4504683315753937,
0.22587326169013977,
-0.5314905643463135,
0.3694949150085449,
0.47045066952705383,
-0.6189622282981873,
0.190346822142601,
0.7124612331390381,
-0.5206409692764282,
-0.12413611263036728,
-0.20692607760429382,
-0.0946309268474578... |
def new _ action ( self, actor, action _ object, action _ key, target _ object = none ) : action = self. model ( actor _ content _ type = contenttype. objects. get _ for _ model ( action _ object. _ _ class _ _ ), actor _ object _ id = smart _ unicode ( action _ object. id ), action _ content _ type = contenttype. obje... | [
-0.873136043548584,
-1.7699791193008423,
0.7251985669136047,
0.16271695494651794,
0.880772590637207,
0.020525189116597176,
0.5301862955093384,
0.11844201385974884,
0.41332313418388367,
1.0005921125411987,
-0.6040416359901428,
0.7698153257369995,
0.14098988473415375,
-0.04439472779631615,
... |
async def create _ product _ version _ async ( self, request : servicecatalog _ 20210901 _ models. createproductversionrequest, ) - > servicecatalog _ 20210901 _ models. createproductversionresponse : runtime = util _ models. runtimeoptions ( ) return await self. create _ product _ version _ with _ options _ async ( re... | [
-1.4826761484146118,
0.07445459067821503,
0.26896002888679504,
0.59586101770401,
0.49026358127593994,
0.47164031863212585,
0.3654932677745819,
-1.7667516469955444,
0.49444207549095154,
0.129095658659935,
-0.49671629071235657,
0.784062385559082,
0.18488231301307678,
-0.2082839012145996,
-... |
def _ userinput ( user ) : userinput ='' userinput = user userinput = userinput. replace ( " ; ", " " ) userinput = userinput. replace ( " = ", " " ) pre = " comment1 = cooking % 20mcs ; userdata = " append = " ; comment2 = % 20like % 20a % 20pound % 20of % 20bacon " return pre + userinput + append | [
-0.1788042187690735,
0.1538163274526596,
0.6281378269195557,
-0.75364089012146,
-1.198338508605957,
0.5131301283836365,
0.36265841126441956,
-0.3215579390525818,
0.0739852786064148,
-0.3793264329433441,
-0.37042343616485596,
-0.2425234019756317,
-0.05969029664993286,
-0.0780872330069542,
... |
def set _ intersections _ with _ interval ( self, interval, new _ data ) : x = self. get _ intersections _ with _ interval ( interval ) x [ : ] = new _ data | [
-0.6643441915512085,
-0.09839683771133423,
0.42435222864151,
0.592810332775116,
0.25008338689804077,
0.5414191484451294,
-0.7557231187820435,
0.25494417548179626,
-0.47819823026657104,
0.36155176162719727,
-0.7498031854629517,
0.7125027775764465,
-0.41186413168907166,
-0.23540429770946503,... |
def get _ xml _ str ( self, root = " artifact " ) : root = self. get _ xml _ element ( root ) return tostring ( root, pretty _ print = true ) | [
0.07962287217378616,
-0.45892491936683655,
0.217378169298172,
0.38270214200019836,
-0.8792561292648315,
0.1540609449148178,
-0.35838350653648376,
-0.4429798722267151,
0.4199797809123993,
-0.49021002650260925,
1.4678750038146973,
0.8809741735458374,
0.24337832629680634,
-0.45138829946517944... |
def calc _ delta _ energy ( self, x, y ) : spin = self. _ spins [ y, x ] neighbours = self. get _ neighbours ( x, y ) return 2 * spin * sum ( neighbours ) | [
0.1353311836719513,
-0.3051210939884186,
0.7153664231300354,
0.3184889256954193,
-0.9719671607017517,
0.31793153285980225,
-0.48859596252441406,
0.1498611569404602,
-0.3082718253135681,
0.2319917529821396,
-0.5616286993026733,
0.6461362838745117,
-0.6331216096878052,
-0.5400635004043579,
... |
def append ( self, afmdata ) : if not isinstance ( afmdata, afmdata ) : raise valueerror ( " ` afmdata ` must be an instance of ` afmdata `! " ) self. _ mmlist. append ( afmdata ) | [
-0.30428266525268555,
0.06928963214159012,
0.32581979036331177,
-0.20969520509243011,
-0.3231694996356964,
1.3239929676055908,
-1.2679474353790283,
-0.6348130702972412,
1.3523242473602295,
-0.2743661105632782,
0.5766609907150269,
0.8377076983451843,
0.29207268357276917,
2.097745895385742,
... |
def draw _ card ( self ) : engine = db. create _ engine ('sqlite : / / / database / card. db') connection = engine. connect ( ) metadata = db. metadata ( ) response = db. table ('response ', metadata, autoload = true, autoload _ with = engine ) query = db. select ( [ response ] ). order _ by ( func. random ( ) ). limit... | [
-0.5439749360084534,
0.33412355184555054,
0.7080792784690857,
-1.0801366567611694,
0.9724313020706177,
0.15505370497703552,
-1.0624613761901855,
-0.06484390050172806,
0.4312967360019684,
-0.5250388383865356,
-0.30702415108680725,
-0.2876167297363281,
-0.0833546370267868,
-0.394847661256790... |
def test _ atomic _ hex _ binary _ enumeration _ 1 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ enumeration _ 2 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - enumeration - 2. xsd ", instance ... | [
-0.8119255304336548,
-0.8579979538917542,
0.650914192199707,
1.1433871984481812,
-0.08673764765262604,
0.35275405645370483,
-0.09262274950742722,
0.33947810530662537,
-0.5083374381065369,
0.4734728932380676,
-0.50871741771698,
0.09040848910808563,
0.5618222951889038,
0.5199097394943237,
... |
def test _ list _ decimal _ enumeration _ 1 _ nistxml _ sv _ iv _ list _ decimal _ enumeration _ 2 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - enumeration - 2. xsd ", instance = " nistdata / list / ... | [
-0.9437193870544434,
-1.1131778955459595,
0.6726662516593933,
0.8476127982139587,
-0.04422399774193764,
-0.27345478534698486,
-0.03187460079789162,
0.3346954882144928,
0.3804893493652344,
-0.14412927627563477,
-1.0463734865188599,
-0.0701151117682457,
0.5165953040122986,
0.7608464360237122... |
def p _ x _ given _ y ( self, label, feature _ id ) : p _ x _ given _ y = 0. 0 # # # # # # # # # # # # # # # # # # # # # # # # # # # * * * your code here * * * # # initialize p _ x _ given _ y to the probability of feature with feature _ id given class label # # # # # # # # # # # # # # # # # # # # # # # # # # return se... | [
-0.11382580548524857,
-0.44323018193244934,
0.5301820039749146,
0.3487548232078552,
0.4378204345703125,
0.9728423953056335,
-0.44696569442749023,
-0.28323572874069214,
-0.8420788645744324,
0.4561726450920105,
0.10275902599096298,
0.050583478063344955,
-0.3187541365623474,
0.122712887823581... |
def _ _ init _ _ ( self ) : self. checksum = none self. checksum _ version = none super ( ). _ _ init _ _ ( ) | [
1.2132515907287598,
-0.7347809076309204,
0.49332335591316223,
0.6119222044944763,
1.0118268728256226,
0.09719535708427429,
-0.26791781187057495,
1.1839089393615723,
0.6342532634735107,
-0.4029572606086731,
-1.64414644241333,
0.2041371613740921,
0.25134360790252686,
1.1090174913406372,
0.... |
def poll ( self, timeout : int ) - > optional [ messaget ] : return self. _ consumer. poll ( timeout ) | [
0.1048174723982811,
-0.05544210970401764,
0.3901378810405731,
-0.058620236814022064,
0.2986437976360321,
0.03812231868505478,
-1.3272175788879395,
-1.5647517442703247,
-0.08457009494304657,
0.7976953983306885,
0.76695317029953,
0.08299592137336731,
-0.5297411680221558,
-0.31902387738227844... |
def string _ to _ int _ list ( any _ list ) : n = 0 while n < len ( any _ list ) : any _ list [ n ] = int ( any _ list [ n ] ) n + = 1 return ( any _ list ) | [
-0.31936898827552795,
-0.7203810214996338,
0.21231313049793243,
-0.3243817090988159,
0.3407382667064667,
-0.5581201314926147,
-0.5609049797058105,
1.1418489217758179,
0.7003797292709351,
0.6018280982971191,
-1.9613710641860962,
0.4345085918903351,
-0.9568884372711182,
0.6065480709075928,
... |
def sentence _ similarity ( sentence1, sentence2 ) : # tokenize and tag sentence1 = pos _ tag ( word _ tokenize ( sentence1 ) ) sentence2 = pos _ tag ( word _ tokenize ( sentence2 ) ) # print ( sentence1 ) # print ( sentence2 ) # get the synsets for the tagged words synsets1 = [ tagged _ to _ synset ( * tagged _ word )... | [
0.6516503095626831,
0.07659889757633209,
0.778263509273529,
0.17906200885772705,
-0.43994536995887756,
-1.5293158292770386,
-0.59553462266922,
-0.21327827870845795,
-0.18800616264343262,
0.309858500957489,
-0.7081685066223145,
-0.3752782344818115,
-0.01938599906861782,
1.2210534811019897,
... |
def test _ imports ( self ) : from collective. blog. feeds import viewlets self. asserttrue ( true ) | [
1.3001114130020142,
1.0047049522399902,
0.20758384466171265,
0.12296529859304428,
0.8089807033538818,
1.4887213706970215,
-0.14791221916675568,
-0.5225351452827454,
0.253892183303833,
0.0075509212911129,
-1.264068365097046,
-0.2634600102901459,
-0.2724839746952057,
0.043958768248558044,
... |
def replacetag ( path _ to _ datacard, tag, value ) : # if value is a path then all / should be used with \ / : corrected _ value = replacespecchar ( str ( value ) ) command = " sed - i's / " + str ( tag ) + " / " + str ( corrected _ value ) + " / g'" + path _ to _ datacard call ( command, shell = true ) | [
0.2505597472190857,
-0.28184688091278076,
0.47121477127075195,
-0.4055473208427429,
-0.21434800326824188,
-0.18526533246040344,
-0.23150378465652466,
0.9968011379241943,
-0.7280800342559814,
-0.04261421412229538,
0.03751622512936592,
0.7034560441970825,
0.39451196789741516,
0.9134257435798... |
def linearization _ iter2 ( root ) : if not root : return node = root stack = [ ] dummy = current = treenode ( ) while stack or node : if node : stack. append ( node ) node = node. left else : node = stack. pop ( ) node. left = none current. right = node current = current. right node = node. right return dummy. right | [
0.6554049253463745,
0.45500192046165466,
0.7544242143630981,
-0.07049255818128586,
-0.8415122628211975,
-0.6937373280525208,
0.0680200606584549,
-0.4031052589416504,
0.04083770886063576,
0.8890597820281982,
-0.4985407292842865,
0.43473222851753235,
-1.2543622255325317,
1.2952558994293213,
... |
def font _ variant ( self, font _ variant ) : allowed _ values = [ " all - caps ", " no - caps ", " handwritten ", " collage " ] # noqa : e501 if font _ variant not in allowed _ values : raise valueerror ( " invalid value for ` font _ variant ` ( { 0 } ), must be one of { 1 } ". format ( font _ variant, allowed _ value... | [
-0.4466913938522339,
-0.22733841836452484,
-0.6284086108207703,
0.25705522298812866,
0.03360731154680252,
0.9071695804595947,
0.8602504134178162,
0.12220810353755951,
-0.2705380916595459,
-0.8973382711410522,
-0.5056506395339966,
-0.2649138569831848,
0.26040515303611755,
-0.025511637330055... |
def predict _ future _ correlations ( self, weeks ) : hmm = self. hmm predicted _ next _ correlations = pd. dataframe ( ) for day _ index in range ( self. n _ latency _ weeks, self. n _ latency _ weeks + weeks ) : state _ sequence = self. predict ( self. es _ corr _ test. iloc [ 0 : day _ index, : ] ) next _ state _ pr... | [
-1.2907506227493286,
0.8844040036201477,
0.5250651240348816,
-1.0057696104049683,
-0.27932363748550415,
-0.4215473234653473,
0.06319708377122879,
-0.6112179756164551,
0.7350820302963257,
-0.36285558342933655,
0.6477004289627075,
-0.08083729445934296,
0.23631760478019714,
-0.248426526784896... |
def test _ calculate _ price ( self ) : price _ generator = pricegenerator ( self. call ) price = price _ generator. calculate _ price ( ) self. assertequal ( price, decimal ( 0. 54 ). quantize ( decimal ('0. 01') ) ) | [
-0.3040660619735718,
-0.04718952998518944,
0.14440228044986725,
0.5071389675140381,
0.7414321899414062,
-0.001077616005204618,
-0.5170503258705139,
0.1724565476179123,
-0.024958554655313492,
-0.4636284410953522,
-0.3770807683467865,
-1.539579153060913,
-0.5870535969734192,
0.54911690950393... |
def _ get _ signature _ type _ and _ params ( self, request ) : # per rfc5849, only the authorization header may contain the'realm'optional parameter. header _ params = signature. collect _ parameters ( headers = request. headers, exclude _ oauth _ signature = false, with _ realm = true ) body _ params = signature. col... | [
-0.8462092280387878,
-0.2834860682487488,
0.7823265790939331,
0.40141868591308594,
0.7701330780982971,
-0.7414043545722961,
-0.05472245812416077,
-0.6921324133872986,
-0.20899748802185059,
0.9429479241371155,
-0.14614452421665192,
0.07483614236116409,
0.0004180350515525788,
1.3776351213455... |
def get _ modules _ list _ from _ tosca _ file ( model : str ) - > dict : return get _ parameter _ from _ yaml ( " topology _ template. groups ", model ) | [
-0.8693164587020874,
-0.3551667034626007,
0.14812244474887848,
-0.3645540177822113,
-0.12337286025285721,
-0.2895088493824005,
0.49066370725631714,
-0.2522270381450653,
-0.7400053143501282,
1.2484490871429443,
-0.5034847259521484,
-0.6230790615081787,
0.8485214114189148,
0.2669414877891540... |
def mcfind ( world, dimension, coords, radius, region, block ) : worldpath = tools. get _ world _ path ( world, dimension ) # check input parameters if not radius : raise valueerror ( " radius must be defined. " ) if not coords and not region : raise valueerror ( " coordinates or region must be defined. " ) if radius >... | [
0.21951350569725037,
-0.521811306476593,
0.7341976165771484,
0.009965113364160061,
-0.7814878821372986,
-0.1033322885632515,
1.0767878293991089,
-0.44098028540611267,
-0.7660319209098816,
0.3414919972419739,
0.5751474499702454,
0.8882277607917786,
-0.6328349709510803,
0.5507860779762268,
... |
def _ _ init _ _ ( self, width, height ) : super ( ). _ _ init _ _ ( ) self. image = pygame. surface ( [ width, height ] ) self. image. fill ( constants. green ) self. rect = self. image. get _ rect ( ) | [
-0.1699693351984024,
0.027527550235390663,
0.6665813326835632,
0.11890220642089844,
0.07350259274244308,
0.8906424045562744,
-0.5017623901367188,
-0.5797317028045654,
-0.19230124354362488,
-0.5964467525482178,
-0.17709198594093323,
-0.5856461524963379,
0.6399447917938232,
1.21522057056427,... |
def test _ list _ integer _ pattern _ 3 _ nistxml _ sv _ iv _ list _ integer _ pattern _ 4 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - pattern - 4. xsd ", instance = " nistdata / list / integer / sc... | [
-0.8006744980812073,
0.16629408299922943,
0.5449602603912354,
0.29696840047836304,
-0.2746982276439667,
0.09927845746278763,
-0.3584401309490204,
0.5516456365585327,
1.3919544219970703,
0.6382012963294983,
-0.7428049445152283,
-0.8207639455795288,
-0.5457741022109985,
0.0922117680311203,
... |
def checkfunc ( self, part ) : func = re. findall ('^ [ a - za - z ] + \ ( [ a - za - z ] + \ ) $ ', part ) if len ( func )! = 1 : return none result = {'function': {'name': re. findall ('^ [ a - za - z ] + (? = \ ( ) ', part ) [ 0 ],'variable': re. findall ('(? < = \ ( ) [ a - za - z ] (? = \ ) ) ', part ) [ 0 ],'coef... | [
-0.34101685881614685,
-0.652012050151825,
0.7716383934020996,
-0.31313377618789673,
-0.8089302182197571,
-0.9909393191337585,
0.12096060067415237,
-0.7054202556610107,
-0.4232848882675171,
0.04722099378705025,
-1.1222244501113892,
-0.4533762037754059,
-0.8270509839057922,
-0.45352387428283... |
def make _ non _ pad _ mask ( lengths, xs = none, length _ dim = - 1 ) : return ~ make _ pad _ mask ( lengths, xs, length _ dim ) | [
-0.4248204231262207,
0.16929411888122559,
0.4025470018386841,
-0.37096697092056274,
-0.4008571207523346,
0.7869199514389038,
0.12254941463470459,
-0.16854065656661987,
0.5961049795150757,
-0.4127599596977234,
-0.3340620994567871,
0.26863110065460205,
0.2678665518760681,
0.02466307021677494... |
def config _ parser ( filename, callback ) : config = open ( filename ). readlines ( ) new _ config = [ ] current _ section = none current _ option = none updated = false for lineno, line in enumerate ( config ) : match = configparser. sectcre. match ( line ) if match : current _ section = match. group ('header') curre... | [
0.08998801559209824,
-1.1643531322479248,
0.7288559675216675,
0.11487700790166855,
-0.4842078685760498,
-0.3195609450340271,
0.10077488422393799,
0.7688999772071838,
-0.4527118504047394,
0.777679979801178,
-0.04392651095986366,
-0.785386860370636,
0.13208307325839996,
0.98060542345047,
0... |
def find ( self, query = none ) : if not query : query = find. getlastquery ( ) if query : context = self. getflatreviewcontext ( ) location = query. findquery ( context, self. justenteredflatreviewmode ) if not location : self. presentmessage ( messages. string _ not _ found ) else : context. setcurrent ( location. li... | [
-0.3120843172073364,
-0.5402519702911377,
0.5170575380325317,
-0.3140454590320587,
-0.07199542969465256,
0.1396268904209137,
0.5368719100952148,
-0.01638183742761612,
0.2737923562526703,
-0.2020159512758255,
1.1896047592163086,
0.35254743695259094,
-0.9081030488014221,
0.2741609513759613,
... |
def get _ version ( pkg _ name ) : with open ( path ( pkg _ name ) / " _ _ init _ _. py ", encoding = " utf - 8 " ) as init _ file : for line in init _ file : parts = line. strip ( ). partition ( " = " ) if parts [ 0 ]. strip ( ) = = " _ _ version _ _ " : return parts [ 2 ]. strip ( ). strip ( "'" ). strip ('"') return... | [
-0.03887184336781502,
-0.9722304344177246,
0.6528280973434448,
-0.6126903891563416,
-0.44468650221824646,
-0.3386155366897583,
-0.17786315083503723,
0.1361946314573288,
-0.8875192403793335,
0.5108224749565125,
-0.5452340245246887,
0.00655891839414835,
-0.37239399552345276,
-0.2294283509254... |
def saturate _ cast ( value, dtype, name = none ) : # when casting to a type with smaller representable range, clamp. # note that this covers casting to unsigned types as well. with ops. name _ scope ( name, " saturate _ cast ", [ value ] ) as name : value = ops. convert _ to _ tensor ( value, name = " value " ) dtype ... | [
-0.41952383518218994,
-0.14749564230442047,
0.622378945350647,
0.4200234115123749,
-0.9702708721160889,
-0.17506572604179382,
0.5199910998344421,
-0.9719873666763306,
0.4915485084056854,
1.0949597358703613,
-0.2533342242240906,
0.6008862257003784,
0.4637351334095001,
-0.5322594046592712,
... |
def compare ( ) : time1, accuracy1 = comparison. timeranalysis ( 3 ) time2, accuracy2 = comparison. timeranalysis ( 4 ) time3, accuracy3 = comparison. timeranalysis ( 5 ) return render _ template ('compare. html ', learningstyle = " visual ", time1 = time1, time2 = time2, time3 = time3, accuracy1 = accuracy1, accuracy2... | [
0.07850971817970276,
0.19497761130332947,
0.8152512907981873,
0.30875805020332336,
-0.2405228316783905,
0.3062560260295868,
0.7269871830940247,
-0.7001950144767761,
-0.3225019574165344,
0.6018978953361511,
0.12844760715961456,
-0.7897225022315979,
-0.20132358372211456,
0.7118703722953796,
... |
def db _ name ( self ) - > str : return pulumi. get ( self, " db _ name " ) | [
0.5608629584312439,
0.9223229885101318,
0.5505906343460083,
0.8511428236961365,
0.3212948441505432,
1.2343741655349731,
-0.3868074417114258,
0.08987123519182205,
0.37512481212615967,
0.5874266028404236,
0.3629305064678192,
0.6045685410499573,
0.21822912991046906,
-0.48221108317375183,
-0... |
def step ( self, action : action ) - > tuple [ list, int, bool ] : # calculate the next position based on the action next _ position = ( self. position _ agent [ 0 ] + action. value. delta _ i, self. position _ agent [ 1 ] + action. value. delta _ j, ) # modify the position of the agent. # if next position in dungeon i... | [
-0.46569395065307617,
0.4198203980922699,
0.7389388084411621,
0.10331577062606812,
0.6775361895561218,
-0.64487224817276,
1.0300496816635132,
-0.40103641152381897,
0.396052747964859,
0.7854724526405334,
-0.9354267120361328,
-0.7994415163993835,
0.5211661458015442,
-0.012000550515949726,
... |
def reviewnextline ( self, inputevent ) : context = self. getflatreviewcontext ( ) moved = context. gonext ( flat _ review. context. line, flat _ review. context. wrap _ line ) if moved : self. _ reviewcurrentline ( inputevent ) self. targetcursorcell = self. getbraillecursorcell ( ) return true | [
-0.4031939208507538,
-0.3441673815250397,
0.39053621888160706,
0.3842390775680542,
-0.6957317590713501,
1.149478554725647,
-0.4086923897266388,
-0.19614353775978088,
0.30379581451416016,
0.025435127317905426,
-0.32853642106056213,
0.42343708872795105,
-0.3082549273967743,
0.018283117562532... |
def defaulthyperprior ( p ) : # restrict range of hyperparameters ( ignoring mean term ) if np. any ( np. fabs ( p ) [ 1 : ] > 20 ) : return - np. inf return 0. 0 | [
0.5127742886543274,
0.6047364473342896,
0.37519901990890503,
-0.01329073216766119,
0.4630603790283203,
0.3417350947856903,
-0.020739205181598663,
-0.06825034320354462,
-0.08217301219701767,
-0.5332419276237488,
0.3773263096809387,
0.16103708744049072,
-0.9741359353065491,
0.314590394496917... |
def _ zeros _ like _ coo _ tensor ( x ) : values = f. zeros _ like ( x. values ) return f. make _ coo _ tensor ( x. indices, values, x. shape ) | [
-0.010314351879060268,
0.10848822444677353,
0.1772323101758957,
-0.537617564201355,
-0.30094480514526367,
-0.05375230312347412,
0.02631024457514286,
0.0035636599641293287,
-0.5265882611274719,
0.43224677443504333,
-0.0771552324295044,
0.215371236205101,
1.543182373046875,
-1.52355825901031... |
def build _ feature _ dict ( args, examples ) : def _ insert ( feature ) : if feature not in feature _ dict : feature _ dict [ feature ] = len ( feature _ dict ) feature _ dict = { } # part of speech tag features if args. use _ pos : for ex in examples : for w in ex ['pos'] : _ insert ('pos = % s'% w ) return feature _... | [
-0.05296013504266739,
-0.17125777900218964,
0.3647141456604004,
-0.6819974780082703,
-0.3431318402290344,
-0.865703821182251,
0.03910839185118675,
1.1684004068374634,
-0.8263457417488098,
0.09974080324172974,
-1.333132266998291,
-0.760301947593689,
-0.02077200636267662,
1.0168604850769043,... |
def test _ convenience _ calc _ fisher _ approx ( self ) : expected _ matrix = np. diag ( - 1 * np. ones ( self. fake _ betas _ ext. shape [ 0 ] ) ) func = self. estimator. convenience _ calc _ fisher _ approx function _ results = func ( self. fake _ betas _ ext ) npt. assert _ allclose ( expected _ matrix, function _ ... | [
-0.476216197013855,
0.33853209018707275,
0.6145550012588501,
0.04824534431099892,
0.5214382410049438,
0.07278216630220413,
0.7977088689804077,
0.5976881980895996,
-0.03682290017604828,
-0.18792131543159485,
-0.6220664381980896,
1.0319647789001465,
-0.39715027809143066,
0.9053131937980652,
... |
def execute ( self ) : if self. opts ['inventory'] : topics = self. gather _ inventory ( ) for topic in topics : print ( topic [ : - len ( self. topic _ ext ) ] ) elif self. opts ['env'] : self. show _ env ( ) elif self. opts ['topic'] and self. opts ['pwd'] : self. show _ path _ topic ( ) elif self. opts ['topic'] or ... | [
-0.12554079294204712,
-0.5910326838493347,
0.5724952220916748,
0.5437489151954651,
0.8414386510848999,
0.1911371946334839,
-0.42040592432022095,
-0.5676417946815491,
-0.15705502033233643,
0.31788358092308044,
0.926994800567627,
0.7358322143554688,
-0.3233194649219513,
0.2687200605869293,
... |
def download _ stocklist ( self ) : symbols = self. get _ stocklists ( ) self. stocks = symbols self. download _ stock _ data ( ) | [
-0.7214198708534241,
-0.03303704038262367,
0.04537897929549217,
0.5022456645965576,
1.213243842124939,
0.14595267176628113,
0.23041783273220062,
-0.5001753568649292,
0.47513315081596375,
-0.1437283456325531,
-1.278585433959961,
0.6373845934867859,
0.3525082468986511,
1.1561228036880493,
... |
def test _ atomic _ any _ uri _ min _ length _ 4 _ nistxml _ sv _ iv _ atomic _ any _ uri _ min _ length _ 5 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - minlength - 5. xsd ", instance = " nistdata... | [
0.11967802047729492,
-0.7484031319618225,
0.3588823676109314,
0.5442193746566772,
-0.703656017780304,
-0.545455276966095,
-0.1238447055220604,
-0.77797532081604,
-0.15653428435325623,
-0.14765410125255585,
-0.26253390312194824,
-0.06739633530378342,
-0.7596562504768372,
0.3716588616371155,... |
def arm ( self, mode ='manual ', b _ check _ aemable = false ) : # vehicle. mode = vehiclemode ( " guided " ) # mode = " guided " # mode = " auto " self. vehicle. mode = vehiclemode ( mode ) if b _ check _ aemable : self. logger. info ( " basic pre - arm checks " ) # don't let the user try to arm until autopilot is rea... | [
-0.24561554193496704,
-0.4723402261734009,
0.5029611587524414,
0.32396572828292847,
0.057235561311244965,
1.4343138933181763,
0.35836708545684814,
0.504841685295105,
-0.7195771932601929,
0.05715794488787651,
0.14005033671855927,
0.3378826379776001,
-0.7115876078605652,
0.4955109655857086,
... |
def isdna ( self ) : # task 1 : my code here listself = list ( self. seq ) a = listself. count ( " a " ) b = listself. count ( " c " ) c = listself. count ( " g " ) d = listself. count ( " t " ) n _ t = a + b + c + d if ( len ( self. seq ) = = n _ t ) : passes = true else : passes = false return passes | [
-0.7051652669906616,
-0.10173255205154419,
0.806344747543335,
0.2665881812572479,
0.5809697508811951,
0.21378877758979797,
-0.16785895824432373,
0.5775052905082703,
1.2449809312820435,
0.04903212562203407,
-1.073021650314331,
-0.13635098934173584,
-0.26050159335136414,
0.7408315539360046,
... |
def get _ hazard _ data _ by _ hazard _ id ( self, hazard _ id : str, filter : hazardinfofilter ) - > tuple [ hazard, list [ image ] ] : pass | [
-0.3552614748477936,
-0.2527449429035187,
0.36776334047317505,
0.44206011295318604,
0.32172346115112305,
-0.1241602897644043,
-0.33678141236305237,
0.003897638525813818,
-0.4137883484363556,
-0.35363247990608215,
-0.5176408886909485,
0.5727508664131165,
0.7423322200775146,
0.90442883968353... |
def parse _ tokens ( tokens ) : token = tokens. pop ( 0 ) if token = ='(': return parse _ list ( tokens ) else : return typed ( token ) | [
-0.821858823299408,
0.21108083426952362,
0.39124801754951477,
-0.2889760732650757,
0.255702942609787,
-0.9019296765327454,
-0.9996503591537476,
-0.39346495270729065,
0.6760843992233276,
-0.0920141190290451,
-0.8090671300888062,
0.5215211510658264,
-0.9638269543647766,
-0.5917126536369324,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.