text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def is _ disabled ( self, text = none, * * kwargs ) : if text : # check if an item is disabled based on the text of that item if isinstance ( text, partial _ match ) : partial _ text = text. item xpath = self. partial _ text _ disabled. format ( txt = quote ( partial _ text ) ) else : xpath = self. text _ disabled. for... | [
-0.5140344500541687,
-0.16044028103351593,
0.5338336825370789,
0.6557004451751709,
-0.8127298355102539,
0.38109996914863586,
-0.06275848299264908,
0.721230685710907,
0.564501166343689,
-0.7747817039489746,
0.27009451389312744,
-0.22047074139118195,
-1.035887598991394,
0.1321362406015396,
... |
def close ( self ) : if self. _ ds is not none : self. _ ds. close ( ) self. _ ds = none | [
-0.11315395683050156,
0.19511127471923828,
0.3108225464820862,
-0.7900223731994629,
-0.5353743433952332,
0.13137875497341156,
0.5314316153526306,
-0.28266969323158264,
-0.26812484860420227,
-1.6957639455795288,
0.7919487953186035,
1.142602562904358,
-0.5236335396766663,
0.9488272070884705,... |
def asyncrecvdata ( self, size = none, ondatarecv = none, ondatarecvarg = none, timeoutsec = none ) :... | [
0.6284050345420837,
0.21460451185703278,
0.4199936091899872,
-0.10569784045219421,
-0.5192553400993347,
-0.7285304069519043,
-0.5278193950653076,
-0.03179144114255905,
-0.08899538964033127,
-0.4615747332572937,
-0.2418910264968872,
1.0807524919509888,
0.1810266673564911,
0.0305389519780874... |
def set _ datasetid ( self, value ) : super ( addrowinputset, self ). _ set _ input ('datasetid ', value ) | [
-0.3786664307117462,
0.9828886389732361,
0.25581061840057373,
-0.28204619884490967,
-0.5580475926399231,
0.4431086480617523,
0.4836671054363251,
-0.36938774585723877,
1.0567631721496582,
-0.4951742887496948,
-0.21970877051353455,
0.4296208918094635,
0.4728148877620697,
0.8318411111831665,
... |
def open ( project _ name : str = typer. argument (..., autocompletion = autocomplete. list _ projects, metavar = " project name which you used while adding " ) ) : current _ config = jsondataoperations. read ( ) found = false for project _ item in current _ config ['projects'] : if project _ item ['project _ name'] = ... | [
-0.3837765157222748,
0.2556803822517395,
0.8834797143936157,
-0.02076326124370098,
0.02755323238670826,
0.8132997751235962,
0.9755867719650269,
0.03906179219484329,
-0.046096015721559525,
0.7070987224578857,
0.5011355876922607,
0.389509916305542,
-0.35035622119903564,
0.5423624515533447,
... |
def read ( self ) : self. display _ all _ legends ( ) return self. _ get _ data ( self. _ elements. values ( ) ) | [
-0.03518924117088318,
-0.45705530047416687,
0.22991327941417694,
-0.6608380079269409,
-0.49117958545684814,
0.4250178039073944,
-0.3644148111343384,
-0.26418226957321167,
0.08883308619260788,
-0.7121068239212036,
0.7675260901451111,
0.4250805377960205,
0.16027244925498962,
-0.0849980786442... |
def roll _ multiple _ dice ( numberofdice, numberofsides ) : mylist = [ ] for number in range ( numberofdice ) : rollresult = roll _ single _ die ( numberofsides ) mylist. append ( rollresult ) return mylist | [
-1.1192439794540405,
0.8203698396682739,
0.485861599445343,
0.3216243088245392,
0.5294007062911987,
-0.46537625789642334,
-0.7503597140312195,
0.6102779507637024,
0.3840283751487732,
-0.28579285740852356,
-0.9163705110549927,
-0.16940930485725403,
0.462701678276062,
1.00927734375,
-0.894... |
def acl6totpktsdenied ( self ) : try : return self. _ acl6totpktsdenied except exception as e : raise e | [
0.8629050850868225,
-0.22325508296489716,
0.17117775976657867,
-0.4247919023036957,
-0.18498659133911133,
0.019246557727456093,
0.31827664375305176,
-0.5237647891044617,
0.18606708943843842,
-0.11404900997877121,
0.3396161198616028,
-0.69309401512146,
0.16731376945972443,
-0.68808352947235... |
def test _ service _ list _ route _ service _ endpoint _ dropdown ( live _ server, sl _ operator, service ) : # pylint : disable = unused - argument sl _ operator. get ( url _ for ('storage. service _ list _ route ', _ external = true ) ) dt _ rendered ( sl _ operator,'service _ list _ table ', service. comment ) check... | [
-0.2383042871952057,
0.4922049939632416,
0.47548362612724304,
0.48879435658454895,
0.4110334813594818,
-0.027600260451436043,
0.22314989566802979,
0.3305220901966095,
0.34756043553352356,
0.42440125346183777,
-0.12896981835365295,
-0.1205330565571785,
0.01577702909708023,
0.376895666122436... |
def clamp ( value, min _ value, max _ value ) : return max ( min _ value, min ( value, max _ value ) ) | [
0.46088072657585144,
-0.6297356486320496,
0.3399983048439026,
0.39084064960479736,
-0.7206188440322876,
-0.027662115171551704,
-1.7849684953689575,
-0.7673520445823669,
-0.518878698348999,
0.29531872272491455,
0.032157257199287415,
0.7447865605354309,
0.2258966863155365,
-0.914617180824279... |
def all _ games ( request ) : games = product. objects. all ( ). order _ by ('rank') # ignore lint query = none categories = none sort = none direction = none category = none mechanic = none if request. get : if'category'in request. get : category = request. get ['category'] games = games. filter ( category _ id _ _ na... | [
-0.2791234850883484,
0.4486561417579651,
0.9338802695274353,
-0.06014265865087509,
0.43138372898101807,
0.48636090755462646,
-0.4326854944229126,
-0.9795222878456116,
-0.6357468962669373,
0.521881639957428,
0.701662003993988,
-0.4527977406978607,
0.3586462140083313,
0.5919426083564758,
-... |
def map _ operations ( circuit : circuit _ type, map _ func : callable [ [ ops. operation, int ], ops. op _ tree ], *, raise _ if _ add _ qubits = true, ) - > circuit _ type : def apply _ map ( op : ops. operation, idx : int ) - > ops. op _ tree : c = circuits. frozencircuit ( map _ func ( op, idx ) ) if raise _ if _ a... | [
0.05399862676858902,
0.7917951345443726,
0.7634917497634888,
0.4000534415245056,
-0.9682493209838867,
-0.21993406116962433,
0.5500274896621704,
-0.3803982436656952,
0.8023595213890076,
0.42969533801078796,
0.3442206382751465,
-0.18808288872241974,
0.23338355123996735,
-0.002708152402192354... |
def create _ dummy _ computation _ tensorflow _ empty ( ) : value = tensorflow _ computation _ factory. create _ empty _ tuple ( ) type _ signature = computation _ types. functiontype ( none, [ ] ) return value, type _ signature | [
-0.5266544222831726,
0.43905967473983765,
0.5806488394737244,
-0.00636471901088953,
1.6328763961791992,
-0.44235682487487793,
0.8659082055091858,
-0.131103977560997,
-1.101647138595581,
0.13115771114826202,
-1.1794074773788452,
-0.11274100840091705,
-0.09403632581233978,
0.1555012017488479... |
def get _ self _ liked _ media ( self ) : return self. client. get ( self. client. me +'/ media / liked ', bucket = _ func _ ( ) ) | [
-0.9044107794761658,
-0.13663573563098907,
0.36440369486808777,
0.03603480011224747,
-0.6915147304534912,
-0.25869718194007874,
-0.2728080749511719,
-1.0707297325134277,
-0.5281850099563599,
-0.9575862288475037,
-1.0204211473464966,
1.7320590019226074,
-1.1750240325927734,
0.43595910072326... |
def load _ manifests _ into _ taxonomy ( raw _ manifests : dict [ str, list [ dict ] ] ) - > taxonomy : taxonomy = taxonomy. parse _ obj ( { resource _ type : [ parse _ dict ( resource _ type, resource ) for resource in resource _ list ] for resource _ type, resource _ list in raw _ manifests. items ( ) } ) return taxo... | [
-0.08150911331176758,
-0.6437820792198181,
0.218791663646698,
-0.8335333466529846,
-0.9408175945281982,
-0.33689022064208984,
-0.864323616027832,
0.7083251476287842,
-0.05158419907093048,
-0.1480342000722885,
0.0918475091457367,
-0.24044856429100037,
1.2104533910751343,
-0.4594265222549438... |
def _ converttogray ( self ) : return cv2. cvtcolor ( self. _ image, cv2. color _ bgr2gray ) | [
-0.41737911105155945,
0.11225354671478271,
0.818159818649292,
-0.4082167446613312,
0.6966248750686646,
0.029889242723584175,
-0.9739778637886047,
-0.6190894246101379,
-0.21895430982112885,
0.4181603491306305,
0.596828818321228,
0.5389974117279053,
-0.10914648324251175,
0.5586640238761902,
... |
def extract _ features _ map _ for _ slice ( img, gray = none, lab = none, verbose = false ) : h, w, _ = img. shape if verbose : print ( " image shape ", h, w ) if gray is none : gray = rgb2gray ( img ) lbp = feature. local _ binary _ pattern ( gray, 8, 1 ) lbp = lbp. reshape ( h, w, 1 ) # reshape 2d array to 3d array ... | [
-0.8449891209602356,
-0.7062912583351135,
0.6072739362716675,
0.9651596546173096,
0.007639714516699314,
-0.13006563484668732,
0.13895004987716675,
0.3406447470188141,
0.4384281635284424,
0.6048223972320557,
-0.046158693730831146,
0.35406294465065,
0.3596525490283966,
0.7078277468681335,
... |
def home ( request ) : assert isinstance ( request, httprequest ) return render ( request,'app / index. html ', {'title':'home page ','year':'2016'} ) | [
0.20124490559101105,
-0.0796990692615509,
0.5133762955665588,
0.8955437541007996,
-0.32155752182006836,
1.0291461944580078,
-0.3680627644062042,
-0.25171735882759094,
0.6337925791740417,
0.5002776980400085,
0.9949644207954407,
0.004311892669647932,
0.24116545915603638,
0.04370517283678055,... |
def request _ exists ( self, user _ id ) : cur. execute ( " select * from requests where user _ id = % s and title = % s ; ", ( user _ id, self. title ) ) self. request = cur. fetchone ( ) | [
-0.6510264873504639,
-0.6258547306060791,
0.34229370951652527,
0.13226909935474396,
0.6261533498764038,
0.31427162885665894,
-1.6331942081451416,
-0.1732945293188095,
-0.37891823053359985,
-0.34734076261520386,
0.019192826002836227,
0.5987980365753174,
0.22843369841575623,
0.08567104488611... |
def conv _ strat _ yuter ( grid, dx = none, dy = none, level _ m = none, always _ core _ thres = 42, bkg _ rad _ km = 11, use _ cosine = true, max _ diff = 5, zero _ diff _ cos _ val = 55, scalar _ diff = 1. 5, use _ addition = true, calc _ thres = 0. 75, weak _ echo _ thres = 5. 0, min _ dbz _ used = 5. 0, db _ averag... | [
0.022071007639169693,
0.4371517300605774,
1.0107003450393677,
0.017942173406481743,
-0.2973752021789551,
-0.401187926530838,
0.577017605304718,
0.06995713710784912,
-0.7770196795463562,
1.233656644821167,
0.04873933643102646,
1.2321999073028564,
-0.6871494650840759,
0.4124836325645447,
1... |
def testcosmologycatalog ( self ) : address ='sqlite : / / /'+ self. dbname dbobj = mytestgals ( address = address ) cat = cosmologicalgalaxycatalog ( dbobj ) cat. write _ catalog ( self. catname ) | [
0.184041365981102,
0.40739870071411133,
0.24663662910461426,
-0.21444883942604065,
0.41149264574050903,
0.20683319866657257,
0.6351394653320312,
0.6522836089134216,
-0.5862812399864197,
-0.11201696842908859,
0.18475699424743652,
0.20929718017578125,
-0.02509159781038761,
0.105827197432518,... |
def xzopen ( cls, name, mode = " r ", fileobj = none, preset = none, * * kwargs ) : if mode not in ( " r ", " w ", " x " ) : raise valueerror ( " mode must be'r ','w'or'x'" ) fileobj = lzma. lzmafile ( fileobj or name, mode, preset = preset ) try : t = cls. taropen ( name, mode, fileobj, * * kwargs ) except ( lzma. lzm... | [
0.028930598869919777,
-0.438274085521698,
0.6057475209236145,
-0.36619657278060913,
-1.621247410774231,
0.472415953874588,
0.401703417301178,
0.2628961205482483,
-0.03847862780094147,
-0.5043776035308838,
-0.24513652920722961,
-0.2806403338909149,
-0.3409597873687744,
-0.6945528388023376,
... |
def test _ access _ legacy _ sv _ operator ( self ) : # create access sv operator request _ id = " access _ legacy _ test _ request " # todo : avoid the magic number here : operator _ model = operator. objects. get ( id = 6 ) operator = operatorfactory. get _ by _ model ( operator _ model, request _ id = request _ id )... | [
0.743404746055603,
0.021300392225384712,
0.8357239961624146,
-0.0014462415128946304,
-0.5345984101295471,
-0.08443141728639603,
0.24042163789272308,
0.24371017515659332,
0.19146278500556946,
-0.6945587992668152,
0.12484674900770187,
-0.079505056142807,
0.2970154881477356,
-0.00861726608127... |
def common _ reference _ file _ keywords ( reftype = none, author = " stsci ", exp _ type = none, description = " niriss reference file ", title = " niriss reference file ", useafter = " 2014 - 01 - 01t00 : 00 : 00 ", filtername = none, filename = " ", pupil = none, * * kwargs ) : if exp _ type is none : raise valueerr... | [
-0.3298993706703186,
-0.34320998191833496,
0.6930534243583679,
-0.08684446662664413,
-0.13816067576408386,
0.5146052241325378,
-0.048361677676439285,
-0.24803701043128967,
-0.7149277925491333,
0.9484819173812866,
-0.1250298172235489,
0.3194287419319153,
-0.7080146074295044,
1.3034067153930... |
def _ _ init _ _ ( self, algorithm : str, key : bytearray, init _ vect : bytearray ) - > none : super ( ). _ _ init _ _ ( algorithm, key ) if not check _ init _ vect _ value ( init _ vect, self. block _ size ) : self. clear ( ) raise gostciphererror ('invalid initialization vector value') self. _ init _ vect = init _ v... | [
0.22115358710289001,
0.5291433930397034,
0.506274938583374,
0.15228335559368134,
-0.15249793231487274,
0.19186091423034668,
0.3933539092540741,
-0.27610164880752563,
0.2545892596244812,
0.5015434622764587,
-0.478407084941864,
0.819509744644165,
-0.1805766373872757,
0.2227117121219635,
0.... |
def add _ number ( self, value _ a ) : self. result = self. result + value _ a | [
-0.566048264503479,
0.08715523779392242,
0.4465672969818115,
0.39896348118782043,
0.6242383718490601,
0.13770659267902374,
1.1248520612716675,
0.21734341979026794,
0.7443010807037354,
-0.8763529062271118,
-0.3402809798717499,
0.07391960918903351,
0.2251579314470291,
0.6800121068954468,
0... |
def match ( eyes, path ) : try : match _ window ( eyes, path ) except exceptions. httperror : logger. warn ('invalid image : { } '. format ( path ) ) | [
-0.4441634714603424,
-0.2757038176059723,
0.4490451514720917,
0.15920405089855194,
-0.5836890339851379,
-0.18579129874706268,
-0.3719605803489685,
-0.3528461754322052,
0.1452181339263916,
0.6654663681983948,
0.9346439242362976,
0.2579346001148224,
0.13320399820804596,
0.13912442326545715,
... |
def test _ tags ( self ) : post = create _ post ( ) dogs = create _ tag ( name ='dogs') squirrel = create _ tag ( name ='squirrel!') cats = create _ tag ( name ='cats') create _ post _ tag ( post = post, tag = dogs ) create _ post _ tag ( post = post, tag = squirrel ) create _ post _ tag ( post = post, tag = cats ) # a... | [
0.6701762676239014,
0.1446978598833084,
0.17518740892410278,
0.4122455418109894,
1.5918071269989014,
0.3669833540916443,
-1.1803221702575684,
-0.4278508424758911,
-1.5023890733718872,
-0.6693903207778931,
-1.0958222150802612,
-0.5519351959228516,
-0.05856073275208473,
0.6902888417243958,
... |
def get _ zero _ state ( self, batch _ size, num _ hidden, cells ) : zeros = tf. zeros ( [ batch _ size, num _ hidden ] ) zero _ state = self. get _ state _ tuple ( zeros, cells ) return zero _ state | [
-0.3082413971424103,
0.10925866663455963,
0.30943095684051514,
0.9037161469459534,
0.03510154411196709,
-0.445753276348114,
0.1824234575033188,
-0.030786748975515366,
-0.1344754844903946,
-0.3582414984703064,
-0.34740757942199707,
-0.14260388910770416,
0.09239901602268219,
-0.7450547814369... |
def comments ( self, tablename, record _ id, currentpage, order ) : db = self. boilerplate. db max _ comments = self. max _ results _ x _ page limit _ inf = ( max _ comments * currentpage ) - max _ comments limit _ sup = limit _ inf + max _ comments table _ comments = db [ self. table _ comments ] query = ( db [ self. ... | [
-0.0854964628815651,
-0.7598724961280823,
0.8718153834342957,
-0.4153353273868561,
0.008073145523667336,
-0.6147429943084717,
-0.08663082122802734,
0.5481345057487488,
-0.4392949342727661,
1.0784839391708374,
0.1566612422466278,
-0.1298677772283554,
-0.47829726338386536,
0.6563845276832581... |
def get _ new _ names ( names : pd. index ) - > dict [ str, str ] : return { x : get _ new _ name ( x ) for x in names } | [
-1.3045873641967773,
0.02579336427152157,
0.3172636330127716,
-0.7699229121208191,
-0.581048846244812,
-0.5798775553703308,
-0.8114396929740906,
-1.3423787355422974,
-0.6829467415809631,
0.26882433891296387,
-1.2079054117202759,
0.304217666387558,
1.1340482234954834,
0.29652169346809387,
... |
def visit _ asyncfunctiondef ( self, node ) : # pylint : disable = invalid - name return self. visit _ functiondef ( node, cls = ast. asyncfunctiondef ) | [
-0.4512450098991394,
-0.04798314347863197,
0.548852264881134,
-0.7289409637451172,
-0.4175717234611511,
-1.0045154094696045,
0.1410927027463913,
-0.34630438685417175,
-0.15765635669231415,
1.0570614337921143,
-0.0852210596203804,
1.2601771354675293,
0.499154269695282,
0.36568036675453186,
... |
def _ fetch _ results _ from _ workers ( self ) : if self. n _ workers > 1 : done _ list = [ ( i, future ) for i, future in enumerate ( self. futures ) if future. done ( ) ] else : # dask not invoked in the synchronous case done _ list = [ ( i, future ) for i, future in enumerate ( self. futures ) ] for _, future in do... | [
-0.3616214096546173,
0.08209948986768723,
0.7058044075965881,
0.10136415809392929,
-0.03891897201538086,
-0.4722314178943634,
0.11035270988941193,
-0.18228760361671448,
-1.1544244289398193,
-0.04748835787177086,
0.04862676560878754,
-0.0810244008898735,
0.3335842192173004,
0.79859620332717... |
def _ run _ py _ tests ( self ) : for tf _ name, compiled _ code in self. _ compiled _ py. items ( ) : for func in self. python _ tests [ tf _ name ] : yield self. _ exec _ test ( tf _ name, func ) | [
-0.8977787494659424,
-0.16614466905593872,
0.5506861805915833,
-0.1659722626209259,
1.1491801738739014,
0.07683145999908447,
0.8137645721435547,
-0.6483797430992126,
-0.5635587573051453,
-0.7424713969230652,
-0.46792206168174744,
0.1266639530658722,
-0.23959526419639587,
0.5279130935668945... |
def log ( func ) : name ='files / logs / func _ { } _ log. txt '. format ( func. _ _ name _ _ ) @ wraps ( func ) def wrapper ( * args, * * kwargs ) : result = func ( * args, * * kwargs ) date = time. strftime ('% d. % m. % y % h : % m : % s') with open ( name,'a') as f : f. write ('time : { } arguments : { }. \ n '. fo... | [
-0.36607226729393005,
-0.8319896459579468,
1.056999921798706,
-0.6294517517089844,
-0.04722407087683678,
0.30075404047966003,
-0.13234280049800873,
0.5054726600646973,
-0.34492018818855286,
0.6077912449836731,
-0.2417035698890686,
0.40649983286857605,
1.0153906345367432,
0.2013005763292312... |
def _ _ str _ _ ( self ) : return'test : % s'% ('- > '. join ( self. _ test ) ) | [
0.38959527015686035,
-1.8524556159973145,
0.5857070088386536,
-1.4405746459960938,
-0.33150312304496765,
1.3646165132522583,
0.3581847548484802,
-0.569543182849884,
-0.22626636922359467,
0.002151565160602331,
0.3926495611667633,
0.5273392200469971,
-0.6978273987770081,
-1.0975271463394165,... |
def set _ clientid ( self, value ) : super ( addrowinputset, self ). _ set _ input ('clientid ', value ) | [
-0.24453070759773254,
0.5237102508544922,
0.23296914994716644,
-0.17585811018943787,
-0.3315580487251282,
1.0153361558914185,
1.2147319316864014,
-1.1518523693084717,
0.4967435300350189,
0.08393512666225433,
-0.12198389321565628,
0.32380786538124084,
-0.20046301186084747,
0.501054584980011... |
def strings ( self ) : strs = os. popen ( " strings - a - o % s " % self. memdump ). read ( ). split ( " \ n " ) strings _ dict = { } results = [ ] for st in strs : if re. match ( " \ d + \ s + ", st ) is not none : new = { " string " : st. strip ( ). split ( " " ) [ 1 ] } results. append ( memoryanalysis. hashabledict... | [
-0.09620228409767151,
-0.08719462156295776,
0.5463244318962097,
-1.3755584955215454,
-0.942848801612854,
-0.6451324820518494,
0.0940345749258995,
-0.024440376088023186,
-0.18803465366363525,
-0.23944169282913208,
-0.31149402260780334,
0.27809756994247437,
-0.143588125705719,
0.585516631603... |
def setfanmode ( mode ) : return none | [
-1.2177993059158325,
0.4941319525241852,
0.45601874589920044,
0.8582611083984375,
-0.19758127629756927,
0.5508608222007751,
1.0394259691238403,
-0.044084906578063965,
0.5307648181915283,
-1.2083961963653564,
-1.4305236339569092,
-0.3755459487438202,
-0.8221288323402405,
-0.0248520001769065... |
def eval ( self, * * dataset ) : inputs = [ dataset [ f'inputs / { i }'] for i in range ( self. order ['descriptor'] + 1 ) ] labels = [ dataset [ f'labels / { i }'] for i in range ( self. order ['property'] + 1 ) ] predictions = self. _ model. predict ( inputs, self. order ['descriptor'] ) loss0 = f. mean _ squared _ e... | [
-0.7679350972175598,
-0.14648732542991638,
0.49082255363464355,
-0.9814724922180176,
0.41237327456474304,
-0.43615520000457764,
-0.2521834969520569,
0.10522592812776566,
-0.8447149991989136,
-0.5369056463241577,
0.10657763481140137,
0.6466261148452759,
-0.11009496450424194,
0.3090897798538... |
def vgg13 _ bn ( pretrained = false, * * kwargs ) : model = vgg ( make _ layers ( cfg ['b'], batch _ norm = true ), * * kwargs ) if pretrained : model. load _ state _ dict ( model _ zoo. load _ url ( model _ urls ['vgg13 _ bn'] ) ) return model | [
0.077299103140831,
0.8717776536941528,
0.1357441246509552,
1.4204342365264893,
-0.24917438626289368,
0.2460121363401413,
-0.1509186178445816,
0.5528006553649902,
0.14316748082637787,
0.2684188485145569,
-0.06963498890399933,
0.35178548097610474,
-0.8687946796417236,
0.30052515864372253,
... |
def step ( self, action ) : if type ( action ) is np. ndarray : action = action [ 0 ] assert action < = self. environment _ dimension + 1, " you picked an invalid action " self. step _ count + = 1 if action! = self. environment _ dimension + 1 : # otherwise no bit is flipped self. next _ state = copy. copy ( self. stat... | [
-1.1272236108779907,
0.45283135771751404,
0.676201581954956,
-0.11986318975687027,
-0.46723639965057373,
0.16784143447875977,
0.3853051960468292,
-0.5138474106788635,
-0.6931256055831909,
0.3850216567516327,
-0.5349481105804443,
0.3071103096008301,
0.5967689752578735,
0.6739001870155334,
... |
def _ _ region _ changed ( self, output = none ) : if output is none : output = self. output x _ res, y _ res, x _ reg, y _ reg, r _ reg, t _ reg = self. _ _ get _ resolution ( output ) return \ self. _ _ render _ region _ check _ box. is _ checked ( ) and \ ( x _ reg! = 0 or y _ reg! = 0 or r _ reg! = x _ res - 1 or t... | [
-0.5933555960655212,
-0.35877010226249695,
0.6564081311225891,
0.265705943107605,
0.15046551823616028,
-0.24740606546401978,
0.6545208096504211,
-0.5682479739189148,
-0.20299214124679565,
-0.16823624074459076,
-0.11796016991138458,
-0.2782825827598572,
-0.5703443288803101,
0.56444638967514... |
def device _ running ( ) : if random. randint ( 0, 100 ) = = 23 : return false else : return true | [
-1.4268789291381836,
0.17584925889968872,
0.5101625919342041,
0.41091591119766235,
-0.11584582179784775,
1.5275886058807373,
-0.07767375558614731,
0.8810806274414062,
0.036775048822164536,
-0.6308243870735168,
0.20353496074676514,
-0.225413516163826,
-0.9115390181541443,
-0.603462457656860... |
def set _ username ( self, value ) : super ( addrowinputset, self ). _ set _ input ('username ', value ) | [
-0.9240525364875793,
1.08591890335083,
0.33922404050827026,
0.15747372806072235,
-0.5077323913574219,
0.1830429583787918,
0.9511345028877258,
-0.2801010012626648,
0.23814812302589417,
-0.1353929042816162,
-0.6190658807754517,
-0.39469972252845764,
0.06805708259344101,
0.19059135019779205,
... |
def create _ block ( self, proof, previous _ hash ) : block = {'index': len ( self. chain ) + 1,'timestamp': str ( datetime. datetime. now ( ) ),'proof': proof,'previous _ hash': previous _ hash,'transactions': self. transactions } self. transactions = [ ] self. chain. append ( block ) return block | [
0.22978369891643524,
0.7056167125701904,
0.5077205300331116,
0.10626324266195297,
0.3232744336128235,
-0.3129546046257019,
-0.5923817753791809,
-0.2940848767757416,
-0.6751360893249512,
-0.3618074059486389,
-0.3705962598323822,
-0.07296748459339142,
-0.6043671369552612,
0.37415263056755066... |
def main ( ) : deck _ file = open ( deck _ filename,'r') msg _ file = open ( msg _ filename,'r') # read the deck of cards from the deck _ file, and the list of messages from # the msg _ file deck = cipher _ functions. read _ deck ( deck _ file ) message _ list = cipher _ functions. read _ messages ( msg _ file ) # encr... | [
0.8568413257598877,
0.12432819604873657,
0.6599034070968628,
0.22469189763069153,
0.6227973103523254,
-0.18670085072517395,
0.0409419983625412,
0.5012298822402954,
-1.130940318107605,
0.25835075974464417,
0.1587653011083603,
0.6859540939331055,
-0.35991963744163513,
0.48900869488716125,
... |
def wait _ then _ save _ users ( time _ in _ seconds = 15 ) : print ( " starting 5 minute wait to write user data... " ) time. sleep ( time _ in _ seconds ) print ( " finished wait. writing user data to file. " ) serialization. write _ user _ map _ to _ db ( user _ map ) | [
-0.4209319055080414,
-0.8257937431335449,
0.21267783641815186,
0.7344729900360107,
0.5523678064346313,
0.7723300457000732,
0.5706713795661926,
0.09396757185459137,
-0.8986721038818359,
-0.027544677257537842,
-1.1047401428222656,
-0.21155962347984314,
-0.33599793910980225,
-0.23869553208351... |
def getbitdepth ( channel ) : andor _ solis. getbitdepth. restype = ctypes. c _ uint depth = ctypes. c _ int ( ) result = andor _ solis. getbitdepth ( ctypes. c _ int ( channel ), ctypes. byref ( depth ) ) check _ status ( result ) return int ( depth. value ) | [
-0.7536721229553223,
0.32652974128723145,
0.6651328206062317,
-0.22581177949905396,
0.07439158111810684,
0.48735329508781433,
1.431714415550232,
-1.1131532192230225,
0.7526194453239441,
-0.814727783203125,
-0.7875377535820007,
1.245435118675232,
-0.9952453374862671,
0.6130495667457581,
1... |
def load _ model ( params, model, optimizer ) : if'load _ weights'in params : checkpoint = torch. load ( params ['load _ weights'] ) model. load _ state _ dict ( checkpoint ['model _ state _ dict'] ) optimizer. load _ state _ dict ( checkpoint ['optimizer _ state _ dict'] ) epoch = checkpoint ['epoch'] + 1 total _ loss... | [
-0.04224902391433716,
-0.1669459491968155,
0.8508325219154358,
0.14324748516082764,
0.3031552731990814,
0.24000491201877594,
0.5749728083610535,
-0.012719045393168926,
-0.6759482622146606,
0.8033762574195862,
-0.3059484660625458,
-0.40744078159332275,
-0.19030620157718658,
0.38310289382934... |
def test _ srv _ metric _ geodesic ( self ) : geod = self. srv _ metric _ r3. geodesic ( initial _ curve = self. curve _ a, end _ curve = self. curve _ b ) result = geod ( self. times ) srv _ a = self. srv _ metric _ r3. srv _ transform ( self. curve _ a ) srv _ b = self. srv _ metric _ r3. srv _ transform ( self. curv... | [
0.4480118453502655,
0.2162935882806778,
0.6877847909927368,
-0.33083727955818176,
-0.04111642763018608,
1.1133209466934204,
-0.17698827385902405,
-0.5995066165924072,
-0.8487783074378967,
0.73993980884552,
0.37990596890449524,
0.491933673620224,
0.15270306169986725,
-0.3977845311164856,
... |
def _ _ init _ _ ( self, base _ addr, length = 4, debug = false ) : if base _ addr < 0 or length < 0 : raise valueerror ( " base address or length cannot be negative. " ) euid = os. geteuid ( ) if euid! = 0 : raise environmenterror ('root permissions required.') # align the base address with the pages self. virt _ base... | [
0.696361780166626,
-0.922833263874054,
0.7205193638801575,
-0.23670712113380432,
-0.5115092396736145,
-0.485944539308548,
-0.16998684406280518,
0.3110445439815521,
1.0566706657409668,
-0.06321630626916885,
0.06569419801235199,
0.4611298441886902,
-0.1999768614768982,
0.45710989832878113,
... |
def check ( ) : values = {'host': platform. node ( ),'hostname': platform. node ( ). replace ( ". local ", " " ),'file':'/ etc / hosts'} result = int ( local ( " fgrep { host } { file } | wc - l ". format ( * * values ), capture = true ) ) if result = = 0 : print ('error : the etc file " { file } " does not contain'' t... | [
-0.05865446850657463,
0.046727996319532394,
0.6435548067092896,
-0.1287931501865387,
-0.07471324503421783,
0.38805311918258667,
0.23337092995643616,
0.7159554362297058,
-1.3436323404312134,
0.05484354868531227,
0.34663814306259155,
0.4199013411998749,
-0.40293291211128235,
0.81211441755294... |
async def async _ connect ( self ) : self. _ reader, self. _ writer = await asyncio. open _ connection ( self. _ host, self. _ port ) with ( await self. _ io _ lock ) : try : await asyncio. wait _ for ( self. _ reader. readuntil ( b'login :'), 9 ) except asyncio. streams. incompletereaderror : _ logger. error ( " unabl... | [
-0.7607457637786865,
-0.688441812992096,
0.7189301252365112,
-0.09666091203689575,
0.10404032468795776,
-0.2777616083621979,
-0.13902196288108826,
0.3120209574699402,
-1.0619527101516724,
0.3399893641471863,
0.05447519198060036,
-0.25978294014930725,
0.48515045642852783,
-1.064116001129150... |
def read ( self ) - > optional [ any ] : raise notimplementederror ( " implement the'read'method returning data that is sortable with'key'method " ) | [
-0.26368576288223267,
-0.7067860960960388,
0.7146661281585693,
0.544330358505249,
-0.8159247636795044,
0.5406213998794556,
-0.8751723170280457,
-1.496837854385376,
-0.5416235327720642,
-0.4251263439655304,
0.5527934432029724,
0.4895557165145874,
-0.4069174826145172,
-0.41444870829582214,
... |
def handle _ error ( self, msg, exc _ info = true ) : self. logger. log _ v ( " socket closing - - > % s ", msg, exc _ info = exc _ info ) self. close ( ) | [
-0.17298492789268494,
-0.0270943995565176,
0.6526163220405579,
-0.16434800624847412,
-0.48293766379356384,
0.4990925192832947,
-0.13958214223384857,
0.38259488344192505,
-0.04741690307855606,
-0.5832732915878296,
0.6022834181785583,
-0.030605191364884377,
-0.22918525338172913,
0.7665882706... |
def _ generateautoresponseonsolaris ( self ) : spath = os. path. join ( self. sscratchpath,'solarisautoresponse') ; ofile = utils. opennoinherit ( spath,'wt') ; ofile. write ('basedir = default \ n'' runlevel = nocheck \ n'' conflict = quit \ n'' setuid = nocheck \ n'' action = nocheck \ n'' partial = quit \ n'' instan... | [
0.09968312829732895,
-0.4882594048976898,
0.5760943293571472,
-0.33229881525039673,
-0.004280004184693098,
0.5885183811187744,
0.9456154108047485,
0.07627192884683609,
0.2402602881193161,
-0.7963559031486511,
-0.4086970388889313,
-0.1765730381011963,
-0.5252718329429626,
-0.463875949382782... |
def evaluate _ cts _ output _ model ( preds _ df, chrom _ name, save _ dir = none, threshold = 0. 05, verbose = true ) : plot _ genome _ predictions ( preds _ df. y. values, preds = preds _ df. preds. values, fname = os. path. join ( save _ dir,'pred _ plot'+ chrom _ name + '. png') if save _ dir else none, width = 200... | [
0.5639695525169373,
-0.15105406939983368,
0.7292459607124329,
-0.5798959732055664,
-0.5729898810386658,
-0.013908512890338898,
0.8841164112091064,
0.33822983503341675,
-0.7163065671920776,
0.07688043266534805,
0.24253569543361664,
1.0338481664657593,
0.4183201491832733,
0.09541712701320648... |
def test _ list _ deserialization ( self ) : original = deserializationtestmodel. create ( count = 5, text ='happy') nested = original. get _ list ( ) assert isinstance ( nested, list ) assert nested [ 0 ] = = none assert nested [ 1 ] = = 0 assert nested [ 2 ] = = 1 assert isinstance ( nested [ 3 ], list ) assert neste... | [
-0.07935548573732376,
-0.1717022955417633,
0.4424546957015991,
-0.31230267882347107,
0.5169565081596375,
-0.5026099681854248,
-0.06233970820903778,
0.4699513614177704,
0.19913512468338013,
-0.7059535980224609,
-1.6100926399230957,
-0.645333468914032,
0.04903270676732063,
-0.021928250789642... |
def test _ delete _ useless _ word ( ) : result = delete _ useless _ word ( [ " tu ", " connais ", " openclassrooms " ] ) assert result = = " openclassrooms " | [
-0.6531091928482056,
0.06720800697803497,
0.24879439175128937,
-0.022873254492878914,
0.3895098865032196,
0.8184131979942322,
-0.23569273948669434,
0.6699954271316528,
0.7777831554412842,
-0.12227723747491837,
-0.7419285774230957,
0.2944311499595642,
-0.889397144317627,
-0.2529970109462738... |
def _ get _ dense _ net ( self, input _ size, name ='dense') : config = deepcopy ( self. config ) config ['encoder _ layer _ type'] ='dense'config ['input _ shape'] = [ input _ size ] return get _ encoder ( name = name, * * config ) | [
-0.49307796359062195,
0.09110931307077408,
0.3787090480327606,
0.26732078194618225,
0.18429408967494965,
-0.3685688376426697,
-0.21658076345920563,
-0.8706590533256531,
0.6214618682861328,
-0.6663902401924133,
-0.30268025398254395,
0.3021741509437561,
-0.3946160078048706,
0.710704445838928... |
def load _ from _ rest _ object ( self, *, obj : dict, _ type : str = none ) - > union [ basenode, automljob ] : # todo : remove in pup with native import job / component type support in mfe / designer if " computeid " in obj and obj [ " computeid " ] and obj [ " computeid " ]. endswith ( " / " + computetype. adf ) : _... | [
-0.028165584430098534,
-0.35491999983787537,
0.722209095954895,
0.35213151574134827,
-0.20248064398765564,
-0.2052067518234253,
0.14037545025348663,
-0.8278329968452454,
0.29473447799682617,
-0.31475502252578735,
-0.36170822381973267,
0.8686438202857971,
0.27938544750213623,
0.223122000694... |
def isatty ( self ) : return false | [
-0.9737131595611572,
-0.1574636548757553,
0.4398716688156128,
0.2936791181564331,
0.4238986372947693,
0.5554611682891846,
-0.3714183568954468,
-0.7423768639564514,
0.048233143985271454,
0.02472553215920925,
-0.2497355192899704,
-0.27191823720932007,
-0.7511296272277832,
-0.1441054940223693... |
def _ _ init _ _ ( self ) : self. _ _ temple _ codes = { } self. _ _ temple _ to _ abrev = { } self. _ _ current _ temple = " " self. _ _ tlist = [ ] lds _ filename = os. path. join ( data _ dir, " lds. xml " ) try : if sys. version _ info [ 0 ] < 3 : xml _ file = open ( os. path. expanduser ( lds _ filename ) ) else :... | [
-0.25285986065864563,
-0.5866718888282776,
0.5619416236877441,
-0.675561249256134,
-0.4729554355144501,
0.8063395619392395,
0.5091719627380371,
0.49845001101493835,
-0.34064048528671265,
-0.30531173944473267,
-0.44220489263534546,
-0.10752876847982407,
0.12408553063869476,
0.54897981882095... |
def to _ python ( self, value ) : return [ self. inner. to _ python ( v ) for v in value ] | [
-1.9280388355255127,
-0.4257582128047943,
0.4261973202228546,
-0.5445324778556824,
0.7579799890518188,
0.042358335107564926,
-1.1724356412887573,
-0.40796321630477905,
0.27702951431274414,
0.5510140061378479,
-1.5070480108261108,
0.5527254939079285,
-0.4567860960960388,
0.8673719763755798,... |
def setstartindex ( self, * args ) : return _ itkimageserieswriterpython. itkimageserieswriterius3ius2 _ setstartindex ( self, * args ) | [
-1.0660632848739624,
-0.9584644436836243,
0.40156108140945435,
-0.07557619363069534,
0.01693826913833618,
0.6344642043113708,
-0.02566569857299328,
-0.012781952507793903,
0.08414456248283386,
0.3244321942329407,
-1.2671159505844116,
0.9323409795761108,
-0.9823712110519409,
0.07535652071237... |
def format ( self, tokensource, outfile ) : self. data = [ ] for token, value in tokensource : self. data. extend ( [ self. _ style [ token ] ] * len ( value ) ) | [
-0.3469763398170471,
0.2222641408443451,
0.11502309143543243,
-1.408618688583374,
-0.12494586408138275,
-0.5294498801231384,
-0.4756191670894623,
0.6569871306419373,
-0.3693161606788635,
-0.0711817815899849,
-0.26905468106269836,
0.19710002839565277,
0.4209747016429901,
0.7354882955551147,... |
def match _ project _ name _ to _ barcode _ name ( project _ sample _ name, sample _ run _ name ) : if not project _ sample _ name. startswith ( " p " ) : sid = re. search ( " ( \ d + ) _? ( [ a - z ] )? _ ", sample _ run _ name ) if str ( sid. group ( 1 ) ) = = str ( project _ sample _ name ) : return true m = re. sea... | [
0.36375367641448975,
-0.8215988874435425,
1.002280354499817,
0.31398919224739075,
-0.8013030290603638,
0.445408433675766,
-0.0005859395605511963,
-0.3469436466693878,
-0.17994225025177002,
0.17678715288639069,
0.35397928953170776,
0.6893482208251953,
-1.1834489107131958,
-0.102756649255752... |
def current _ item _ changed ( self ) : return self. _ widget. currentitemchanged | [
-0.5634595155715942,
-1.0574167966842651,
0.2959313690662384,
0.07779218256473541,
-0.4148467183113098,
0.5333213806152344,
0.09328129142522812,
0.28656506538391113,
-0.19311289489269257,
0.6291224956512451,
-0.5794858932495117,
0.390680193901062,
-0.4427203834056854,
-0.1922624707221985,
... |
async def get _ teacher _ app _ by _ message ( self, message _ id : int ) - > list [ str ] : mycursor, db = await the _ database ( ) await mycursor. execute ( " select * from teacherapplication where message _ id = % s ", ( message _ id, ) ) teacher _ app = await mycursor. fetchall ( ) await mycursor. close ( ) return ... | [
-0.2433246225118637,
0.04283979535102844,
0.48379385471343994,
0.5964867472648621,
0.22809475660324097,
0.1302378922700882,
-0.1363881677389145,
-0.48335063457489014,
-0.37923675775527954,
1.5164525508880615,
0.41069501638412476,
0.14874409139156342,
-0.4593236446380615,
1.4815009832382202... |
def create _ batch _ tables ( cluster, session ) : logging. info ('trying to create batches') cluster. refresh _ schema _ metadata ( ) create _ table = " " " create table if not exists batches ( app text, transaction int, namespace text, path blob, old _ value blob, new _ value blob, exclude _ indices text, primary key... | [
1.0883866548538208,
0.3487115204334259,
0.4824053943157196,
1.205273151397705,
0.6956648230552673,
0.44576361775398254,
-0.4422627091407776,
0.15238092839717865,
-0.819594144821167,
0.31447795033454895,
-0.39461395144462585,
-0.04814254865050316,
0.24915604293346405,
0.7229704260826111,
... |
def bssc _ can _ skip _ init _ fields ( self, field _ names ) : # pylint : disable = no - self - use fields = field _ names [ : ] fields. remove ( barrele _ constant. barrele _ field _ host ) if len ( fields ) = = 0 : return true return false | [
-0.23326274752616882,
0.8578183650970459,
0.4649602472782135,
0.46206486225128174,
0.5236822962760925,
0.8692007064819336,
0.1744501292705536,
0.08609034866094589,
-1.3389230966567993,
-0.38455161452293396,
-1.0028209686279297,
-0.1543388068675995,
-1.1433037519454956,
-0.25684282183647156... |
def _ _ init _ _ ( self, current _ period _ end = none, end _ date = none, id = none, organisation _ id = none, plans = none, start _ date = none, status = none, test _ mode = none, ) : # noqa : e501 # noqa : e501 self. _ current _ period _ end = none self. _ end _ date = none self. _ id = none self. _ organisation _ i... | [
0.5952303409576416,
-0.4037352502346039,
0.5489609241485596,
0.07859297096729279,
-0.053462542593479156,
0.6791808009147644,
0.06506573408842087,
0.20595645904541016,
0.556029200553894,
-0.05059695616364479,
-0.3454533517360687,
0.4798569977283478,
0.08238798379898071,
-0.34038782119750977... |
def on _ alexa _ discovery _ discover ( self, directive ) : # get values from the self. simple _ gadget _ config and set them to variables model _ name = self. _ get _ value _ from _ config ( _ gadget _ settings, _ model _ name ) if not model _ name : model _ name = _ default _ model _ name device _ token _ encryption ... | [
0.1694144457578659,
-0.3118146061897278,
0.5291364789009094,
0.3256281316280365,
0.44461387395858765,
-0.6754599213600159,
-0.14971418678760529,
-0.4943869411945343,
0.28142082691192627,
0.23607437312602997,
-0.4861834943294525,
0.28195127844810486,
0.18024152517318726,
0.04611211270093918... |
def test _ _ _ str _ _ ( image _ config : imageconfig, image _ config _ signed : imageconfig, json _ bytes : bytes, json _ bytes _ signed : bytes, ) : assert str ( image _ config ) = = json _ bytes. decode ( " utf - 8 " ) assert str ( image _ config _ signed ) = = json _ bytes _ signed. decode ( " utf - 8 " ) | [
-0.3757964074611664,
-0.9240550398826599,
0.327980637550354,
-0.7444255352020264,
-0.2766367793083191,
0.3463992178440094,
-0.7716988325119019,
-0.6903327703475952,
0.618233859539032,
0.6071354746818542,
-0.6314239501953125,
-0.044020816683769226,
0.37119317054748535,
-0.01917024329304695,... |
def is _ relevant _ slice ( self, slc ) : # we increase small livers by rejecting non - small liver slices more frequently if config. more _ small _ livers : n _ liver = 1. 0 * np. sum ( slc > 0 ) if ( 100 * n _ liver / slc. size ) > config. small _ liver _ percent : # not small liver return maybe _ true ( 0. 7 ) if co... | [
-0.5923601984977722,
0.08672481030225754,
0.6621116995811462,
-0.35066378116607666,
-0.678245484828949,
-0.07025422900915146,
-0.0970042273402214,
-0.16253390908241272,
0.9958699345588684,
-0.05046254023909569,
0.6005615592002869,
0.7065687775611877,
-0.0686524286866188,
0.6119934916496277... |
def do _ pack ( ) : date _ time = datetime. datetime. now ( ). strftime ( " % y % m % d % h % m % s " ) name _ file = " versions / web _ static _ " + date _ time + ". tgz " localpth = " web _ static / " local ( " mkdir - p versions " ) result = local ( " tar - zcvf { } { } ". format ( name _ file, localpth ) ) if resul... | [
0.42730632424354553,
-0.1924947202205658,
0.5210978984832764,
0.15372638404369354,
-0.2802317142486572,
0.4300881326198578,
0.3634287118911743,
-0.29718855023384094,
-0.5058178305625916,
0.7825815677642822,
-0.6230751276016235,
-0.5183972120285034,
0.18754494190216064,
0.03326411917805672,... |
def test _ z _ exercise2 ( self ) : with connection. cursor ( ) as cursor : cursor. execute ( " " " create table orderscopy as select * from orders ; " " " ) cursor. execute ( " " " create table orderitemscopy as select * from orderitems ; " " " ) cursor. execute ( " " " select * from orderscopy ; " " " ) for result in... | [
-0.19460660219192505,
0.0900496318936348,
1.0414814949035645,
0.8856822848320007,
-0.888511061668396,
-0.2690431475639343,
0.7509384155273438,
-0.9587936401367188,
0.41168513894081116,
0.3443002998828888,
-0.3666957914829254,
-0.41797447204589844,
0.17272527515888214,
0.3252457082271576,
... |
def trip _ duration _ stats ( df ) : print ('\ ncalculating trip duration... \ n') start _ time = time. time ( ) # to do : display total travel time print ('total travel time : ', df ['trip duration']. sum ( ) ) # to do : display mean travel time print ('average travel time : ', df ['trip duration']. mean ( ) ) print (... | [
-0.10636405646800995,
0.799884021282196,
0.6070279479026794,
-0.5739845633506775,
0.05568308383226395,
0.409904420375824,
0.7882707118988037,
-0.5987407565116882,
-0.12505100667476654,
0.8710718154907227,
-0.008083971217274666,
0.7420644760131836,
1.6775336265563965,
0.03029862977564335,
... |
def _ _ init _ _ ( self ) : if not os. path. exists ( os. path. join ( os. getcwd ( ), " logs " ) ) : os. mkdir ( os. path. join ( os. getcwd ( ), " logs " ) ) self. log _ file = open ( os. path. join ( os. getcwd ( ), " logs ", " log _ { }. txt ". format ( str ( datetime. datetime. now ( ) ). replace ( " : ", " _ " ) ... | [
0.12899383902549744,
-0.9822896122932434,
0.7280860543251038,
-0.4331786632537842,
0.05070840194821358,
0.950240433216095,
0.7596967816352844,
0.7078869938850403,
-1.1080191135406494,
-0.6258315443992615,
0.009846579283475876,
-0.2791967988014221,
0.3502223789691925,
0.8255987167358398,
... |
def is _ concert _ client _ gateway ( remote _ gateway ) : for rule in remote _ gateway. public _ interface : if rule. name. endswith ('platform _ info') : return true return false | [
0.7946313619613647,
-0.3542599380016327,
0.5015243291854858,
0.0963481217622757,
-0.6761379837989807,
1.2061299085617065,
0.5216128826141357,
-0.2681107819080353,
-0.5078524947166443,
0.4862978756427765,
-0.2659757137298584,
0.06730418652296066,
-1.4104329347610474,
1.8212616443634033,
-... |
def _ inv _ z ( self, z ) : with ops. name _ scope ( " reconstruct ", values = [ z ] ) : return z * self. scale + self. loc | [
-1.033450722694397,
-0.6522200107574463,
0.1908593326807022,
-0.4123903810977936,
-0.948792576789856,
-0.6595733761787415,
0.5105218291282654,
0.6039878726005554,
-0.3903275728225708,
0.14273907244205475,
-0.7211745381355286,
0.23693157732486725,
-0.2582199275493622,
-0.8828237056732178,
... |
def main ( myfile _ str ) : # user can enter a filename # myfile _ str = input ( " enter fasta file : " ) # pre - programmed file names # myfile _ str = " diabetes. fasta " # myfile _ str = " nm _ 001005291. 3. fa " print ( " \ t loading file : ", myfile _ str ) # open the file, get data _ str and then close the file d... | [
0.7990127801895142,
-0.9931194186210632,
0.7894797921180725,
0.06751914322376251,
-0.22846587002277374,
-0.06546156853437424,
1.1158322095870972,
1.0630292892456055,
-0.879753053188324,
-0.31418582797050476,
-0.6013747453689575,
0.21377690136432648,
-0.2197231650352478,
0.45285123586654663... |
def add _ text ( obj, text, font, xposition = " left ", yposition = " top ", fill = 0 ) : img = image. frombytes ('l ', ( obj. w, obj. h ), obj. imgdata ) imgdraw = imagedraw. draw ( img,'l') text _ w, text _ h = imgdraw. textsize ( text, font = font ) x = tools _ convertxargstopx ( xposition, obj. w, text _ w ) y = to... | [
-0.4618103504180908,
-0.250039666891098,
1.0470120906829834,
-1.1723570823669434,
-0.826999306678772,
0.37893715500831604,
-1.0870119333267212,
-0.5398373007774353,
0.5223431587219238,
0.31669193506240845,
-0.3476172685623169,
-0.0525449700653553,
0.0835629478096962,
-0.450332909822464,
... |
def transmit _ agnocomplete _ context ( self ) : user = super ( ). transmit _ agnocomplete _ context ( ) if user : self. queryset = self. agnocomplete. get _ queryset ( ) return user | [
0.3090576231479645,
0.4671137034893036,
0.6158138513565063,
0.4314288794994354,
-0.3835908770561218,
-0.4890838861465454,
0.645348310470581,
-1.4310088157653809,
0.8996444940567017,
0.23960772156715393,
0.42362678050994873,
0.2030535638332367,
-0.02002096362411976,
-0.5919145941734314,
-... |
def test _ _ app _ manager _ has _ custom _ repr _ _ succeeds ( am ) : assert'appmanager < n _ users = 0 >'in am. _ _ repr _ _ ( ) | [
0.8325766921043396,
0.11546038836240768,
0.0861288458108902,
-0.19474934041500092,
-0.942570686340332,
0.7948943376541138,
-0.4503859579563141,
0.6434829235076904,
0.32622668147087097,
-0.09236127883195877,
-0.3991433084011078,
0.4825066328048706,
0.625483512878418,
1.1153957843780518,
0... |
def rescale _ l ( l, lmax = 2 ) : m, m = l. shape i = scipy. sparse. identity ( m, format ='csr ', dtype = l. dtype ) l / = lmax / 2 l - = i return l | [
-0.10417760163545609,
-0.06592812389135361,
0.6310509443283081,
0.39597517251968384,
-0.0011746062664315104,
0.506951630115509,
-1.3860414028167725,
1.091877818107605,
0.42062103748321533,
0.6783261895179749,
-0.18418055772781372,
-0.4838612377643585,
-0.19892244040966034,
0.05033751949667... |
def reduce _ steady _ metric ( df, metric ) : metric = df [ metric ] return metric [ metric! = metric. shift ( 1 ) ] | [
0.2845402657985687,
1.432488203048706,
0.30196404457092285,
1.2356473207473755,
-0.1726042777299881,
0.3441617786884308,
0.7690330743789673,
-0.7886227369308472,
-1.3374146223068237,
0.5280593633651733,
0.5505010485649109,
0.19617672264575958,
-0.5129641890525818,
-0.5881322026252747,
1.... |
def bool _ ( schema ) : types ='boolean'if'_ notnull'not in schema. data : types = [ types ] + ['null'] return schema ( {'type': types } ) | [
-0.012602345086634159,
0.5014920830726624,
0.3647443950176239,
0.13567988574504852,
0.15748269855976105,
-0.5921486020088196,
-0.48087626695632935,
0.8371887803077698,
0.1615675836801529,
1.0001256465911865,
-0.5507788062095642,
0.6287097930908203,
0.40608465671539307,
-0.5712893009185791,... |
def _ between _ thresholds _ variance ( self, k1, k2 ) : omega = self. omegas [ k2 ] - self. omegas [ k1 ] mu = self. mus [ k2 ] - self. mus [ k1 ] mut = self. mutotal return omega * ( ( mu - mut ) * * 2 ) | [
0.4485279619693756,
-1.37467622756958,
0.8283436894416809,
0.19305410981178284,
-0.8429422378540039,
-0.20953746140003204,
-0.7660197615623474,
-1.222575306892395,
-0.9033995270729065,
0.5134859681129456,
0.05511285737156868,
1.5922502279281616,
-0.4438192844390869,
-0.8080387711524963,
... |
def html _ to _ pdf ( html _ file, pdf _ file ) : asyncio. get _ event _ loop ( ). run _ until _ complete ( _ html _ to _ pdf ( html _ file, pdf _ file ) ) | [
0.3901804983615875,
-0.08884011209011078,
0.4388103783130646,
0.2410918027162552,
1.167035698890686,
-0.6186588406562805,
0.14156679809093475,
0.8167495727539062,
-1.4624866247177124,
0.1606214940547943,
0.6462604999542236,
0.43239808082580566,
0.6431636214256287,
-0.20052212476730347,
1... |
def status ( self ) : return self. _ status | [
-0.326200395822525,
-1.1642234325408936,
0.008560112677514553,
-0.08205031603574753,
-0.09105350822210312,
1.0593215227127075,
0.31101590394973755,
0.5470859408378601,
0.7019562125205994,
-1.0554438829421997,
-1.08207368850708,
0.47339382767677307,
0.06936033815145493,
-0.27200350165367126... |
def test _ f _ transform ( self ) : r2 = euclidean ( dim = 2 ) elastic _ metric = elasticmetric ( a = 1. 0, b = 0. 5 ) curves _ r2 = discretecurves ( ambient _ manifold = r2 ) curve _ a _ projected = gs. stack ( ( self. curve _ a [ :, 0 ], self. curve _ a [ :, 2 ] ), axis = - 1 ) result = elastic _ metric. f _ transfor... | [
0.2873779535293579,
0.5230482220649719,
0.6091713905334473,
0.4569087326526642,
0.3072599470615387,
-0.14099465310573578,
0.29885363578796387,
-0.7798750996589661,
0.0015430544735863805,
-0.3417987525463104,
-0.1855120211839676,
0.1272316426038742,
0.07352787256240845,
-0.6992451548576355,... |
def _ update _ rts _ state ( self ) : pass | [
-0.9819914102554321,
-1.2466932535171509,
0.12992610037326813,
-1.305039644241333,
-0.3891604542732239,
0.019433442503213882,
0.010390684939920902,
-0.5819529891014099,
0.19618842005729675,
0.804530143737793,
0.3640338182449341,
-0.24104420840740204,
-0.3459157943725586,
-0.062198340892791... |
def from _ pos ( pos : pos ) - > int : if pos = = ( 0, 0 ) : return 0 x, y = pos layer = max ( abs ( x ), abs ( y ) ) offset = layer _ offset ( layer ) if x = = layer and y < layer : # right : ( x = 3, y = 2.. - 3 ) return offset + layer - y - 1 elif x < layer and y = = - layer : # up : ( x = 2.. - 3, y = - 3 ) return ... | [
0.13232167065143585,
-0.5972662568092346,
0.7610715627670288,
-0.47939184308052063,
-0.9098281860351562,
0.08580996841192245,
0.22456271946430206,
0.03861207142472267,
0.7710586786270142,
0.1852542608976364,
-0.6510106325149536,
-0.623735249042511,
0.5196216106414795,
-0.3933716118335724,
... |
def process ( self, line ) : return line | [
0.35450732707977295,
-0.7727534770965576,
0.31445953249931335,
0.07072009891271591,
0.5784816145896912,
0.22741656005382538,
-0.5135276913642883,
-0.5959737300872803,
0.4403943121433258,
-1.3887884616851807,
-0.05299847573041916,
-0.13000726699829102,
-0.5932303071022034,
-0.39880740642547... |
def _ load _ gadget _ config ( self, gadget _ config _ path ) : self. gadget _ config _ path = gadget _ config _ path if not gadget _ config _ path : # if no config file was passed in the constructor, then look for a file with the same as the. py file gadget _ config _ path = sys. modules [ self. _ _ module _ _ ]. _ _ ... | [
-0.42609381675720215,
-0.42207202315330505,
0.4358421862125397,
-0.01419755257666111,
0.26718634366989136,
0.4745865762233734,
0.08234929293394089,
0.4442034363746643,
-0.3815997838973999,
0.06333820521831512,
-0.6429048776626587,
-0.09452396631240845,
-0.3689666986465454,
0.36222913861274... |
def abortsequence ( self, cmd ) : try : sequence = self. engine. registry. identify ( cmd. cmd. keywords ) sequence. doabort ( cmd ) except exception as e : cmd. fail ( f'text = " { str ( e ) } "') return cmd. finish ( ) | [
-0.5205308198928833,
-0.7126192450523376,
0.5838163495063782,
0.23431997001171112,
-0.39139822125434875,
0.5169875621795654,
-0.19140128791332245,
-0.8831083178520203,
-0.36585500836372375,
0.847427248954773,
0.8323222398757935,
0.4366544485092163,
-0.6813543438911438,
0.9267086982727051,
... |
def authentication _ token _ from _ email ( *, client : testclient, email : str, db : session ) - > tuple [ dict [ str, str ], int ] : password = random _ lower _ string ( ) user = crud. user. get _ by _ email ( db, email = email ) if not user : user _ in _ create = schemas. usercreate ( username = email, email = email... | [
-0.07285907864570618,
-0.14861683547496796,
0.5745155215263367,
0.1328260451555252,
-0.5443916320800781,
-0.14383460581302643,
-0.016963010653853416,
-0.23800347745418549,
0.15194973349571228,
0.3831300437450409,
-1.0766682624816895,
-0.7109347581863403,
0.22132264077663422,
-1.23274159431... |
def compute _ gene _ joint _ posterior ( cluster, gene, tissue _ snp _ eqtl _ hash ) : assert len ( cluster. ld _ snps ) = = cluster. ld _ matrix. shape [ 0 ], ( len ( cluster. ld _ snps ), cluster. ld _ matrix. shape [ 0 ], cluster. ld _ matrix. shape [ 1 ] ) assert len ( cluster. ld _ snps ) = = cluster. ld _ matrix.... | [
0.47115179896354675,
0.02408214658498764,
0.6527602672576904,
-0.7174631953239441,
-0.37055808305740356,
-0.454717218875885,
0.14952994883060455,
0.7786703705787659,
-0.49492719769477844,
0.5160096287727356,
-0.4486396312713623,
0.240989089012146,
-0.508428156375885,
0.2186899185180664,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.