text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def test _ ignored _ initialization ( self ) : client _ ignored = [ torvend. spiders. thepiratebayspider ] with client _ manager ( ignored = client _ ignored ) as test _ client : assert isinstance ( test _ client. ignored, list ) assert test _ client. ignored = = client _ ignored test _ client. allowed = client _ ignor... | [
-0.05218018591403961,
-0.1828642636537552,
0.3923737704753876,
-0.41004255414009094,
0.6949887871742249,
1.0786961317062378,
0.5017786622047424,
0.08115285634994507,
0.04789045453071594,
-0.5384698510169983,
-1.2142070531845093,
0.5858141779899597,
-0.5394784212112427,
1.1842905282974243,
... |
def md _ link ( self ) : if hasattr ( self, " alias " ) : alias = getattr ( self, " alias " ) return md _ link ( alias, self. slug ) elif hasattr ( self, " header " ) : header = getattr ( self, " header " ) return md _ link ( header, f " { self. slug } # { slug _ case ( header ) } " ) elif hasattr ( self, " blockref " ... | [
0.015299004502594471,
-0.9655336737632751,
0.7592833638191223,
-0.5680181384086609,
-0.01369480136781931,
0.09310012310743332,
-0.35126855969429016,
0.7718999981880188,
-0.7322531938552856,
-1.1021567583084106,
1.642030119895935,
0.27812841534614563,
0.3984162509441376,
0.9164237976074219,... |
def tint _ swap ( * args ) : return _ snap. tint _ swap ( * args ) | [
-2.123148202896118,
-0.22176647186279297,
0.34066927433013916,
0.700596272945404,
-0.024832909926772118,
0.5596427321434021,
0.15148790180683136,
-0.45059695839881897,
-0.5361501574516296,
-0.2400100976228714,
-0.7946064472198486,
0.16744720935821533,
-0.8799266219139099,
-0.59716790914535... |
def convex ( points ) : dataset = sorted ( set ( points ) ) # remove duplicates if len ( dataset ) < = 1 : return dataset # build lower hull lower = [ ] for p in dataset : while len ( lower ) > = 2 and cross ( lower [ - 2 ], lower [ - 1 ], p ) < = 0 : lower. pop ( ) lower. append ( p ) # build upper hull upper = [ ] fo... | [
0.007793004624545574,
-0.06391781568527222,
0.7912287712097168,
0.7132008671760559,
-0.42109403014183044,
0.1313645839691162,
0.12102262675762177,
-0.05235603451728821,
0.7770049571990967,
0.4571450352668762,
0.2320745438337326,
1.021353006362915,
-0.05461643263697624,
-0.7707968950271606,... |
def test _ atomic _ hex _ binary _ pattern _ nistxml _ sv _ iv _ atomic _ hex _ binary _ pattern _ 1 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - pattern - 1. xsd ", instance = " nistdata / a... | [
-0.2669040858745575,
-0.3214947581291199,
0.610543966293335,
0.9665353298187256,
0.14684313535690308,
0.4166290760040283,
0.027778226882219315,
0.5011937618255615,
0.17738346755504608,
0.5550581812858582,
-0.2616938352584839,
-0.4998140037059784,
-0.10020305216312408,
0.36995798349380493,
... |
def isattrdeletedn ( self, * args ) : return _ snap. pneanet _ isattrdeletedn ( self, * args ) | [
-0.8283324837684631,
0.3542550802230835,
0.46609169244766235,
0.2641392946243286,
0.298462450504303,
-0.26634591817855835,
-0.8928140997886658,
0.18776972591876984,
0.9933162331581116,
-0.7978038787841797,
-0.6976314187049866,
-0.16584095358848572,
-0.268572062253952,
0.7361648678779602,
... |
def iterattrs ( self ) : i = stunmsg _ c. next _ attr ( self. _ buf, 0 ) while ( i! = none ) : yield self. _ get _ attrs ( i ) i = stunmsg _ c. next _ attr ( self. _ buf, i ) | [
-0.37870362401008606,
-0.3681093752384186,
0.46893808245658875,
-0.32744383811950684,
0.06952665746212006,
-0.631424069404602,
0.5995692610740662,
-0.7419704794883728,
-0.24763880670070648,
-0.38883665204048157,
0.35275331139564514,
0.5971828103065491,
-0.6862529516220093,
0.66411578655242... |
def addintattrdatn ( self, * args ) : return _ snap. pneanetmp _ addintattrdatn ( self, * args ) | [
-0.9307385087013245,
-0.028824113309383392,
0.5062738656997681,
0.17932400107383728,
0.3000648319721222,
0.39443185925483704,
0.15623784065246582,
-0.17817234992980957,
-0.6931198239326477,
-0.8451746106147766,
-0.7335159182548523,
-0.7287048101425171,
-0.4025188088417053,
0.55171036720275... |
def test _ relabeling ( n _ samples, n _ classes ) : x, y = make _ classification ( n _ samples = n _ samples, n _ features = n _ classes, n _ informative = n _ classes, n _ redundant = 0, n _ repeated = 0, n _ classes = n _ classes, n _ clusters _ per _ class = 1, class _ sep = 10, random _ state = 0 ) # define summar... | [
-1.047294020652771,
0.17224080860614777,
0.707396924495697,
-0.12484262138605118,
0.7994052171707153,
0.7984005212783813,
0.5150784254074097,
0.24346531927585602,
0.7137790322303772,
0.2787938416004181,
0.0978095680475235,
0.47638264298439026,
-0.23663079738616943,
0.4406276047229767,
0.... |
def addnews ( self, mu ) : self. listname = " 本 地 " self. music = [ ] self. music. extend ( mu [ : ] ) if self. play _ mode = = 2 and not self. shuffled : random. shuffle ( self. music ) self. shuffled = true self. listwidget. clearcontents ( ) self. updateinterface ( ) self. currentindex = 0 self. letsplay ( ) | [
-0.21331673860549927,
0.9509574770927429,
0.6301430463790894,
-0.03435640037059784,
-0.058370791375637054,
1.3185076713562012,
-0.35738834738731384,
-0.27316194772720337,
0.988552987575531,
-0.5925959348678589,
-0.6038017868995667,
-0.2195526510477066,
-0.8945083618164062,
0.82143300771713... |
def test _ atomic _ qname _ max _ length _ 3 _ nistxml _ sv _ iv _ atomic _ qname _ max _ length _ 4 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - maxlength - 4. xsd ", instance = " nistdata / atomic ... | [
0.3984204828739166,
-0.49170219898223877,
0.23062755167484283,
0.04089374840259552,
-0.7721280455589294,
0.17217232286930084,
-0.8044837713241577,
-0.507495105266571,
0.08041173219680786,
0.3597060441970825,
-0.6384142637252808,
-0.39236336946487427,
0.09756477177143097,
-0.267372727394104... |
def lat _ lon _ to _ x _ y ( lon, lat ) : dx, dy = lat _ lon _ to _ x _ y _ deltas ( lon, lat ) sz = [ np. shape ( dx ) [ 0 ], np. shape ( dy ) [ 1 ] ] # could be either, dx ~ dlon, dy ~ dlat, size is [ # lat, # lon ], select size that wasn't differenced x = np. hstack ( ( np. zeros ( ( sz [ 0 ], 1 ) ), np. cumsum ( dx... | [
-0.2659516930580139,
-0.09094572812318802,
0.5654051303863525,
-1.121931791305542,
0.6495618224143982,
-0.7468140721321106,
-0.21815933287143707,
0.1431644707918167,
0.04971478879451752,
-0.1389143019914627,
-0.47758686542510986,
-0.17758624255657196,
0.21861723065376282,
-0.53652870655059... |
def vmbootnextreset ( self, args, paths ) : try : path = paths [ int ( args [ 0 ] ) ] except : raise invalidcommandlineerror ( " invalid input value for virtual media " " please run the command with no " " arguments for possible values. " ) self. rdmc. app. patch _ handler ( path, { " oem " : { self. rdmc. app. typepat... | [
-0.14589712023735046,
0.15530885756015778,
0.5496941208839417,
0.5096489787101746,
0.5333575010299683,
0.6704124212265015,
0.6076162457466125,
-0.26944974064826965,
0.10201746970415115,
0.6037453413009644,
0.055054422467947006,
1.0247148275375366,
-2.048069715499878,
-0.009374764747917652,... |
def run ( ) : # pragma : no cover from. logs import configure _ logging print ('direct start, use of gunicorn is recommended for production. ', file = sys. stderr ) # noqa port = current _ app. config ['port'] host = current _ app. config ['host'] debug = current _ app. config ['debug'] init _ filesystem ( current _ ap... | [
0.11905494332313538,
-1.022539734840393,
0.6134099364280701,
0.795303463935852,
1.045318365097046,
0.4780729115009308,
0.3658989369869232,
-0.2053975760936737,
-0.907395601272583,
-0.42059239745140076,
0.22262157499790192,
1.2410968542099,
0.7919679284095764,
0.18718139827251434,
0.55431... |
def test _ fodder _ first _ year ( self ) : assert self. cell. fodder _ in _ cell = = 0 self. cell. fodder _ first _ year ( 10 ) assert self. cell. fodder _ in _ cell = = 10 | [
-0.15748010575771332,
0.3638601005077362,
0.4465444087982178,
0.11773290485143661,
0.8160915374755859,
-0.06458614766597748,
0.2579197585582733,
0.04897713661193848,
0.15152421593666077,
-0.3110835552215576,
-0.3596012592315674,
-0.12749317288398743,
0.14476104080677032,
1.5203578472137451... |
def data _ source ( self, * * kwargs ) : return self. api _ request ( self. _ get _ method _ fullname ( " data _ source " ), kwargs ) | [
-1.1754330396652222,
1.6674013137817383,
0.20058059692382812,
-0.07090094685554504,
0.20514513552188873,
-0.7691171765327454,
-0.5462145805358887,
-0.027124544605612755,
0.06770432740449905,
-0.09999106824398041,
-1.1390377283096313,
1.2342197895050049,
-0.39247211813926697,
-0.31376978754... |
def test _ list _ insert _ string ( self ) : key = ('test ','demo ', 1 ) testlistinsert. client. list _ insert ( key, " city ", 0, " chennai " ) ( key, _, bins ) = testlistinsert. client. get ( key ) assert bins = = {'age': [ 1, 2 ],'name':'name1 ','city': ['chennai ','pune ','dehli'] } | [
-0.5763142704963684,
0.03240068629384041,
0.35016101598739624,
-0.7905625104904175,
0.038873136043548584,
0.34074974060058594,
-0.8109684586524963,
0.2178037315607071,
-0.3449474275112152,
0.6076699495315552,
-1.361829161643982,
-0.37416982650756836,
-0.9085692763328552,
-0.092827923595905... |
def fit ( self, x ) : max _ lower _ bound = - np. inf self. converged _ = false n _ samples, _ = x. shape for init in range ( 1, self. n _ init + 1 ) : self. _ initialize _ parameters ( x ) lower _ bound = - np. inf for n _ iter in range ( 1, self. max _ iter + 1 ) : prev _ lower _ bound = lower _ bound lower _ bound, ... | [
0.042049482464790344,
-0.36105015873908997,
0.5295262336730957,
0.46521279215812683,
-0.12687788903713226,
0.2622564733028412,
-0.3043120503425598,
-0.3361266553401947,
-0.7366530299186707,
-0.47630321979522705,
-0.18965031206607819,
0.25134238600730896,
-0.1748603880405426,
0.772399485111... |
def getslice ( self, min _ date = none, max _ date = none, tickers = none ) : if min _ date is none : min _ date = min ( self. date _ tuple ) if max _ date is none : max _ date = max ( self. date _ tuple ) if tickers is none : tickers = self. ticker _ tuple if max _ date > max ( self. date _ tuple ) or min _ date < min... | [
-1.2033418416976929,
-0.4998275339603424,
0.6203174591064453,
0.19820787012577057,
0.18761754035949707,
-0.011236692778766155,
-0.08665095269680023,
-0.7267462611198425,
-0.6640454530715942,
-0.012109091505408287,
0.3323041498661041,
1.2105990648269653,
-0.5198107361793518,
-0.611280143260... |
def _ _ eq _ _ ( self, * args ) : return _ snap. tintfltprhi _ _ _ eq _ _ ( self, * args ) | [
-0.12082017213106155,
-0.17271573841571808,
-0.030548131093382835,
-0.025780700147151947,
0.6446055769920349,
0.3237804174423218,
0.2111750841140747,
-0.10585541278123856,
-1.023342251777649,
0.05028830096125603,
-0.8360351920127869,
-0.29911527037620544,
-0.8794130086898804,
0.74531412124... |
def _ _ tasks _ to _ exclude ( self ) : rows = [ self. latin _ square. row1, self. latin _ square. row2 ] cells = [ ] for row in rows : if row : cells + = [ row. cell1, row. cell2 ] tasks _ to _ exclude = [ ] for cell in cells : for task in cell. tasks. all ( ) : tasks _ to _ exclude. append ( task. id ) return tasks _... | [
-0.10669074207544327,
0.4172547161579132,
0.9109379053115845,
0.3169979751110077,
-0.902630090713501,
0.5811606645584106,
0.6430009007453918,
-0.32243430614471436,
0.21336013078689575,
0.7159379124641418,
-0.9008936882019043,
-0.42268043756484985,
0.18449364602565765,
0.19301743805408478,
... |
def overlay _ scores _ and _ class _ names ( image, boxes, class _ names = none, colors = none, text _ position ='above ', text _ size _ factor = 1, image _ size _ factor = 1 ) : text _ size _ factor * = image _ size _ factor text _ thickness = 2 * image _ size _ factor text _ thickness = np. maximum ( int ( np. around... | [
-0.7502654194831848,
-0.5045268535614014,
1.0215870141983032,
-0.4064238965511322,
-0.44546952843666077,
0.12335694581270218,
-0.36505717039108276,
-0.5773154497146606,
-0.4658234715461731,
0.5799835920333862,
0.33160272240638733,
-0.29156267642974854,
0.4324093461036682,
0.195733919739723... |
def do _ eof ( self, arg ) : return true | [
-0.6152222752571106,
0.45032545924186707,
0.3619857132434845,
0.2900836169719696,
0.7750601768493652,
0.5323113203048706,
0.7289158701896667,
-0.02854299545288086,
-0.3933890461921692,
0.05165225267410278,
-0.41561779379844666,
-0.6430739164352417,
0.041738640516996384,
0.2778317928314209,... |
def cntuniqundiredges _ pungraph ( * args ) : return _ snap. cntuniqundiredges _ pungraph ( * args ) | [
-0.5006491541862488,
0.6188026070594788,
0.12426282465457916,
-0.30058199167251587,
-0.3356645703315735,
0.10329531133174896,
0.09375899285078049,
1.0643045902252197,
0.05356929823756218,
-0.0042237574234604836,
-0.7371140718460083,
0.06724800169467926,
-0.41659000515937805,
-0.03332465142... |
def test _ inputs _ displayed _ columns ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) header _ list = [ " name ", " account ", " interval ", " index ", " status ", " actions " ] self. assert _ util (... | [
0.35157784819602966,
-0.027446173131465912,
0.6457358598709106,
0.8061762452125549,
0.2989393472671509,
0.25437480211257935,
0.5088931322097778,
-1.0630159378051758,
0.15011031925678253,
-0.3344337046146393,
-0.11837100982666016,
-0.5507941246032715,
-0.08258238434791565,
-0.55565476417541... |
def diseasepage ( disease ) : # diseasepage ('aids') pageid = diseaseid ( disease ) disease _ url ='http : / / bots. snpedia. com / api. php? action = query & prop = info & pageids = { } & inprop = url & format = json '. format ( pageid ) link = requests. get ( disease _ url ) return link. json ( ) ['query'] ['pages'] ... | [
-0.5016412734985352,
-0.537431538105011,
0.5080248117446899,
-0.7925676107406616,
-0.24700337648391724,
-0.16037443280220032,
-1.1229884624481201,
0.1390593945980072,
0.907433271408081,
0.2758159637451172,
0.8494072556495667,
0.4245503544807434,
-0.23487220704555511,
0.1571590155363083,
... |
def parameters ( self, parameters ) : self. _ parameters = parameters | [
-1.0876258611679077,
0.44447019696235657,
-0.1861041635274887,
-0.46287408471107483,
0.5687738656997681,
0.8947733044624329,
0.18976370990276337,
0.6832658052444458,
-0.42482462525367737,
0.35872313380241394,
-0.8490224480628967,
0.2044709473848343,
-0.9877191185951233,
1.0225051641464233,... |
def add _ dest _ points ( self, source _ points, dest _ points ) : # todo is kdtree really faster here than brute force? if len ( dest _ points ) = = 0 : return source _ points = list ( source _ points ) source _ coord = self. source _ hash. coord _ mapping ( source _ points ) new _ dest _ hash = treefinder ( dest _ po... | [
0.45812731981277466,
0.03902653232216835,
0.6614224314689636,
-0.2239902764558792,
0.12063470482826233,
0.7719532251358032,
-0.924267590045929,
0.5544806122779846,
-0.275964617729187,
0.819135308265686,
-0.11566559970378876,
0.4575738310813904,
0.0012812464265152812,
0.32920601963996887,
... |
def _ _ iter _ _ ( self ) : for b in self. dl : yield to _ device ( b, self. device ) | [
-0.6444554328918457,
-0.346424400806427,
0.3648017942905426,
-0.33405640721321106,
0.18806590139865875,
0.11424395442008972,
0.4562316834926605,
-0.5699306726455688,
0.1783747375011444,
-0.034707821905612946,
0.4134020209312439,
-0.12477347254753113,
-0.03638811036944389,
0.384329110383987... |
def convertgraph _ pneanet _ pneanet ( * args ) : return _ snap. convertgraph _ pneanet _ pneanet ( * args ) | [
-1.8029801845550537,
-0.18868976831436157,
0.5428696870803833,
0.27579382061958313,
0.42842769622802734,
0.19554927945137024,
-1.148557424545288,
-0.6415508985519409,
-0.6593286991119385,
-0.3678639829158783,
-0.5446076989173889,
-1.025031566619873,
0.3063286542892456,
0.14125476777553558,... |
def create _ change _ det _ dialog ( cls, task _ title, task _ details ) : return adddialog ( " task details update dialog window ", false, task _ title, task _ details ) | [
0.6199055314064026,
0.022937992587685585,
0.386615127325058,
0.013330935500562191,
-0.8199496269226074,
0.26564741134643555,
-0.347351998090744,
0.3724130690097809,
-0.7461720108985901,
0.08797886222600937,
0.11486220359802246,
0.639406144618988,
0.5571169853210449,
0.545037567615509,
-0... |
def _ oncriticalerror ( self ) : return | [
1.2520546913146973,
-0.8981242179870605,
0.143510103225708,
0.5863914489746094,
0.12347203493118286,
0.2520030736923218,
-0.4051675498485565,
-0.08841308951377869,
-0.20197027921676636,
0.540662944316864,
-0.12793542444705963,
0.687606155872345,
0.41440096497535706,
-0.760345458984375,
0... |
def test _ field _ class ( self ) : self. assertequal ( omnibooleanfield. field _ class,'django. forms. booleanfield') | [
-0.1372109204530716,
0.03678302839398384,
0.009976189583539963,
-0.07451070100069046,
1.25129234790802,
1.6877875328063965,
-0.44937580823898315,
0.4401049315929413,
0.5227043032646179,
-0.5903518199920654,
-0.8111604452133179,
-0.5889207720756531,
-0.17847563326358795,
0.11564071476459503... |
def getccdf ( * args ) : return _ snap. tgutil _ getccdf ( * args ) | [
0.7927822470664978,
-0.19260162115097046,
0.2315894216299057,
-0.23573344945907593,
0.7181379795074463,
0.08380332589149475,
1.0513317584991455,
0.4464622139930725,
-1.4939836263656616,
-0.24023374915122986,
-0.07658425718545914,
0.355488121509552,
-1.084882140159607,
1.0615235567092896,
... |
def createunoservice ( cclass ) : oservicemanager = getservicemanager ( ) oobj = oservicemanager. createinstance ( cclass ) return oobj | [
-0.779514729976654,
-0.16778509318828583,
0.48115840554237366,
-0.13892097771167755,
-0.6862985491752625,
0.47927796840667725,
0.38210731744766235,
-0.18709643185138702,
1.0207736492156982,
-1.4854644536972046,
-0.3979232907295227,
-0.35895657539367676,
-0.7660683393478394,
0.6537361145019... |
def divide _ works ( self, corpus ) : if corpus = ='tlg': orig _ dir _ rel ='~ / cltk _ data / originals / tlg'works _ dir _ rel ='~ / cltk _ data / greek / text / tlg / individual _ works'file _ prefix ='tlg'latin = false elif corpus = ='phi5': orig _ dir _ rel ='~ / cltk _ data / originals / phi5'works _ dir _ rel ='... | [
-0.697700023651123,
0.0713723674416542,
0.8905677795410156,
-0.5682362914085388,
0.5841467380523682,
0.674203097820282,
1.2784838676452637,
0.43320298194885254,
-0.6179031729698181,
0.39108341932296753,
-0.2687889635562897,
-0.6360930800437927,
-0.6991506218910217,
0.6965054273605347,
-0... |
def console _ logger ( self ) : # set up logger log = logging. getlogger ('demeter _ initialization _ logger') log. setlevel ( logging. info ) # set up console handler fmt = logging. formatter ('% ( asctime ) s - % ( name ) s - % ( levelname ) s - % ( message ) s') cns = logging. streamhandler ( sys. stdout ) cns. setl... | [
0.2500964403152466,
-0.9955081939697266,
0.5673478245735168,
-1.0372530221939087,
-0.2735389173030853,
-0.30257248878479004,
-0.38974225521087646,
-0.519566535949707,
-0.6190242767333984,
-0.35273119807243347,
-0.06039302423596382,
-0.7063360214233398,
-0.05982106551527977,
0.7814990282058... |
def read ( infile, columns = none, agerange = [ 0, 20. ] ) : if os. getenv ('isochrone _ dir')! = " " and infile. find ('/') < 0 : data = ascii. read ( os. getenv ('isochrone _ dir') +'/'+ infile, names = ['z ','age ','mini ','mact ','logl ','logte ','logg ','mbol ','u ','b ','v ','r ','i ','j ','h ','k ','intimf ','st... | [
-0.04086686670780182,
-0.2882494032382965,
0.9161234498023987,
-0.2235919088125229,
-0.8364996314048767,
-0.06166153401136398,
0.1969066560268402,
-0.2345079630613327,
-0.742583155632019,
0.5593716502189636,
-0.15525315701961517,
0.19396883249282837,
0.22002968192100525,
-0.344372928142547... |
def _ get _ array _ name ( protocol _ step ) : protocol _ step = protocol _ step. replace ( " * ", " " ). replace ( "? ", " " ) # strip quantifiers return protocol _ step. upper ( ). replace ( " - ", " _ " ) | [
-0.7645566463470459,
-1.3768976926803589,
0.6306600570678711,
-0.7893338799476624,
-1.2681814432144165,
0.3963748514652252,
-0.5480175018310547,
0.28182896971702576,
-0.7486167550086975,
0.7770671844482422,
-0.9565197229385376,
0.5249192714691162,
-0.18557561933994293,
0.44672584533691406,... |
def changech ( self, * args ) : return _ snap. tcha _ changech ( self, * args ) | [
-0.03519412875175476,
0.9191235899925232,
0.42733994126319885,
0.13959099352359772,
0.6184203624725342,
0.7938430309295654,
1.3895882368087769,
0.2833746373653412,
-1.298559308052063,
0.2667854130268097,
-0.4737354516983032,
0.2619105577468872,
0.16967882215976715,
1.319148302078247,
0.8... |
def tag _ word _ dict ( self, t ) : return dict ( self. _ tcount [ t ] ) | [
-0.25339269638061523,
0.16011813282966614,
0.09281042963266373,
-2.025496482849121,
-0.8357089757919312,
0.26118868589401245,
-0.23861195147037506,
-0.40764740109443665,
-1.4727551937103271,
0.9214373230934143,
-0.9314309358596802,
-1.0654679536819458,
0.41474834084510803,
0.98946803808212... |
def getunit ( unit ) : if not unit : return none unit = unit. lower ( ) if unit in unit _ r : return " r " if unit in unit _ c : return " f " if unit in unit _ l : return " h " return none | [
-0.519333004951477,
-0.6605687737464905,
0.5691643953323364,
-0.1841043382883072,
0.2815277874469757,
-0.2045236974954605,
0.3677075207233429,
-0.27567771077156067,
0.35975736379623413,
-0.8444814682006836,
-0.1869128793478012,
0.10456844419240952,
-0.668129026889801,
-0.5613733530044556,
... |
def clr ( self, * args ) : return _ snap. tintset _ clr ( self, * args ) | [
-0.28359198570251465,
0.292908251285553,
0.2706660032272339,
0.7546051740646362,
-0.6985874772071838,
0.18889130651950836,
0.5156024694442749,
-1.1204941272735596,
-0.3029147684574127,
-0.47798535227775574,
0.3817748427391052,
0.35825103521347046,
-1.2404441833496094,
0.9488016963005066,
... |
def format _ image _ link ( in _ d ) : return re. findall ('https. * \ \ ) ', in _ d ['image _ style'] ) [ 0 ] [ : - 1 ] | [
-1.0076966285705566,
-0.9404716491699219,
0.5214603543281555,
-0.12784163653850555,
0.5126561522483826,
-0.7275102138519287,
0.15609343349933624,
0.33962640166282654,
-0.2274378091096878,
0.33375558257102966,
1.4825778007507324,
0.8479188680648804,
0.11823704093694687,
0.19119209051132202,... |
def read _ json ( json _ data : str ) - > any : try : with open ( json _ data,'r') as json _ file : get _ json = json. load ( json _ file ) return get _ json except exception as err : return err | [
-0.69041508436203,
-1.0118120908737183,
0.5675588846206665,
-0.6948764324188232,
-0.6256062388420105,
0.15342752635478973,
-0.18812385201454163,
-0.8288618922233582,
-0.4383682310581207,
0.304781436920166,
0.10023001581430435,
0.7732378840446472,
-0.04972321540117264,
-0.8427449464797974,
... |
def plot _ polar _ image ( data, origin = none ) : polar _ grid = reproject _ image _ into _ polar ( data, origin ) # polar _ grid = polar _ rotate ( polar _ grid, 45 ) # fig, ax = plt. subplots ( 2, 1, figsize = ( 6, 8 ) ) # ax [ 0 ]. imshow ( polar _ grid, cmap = plt. cm. gray ) # ax [ 0 ]. set _ ylabel ( " radius in... | [
0.04025433212518692,
0.07203186303377151,
0.8148120045661926,
-0.748520016670227,
-0.2135719209909439,
0.517730176448822,
0.5534730553627014,
0.46038228273391724,
-0.17037054896354675,
-0.035298991948366165,
0.35922205448150635,
1.1132490634918213,
-0.23962166905403137,
0.33535003662109375... |
def isintattre ( self, * args ) : return _ snap. pneanetmp _ isintattre ( self, * args ) | [
-0.19688692688941956,
-0.19868203997612,
0.5337281823158264,
-0.06859146803617477,
0.9055665135383606,
-0.18008023500442505,
-0.2098149210214615,
-1.0686402320861816,
-0.8736584782600403,
-0.49603086709976196,
0.08830656856298447,
-0.5793103575706482,
-2.4485838413238525,
0.163491055369377... |
def result _ list ( self, value ) : self. _ result _ list = value | [
-0.8805068135261536,
0.5904747247695923,
0.2057376652956009,
0.13824811577796936,
0.6917358040809631,
0.24475081264972687,
0.3327636122703552,
0.13322053849697113,
-0.0025896611623466015,
0.0391574501991272,
-2.3703856468200684,
-1.2581852674484253,
0.18268445134162903,
0.5717648863792419,... |
def validate _ srv _ weight ( weight ) : if weight > 65535 or weight < 0 : raise validationerror ( " srv weight must be within 0 and 65535. " " see rfc 1035 " ) | [
-0.26530924439430237,
0.6371769905090332,
0.4608309268951416,
0.4887956976890564,
-1.2132185697555542,
1.1253862380981445,
0.21937915682792664,
-0.6581665277481079,
-0.245309978723526,
0.009076040238142014,
-0.01612456701695919,
0.014595786109566689,
-0.7741534113883972,
0.918242871761322,... |
def get _ page ( self, deck _ id : str ) - > int : return self. state. get ( deck _ id, { } ). get ( " page ", 0 ) # type : ignore | [
-0.12071561813354492,
0.9635851383209229,
0.6468737125396729,
-0.3541664779186249,
0.5149879455566406,
-0.995530366897583,
-0.6227977871894836,
0.26971378922462463,
0.5442510843276978,
-0.13576287031173706,
0.9357580542564392,
-0.1479189693927765,
0.03073272667825222,
0.7085551619529724,
... |
def delmode ( self, * args ) : return _ snap. pmmnet _ delmode ( self, * args ) | [
-0.17710867524147034,
0.5020319223403931,
0.6356950402259827,
0.586050271987915,
0.2937479019165039,
0.751667320728302,
-0.8655790090560913,
0.4251224100589752,
0.12129677832126617,
-0.8852083683013916,
0.02952946349978447,
-0.669146716594696,
-1.981676459312439,
0.3747469484806061,
-0.1... |
def bboxes _ nms ( bboxes, bboxes _ ref, nms _ threshold = 0. 5, method = " union " ) : keep _ bboxes = np. ones ( ( bboxes. shape [ 0 ], ), dtype = np. bool ) for i in range ( bboxes. shape [ 0 ] - 1 ) : if keep _ bboxes [ i ] : # computer overlap with bboxes which are following. overlap = bboxes _ iou ( bboxes [ i ],... | [
-0.6072885394096375,
-0.25296735763549805,
0.7712484002113342,
0.37664803862571716,
-0.7995675802230835,
0.39658141136169434,
0.19841539859771729,
-0.7101261019706726,
0.45879247784614563,
0.5397667288780212,
0.4766862392425537,
0.06379012018442154,
-0.27694451808929443,
0.8918242454528809... |
def vector _ matrix _ product ( attr _ a, attr _ b, normalize = false ) : return _ create _ and _ connect _ node ('vector _ matrix _ product ', attr _ a, attr _ b, normalize ) | [
-0.3854309320449829,
0.5770061612129211,
0.4583698511123657,
0.5376783013343811,
-0.8296085000038147,
-0.8900688886642456,
0.4609113037586212,
-0.27933114767074585,
0.036483265459537506,
0.452558308839798,
0.6042776703834534,
0.1253349483013153,
0.30533653497695923,
-1.030582070350647,
-... |
def getanf _ pngraph ( * args ) : return _ snap. getanf _ pngraph ( * args ) | [
-0.26399439573287964,
0.9731449484825134,
0.018451234325766563,
-0.243703693151474,
-0.40488070249557495,
-0.2721986174583435,
-0.2945899963378906,
-0.7194435000419617,
-0.7719482183456421,
-0.07637111097574234,
-0.8501681089401245,
0.31142428517341614,
-0.069163478910923,
0.21476913988590... |
def test _ get _ fields ( self ) : fields = self. omniform. _ get _ fields ( ) self. assertequal ( 2, len ( fields ) ) # test the title field self. assertisinstance ( fields ['title'], forms. charfield ) self. assertisinstance ( fields ['title']. widget, forms. textinput ) self. assertequal ( fields ['title']. label,'p... | [
-0.7818363308906555,
0.6673294901847839,
0.6028775572776794,
-0.6654831767082214,
0.7514987587928772,
0.2328895479440689,
-0.7776951789855957,
0.0790320560336113,
-0.12290414422750473,
-0.44944947957992554,
-1.1622852087020874,
-0.4275447726249695,
-0.3114078938961029,
-0.09194786101579666... |
def w3j _ ms ( l1, l2, l3, m1 ) : return _ w3j _ ms ( l1, l2, l3, m1 ) | [
0.3364502191543579,
-0.17602995038032532,
0.3737064599990845,
-0.5258216857910156,
-0.9331985116004944,
0.3150138854980469,
-0.4531131684780121,
-0.1154724657535553,
0.40218791365623474,
1.2346912622451782,
0.46827998757362366,
0.3949117064476013,
-0.8443056344985962,
-0.2681940495967865,
... |
def platform _ variant ( self ) : return self. _ platform _ variant | [
0.38274961709976196,
-0.2331739217042923,
0.2314263880252838,
0.8104402422904968,
-0.316041499376297,
1.9170011281967163,
1.3962873220443726,
-0.4626642167568207,
-0.5515069365501404,
-0.4996257722377777,
-0.3890454173088074,
0.71062833070755,
-0.6922582983970642,
-0.026596328243613243,
... |
def reset ( self, * args, * * kwargs ) : assert args = = ( ) if self. was _ real _ done : obs = self. env. reset ( * * kwargs ) # no - op step to advance from terminal / lost life state obs, _, _, _ = self. env. step ( 0 ) self. lives = self. env. unwrapped. ale. lives ( ) return obs | [
-0.7150130867958069,
0.06580349802970886,
0.6802792549133301,
-0.07266738265752792,
0.40171462297439575,
0.3104496896266937,
0.03767140582203865,
-0.5538803935050964,
-0.3596082627773285,
-0.1759209930896759,
-0.10110067576169968,
0.24794131517410278,
0.1648568958044052,
0.2730341851711273... |
def searchbinleft ( self, * args ) : return _ snap. tcncomv _ searchbinleft ( self, * args ) | [
-0.2770363688468933,
0.2828662097454071,
0.02080085501074791,
0.24913828074932098,
1.5111459493637085,
1.1547374725341797,
0.12423389405012131,
-0.88568115234375,
-0.5423731207847595,
-0.473587304353714,
-1.336862325668335,
-0.39111247658729553,
-1.335639476776123,
1.404397964477539,
0.3... |
def test _ api _ shared _ live _ media _ delete _ student ( self ) : shared _ live _ media = sharedlivemediafactory ( ) jwt _ token = studentltitokenfactory ( playlist = shared _ live _ media. video. playlist ) response = self. client. delete ( self. _ delete _ url ( shared _ live _ media. video, shared _ live _ media ... | [
0.25859642028808594,
-0.5806613564491272,
0.6597822904586792,
0.6742554903030396,
0.039505720138549805,
1.0571187734603882,
0.6256209015846252,
0.3318532407283783,
1.2254892587661743,
0.13738420605659485,
-0.8267666697502136,
0.49771255254745483,
-0.695932924747467,
0.07484018057584763,
... |
def test _ atomic _ id _ pattern _ 3 _ nistxml _ sv _ iv _ atomic _ id _ pattern _ 4 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - pattern - 4. xsd ", instance = " nistdata / atomic / id / schema + instance... | [
-0.025073101744055748,
0.09948635846376419,
0.48727694153785706,
0.32992443442344666,
-0.32506853342056274,
0.34539180994033813,
0.011232799850404263,
-0.13789434731006622,
0.7202105522155762,
0.7913694977760315,
-0.1314374953508377,
-0.22724999487400055,
-0.1344742625951767,
-0.6167062520... |
def getfltattrdate ( self, * args ) : return _ snap. tneanet _ getfltattrdate ( self, * args ) | [
0.42445066571235657,
0.5252587199211121,
0.28145766258239746,
-1.228973627090454,
0.9971537590026855,
0.004811670631170273,
-0.5665633082389832,
-0.3384957015514374,
-0.6711630821228027,
-0.7873837947845459,
0.16760702431201935,
-0.7625964283943176,
-0.08517076820135117,
0.823128879070282,... |
def update _ identity _ provider ( userpoolid = none, providername = none, providerdetails = none, attributemapping = none, idpidentifiers = none ) : pass | [
-1.3879739046096802,
-0.6308881044387817,
0.3219320476055145,
0.231952965259552,
-0.22816388309001923,
0.7764118909835815,
0.6244142055511475,
0.009730017744004726,
1.1871474981307983,
0.751919150352478,
-0.9269230961799622,
1.2546210289001465,
-1.6200987100601196,
-1.278485655784607,
0.... |
def active _ start _ date ( self, active _ start _ date ) : pattern _ dict = dict ( ) pattern _ dict ['freq _ type'] = self. schedule _ freq _ type pattern _ dict ['active _ start _ date'] = active _ start _ date schedule _ pattern = schedulepattern ( self. _ pattern ) self. _ pattern = schedule _ pattern. create _ sch... | [
-0.3943660259246826,
-0.752956748008728,
0.46261170506477356,
-0.09553675353527069,
-0.13843302428722382,
0.27953580021858215,
0.9278982281684875,
0.6580663323402405,
0.27451789379119873,
0.06484910100698471,
-0.4924629032611847,
1.107108235359192,
0.7954952716827393,
-0.924354076385498,
... |
def random _ port ( ) : sock = socket. socket ( ) sock. bind ( ( " ", 0 ) ) port = sock. getsockname ( ) [ 1 ] sock. close ( ) return port | [
-0.17798301577568054,
-0.2659575641155243,
0.6725574135780334,
-0.9926360845565796,
-0.22095456719398499,
0.4477297067642212,
0.6234588027000427,
-0.4273637533187866,
0.24810074269771576,
-0.3979569375514984,
0.11301615834236145,
0.8896097540855408,
-1.7246798276901245,
-0.1118178069591522... |
def _ check _ main _ diagonal ( self ) : if self. _ row = = self. _ col : total = sum ( [ self. _ letter _ dict [ self. _ game _ state. board [ diagonal _ indexing ] [ diagonal _ indexing ] ] for diagonal _ indexing in range ( 3 ) ] ) if abs ( total ) = = 3 : winning _ letter = self. _ game _ state. board [ self. _ row... | [
-0.6923683881759644,
0.5098404884338379,
0.8147196173667908,
-0.47443297505378723,
-0.6983517408370972,
0.3048900067806244,
0.028692040592432022,
0.07474705576896667,
0.5492771863937378,
0.7342567443847656,
-0.36821088194847107,
-0.05522191524505615,
0.09709977358579636,
-0.816421270370483... |
def init ( ) : connector. connect ( post _ save _ template, signals. post _ save, template ) create _ template _ schema _ viewer _ from _ templates _ in _ db ( ) | [
0.18674442172050476,
-0.06637062877416611,
0.23408223688602448,
0.6042084097862244,
0.029591936618089676,
-0.5656027793884277,
0.546089768409729,
0.8021697998046875,
-0.526735782623291,
-0.5956340432167053,
-0.9540249109268188,
-0.5822399258613586,
0.49682608246803284,
1.0091887712478638,
... |
def test _ validate _ page _ blobs ( self ) : with mock _ wire _ protocol ( data _ file ) as protocol : test _ goal _ state = protocol. get _ goal _ state ( ) host _ client = protocol. client. get _ host _ plugin ( ) self. assertfalse ( host _ client. is _ initialized ) self. asserttrue ( host _ client. api _ versions ... | [
0.6957102417945862,
-0.14966855943202972,
0.8203126192092896,
-0.028404170647263527,
0.8496218323707581,
0.9363498091697693,
-0.26158392429351807,
0.41087305545806885,
-0.2633177638053894,
0.9355648756027222,
-0.8934389352798462,
-0.43743380904197693,
-0.9215015172958374,
-0.11788143217563... |
def show _ version ( a _ device ) : remote _ conn = connecthandler ( * * a _ device ) print ( ) print ( " # " * 80 ) print ( remote _ conn. send _ command ( " show version " ) ) print ( " # " * 80 ) print ( ) | [
0.40306106209754944,
-0.5284690856933594,
0.5707888007164001,
0.4498840272426605,
-0.5757542252540588,
1.433699607849121,
0.5397334098815918,
0.07914477586746216,
-0.4460206627845764,
0.988240122795105,
-0.22576762735843658,
1.7756224870681763,
-0.08437999337911606,
0.7232462763786316,
0... |
def seta ( self, a, format ='matrix ', params = none ) : if format = ='matrix': a = np. asarray ( a, dtype = float ) i, j = np. nonzero ( a ) v = a [ ( i, j ) ] nnz = len ( v ) numrows, numcols = a. shape assert ( self. numcols = = numcols ) self. numrows = numrows self. a. init ( numrows, numcols, nnz ) for k in range... | [
-0.359139621257782,
-0.3937673270702362,
0.6520481705665588,
-0.43217453360557556,
-0.18895842134952545,
-0.32961735129356384,
0.595449686050415,
0.1710239052772522,
0.6095165014266968,
0.23684316873550415,
0.6646503806114197,
0.5741764307022095,
0.6828868985176086,
1.267656922340393,
-0... |
def thread _ test _ em _ running ( task _ type ) : if task _ type = = " false " : with open ( os. path. join ( os. path. dirname ( _ _ file _ _ ), '.. /.. / tests / sample _ output / input _ wrong. json'),'r') as f : json _ data = json. load ( f ) job = job. from _ json ( json _ data ) job. job _ id = " thisisafalseinp... | [
0.4827733635902405,
-0.14552247524261475,
0.9675869345664978,
0.37166693806648254,
0.5144874453544617,
-0.03292471542954445,
1.2579964399337769,
0.6119458675384521,
-0.7880003452301025,
0.6127057671546936,
-0.42409974336624146,
0.1480942964553833,
-0.05458027869462967,
0.4820070266723633,
... |
def getintvalatrowidx ( self, * args ) : return _ snap. ptable _ getintvalatrowidx ( self, * args ) | [
-0.4590355157852173,
0.892224907875061,
0.3346254527568817,
0.7648444771766663,
0.11125992238521576,
0.5527677536010742,
-0.37194448709487915,
-1.4716755151748657,
-0.3918980658054352,
0.14604146778583527,
0.038892898708581924,
-0.21128632128238678,
-0.8834589123725891,
0.43237462639808655... |
def formatdict ( self, result ) : formattedresult = dbformatter. formatdict ( self, result ) [ 0 ] formattedresult [ " id " ] = int ( formattedresult [ " id " ] ) formattedresult [ " fileset " ] = int ( formattedresult [ " fileset " ] ) formattedresult [ " workflow " ] = int ( formattedresult [ " workflow " ] ) formatt... | [
-0.9915721416473389,
-0.8185598850250244,
0.6891358494758606,
-1.5403327941894531,
-1.0610674619674683,
-0.8192862868309021,
-0.8386765718460083,
-0.5328996181488037,
0.031203819438815117,
-0.36095961928367615,
0.22292658686637878,
-0.7516534328460693,
-0.3755595088005066,
1.09064030647277... |
def tmem _ new ( * args ) : return _ snap. tmem _ new ( * args ) | [
-0.618314802646637,
-0.7371336817741394,
0.12981724739074707,
-0.43319255113601685,
-0.0543244443833828,
0.10961591452360153,
0.42977574467658997,
-0.1393248736858368,
-1.2172446250915527,
-0.2868276834487915,
-0.7770999073982239,
-1.1590735912322998,
0.7198428511619568,
0.6754740476608276... |
def _ _ init _ _ ( self, dataset, measurements ) : self. dataset = dataset self. measurements = measurements | [
0.9934641718864441,
0.07128824293613434,
0.4569309651851654,
-0.4059646725654602,
0.09781945496797562,
0.385852187871933,
-0.9287814497947693,
0.6160265803337097,
0.23761382699012756,
-0.7505744099617004,
0.7057603597640991,
0.2970290780067444,
0.7534464597702026,
0.9029237627983093,
0.0... |
def test _ required _ field ( self ) : field = omnifield. _ meta. get _ field ('required') self. assertisinstance ( field, models. booleanfield ) self. assertfalse ( field. default ) | [
-0.19956102967262268,
0.8524432182312012,
0.2095382660627365,
0.2663487493991852,
0.8566796183586121,
1.0732451677322388,
-0.24419011175632477,
0.2639288902282715,
0.08687753230333328,
0.11425936222076416,
-0.7059711217880249,
-0.538109302520752,
-0.7681206464767456,
0.144473597407341,
0... |
def get _ gene _ disease _ pairs ( gene _ disease _ filename, do _ mesh _ filename ) : random. seed ( 100 ) # reproducibility gene _ disease _ df = pd. read _ csv ( gene _ disease _ filename, sep = " \ t " ) do _ mesh _ df = pd. read _ csv ( do _ mesh _ filename, sep = " \ t " ) # create doid - mesh list do _ mesh _ pa... | [
-1.009455919265747,
0.022833460941910744,
0.9059591889381409,
-0.07863679528236389,
-0.0058119166642427444,
0.5246769189834595,
-0.22067949175834656,
0.8010682463645935,
-0.28487077355384827,
0.15092839300632477,
0.3925834000110626,
0.47699740529060364,
0.5733972787857056,
1.22033715248107... |
def getmxindegnid _ pungraph ( * args ) : return _ snap. getmxindegnid _ pungraph ( * args ) | [
-0.5364800691604614,
0.8265064358711243,
0.3812236189842224,
0.5691698789596558,
-0.990802526473999,
-0.2948136627674103,
-0.8694628477096558,
0.6221431493759155,
-0.1369328796863556,
-0.05998730659484863,
-0.4803491532802582,
0.013122020289301872,
-1.5414375066757202,
0.06688141822814941,... |
def setactiveturn ( self ) : if self. board. getturn ( ) = = self. team : self. active = true else : self. active = false | [
0.479414701461792,
-1.3975298404693604,
0.5028022527694702,
-0.07345298677682877,
0.5845403671264648,
0.2241884022951126,
0.43242689967155457,
-0.1502184420824051,
-0.19010938704013824,
0.13924939930438995,
-0.6202579140663147,
0.3613753318786621,
-0.7116885781288147,
-1.1426503658294678,
... |
def _ makeargumentparser ( cls ) : parser = pipebase. argumentparser ( name = cls. _ defaultname ) parser. add _ id _ argument ( " - - id ", " sourcetable _ visit ", help = " data id, e. g. - - id visit = 6789 " ) return parser | [
-0.6620242595672607,
0.2250007539987564,
0.5345571637153625,
-0.6556881070137024,
-0.019889451563358307,
0.4292370080947876,
-0.37816134095191956,
0.5120043158531189,
-0.2772141695022583,
0.31744062900543213,
0.06427174806594849,
-0.07435988634824753,
0.10847173631191254,
-0.31569591164588... |
def reserve ( self, * args ) : return _ snap. tngraph _ reserve ( self, * args ) | [
-0.1656884402036667,
1.325454592704773,
-0.029054464772343636,
-0.3892272114753723,
1.0684477090835571,
-0.4101279377937317,
0.6161878108978271,
-0.17082779109477997,
-1.156958818435669,
0.02483254484832287,
-0.42806684970855713,
-1.3978493213653564,
-1.0922731161117554,
-0.869375169277191... |
def test _ atomic _ id _ pattern _ nistxml _ sv _ iv _ atomic _ id _ pattern _ 1 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - pattern - 1. xsd ", instance = " nistdata / atomic / id / schema + instance / n... | [
0.03349712863564491,
-0.37376734614372253,
0.4588952660560608,
0.5498477816581726,
-0.03670913726091385,
0.24566885828971863,
0.4541374444961548,
0.06370199471712112,
0.8065940141677856,
1.0015398263931274,
0.1206088736653328,
0.14148952066898346,
-0.05313853546977043,
-0.11114100366830826... |
def native _ value ( self ) : return self. _ state | [
-0.07480687648057938,
-0.7000453472137451,
0.3350047469139099,
-0.15096287429332733,
-1.0910588502883911,
0.8449795246124268,
0.051829177886247635,
-0.5952795743942261,
-0.15098166465759277,
-0.9656043648719788,
-0.3288216292858124,
0.659662663936615,
0.4985654950141907,
-0.419449448585510... |
def ln _ prior ( theta, hyperparameters ) : ln _ p = 0. 0 for x, ( name, params ) in zip ( theta, hyperparameters ) : if name = ='uniform': ln _ p + = ln _ uniform _ prior ( x, * params ) elif name = ='normal': ln _ p + = ln _ gaussian _ prior ( x, * params ) elif name = ='log _ uniform': ln _ p + = log10 _ uniform _ p... | [
0.30837884545326233,
-0.27673792839050293,
0.6791119575500488,
-0.7487355470657349,
0.6668315529823303,
-0.3944562077522278,
-0.3515312671661377,
-0.08235891163349152,
0.2292611449956894,
0.2644180357456207,
-0.40509775280952454,
-0.002855871804058552,
-0.14370614290237427,
0.5479779243469... |
def is _ charge _ port _ door _ open ( self ) - > bool : return self. _ vehicle _ data. get ( " charge _ state ", { } ). get ( " charge _ port _ door _ open " ) | [
-0.4458550214767456,
-0.6838342547416687,
0.45009738206863403,
0.22443634271621704,
0.21484175324440002,
0.1771705597639084,
-0.34441718459129333,
0.22117573022842407,
0.20492610335350037,
0.428333580493927,
-0.21114422380924225,
0.7725813984870911,
-0.4303443133831024,
0.9162946939468384,... |
def test _ dur _ ywdhms ( y, w, d, h, m, s, x ) : pytest. debug _ func ( ) # payload result = d ( years = y, weeks = w, days = d, hours = h, minutes = m, seconds = s ) assert result = = x | [
-0.12539061903953552,
0.5863454341888428,
0.5516787767410278,
-0.8430123329162598,
-0.5598858594894409,
0.5795748829841614,
0.2476685345172882,
-1.2247629165649414,
0.4970400631427765,
-1.1186320781707764,
-0.2967282831668854,
0.09622422605752945,
0.803665041923523,
0.5003905892372131,
-... |
def extendhit ( currenthit, cdsseq, geneseq ) : hit = extendright ( currenthit, cdsseq, geneseq ) extendedhit = extendleft ( hit, cdsseq, geneseq ) return extendedhit | [
0.11156577616930008,
-0.491880863904953,
0.3117067515850067,
0.21815189719200134,
-0.6634196043014526,
0.43068134784698486,
-0.4284918010234833,
0.5535097718238831,
-0.1727643609046936,
0.09053170680999756,
-0.10960289090871811,
0.8800948262214661,
-0.1501854509115219,
-0.4241253137588501,... |
def format _ input ( grid ) : f = open ( grid,'r') res = [ ] for line _ num, line in enumerate ( f ) : if line _ num = = 3 or line _ num = = 7 : continue # removing the'|'character in the string line = line [ : 3 ] + line [ 4 : 7 ] + line [ 8 : 11 ] list _ line = [ ] for char in line : if char! = " _ " : list _ line. a... | [
-0.531915545463562,
-0.8884258270263672,
0.6383430361747742,
-0.3375948667526245,
-0.21823909878730774,
0.1805136799812317,
0.002558973152190447,
0.6953923106193542,
-0.4119724631309509,
0.3915466070175171,
-0.05787963420152664,
-0.06467252224683762,
0.09490319341421127,
0.5440239310264587... |
def app _ protocol ( self ) - > optional [ str ] : return self. _ _ app _ protocol | [
1.0851536989212036,
-0.32661113142967224,
0.30702918767929077,
0.8719872236251831,
-0.4646807909011841,
1.8906584978103638,
-0.21045151352882385,
-0.7122781872749329,
0.5885668992996216,
0.6696319580078125,
0.8905012607574463,
0.16432702541351318,
-0.14362087845802307,
-0.3762708604335785,... |
def _ _ eq _ _ ( self, other ) : if not isinstance ( other, listttsadataresponse ) : return false return self. _ _ dict _ _ = = other. _ _ dict _ _ | [
-0.417819619178772,
-0.8136160969734192,
0.47524791955947876,
-0.9720264673233032,
-0.39886271953582764,
0.013054747134447098,
0.02916330099105835,
-0.40859076380729675,
1.4269802570343018,
-0.19040019810199738,
-1.369373083114624,
-0.42756015062332153,
0.548283576965332,
0.287500172853469... |
def init ( self ) : self. logger. debug ('initializing, widget = % s ', self. widget ) self. state. addlistener ( self ) self. onstatechange ( state _ change _ init ) | [
0.14960002899169922,
-0.5589868426322937,
0.2259652316570282,
-0.13859416544437408,
0.6836971640586853,
0.11133384704589844,
-0.4277820885181427,
0.7098627090454102,
0.1423799842596054,
-0.46659812331199646,
-0.7876567840576172,
0.26905936002731323,
0.7633201479911804,
1.3358361721038818,
... |
def predict ( x, p ) : if len ( x ) is not len ( p ) : print ('the feature array ( size : % d ) and the probability array ( size : % d ) must have the same size') else : to _ return = 1 for f in range ( 0, len ( x ) ) : to _ return * = p [ f ] if x [ f ] else 1 - p [ f ] return to _ return | [
-0.5921642184257507,
0.014613641425967216,
0.5192059278488159,
0.6815539598464966,
-0.15551787614822388,
0.2861767113208771,
-0.8151828050613403,
1.0896389484405518,
-0.1353158950805664,
0.22252435982227325,
-0.3055416941642761,
0.21976689994335175,
-1.3110929727554321,
-0.2178886830806732... |
def unalign _ mass _ centre _ from _ light _ centre ( self, results : af. resultscollection, mass _ prior _ model : af. priormodel ( mp. massprofile ), ) : if self. align _ bulge _ mass _ centre : mass _ prior _ model. centre = results [ - 3 ]. model. galaxies. lens. bulge. centre else : mass _ prior _ model. centre = ... | [
0.6596130132675171,
-1.0461645126342773,
0.5812260508537292,
-0.8722521066665649,
0.2429005354642868,
0.399474173784256,
0.7119540572166443,
0.12252453714609146,
0.14572195708751678,
-0.09061284363269806,
0.48443567752838135,
-0.46608614921569824,
-0.5317830443382263,
0.646856963634491,
... |
def set _ keyboard _ focus ( self ) : self. element _ info. component. grab _ focus ( " screen " ) return self | [
-0.0010177093790844083,
0.35783323645591736,
0.17166699469089508,
1.4051951169967651,
0.829081654548645,
0.05512019619345665,
0.9085372090339661,
-0.7100969552993774,
-0.04534599557518959,
-0.7313886284828186,
-0.17792169749736786,
0.6949191689491272,
-0.15452945232391357,
0.68670684099197... |
def accuracy ( output, target, topk = ( 1, ) ) : maxk = max ( topk ) batch _ size = target. size ( 0 ) _, pred = output. topk ( maxk, 1, true, true ) pred = pred. t ( ) correct = pred. eq ( target. view ( 1, - 1 ). expand _ as ( pred ) ) res = [ ] for k in topk : correct _ k = correct [ : k ]. view ( - 1 ). float ( ). ... | [
-0.8020939826965332,
-0.541279673576355,
0.6544919013977051,
0.775699257850647,
-0.6305164098739624,
-0.531069815158844,
1.0757794380187988,
0.744081437587738,
-0.40444034337997437,
0.6727128624916077,
0.2418753057718277,
0.45165348052978516,
1.333919644355774,
0.3677055835723877,
-0.493... |
def _ _ getitem _ _ ( self, date ) : return [ stat [ date ] for stat in self. values ] | [
-0.03333093598484993,
0.04329325631260872,
0.21867352724075317,
0.057471614331007004,
-0.016712000593543053,
0.6646217107772827,
-0.6343989968299866,
-0.756909966468811,
-0.25565725564956665,
-0.8856417536735535,
0.0214584618806839,
0.07966674864292145,
1.1198668479919434,
0.52283567190170... |
def _ get _ search _ results ( self ) : # create search url object using term defined above and pull from site. url = base _ search _ url + re. sub ( " ", " - ", self. query ) self. _ running _ string ('running...') while true : try : page = requests. get ( url ) soup = bs ( page. content,'html. parser') results = soup... | [
-1.1236408948898315,
-0.265398234128952,
0.510604977607727,
0.06139194220304489,
0.5907278060913086,
-0.35373902320861816,
-0.19570854306221008,
-0.8932974338531494,
-0.24067151546478271,
-0.24371710419654846,
-0.19330598413944244,
0.09681104123592377,
-0.030536020174622536,
0.280124366283... |
def test _ specimen _ page _ logged _ in ( self ) : with app. test _ client ( ) as client : client. post ( " / login ", data = { " username " : " tester1 ", " password " : " password1 " }, follow _ redirects = true, ) resp = client. get ( " / specimen / 12 " ) html = resp. get _ data ( as _ text = true ) self. asserteq... | [
-0.07497886568307877,
-0.10414879769086838,
0.6447398662567139,
0.3793676793575287,
0.6557046175003052,
0.6313789486885071,
-0.16400882601737976,
0.028593942523002625,
0.5593507885932922,
-0.5462666749954224,
-0.10523837059736252,
0.48463937640190125,
0.05072159692645073,
-0.24958410859107... |
def reorderlist ( self, head : listnode ) - > none : # if head is none or head. next is none : return head # 出 的 中 slow, fast = head, head while fast. next and fast. next. next : fast = fast. next. next slow = slow. next pre = none # cur 代 的 cur = slow. next # 前 slow. next = none # while cur : tmp = cur. next cur. next... | [
0.16111330687999725,
-0.018544957041740417,
0.924776554107666,
0.251023530960083,
-0.9504038095474243,
-0.769058108329773,
1.2663695812225342,
0.8955831527709961,
0.5468341112136841,
0.13163530826568604,
-0.6079412698745728,
0.010676314122974873,
-1.1418581008911133,
0.3626193404197693,
... |
def sequential _ evaluation ( recommender, test _ sequences, evaluation _ functions, users = none, given _ k = 1, look _ ahead = 1, top _ n = 10, scroll = true, step = 1 ) : if given _ k = = 0 : raise valueerror ('given _ k must be! = 0') metrics = np. zeros ( len ( evaluation _ functions ) ) with tqdm ( total = len ( ... | [
-0.054800260812044144,
0.8075698018074036,
0.5418246984481812,
0.48912152647972107,
-0.06402838230133057,
0.13938117027282715,
0.8170896768569946,
0.21215635538101196,
0.07958510518074036,
0.6794203519821167,
0.34350690245628357,
0.5505381226539612,
-0.21866393089294434,
0.6855084896087646... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.