text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def humanfriendly ( number ) : number =''. join ( str ( num ) for num in number ) # put the numbers together return number | [
0.4903005361557007,
0.36394962668418884,
0.6704853177070618,
-0.6536708474159241,
0.21112732589244843,
0.4318872094154358,
-0.21927739679813385,
0.04980672150850296,
-0.1749981790781021,
-0.24792306125164032,
-0.3646944761276245,
0.20680244266986847,
0.08365356177091599,
0.2793662846088409... |
def getstrongwords ( strong _ number, available _ words, strongs _ index ) : words = [ ] for word in available _ words : strongs = getstrongs ( word, strongs _ index ) for strong in strongs : if strongs _ equal ( strong, strong _ number ) : words. append ( word ) return words | [
0.37902942299842834,
-1.0439741611480713,
0.46271002292633057,
1.1204801797866821,
0.7127776741981506,
-0.1381778120994568,
-1.1913388967514038,
1.0101203918457031,
0.5261974334716797,
0.5933586955070496,
-0.40217944979667664,
0.8123412132263184,
0.026419933885335922,
0.17289793491363525,
... |
def rabbitmqadmin _ get _ queue ( self, user, passwd ) : logger. debug ( " get queue from rabbitmqadmin " ) controller = random. choice ( self. env. get _ nodes _ by _ role ('controller') ) with controller. ssh ( ) as remote : out = remote. check _ call ( self. cmd. rabbitmqctl. get _ queue. format ( usr = user, pwd = ... | [
-0.09731240570545197,
-0.3759740889072418,
0.721921443939209,
-0.15481260418891907,
0.19810107350349426,
-0.06975099444389343,
-1.4760955572128296,
-0.8409895896911621,
0.06334315240383148,
0.38217854499816895,
0.41187533736228943,
1.8830198049545288,
-0.413593590259552,
-0.025660468265414... |
def to _ json _ structure ( self, *, canonical : bool = false ) - > typing. dict : # using " to _ json _ structure " and not " to _ internal _ json _ structure " because # it is not indented that this would be parsed back directly, but just used # to know where to find the dataset. dataset _ description = utils. to _ j... | [
-1.2292325496673584,
0.2553550601005554,
0.4959453344345093,
-0.6655420660972595,
-0.3215884864330292,
-0.6968070268630981,
-0.49930283427238464,
-0.33138009905815125,
-0.3071720004081726,
-0.47138676047325134,
0.5782105326652527,
1.4433847665786743,
0.4346081018447876,
-0.1351034045219421... |
def mcplot ( world, dimension, coords, radius, region, output, colormap ) : 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. " ) ... | [
0.48265525698661804,
-0.4146566689014435,
0.6714563369750977,
-0.41107121109962463,
-1.0888580083847046,
-0.44500085711479187,
0.5303980112075806,
-0.43804940581321716,
0.0058581773191690445,
-0.19037732481956482,
0.6809729337692261,
0.6090183258056641,
-0.13990309834480286,
0.433043330907... |
def gen _ primes ( ) : # maps composites to primes witnessing their compositeness. # this is memory efficient, as the sieve is not " run forward " # indefinitely, but only as long as required by the current # number being tested. # d = { } # the running integer that's checked for primeness q = 2 while true : if q not i... | [
-0.8443946838378906,
0.5094448924064636,
0.6641021966934204,
-0.42787784337997437,
0.6047272682189941,
0.3372575342655182,
0.6080217957496643,
0.28939419984817505,
0.5150203704833984,
-0.1439773291349411,
-0.4146633446216583,
-0.3653429448604584,
-0.2727523446083069,
0.5681259632110596,
... |
def test _ atomic _ hex _ binary _ min _ length _ nistxml _ sv _ iv _ atomic _ hex _ binary _ min _ length _ 1 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - minlength - 1. xsd ", instance = " ... | [
0.13609212636947632,
-0.37238699197769165,
0.46528878808021545,
0.8369183540344238,
-0.20820991694927216,
0.4016568064689636,
-0.4302297532558441,
0.1192721575498581,
0.5958364009857178,
0.3424606919288635,
-0.23595194518566132,
-0.49428853392601013,
-0.41711392998695374,
0.422274351119995... |
def ip _ valid ( host ) : try : if ipaddress. ip _ address ( host ). version = = ( 4 or 6 ) : return true except valueerror : return false | [
-0.6152650713920593,
0.19102688133716583,
0.5654288530349731,
1.323319673538208,
-0.9371734857559204,
0.3717559278011322,
-1.1925835609436035,
0.642629086971283,
-0.337568461894989,
0.2250373363494873,
0.10603590309619904,
-1.0540885925292969,
-0.46603521704673767,
-1.1833797693252563,
-... |
def _ _ init _ _ ( self, name, func, opts ) : self. read = false self. write = false self. aof = false self. name = name self. func = func for opt in opts : if opt = = " + " : self. aof = true elif opt = = " r " : self. read = true elif opt = = " w " : self. write = true | [
0.15475140511989594,
-0.23458781838417053,
0.5947152972221375,
-0.0017244740156456828,
-0.6044328212738037,
-0.3416328728199005,
0.13392703235149384,
-0.39787882566452026,
0.06012317165732384,
0.4772998094558716,
0.3718755543231964,
-0.13183431327342987,
-0.1470646858215332,
-0.15740950405... |
def handleerror ( f ) : @ functools. wraps ( f ) def handleproblems ( * args, * * kwargs ) : try : return f ( * args, * * kwargs ) except exception, err : logger. critical ( err, exc _ info = true ) quitmayapy ( 1 ) return handleproblems | [
0.4159332513809204,
-0.7338559031486511,
0.6740040183067322,
0.5188610553741455,
-0.7270793914794922,
0.508823812007904,
-0.44900402426719666,
0.05396575108170509,
1.0085407495498657,
-0.06801160424947739,
0.9624915719032288,
-0.9133673310279846,
0.3651926517486572,
-0.5730204582214355,
... |
def printbiasinfo ( ccd, quad, stime, fep, dmode, srow, rowcnt, orcmode, dgain, biasalg, barg0, barg1, barg2, barg3, overclock ) : ofile = data _ dir +'/ info _ dir / ccd'+ str ( ccd ) +'/ quad'+ str ( quad ) fo = open ( ofile,'a') line = " % 10. 1f \ t % 4. 2f \ t " % ( stime, overclock ) fo. write ( line ) line = str... | [
0.6768073439598083,
-0.1666407287120819,
0.836505115032196,
-0.6327707767486572,
0.36502379179000854,
0.671218991279602,
0.044277604669332504,
-0.03739384561777115,
-1.148969054222107,
0.08185364305973053,
-0.23598727583885193,
0.9745846390724182,
-0.2359776794910431,
0.26941627264022827,
... |
def all _ gather _ list ( data, group = dist. group. world, max _ size = 16384 ) : rank = dist. get _ rank ( ) world _ size = dist. get _ world _ size ( ) buffer _ size = max _ size * world _ size if not hasattr ( all _ gather _ list,'_ buffer') or \ all _ gather _ list. _ buffer. numel ( ) < buffer _ size : all _ gath... | [
-0.09199962019920349,
0.3562376797199249,
1.0419145822525024,
0.8516062498092651,
-0.301203191280365,
-0.6967548131942749,
0.15950706601142883,
-0.017242560163140297,
0.05056190490722656,
0.4836474359035492,
-0.6273483037948608,
0.10601085424423218,
-0.01660688780248165,
0.4769473671913147... |
def find _ user ( self, keywords ) : endpoint ='/ users'params = {'keywords': keywords } response = self. execute ( endpoint, params = params ) return response | [
-0.5303189158439636,
0.6775270700454712,
0.2805373966693878,
0.6269827485084534,
-0.040526293218135834,
-0.27775782346725464,
-1.1685200929641724,
-1.3720518350601196,
-0.4691881239414215,
0.43904438614845276,
-0.3779873251914978,
0.033026859164237976,
-1.6592812538146973,
0.47053551673889... |
def blastlocal ( cdsseqfile, geneseqfile, cdsid, cdsgeneid, evalue ) : cdsseq = str ( ( seqio. parse ( cdsseqfile, " fasta " ) [ 0 ] ). seq ) geneseq = str ( ( seqio. parse ( geneseqfile, " fasta " ) [ 0 ] ). seq ) listhits = [ ] blocklist = [ ] blocklist _ = [ ] blocklistout = launch _ tblastx ( cdsseqfile, geneseqfil... | [
0.1434406042098999,
-0.5433744788169861,
0.648831307888031,
0.4555128812789917,
-0.3735775649547577,
-0.4393419623374939,
0.41454651951789856,
0.7598826289176941,
-1.095955491065979,
0.7835285663604736,
-0.7983603477478027,
0.3479686677455902,
-0.06563318520784378,
-0.21015819907188416,
... |
def distancestep ( self ) : return distancestep ( self. samplerate, self. c ) | [
0.42572614550590515,
-0.6565294861793518,
0.3675824999809265,
0.38685938715934753,
-0.19261102378368378,
1.0338068008422852,
0.39223480224609375,
-0.2009117156267166,
0.14468255639076233,
-0.42557498812675476,
-0.4562472105026245,
0.12924116849899292,
-0.560624361038208,
0.2612553238868713... |
def outputmd ( self, pos ='' ) : if not pos : f = open ('draft _ % d. md'% self. id,'wb') else : f = open ( pos,'wb') f. write ( ('hdu acm % d % s'% ( self. id, self. title ) ). encode ('utf - 8') ) f. write ( b'\ n') f. write ('# # 原 '. encode ('utf - 8') ) f. write ( b'\ n') f. write ( b'# # # problem description') f... | [
0.2726860046386719,
-0.3231116831302643,
1.3655556440353394,
-0.14746545255184174,
-0.5794863104820251,
0.7509259581565857,
0.4016631543636322,
-0.004048966336995363,
-0.5500296950340271,
-0.2139764130115509,
0.24086660146713257,
0.12677910923957825,
-0.6040489673614502,
0.1748429089784622... |
def expectation ( self ) : # stores the expected values of u self. eu = np. copy ( self. u ) # stores the expected values of u * u ^ t self. euu = np. zeros ( [ self. n, self. d, self. d ] ) # posterior distributions of z ( we don't use these, but we output # them in case they are useful ) self. posterior _ z = [ ] # l... | [
-0.18443988263607025,
-0.10842812061309814,
0.696251630783081,
-0.8687651753425598,
0.1656416356563568,
-0.1488686501979828,
0.8851115107536316,
0.5053415298461914,
-0.2959170937538147,
-0.47730356454849243,
0.11897984147071838,
1.08988618850708,
0.3667871057987213,
0.7382748126983643,
0... |
def setup ( self ) : self. app = create _ app ( " testing " ) self. client = self. app. test _ client ( ) self. comment _ data = { " createdby " : 1, " question " : 2, " title " : " what is this ", " body " : " your question is out of topic? " } | [
0.9427481889724731,
-0.7610552906990051,
0.34214943647384644,
-0.0809970572590828,
1.2209700345993042,
1.0600111484527588,
0.11886805295944214,
-0.6902609467506409,
-0.6233664751052856,
0.3669658303260803,
-0.20387588441371918,
-0.2848447561264038,
-0.6347059011459351,
0.20014367997646332,... |
def _ validate _ packetlogger _ file ( identification ) : assert ( identification [ 0 ]! = 0x00 or ( identification [ 1 ]! = 0x00 and identification [ 1 ]! = 0x01 ) ) | [
-0.30815500020980835,
-0.9850339889526367,
0.3852492868900299,
-0.04966980218887329,
-0.6397590041160583,
1.433140754699707,
-0.47930464148521423,
0.3499385118484497,
-0.1713225394487381,
0.040940478444099426,
-0.5536413788795471,
-0.393451452255249,
-0.5459194779396057,
1.222111701965332,... |
def _ get _ relative _ index ( self, index, array _ index ) : if array _ index > 0 : return index - self. initial _ allocation * ( ( 2 * * array _ index ) - 1 ) return index | [
0.6285716891288757,
-0.8808963894844055,
0.5400052070617676,
0.4301641881465912,
-0.3256661295890808,
0.48546916246414185,
0.2614947259426117,
0.203295037150383,
0.33238524198532104,
0.20405781269073486,
0.9316054582595825,
0.7116230130195618,
-0.3323199450969696,
-0.38857659697532654,
1... |
def get _ adj _ rib _ out ( afi _ safi, peer _ ip ) : prefix = flask. request. args. get ('prefix') community = flask. request. args. get ('community') if prefix or community : if prefix : return flask. jsonify ( {'attr': api _ utils. get _ adj _ rib _ out ( peer _ ip, afi _ safi, prefix ) } ) return flask. jsonify ( {... | [
-0.0027994003612548113,
0.07675571739673615,
0.350807785987854,
0.15425322949886322,
0.11146469414234161,
-0.8828317523002625,
-0.0784723311662674,
0.05523394048213959,
-0.3520345389842987,
0.46535858511924744,
1.5836042165756226,
-0.09011674672365189,
0.11654145270586014,
1.11639213562011... |
def iter _ type ( cls, op ) : return cls. get _ prim ( op ). iter _ type | [
-0.9827402830123901,
0.5255404710769653,
0.616190493106842,
0.39252403378486633,
0.10559840500354767,
0.21371789276599884,
0.9220443964004517,
-0.7732248306274414,
0.04587837681174278,
0.5958408713340759,
0.029872536659240723,
1.0640127658843994,
-0.4336063265800476,
-0.2898651957511902,
... |
def _ build _ remove _ block _ ops ( blkw ) : out = [ ] blk _ id = blkw. identifier out. append ( blk _ id ) for batch in blkw. batches : out. append ( batch. header _ signature ) for txn in batch. transactions : out. append ( txn. header _ signature ) return out | [
0.16525255143642426,
-0.7345735430717468,
0.802218496799469,
0.7964968681335449,
-0.4835856854915619,
-1.0430183410644531,
0.6607237458229065,
0.7447053790092468,
0.041083041578531265,
0.9083290100097656,
-1.374708890914917,
-0.8032564520835876,
-0.3003801107406616,
-0.10495682060718536,
... |
def test _ inputs _ input _ type _ list _ values ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper, add _ input _ one, add _ input _ two ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) type _ filter _ list = [ " all ", " example input one ", " example... | [
-0.972883403301239,
0.10720271617174149,
0.6575955152511597,
0.9915239214897156,
1.0346275568008423,
0.5120452642440796,
-0.04980294778943062,
-0.2000795155763626,
0.17907299101352692,
-0.04887441173195839,
-0.4322963356971741,
-0.1749276965856552,
-0.12041079998016357,
0.5739054083824158,... |
def ifinputqueuefull ( self ) : return self. input _ queue. full ( ) | [
-0.14994172751903534,
-0.8456335067749023,
0.561018168926239,
-0.1956067532300949,
-0.7303223013877869,
0.30842626094818115,
-0.9570775628089905,
-0.5127509236335754,
-0.3565671741962433,
0.09577107429504395,
-0.5505974888801575,
0.0032910758163779974,
-0.9297873973846436,
0.32940638065338... |
def test _ atomic _ id _ enumeration _ 1 _ nistxml _ sv _ iv _ atomic _ id _ enumeration _ 2 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - enumeration - 2. xsd ", instance = " nistdata / atomic / id / schem... | [
-0.4459099769592285,
-1.2293599843978882,
0.5185701251029968,
0.543635368347168,
-0.376017302274704,
-0.0034038089215755463,
0.15348835289478302,
-0.31669366359710693,
-0.1557852178812027,
0.6688950061798096,
-0.33096033334732056,
0.5388838052749634,
0.671765148639679,
0.1751832515001297,
... |
def abnormalvol ( self, firm, date, t1 _ offset, t2 _ offset ) : dates = list ( self. dates. keys ( ) ) if ( date not in dates ) or ( dates. index ( date ) + t1 _ offset ) < 0 or ( dates. index ( date ) + t2 _ offset ) > = len ( dates ) : return - 1 start _ ind = dates. index ( date ) + t1 _ offset end _ ind = dates. i... | [
-0.10443700104951859,
-0.6892239451408386,
0.754573404788971,
-0.23619665205478668,
-1.0822149515151978,
0.5083146691322327,
-0.016091756522655487,
-0.3493061363697052,
-0.594052791595459,
0.40453052520751953,
0.9551367163658142,
1.3408262729644775,
0.6272282600402832,
0.07961466908454895,... |
def createmnist ( img _ limit = 60000 ) : if img _ limit > 60000 : print ( " number of requested images to return is too large " ) print ( " setting number of images to return to 60000 \ n " ) img _ limit = 60000 ( img _ train, lab _ train ), ( img _ test, lab _ test ) = mnist. load _ data ( ) img _ train = list ( img ... | [
-0.4921112060546875,
-0.4828132390975952,
0.8198935985565186,
-0.4571201205253601,
0.2376215010881424,
0.0768662765622139,
-0.6853825449943542,
0.35019850730895996,
0.6311739087104797,
0.034052491188049316,
-0.24991710484027863,
0.42706477642059326,
-0.4686836004257202,
-0.3072106838226318... |
def get _ config ( config _ file, exp _ dir = none, is _ test = false ) : # config = edict ( yaml. load ( open ( config _ file,'r'), loader = yaml. fullloader ) ) config = edict ( yaml. load ( open ( config _ file,'r'), loader = yaml. fullloader ) ) # create hyper parameters config. run _ id = str ( os. getpid ( ) ) co... | [
0.5754983425140381,
-0.6364474296569824,
0.790221631526947,
0.01736835017800331,
0.0886433869600296,
0.058649107813835144,
0.7311679720878601,
1.3368403911590576,
-0.2421475350856781,
1.0014841556549072,
-0.15730488300323486,
0.30496954917907715,
0.3218354284763336,
0.5506006479263306,
0... |
def test _ init _ fail ( self ) : _ = facedetector ('no _ file!') | [
0.4072152078151703,
-0.32260358333587646,
0.2772810757160187,
0.43583059310913086,
0.7703395485877991,
0.524998664855957,
1.0499356985092163,
-0.24447180330753326,
-1.1476699113845825,
-0.9652502536773682,
-0.7262576222419739,
-0.5269020199775696,
0.40850305557250977,
1.219747543334961,
... |
def error _ embed ( message : str, *, error = " error " ) - > discord. embed : return discord. embed ( title = error, description = message, colour = discord. colour. red ( ) ) | [
-0.0263937059789896,
0.7181189656257629,
0.45660126209259033,
0.5625439286231995,
-0.43321552872657776,
0.5828211903572083,
-1.2253715991973877,
-0.20040059089660645,
-0.15681235492229462,
-0.12762533128261566,
0.26333922147750854,
1.0007658004760742,
-0.8940527439117432,
0.130154326558113... |
def hexencode ( value ) : # return utf8encode ( value ). encode ( " hex " ) return value. encode ( " hex " ) | [
0.04001642018556595,
-0.1712864190340042,
-0.00165557861328125,
-0.08794647455215454,
-0.20613837242126465,
0.1367948055267334,
-0.948162853717804,
1.2190344333648682,
0.5200910568237305,
0.14592275023460388,
0.18920853734016418,
-0.6768541932106018,
0.1550324559211731,
0.20660288631916046... |
def test _ list _ integer _ length _ 1 _ nistxml _ sv _ iv _ list _ integer _ length _ 2 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - length - 2. xsd ", instance = " nistdata / list / integer / schem... | [
-0.592302680015564,
-0.187956765294075,
0.43128249049186707,
0.5237955451011658,
-0.1669434905052185,
0.1334693431854248,
-0.5407539010047913,
0.4758148193359375,
0.7391380667686462,
0.5924086570739746,
-1.0275486707687378,
-0.18476352095603943,
-0.12377691268920898,
0.8552761673927307,
... |
def test _ valid _ redirect _ user _ logged _ to _ home _ page ( self, client, proto _ user ) : response = client. post ( reverse ( " login " ), { " username " : proto _ user. username, " password " : " m = 9uak ^ c, tbq9n = t ", " robot " : true, }, follow = true, ) assert response. context [ " user " ]. is _ authenti... | [
0.2741323411464691,
0.19166742265224457,
0.5666271448135376,
1.4593853950500488,
0.16361261904239655,
1.0632519721984863,
0.7682608962059021,
-0.5735870003700256,
0.7801876664161682,
-1.0511200428009033,
-0.8765946626663208,
0.5138047337532043,
0.25164616107940674,
-0.7298856973648071,
0... |
def dragaccel ( self, v ) : vmag = norm ( v ) theta = arctan2 ( v [ 1 ], v [ 0 ] ) dragmag =. 5 * self. rho * vmag * * 2 * self. cd * self. a / self. m return - dragmag * array ( [ cos ( theta ), sin ( theta ) ] ) | [
0.07348928600549698,
-0.8563202023506165,
0.4730338454246521,
-0.7003351449966431,
-0.47579121589660645,
0.42930886149406433,
0.41371485590934753,
0.4421245753765106,
0.23339501023292542,
0.20694567263126373,
0.7343816161155701,
0.41295453906059265,
0.4224189221858978,
-0.27143940329551697... |
def assert _ any _ call ( self, * args, * * kwargs ) : at _ least _ on _ passed = false for kall in self. call _ args _ list : try : self. _ assert _ with _ constraints ( args, kwargs, kall ) # assertions passed, return because there's a match return except assertionerror : # keep trying pass expected _ string = self. ... | [
-0.5315778851509094,
-0.1876320093870163,
0.6092832684516907,
1.2197003364562988,
0.90548175573349,
0.5073864459991455,
-0.6730889081954956,
-0.7348046898841858,
-0.489266037940979,
-0.318555623292923,
0.4567590057849884,
-0.41966360807418823,
-1.32891047000885,
1.3853211402893066,
-0.75... |
def bag _ bce _ loss ( self, correct, predicted ) : start, loss = 0, 0. for _ in range ( self. bag _ gen. nb _ bag ) : my _ bag _ size = int ( tf. reduce _ sum ( correct [ start ] ) ) y _ pos _ gt = tf. abs ( tf. reduce _ sum ( correct [ start + 1 ] ) ) + 1e - 7 y _ neg _ gt = tf. abs ( 1 - tf. reduce _ sum ( correct [... | [
-0.6121031641960144,
-0.5321298837661743,
0.7378404140472412,
0.10476989299058914,
-0.2449730783700943,
0.9407823085784912,
0.7510935664176941,
0.07028622180223465,
-0.7142875790596008,
0.2010829895734787,
-0.44566401839256287,
0.47150447964668274,
-0.10577614605426788,
0.42732182145118713... |
def get _ global _ link _ rotation ( self, link : str, q : arraytype ) - > casadiarraytype : return t2r ( self. get _ global _ link _ transform ( link, q ) ) | [
-0.969694972038269,
0.07908566296100616,
0.18268589675426483,
-0.22732791304588318,
0.4568033814430237,
-0.4211690425872803,
0.03646666184067726,
-0.5839795470237732,
0.3233092725276947,
-0.11992388963699341,
-0.3801392912864685,
1.7540090084075928,
-0.7619737982749939,
-0.2950434386730194... |
def vmdefaulthelper ( self, options, paths ) : images = { } count = 0 mediatypes = self. auxcommands [ " get " ]. getworkerfunction ( " mediatypes ", options, results = true, uselist = false ) ids = self. auxcommands [ " get " ]. getworkerfunction ( " id ", options, results = true, uselist = false ) ids = { ind : id fo... | [
-0.40935656428337097,
0.251284658908844,
0.7477039694786072,
-0.5593634843826294,
0.6129087805747986,
-0.5047951936721802,
-0.07108239084482193,
-0.32257577776908875,
-0.178494393825531,
1.2418855428695679,
0.26872965693473816,
0.20508506894111633,
-0.5794274210929871,
1.2707256078720093,
... |
def add _ win ( self ) : self. wins + = 1 return self. wins | [
-1.1818902492523193,
-0.007492277305573225,
0.7567566633224487,
0.43546098470687866,
-0.0272174421697855,
-0.03353473171591759,
0.24495789408683777,
0.18875709176063538,
0.2406810075044632,
-1.6417418718338013,
-0.24021799862384796,
0.16430829465389252,
-0.02349618822336197,
0.329874783754... |
def command _ bridge ( glbl, fifobus, mmbus ) : assert isinstance ( fifobus, fifobus ) assert isinstance ( mmbus, memorymapped ) clock, reset = glbl. clock, glbl. reset bb = barebone ( glbl, data _ width = mmbus. data _ width, address _ width = mmbus. address _ width ) states = enum ('idle ','wait _ for _ packet ', # r... | [
0.5089228749275208,
-0.12046494334936142,
0.922512948513031,
0.22948361933231354,
0.33912184834480286,
-0.177620992064476,
-0.2382858842611313,
-0.0466000959277153,
0.7764938473701477,
-0.2718883156776428,
0.07448199391365051,
0.06933189183473587,
-0.7723712921142578,
0.49599069356918335,
... |
def lookup _ address ( self, address ) : if isinstance ( address, memorybytes ) : address = address. address for name, func in self. _ _ functions. items ( ) : if func. address = = address : return name elif func. address _ stop is not none and func. address < = address and func. address _ stop > = address : return nam... | [
-0.6531422138214111,
-0.29264211654663086,
0.9600988626480103,
-0.3249649405479431,
-1.1167830228805542,
-0.6858459711074829,
0.48344922065734863,
-0.631092369556427,
1.1196918487548828,
-0.0911276787519455,
0.18531720340251923,
1.022883653640747,
-0.2718627452850342,
0.308925598859787,
... |
def zero ( self ) : self. data. zero _ ( ) | [
0.0489501990377903,
-0.13759954273700714,
0.05846487730741501,
0.05258831009268761,
1.3755613565444946,
0.26909011602401733,
0.799168050289154,
0.27277398109436035,
-0.6991533637046814,
-1.1946601867675781,
-0.4098201096057892,
1.5964668989181519,
0.28595972061157227,
0.7143320441246033,
... |
def uc _ enabled ( self, uc _ enabled ) : self. _ uc _ enabled = uc _ enabled | [
0.25640833377838135,
-0.5279127359390259,
0.2428942620754242,
0.6401386857032776,
0.25349146127700806,
1.5021342039108276,
0.5037311911582947,
2.5018796920776367,
-0.1839156299829483,
-0.09207084029912949,
-1.4001697301864624,
-0.28292912244796753,
-0.0037199691869318485,
-0.58947259187698... |
async def update _ data ( self, json _ data : dict = none, params : dict = none, filters : dict = none, files : dict = none ) - > dict : await super ( ). update _ data ( json _ data = json _ data, params = params, filters = filters, patch _ req = true, files = files ) return await super ( ). get _ data ( params = param... | [
-0.9716175198554993,
-0.2807687819004059,
0.7406131625175476,
-0.3581477403640747,
-0.48180249333381653,
-0.3677915334701538,
-0.6136881709098816,
0.3500215709209442,
-0.31606075167655945,
0.33879294991493225,
-0.051608387380838394,
0.7517507672309875,
0.27875956892967224,
0.63040989637374... |
def clean _ fields ( self, exclude = none ) : errors = { } try : super ( validation, self ). clean _ fields ( exclude ) except validationerror, e : errors = e. update _ error _ dict ( errors ) #'generic'validation. you can raise a single error, a list of errors, # or a dictionary. try : if hasattr ( self,'validate') : ... | [
-0.2944844663143158,
0.9140143990516663,
0.8886308670043945,
0.18843643367290497,
0.03874276950955391,
-0.11096305400133133,
-0.20909766852855682,
0.08973586559295654,
-0.35331881046295166,
0.031302303075790405,
-0.019648443907499313,
-0.17527098953723907,
0.48831552267074585,
0.7621545195... |
def get _ default _ scopes ( self, client _ id, request, * args, * * kwargs ) : raise notimplementederror ('subclasses must implement this method.') | [
-0.9160580039024353,
0.13423484563827515,
0.5797935128211975,
0.48246869444847107,
0.9705960750579834,
0.1304398626089096,
-0.13617078959941864,
-0.9809257984161377,
0.06987249851226807,
0.3537428081035614,
-0.10316221415996552,
0.05877197906374931,
-0.49999627470970154,
0.8512229323387146... |
def availability _ zone ( self, availability _ zone ) : self. _ availability _ zone = availability _ zone | [
-0.14601387083530426,
-1.529148817062378,
-0.17065821588039398,
0.35211122035980225,
-0.13623598217964172,
1.4775570631027222,
0.503548800945282,
2.0873587131500244,
-0.12262199074029922,
0.055715516209602356,
-0.5718830227851868,
-0.5075197219848633,
0.4766806662082672,
0.3358277976512909... |
def _ _ init _ _ ( _ _ self _ _, resource _ name : str, opts : optional [ pulumi. resourceoptions ] = none, auto _ enable _ controls : optional [ pulumi. input [ bool ] ] = none, control _ finding _ generator : optional [ pulumi. input [ str ] ] = none, enable _ default _ standards : optional [ pulumi. input [ bool ] ]... | [
0.11665922403335571,
0.03955733776092529,
0.5379576086997986,
0.06702379882335663,
0.23912742733955383,
0.3502107262611389,
0.3042735457420349,
0.216396763920784,
0.8023020625114441,
-0.3183431327342987,
-0.40333041548728943,
0.07579267770051956,
0.17750252783298492,
-0.891539990901947,
... |
def test _ put _ cna _ container ( ) : with open ( '. / src / test / cve _ tests / cve _ record _ fixtures / cve - 2000 - 0008 _ published. json') as json _ file : data = json. load ( json _ file ) data = {'cnacontainer': data ['containers'] ['cna'] } res = requests. put ( f'{ env. awg _ base _ url } { cve _ url } / cv... | [
-0.0239508468657732,
-0.6902344822883606,
0.4708527624607086,
-0.4610883295536041,
0.7510071992874146,
-0.06971275061368942,
0.5574313998222351,
0.07253709435462952,
0.2366727739572525,
0.2617988884449005,
-0.5220821499824524,
0.2757856249809265,
0.3238750398159027,
-0.16772949695587158,
... |
def generate _ patch _ defs ( h _ atoms, atom _ dictionary, squalane _ mol2 _ file, skeleton _ file ='squalane - patches _ skeleton. txt') : with open ( skeleton _ file ) as skeletonfile, open ('squalane _ patch _ defs _ all. txt ','w') as outputfile : outputfile. writelines ( skeletonfile ) outputfile = open ('squalan... | [
0.4444417953491211,
-0.37846824526786804,
0.8028260469436646,
-0.19478420913219452,
-0.003312732558697462,
0.8806722164154053,
0.2985128164291382,
0.6985881924629211,
-0.4141124188899994,
-0.07495321333408356,
-0.34938138723373413,
0.09077082574367523,
0.1012658029794693,
0.297704964876174... |
def registerparkingevent ( self, id, event ) : connector = none try : connector = sqlite3. connect ( self. path ) cursor = connector. cursor ( ) cursor. execute ( f'insert into parkinghistory ( id, datetimestamp, parkevent, parkingspotid ) values (?,?,?,? ) ; ', ( uuid4 ( ). int & ( 1 < < 32 ) - 1, f'{ strftime ( " % d... | [
-0.005247542634606361,
0.09844007343053818,
0.9393819570541382,
0.38276833295822144,
0.6145104169845581,
0.536612331867218,
-0.348355770111084,
0.6992561221122742,
-0.8339718580245972,
0.033447422087192535,
-0.9787778854370117,
-0.5181340575218201,
-0.5448151230812073,
-0.3608049750328064,... |
def frame _ dapi _ 2d _ sgm _ change ( self ) : self. frame _ dapi _ raw. setcurrentindex ( self. frame _ dapi _ 2d _ sgm. currentindex ) | [
-1.565534234046936,
-0.38749969005584717,
0.2996595799922943,
0.0932384505867958,
0.018518293276429176,
-0.05662272498011589,
0.5251548886299133,
-0.3030206263065338,
-0.20128114521503448,
-0.2328328937292099,
-0.34691476821899414,
1.229750394821167,
0.49261775612831116,
0.2276968359947204... |
def hipaa ( self, hipaa ) : self. _ hipaa = hipaa | [
-0.7248607873916626,
0.14266367256641388,
-0.035910435020923615,
0.589788019657135,
0.10356850177049637,
-0.0440283864736557,
0.8510083556175232,
0.8485287427902222,
-0.031237415969371796,
-0.6641630530357361,
-0.9455052614212036,
-0.8277260661125183,
-0.18418782949447632,
0.77569282054901... |
def y ( self, ispec = none, iflux = none, loglam = none, y = none ) : if y is not none : return y else : return self. eval _ param ('y ', ispec = ispec, iflux = iflux, loglam = loglam, y = y ) | [
0.1630963683128357,
0.12905675172805786,
0.8657302260398865,
0.06283453851938248,
1.1461249589920044,
-0.7966784238815308,
-0.1267298012971878,
0.41346806287765503,
-0.13709644973278046,
-0.5322733521461487,
0.44578108191490173,
1.2452830076217651,
0.10195302963256836,
0.1255355030298233,
... |
def add _ free _ param ( self, name, shape, bounds, init _ bounds = none ) : if type ( shape ) = = tuple : self. free _ params [ name ] = ( self. free _ param _ count, shape ) # - - > tuple that tell start index and shape of each " type " of parameter ex.'center _ weight': ( 36, 9 ) self. free _ param _ count = self. f... | [
0.2720074951648712,
-0.4441808760166168,
0.8892015218734741,
-0.4663296341896057,
-0.15178155899047852,
0.07098250091075897,
-0.34735357761383057,
-0.6110088229179382,
0.23838156461715698,
0.2815883755683899,
-0.5778971314430237,
0.37571752071380615,
-0.6767221689224243,
0.52888023853302,
... |
def default _ states _ preprocessor ( states ) : if len ( states ) = = 1 : np _ states = np. expand _ dims ( states [ 0 ], 0 ) else : np _ states = np. array ( [ np. array ( s, copy = false ) for s in states ], copy = false ) return torch. tensor ( np _ states ) | [
-0.5585447549819946,
0.5543562769889832,
0.44499388337135315,
-0.07419686764478683,
0.058219052851200104,
-0.694769561290741,
0.4990151524543762,
0.44129467010498047,
1.2003554105758667,
0.35764116048812866,
0.36148518323898315,
-0.9059634208679199,
-0.024409744888544083,
-0.22839054465293... |
def _ _ init _ _ ( self, y, threshold = 0 ) : super ( pareto, self ). _ _ init _ _ ( ) self. threshold = threshold self. y = y # setup data structures self. bounds = boundedvolumes. empty ( y. shape [ 1 ], np _ int _ type ) self. front = dataholder ( np. zeros ( ( 0, y. shape [ 1 ] ) ),'pass') # initialize self. update... | [
1.0368918180465698,
-0.1803203970193863,
0.6111640334129333,
0.6511353254318237,
-0.5142238140106201,
-0.13432997465133667,
-0.4289214313030243,
-0.2884831130504608,
0.06592860072851181,
-0.4639952480792999,
-0.5441339015960693,
0.09375335276126862,
0.6553136706352234,
0.23007416725158691,... |
def _ _ init _ _ ( self, host, username, password = none, key _ filename = none, auto _ get = false, * args, * * kwargs ) : super ( ). _ _ init _ _ ( * args, * * kwargs ) self. system _ info = { } self. auth = dict ( host = host, username = username, password = password, key _ filename = key _ filename ) self. send _ c... | [
-0.4584009349346161,
0.07266484946012497,
0.8572049736976624,
0.9863090515136719,
-0.016001099720597267,
0.406059205532074,
-0.10565432906150818,
0.07863502204418182,
-0.9985958933830261,
-0.86834716796875,
-0.560640275478363,
0.2682911157608032,
0.5177833437919617,
1.56241774559021,
0.0... |
def get _ many ( self, type : type [ t ], query : mapping [ str, any ], streaming : bool = false ) - > iterable [ t ] : logger. info ( " getting sourcehandlers for \ " { type } \ " ". format ( type = type. _ _ name _ _ ) ) try : handlers = self. _ get _ types [ type ] except keyerror : try : logger. info ( " building n... | [
-1.1433409452438354,
0.46888282895088196,
0.6216336488723755,
-0.11903788149356842,
0.43066537380218506,
-0.17519642412662506,
-0.738714873790741,
-0.8255881667137146,
0.06940880417823792,
0.08609157800674438,
-0.5352137684822083,
0.3752714991569519,
-0.4526415169239044,
0.8912177681922913... |
def send _ text ( self, url, data _ package ) : self. logger. info ( " currently processing " + url ) get _ send _ flag _ func = self. config _ dict. get ( " get _ text _ flag " ) if get _ send _ flag _ func : send _ text _ flag = false try : send _ text _ flag = get _ send _ flag _ func ( data _ package ) except : pas... | [
-0.421817809343338,
0.6984747648239136,
0.5379931926727295,
-0.1961892992258072,
-0.12110978364944458,
-0.06150056794285774,
0.08218701183795929,
0.3806193470954895,
0.24297478795051575,
0.31518828868865967,
-0.6484431624412537,
0.36442679166793823,
-0.05092757195234299,
0.6611428260803223... |
def _ _ str _ _ ( self ) : return self. descripcion | [
-0.02173403650522232,
-0.837175190448761,
0.5231438875198364,
-0.701912522315979,
0.2050195187330246,
0.34068921208381653,
-1.3234994411468506,
-0.24675866961479187,
0.33532556891441345,
0.03551722317934036,
0.24771076440811157,
1.2709163427352905,
0.09371728450059891,
-0.3867025375366211,... |
def get ( self ) - > none : assert self. normalized _ request is not none topic _ ids = self. normalized _ request ['comma _ separated _ topic _ ids'] self. values. update ( {'topic _ id _ to _ topic _ name': ( topic _ services. get _ topic _ id _ to _ topic _ name _ dict ( topic _ ids ) ) } ) self. render _ json ( sel... | [
-0.9559950828552246,
-0.40178900957107544,
0.08699806034564972,
-0.7072299122810364,
-0.07509465515613556,
-0.19150413572788239,
-1.032028079032898,
-0.6468746066093445,
-0.4162865877151489,
0.7389200329780579,
0.5329877734184265,
0.14745573699474335,
0.5648491978645325,
-0.647152364253997... |
def itertraceparts ( self ) : for trace in self. _ traces : yield trace. part _ name, trace. handle. name | [
0.8202401399612427,
-1.0530211925506592,
0.5450843572616577,
-0.6863394379615784,
0.19051244854927063,
1.277560830116272,
-0.028618188574910164,
-1.2075090408325195,
0.1258968859910965,
-0.0650913417339325,
0.041758086532354355,
-0.28465473651885986,
-0.465032696723938,
0.04136286675930023... |
def load _ sparse _ embeddings ( path, words _ to _ keep = none, max _ words = - 1 ) : i2w = { } data, indices, indptr = [ ], [ ], [ 0 ] with gzip. open ( path,'rt') as f : for line _ number, line in enumerate ( f ) : if len ( i2w ) % 5000 = = 0 : logging. info ( " { } lines read in from a sparse embedding file ". form... | [
0.20618155598640442,
-0.19965162873268127,
0.7460267543792725,
-0.24618516862392426,
-0.8596256971359253,
0.05513126030564308,
0.5357637405395508,
0.3431915044784546,
-0.31619733572006226,
0.6984840631484985,
-0.22560185194015503,
0.038231752812862396,
-0.6547713279724121,
-0.1712599694728... |
def forum _ list _ filter ( self, qs, user ) : forums _ to _ show = super ( ). forum _ list _ filter ( qs, user ) if self. current _ lti _ context _ id : return forums _ to _ show. filter ( archived = false, lti _ contexts _ _ id = self. current _ lti _ context _ id ) return forums _ to _ show | [
-0.2904685139656067,
-0.303399920463562,
0.5051450729370117,
0.00856118742376566,
-0.19529248774051666,
0.07527121901512146,
0.03560815751552582,
-0.1621476411819458,
1.1018916368484497,
0.052403662353754044,
-0.05514465272426605,
1.2719526290893555,
-0.2428039014339447,
0.2971116602420807... |
def start _ data _ migration ( self ) - > optional [ str ] : return pulumi. get ( self, " start _ data _ migration " ) | [
0.4212293028831482,
0.5720012187957764,
0.6711961030960083,
0.38484159111976624,
0.62919020652771,
1.3778526782989502,
-0.5179561376571655,
0.306339293718338,
0.4563908874988556,
-0.03854940086603165,
-0.5410657525062561,
1.4141919612884521,
0.9260820746421814,
-0.9946882724761963,
-1.88... |
def postreleaser _ after ( self, data ) : if not ask ('update pyfits homepage') : return previous _ version = new _ version = none while not previous _ version : previous _ version = raw _ input ('enter previous version [ % s ] :'% self. previous _ version ). strip ( ) if not previous _ version : previous _ version = s... | [
0.17597024142742157,
-0.7714797258377075,
0.7107067108154297,
0.29693135619163513,
-0.457786500453949,
-0.29288938641548157,
0.6474021673202515,
0.487262487411499,
0.27867740392684937,
0.12427430599927902,
-0.09889909625053406,
-0.03327297419309616,
-1.3046563863754272,
0.22331231832504272... |
def show ( self, par = none ) : if par is none : pars = self. pars ( ) else : pars = list ( par ) for parname in pars : print ( " % " * 72 ) print ( " parameter : ", parname ) print ( " % " * 72 ) self. _ _ parhandle [ parname ]. show ( ) | [
-0.1948002427816391,
-0.44406452775001526,
0.6669877767562866,
-0.2428017556667328,
-0.4559555649757385,
0.7197989821434021,
-0.04312649369239807,
0.10610373318195343,
-0.2178417295217514,
-0.07692241668701172,
0.6863855719566345,
1.1603938341140747,
-1.1237990856170654,
0.786482036113739,... |
def legal _ form _ type _ id ( self, legal _ form _ type _ id ) : self. _ legal _ form _ type _ id = legal _ form _ type _ id | [
0.21232597529888153,
-1.2219041585922241,
-0.10103955864906311,
-0.3252900242805481,
-0.06240019574761391,
0.8004687428474426,
-0.6409150958061218,
0.7443561553955078,
0.4567175507545471,
-1.0690566301345825,
-1.5519206523895264,
0.366292804479599,
-0.3883180618286133,
1.5422050952911377,
... |
def set _ timeout ( timeout ) : get _ profile ( ). set _ timeout ( timeout ) | [
0.796614408493042,
0.42758309841156006,
0.23386399447917938,
0.5821959376335144,
1.016637921333313,
0.5155715346336365,
0.4218735992908478,
0.5238311290740967,
-0.06117241084575653,
0.8359639644622803,
-0.8769516944885254,
0.6272262930870056,
-0.21533425152301788,
-0.3695499002933502,
-0... |
def branch _ encoding ( self, branch ) : # if a path is already cached, we return it path _ idx = self. branch _ to _ path _ idx ( branch ) if path _ idx! = 0 : path = self. _ encodings. get _ list ( path _ idx ) return path. view ( ) else : raise valueerror ( " no encoding has been computed for " " the specified branc... | [
-0.5613836646080017,
0.3768828511238098,
0.5309418439865112,
0.46624618768692017,
-0.6737403869628906,
-0.3662979304790497,
0.2642776072025299,
-0.8333610892295837,
0.3540152609348297,
-0.27407553791999817,
0.24281461536884308,
0.618981659412384,
-0.6229404807090759,
0.09911076724529266,
... |
def build ( self ) : if not os. path. isfile ( self. _ latpath ) : raise runtimeerror ( " settingsfactory : impact lattice file not found : { } ". format ( self. _ latpath ) ) with open ( self. _ latpath, " r " ) as fp : lattice _ elements = list ( _ latticeiterator ( fp. readlines ( ), skip = 11 ) ) lattice _ elements... | [
-0.12578484416007996,
-0.1420072615146637,
0.4149625599384308,
-0.430147647857666,
-0.27697479724884033,
0.20369015634059906,
0.6333048939704895,
0.024554220959544182,
-0.5304204225540161,
0.2122972458600998,
-0.005891634617000818,
0.12494601309299469,
-0.23854148387908936,
-0.046890106052... |
async def test _ step _ user _ unexpected _ exception ( hass : homeassistant ) - > none : with patch ( " pynina. baseapi. baseapi. _ makerequest ", side _ effect = exception ( " dummy " ), ) : result : dict [ str, any ] = await hass. config _ entries. flow. async _ init ( domain, context = { " source " : source _ user ... | [
0.11763089150190353,
0.862864077091217,
0.394145131111145,
0.8832319378852844,
0.31545910239219666,
0.6976019740104675,
0.027910888195037842,
-0.06495251506567001,
0.31219738721847534,
-0.5217110514640808,
-0.7059047818183899,
0.6242305636405945,
0.44032594561576843,
-0.10461027920246124,
... |
def floordiv ( x, y, name = none ) : with ops. name _ scope ( name, " floordiv ", [ x, y ] ) as name : return gen _ math _ ops. floor _ div ( x, y, name = name ) | [
0.012064331211149693,
0.37885409593582153,
0.5936792492866516,
0.37000271677970886,
-0.7740079760551453,
-0.026880482211709023,
0.008016269654035568,
-2.0576658248901367,
-0.5709639191627502,
-0.6738917827606201,
-0.08094660937786102,
0.6191996932029724,
0.6543644666671753,
0.3861853480339... |
def test _ list _ integer _ min _ length _ 1 _ nistxml _ sv _ iv _ list _ integer _ min _ length _ 2 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - minlength - 2. xsd ", instance = " nistdata / list / ... | [
-0.47179892659187317,
-0.5599775314331055,
0.42942535877227783,
0.5481072068214417,
-0.4199322462081909,
0.14736002683639526,
-0.7809706330299377,
0.0008228900260291994,
1.1043535470962524,
0.3158566355705261,
-0.9817839860916138,
0.06972543150186539,
-0.5328465104103088,
0.734295427799224... |
def get _ lists _ of _ user ( cls, user _ id : str ) - > list [ notetonlist ] : user _ id = cls. _ _ fix _ id _ type ( user _ id ) return cls. instance. db. get _ lists _ of _ user ( user _ id ) | [
-0.6186687350273132,
0.046376071870326996,
0.2443522810935974,
1.0844663381576538,
0.020710838958621025,
0.32994234561920166,
0.04417198896408081,
-0.8382816910743713,
1.0492932796478271,
-0.11070981621742249,
-1.4414734840393066,
0.6219424605369568,
0.16998116672039032,
1.5747463703155518... |
def discount _ cumsum ( x, discount ) : return scipy. signal. lfilter ( [ 1 ], [ 1, float ( - discount ) ], x [ : : - 1 ], axis = 0 ) [ : : - 1 ] | [
0.8278579711914062,
0.2761322855949402,
0.8875687122344971,
0.7546334862709045,
0.14693671464920044,
-0.1678527295589447,
-0.008613712154328823,
-0.22001419961452484,
0.379078209400177,
0.5253831148147583,
0.5868849754333496,
1.1709707975387573,
0.6329447627067566,
-0.5501527786254883,
0... |
def f _ factory ( w ) : return lambda v : ( w. dot ( v ) ) * ( 1 - v * * 2 ) | [
-0.5464922189712524,
-0.2893400490283966,
0.08191339671611786,
-0.5079787969589233,
-0.7359128594398499,
-0.27688875794410706,
1.051998496055603,
-1.161400318145752,
0.36133289337158203,
-0.4793568253517151,
-0.22202767431735992,
0.093409962952137,
1.0282291173934937,
-0.052961502224206924... |
def main ( size ) : infile = size + " _ b. in " output = " " with open ( infile ) as file : num _ cases = int ( file. readline ( ) ) for case in range ( 1, num _ cases + 1 ) : num _ flips = compute _ num _ flips ( file. readline ( ) ) output + = " case # % s : % s \ n " % ( case, num _ flips ) with open ( size + " _ b.... | [
-0.025644689798355103,
0.33547595143318176,
0.7570119500160217,
0.4608781635761261,
-0.7265389561653137,
0.23629184067249298,
1.7193931341171265,
0.8570582866668701,
-0.06732846051454544,
-0.047708358615636826,
-0.7487559914588928,
0.17039312422275543,
0.3725241720676422,
0.300355821847915... |
def saveascopy ( path ) : currentname = cmds. file ( query = true, scenename = true ) head, tail = os. path. split ( currentname ) folder, filename = os. path. split ( path ) if not folder : folder = head if not filename : filename = tail +'_ copy'filepath = libpython. normpath ( os. path. join ( folder, filename ) ) c... | [
-0.7058417797088623,
-1.1629316806793213,
0.8182652592658997,
-0.15742971003055573,
-1.2300565242767334,
0.42081785202026367,
1.3833763599395752,
-0.9789621233940125,
-0.33212965726852417,
1.1286565065383911,
0.000031905907235341147,
-0.347861647605896,
-0.27033424377441406,
-0.20072206854... |
def d _ grade _ ipix ( ipix, nside _ in, nside _ out, nest = false ) : if nside _ in = = nside _ out : return ipix if not ( nside _ in > nside _ out ) : raise valueerror ( " nside _ out must be less than nside _ in " ) return hp. vec2pix ( nside _ out, * hp. pix2vec ( nside _ in, ipix, nest ), nest = nest ) | [
-1.1080554723739624,
0.34749773144721985,
0.7056921720504761,
-0.5429272055625916,
-0.7478673458099365,
0.6335615515708923,
-0.229722797870636,
-0.41935995221138,
-0.5246960520744324,
-0.05390726029872894,
0.6941589117050171,
0.45344245433807373,
-0.2189871370792389,
-0.6688023209571838,
... |
def test _ create _ undirected _ edge ( self ) : v0 = undirectedvertex ( val ='v0') v1 = undirectedvertex ( val ='v1') e00 = undirectededge ( ( v0, v0 ), attrs = {'weight': 5, 0 : 1 } ) e01 = undirectededge ( ( v0, v1 ) ) self. assertequal ( e00. vertices, frozenset ( [ v0 ] ) ) self. assertequal ( e00. attrs, {'weight... | [
-0.08027312159538269,
-0.1484193503856659,
0.3604253828525543,
-0.4881018400192261,
0.16697411239147186,
1.1007112264633179,
0.2826802432537079,
0.1719294935464859,
-0.2907455563545227,
-0.5990413427352905,
-0.19539770483970642,
-0.22060823440551758,
0.04050428047776222,
0.3716965615749359... |
def strip _ active _ marbles ( marbles : list, active _ marbles : tuple ) : result = copy. deepcopy ( marbles ) for marble in active _ marbles : result. remove ( marble ) return result | [
-0.2516140043735504,
-1.1012823581695557,
0.3146458566188812,
-0.06682566553354263,
-0.7420117855072021,
0.5018059611320496,
0.37825214862823486,
0.449177086353302,
-0.3035753071308136,
1.3920599222183228,
-0.7965422868728638,
0.6716219186782837,
-0.9726522564888,
-1.245622992515564,
-0.... |
def push _ all _ rows ( grid, left = true ) : for i, row in enumerate ( grid ) : grid [ i ] = push _ row ( row, left ) | [
-0.17579245567321777,
1.8592044115066528,
0.5633488297462463,
0.9171154499053955,
0.13891616463661194,
0.15169009566307068,
-0.9615171551704407,
0.19867904484272003,
0.30008748173713684,
1.6843488216400146,
-0.06164039671421051,
-0.13962896168231964,
-0.8651361465454102,
2.1480162143707275... |
def testtitlenoresultsearch ( self ) : form = self. form form. enter _ value ('accids ','j : 43743') form. click _ search ( ) # finds the results table and iterates through the table table _ element = self. driver. find _ element ( by. id, " resultstable " ) table = table ( table _ element ) # finds the title column ti... | [
-0.04018132761120796,
0.4214929938316345,
0.526706874370575,
0.5421158075332642,
0.8522389531135559,
0.30763915181159973,
0.171601802110672,
-0.8487991690635681,
-0.5661232471466064,
-1.0878558158874512,
0.22536975145339966,
-0.6548198461532593,
-0.6164739727973938,
-0.038116130977869034,
... |
def _ calculate _ duration ( self ) : self. duration = round ( sum ( f [ " duration " ] for f in self. frames ), 2 ) return self. duration | [
0.001850985223427415,
-0.48613929748535156,
0.4073164165019989,
-0.62222820520401,
0.20518901944160461,
-0.5860769152641296,
0.8662676215171814,
0.035224463790655136,
-0.09007901698350906,
0.32185181975364685,
-1.2139472961425781,
-1.277356505393982,
0.17005497217178345,
1.2124006748199463... |
def test _ parse ( ) : # todo : convert to nose test print " = = = = testing parse = = = = " exp _ 2 _ tree = { " ( + 2 3 ) " : ['+ ', 2, 3 ], " 5 " : 5, " ( first ( list 1 ( + 2 3 ) 9 ) ) " : ['first ', ['list ', 1, ['+ ', 2, 3 ], 9 ] ] } for exp, tree in exp _ 2 _ tree. items ( ) : print " expression : ", exp print "... | [
0.374542236328125,
-0.16186100244522095,
0.689424991607666,
-0.24899430572986603,
-0.033444225788116455,
-0.6542245149612427,
-0.11614977568387985,
0.44358572363853455,
0.28287529945373535,
0.03099726140499115,
-0.9620363116264343,
0.09598545730113983,
0.1976657658815384,
0.466813355684280... |
def fdr ( ) : os. system ( " ". join ( [ " cp ", " mask. nii. gz ", stats _ dir ] ) ) os. chdir ( stats _ dir ) # create a p - value image dof = nb. load ( os. path. join ( stats _ dir, " tdof _ t1. nii. gz " ) ) dof = dof. get _ data ( ). max ( ) os. system ( " ". join ( [ " fsl5. 0 - ttologp - logpout logp1 varcope1 ... | [
0.24013842642307281,
-0.2794513702392578,
0.855073094367981,
0.14028556644916534,
-0.04787445813417435,
0.38699018955230713,
0.9343095421791077,
-0.3652552366256714,
0.03717415779829025,
-0.20519505441188812,
0.879255473613739,
-0.21706245839595795,
0.30398115515708923,
0.6158812046051025,... |
def load _ posqc ( self ) : rejectval = self. config. get ('profiles ','posqcreject') self. posqc = self. read _ var ( self. posqcvar )! = rejectval self. test _ shape ( self. posqcvar, self. posqc. shape, 1 ) | [
0.6854978799819946,
-0.30103006958961487,
0.5283733606338501,
-0.5265566110610962,
-0.12392596900463104,
-0.12539391219615936,
0.17046190798282623,
-0.48668235540390015,
-0.34694066643714905,
-0.4281363785266876,
0.16523122787475586,
-0.2994447350502014,
-0.4871145784854889,
-0.60427367687... |
def proc _ bias _ crrs ( ncp = 1, piggyback = false ) : # default return value ret = false if piggyback : ret = true else : # get new listing retcode = os. system ( " ~ / spy what ifu *. fits > what. list " ) if retcode = = 0 : # generate new makefile retcode2 = os. system ( " ~ / spy plan ifu *. fits " ) if retcode2 =... | [
-0.016771312803030014,
0.6972796320915222,
0.8653457164764404,
-0.3967420160770416,
0.28882622718811035,
0.5695642232894897,
0.15002982318401337,
-0.453765332698822,
-0.3001577854156494,
0.35091423988342285,
-0.18531104922294617,
0.5364691615104675,
-0.6800817847251892,
0.06511558592319489... |
def get _ ant _ version ( self ) : return self. _ send ( requestmessage ( 0, antversion. id ) ) | [
0.09870448708534241,
-0.15769685804843903,
0.13197444379329681,
0.3983164131641388,
0.5053820013999939,
-0.14219336211681366,
-0.7767872214317322,
-1.3108372688293457,
-0.10220489650964737,
-0.3991791307926178,
-0.21382565796375275,
1.02524733543396,
-0.3531920313835144,
-0.310316711664199... |
def _ sample _ meshes ( meshes, num _ samples ) : if num _ samples = = " verts " : normals = none if meshes. equisized : verts = meshes. verts _ batch else : verts = meshes. verts _ list else : verts, normals = sample _ points _ from _ meshes ( meshes, num _ samples, return _ normals = true ) return verts, normals | [
0.46462565660476685,
-0.2635050415992737,
0.22029268741607666,
0.9160890579223633,
-1.2496353387832642,
0.49776265025138855,
0.05328603461384773,
-0.16519351303577423,
1.0520920753479004,
0.5896077752113342,
0.2258683443069458,
-0.22274357080459595,
-0.06621019542217255,
0.3516365885734558... |
def test _ with _ input _ none ( ) : spectrum _ in = none spectrum = remove _ peaks _ around _ precursor _ mz ( spectrum _ in ) assert spectrum is none | [
0.5706552267074585,
-0.6469966769218445,
0.2838081121444702,
0.39362484216690063,
-0.12383236736059189,
0.11661658436059952,
0.7777494192123413,
0.5728869438171387,
0.5895859003067017,
-0.9199866056442261,
-0.636421799659729,
0.28842857480049133,
-0.9558584094047546,
1.1392837762832642,
... |
def get _ log _ path ( self ) : if self. _ _ cached _ log _ path is none : self. _ _ cached _ log _ path = self. _ callmethod ( " get _ log _ path " ) return self. _ _ cached _ log _ path | [
-0.06365136057138443,
0.2148168981075287,
0.3182697892189026,
1.0977511405944824,
-0.21342740952968597,
0.507731556892395,
0.6476351618766785,
-0.43957895040512085,
0.049916498363018036,
-0.5042769312858582,
0.2477940171957016,
0.7361729145050049,
-0.5283200740814209,
-0.3822985887527466,
... |
def print _ dict ( dic ) : print ( " \ n ". join ( " { : 10s } : { } ". format ( key, values ) for key, values in dic. items ( ) ) ) | [
0.32219380140304565,
0.18572071194648743,
0.5310531854629517,
-1.3236587047576904,
0.19269655644893646,
0.48399797081947327,
-0.7422025799751282,
0.7787427306175232,
-0.22552183270454407,
0.04031030833721161,
-0.23829315602779388,
0.2721821963787079,
1.0808826684951782,
0.7384414076805115,... |
def node _ let _ new ( node : list, key, value ) - > none : node. append ( [ " node _ let ", key, value ] ) | [
-0.010705560445785522,
0.9231832027435303,
0.2962861955165863,
-1.132790207862854,
0.13324791193008423,
0.3788282573223114,
-1.3578788042068481,
0.013773894868791103,
-0.7352187037467957,
0.29393434524536133,
-0.9461792707443237,
0.21937783062458038,
0.9103094935417175,
1.1018496751785278,... |
def get _ square _ image ( img ) : padding _ color = ( 0, 0, 0 ) width, height = img. size if width = = height : return img elif width > height : result = image. new ( img. mode, ( width, width ), padding _ color ) result. paste ( img, ( 0, ( width - height ) / / 2 ) ) return result else : result = image. new ( img. mo... | [
-0.49921607971191406,
0.21678225696086884,
0.7498345971107483,
0.4353638291358948,
0.05648064240813255,
-0.492648184299469,
-0.13586261868476868,
-0.6805998086929321,
0.36873558163642883,
-0.16299374401569366,
-0.013917716220021248,
-0.007194445468485355,
0.48271358013153076,
1.11614584922... |
def _ _ make ( self ) - > none : self. response = self. _ _ connect _ to _ endpoint ( ) if " data " in self. response : self. log. info ( " users received : { } ". format ( len ( self. response [ " data " ] ) ) ) self. _ _ save ( ) self. log. info ( " users not saved because already in the db : { } ". format ( len ( se... | [
-0.6248546838760376,
0.043223220854997635,
0.687838077545166,
-0.29025858640670776,
0.8889394402503967,
-0.3271547555923462,
0.37502458691596985,
-0.09371618181467056,
-0.16003307700157166,
0.02457520179450512,
-0.519442617893219,
-0.8618149757385254,
-0.3185115456581116,
-0.21123860776424... |
def deserialize _ safe _ collection ( cls, byts ) : subtype, = cls. subtypes unpack = uint16 _ unpack length = 2 numelements = unpack ( byts [ : length ] ) if numelements = = 0 and len ( byts ) > 2 : unpack = int32 _ unpack length = 4 numelements = unpack ( byts [ : length ] ) p = length result = [ ] for n in xrange ( ... | [
0.12479653209447861,
0.48800694942474365,
0.7984070777893066,
-0.07985913008451462,
-0.26243963837623596,
-0.5157480835914612,
-0.07402725517749786,
-0.5291658639907837,
0.41050204634666443,
-0.11354158073663712,
-1.1337440013885498,
-0.059096984565258026,
-0.8533637523651123,
-0.935498118... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.