text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def shift _ and _ fill ( self, periods : int, fill _ value : union [ int, str, float ] ) - > " dataframe " : return ( self. lazy ( ). shift _ and _ fill ( periods, fill _ value ). collect ( no _ optimization = true, string _ cache = false ) ) | [
-0.3601267635822296,
0.7622788548469543,
0.41157689690589905,
-0.07030680030584335,
-0.48585042357444763,
-0.41295140981674194,
-0.12914808094501495,
-1.0943485498428345,
0.38313981890678406,
-0.6218665242195129,
0.19448348879814148,
0.9336789846420288,
0.48153725266456604,
-0.209754735231... |
def test _ get _ persisted _ upto _ position _ get _ next ( self ) - > none : self. _ insert _ row _ with _ id ( " first ", 3 ) self. _ insert _ row _ with _ id ( " second ", 5 ) id _ gen = self. _ create _ id _ generator ( " first ", writers = [ " first ", " second " ] ) self. assertequal ( id _ gen. get _ positions (... | [
-0.4621165096759796,
1.0817019939422607,
0.6753011345863342,
0.25430983304977417,
0.8004859685897827,
-0.24598701298236847,
0.5147190690040588,
-0.38125506043434143,
-0.2834823429584503,
-0.416757196187973,
-1.1722595691680908,
-0.4175364673137665,
0.4217205345630646,
0.1951580047607422,
... |
def annotate _ json ( self, text, annotators = none ) : # warn ( chaganty ) : i'd like to deprecate this function - - we # should just use annotate ( ). json # properties = { #'annotators': ', '. join ( annotators or self. default _ annotators ), #'outputformat':'json ', # } # return self. _ request ( text, properties ... | [
-0.6475158333778381,
-0.7734280228614807,
0.3900391459465027,
0.3997931182384491,
-0.8542550802230835,
-0.7367496490478516,
-0.6407978534698486,
-0.693808376789093,
0.46367767453193665,
-0.4813691973686218,
-0.7579148411750793,
0.6646655797958374,
-0.5892195105552673,
0.21386775374412537,
... |
def _ check _ generator ( self, generator ) : if generator is none : generator = inlinegen ( ) elif isinstance ( generator, basestring ) : generator = gen _ from _ string ( generator ) elif not isinstance ( generator, generator ) : raise valueerror ( " imgdataset constructor accepts for its " " generator a string ( the... | [
-0.9021995067596436,
0.047173872590065,
0.2597913444042206,
-0.34923166036605835,
-1.1564122438430786,
-0.1645665317773819,
0.09549008309841156,
0.6462899446487427,
-0.025623103603720665,
-1.428821325302124,
1.1852561235427856,
0.420309454202652,
-0.4373931884765625,
0.906326949596405,
0... |
def isvalidstatement ( self, statementstring, variabletable ) : # may want this to throw an exception if the statement looks almost proper, but fails for some reason return statementstring = = " hai! " | [
-0.3090069591999054,
-0.4110984802246094,
0.3774212896823883,
0.7587015628814697,
-1.3271830081939697,
0.30683547258377075,
-0.6275390982627869,
0.07985072582960129,
0.4897952079772949,
-0.08285187929868698,
0.33293861150741577,
0.014146121218800545,
-1.009182095527649,
-0.3901804387569427... |
def _ _ init _ _ ( self, cd, name ) : self. cd = cd self. name = name self. obj = self. build ( ) | [
0.1963888257741928,
-1.415438175201416,
0.6268364191055298,
0.15842023491859436,
-0.7416975498199463,
0.5773333311080933,
-0.012960855849087238,
-0.11168614029884338,
-0.06270493566989899,
-0.3985798954963684,
-1.0279070138931274,
0.6995354890823364,
0.3929578363895416,
0.2992282807826996,... |
def load _ data ( database _ uri : str, input _ data : dict ) - > pandas. dataframe : return pandas. read _ parquet ( database _ uri ) | [
0.06784570217132568,
0.9904401898384094,
0.23650315403938293,
-0.413607656955719,
0.045036379247903824,
0.5738369822502136,
-0.6718939542770386,
0.684664249420166,
-0.7513604164123535,
-0.6457739472389221,
0.8364347815513611,
0.08319686353206635,
-0.8325142860412598,
-1.5499494075775146,
... |
def dequeue ( self ) : try : return self. _ dll. pop ( ) except : raise indexerror ('cannot dequeue from an empty queue.') | [
0.5207232236862183,
-0.2738189101219177,
0.647712230682373,
-0.3967605531215668,
-0.3640335202217102,
-0.3535101115703583,
0.11987929791212082,
-0.6494176983833313,
0.00777466781437397,
-0.4130654036998749,
0.32741934061050415,
0.13895514607429504,
-1.0261037349700928,
-0.19687341153621674... |
def is _ anonymous ( self ) : return false | [
-1.2649028301239014,
-0.7861166000366211,
0.4348381459712982,
1.329760193824768,
-0.3907042443752289,
0.826964259147644,
-0.18021446466445923,
-0.010729044675827026,
-0.2348945140838623,
0.1642003357410431,
-0.8028252720832825,
0.27555668354034424,
-0.6812708973884583,
0.2718992233276367,
... |
def test _ _ put _ size _ into ( ) : for input _, defaults, expected _ output in ( ( 0, false, {'size': 0 } ), ) : data = put _ size _ into ( input _, { }, defaults ) vampytest. assert _ eq ( data, expected _ output ) | [
-0.039671890437603,
1.2828718423843384,
0.30106085538864136,
-0.31815847754478455,
0.7754864692687988,
-0.1474844068288803,
0.08250836282968521,
-0.2463732808828354,
-0.5888416767120361,
-0.2114052176475525,
-1.001362681388855,
-0.5107349753379822,
-1.1725847721099854,
-0.14349964261054993... |
def getstate ( ) : # returns state object, or string " state name not found " searchstring = raw _ input ( " enter the state name : " ) global listofstates global sortstate # 4a binary search, if current list order is state name abc if ( sortstate = = " quicksort " ) : print " binary search \ n " leftboundary = 0 right... | [
0.12661023437976837,
-0.35645100474357605,
0.8301940560340881,
0.29604050517082214,
-0.9686363935470581,
-0.1308201104402542,
0.4595409035682678,
-1.195745825767517,
0.2328927367925644,
-0.5602211952209473,
0.10434003919363022,
-0.17612676322460175,
-0.6859351396560669,
-0.2724670767784118... |
def get _ first _ female _ names ( ) : filename = '. / data / names / dist. female. first'# use pandas to get data df = pd. read _ csv ( filename, sep ='', header = none ) series = df. iloc [ :, 0 ] series. dropna ( inplace = true ) # convert pandas series to set return set ( series ) | [
-0.0572858527302742,
0.49023428559303284,
0.6843612790107727,
-0.6863972544670105,
0.4273791015148163,
0.19241562485694885,
-1.0857573747634888,
-0.35384348034858704,
-0.8727721571922302,
0.21926386654376984,
-1.009417176246643,
0.934970498085022,
0.9557700753211975,
0.062390655279159546,
... |
def parsefault ( self, reason ) : try : document = fromstring ( reason. value. response ) except exception, e : # some devices give bad faults. # dlink dir - 665 gives a faulty prefix. return failure. failure ( soapfault ('', none ) ) faultelement = document. find ( '. / /'+ env ['fault'] ) return failure. failure ( so... | [
0.5476951003074646,
-0.06302426755428314,
0.2883225381374359,
-0.07745671272277832,
-0.3505720794200897,
-0.6610274314880371,
-0.2359265387058258,
-0.4168759286403656,
1.2565966844558716,
-1.108086109161377,
0.24304340779781342,
0.02696939930319786,
-0.1390722244977951,
-0.2905697822570801... |
def test _ key _ generation _ containertask _ child ( self ) : for i in range ( len ( self. container _ task. subtasks ) ) : expected ='testcontainertask. % i. testtask'% i key = self. container _ task. subtasks [ i ]. task. get _ key ( ) self. assertequal ( key, expected,'generated key [ % s ] does not match the expec... | [
0.42676183581352234,
0.09565624594688416,
0.6850612759590149,
0.9862809777259827,
0.4260198473930359,
0.9020509123802185,
0.8125090003013611,
-0.11901861429214478,
-0.6371951699256897,
-0.45624634623527527,
-1.0397889614105225,
-0.38087552785873413,
0.5955454111099243,
0.15496133267879486,... |
def print _ block ( b : block, verbose = false ) - > none : print _ block _ indented ( b, 0, verbose ) | [
0.6787806749343872,
0.947772204875946,
0.732688307762146,
1.6271123886108398,
0.9362101554870605,
0.2467551827430725,
-0.38533592224121094,
-0.17994752526283264,
-0.6047082543373108,
0.14092867076396942,
0.20486681163311005,
1.308584451675415,
-1.0038257837295532,
0.5588741302490234,
-0.... |
def _ runnavigation ( self, clear _ cache, repeat _ id = none ) : run _ path = none if repeat _ id is not none : run _ path = os. path. join ( self. output _ dir, str ( repeat _ id ) ) if not os. path. isdir ( run _ path ) : os. makedirs ( run _ path ) self. _ chrome _ ctl. setnetworkemulation ( self. _ getemulatornetw... | [
-0.8729871511459351,
0.625610888004303,
0.775202214717865,
0.47024697065353394,
0.3975343108177185,
-0.3126884996891022,
0.6955640316009521,
-0.4307556450366974,
0.09073624014854431,
0.0945754125714302,
-0.23265212774276733,
1.1751750707626343,
-0.035615768283605576,
0.5194613337516785,
... |
def json _ get _ data ( filename ) : with open ( filename ) as fp : json _ data = json. load ( fp ) return json _ data return false | [
-1.189644455909729,
-0.8012584447860718,
0.44532114267349243,
-0.9372402429580688,
-0.39046987891197205,
0.6305869221687317,
-0.5643350481987,
0.18766352534294128,
-0.8345196843147278,
-0.09385725110769272,
-0.8753736615180969,
0.11447442322969437,
0.05919627845287323,
-0.9500524401664734,... |
def main ( ) - > int : if sys. version _ info < ( 3, 5, 0 ) : sys. stderr. write ( " you need python 3. 5 or later to run this script \ n " ) return 1 _ _ init _ logging ( ) m _ log = logging. getlogger ( _ _ name _ _ ) args = _ _ get _ args ( ) logging. getlogger ( ). setlevel ( args. loglevel. upper ( ) ) if args. pr... | [
0.01200215145945549,
0.38078469038009644,
0.9641126990318298,
0.6630823612213135,
-0.023659413680434227,
0.5019100904464722,
1.0471320152282715,
0.3079412579536438,
-1.2209548950195312,
1.1008445024490356,
-0.2561626136302948,
-0.10462186485528946,
-0.1065104529261589,
0.049313779920339584... |
def setfaction ( cell, newfaction ) : if cell. faction! = newfaction and cell. isfactionunknown ( ) : cell. setfaction ( newfaction ) # notify its adjacent cells for sidedir in hexsidedir : adjcell = cell. adjcells [ sidedir ] # if the side is blank, set the adjacent cell to be the same if cell. sides [ sidedir ]. isbl... | [
0.4948659837245941,
0.1556059569120407,
0.5266852974891663,
0.04426850751042366,
0.7756539583206177,
-0.5001097917556763,
-0.18012747168540955,
0.4824131429195404,
-0.03301292657852173,
-0.006521451286971569,
-0.5674983859062195,
-0.015252428129315376,
0.2803333103656769,
0.818481624126434... |
def get _ topological _ view ( self, mat = none ) : if mat is none : mat = self. to _ dense _ design _ matrix ( ). x assert mat. shape [ 1 ] = = self. shape [ 0 ] * self. shape [ 1 ] * 3 return numpy. reshape ( mat, mat. shape [ 0 ], self. shape [ 0 ], self. shape [ 1 ], 3 ) | [
-0.23649729788303375,
1.239354133605957,
0.5578713417053223,
0.0215502567589283,
-0.012085764668881893,
-0.15336191654205322,
-0.03331160545349121,
-0.6055613160133362,
0.7416156530380249,
-0.9228445291519165,
1.2777893543243408,
0.5203837752342224,
0.20871476829051971,
-1.093756914138794,... |
def test _ create _ recipe _ with _ ingredients ( self ) : ingredient1 = sample _ ingredient ( user = self. user, name ='ingredient1') ingredient2 = sample _ ingredient ( user = self. user, name ='ingredient2') payload = {'title':'sample title ','ingredients': [ ingredient1. id, ingredient2. id ],'time _ minutes': 4,'p... | [
0.20141464471817017,
-0.17285601794719696,
0.5352688431739807,
0.17637933790683746,
0.47606781125068665,
0.003223641077056527,
-1.312680959701538,
0.5244621634483337,
-0.6450996398925781,
0.19555090367794037,
-0.7630084156990051,
-0.7419443726539612,
0.18062670528888702,
0.3148971498012543... |
def solve _ in _ thread ( self, solver : qobject, random _ pick : bool = false ) - > bool : if self. brute _ force _ time = = 0 : return false self. calculate _ valid _ numbers ( ) cell = self. get _ empty ( ) solver. progresschanged. emit ( ) time. sleep ( 1 / solver. speed ) if cell is none : return true numbers = ce... | [
-0.7487531304359436,
0.9395917057991028,
0.5853399634361267,
0.8671144843101501,
0.18165214359760284,
0.0022987029515206814,
0.6507070660591125,
-0.6934954524040222,
-0.061601947993040085,
-0.21781903505325317,
-1.1449540853500366,
-1.1164882183074951,
-0.834488034248352,
0.599694609642028... |
def _ process _ operator ( self, token : operator ) - > none : if len ( self. _ operators ) = = 0 or self. _ operators [ - 1 ] = = " ( " : self. _ operators. append ( token ) else : operator = self. _ operators [ - 1 ] my _ priority = token. get _ priority ( ) if my _ priority > operator. get _ priority ( ) : self. _ o... | [
-0.8185949921607971,
0.794964611530304,
0.8317068815231323,
-0.27946534752845764,
0.01528505701571703,
-1.24753737449646,
-0.8893563151359558,
-0.09019483625888824,
0.3057820498943329,
0.15792833268642426,
-0.49994322657585144,
-0.001987320138141513,
-0.17904451489448547,
0.306761890649795... |
def vote ( self, object, user, mode ) : if self. can _ vote ( object, user ) and self. can _ moderate ( object ) : content _ type _ object, object _ id = contenttype. objects. get _ for _ model ( object. _ _ class _ _ ), object. id try : vote = super ( contentapprovalmanager, self ). get ( content _ type = content _ ty... | [
0.14570331573486328,
-0.49461379647254944,
0.8895106911659241,
0.3517789840698242,
-0.10682438313961029,
1.022784948348999,
-0.7029153108596802,
-0.07790123671293259,
-0.2191418707370758,
0.7947191596031189,
-0.22975027561187744,
0.21711699664592743,
-0.6593690514564514,
0.2019066661596298... |
def _ disconnected ( self, link _ uri ) : print ('disconnected from % s'% link _ uri ) self. is _ connected = false | [
-0.21678800880908966,
-0.8280367851257324,
0.26201289892196655,
-0.5340692400932312,
0.948974609375,
0.3941127359867096,
-0.6396000385284424,
0.4525851607322693,
0.4845309257507324,
-0.8158746361732483,
0.1587923765182495,
0.7097619771957397,
-0.9174279570579529,
-0.7112510204315186,
-0.... |
def save _ password ( self, symbol ) : if self. validate _ passcode _ change ( ) and self. cump = = self. cump _ old : file = open ( self. pw _ file,'w') file. write ( self. cump ) file. close ( ) return true return false | [
-0.3236853778362274,
-0.34133440256118774,
0.8860663175582886,
0.3111213445663452,
0.8080791234970093,
0.309975266456604,
1.0383466482162476,
-0.39048147201538086,
0.01946133002638817,
0.6228702068328857,
-0.6740649938583374,
-0.7122995257377625,
-0.582078218460083,
0.24655497074127197,
... |
def get _ sample _ img _ list ( soup ) : # don't get soup too often, the server will rufused request # soup = get _ link _ soup ( link ) # sampleimgs = [ ] sampleimgelems = soup. select ('a [ class = " sample - box " ]') for n in sampleimgelems : yield n ['href'] # sampleimgs. append ( n ['href'] ) # return sampleimgs | [
-0.9679839015007019,
0.062222812324762344,
0.48828595876693726,
-0.043945685029029846,
-0.11933556944131851,
-0.4898422956466675,
0.08662912249565125,
-0.12973114848136902,
1.1962405443191528,
-0.38251930475234985,
-0.2510867714881897,
0.09237993508577347,
0.4225863218307495,
1.08988749980... |
def route _ clients ( sol _ file, clients, route _ map, algorithm, sec _ optim, runs, write _ solution, print _ solution ) : sol = open ( sol _ file,'w') # output file. logging. debug ( " fulfilling clients'requests " ) for run in range ( runs ) : for client in clients : logging. debug ( " taking care of client { } ". ... | [
0.37850281596183777,
-0.6614214777946472,
0.4643913805484772,
0.1930318921804428,
0.8360105752944946,
0.15001069009304047,
1.2668750286102295,
-0.3510535955429077,
-0.8854643702507019,
0.3623868525028229,
0.2760998606681824,
0.16695231199264526,
0.1962297260761261,
-0.034570615738630295,
... |
def bitstring _ to _ list ( bitstring ) : bits = [ ] for i, b in enumerate ( bitstring ) : bits. append ( int ( b ) ) return np. array ( bits, dtype = np. int ) | [
-0.5218424797058105,
-0.888468325138092,
0.46852976083755493,
-0.4621730446815491,
1.1115137338638306,
0.2315647155046463,
0.335575670003891,
-0.08353570848703384,
0.823699414730072,
1.0362926721572876,
-0.9830337166786194,
1.114607572555542,
-0.8050782084465027,
-0.306560218334198,
0.40... |
def wolfepowellcondition ( alpha _ 0, alpha _ u, alpha _ l, func _ alpha, grad _ alpha, rho = 0. 1, sigma = 0. 7 ) : lc = ( grad _ alpha ( alpha _ 0 ) > = sigma * grad _ alpha ( alpha _ l ) ) rc = ( func _ alpha ( alpha _ 0 ) < = func _ alpha ( alpha _ l ) \ + rho * ( alpha _ 0 - alpha _ l ) * grad _ alpha ( alpha _ l ... | [
0.8106823563575745,
-0.8723724484443665,
0.5949816107749939,
-0.8116668462753296,
-0.36765116453170776,
0.33262982964515686,
0.20763640105724335,
0.4154661297798157,
-0.891204833984375,
0.22220641374588013,
-0.13038581609725952,
0.02126648649573326,
-0.08505825698375702,
1.5087785720825195... |
def new _ state ( self, value : str ) - > bool : if self. _ progress = = len ( self. _ sequence ) : # finished already raise patternmatchererror ( " sequential matching already complete " ) # try to match if self. _ sequence [ self. _ progress ]. match ( value ) : if self. _ progress = = len ( self. _ sequence ) - 1 : ... | [
-1.0004048347473145,
0.30293962359428406,
0.8213613629341125,
-0.16914665699005127,
-1.2272045612335205,
0.22400148212909698,
0.617962658405304,
-0.43385568261146545,
-0.15433697402477264,
0.44035178422927856,
-1.1345242261886597,
-0.8126144409179688,
-0.7702223658561707,
-0.18725880980491... |
def merge _ weighted _ vectors _ twice ( v1, w1, v2, w2 ) : if ( len ( v1 ) = = 0 ) : return scale _ vector _ twice ( v2, w2 ) if ( len ( v2 ) = = 0 ) : return scale _ vector _ twice ( v1, w1 ) value1 = [ ] value2 = [ ] index = [ ] w11, w21 = w1 w12, w22 = w2 if v1. _ index = = v2. _ index : # no need to check indices ... | [
-0.255797415971756,
-0.47089824080467224,
0.9337839484214783,
0.05336683988571167,
-0.6861834526062012,
0.16540606319904327,
0.37883150577545166,
-0.7419970035552979,
0.3427691161632538,
0.31120026111602783,
-0.5702425837516785,
-0.06925465911626816,
-0.43392494320869446,
0.297910094261169... |
def inboxtoxml ( statusopenonly = true ) : things = thingsapp ( ) xml = xml ( ) with xml. things ( xmlns ='http : / / things. ivonet. nl') : _ _ printinbox ( things [ " inbox " ], statusopenonly, xml ) return str ( xml ) | [
-0.758739709854126,
-0.22963747382164001,
0.23723866045475006,
0.3320710361003876,
-1.0734014511108398,
0.4879138767719269,
-1.5209906101226807,
-0.21995437145233154,
0.12038356810808182,
-0.8552866578102112,
-0.13900673389434814,
0.47169381380081177,
-0.8040575385093689,
-0.58627456426620... |
def vgg16 _ bn ( pretrained = false, model _ kwargs = none ) : if model _ kwargs is none : model _ kwargs = { } model = vgg ( make _ layers ( cfg ['d'], batch _ norm = true, pool _ type ='max'), * * model _ kwargs ) if pretrained : model. load _ state _ dict ( model _ zoo. load _ url ( model _ urls ['vgg16 _ bn'] ) ) r... | [
0.5299580693244934,
1.0299434661865234,
0.4385876953601837,
1.5108330249786377,
0.18396249413490295,
0.47189202904701233,
-0.43014001846313477,
0.28059327602386475,
-0.5239278674125671,
-0.22935543954372406,
-0.4999294877052307,
0.5528408885002136,
0.03183916211128235,
0.2939315140247345,
... |
def linkhoverenter ( self, page, link ) : self. setcursor ( qt. pointinghandcursor ) self. linkhovered. emit ( page, link ) if self. _ linkhighlighter : self. highlight ( { page : [ link. rect ( ) ] }, self. _ linkhighlighter, 3000 ) | [
0.4859669506549835,
-0.3187198042869568,
0.4422175884246826,
0.3846888244152069,
0.4341566264629364,
0.1514263153076172,
-0.18031428754329681,
0.4288385510444641,
0.5882006883621216,
-0.1179887130856514,
-0.40229538083076477,
0.647824227809906,
-0.3890572190284729,
0.48245078325271606,
0... |
def test _ get _ host _ health _ and _ publish _ metric ( kafka _ mock ) : producer. get _ host _ health _ and _ publish _ metric ( kafka _ mock,'test - topic ','example. com') expected _ metric = hostmetric ('example. com ', mock. any, 200, true ) kafka _ mock. send. assert _ called _ once _ with ('test - topic ', key... | [
0.5879898071289062,
0.18673305213451385,
0.3683759868144989,
1.505843162536621,
-0.04912629351019859,
0.5666448473930359,
0.2910591959953308,
0.3638904392719269,
-0.6776244044303894,
0.2830623686313629,
-0.03977883607149124,
0.12408054620027542,
-0.1512957364320755,
-0.4065956473350525,
... |
def geometry ( self ) : # these quantities do not change in the loop corner = self. corner x _ spacing = self. char _ width + self. x _ space y _ spacing = self. char _ height + self. y _ space for i, j, letter in self. text : # compute the offset for this letter relative to the # corner of the bounding box x _ offset ... | [
0.6461197733879089,
-0.4021652042865753,
0.7741097211837769,
-1.1539044380187988,
-0.6483510136604309,
0.5012633800506592,
-0.1920672357082367,
-0.1159457340836525,
0.5555388331413269,
0.566678524017334,
-0.3959388732910156,
0.43754780292510986,
0.3868596851825714,
0.14313672482967377,
-... |
def filter ( self, predicate : " expr " ) - > " dataframe " : return ( self. lazy ( ). filter ( predicate ). collect ( no _ optimization = true, string _ cache = false ) ) | [
-0.13444480299949646,
0.8670831918716431,
0.45280325412750244,
-0.13529981672763824,
-1.0281121730804443,
-1.1798934936523438,
-0.13428574800491333,
0.2593649923801422,
-0.7822153568267822,
-0.3826301097869873,
0.2860850989818573,
0.8723630309104919,
-0.18175016343593597,
-0.56089979410171... |
def rectangles _ to _ draw ( self ) - > list [ tuple [ tuple [ int, int, int ], tuple [ float, float ], tuple [ float, float ], int ] ] : size = ( float ( self. size ), float ( self. size ) ) position = ( float ( self. position [ 0 ] ), float ( self. position [ 1 ] ) ) if len ( self. children ) = = 0 : # if block is no... | [
-0.5918930172920227,
0.2623288333415985,
0.92669677734375,
-0.27556943893432617,
0.20378386974334717,
-0.37407946586608887,
0.4832437038421631,
0.2002025544643402,
0.5377965569496155,
-0.4766213893890381,
-0.7836300134658813,
-0.07462964951992035,
-0.19703204929828644,
0.7928117513656616,
... |
def write _ to _ paste _ buffer ( txt : str ) - > none : pyperclip. copy ( txt ) | [
-1.352877140045166,
-0.48374348878860474,
0.22647520899772644,
-0.4578879177570343,
-0.19320645928382874,
1.7139077186584473,
0.280305951833725,
0.3928554654121399,
-0.07736526429653168,
0.8748408555984497,
-0.7537047863006592,
0.11005984991788864,
-0.504525363445282,
-0.4372778832912445,
... |
def _ _ init _ _ ( _ _ self _ _, *, created _ at : optional [ str ] = none, created _ by : optional [ str ] = none, created _ by _ type : optional [ str ] = none, last _ modified _ at : optional [ str ] = none, last _ modified _ by : optional [ str ] = none, last _ modified _ by _ type : optional [ str ] = none ) : if ... | [
-0.14965489506721497,
0.7573463320732117,
0.9320297241210938,
-0.09270265698432922,
0.964941143989563,
0.1127721443772316,
-1.0203971862792969,
-0.02677222527563572,
-0.18670643866062164,
0.18218205869197845,
-0.9251406788825989,
0.756924033164978,
0.7401567697525024,
-0.25156164169311523,... |
def disconnect ( self ) - > none : self. _ _ conn = none self. _ _ connector. disconnect ( ) | [
-0.43166449666023254,
-1.2741549015045166,
0.4839850664138794,
-0.22911588847637177,
0.5924063324928284,
-0.30620962381362915,
0.26395106315612793,
0.4803200662136078,
-0.11828699707984924,
-1.2529789209365845,
-0.12910149991512299,
0.1476135402917862,
-0.4288225769996643,
0.31856694817543... |
def location ( self ) - > str : return self. _ location | [
-0.3699093461036682,
-1.1790244579315186,
0.21711911261081696,
-0.2861418128013611,
-0.23409295082092285,
1.0726743936538696,
0.950509786605835,
0.3589708209037781,
0.28575509786605835,
-0.2760162651538849,
0.5353333950042725,
0.10016485303640366,
0.6877857446670532,
-1.0754250288009644,
... |
def transform _ homography ( src, h _ matrix ) : transformed = none " " " your code starts here " " " transformed = np. ones _ like ( src ) for i, pt in enumerate ( src ) : token = np. transpose ( np. matmul ( h _ matrix, np. transpose ( np. append ( pt, [ 1 ] ) ) ) ) transformed [ i ] = token [ : - 1 ] / token [ - 1 ]... | [
-0.28507864475250244,
0.17257586121559143,
0.42200273275375366,
0.9853204488754272,
0.2858516573905945,
-0.7645225524902344,
0.726830780506134,
1.1970698833465576,
0.26222437620162964,
0.6102100014686584,
-0.40080833435058594,
0.05207810550928116,
-0.9114180207252502,
-0.17710447311401367,... |
def test _ register _ input _ and _ user _ name _ has _ improper _ space _ in _ end ( self, * _ ) : self. open ( base _ url +'/ logout') # go to main page self. open ( base _ url +'/ register') # validate that the user is taken to / login assert self. get _ current _ url ( ) = = base _ url +'/ register'self. type ('# e... | [
-0.15221235156059265,
0.4878261387348175,
0.6047663688659668,
0.756142258644104,
0.019619818776845932,
0.4591938257217407,
0.38752928376197815,
0.022088658064603806,
-0.3813767731189728,
-0.49986112117767334,
-0.5548204183578491,
0.7750372886657715,
-0.2436356395483017,
1.6621248722076416,... |
def comment _ photo ( self ) : comment _ num = random. randint ( 0, 10 ) self. driver. implicitly _ wait ( 5 ) comment _ button = self. driver. find _ elements _ by _ css _ selector ('body > div. _ 2ddpu. vcf6v > div. zzyga > div > article > div. eo2as > section. ltpmr. slqrh > span. _ 15y0l > button > svg') if len ( c... | [
-0.40247562527656555,
-0.26166972517967224,
0.9319398999214172,
0.30892735719680786,
0.6332113146781921,
-0.22992977499961853,
1.2775934934616089,
-0.37873202562332153,
-0.05410470813512802,
0.34086719155311584,
-0.827031672000885,
0.15874981880187988,
-0.36789000034332275,
0.7335638403892... |
def from _ dict ( cls, dic : dict ) : for key, value in dic. items ( ) : if isinstance ( value, dict ) : dic [ key ] = cls. _ create _ subobject ( key, value ) obj = object. _ _ new _ _ ( cls ) obj. _ _ dict _ _ = dic return obj | [
0.13430196046829224,
0.5767536759376526,
0.6155502200126648,
-0.026454510167241096,
-0.8010534644126892,
0.8606844544410706,
0.09290964901447296,
-0.41496407985687256,
0.4214926064014435,
-0.5915842652320862,
-0.22879673540592194,
-0.61893630027771,
1.0157806873321533,
0.13801652193069458,... |
def change _ block _ 2 ( self ) : # print " block 2 has been updated : \ n " pass | [
0.17561791837215424,
-1.9538354873657227,
0.5541210770606995,
1.0732815265655518,
-0.650842547416687,
-0.207514226436615,
0.15409187972545624,
-0.3962654173374176,
-1.421837568283081,
0.35599127411842346,
-0.9479452967643738,
2.290680170059204,
0.04118296504020691,
0.990717351436615,
0.6... |
def delete _ user ( uuid ) : # make json ping - friendly by replacing single quotes with double and removing quotes around the value " true " request = requests. delete ( user _ endpoint + " / " + uuid, headers = ping _ headers ) return request. text | [
-1.1761888265609741,
-0.18673670291900635,
0.3805932104587555,
0.19991306960582733,
-1.1619068384170532,
-0.49882206320762634,
-0.43458041548728943,
-0.3903181850910187,
0.42920568585395813,
0.7318598628044128,
-0.5866740345954895,
0.2069004476070404,
-0.877480149269104,
-0.655782461166381... |
def get _ stream _ metadata _ by _ name ( self, stream _ name : str, version : str = " all " ) - > list [ metadata ] : return self. sqldata. get _ stream _ metadata _ by _ name ( stream _ name, version ) | [
-0.6698852181434631,
-0.5888323783874512,
0.4600259065628052,
0.7021836638450623,
0.061666328459978104,
-0.15864187479019165,
-1.613723874092102,
-0.2895798981189728,
-0.323140025138855,
1.2880905866622925,
-1.2673420906066895,
1.1173816919326782,
0.008016513660550117,
0.48446694016456604,... |
def get _ identity ( what _ we _ looking _ for ) : list _ of _ identity = [ ] identity = 1 table = db. table ( what _ we _ looking _ for ). all ( ) for i in range ( len ( table ) ) : list _ of _ identity. append ( table [ i ] [ " identity " ] ) while identity in list _ of _ identity : identity + = 1 return identity | [
-1.3517483472824097,
0.11906352639198303,
0.5580667853355408,
1.2702980041503906,
1.021282434463501,
-0.1853564828634262,
0.3300756514072418,
0.6136985421180725,
0.18448400497436523,
-0.05727146565914154,
-1.1485047340393066,
-0.3346940279006958,
-0.5455559492111206,
-0.0025659799575805664... |
def itype _ 4 ( mtdatas, info, verbose = 0 ) : errors = [ ] # add endf documentation info. pops. documentation ='\ n '. join ( mtdatas [ 451 ] [ 1 ] [ 4 : - info. nxc ] ) # the atom containing the parent nucleus parentatom = togndmisc. getpopsparticle ( info, info. targetza, name = none, levelindex = info. levelindex, ... | [
0.6719486117362976,
-0.05474969372153282,
0.786537230014801,
-0.7561322450637817,
0.3725106418132782,
0.28644874691963196,
0.41663309931755066,
-0.10902965813875198,
-0.8373035788536072,
-0.17775097489356995,
0.38589727878570557,
-0.2098480612039566,
-0.14283627271652222,
0.289518028497695... |
def test _ propagate _ anchors _ on ( ufo _ module ) : font = generate _ minimal _ font ( ) glyphs = ( ( " sad ", [ ], [ ( " bottom ", 50, - 50 ), ( " top ", 50, 150 ) ] ), ( " dotabove ", [ ], [ ( " top ", 0, 150 ), ( " _ top ", 0, 100 ) ] ), ( " dotbelow ", [ ], [ ( " bottom ", 0, - 50 ), ( " _ bottom ", 0, 0 ) ] ), ... | [
-0.08078775554895401,
0.13086208701133728,
0.8704953789710999,
-0.8942661881446838,
0.571537435054779,
0.18208877742290497,
0.5567444562911987,
-0.8548464775085449,
0.9577935934066772,
-0.7401588559150696,
-0.8332186937332153,
0.5770182609558105,
0.0775165930390358,
-0.03402896970510483,
... |
def get _ empty _ input ( ) : return templates. render ( input _ file _ template, * * { " space " : 1 * space, " icon " : " param - file ", " input _ name " : " input file ", " input _ value " : " file " }, ) | [
-0.03232757747173309,
0.38157984614372253,
0.34822145104408264,
-0.8804877400398254,
0.04663442075252533,
0.7392042279243469,
0.29851454496383667,
0.3013790547847748,
-0.8227153420448303,
-0.38915425539016724,
0.21143822371959686,
-0.05067324638366699,
-0.21499286592006683,
0.0906292423605... |
def vtable ( title, headers, data _ node ) : tb = {'type':'vertical table ','title': title,'headers': headers,'data': data _ node, } return tb | [
0.47771772742271423,
0.30823400616645813,
0.5257382392883301,
-0.07462907582521439,
-0.23280967772006989,
-0.14799731969833374,
-1.0547616481781006,
-0.4204798638820648,
-1.198554277420044,
0.5289170742034912,
-0.5053381323814392,
0.5384313464164734,
-0.09368103742599487,
-0.39008966088294... |
def get _ css ( url ) : req = requests. get ( url, allow _ redirects = true, timeout = 20 ) soup = beautifulsoup ( req. text, " lxml " ) url _ parsed = list ( urlparse ( url ) ) for link in soup. findall ( " link " ) : if link [ " rel " ] [ 0 ] = = " stylesheet " : print ( " link : % ( href ) s " % link ) if not link [... | [
0.022518938407301903,
0.08357160538434982,
0.8770882487297058,
0.19826392829418182,
0.4277052581310272,
0.217572420835495,
0.1171794980764389,
0.30152884125709534,
-0.11393153667449951,
-0.21096810698509216,
0.0024711547885090113,
0.019750405102968216,
-0.27581673860549927,
0.1848398149013... |
async def turn _ on ( self, device _ id : str, * * kwargs ) : await self. set _ value ( device _ id, 100, * * kwargs ) | [
-0.5186231732368469,
0.8916113376617432,
0.2839791476726532,
0.694674551486969,
0.512726366519928,
-0.3056877553462982,
-0.9229867458343506,
0.6587686538696289,
0.22822579741477966,
0.08467280864715576,
-0.967998743057251,
0.9630070328712463,
0.0411672480404377,
0.4627957046031952,
0.331... |
def update _ measurements ( timestamp ) : if request. method = ='get': # check format of timestamp or date if measurement. is _ timestamp ( timestamp ) or measurement. is _ date ( timestamp ) : # if id provided is in timestamp format, get that measurement by id if measurement. is _ timestamp ( timestamp ) : measurement... | [
-1.2299350500106812,
-0.10141748189926147,
1.1174172163009644,
0.41319212317466736,
0.08564253896474838,
-0.22771070897579193,
-0.03297026455402374,
-0.8236062526702881,
0.9503204822540283,
0.37339526414871216,
0.41119489073753357,
-0.5377629399299622,
0.2075408399105072,
1.216054916381836... |
def transactional _ db ( request, django _ db _ setup, django _ db _ blocker ) : if " django _ db _ reset _ sequences " in request. fixturenames : request. getfixturevalue ( " django _ db _ reset _ sequences " ) _ django _ db _ fixture _ helper ( request, django _ db _ blocker, transactional = true ) | [
-0.29071319103240967,
1.414864420890808,
0.4752119183540344,
0.420555979013443,
0.542392909526825,
-0.7629333734512329,
0.8256567120552063,
0.11662208288908005,
0.1786394566297531,
1.468367099761963,
-0.4424130618572235,
-0.23431028425693512,
-0.05589626729488373,
0.1244727149605751,
-1.... |
def _ change _ drop _ list _ data ( ddlist _ option : " webelement ", value : addressbook ) : logging. info ( f " select { value } from { ddlist _ option } drop down options. " ) if value is not none : data _ select = select ( ddlist _ option ) data _ select. select _ by _ visible _ text ( value ) | [
-1.0036722421646118,
0.5225508213043213,
0.19711214303970337,
0.11953374743461609,
0.02522723376750946,
-0.006184879690408707,
0.015460308641195297,
-0.09290996193885803,
1.0573714971542358,
0.8894761800765991,
-0.7536821961402893,
0.41923198103904724,
0.6714837551116943,
0.30340376496315,... |
def exp _ train ( ) : team _ stats = get _ team _ stats ( ) model = net. onelayer ( 120, 60, 1 ) net. train _ model ( 10000, 0. 00019, model, team _ stats, no _ graph = true ) return model | [
0.29457664489746094,
0.6964777112007141,
0.44985246658325195,
-0.6567022800445557,
0.6800013780593872,
0.21018940210342407,
0.3179281949996948,
0.41213253140449524,
0.693837583065033,
-0.3382807970046997,
-1.0210613012313843,
-0.18157638609409332,
0.18679125607013702,
-0.2665800452232361,
... |
def remove _ stage _ from _ deployed _ values ( key : str, filename : str ) - > none : final _ values : dict [ str, any ] = { } try : with open ( filename,'r') as f : final _ values = json. load ( f ) except ioerror : # if there is no file to delete from, then this funciton is a noop. return try : del final _ values [ ... | [
-0.31028586626052856,
-0.9683181643486023,
0.7058925032615662,
0.23050791025161743,
-0.7994007468223572,
0.36046794056892395,
0.22789329290390015,
1.0569449663162231,
-0.776397705078125,
0.6641733050346375,
0.2540914714336395,
-0.2617098391056061,
0.403375506401062,
0.6322294473648071,
0... |
def initpopulation ( self ) : for i in range ( 0, self. popsize ) : individual = individual ( self. gensize, self. data ) individual. computefitness ( ) self. population. append ( individual ) # print ( " parent { } : { } \ nfitness : { } \ n ". format ( i + 1, individual. genes [ : ], individual. fitness ) ) self. bes... | [
-0.27735239267349243,
-0.5918398499488831,
0.5865046381950378,
0.8793380260467529,
0.6093922853469849,
0.6635151505470276,
0.2738891541957855,
-0.0005487030139192939,
-0.7154242396354675,
-0.2589952051639557,
-0.33473920822143555,
0.6159877777099609,
0.1561114639043808,
0.6970439553260803,... |
def generate _ normal _ data ( self, n, plot = true ) : mu = 23 sigma = 5 shape = 2 scale = 2 x1 = np. random. normal ( mu, sigma, int ( n / 3 ) ) x2 = np. random. gamma ( scale, shape, int ( n / 3 ) ) x = np. concatenate ( ( x1, x2 ) ) y = np. concatenate ( ( np. zeros ( int ( n / 3 ) ), np. ones ( int ( n / 3 ) ) ) )... | [
-0.6392038464546204,
0.5858023166656494,
0.7616132497787476,
-0.15865905582904816,
-0.48350515961647034,
0.803845226764679,
-0.18647260963916779,
-0.1099788174033165,
-0.058988235890865326,
0.18709997832775116,
-0.088701531291008,
0.16760952770709991,
-0.06990996748209,
0.3915911316871643,... |
def config _ field ( cfgvar, label = none, * * kwargs ) : if isinstance ( cfgvar, field ) : field = copy ( cfgvar ) else : field = copy ( default _ vars [ cfgvar ] ) field. _ position _ hint = _ next _ position _ hint ( ) if label is not none : field. label = label for name, value in kwargs. iteritems ( ) : setattr ( f... | [
-0.5936318039894104,
0.3788054287433624,
0.4128058850765228,
-0.4121685028076172,
-0.06931377947330475,
0.2797974646091461,
-0.4842308461666107,
-0.3621745705604553,
-0.44627252221107483,
0.38308367133140564,
-0.9644268751144409,
-0.932708740234375,
-0.7452435493469238,
0.04410716518759727... |
def showgameoverscreen ( birds ) : # score = crashinfo ['score'] # playerx = screenwidth * 0. 2 # playery = crashinfo ['y'] # playerheight = images ['bird 0'] [ 0 ]. get _ height ( ) # playervely = crashinfo ['vely'] # playeraccy = 2 # playerrot = crashinfo ['rot'] # playervelrot = 7 # # basex = crashinfo ['basex'] # #... | [
-0.49247515201568604,
-0.6109119057655334,
0.9361779689788818,
0.09399563819169998,
-0.47458672523498535,
0.5376309156417847,
-0.19530928134918213,
-1.7229583263397217,
-0.280184268951416,
0.989972710609436,
0.31829634308815,
0.24600178003311157,
-0.4599056839942932,
0.9933979511260986,
... |
def normalize _ graphs ( gtr : union [ graphobject, list [ graphobject ] ], gva : optional [ union [ graphobject, list [ graphobject ] ] ], gte : optional [ union [ graphobject, list [ graphobject ] ] ], based _ on : str ='gtr ', norm _ rangen : optional [ union [ tuple [ float, float ] ] ] = none, norm _ rangea : opti... | [
0.11264117062091827,
0.2176462560892105,
1.0086009502410889,
0.6799741387367249,
0.2717345356941223,
0.10683555155992508,
0.05489256605505943,
0.11176382005214691,
0.19636937975883484,
0.3806104362010956,
0.1542057991027832,
-0.09631289541721344,
-0.5628042221069336,
0.1071932315826416,
... |
def validate _ unique ( self, exclude = none ) : if'fund'not in exclude and'month'not in exclude : other _ returns = ( fundreturn. objects. exclude ( id = self. id ). filter ( fund = self. fund, month _ _ year = self. month. year, month _ _ month = self. month. month ) ) if other _ returns. exists ( ) : msg = _ ('% s a... | [
0.02970334142446518,
0.01481771282851696,
0.61741703748703,
0.10135579854249954,
0.30937305092811584,
0.2855437099933624,
0.33705008029937744,
-0.4522097110748291,
0.1441301554441452,
-0.808110773563385,
0.4654107093811035,
-0.14438661932945251,
-0.5204437971115112,
0.6704587340354919,
0... |
def test _ running _ norm _ identity _ eval ( normalization _ layer : type [ networks. basenorm ] ) : running _ norm = normalization _ layer ( 1, eps = 0. 0 ) x = th. tensor ( [ - 1. 0, 0. 0, 7. 32, 42. 0 ] ) running _ norm. eval ( ) # stats should not change in eval mode for _ in range ( 10 ) : assert _ equal ( runnin... | [
-0.09261694550514221,
0.10895559936761856,
0.5923858880996704,
0.33859848976135254,
0.8395898342132568,
1.5715426206588745,
0.9672985672950745,
0.11860506981611252,
0.0022787610068917274,
-0.7401796579360962,
-0.46354416012763977,
-0.18829508125782013,
-0.25697988271713257,
-0.220635086297... |
def getdownloadqueuelength ( ) : return ezidapp. models. async _ queue. downloadqueue. objects. count ( ) | [
0.18347488343715668,
-1.0693180561065674,
0.3710152804851532,
-0.8069325685501099,
0.546933650970459,
-0.13129961490631104,
-0.536677896976471,
0.3276890516281128,
-0.29138144850730896,
0.053198084235191345,
-0.539392352104187,
-0.13264645636081696,
0.7152377963066101,
0.9873155951499939,
... |
def _ _ init _ _ ( self, x, y, metric = ( " supremum ", " supremum " ), normalize = false, lag = 0, silence _ level = 0, * * kwds ) : # check for consistency if np. abs ( lag ) < x. shape [ 0 ] : if x. shape [ 0 ] = = y. shape [ 0 ] : # initialize the underlying recurrenceplot object jointrecurrenceplot. _ _ init _ _ (... | [
1.1519980430603027,
0.8693146705627441,
0.6971369981765747,
0.5222987532615662,
-0.7426380515098572,
0.066798135638237,
0.41626212000846863,
0.041807614266872406,
-0.3555804491043091,
-0.7538606524467468,
1.0565179586410522,
0.7260226607322693,
-0.18631106615066528,
-0.4720054268836975,
... |
def setup ( self ) : # generate a test family child _ gender = " f " mom _ aff = " 1 " dad _ aff = " 1 " self. trio = self. create _ family ( child _ gender, mom _ aff, dad _ aff ) # generate list of variants self. variant = self. create _ variant ( child _ gender ) # make sure we've got known genes data self. known _ ... | [
0.41986268758773804,
0.02295501157641411,
0.6230148077011108,
0.07578881084918976,
0.5993857979774475,
0.4753044843673706,
0.15569636225700378,
1.0219035148620605,
-0.1817605197429657,
-0.3709415793418884,
-1.0892665386199951,
0.18117490410804749,
0.11872944235801697,
0.12110333889722824,
... |
def _ _ str _ _ ( self ) : return f " x : { self. x }, y : { self. y }, z : { self. z }, w : { self. w } " | [
0.29835453629493713,
-1.723628044128418,
0.3840597867965698,
-1.2373478412628174,
-0.1622944325208664,
0.8242509365081787,
0.30763158202171326,
-0.5505356192588806,
-0.30215397477149963,
-0.03854357823729515,
0.12849409878253937,
0.1611730307340622,
0.26557308435440063,
-0.7774518728256226... |
def is _ binary _ tree _ valid ( root ) : # traverse tree # depth first # everything on the left has to be smaller than root # everything on right has to be larger than root # keep track of upper and lower bounds for each node, and validate value of node in relation to these values to _ check = [ root, - float ( inf ),... | [
-0.13370966911315918,
-0.37006261944770813,
0.9464982151985168,
0.4628385305404663,
-0.41876229643821716,
0.5866279006004333,
-0.07656421512365341,
0.06460880488157272,
-0.7207474112510681,
-0.26157528162002563,
-0.36741355061531067,
0.1864900439977646,
-0.5961116552352905,
1.0953119993209... |
def eigen _ decomposition ( unitaries ) : eigenvalues, eigenvectors = np. linalg. eig ( unitaries ) traces = np. sum ( eigenvalues, axis = 1 ) return eigenvalues, traces, eigenvectors | [
-0.1481000930070877,
0.020187631249427795,
0.4537533223628998,
-0.40677863359451294,
1.0813918113708496,
0.42796385288238525,
1.2078461647033691,
0.2620373070240021,
0.3002336323261261,
-0.038296572864055634,
-0.0913025438785553,
-0.43649187684059143,
0.13349221646785736,
0.684739351272583... |
def click ( ) - > noreturn : deletebuttonview. _ _ button. _ _ on _ click ( ) | [
0.9974768757820129,
0.3217037618160248,
0.48562636971473694,
-0.0866222232580185,
0.11099988967180252,
-0.6384797692298889,
0.40231308341026306,
0.3070228397846222,
0.7200584411621094,
-1.143111228942871,
0.16100771725177765,
0.8256697058677673,
-0.1937149316072464,
0.1631598323583603,
-... |
def runmodel ( ) : runstages = ['ramsin _ makesfc ', " ramsin _ makevfile ", " ramsin _ initial " ] for runstage in runstages : try : shutil. copy ( os. path. join ( _ pathtmp, runstage ), _ meteo _ only ) os. chdir ( _ meteo _ only ) subprocess. call ( ['mpirun ','- np ','1 ','/ home / jota / bin / brams - 5. 2 ','- f... | [
-0.24179507791996002,
-0.6385260820388794,
0.6927412748336792,
0.9374064803123474,
0.2788681983947754,
0.9866713881492615,
1.2754324674606323,
0.051215555518865585,
-0.708842933177948,
0.4365863800048828,
-0.6978166103363037,
0.6605031490325928,
-0.42434144020080566,
0.11325517296791077,
... |
def process _ on _ change _ handler ( sender, instance, created, * * kwargs ) - > bool : process. delay ( sale _ id = instance. id ) logger. info ( f " sale { instance } enqueued to be processed " ) return true | [
0.8626722693443298,
-0.07794618606567383,
0.7412886023521423,
-0.3052801191806793,
0.10224934667348862,
0.45770347118377686,
0.1145070418715477,
0.0720808207988739,
-0.08638158440589905,
0.15134920179843903,
-0.8679345846176147,
0.28037774562835693,
0.5874749422073364,
0.7937531471252441,
... |
def error _ msg _ box ( self, text, title ) : msg = qmessagebox ( ) msg. seticon ( qmessagebox. critical ) msg. setwindowtitle ( title ) msg. settext ( text ) x = msg. exec _ ( ) | [
0.8084535002708435,
0.30927857756614685,
0.7278854250907898,
-0.5670635104179382,
-0.7782720923423767,
-0.0011872192844748497,
-0.5811729431152344,
-0.2707369327545166,
0.16480004787445068,
-0.7064352035522461,
-0.24330459535121918,
0.9864239692687988,
-0.3981935977935791,
0.06028782576322... |
def reparametrize _ to _ internal ( external, internal _ free, transformations, ) : with _ internal _ values = external. copy ( ) for constr in transformations : func = getattr ( kt, f " { constr ['type'] } _ to _ internal " ) with _ internal _ values [ constr [ " index " ] ] = func ( external [ constr [ " index " ] ],... | [
-1.480110764503479,
0.07455644756555557,
0.4469446539878845,
-1.227073311805725,
-0.4906947910785675,
-0.34666234254837036,
-0.19155466556549072,
-0.8579771518707275,
-0.47008389234542847,
0.5372911095619202,
-0.30299311876296997,
0.5780115723609924,
-0.2678145170211792,
-0.208918690681457... |
def _ bytes _ feature ( values ) : return tf. train. feature ( bytes _ list = tf. train. byteslist ( value = values ) ) | [
0.22890913486480713,
0.35500067472457886,
0.14713957905769348,
-0.36064743995666504,
0.37605026364326477,
-0.15150532126426697,
-0.4672272205352783,
0.34840553998947144,
-0.2320377379655838,
-1.1347112655639648,
-1.6609783172607422,
0.3436100482940674,
0.005735200829803944,
-0.574968457221... |
def read _ remaining _ lines ( samples _ file, n _ burnin, stride ) : samples _ list = [ ] line _ no = 0 done = 0 while not done : line = samples _ file. readline ( ) if ( line = = " " ) : done = 1 else : line _ no + = 1 if ( line _ no > n _ burnin and ( line _ no - n _ burnin ) % stride = = 0 ) : records = line. split... | [
0.6696632504463196,
-0.7418429851531982,
0.7726587653160095,
-0.005625844933092594,
0.12200712412595749,
0.15000677108764648,
-0.03019149973988533,
-0.16594377160072327,
-0.7452324628829956,
-0.12255535274744034,
0.0732729434967041,
-0.22940172255039215,
-0.4072306156158447,
0.999120950698... |
def parse _ list _ of _ number ( text ) : if ','in text : separator = ','elif';'in text : separator =';'else : separator ='' result = [ int ( i ) for i in list ( text. split ( separator ) ) ] return result | [
0.18535207211971283,
0.039342548698186874,
0.5800864696502686,
0.4286673665046692,
-0.20753352344036102,
-0.2597697377204895,
-0.5949591398239136,
1.4834586381912231,
0.7548431158065796,
0.14187173545360565,
-1.1644428968429565,
-1.2849887609481812,
-0.5771811604499817,
0.4559617340564728,... |
def _ get _ simclr _ pipeline _ transform ( self, size, s = 1 ) : color _ jitter = transforms. colorjitter ( 0. 8 * s, 0. 8 * s, 0. 8 * s, 0. 2 * s ) data _ transforms = transforms. compose ( [ transforms. randomresizedcrop ( size = size ), transforms. randomhorizontalflip ( ), transforms. randomapply ( [ color _ jitte... | [
0.5206611752510071,
0.674114465713501,
0.6331257224082947,
-1.2501318454742432,
-0.511165976524353,
-0.687466025352478,
-0.0898449644446373,
-0.10631930828094482,
0.9217696189880371,
0.26273760199546814,
-0.8329910039901733,
0.21216268837451935,
0.35730087757110596,
-0.5407020449638367,
... |
def start ( name ) : cmd = _ service _ cmd ( name, " start " ) return not _ _ salt _ _ [ " cmd. retcode " ] ( cmd ) | [
-0.4416740834712982,
-0.08367124199867249,
0.8167213201522827,
0.22713115811347961,
-0.7113967537879944,
0.4099128246307373,
0.27104392647743225,
-0.4992891848087311,
0.2442246377468109,
0.27551665902137756,
-0.7049349546432495,
0.5662652850151062,
-1.0714870691299438,
0.14570267498493195,... |
def parse _ money ( money _ string ) : stripped = money _ string. strip ( ). replace ( ', ','' ) if stripped. startswith ('$') : stripped = stripped [ 1 : ] try : return decimal. decimal ( stripped ) except decimal. invalidoperation : raise validationerror ('invalid money format : { } '. format ( money _ string ) ) | [
1.0040279626846313,
-0.8229647278785706,
0.7272896766662598,
0.46902942657470703,
-0.4985821843147278,
0.3314853012561798,
-0.20456507802009583,
0.2695157527923584,
0.4524308741092682,
-0.14264555275440216,
0.5470944046974182,
-0.0795411467552185,
-0.27743807435035706,
0.22654204070568085,... |
def queryandgroup ( nsample, points, queries, feat, idx, points _ row _ splits, queries _ row _ splits, use _ xyz = true ) : if queries is none : queries = points if idx is none : points _ row _ splits = tf. reshape ( points _ row _ splits, ( - 1, ) ) queries _ row _ splits = tf. reshape ( queries _ row _ splits, ( - 1... | [
-0.24853835999965668,
0.8083468675613403,
0.476823091506958,
0.11285119503736496,
-0.4372160732746124,
-0.14710460603237152,
0.35728374123573303,
-0.28051915764808655,
0.09926138073205948,
0.2145363837480545,
0.1872398555278778,
0.05728822946548462,
0.0520089827477932,
-0.0498088113963604,... |
def get ( self, request, format = none, param = none ) : filedebug ='temp \ logs \ log % s. txt'% ( param ) log _ file = os. path. join ( settings. base _ dir, filedebug ) list = [ ] try : audit = none try : audit = open ( log _ file,'r') except ( oserror, ioerror ) as e : print ( " % s no se encuentra " % filedebug ) ... | [
-0.3376484811306,
-0.09870980679988861,
1.200057864189148,
-0.07871030271053314,
0.20221108198165894,
-0.26445192098617554,
-0.6424599289894104,
0.055433619767427444,
-0.4323885440826416,
0.30135756731033325,
0.7999561429023743,
0.5673786997795105,
-0.032433152198791504,
0.643336296081543,... |
def resample ( self, fs ) : self. data = nnresample. resample ( self. data, fs, self. fs ) self. fs = fs | [
-0.5984113812446594,
-0.13040032982826233,
0.2940133213996887,
-0.3961259722709656,
-0.9532752633094788,
-1.439901351928711,
-0.40773648023605347,
0.2342640906572342,
0.4149932861328125,
-1.0939558744430542,
-0.6266965270042419,
-0.2711654603481293,
-0.20966215431690216,
-0.121635511517524... |
def htmlify ( head _ title : str, heading : str, content : str ) - > str ( ) : head _ tag = f " < head > < title > % s < / title > {''. join ( styles ) } < / head > " % head _ title header ='< header class = " w3 - bar w3 - card " > < h2 > % s < / h2 > < / header >'% heading html = f'''<! doctype html > < html > % s < ... | [
-0.35481393337249756,
0.3298431932926178,
0.6649510264396667,
0.14926262199878693,
-0.7386166453361511,
0.4878581762313843,
-1.1258363723754883,
-0.5108960270881653,
-0.5570857524871826,
0.5176487565040588,
0.4206160604953766,
0.14828525483608246,
-0.1380816549062729,
-0.4601576030254364,
... |
def get _ heading ( self ) : return self. _ _ heading | [
-0.26049095392227173,
0.23725557327270508,
0.6592780351638794,
0.3311583697795868,
-0.244558647274971,
0.3483951985836029,
0.11595506966114044,
-0.8871699571609497,
-0.0035946283023804426,
-0.3745284676551819,
0.20549331605434418,
0.287030428647995,
-0.9661341905593872,
-0.8912510275840759... |
def projective _ forward _ sphere _ to _ perspective ( src _ images, intrinsics, tgt _ pose _ rt, tgt _ pos, depths, viewing _ window = 3, tgt _ height = 320, tgt _ width = 640 ) : n _ layers, n _ batch, src _ height, src _ width, channels = src _ images. get _ shape ( ). as _ list ( ) pixel _ coords = [ ] # rotate by ... | [
-0.23544706404209137,
0.07623032480478287,
0.7806249260902405,
-0.3657921850681305,
-0.5994224548339844,
-0.4536629319190979,
0.14366206526756287,
0.35904812812805176,
0.18786542117595673,
0.5351257920265198,
0.403218150138855,
0.32530537247657776,
-0.09733908623456955,
-0.3517146408557892... |
def gaussian _ bandpass ( signals, kernel _ len, kernel _ sigma, axis = - 1 ) : return ndimage. convolve1d ( signals, gaussian _ kernel ( kernel _ len, kernel _ sigma ), axis = axis ) | [
0.2557871341705322,
0.2330959439277649,
0.5970317125320435,
1.5041499137878418,
-0.416838675737381,
0.4435793459415436,
-0.2145763635635376,
-0.6526427268981934,
-0.6080487966537476,
0.3156496584415436,
-0.10178577899932861,
0.8807861804962158,
0.3428574800491333,
0.3530925512313843,
0.4... |
def _ layer _ params ( i ) : p _ i = p. transformer _ layer _ params _ tpl. copy ( ) p _ i. name = f'layer _ { i }'p _ i. cross _ attention = p. cross _ attention p _ i. mask _ self _ attention = p. mask _ self _ attention p _ i. num _ heads = p. num _ heads p _ i. dim _ per _ head = p. dim _ per _ head p _ i. input _ ... | [
-0.21782763302326202,
-0.3693479895591736,
0.5604697465896606,
-0.665723443031311,
-1.1246486902236938,
0.41418886184692383,
0.7656139731407166,
-0.13519994914531708,
-0.25521212816238403,
0.8313621878623962,
-0.4649280607700348,
-0.32986438274383545,
0.16001130640506744,
0.407473206520080... |
def generate _ mapped _ datamodel _ tests ( self ) : eventtypes = [ ] for each _ eventtype in self. addon _ parser. get _ eventtypes ( ) : eventtypes. append ( each _ eventtype. get ( " stanza " ) ) yield pytest. param ( { " eventtypes " : eventtypes }, id = f " mapped _ datamodel _ tests ", ) | [
-0.15120847523212433,
0.0070243533700704575,
0.8121940493583679,
-0.392256498336792,
0.490469753742218,
1.0427148342132568,
0.1593489795923233,
-0.09955105185508728,
0.46988043189048767,
-0.7150312066078186,
-0.48697906732559204,
0.11345907300710678,
0.9708370566368103,
0.5355450510978699,... |
def icmp _ type ( self ) - > optional [ pulumi. input [ int ] ] : return pulumi. get ( self, " icmp _ type " ) | [
0.22374634444713593,
0.6166287660598755,
0.4153979420661926,
0.6484450101852417,
1.6618362665176392,
0.9981503486633301,
0.9462281465530396,
0.08278592675924301,
1.1287845373153687,
0.014348343946039677,
-0.20702743530273438,
0.6816681027412415,
-1.5043463706970215,
-0.8754515647888184,
... |
def incremental _ dataset _ last _ refresh _ time ( self ) - > str : return pulumi. get ( self, " incremental _ dataset _ last _ refresh _ time " ) | [
0.560414731502533,
0.2315158098936081,
0.555568277835846,
-0.33861735463142395,
-0.6924745440483093,
1.099564552307129,
-0.06809423118829727,
-0.24597522616386414,
0.4997781813144684,
0.1647457331418991,
0.36632585525512695,
0.4173353612422943,
-0.02646831050515175,
-1.2096424102783203,
... |
def filters ( request, filterid ) : f _ id = int ( filterid ) # preserve the tab they are on so we can take them back there. if f _ id < filters. get ('features _ all') : current _ tab = tabs. get ('issues') request. session ['issue _ filter'] = f _ id else : current _ tab = tabs. get ('features') request. session ['fe... | [
-0.1921095848083496,
-0.5416402220726013,
0.5981522798538208,
0.10104000568389893,
-0.19855822622776031,
-0.3554595410823822,
-0.1936841756105423,
0.18488305807113647,
0.23429621756076813,
-0.10136310011148453,
0.9222652316093445,
0.0756559669971466,
0.6626079678535461,
-0.1950004249811172... |
def labeling _ job _ media _ properties ( self ) - >'outputs. labelingjobimagepropertiesresponse': return pulumi. get ( self, " labeling _ job _ media _ properties " ) | [
-0.7360128164291382,
-1.1438523530960083,
0.23833976686000824,
0.3923462927341461,
0.11643095314502716,
1.0985844135284424,
0.18097208440303802,
-0.11319387704133987,
0.3815848231315613,
0.23842409253120422,
0.18196256458759308,
0.6319064497947693,
0.06773790717124939,
0.34838488698005676,... |
def _ _ init _ _ ( self, attributes = none ) : if attributes is none : self. attributes = { } else : self. attributes = attributes self. children = [ ] | [
-0.024846328422427177,
0.3370882570743561,
0.5439533591270447,
-0.515098512172699,
-0.48383980989456177,
-0.2747083902359009,
-0.2236018031835556,
0.9683360457420349,
0.397361159324646,
-1.0511603355407715,
-0.3871602416038513,
-0.2685268819332123,
0.3078698217868805,
0.8020904660224915,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.