text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def gpservice ( request ) : return render ( request,'the _ snowmen _ snowpack _ viewer / gpservice. html') | [
-0.5156641602516174,
0.6244824528694153,
0.18277297914028168,
0.2877945899963379,
-0.7235345840454102,
-0.021447036415338516,
0.1403307169675827,
0.0307659599930048,
0.38386499881744385,
-0.8579844236373901,
1.5212205648422241,
0.4115881025791168,
-0.42118024826049805,
0.8368092775344849,
... |
def has _ component ( self, component _ class ) : assert isinstance ( component _ class, type ) assert issubclass ( component _ class, component ) return self. _ components. has _ key ( component _ class. unique _ id ( ) ) | [
-0.6049779057502747,
-0.3407231867313385,
0.23402783274650574,
-0.6663525700569153,
1.2810097932815552,
0.7136737704277039,
-0.019487006589770317,
0.22979147732257843,
0.8299314975738525,
-0.4725441336631775,
-0.30353018641471863,
-0.37033379077911377,
0.07415372133255005,
0.59142386913299... |
def id ( self ) : mversion = mxs. maxversion ( ) [ 0 ] / 1000 sixtyfour ='' if ( mversion > 10 ) : mversion = 2009 + ( mversion - 11 ) # shifted to years at version 11 if ( mxs. is64bitapplication ( ) ) : sixtyfour ='_ 64'return'max % i % s'% ( mversion, sixtyfour ) | [
0.31743836402893066,
-0.21717798709869385,
0.642675518989563,
0.12688857316970825,
-0.514119029045105,
0.8707221150398254,
-0.8697537183761597,
0.004763299133628607,
0.7911849021911621,
0.7428939342498779,
-0.3898007273674011,
-0.08481671661138535,
-0.11398381739854813,
-0.1977574080228805... |
def _ spatial _ transform ( self, p, dx, invert = false ) : s = self. map _ config [ " scale " ] # convert dx to map image coordinate system with x as rightward and y as downward dx _ map = torch. stack ( [ ( dx [ :, 1 ] / s ), - ( dx [ :, 0 ] / s ), dx [ :, 2 ] ], dim = 1 ) # anti - clockwise rotation p _ trans = spat... | [
-0.9692976474761963,
0.23092955350875854,
0.6154209971427917,
-0.1910775750875473,
-0.7118103504180908,
0.2548570930957794,
-0.8679099082946777,
0.3706876337528229,
-0.21471856534481049,
0.8754618167877197,
-0.2126149833202362,
-0.43587955832481384,
0.22204768657684326,
-1.3334457874298096... |
def create _ sidebar ( how _ to _ text ) : im = image. open ( ceasiompy _ logo _ path ) st. set _ page _ config ( page _ title = " ceasiompy ", page _ icon = im ) st. sidebar. image ( im ) st. sidebar. markdown ( how _ to _ text ) | [
0.14922790229320526,
1.040264368057251,
0.38621923327445984,
0.1598237156867981,
-0.42155027389526367,
0.7448720932006836,
-0.1439048796892166,
0.6157563328742981,
-0.5742673277854919,
0.08690839260816574,
0.37308862805366516,
-1.505820393562317,
0.41837289929389954,
0.2119077742099762,
... |
def get _ link ( url : str ) - > html : return html ( f " < a href = { url } > { url } < / a > " ) | [
-0.12050966173410416,
0.5581547021865845,
0.05659610033035278,
-0.16611921787261963,
0.20089130103588104,
-0.09530853480100632,
-0.13706925511360168,
0.5240432024002075,
0.03491964563727379,
-0.7547186613082886,
0.36657029390335083,
0.9446107745170593,
0.3680950999259949,
-0.46829921007156... |
def _ sample _ her _ transitions ( self ) - > none : # sample goals and get new observations # maybe _ vec _ env = none as we should store unnormalized transitions, # they will be normalized at sampling time observations, next _ observations, actions, rewards = self. _ episode _ storage. sample _ offline ( n _ sampled ... | [
-0.19109898805618286,
0.03171008452773094,
0.6176553964614868,
0.3856132924556732,
-0.3176212012767792,
0.14814884960651398,
-0.06909272819757462,
-0.11050809174776077,
0.0855412632226944,
0.608521044254303,
-0.7798402905464172,
0.4412059783935547,
1.0264230966567993,
-0.38125935196876526,... |
def read _ json ( search, latitude, longitude ) : with open ( " json / { }. { }. { }. json ". format ( search, latitude, longitude ), " r " ) as f : return f. readlines ( ) | [
-0.9804425835609436,
-1.5114953517913818,
0.5681580305099487,
-1.0803439617156982,
-0.49275222420692444,
0.39024618268013,
-1.2043416500091553,
-0.19785051047801971,
-0.9715800881385803,
0.7483599781990051,
0.10918842256069183,
0.6038747429847717,
0.32172054052352905,
-1.0565494298934937,
... |
def get _ urn _ value ( urn, key ) : pairs = urn. split (':') for p in pairs : if p. startswith ( key +'=') : return p. split ('=') [ 1 ] return none | [
-0.4906162917613983,
-0.49661293625831604,
0.5634526014328003,
-0.02287999913096428,
-0.0017895447090268135,
-0.5838631987571716,
-0.6299422383308411,
0.24286818504333496,
-0.47224706411361694,
0.683561384677887,
-0.142255499958992,
0.7564871907234192,
-0.5906044244766235,
-1.3804104328155... |
def progress _ metrics ( self ) - >'outputs. progressmetricsresponse': return pulumi. get ( self, " progress _ metrics " ) | [
0.20002713799476624,
0.022335361689329147,
0.3938395380973816,
0.3699861764907837,
0.6626125574111938,
0.9668557643890381,
0.7511420249938965,
-0.3999282121658325,
-0.1663939207792282,
-0.32268622517585754,
-0.16883584856987,
-0.14087265729904175,
-0.2357729822397232,
-0.6567555069923401,
... |
def post ( self ) : data = request. json return insert _ role ( data = data ) | [
-0.7247886657714844,
0.3969552516937256,
0.6045945882797241,
-0.19493821263313293,
1.2830289602279663,
0.32203584909439087,
-0.8895929455757141,
-0.001759546110406518,
-0.5061366558074951,
0.22699715197086334,
-0.4814477562904358,
-0.5962715148925781,
-1.6653896570205688,
0.219796702265739... |
def pull _ funding _ proportionally ( self, amount ) : if amount < = 0 : # we are calling this function with argument 0 return 0 # first, pull funding proportionally from interbank loans. # then if these are exhausted, pull funding proportionally from repo pullfundingactions = self. get _ all _ actions _ of _ type ( pu... | [
-0.11520140618085861,
0.22580276429653168,
0.7167444825172424,
0.39968252182006836,
-0.16637811064720154,
0.0045158639550209045,
0.19083982706069946,
0.1316348910331726,
0.20049652457237244,
-0.021097535267472267,
0.2401924431324005,
-0.8924930095672607,
-0.5970690250396729,
0.481520831584... |
def simulate _ image _ direct ( mrcf, v, v, defocus, c _ s ) : # read the molecule with mrcfile. open ( mrcf ) as rho _ mrc : rho _ samples = rho _ mrc. data l = rho _ mrc. header. cella. x n = rho _ mrc. data. shape [ 0 ] angpix = l / n assert n = = rho _ samples. shape [ 1 ] and n = = rho _ samples. shape [ 2 ] print... | [
0.3185544013977051,
-0.03604822978377342,
0.7457587122917175,
-0.47343480587005615,
0.16067668795585632,
0.14461451768875122,
0.517778217792511,
0.08343405276536942,
0.45344778895378113,
0.3846677541732788,
1.0365265607833862,
-0.09882646054029465,
-0.36158478260040283,
-0.4813676476478576... |
def is _ murmur _ ring ( ring ) : for i in ring : if i < 0 : return true return false | [
-0.656063973903656,
0.2869319021701813,
0.45059239864349365,
0.8369129300117493,
0.8507933616638184,
0.7858448028564453,
-0.623559296131134,
-0.5314779281616211,
1.1241455078125,
0.2933080792427063,
-0.15169285237789154,
-0.13816022872924805,
-0.9111499786376953,
0.664460301399231,
-0.99... |
def swag _ validate _ schema ( component _ name ) : return {'tag':'validation ','description':'just checking. ','requestbody': {'description':'input object ','required': true,'content': {'application / json': {'schema': {'$ ref': f'# / components / schemas / { component _ name }'} } } },'responses': {'200': {'descripti... | [
-0.08384786546230316,
-0.8164008855819702,
0.7167282700538635,
-0.7811535596847534,
-0.3877533972263336,
-0.08994424343109131,
-0.23811878263950348,
0.184548020362854,
0.09199788421392441,
0.7104287147521973,
-0.21953649818897247,
0.13173803687095642,
-0.11364833265542984,
0.19053266942501... |
def test _ comoving _ vol _ init _ invalid _ cosmology ( comoving _ vol _ converter ) : with pytest. raises ( runtimeerror ) as excinfo : comovingdistanceconverter. _ _ init _ _ ( comoving _ vol _ converter, cosmology = " planck " ) assert " could not get specified cosmology " in str ( excinfo. value ) | [
0.8152526021003723,
-1.0792807340621948,
0.4782114326953888,
0.609735369682312,
-0.1528923511505127,
0.5176929235458374,
-0.4231191575527191,
0.44070303440093994,
-0.19450508058071136,
-0.25243040919303894,
-0.9047896862030029,
-0.04286109656095505,
-0.22706648707389832,
0.8924480080604553... |
def normalize ( string ) : trans _ table = maketrans ( " ", " " ) " create an empty translation table " result = string. translate ( trans _ table, punctuation ) " does no translation, but strips all punctuation " result = result. lower ( ) return result | [
1.4380115270614624,
-0.629897952079773,
0.3812984228134155,
-0.11086855083703995,
-0.886626124382019,
-0.4687466621398926,
0.2038901448249817,
0.8882851004600525,
0.17429326474666595,
-0.42826128005981445,
-0.3873402774333954,
-0.2804218530654907,
-1.402721643447876,
-0.7326750755310059,
... |
def _ _ str _ _ ( self ) : return f'{ self. first _ name } { self. last _ name } ' | [
-0.2063187211751938,
-1.8858274221420288,
0.6090819239616394,
-1.745850682258606,
-0.29493826627731323,
0.6467723846435547,
-0.9875731468200684,
0.08429884165525436,
-0.39783725142478943,
-0.5929387807846069,
0.6461475491523743,
0.4637065529823303,
0.3737789988517761,
-0.13535545766353607,... |
def _ _ init _ _ ( self, pathtofiles, stemmer = none, n = 1 ) : self. pathtofiles = pathtofiles self. stemmer = stemmer self. n = n self. ngrams = { } self. iteratethroughfiles ( ) | [
-0.12166421860456467,
0.4282172918319702,
0.32997652888298035,
0.3002559542655945,
0.0653882548213005,
-0.23109892010688782,
0.6807845234870911,
0.10435543954372406,
-0.7788122296333313,
-0.29250574111938477,
-0.24874775111675262,
-0.9386560320854187,
-0.26424840092658997,
0.96224164962768... |
def apply _ binarization _ params ( self, param _ file, ensure _ balanced = false ) : with open ( param _ file,'rb') as fin : params = pickle. load ( fin ) if params ['type'] = ='zscore': y _ norm = ( self. y - params ['mean'] ) / params ['std'] idx = np. abs ( y _ norm ) > params ['n _ std'] y = ( y _ norm [ idx ] > 0... | [
-0.27241748571395874,
-0.49775731563568115,
0.5543699860572815,
0.5398942828178406,
0.47242510318756104,
0.3611454367637634,
1.051519751548767,
0.15720859169960022,
-0.6854705810546875,
0.35043638944625854,
0.34081000089645386,
0.12533220648765564,
-0.6332884430885315,
0.6575625538825989,
... |
def test _ new _ user ( new _ user ) : assert new _ user. email = ='patkennedy79 @ gmail. com'assert new _ user. password _ hash! ='hsad @ # sfds _ 123qe! @ # @ 1'assert new _ user. check _ password ( " hsad @ # sfds _ 123qe! @ # @ 1 " ) assert not new _ user. is _ anonymous assert new _ user. role = ='user ' | [
-0.29174986481666565,
0.04082236438989639,
0.26422318816185,
0.6847415566444397,
0.619746208190918,
0.666399359703064,
0.2089887112379074,
-0.45624658465385437,
0.03218585625290871,
-0.5533584952354431,
-0.8107689023017883,
-0.1651790291070938,
0.4478336274623871,
0.6026837825775146,
0.4... |
def _ _ init _ _ ( _ _ self _ _, *, daily _ recurrence _ time : optional [ pulumi. input [ str ] ] = none, enabled : optional [ pulumi. input [ bool ] ] = none, location : optional [ pulumi. input [ str ] ] = none, notification _ settings : optional [ pulumi. input ['globalvmshutdownschedulenotificationsettingsargs'] ]... | [
-0.46540164947509766,
0.8277179598808289,
0.880183219909668,
0.5079801082611084,
0.7463035583496094,
0.27187249064445496,
-0.37861791253089905,
0.9521057605743408,
0.188446044921875,
1.067915439605713,
-0.7129506468772888,
0.24158231914043427,
-0.11577755212783813,
-0.590264618396759,
-0... |
def test _ invalid _ manifest _ filepath ( self ) : manifest ( ". / ehiiehaiehnatheita " ) | [
0.76356041431427,
-0.9051460027694702,
0.20747926831245422,
0.6372202634811401,
-0.5645285844802856,
0.8551871180534363,
-0.4720507562160492,
1.355859398841858,
0.06298656761646271,
-0.7172247767448425,
0.11999959498643875,
-0.1567562371492386,
0.18081650137901306,
0.3175417482852936,
0.... |
def http _ tokens ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " http _ tokens " ) | [
0.29569071531295776,
-0.017461514100432396,
0.5023775100708008,
0.24741686880588531,
0.9879884123802185,
1.3778347969055176,
-0.23090621829032898,
0.04658740013837814,
0.673298180103302,
-0.5155652761459351,
-0.6453627347946167,
1.628366470336914,
0.22219493985176086,
-1.0012848377227783,
... |
def _ _ states ( self, dump ) : return [ elem [ 0 ] for elem in dump ] | [
-1.5598738193511963,
-0.3277827203273773,
0.37374138832092285,
-0.9623438119888306,
-0.06243610754609108,
0.31414327025413513,
-0.601889967918396,
0.31640762090682983,
1.5198265314102173,
-0.1202489584684372,
-0.4020383954048157,
-0.7616581916809082,
0.0890124961733818,
-0.1670094430446624... |
def get _ endpoint ( self ) : # backends _ settings = getattr ( settings,'getpaid _ backends _ settings ', { } ) # backends _ settings = backends _ settings. get ('paypal ', { } ) # if self. test _ ipn : # return backends _ settings. get ('sandbox _ postback _ endpoint') # else : # return backends _ settings. get ('pos... | [
0.5259456634521484,
0.20359091460704803,
0.7244772911071777,
0.23394642770290375,
0.4541030824184418,
-0.4950689673423767,
-0.16501550376415253,
-0.09039556980133057,
0.7832970023155212,
0.1551046371459961,
0.700342059135437,
0.36367735266685486,
-0.9069111943244934,
0.3385414779186249,
... |
def rand _ randomobj ( df, col1, col2, outfile, outfile _ start = 0, outfile _ end = 100 ) : nodes _ u = list ( df [ col1 ]. unique ( ) ) nodes _ o = list ( df [ col2 ]. unique ( ) ) num _ o = len ( nodes _ o ) num _ graphs = 0 while num _ graphs < ( outfile _ end - outfile _ start ) : print num _ graphs r = nx. graph ... | [
-0.2834291458129883,
0.3698853552341461,
0.736430287361145,
1.003679871559143,
-0.457381933927536,
0.5940287113189697,
1.8573806285858154,
-0.20886510610580444,
0.1687518060207367,
0.12215445190668106,
-0.6371041536331177,
0.32705923914909363,
0.0979870855808258,
-0.5453246831893921,
0.3... |
def get _ services _ view ( request ) : return get _ services _ runner ( request ) | [
-0.7052361369132996,
0.9961142539978027,
0.18748274445533752,
-0.4223158061504364,
-0.6193514466285706,
-0.36720582842826843,
0.6209311485290527,
-0.9152461886405945,
-0.29528042674064636,
-1.2997708320617676,
1.8940010070800781,
0.5572951436042786,
0.23725201189517975,
0.360960990190506,
... |
def main ( ) : print ( " it works!!! ; - ) " ) # # # todo # # # do something with the various methods / functions of this file | [
0.4590127766132355,
-0.15178243815898895,
0.7377198934555054,
1.4691340923309326,
0.4653252363204956,
1.070664405822754,
0.9931325316429138,
0.45983004570007324,
-0.18851466476917267,
-0.58409583568573,
-0.19804947078227997,
0.31064295768737793,
-0.44257652759552,
-0.40022939443588257,
-... |
def shader ( coords, density ) : points = [ ] x _ min = int ( min ( [ x [ 0 ] for x in coords ] ) - 1 ) * density x _ max = int ( max ( [ x [ 0 ] for x in coords ] ) + 1 ) * density y _ min = int ( min ( [ y [ 1 ] for y in coords ] ) - 1 ) * density y _ max = int ( max ( [ y [ 1 ] for y in coords ] ) + 1 ) * density fo... | [
-0.10770351439714432,
-0.5255489349365234,
0.7862639427185059,
-0.4005582928657532,
-0.17549343407154083,
0.014725255779922009,
-0.5329558253288269,
-0.4948790967464447,
-0.06750022619962692,
0.7102922201156616,
0.5808914303779602,
-0.4857218563556671,
0.5950682163238525,
-0.20420689880847... |
def on _ file _ search ( request ) : if request. method = ='post': # get search key data from search form search _ value = request. post. get ('search _ value') print ( " = = = = = = = = = = = = = = = = = = = = = = = = " ) # get all requirements in on _ file status if request. user. has _ perm ('customer. customer _ vi... | [
0.4217411279678345,
-0.8828014135360718,
0.8726456165313721,
0.46140068769454956,
-0.3427795469760895,
0.33684054017066956,
0.36856475472450256,
0.45746293663978577,
-1.0876588821411133,
0.6661598086357117,
0.9848674535751343,
-0.2866066098213196,
0.3216717839241028,
1.1227948665618896,
... |
def _ field _ arg _ with _ new _ check _ trigger _ function ( self, outer _ self, * args, * * kwargs ) : trigger = false if self. _ plain _ field _ arg _ check _ trigger _ function ( outer _ self ) : new _ val = outer _ self. get _ new _ value ( self. field ) if new _ val = = self. new : trigger = true return trigger | [
-1.1771961450576782,
-0.37645742297172546,
0.36924004554748535,
0.11176426708698273,
-0.2624799311161041,
-0.14388656616210938,
-0.17127762734889984,
-0.31878331303596497,
-0.8152507543563843,
-0.1759497970342636,
-0.6745713353157043,
0.4663320481777191,
-0.1285639852285385,
0.393432915210... |
def _ hg _ get _ state ( self ) : if self. _ state in self. _ data : return self. _ data [ self. _ state ] return none | [
-0.09927484393119812,
-0.15691064298152924,
0.4536111056804657,
-0.272510290145874,
-0.3499320447444916,
-0.70163893699646,
-0.6721680760383606,
-0.7990595698356628,
-0.4399423897266388,
-0.6204841136932373,
0.34102100133895874,
0.5207558870315552,
-0.1496572196483612,
-0.6649492383003235,... |
def _ handle _ method _ frame ( self, frame ) : # if we don't have framemethod something is wrong so throw an exception if not isinstance ( frame, method ) : raise exceptions. unexpectedframeerror ( frame ) # if the frame is a content related frame go deal with the content # by getting the content header frame if spec.... | [
0.01757645048201084,
0.5126001834869385,
0.5772451758384705,
0.5405612587928772,
0.028818093240261078,
-0.9748395681381226,
0.17712728679180145,
-0.6371472477912903,
0.2932373583316803,
-0.48686766624450684,
0.28915300965309143,
0.11624164879322052,
0.0012131097028031945,
0.994060933589935... |
def _ greedy _ match _ objects ( self, z _ sup, z _ sup _ std = none, obj _ appearances = none ) : # scale to 0, 1 z = ( z _ sup + 1 ) / 2 m _ idx = [ 2, 3 ] if obj _ appearances is not none : # colors are already in 0, 1 z = torch. cat ( [ z, obj _ appearances ], - 1 ) if self. c. debug _ match _ appearance : # add co... | [
-0.32100531458854675,
-0.9282544851303101,
0.8134279847145081,
0.11476496607065201,
-0.44954946637153625,
0.11672120541334152,
1.4839571714401245,
0.0000034664192298805574,
-0.23171769082546234,
0.11520615965127945,
-0.14955516159534454,
0.9820001125335693,
0.26456645131111145,
-0.39753183... |
def saved ( ) : try : x, cleanframe = video _ capture. read ( ) new _ image = cv2. cvtcolor ( cleanframe, cv2. color _ bgr2gray ) if image _ name. get ( ) = = " " : messagebox. showerror ('name error ','enter a name first.') else : cv2. imwrite ( f " { os. getcwd ( ) } / faces / { image _ name. get ( ) }. jpg ", new _ ... | [
-0.651883602142334,
0.2896299660205841,
0.7224708199501038,
0.7079053521156311,
0.6516376733779907,
-0.4635502099990845,
0.35510656237602234,
-0.316912978887558,
-0.022640760987997055,
0.720910906791687,
-0.9958539605140686,
0.027373941615223885,
0.02453162707388401,
1.026796817779541,
-... |
def _ check _ potential _ output _ directory ( self, input _ path : path, candidates : set [ tuple [ str, optional [ str ] ] ], tree : directorytree ) - > set [ tuple [ str, optional [ str ] ] ] : subpaths = { str ( input _ path / path ) for path in tree. get ( input _ path, default = [ ] ) } if not self. _ is _ explic... | [
-0.5779350399971008,
-0.7341504096984863,
0.7350696921348572,
0.09646318852901459,
-0.6585617661476135,
-0.4350624680519104,
0.4293164908885956,
-0.06986626237630844,
-0.5037071704864502,
0.1757143884897232,
0.2669776976108551,
0.22277860343456268,
-0.4026649594306946,
0.6931774020195007,
... |
def test _ arange _ with _ floats ( self ) : def test _ f ( dummy ) : return torch. arange ( dummy. size ( 0 ), 30. 5, 0. 8 ) dummy = torch. randn ( 10 ) jitvsglow ( test _ f, dummy, expected _ fused _ ops = { " aten : : arange " } ) | [
0.4551631510257721,
1.1440199613571167,
0.48124873638153076,
0.44011542201042175,
0.40067896246910095,
0.1898372918367386,
0.2826693654060364,
-0.7077465057373047,
0.09446072578430176,
-0.12024480849504471,
0.021458681672811508,
0.29120364785194397,
0.4359668791294098,
0.800736129283905,
... |
def trustymail ( domain _ name, timeout = 30, smtp _ timeout = 5, smtp _ localhost = none, smtp _ ports = none, scan _ types = none, dns _ hostnames = none ) : # boto3 client for lambda lambda _ client = boto3 _ client ('lambda ', region _ name = awsregionname ) # the payload for the lambda function payload = {'domain ... | [
-0.4627780616283417,
0.7444887757301331,
0.8645221590995789,
-0.8615934252738953,
-0.4649881422519684,
-0.1912679374217987,
-0.3922756314277649,
-0.31534233689308167,
-0.17142486572265625,
1.319860816001892,
-0.9092774391174316,
1.4053409099578857,
0.008917107246816158,
-0.6067284941673279... |
def getimpresp ( ) : # open impulse file and determine which fault vertices were used. impulses = h5py. file ( impulsefile, " r ", driver = " sec2 " ) impc = impulses ['geometry / vertices'] [ : ] impv = impulses ['vertex _ fields / slip'] [ :, :, 0 ] impinds = numpy. nonzero ( impv! = 0. 0 ) impcused = impc [ impinds ... | [
0.36725378036499023,
-0.00830196775496006,
0.7483228445053101,
-0.7073429226875305,
-0.14889740943908691,
-0.10362376272678375,
0.9960212111473083,
-0.602781355381012,
-0.14223159849643707,
-0.1216246709227562,
-0.8768212199211121,
0.12058968096971512,
-0.8294680714607239,
-0.7692201137542... |
def notification _ settings ( self ) - > pulumi. input ['globalvmshutdownschedulenotificationsettingsargs'] : return pulumi. get ( self, " notification _ settings " ) | [
-0.13334807753562927,
0.9283055067062378,
0.558357834815979,
1.066128134727478,
0.8046432137489319,
0.5777435302734375,
0.5779212713241577,
0.319985032081604,
0.10373720526695251,
1.18915855884552,
-0.5232049822807312,
0.2686721384525299,
-0.09047138690948486,
-0.644600510597229,
-0.7177... |
def get _ subjects ( request ) : if _ is _ certificate _ provided ( request ) : try : return get _ authenticated _ subjects ( request. meta [ " ssl _ client _ cert " ] ) except exception as e : raise d1 _ common. types. exceptions. invalidtoken ( 0,'error extracting session from certificate. error = " { } " '. format (... | [
-0.5389869809150696,
0.6353684067726135,
0.3818783462047577,
0.8383596539497375,
-0.3808308243751526,
0.14382275938987732,
0.15031856298446655,
-1.3738330602645874,
0.10459881275892258,
0.3705708086490631,
0.141497403383255,
0.566401481628418,
-0.11320685595273972,
-0.609670102596283,
-0... |
def find _ entity _ by _ id ( self, entity, id ) : cls = entity cls. entity = entity cls. identica = self return cls. find _ by _ id ( id ) | [
-0.0016657502856105566,
-1.2442457675933838,
0.30815112590789795,
0.28933653235435486,
0.8851737976074219,
-0.1940174549818039,
-0.11628749966621399,
-0.39936837553977966,
0.4855649471282959,
0.2533544600009918,
0.3251070976257324,
0.30245938897132874,
0.08130920678377151,
0.70792341232299... |
def make _ qs ( n, m = none ) : try : import sympy except importerror : raise importerror ( " this function requires sympy. please install it. " ) if m is none : syms = sympy. symbols ( " ". join ( f " q { i } " for i in range ( n ) ) ) if isinstance ( syms, tuple ) : return syms else : return ( syms, ) syms = sympy. s... | [
-0.4285045564174652,
0.5109205842018127,
0.29435238242149353,
-0.5902007818222046,
-0.27053362131118774,
-0.3084166646003723,
-0.2122803032398224,
-0.5875478982925415,
-0.045711781829595566,
-0.11477256566286087,
-0.3351685702800751,
-0.22428767383098602,
-0.21887104213237762,
-0.273808807... |
def cdf ( self, k ) : if type ( k )! = int : k = int ( k ) if k < 0 : return 0 cdf = 0 for i in range ( 0, k + 1 ) : cdf = cdf + self. pmf ( i ) return cdf | [
-0.0005066432640887797,
0.578748345375061,
0.6075851917266846,
0.08317635208368301,
-0.7573637962341309,
0.3455037772655487,
0.5727759003639221,
0.6944735050201416,
0.43723517656326294,
-0.2759222984313965,
-0.3782353103160858,
-0.941204309463501,
-1.126301884651184,
0.9451106786727905,
... |
def virtual _ machine _ id ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " virtual _ machine _ id " ) | [
1.05984628200531,
0.07143662869930267,
0.134482279419899,
0.6628143191337585,
1.0804606676101685,
1.5170456171035767,
-0.3113591969013214,
0.2589412331581116,
1.359727382659912,
0.15266728401184082,
0.40467363595962524,
1.2599303722381592,
-0.68015456199646,
-0.6809142231941223,
-0.61083... |
def test _ has _ conversion ( ) : assert distanceconverter. has _ conversion is false assert nulldistanceconverter. has _ conversion is false assert powerlawconverter. has _ conversion is true assert comovingdistanceconverter. has _ conversion is true | [
-0.04205717518925667,
-0.31455180048942566,
0.5990111827850342,
0.4028359651565552,
0.8772462606430054,
0.7805008888244629,
-0.21658700704574585,
0.5601709485054016,
-0.2156037837266922,
0.16886545717716217,
-1.2787542343139648,
-1.5143249034881592,
0.375600129365921,
1.257831335067749,
... |
def checklist ( self ) : # merge all trello checklists into a single list checklist = [ ] # unfortunately the py - trello lazy checklist load only works if all # card data is fetched first. self. _ _ card. fetch ( ) if self. _ _ card. checklists : for cl in self. _ _ card. checklists : for i in cl. items : checklist. a... | [
-0.5541419982910156,
-0.38443461060523987,
0.2835443317890167,
0.6543083786964417,
0.22325211763381958,
0.8584322929382324,
-0.4926791191101074,
0.4374047517776489,
0.36595675349235535,
0.29002541303634644,
-1.5657347440719604,
-0.41591352224349976,
-0.15778109431266785,
0.3747226595878601... |
def _ _ str _ _ ( self ) : # check fixed domain if ( len ( self ) = = 1 ) and not isinstance ( self [ 0 ], ( tuple, list ) ) : return str ( self [ 0 ] ) cout = [ " { " ] for i, d in enumerate ( self ) : if i > 0 : cout. append ( ", " ) if isinstance ( d, ( list, tuple ) ) : cout. append ( str ( d [ 0 ] ) + ".. " + str ... | [
-0.659022867679596,
-0.4223257899284363,
1.1192909479141235,
0.03419150039553642,
-0.3845546841621399,
0.5680499076843262,
0.007911150343716145,
-0.11171571910381317,
0.029783375561237335,
-0.35569173097610474,
0.8211813569068909,
0.527691125869751,
-0.44001880288124084,
-0.161269202828407... |
def solvenormal ( self ) : n = len ( self. trials [ 0 ] [ 0 ] ) mean0 = np. zeros ( n ) mean1 = np. zeros ( n ) mean2 = np. zeros ( n ) cov0 = np. zeros ( ( n, n ) ) cov = np. zeros ( ( 2 * n, 2 * n ) ) num = 0 for trial in self. trials : mean0 + = trial [ 0 ] for ( xi, xn ) in zip ( trial [ : - 1 ], trial [ 1 : ] ) : ... | [
0.13339649140834808,
-0.11711491644382477,
1.0085480213165283,
-0.1489979475736618,
0.3628089725971222,
0.32659050822257996,
0.16086390614509583,
0.4186258614063263,
0.2174174040555954,
0.8666903376579285,
-0.5778979659080505,
0.30459126830101013,
0.013735070824623108,
-0.09840680658817291... |
def addchild ( self, childnode ) : self. children. append ( childnode ) if self. depth > 0 : if self. depth = = 2 : childnode. label = self. label + treenode. _ _ charpos ( childnode. task. position ) + ". " else : childnode. label = self. label + str ( childnode. task. position ) + ". " | [
-0.0962907150387764,
-0.4514033794403076,
0.966853678226471,
-0.3458724021911621,
-0.45644664764404297,
1.4259414672851562,
-0.2922849953174591,
0.08288689702749252,
-0.36275896430015564,
0.11138834804296494,
-0.8694748282432556,
-0.08145782351493835,
0.24493329226970673,
0.040024701505899... |
def get _ donation _ amount ( self, donor ) : donation = self. feedback ( f " type amount to donate ( or type'quit') : " ). lower ( ) if donor in self. collection. donors : gifts = len ( self. collection. donors [ donor ]. donations ) else : gifts = 0 try : donation = float ( donation ) except valueerror : print ( f "'... | [
0.03894219547510147,
0.5874219536781311,
0.8763386607170105,
-0.1376015692949295,
-0.128262460231781,
0.20034462213516235,
1.0960835218429565,
-1.2047635316848755,
0.49891969561576843,
-0.23482415080070496,
0.2931354343891144,
0.670983612537384,
0.1985132098197937,
0.8422860503196716,
0.... |
def _ _ init _ _ ( self, ortho = 1, l1 _ reg _ factor = 0, add _ intersect = true, ortho _ method = " avg ", random _ state = 42 ) : self. ortho = ortho self. is _ fit = false self. ortho _ method = ortho _ method self. random _ state = random _ state self. add _ intersect = add _ intersect self. l1 _ reg _ factor = l1... | [
0.16528300940990448,
0.10018050670623779,
0.5480687618255615,
-0.04850062355399132,
0.3831198513507843,
0.47646674513816833,
0.9151750206947327,
0.3302358090877533,
0.25463205575942993,
0.1843222975730896,
0.20675240457057953,
0.3197145462036133,
0.5106066465377808,
-0.21197392046451569,
... |
def compute _ orbit ( r, v, dt, tmax ) : niter = int ( tmax / dt ) coords = np. empty ( ( niter, 3 ) ) for i in range ( 0, niter ) : r + = v * dt # gm = 6. 6743e - 11 * 1. 9885e30 * ( 1 / 1. 4960e11 ) * * 3 * ( 60 * 60 * 24 ) * * 2 = 2. 959e - 4 au ^ 3 / day ^ 2 acc = - 2. 959e - 4 * r / np. sqrt ( np. sum ( r * * 2 ) ... | [
-0.8577325940132141,
0.25347813963890076,
0.5804279446601868,
-0.3898504972457886,
-0.17013615369796753,
-0.04689545929431915,
0.15070153772830963,
0.2327509969472885,
0.11107674986124039,
1.0279357433319092,
0.3553820848464966,
-0.4606994092464447,
0.11135466396808624,
-0.76630038022995,
... |
def _ joinkeypath ( self, path _ segments ) : # this is an optimized way to combine the path segments into a single path # and combine multiple successive path separators to one. # split all the path segments based on the path ( segment ) separator. path _ segments = [ segment. split ( definitions. key _ path _ separat... | [
-0.39158305525779724,
-0.26476168632507324,
0.402183473110199,
0.490641713142395,
0.4354024827480316,
0.19294945895671844,
-0.36711588501930237,
0.08026350289583206,
-0.16311271488666534,
0.5827569365501404,
-0.23419103026390076,
-1.2959703207015991,
-1.0284810066223145,
-0.582193076610565... |
def downsample ( x, shift, n, j, zero = true ) : if j = = 0 : if shift < 0 : x1 = np. concatenate ( ( x [ - shift * n : ], np. zeros ( n - len ( x [ - shift * n : ] ) ) ) ) else : x1 = np. concatenate ( ( np. zeros ( shift * n ), x ) ) return x1 [ : n ] if shift < = 0 : x1 = x [ - shift * n : ] xhat = np. sqrt ( 2 * * ... | [
-0.09152359515428543,
-0.2162647843360901,
1.005178689956665,
-0.0025925938971340656,
-0.96384197473526,
-0.12228428572416306,
-0.7109599709510803,
-0.37542712688446045,
0.9309281706809998,
0.23349761962890625,
0.44070249795913696,
0.5314638018608093,
-0.40252670645713806,
0.66335529088974... |
def should _ poll ( self ) : return false | [
-0.65474534034729,
0.4611141085624695,
0.5564540028572083,
0.6797248721122742,
0.010127568617463112,
2.467784881591797,
-0.9320839643478394,
0.18320783972740173,
0.20190410315990448,
-0.46898946166038513,
0.4489663243293762,
-0.8691450953483582,
-0.9769643545150757,
-0.01590661145746708,
... |
def debug ( * args, * * kwars ) : if debuging : print ( " [ debug ] : ", * args, * * kwars ) | [
0.6916180849075317,
0.2828189730644226,
0.4575905203819275,
0.295356422662735,
0.8825613856315613,
0.11286807060241699,
-0.5234391093254089,
-0.2834141254425049,
-0.0312781035900116,
-0.26279744505882263,
0.020860975608229637,
1.1878552436828613,
-1.0154266357421875,
0.4994563162326813,
... |
def test _ just _ env ( self ) : with settings ( use _ ssh _ config = false ) : with settings ( key _ filename = " mykey " ) : eq _ ( key _ filenames ( ), [ " mykey " ] ) with settings ( key _ filename = [ " foo ", " bar " ] ) : eq _ ( key _ filenames ( ), [ " foo ", " bar " ] ) | [
-0.43370723724365234,
0.26145654916763306,
0.49226996302604675,
0.24892181158065796,
0.6421236991882324,
0.8084028363227844,
-0.4573330581188202,
0.05166855454444885,
-0.7208662629127502,
0.5029030442237854,
-0.4509700536727905,
0.4497016966342926,
-0.05978234112262726,
1.0331971645355225,... |
def _ _ create _ mailing _ label _ report _ data ( self ) : return donor. objects. all ( ) | [
-0.2949417233467102,
-0.34135910868644714,
0.35497012734413147,
-0.7623460292816162,
0.8747808337211609,
1.2747844457626343,
-0.9713365435600281,
0.15270356833934784,
0.10529505461454391,
-0.07003863900899887,
0.3897208273410797,
0.3438650965690613,
-0.17812351882457733,
-0.220368817448616... |
def serve ( port = 8080, host ='127. 0. 0. 1 ', debug = none, server ='cherrypy') : from. web import run, app if debug = = none : debug = app _ config. is _ debug else : debug = true if debug = ='1'else false if debug : logging. basicconfig ( level = logging. debug ) run ( app, server = server, host = host, port = port... | [
0.04358494281768799,
0.2778620719909668,
0.7002012133598328,
0.8086100220680237,
0.12307645380496979,
0.3704644441604614,
0.01920437440276146,
0.25601857900619507,
-0.7644520998001099,
-0.2119140774011612,
-0.4508802592754364,
0.47541651129722595,
-0.15502610802650452,
1.1891390085220337,
... |
def reloaddirectory ( self ) : self. dir = str ( self. ui. dirstring. text ( ) ) self. currentframe = int ( self. ui. input _ singleframe. toplaintext ( ) ) self. state = str ( self. ui. statestring. text ( ) ) self. data = load ( directory = self. dir ) self. processer = post ( ) self. directorychosen = 1 logging. inf... | [
-1.3218315839767456,
-0.6042959690093994,
0.4379476010799408,
-0.01506394986063242,
-0.24414680898189545,
-0.46407634019851685,
0.703829824924469,
-0.08242621272802353,
0.01245645061135292,
-0.6776048541069031,
-0.26275986433029175,
1.3801040649414062,
-0.0036916378885507584,
0.80847275257... |
def vect _ repr ( mu, covmat ) : c = np. stack ( [ covmat [..., 0, 0 ], covmat [..., 0, 1 ], covmat [..., 1, 1 ] ], axis = - 1 ) return np. concatenate ( [ mu, c ], axis = - 1 ) | [
-0.1797409951686859,
-0.17128555476665497,
0.6095417737960815,
-0.7320478558540344,
-0.05135557800531387,
0.1588924676179886,
0.10925696790218353,
-0.18304304778575897,
-0.03282175585627556,
1.1438779830932617,
0.6657667756080627,
0.9306967854499817,
0.025654803961515427,
-0.94450622797012... |
def predict ( self, seq, cutsite, splice _ acceptor _ site, grna _ orientation ='+') : seq = seq. upper ( ) # = = = = = = = = = = indelphi predict ( p ( p _ i ), for product p _ i ) = = = = = = = = = = indelphi _ offset = cutsite - self. _ indelphi _ cutsite indelphi _ cutsite = self. _ indelphi _ cutsite indelphi _ se... | [
0.06509190797805786,
-0.2829222083091736,
0.5392128825187683,
0.1178802028298378,
-0.3150824308395386,
-0.25625041127204895,
0.5606178045272827,
0.6943113803863525,
0.35919782519340515,
0.7419509291648865,
-0.2557023763656616,
0.8621427416801453,
-0.30233705043792725,
-0.313763290643692,
... |
def is _ connected ( self ) : return self. maestro. _ is _ connected | [
-0.47036436200141907,
-0.3884075880050659,
0.4475497305393219,
1.0645227432250977,
0.14117549359798431,
-0.096406489610672,
-0.8313093781471252,
0.48549842834472656,
-0.07481350004673004,
0.26894545555114746,
-0.4376750886440277,
0.4211304485797882,
-1.0089645385742188,
-0.2227695435285568... |
def compute _ ggn _ gram _ evals ( model, loss _ func, x, y, param _ groups, computations ) : loss = loss _ func ( model ( x ), y ) with backpack ( * computations. get _ extensions ( param _ groups ), extension _ hook = computations. get _ extension _ hook ( param _ groups, keep _ gram _ mat = false, keep _ gram _ eval... | [
0.14998158812522888,
0.5080698132514954,
0.7699805498123169,
-0.23902496695518494,
-0.6302435398101807,
-0.1349765956401825,
0.009247655980288982,
-0.749186635017395,
-0.9102424383163452,
0.8226209878921509,
-0.012084254063665867,
0.8990287780761719,
0.40861600637435913,
0.5177447199821472... |
def one _ wheel _ movements ( ) : x = speedsettings. speed _ fastest logger. info ( " speed " + str ( x ) ) dmcontroller. stop ( ) time. sleep ( 5 ) logger. info ( " front _ left _ forward " ) dmcontroller. front _ left _ forward ( x ) time. sleep ( 5 ) dmcontroller. stop ( ) logger. info ( " front _ left _ backward " ... | [
-0.19209302961826324,
0.8059931397438049,
0.7157904505729675,
-0.487283319234848,
0.8537638187408447,
-1.0017802715301514,
0.8016367554664612,
-0.7354176640510559,
-0.3489968478679657,
-0.3127661943435669,
-0.8673543334007263,
-0.3541918992996216,
0.2787137031555176,
0.7192299962043762,
... |
def get ( self ) : timestamp = np. asarray ( self. _ data ['timestamp'] ) value = to _ str ( np. asarray ( self. _ data ['value'] ) ) try : status = self. _ data ['status'] except valueerror : status = none return sensordata ( self. name, timestamp, value, status ) | [
-0.07341432571411133,
-0.4899809956550598,
0.34256666898727417,
-0.7981999516487122,
-0.17419248819351196,
0.14575131237506866,
-1.353769063949585,
-0.6988103985786438,
0.723767101764679,
-0.0013473457656800747,
-0.0807761400938034,
0.6213424801826477,
-0.19023497402668,
-0.659275054931640... |
def power _ law ( energy, power _ law _ alpha = 2, power _ law _ normalisation = 1e - 10, power _ law _ decorrelation _ energy = 1, * * kwargs ) : # add a power - law component to the hess function, its index and flux at 10 tev return power _ law _ normalisation * \ np. power ( energy / power _ law _ decorrelation _ en... | [
0.614482581615448,
-0.4891115427017212,
0.5302863717079163,
-0.4497102200984955,
0.5425152778625488,
0.6093005537986755,
-0.8581689596176147,
1.2168935537338257,
-0.44634586572647095,
0.6586471796035767,
1.1938238143920898,
-0.3441261053085327,
0.13778342306613922,
0.27256977558135986,
1... |
def get _ course _ name ( self, soup ) : course _ title = [ ] for title in soup. find _ all ( " td ", class _ = " column - 1 " ) : course _ title. append (''. join ( title. findall ( text = true ) ) ) # course _ title. append ('\ n') for i in range ( len ( course _ title ) ) : course _ title [ i ] = course _ title [ i ... | [
-0.7830379009246826,
-0.38791921734809875,
0.8544484972953796,
-0.04041219875216484,
0.1144871786236763,
-0.216371089220047,
-0.8227696418762207,
0.1196124479174614,
0.3926679790019989,
0.7509161829948425,
-0.2848374545574188,
-0.39418020844459534,
0.8694655895233154,
0.012846971862018108,... |
def predict ( self, x ) - > np. ndarray : baserate = self. base. predict ( x ) # predicting with fitted baserate model if self. base _ only : return baserate else : probabilistic _ anoms = self. rf. predict ( x = x ) # [ - 1 to 1 ] predictions = baserate + probabilistic _ anoms # stays a numpy ndarray, necessary for co... | [
-0.737721860408783,
-0.4537877142429352,
0.45031458139419556,
0.9572834968566895,
-0.05049850791692734,
-0.05700167641043663,
-0.7276520133018494,
-0.7431010603904724,
0.2847162187099457,
0.18991652131080627,
0.06681858003139496,
0.5700474977493286,
-0.3966660797595978,
0.21782907843589783... |
def generate _ secondary _ diagonal ( space, i, j ) : result = set ( ) def helper ( space, i, j, result ) : if 0 < = i < len ( space ) and 0 < = j < len ( space [ 0 ] ) and ( i, j ) not in result : result. add ( ( i, j ) ) helper ( space, i - 1, j + 1, result ) helper ( space, i + 1, j - 1, result ) helper ( space, i, ... | [
0.4260006844997406,
0.3628764748573303,
0.6060755848884583,
-0.3795788586139679,
-0.6494624614715576,
-1.4455797672271729,
0.6488523483276367,
-0.5925758481025696,
0.06715492159128189,
0.05636303126811981,
-1.1359679698944092,
0.79207843542099,
-0.4280901849269867,
0.19026575982570648,
0... |
def upload ( self, checkpoint _ name, local _ path, description = none, project _ id = none, scope ='private') : if project _ id is none : project _ id = self. project. id # upload artifacts artifacts = self. artifacts. upload ( filepath = local _ path, model _ name = self. model. name, checkpoint _ name ='{ } _ { } '.... | [
-0.47695842385292053,
-0.028510674834251404,
0.7015109062194824,
0.27509748935699463,
0.31180882453918457,
0.32931649684906006,
0.5898561477661133,
-0.08912751078605652,
-0.36118263006210327,
0.553021252155304,
0.06989743560552597,
0.2424166202545166,
-0.518944263458252,
-0.486075729131698... |
def _ get _ dynamic _ files ( cls ) - > list : return [ ] | [
-0.8351762294769287,
-0.6340077519416809,
0.559075653553009,
1.5364248752593994,
0.750725507736206,
0.4258686900138855,
-0.1685827374458313,
-0.0633203536272049,
-0.8921881914138794,
-0.8774006366729736,
-1.0402194261550903,
-0.14373548328876495,
0.17568619549274445,
0.7471900582313538,
... |
def resetlot ( self ) : # - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | return binomialdistbase. resetlot ( self ) | [
-0.3702096939086914,
-0.31890615820884705,
0.42849230766296387,
-0.7551752924919128,
-0.7122875452041626,
-0.3513689339160919,
0.5669082403182983,
0.28954988718032837,
-1.3602168560028076,
-0.093326136469841,
-0.20958225429058075,
1.2347131967544556,
-0.7732595205307007,
-0.381835848093032... |
def plot ( self ) : y = [ payment. total ( ) for payment in self. _ payments ] dates = [ datetime. strptime ( payment. date, " % y - % m - % dt % h : % m : % s " ) for payment in self. _ payments ] fig, ax = plt. subplots ( ) ax. plot ( dates, y, " o " ) ax. set ( xlabel = " fechas ", ylabel = " sueldo ( $ ) ", title =... | [
0.62545245885849,
0.4979100227355957,
0.6194520592689514,
-0.5272744297981262,
-0.9187964200973511,
0.22865509986877441,
-0.25072181224823,
0.1135505884885788,
-0.07563335448503494,
-0.7506569623947144,
0.5574320554733276,
0.9925005435943604,
1.2199069261550903,
0.3115829527378082,
-0.05... |
def test _ interface _ 2 ( ) : tcex _ instance = utility. init _ tcex ( ) owner = tcex _ instance. args. api _ default _ org batch = tcex _ instance. batch ( owner ) batch _ ind _ creation _ interface _ 2. address _ create ( batch ) batch _ ind _ creation _ interface _ 2. email _ address _ create ( batch ) batch _ ind ... | [
-0.23806118965148926,
0.8250418305397034,
0.47068846225738525,
0.6524876356124878,
0.2730751633644104,
1.2528955936431885,
0.6640394926071167,
-0.10147102177143097,
-1.466688871383667,
-0.24025298655033112,
-0.776181161403656,
-0.19471614062786102,
-0.20636187493801117,
0.42978981137275696... |
def gettable ( self, name ) : return self. _ _ tables. get ( name ) | [
-0.13320453464984894,
0.43313416838645935,
0.2303091585636139,
0.3599599003791809,
-0.4396161139011383,
-0.15083467960357666,
-0.0326138474047184,
-1.4723718166351318,
-0.579196035861969,
-0.1613815277814865,
-0.15095052123069763,
0.5116909742355347,
-0.44748741388320923,
-0.24050500988960... |
def reset _ message _ for _ subscription ( self, stream, subscription, local = false ) : if self. persistent : url _ endpoint ='/ streams / persistent / stream / { } / subscription / { } / resetcursor? local = { }'\. format ( stream, subscription, local ) # else : # url _ endpoint ='/ streams / non - persistent / strea... | [
-0.12101498246192932,
0.053840868175029755,
0.7970514297485352,
0.4520738124847412,
0.141702800989151,
-0.8842758536338806,
-0.1813458502292633,
-0.91527259349823,
-0.6277071833610535,
0.45122501254081726,
0.0367281399667263,
1.8908164501190186,
-1.5462696552276611,
-0.1881583034992218,
... |
def convert _ graph _ to _ cyto ( g, tree _ root = none ) : # use graphviz to layout the graph for us n = nx. nx _ agraph. to _ agraph ( g ) n. edge _ attr. update ( directed = true ) n = n. unflatten ( " - f - l6 " ) n. layout ( prog = " dot ", args = " - gratio = compress - grankdir = bt - gfontsize = 25 " ) for node... | [
-0.527889609336853,
-0.09523078054189682,
0.9322385787963867,
-0.361099511384964,
-0.6531260013580322,
-0.12498980015516281,
0.1251540631055832,
-0.3679411709308624,
-0.215347558259964,
0.16354043781757355,
-0.8739717602729797,
0.9491648077964783,
1.3208333253860474,
-0.014815721660852432,... |
def process _ quote ( self, message : message ) - > quote : text, author _ mention = message. content. rsplit ( maxsplit = 1 ) # todo : except valueerror : author = self. bot. get _ user ( get _ id _ from _ mention ( author _ mention ) ) return quote ( text, author ) | [
0.5736895203590393,
-0.3378528952598572,
0.31140872836112976,
0.6720110774040222,
0.46176838874816895,
-0.7386161088943481,
-0.40610671043395996,
0.43301326036453247,
-0.19388286769390106,
0.18027348816394806,
0.9679643511772156,
0.3768007457256317,
-0.9867790937423706,
0.31547117233276367... |
def make _ absolute _ href ( source _ href, start _ href = none, start _ is _ dir = false ) : if start _ href is none : start _ href = os. getcwd ( ) start _ is _ dir = true parsed _ source = urlparse ( source _ href ) if parsed _ source. scheme = ='' : if not os. path. isabs ( parsed _ source. path ) : parsed _ start ... | [
-0.12163188308477402,
-0.3411223590373993,
0.8668419122695923,
-0.1725606769323349,
-0.17362527549266815,
0.20013335347175598,
1.074507713317871,
0.8820167183876038,
-0.14094708859920502,
0.17203333973884583,
0.5321294665336609,
0.4085239768028259,
0.13241711258888245,
-0.04165458306670189... |
def parse _ rank _ page ( self, response ) : rankings = response. css ( '. rankingitemsitem') for fight in rankings : event _ name = fight. css ( '. right : : text'). get ( ) if ('ufc'in event _ name. lower ( ) ) or ('ultimate fighter') in event _ name. lower ( ) : self. last _ rank + = 1 fight _ link = fight. css (': ... | [
-0.5903856754302979,
0.0023491447791457176,
0.7293912172317505,
0.3529169261455536,
1.089045524597168,
-0.7501669526100159,
-0.48965200781822205,
0.16791540384292603,
0.017067179083824158,
-0.664970874786377,
0.1727023422718048,
-0.7549891471862793,
0.7483110427856445,
0.5728862285614014,
... |
def compute _ centroid ( data ) : # don't need to do uncessary slicing because using all these elements return sum ( data ) / len ( data ) # this is the average of all dimensions | [
0.39974671602249146,
-0.10773362964391708,
0.16870048642158508,
0.21198458969593048,
-0.048821333795785904,
-0.13043828308582306,
0.617134690284729,
0.8516170382499695,
0.759920060634613,
0.5525760650634766,
0.6513893008232117,
0.24540089070796967,
-0.724712610244751,
0.3581615686416626,
... |
def parse ( self, response ) : custom _ settings = {'item _ pipelines': {'ufcstats. pipelines. ufcstatspipeline': 400 } } self. dq. clear _ fight _ rank ( ) rank _ links = ['https : / / www. tapology. com / rankings / all - time - greatest - fights - in - mma - and - ufc - history? ranking = 14'] link _ root ='https : ... | [
-0.06826606392860413,
0.6971445679664612,
0.5556113123893738,
0.3688661754131317,
1.080112338066101,
-0.45248618721961975,
-0.5973912477493286,
0.06974775344133377,
0.13945917785167694,
-1.2382210493087769,
0.3594905436038971,
-0.5667455792427063,
0.8292542099952698,
0.529964029788971,
0... |
def _ on _ click _ finish ( self ) : self. _ axial. macro _ exec ( self. _ axial. macro _ out, self. _ axial. output _ file, path. macros ) self. view. accept ( ) | [
1.1372923851013184,
-0.21684785187244415,
0.20285670459270477,
-0.1808951497077942,
0.03886524960398674,
-0.41667231917381287,
1.348374605178833,
-0.13561628758907318,
-1.349336862564087,
-0.013413508422672749,
0.7147342562675476,
0.5304978489875793,
0.43679389357566833,
0.4565366208553314... |
def calc _ centroid ( vectors ) : centroid = np. empty ( vectors. shape [ 1 ] ) for i in range ( vectors. shape [ 1 ] ) : centroid [ i ] = np. mean ( vectors [ :, i ] ) return centroid | [
-0.12782537937164307,
-0.39924201369285583,
0.25927025079727173,
0.12957847118377686,
0.5586178302764893,
0.1725095957517624,
0.9673875570297241,
0.6835129261016846,
0.6913576126098633,
1.1543775796890259,
-0.23445986211299896,
0.11962535977363586,
-0.08930644392967224,
-0.0415076278150081... |
def train ( self, x _ train, y _ train ) : self. rdmf = self. rdmf. fit ( x _ train, y _ train ) | [
-0.2652825117111206,
0.5020669102668762,
0.22942394018173218,
-0.9128468036651611,
0.897637665271759,
-0.02508232370018959,
-1.0848290920257568,
0.34624120593070984,
-0.960078775882721,
-0.8138549327850342,
-0.9444935321807861,
0.8120468854904175,
-0.13059449195861816,
-0.9167652130126953,... |
def submit _ comment ( post, username, content, comment _ id = none ) : if content : error, comment _ id = none, comment. comment. db _ put ( post, username, content, comment _ id ) else : error, comment _ id ='please, add some content ', none return error, comment _ id | [
0.1287095546722412,
0.12124539911746979,
0.43655094504356384,
0.2664598822593689,
0.7785590887069702,
0.22220934927463531,
0.0648263543844223,
-0.20197288691997528,
-0.2785269021987915,
0.4495730996131897,
-0.8201176524162292,
-0.6502262353897095,
-1.5382764339447021,
0.36810338497161865,
... |
def set _ end _ max ( self, mx ) : assert _ is _ cpo _ interval _ value ( mx ), " interval min should be an integer in [ interval _ min, interval _ max ] " assert mx > = self. end [ 0 ], " interval max should be lower or equal to interval max " self. end = ( self. end [ 0 ], mx ) | [
-0.3873480558395386,
0.17299430072307587,
0.5896439552307129,
1.123271107673645,
-0.2048303782939911,
1.3217425346374512,
-1.0119338035583496,
0.18720188736915588,
-0.876977801322937,
0.7797919511795044,
-0.8541141152381897,
1.309880256652832,
-1.1290124654769897,
-0.25249889492988586,
0... |
def _ numparse01 ( self, val, ptype = none, ctype = none ) : if val [ - 1 ] in ['s ','s'] : vv = val [ : - 1 ] t ='short'if ptype = ='ushort': t ='ushort'if vv = ='0': o = 0 elif len ( vv ) = = 1 : o = int ( vv ) elif vv [ : 2 ] = ='0x': raise'not yet ready for hex'elif vv [ : 1 ] = ='0': raise'not yet ready for octal'... | [
-0.15355680882930756,
-0.7547862529754639,
0.7470783591270447,
-0.16616347432136536,
-0.7582640647888184,
-0.18204419314861298,
-0.012641477398574352,
-0.25651639699935913,
-0.38970258831977844,
0.5598450303077698,
-0.3443097770214081,
0.2294822484254837,
0.18334516882896423,
0.92634028196... |
def horizontalintervals ( voice ) : pairs = zip ( voice, voice [ 1 : ] ) pairs = filter ( lambda pair : pair [ 0 ]! = none and pair [ 1 ]! = none, pairs ) return [ pair [ 0 ] - pair [ 1 ] for pair in pairs ] | [
-0.012937195599079132,
-0.7873513698577881,
0.5907702445983887,
0.3841947019100189,
0.007120272610336542,
0.4038146734237671,
-0.7433710098266602,
0.37070825695991516,
-0.08787756413221359,
0.6719624996185303,
-0.5721089243888855,
-0.016392530873417854,
-0.8094140887260437,
0.1387833505868... |
def kodi _ info ( self ) : info = {'plot': self. description,'title': self. title,'originaltitle': self. title } if self. ptype = ='series': info ['mediatype'] ='tvshow'info ['plot'] = " seasons : { } \ nepisodes : { } \ n { } ". format ( self. season _ count, self. episode _ count, self. description ) elif self. ptype... | [
-0.2726684808731079,
-0.7170443534851074,
0.5385401844978333,
-0.5850211381912231,
-0.9070247411727905,
-0.25146231055259705,
-1.0780445337295532,
-0.9525892734527588,
-0.3000580370426178,
0.6170727610588074,
-0.17017897963523865,
1.3196347951889038,
-0.6498600244522095,
0.6924712657928467... |
def download _ atlas _ level ( self, atlas _ id : int ) - > str : level _ path = os. path. join ( self. dataset, " levels ", str ( atlas _ id ) ) if os. path. exists ( level _ path ) : return level _ path url = f " { self. atlas _ root } / gi / downloader. php? id = { atlas _ id } " logger. info ( " downloading atlas l... | [
-0.07577501237392426,
-0.4099884033203125,
0.3564479351043701,
-0.3051699101924896,
0.044208455830812454,
0.1594531536102295,
-0.13248997926712036,
-0.3889709413051605,
-0.1689835637807846,
-0.033929482102394104,
0.3477240800857544,
-0.023453740403056145,
-0.5018865466117859,
-0.3308704495... |
def generate _ grid ( self, length, offset _ coords = none ) : if self. domain is none : domain = spatial. shapely _ rectangle _ from _ vertices ( min ( self. raw _ data [ :, 1 ] ), min ( self. raw _ data [ :, 2 ] ), max ( self. raw _ data [ :, 1 ] ), max ( self. raw _ data [ :, 2 ] ) ) else : domain = self. domain sel... | [
0.017165692523121834,
0.8001406192779541,
0.6697829365730286,
-0.292693555355072,
-0.28695958852767944,
0.8818106055259705,
-0.3630688488483429,
0.5790368914604187,
0.3431962728500366,
-0.1989479511976242,
-0.20390357077121735,
1.029939889907837,
0.7398852705955505,
-0.36017751693725586,
... |
def load _ data ( * * kwargs ) : try : load _ global _ covid _ data ( ) except exception as e : logging. warning ( " failed to load global data with error : " + str ( e ) ) | [
0.11891811341047287,
0.5634658932685852,
0.49017003178596497,
0.7491169571876526,
-0.0825745016336441,
1.1560684442520142,
-0.4255651831626892,
-0.2995019555091858,
-0.30727556347846985,
0.43378275632858276,
-0.5587446093559265,
1.4686373472213745,
-0.8143492341041565,
-0.10242943465709686... |
def copyall ( self, b ) : self. currentlines = copy. deepcopy ( b. currentlines ) self. movelist = copy. deepcopy ( b. movelist ) self. pointslist = copy. deepcopy ( b. pointslist ) for x in range ( 4 ) : for y in range ( 4 ) : for z in range ( 4 ) : self. b [ x ] [ y ] [ z ] = b. b [ x ] [ y ] [ z ] | [
0.19345995783805847,
-0.995075523853302,
0.7342842221260071,
0.9372200965881348,
-0.38314321637153625,
0.6342184543609619,
0.10542300343513489,
-0.12039347738027573,
0.5061588883399963,
0.6957660913467407,
-0.2823405861854553,
0.21208417415618896,
-0.395195871591568,
0.27651694416999817,
... |
def get _ requests _ by _ tid _ sid ( self, tid : int, sid : int ) - > list [ request ] : requests = [ ] data = self. get _ data ('''select * from request where tid = % s and sid = % s order by create _ date'' ', ( tid, sid ) ) for request in data : requests. append ( request ( request [ 0 ], request [ 1 ], request [ 2... | [
-0.10710243880748749,
-0.34720680117607117,
0.4243329167366028,
0.6361504197120667,
1.011422872543335,
-0.7579239010810852,
-1.5334303379058838,
-1.3569878339767456,
-0.22708797454833984,
0.6623331904411316,
0.09472698718309402,
0.743065357208252,
0.37917643785476685,
-0.2842845022678375,
... |
def rvs ( self, num _ samples = 1, * * kwargs ) : noise = multivariate _ normal. rvs ( np. zeros ( self. ndim ), self. covar ( * * kwargs ), num _ samples ) noise = np. atleast _ 2d ( noise ) if self. ndim > 1 : noise = noise. t # numpy. rvs method squeezes 1 - dimensional matrices to integers if num _ samples = = 1 : ... | [
-0.38618505001068115,
-0.029441900551319122,
0.44449880719184875,
-0.07198682427406311,
0.029077818617224693,
-0.6790605783462524,
-0.47383543848991394,
-0.4884173274040222,
0.30445462465286255,
0.357535183429718,
0.36464643478393555,
0.42289528250694275,
-0.28457802534103394,
0.2904472351... |
def _ _ init _ _ ( self, algorithm : str, key : bytearray, init _ vect : bytearray, pad _ mode : int ) - > none : super ( ). _ _ init _ _ ( algorithm, key ) if pad _ mode not in ( pad _ mode _ 1, pad _ mode _ 2 ) : self. clear ( ) raise gostciphererror ('invalid padding mode') self. _ pad _ mode = pad _ mode if not che... | [
0.2711356580257416,
0.6979504823684692,
0.6022673845291138,
0.05319110304117203,
-0.22943837940692902,
0.5564691424369812,
0.45391562581062317,
-0.3356894552707672,
0.1705840528011322,
0.5352519154548645,
-0.6184087991714478,
0.6712071895599365,
0.0023407682310789824,
0.49378496408462524,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.