text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def encrypt ( self, data : bytearray ) - > bytearray : if not isinstance ( data, ( bytes, bytearray ) ) : self. clear ( ) raise gostciphererror ('invalid plaintext data') data = set _ padding ( data, self. block _ size, self. _ pad _ mode ) result = bytearray ( ) for i in range ( get _ num _ block ( data, self. block _... | [
-0.4558306336402893,
0.8380662798881531,
0.7803402543067932,
0.18416336178779602,
0.021473443135619164,
-0.26425209641456604,
0.8124160766601562,
-0.9003434181213379,
0.4432390630245209,
0.3063906729221344,
-1.0425357818603516,
0.16670095920562744,
-1.408394694328308,
0.29045554995536804,
... |
def _ _ init _ _ ( self, app : qapplication, oauth _ token : str, parent : qmainwindow, project _ id : int ) : super ( ). _ _ init _ _ ( ) self. app = app self. token = oauth _ token self. parent = parent self. project _ id = project _ id self. initfig ( self. project _ id ) self. initindex ( ) self. initui ( ) | [
1.265155553817749,
0.16626790165901184,
0.4622352123260498,
0.4648398756980896,
-0.25145062804222107,
0.5596499443054199,
-0.9046006798744202,
-0.044394947588443756,
-0.3469083309173584,
-0.5222989916801453,
-0.002045032102614641,
0.3978891670703888,
0.1597573161125183,
0.7620681524276733,... |
def calculate _ fan _ in _ and _ fan _ out ( shape ) : dimensions = len ( shape ) if dimensions < 2 : raise valueerror ( " fan in and fan out can not be computed for tensor with fewer than 2 dimensions " ) if dimensions = = 2 : fan _ in = shape [ 1 ] fan _ out = shape [ 0 ] else : num _ input _ fmaps = shape [ 1 ] num ... | [
-0.1574922651052475,
-0.2512415051460266,
0.6264613270759583,
-0.13990211486816406,
-0.7304849624633789,
-0.23228025436401367,
1.454573154449463,
0.1925347000360489,
0.053144052624702454,
-0.3050583600997925,
-0.9399057626724243,
0.29644709825515747,
0.0012840059353038669,
0.31623312830924... |
def set _ db _ version ( self, db ) : cursor = db. cursor ( ) latest _ version = self. get _ expected _ db _ version ( ) was _ upgrade = ( self. get _ db _ version ( db ) > 0 ) if was _ upgrade : self. _ update _ version _ number ( cursor, latest _ version ) else : self. _ insert _ version _ number ( cursor, latest _ v... | [
-0.9260746240615845,
0.37353232502937317,
0.4975581169128418,
1.0412392616271973,
0.579369843006134,
0.540769100189209,
0.25866279006004333,
0.6428920030593872,
0.6711142659187317,
0.9340586066246033,
-0.9298021793365479,
-0.3637733459472656,
-0.44223690032958984,
1.1836187839508057,
0.3... |
def make _ initializer ( hyper ) : initializer = hyper. initializer _ cls ( * * hyper. initializer _ params ) return initializer | [
0.5337448120117188,
-0.7202042937278748,
0.01903659664094448,
0.8668464422225952,
-0.335334837436676,
0.15027113258838654,
-0.3875824809074402,
0.7505643963813782,
0.019843678921461105,
-1.280612587928772,
-0.553827166557312,
0.189089834690094,
0.008219314739108086,
0.27838948369026184,
... |
def lazy ( self ) - > " lazyframe " : from polars. lazy import wrap _ ldf return wrap _ ldf ( self. _ df. lazy ( ) ) | [
-0.23647348582744598,
-0.1770302653312683,
0.3276155889034271,
-1.3101288080215454,
0.16060180962085724,
0.010161986574530602,
-0.24511975049972534,
-0.903292179107666,
0.5209101438522339,
-1.758744239807129,
0.3020026981830597,
0.965899646282196,
-0.20418648421764374,
-0.8375816345214844,... |
def get _ data ( username, scoring _ option ) : # create selenium driver used to parse html options = webdriver. chromeoptions ( ) options. add _ argument ('headless') driver = webdriver. chrome ( c. driver _ path, options = options ) driver. set _ page _ load _ timeout ( 10 ) # based on the scoring option, get the fan... | [
-0.6254968047142029,
1.0764089822769165,
0.812080442905426,
0.6078951358795166,
1.0859454870224,
0.3891809284687042,
0.7427536249160767,
0.7509689331054688,
0.11241582781076431,
0.04755084216594696,
0.03445742279291153,
-0.37605446577072144,
0.03871564194560051,
0.36782267689704895,
0.59... |
def producemovablequery ( self ) : return parse _ input ('fact : ( movable? piece? initx? inity? targetx? targety )') | [
-0.07265952974557877,
-0.39100369811058044,
0.28437861800193787,
0.1912986785173416,
-0.574458122253418,
0.3138885200023651,
-0.23536770045757294,
-0.4673815071582794,
-0.38105058670043945,
-0.4840313792228699,
0.5541402101516724,
0.27043938636779785,
-0.7151695489883423,
-0.90170466899871... |
def save _ summoners ( self, summoners, region ) : values = [ ] for summoner in summoners : val _ list = [ ] # append all values in order. val _ list. append ( summoner ['id'] ) val _ list. append ('\'{ } \''. format ( summoner ['name'] ) ) val _ list. append ( summoner ['summonerlevel'] ) val _ list. append ( summoner... | [
-0.40321478247642517,
0.12524709105491638,
0.41768911480903625,
-0.12692105770111084,
0.4900280237197876,
0.1377400904893875,
-0.87347412109375,
0.27377238869667053,
-0.5924075841903687,
0.3629774749279022,
-1.5539467334747314,
-0.4270023703575134,
-0.5394235253334045,
0.7417638897895813,
... |
def durations _ by _ quarters ( self, bootstrap = false, n _ iter = 200, removetreatment = false ) : self. in _ boot = false def inf _ durations ( x ) : " " " only add minimum _ duration if not treated and set hard burnin " " " cid = x. cohortid. unique ( ) [ 0 ] if self. in _ boot : cid = self. bootstrap _ id _ dates ... | [
-0.006397424731403589,
-0.02079649828374386,
0.8741835355758667,
-0.08369211107492447,
-0.33031970262527466,
0.09132851660251617,
-0.3005334734916687,
-0.32164904475212097,
0.046303652226924896,
0.34796732664108276,
0.20654296875,
0.21242831647396088,
0.17035333812236786,
0.800980508327484... |
def forward _ rnn ( self, inputs, state, seq _ lens ) : raise notimplementederror ( " you must implement this for a rnn model " ) | [
-0.6905616521835327,
-0.16364043951034546,
0.40498271584510803,
0.4141499400138855,
0.44971001148223877,
0.5179142355918884,
0.23917850852012634,
0.3770051896572113,
0.5225638151168823,
-0.21888603270053864,
-0.37995779514312744,
-0.15305133163928986,
0.6004865169525146,
0.1997157782316208... |
def path ( file ) : return path ( _ _ file _ _ ). parent /'assets'/ file | [
0.9150417447090149,
-0.2604987919330597,
0.36130398511886597,
-0.10952715575695038,
-0.5988346934318542,
1.4079725742340088,
2.0558152198791504,
-0.8845752477645874,
-1.1705048084259033,
-0.0032267465721815825,
0.9927056431770325,
-0.24234655499458313,
0.46020740270614624,
0.38989397883415... |
def test _ 400 _ update _ task _ not _ new ( self ) : self. task. status = task. status. closed self. task. save ( ) self. url = reverse ( " tasks : update _ task ", kwargs = { " pk " : self. task. pk } ) response = self. client. post ( self. url, { } ) self. assertequal ( response. status _ code, 400 ) | [
-0.7426550388336182,
0.36260268092155457,
0.660775899887085,
0.7016412615776062,
0.29957592487335205,
1.5091228485107422,
-0.23944926261901855,
-0.20799490809440613,
-0.23955614864826202,
0.1726154237985611,
-1.1164700984954834,
0.03417295590043068,
-0.33378687500953674,
1.2404922246932983... |
def compose ( f, g ) : res = f. copy ( ) res. compose ( g ) res. minimize ( ) return res | [
-0.3395118713378906,
-0.04717763885855675,
0.3017290532588959,
1.2807317972183228,
-0.14831945300102234,
-1.0827579498291016,
0.2674088776111603,
0.14984171092510223,
-0.4834420382976532,
0.12743957340717316,
0.1275424212217331,
-0.23428143560886383,
0.24934585392475128,
-0.846794247627258... |
def test _ noun _ randominput _ verb ( self ) : cc = self. setup ( ) create = cc. create _ sentence res1 = create ('noun luik3d3 jarv verb!? @') self. assertequal ( res1,'koer luik3d3 jarv soob!? @') | [
0.0038451950531452894,
-0.44631215929985046,
0.2040625661611557,
0.6351731419563293,
0.6364763975143433,
0.6585292220115662,
-0.2908114194869995,
-0.43357399106025696,
0.5547004342079163,
-0.5640347003936768,
-0.6271165013313293,
-0.19094781577587128,
-0.9103413820266724,
0.369266718626022... |
def receive ( self, caster, receiver ) : attack = random. randint ( caster. attack _ min, caster. attack _ max ) defence = receiver. defence if self. getid ( ) = = 3 : damage = attack + 10 receiver. receivedamage ( caster. id, globaldefine. source _ type _ ability, self. getid ( ), self. getschool ( ), - damage ) | [
-0.43799400329589844,
-0.3326168656349182,
0.5822732448577881,
-0.9276057481765747,
0.4844687581062317,
-0.29179713129997253,
-0.1464308798313141,
0.41900187730789185,
1.2745740413665771,
0.19887284934520721,
-0.8737179040908813,
0.6262347102165222,
-0.15147367119789124,
0.0235419478267431... |
def bmi ( bot, trigger ) : weight, weightunit, height, heightunit = trigger. groups ( ) [ 1 : 5 ] print ( trigger. groups ( ) ) print ( weight ) print ( float ( weight ) ) if weightunit. startswith ( " lb " ) : weight = float ( weight ) / lbs _ per _ kg elif weightunit. startswith ( " kg " ) : weight = float ( weight )... | [
-0.09209688007831573,
-0.6693813800811768,
0.9646545648574829,
0.14194360375404358,
0.29341623187065125,
-0.4678723216056824,
-0.10369635373353958,
-0.38966503739356995,
0.020169900730252266,
-0.323718398809433,
-0.07629214227199554,
0.6573061347007751,
-0.8353039026260376,
-0.355178862810... |
def update _ deep ( d, u ) : for k, v in u. items ( ) : # this condition handles the problem if not isinstance ( d, mapping ) : d = u elif isinstance ( v, mapping ) : r = update _ deep ( d. get ( k, { } ), v ) d [ k ] = r else : d [ k ] = u [ k ] return d | [
-1.0104519128799438,
0.49748027324676514,
0.8458666801452637,
0.28693652153015137,
-1.1495792865753174,
0.6467569470405579,
-0.21168963611125946,
0.9082346558570862,
0.2860286235809326,
-0.479305624961853,
0.5012480616569519,
0.825093150138855,
-0.0790976732969284,
0.2081107199192047,
-0... |
def checklist ( self, checklist ) : raise notimplementederror | [
-0.937183141708374,
-0.3799765408039093,
0.3109692335128784,
1.2982960939407349,
0.8185766935348511,
1.3886923789978027,
0.4374595880508423,
0.6767216920852661,
0.3255626857280731,
0.6137983798980713,
-1.1870043277740479,
-0.3704245388507843,
0.21080295741558075,
1.3272432088851929,
-1.6... |
def _ parse _ index ( self, head ) : def align ( ) : nonlocal offset tmp = offset % 4 offset + = 0 if tmp = = 0 else 4 - tmp int = namedstruct ('int ', self. _ fmt _ strct ('i'),'val') short = namedstruct ('short ', self. _ fmt _ strct ('h'),'val') blendstructfielddna = namedstruct. from _ namedtuple ( blenderfile. ble... | [
-0.6485298871994019,
-0.33377325534820557,
0.9402652978897095,
-0.5270554423332214,
-0.030215825885534286,
-0.001653339364565909,
0.5470144152641296,
-0.3902621269226074,
-0.5831385850906372,
-0.09240438789129257,
-0.5834195613861084,
0.45015576481819153,
-0.6962096095085144,
-0.1266583055... |
def load _ labels ( data _ dir ) : # list of csvs in the directory list _ csv = glob. glob ( data _ dir +'/ * - circuit / *. csv') # reaaing first csv df = pd. read _ csv ( list _ csv [ 0 ], header = none, names = names, index _ col = 2 ) # assuming first csv has all appliances labels = list ( df. circuitname. unique (... | [
-0.8795211315155029,
-0.24075134098529816,
0.5004264712333679,
-0.9643596410751343,
0.44249218702316284,
-0.2854650318622589,
-0.5652129650115967,
0.3440426290035248,
0.1668342649936676,
0.6322489380836487,
-0.25432920455932617,
0.39254230260849,
0.07570785284042358,
0.33900579810142517,
... |
def ensure _ config ( ) : subprocess. check _ output ( ['git ','config ','user. email'] ) | [
0.8949416875839233,
0.7673791646957397,
0.1444179117679596,
0.35217607021331787,
0.26566123962402344,
0.6895846724510193,
-0.09756646305322647,
0.16258372366428375,
-0.9387000799179077,
0.3750481903553009,
-0.22753624618053436,
0.5477532744407654,
-0.20737425982952118,
0.18483193218708038,... |
def add _ neighbour ( self, neighbour ) : self. neighbours. add ( neighbour ) | [
-0.8001174926757812,
-0.25653520226478577,
0.352634072303772,
0.29753145575523376,
-0.2845226526260376,
0.7094992399215698,
-1.0038776397705078,
-0.10028377175331116,
-0.10632315278053284,
-1.175374984741211,
-0.7448250651359558,
0.5637611746788025,
-1.2144923210144043,
0.522042453289032,
... |
def vpnvserver _ vpnepaprofile _ bindings ( self ) : try : return self. _ vpnvserver _ vpnepaprofile _ binding except exception as e : raise e | [
-0.7174564003944397,
0.05571982264518738,
0.4200924038887024,
1.100731611251831,
-0.33018794655799866,
1.2591193914413452,
0.4322879910469055,
-0.6342594623565674,
1.0123521089553833,
0.5257395505905151,
-1.5406755208969116,
-0.2204608917236328,
-1.2443112134933472,
0.23534823954105377,
... |
def post _ order ( self, node ) : if node is none or node = = float ('inf') : return else : left, right = self. _ nodes [ node ] [ 0 : 2 ] for i in self. post _ order ( left ) : yield i for i in self. post _ order ( right ) : yield i yield node | [
-0.6074722409248352,
0.14705994725227356,
0.7854837775230408,
0.13519178330898285,
-1.009405255317688,
-0.41341304779052734,
-0.13425250351428986,
-0.6163456439971924,
-0.5507274866104126,
0.004236165899783373,
-0.782979428768158,
-0.37756291031837463,
-0.37229806184768677,
0.7005464434623... |
def bssc _ init _ grafana _ up ( self, log ) : if not self. bssc _ is _ up ( log ) : self. bssc _ running _ grafana = - 1 return self. bssc _ running _ grafana = \ self. bssc _ server. bes _ grafana _ running ( log ) if self. bssc _ running _ grafana < 0 : self. bssc _ failed = true | [
-0.7630755305290222,
-0.2671806514263153,
0.7623143196105957,
1.0812779664993286,
0.7342846989631653,
-0.34231701493263245,
0.49129465222358704,
-0.3412328064441681,
-0.3685518801212311,
-0.20086969435214996,
-0.08979898691177368,
1.194424033164978,
0.0542852021753788,
-0.05593712255358696... |
def _ parts _ of _ line ( cls, line ) : path, line _ number, column _ number, id, description = cls. flake8 _ re. match ( line ). groups ( ) match = cls. count _ re. search ( description ) count = match. group ( 1 ) if match else none return path, int ( line _ number ), int ( column _ number ), id, description, none if... | [
0.0948546975851059,
-0.08462163805961609,
0.5440475344657898,
-0.023458588868379593,
0.7062054872512817,
-1.0862553119659424,
0.25675326585769653,
-0.2187090963125229,
-0.5971373319625854,
-0.8137385249137878,
-0.5119753479957581,
-0.9495527148246765,
0.016679294407367706,
-0.2520248591899... |
def richness ( row, rarefy = 0, count = false ) : if count : return sum ( row > 0 ) row _ sum, r = sum ( row ), 0 for val in row : prob _ success = val / row _ sum prob _ fail = 1 - prob _ success prob _ detect = 1 - ( prob _ fail * * rarefy ) if val and rarefy < = 0 : r + = 1 else : r + = prob _ detect return int ( r ... | [
0.03120436891913414,
0.5940674543380737,
0.4647485613822937,
0.9655426740646362,
0.4264192581176758,
-0.37121471762657166,
0.3584632873535156,
0.25360846519470215,
0.737561047077179,
0.04938605800271034,
-0.0010277841938659549,
0.3158307373523712,
-0.3472103476524353,
0.6858288645744324,
... |
def _ add _ labels ( self ) : text = str ( self. _ view. input _ le. text ( ) ). upper ( ) if self. _ input _ is _ valid ( text ) : self. labels. append ( text ) self. _ view. set _ listbox ( self. labels ) | [
-0.693492591381073,
-0.127610981464386,
0.4818699359893799,
-0.8883318305015564,
-0.3838784396648407,
0.8915810585021973,
-0.7395699620246887,
-0.08681508153676987,
0.7434119582176208,
-0.5766606330871582,
0.1304013431072235,
-0.1296001523733139,
-0.4297500252723694,
0.42466315627098083,
... |
def test _ null _ converter _ from _ uniform ( null _ converter ) : d = np. arange ( 10 ) d _ out, log _ j = nulldistanceconverter. from _ uniform _ parameter ( null _ converter, d ) np. testing. assert _ array _ equal ( d _ out, d ) np. testing. assert _ equal ( log _ j, 0 ) | [
-0.4753362238407135,
-0.45511743426322937,
0.28112462162971497,
-0.34625449776649475,
0.6666615009307861,
0.1962094008922577,
0.0029412382282316685,
0.040131859481334686,
1.0194380283355713,
-0.4493201673030853,
-0.8228557109832764,
0.4766947627067566,
0.46566241979599,
0.8563502430915833,... |
def bond _ check ( distance _ 12, minimum, maximum ) : if distance _ 12 > minimum and distance _ 12 < maximum : return true else : return false | [
0.03367314487695694,
-0.6628872156143188,
0.7799605131149292,
0.12447935342788696,
-0.45181599259376526,
1.8602968454360962,
-1.7825835943222046,
-0.03769143298268318,
-0.5950766801834106,
-0.4732065796852112,
-0.05573693662881851,
0.26561859250068665,
-1.0040518045425415,
-0.9535130858421... |
def verify _ login ( self, symbol ) : if self. cump = = self. cp : self. override _ signal = " y " self. led. logged _ in ( ) else : self. override _ signal = " n " self. led. flash _ all _ leds ( 0. 5 ) | [
-0.4522000253200531,
0.21192023158073425,
0.3204537630081177,
1.415999412536621,
0.4140675961971283,
0.023941829800605774,
1.3092373609542847,
-0.7111143469810486,
1.1134470701217651,
-0.7291885018348694,
-1.20317804813385,
0.3888475000858307,
-0.40884560346603394,
0.5607617497444153,
0.... |
def vpnvserver _ auditnslogpolicy _ bindings ( self ) : try : return self. _ vpnvserver _ auditnslogpolicy _ binding except exception as e : raise e | [
0.3209947347640991,
-0.11847338080406189,
0.27145060896873474,
0.8266353011131287,
-0.5919158458709717,
1.151678442955017,
-0.1847570687532425,
-0.801130473613739,
1.5400094985961914,
0.07677140086889267,
-0.52776700258255,
1.4275778532028198,
-0.3588744103908539,
0.057849884033203125,
0... |
def read _ qdmr _ json _ to _ examples ( qdmr _ json : str ) - > list [ qdmrexample ] : qdmr _ examples = [ ] with open ( qdmr _ json,'r') as f : dataset = json. load ( f ) for q _ decomp in dataset : qdmr _ example = qdmrexample ( q _ decomp ) qdmr _ examples. append ( qdmr _ example ) return qdmr _ examples | [
-0.546704113483429,
-0.4189007878303528,
0.29969337582588196,
-1.368652582168579,
-0.842666506767273,
0.061114661395549774,
-0.7951741814613342,
-0.13618618249893188,
0.6994457840919495,
0.733181357383728,
-0.40355420112609863,
0.28842175006866455,
0.18777893483638763,
0.9208000898361206,
... |
def _ _ init _ _ ( self, min _ retool _ version : str ='2. 00 ', categories : list [ dict [ str, any ] ] = [ ], mias : list [ str ] = [ ], overrides : list [ dict [ str, str | dict [ str, str | list [ str ] ] ] ] = [ ], removes : list [ dict [ str, str ] ] = [ ], variants : list [ dict [ str, any ] ] = [ ] ) : self. mi... | [
-0.001960928551852703,
-0.3391054570674896,
0.42271313071250916,
-0.5536746978759766,
-0.6097806096076965,
-0.45374375581741333,
-0.737298309803009,
-0.16607946157455444,
-0.1131788045167923,
-0.49010080099105835,
-1.2210726737976074,
0.03724205866456032,
0.31541064381599426,
-0.3474586009... |
def search ( self, data ) : curr = self. root while curr : if curr. data = = data : return curr elif data < curr. data : curr = curr. left elif data > curr. data : curr = curr. right | [
0.0826861634850502,
-0.09129058569669724,
0.62169349193573,
-0.0659211203455925,
-1.1924949884414673,
0.5286739468574524,
-0.23574040830135345,
-1.027323842048645,
0.18724091351032257,
-0.5221874117851257,
0.33484166860580444,
0.9030600786209106,
-1.4055511951446533,
0.7616461515426636,
... |
def load ( self ) : pickle _ file ='mfpt. pickle'if os. path. isfile ( pickle _ file ) : with open ( pickle _ file,'rb') as handle : acquisitions = pickle. load ( handle ) else : self. download ( ) acquisitions = self. acquisitions ( ) with open ( pickle _ file,'wb') as handle : pickle. dump ( acquisitions, handle, pro... | [
0.3228752017021179,
-0.9963412880897522,
0.7039816379547119,
0.17742830514907837,
0.11036748439073563,
-0.33360013365745544,
-0.6174426674842834,
-0.10346288979053497,
0.3829323649406433,
-0.230191171169281,
0.347059041261673,
-0.8129855990409851,
0.28645068407058716,
0.16088524460792542,
... |
def convert _ nestedexpr _ to _ tuple ( nested _ expression ) : new _ nested = [ ] for i, argument in enumerate ( nested _ expression ) : if i = = 0 : new _ nested. append ( argument ) else : if isinstance ( argument, list ) : tupled _ nested = convert _ nestedexpr _ to _ tuple ( argument ) new _ nested. append ( tuple... | [
-1.0298523902893066,
-0.3222632110118866,
0.8091108798980713,
0.9080756306648254,
0.6420102119445801,
-0.015788279473781586,
-0.06435026973485947,
1.1011080741882324,
-0.27473506331443787,
0.21714481711387634,
-0.800419270992279,
-0.08596040308475494,
-1.0347100496292114,
0.597507774829864... |
def build _ edf _ fr _ vals ( data ) : from statsmodels. distributions. empirical _ distribution import ecdf cdf = ecdf ( data ) return cdf. x, cdf. y | [
-0.43435269594192505,
-0.26672032475471497,
0.05370091274380684,
-0.7333878874778748,
0.5357474684715271,
0.16175732016563416,
-0.07567662000656128,
0.17547740042209625,
-0.5594988465309143,
-0.8595073819160461,
-0.3690083920955658,
0.10366431623697281,
0.7918215990066528,
0.28552800416946... |
def select _ action ( self, state, h _ t = none, epsilon = 0. 1 ) : sample = random. random ( ) if sample > epsilon : with torch. no _ grad ( ) : # max ( 1 ) returns largest col value of each row. the second col # on the max result is index of max element # # i. e., pick greedily q, h _ t = self. forward ( state, h _ t... | [
-0.3048919141292572,
-0.7305020689964294,
0.4618498980998993,
0.38481369614601135,
0.49846670031547546,
-0.1730223149061203,
0.2878590226173401,
-0.0493551567196846,
0.3102553188800812,
0.07316210120916367,
-0.23025362193584442,
-0.024040812626481056,
0.9374008178710938,
-0.129615187644958... |
def grib2dp ( ) : shutil. copy ( _ grib2dp + " / grbconv. x ", _ pathregional + " / grbconv. x " ) shutil. copy ( _ grib2dp + " / grib2dp. x ", _ pathregional + " / grib2dp. x " ) shutil. copy ( _ grib2dp + " / prep _ in ", _ pathregional + " / prep _ in " ) try : print " running grib2dp. x... " os. chdir ( _ pathregio... | [
-0.4178580045700073,
-0.7744627594947815,
1.0209839344024658,
0.29358404874801636,
0.05001594498753548,
1.1901849508285522,
0.6704621315002441,
0.06388302147388458,
-0.22096818685531616,
0.488901287317276,
0.12624825537204742,
0.9879653453826904,
0.3244653344154358,
-0.39827245473861694,
... |
def to _ rdf _ graph ( msdf : mappingsetdataframe ) - > graph : doc = to _ mapping _ set _ document ( msdf ) # cntxt = prepare _ context ( doc. prefix _ map ) # rdflib _ dumper. dump ( # element = doc. mapping _ set, # schemaview = schemaview ( os. path. join ( os. getcwd ( ), " schema / sssom. yaml " ) ), # prefix _ m... | [
-0.20687198638916016,
0.32481586933135986,
0.3738901913166046,
-0.8775314092636108,
-1.1562604904174805,
-0.019397053867578506,
0.20196543633937836,
0.288406640291214,
1.217983603477478,
0.10750513523817062,
-0.14812621474266052,
0.34338733553886414,
0.48022007942199707,
-0.495608776807785... |
def calculatevi ( a, b ) : # import pdb ; pdb. set _ trace ( ) assert sum ( [ len ( roi ) for roi in a ] ) = = sum ( [ len ( roi ) for roi in b ] ),'parcellations a and b contain different numbers of nodes!!!'n = float ( sum ( [ len ( roi ) for roi in a ] ) ) ha = - 1 * sum ( [ len ( roi ) / n * np. log2 ( len ( roi ) ... | [
0.7270815372467041,
-0.18799978494644165,
0.9147889614105225,
-0.5322883725166321,
-0.16721004247665405,
-0.30899909138679504,
0.3436736762523651,
0.09043741226196289,
0.16404877603054047,
0.8002437949180603,
0.35716208815574646,
-0.06084152311086655,
-0.7386723756790161,
-1.20363903045654... |
def teardown ( self ) : self. ssx. close ( ) self. ns5gt. close ( ) self. ether _ linux. close ( ) | [
-0.3505115509033203,
-0.15965580940246582,
0.15290567278862,
-0.04184266924858093,
-0.1575099229812622,
1.1197760105133057,
0.5936487913131714,
-0.7572408318519592,
-0.13766975700855255,
-0.5782791972160339,
-0.03045816533267498,
-0.11069125682115555,
-0.46452704071998596,
0.83138149976730... |
def make _ text _ chunk ( type = " text ", key = " comment ", value = " ", compression _ flag = 0, compression _ method = 0, lang = " ", translated _ key = " " ) : # pylint : disable = redefined - builtin if type = = " text " : data = key. encode ( " latin - 1 " ) + b " \ 0 " + value. encode ( " latin - 1 " ) elif type... | [
0.26883503794670105,
0.11743877828121185,
0.631721019744873,
-0.30030328035354614,
-0.9498395323753357,
0.20278778672218323,
-0.4587430953979492,
-0.10563604533672333,
-0.5022100806236267,
-0.05003810301423073,
0.43831080198287964,
0.2508363723754883,
-0.3695449233055115,
-0.19733609259128... |
def viz _ decoded ( encoder, decoder, data ) : num _ samples = 10 figure = np. zeros ( ( image _ width * num _ samples, image _ height * num _ samples, num _ channels ) ) grid _ x = np. linspace ( - 8, 8, num _ samples ) grid _ y = np. linspace ( - 8, 8, num _ samples ) [ : : - 1 ] for i, yi in enumerate ( grid _ y ) :... | [
0.13564395904541016,
0.20512178540229797,
0.8838021159172058,
-0.2281866818666458,
-1.4715654850006104,
-0.43306127190589905,
0.6828221678733826,
0.30974850058555603,
0.30460691452026367,
-0.3179495334625244,
0.48415035009384155,
1.1731557846069336,
0.9472915530204773,
0.46496641635894775,... |
def left ( dimension, position ) : if position [ 0 ] = = 1 : return none return position [ 0 ] - 1, position [ 1 ] | [
0.38890400528907776,
-0.28915295004844666,
0.4904867708683014,
0.03419465571641922,
-0.17982205748558044,
-0.10603677481412888,
-0.7029396295547485,
-0.874592661857605,
0.08171353489160538,
0.8684159517288208,
-0.588553786277771,
-0.17629235982894897,
-0.9220090508460999,
0.378540217876434... |
def get _ node _ leaves ( self, node _ path, include _ subnodes = false, order _ by = " name " ) : brains = [ ] if self. load _ leaves : node _ tree = self. trees [ node _ path ] leaves = node _ tree. all _ leaves if include _ subnodes else node _ tree. leaves brains = self. _ get _ sorted _ brains ( leaves, order _ by... | [
0.23603422939777374,
0.21454821527004242,
0.7084189057350159,
0.4714769721031189,
-0.30759090185165405,
0.17847557365894318,
-0.22952860593795776,
-0.15760968625545502,
0.173884317278862,
0.13883772492408752,
0.4308997392654419,
0.7282285094261169,
-0.33770859241485596,
0.2483672946691513,... |
def modified _ merge ( self, a, start, mid, end ) - > int : num _ of _ inv = 0 len _ subarray1 = mid - start + 1 len _ subarray2 = end - mid left _ subarray = [ ] # left sorted array. right _ subarray = [ ] # right sorted array. for i in range ( len _ subarray1 ) : left _ subarray. append ( a [ start + i ] ) for i in r... | [
-0.13526086509227753,
0.31241896748542786,
1.2029248476028442,
-0.30507129430770874,
-0.8724242448806763,
-0.6382986307144165,
0.36993858218193054,
0.5819663405418396,
-0.15619030594825745,
0.16508576273918152,
-0.5034505724906921,
0.6964075565338135,
-0.9332531094551086,
0.490169078111648... |
def _ data _ specs ( self ) : ctg _ cnt = self. data _ provider. categ _ len ( ) x _ space = conv2dspace ( shape = self. shape, num _ channels = self. channels _ len ( ), axes = self. axes ) x _ source ='features'if ctg _ cnt = = 0 : space = x _ space source = x _ source else : y _ space = indexspace ( dim = 1, max _ l... | [
-0.45743897557258606,
0.11476601660251617,
0.4185870587825775,
-1.2696024179458618,
0.06628101319074631,
-0.2823927104473114,
0.006061607971787453,
0.343559592962265,
0.4665261209011078,
-0.7251889109611511,
-0.023640409111976624,
0.5211260318756104,
1.1756362915039062,
0.4474891424179077,... |
def _ find _ path ( src, dst, dscp ) : print'finding path between % s and % s for dscp = % s'% ( src, dst, dscp ) return [ ( _ switches [ switch [ 0 ] ], switch [ 1 ] ) for switch in _ dijkstra ( _ network, src, dst, _ dscps [ str ( dscp ) ] ) if not re. match ('( \ d + \ \. ) { 3 } \ d + ', switch [ 0 ] ) ] | [
-1.1125826835632324,
0.20899711549282074,
0.4531345069408417,
-0.08894068747758865,
-0.5499418377876282,
0.10510023683309555,
0.1998959332704544,
-0.4362850785255432,
-0.260214626789093,
0.1814548820257187,
-0.11649549007415771,
-0.7163462042808533,
-0.4429510235786438,
-0.2915486395359039... |
def getbinderqueuelength ( ) : return ezidapp. models. async _ queue. binderqueue. objects. count ( ) | [
-0.21943743526935577,
-1.071259617805481,
0.4405520260334015,
0.053133413195610046,
0.2882966995239258,
0.5046352744102478,
-0.14250212907791138,
0.9705476760864258,
-0.23279473185539246,
0.04363998770713806,
-1.0460504293441772,
-0.3530188500881195,
0.1009729653596878,
1.5499764680862427,... |
def get _ query ( self, search _ term ) : site _ types = ['news'] webhose. config ( token ='d72a236b - f6d9 - 4c52 - b2d1 - cceb9734579a') q = webhose. query ( ) q. _ _ setattr _ _ ('body _ text ', search _ term ) q. _ _ setattr _ _ ('language ', " english " ) q. _ _ setattr _ _ ('site _ type ', site _ types ) print q.... | [
0.48943600058555603,
-0.10251608490943909,
0.39416489005088806,
-0.07884654402732849,
-0.5257173776626587,
0.11447922885417938,
-0.6639031171798706,
0.0065271686762571335,
-0.4190267026424408,
-0.4453350305557251,
-0.2673729956150055,
0.4975711405277252,
-0.9448198080062866,
0.706287264823... |
def twinkle _ leds ( self ) : self. led. twinkle _ all _ leds ( ) | [
-0.2812190651893616,
0.055731456726789474,
0.16642312705516815,
0.10946641862392426,
-0.1388426572084427,
0.39567792415618896,
0.48954322934150696,
0.2141902595758438,
0.6713032722473145,
-0.18021950125694275,
-0.6212116479873657,
1.7011802196502686,
-1.0570181608200073,
2.1939170360565186... |
def keys ( self ) : # - > tuple [ any ] | tuple [ tuple [ any, any ],... ] :... | [
-1.691088080406189,
0.8088803291320801,
0.504245400428772,
0.32263270020484924,
0.5873056650161743,
-0.31314635276794434,
-0.11047569662332535,
0.03650236129760742,
-0.7698890566825867,
0.08924846351146698,
-0.9547411799430847,
-0.542013943195343,
-0.4430016279220581,
-0.14751240611076355,... |
def _ _ eq _ _ ( self, other ) : return self. _ name = = other. kind | [
-0.013469628989696503,
-1.1016510725021362,
0.70759117603302,
0.03841709718108177,
0.32141268253326416,
0.620219886302948,
-0.43739184737205505,
-1.7112977504730225,
0.37783217430114746,
-0.15368889272212982,
-0.8056829571723938,
0.9652565121650696,
0.05874265357851982,
0.07668139785528183... |
def register _ target ( self, target : callable, events : union [ fileevent, list ] = none, tag = none ) - > bool : if not callable ( target ) : raise typeerror ( " argument'target'was not callable " ) if tag is none : tag = getattr ( target,'_ _ name _ _ ','< unknown >') # convert events to list if 0 or 1 event was pa... | [
-1.241274356842041,
0.27542126178741455,
0.7188317179679871,
-0.025675121694803238,
0.7543521523475647,
-0.16585294902324677,
-0.21453998982906342,
0.23384545743465424,
-0.6627478003501892,
-0.07196703553199768,
0.29772546887397766,
0.04756559431552887,
-0.22263728082180023,
0.527716517448... |
def scia _ orbit _ range ( string ) - > list : res = [ int ( str ) for str in string. split ( ',') ] if len ( res ) > 2 : msg ='% r is not a orbit number or range'% string raise argparse. argumenttypeerror ( msg ) if len ( res ) = = 2 and res [ 0 ] > res [ 1 ] : res. sort ( ) return res | [
-1.0038726329803467,
-0.7606521844863892,
0.2930493652820587,
-0.06102171912789345,
0.023667894303798676,
0.3624207377433777,
-0.45965129137039185,
0.2129320651292801,
0.08512797206640244,
0.7412136197090149,
0.2514689266681671,
0.4916771352291107,
-0.9796715974807739,
-0.1947057843208313,... |
def login ( ) : response = { " vs " : none } if'token'in request. form and'source'in request. form : token = request. form ['token'] source = request. form ['source'] user _ info, error = verify _ google _ login ( token ) if user _ info : if source = = " google " : user _ id = add _ login _ source _ in _ user _ id ( us... | [
-0.6400114893913269,
-0.0697503536939621,
0.5157325267791748,
0.4002510905265808,
-0.07278084754943848,
0.4400395452976227,
0.00907345674932003,
-0.48611870408058167,
0.8956613540649414,
-0.19496408104896545,
-1.1767849922180176,
0.46339285373687744,
-0.03570082038640976,
0.324133872985839... |
def ignore _ ploomber _ stats _ enabled _ env _ var ( monkeypatch ) : if " ploomber _ stats _ enabled " in os. environ : monkeypatch. delenv ( " ploomber _ stats _ enabled ", raising = true ) | [
0.9108512997627258,
-0.11817452311515808,
0.5130449533462524,
0.729841411113739,
-0.48487573862075806,
1.867542028427124,
0.46622011065483093,
-0.08864874392747879,
0.5640671849250793,
0.05283128842711449,
-0.7389915585517883,
0.0019569278229027987,
-1.463309645652771,
0.9881116151809692,
... |
def glget ( what, which = none ) : global _ _ root import re # ( type = rx / tx ) ( name ) ( id ) remsg = re. compile ( r'( \ w + ) \ s * = \ s * ( \ w + ) \ s * \ ( \ s * ( \ w + ) \ s * \ )') if ( which! = none and which = ='signalrefs') : # what is a pdu = [ name, id, bus ] rlist = [ ] for sig in _ _ root. find ('si... | [
-0.16390150785446167,
-0.11467425525188446,
0.9460475444793701,
0.06504569202661514,
0.14009016752243042,
-0.3424999415874481,
0.0742400735616684,
-0.5612671375274658,
-0.4316467344760895,
0.3601283133029938,
-0.2960602939128876,
0.23731568455696106,
-1.856452226638794,
0.7745922207832336,... |
def _ crear _ geometria _ gee ( self, reproject = true ) : if reproject = = true : wgs84 = pyproj. proj ( " + init = epsg : 4326 " ) modis = pyproj. proj ( " + proj = sinu + lon _ 0 = 0 + x _ 0 = 0 + y _ 0 = 0 + a = 6371007. 181 + b = 6371007. 181 + units = m + no _ defs " ) lat, lon = pyproj. transform ( modis, wgs84,... | [
-0.049111101776361465,
0.05235103517770767,
0.7355068922042847,
-0.4273624122142792,
0.7161418199539185,
0.6277912259101868,
-0.6782225966453552,
0.32668372988700867,
0.14915038645267487,
0.07228425145149231,
0.45951974391937256,
0.12970641255378723,
-0.39288240671157837,
0.079892136156558... |
def sum _ naturals ( n ) : total, k = 0, 1 while k < = n : total, k = total + k, k + 1 return total | [
-0.814360499382019,
0.888751745223999,
0.08832725137472153,
-0.0316816121339798,
-0.1667490452528,
0.1830279678106308,
-0.3334069848060608,
-1.0027973651885986,
-0.5424616932868958,
-0.20338857173919678,
-1.070840835571289,
0.06954403221607208,
0.19715966284275055,
-0.16956773400306702,
... |
def parse ( self ) : # available parsers ordered by priority parsers = [ regexparser ( x ['class'], x ['definition'] ) for x in regex _ tokens ] errors = [ ] for c in self. line : for parser in parsers [ : ] : try : parser. handle _ token ( c ) except exception as e : parsers. remove ( parser ) errors. append ( e ) par... | [
0.3106512129306793,
-0.5311779379844666,
0.8149146437644958,
0.198919877409935,
0.7275587320327759,
-0.6899100542068481,
-0.6773511171340942,
-0.15462614595890045,
-0.4948238730430603,
-1.029603362083435,
0.05612722039222717,
-0.13437803089618683,
-0.673757016658783,
-0.12415468692779541,
... |
def test _ 02 _ vpc _ default _ routes ( self ) : self. logger. debug ( " starting test _ 02 _ vpc _ default _ routes " ) self. query _ routers ( ) net _ off = get _ default _ network _ offering ( self. apiclient ) net1 = self. create _ network ( net _ off, " 10. 1. 1. 1 " ) net _ off _ no _ lb = get _ default _ networ... | [
-0.4191434681415558,
0.9910075068473816,
0.6695258617401123,
0.30733412504196167,
2.204143524169922,
0.6474583745002747,
-0.3099985420703888,
-0.739872395992279,
-0.4096619784832001,
0.06293515861034393,
-0.7250725030899048,
0.025039803236722946,
-0.5642331838607788,
0.3761322498321533,
... |
def get _ summary ( self ) : s = " number of toas : % d \ n " % self. ntoas s + = " number of commands : % d \ n " % len ( self. commands ) s + = " number of observatories : % d % s \ n " % ( len ( self. observatories ), list ( self. observatories ) ) for ii, key in enumerate ( self. table. groups. keys ) : grp = self.... | [
-0.4139747619628906,
0.08087604492902756,
0.6781352162361145,
-0.844283938407898,
-0.4328766465187073,
-0.02986549399793148,
-0.2747774124145508,
-0.7108091711997986,
-0.59700608253479,
0.37049615383148193,
0.9485685229301453,
0.4301866590976715,
0.7478389143943787,
0.13296768069267273,
... |
def build _ schedule _ txt ( self ) : self. base _ df ['start _ time'] = self. base _ df. apply ( lambda row : self. get _ start _ time ( row ['index'], row ['county'], row ['start _ time'], row ['start _ date'], row ['hours _ open _ id'] ), axis = 1 ) self. base _ df ['end _ time'] = self. base _ df. apply ( lambda ro... | [
-0.8976167440414429,
-0.3543567657470703,
0.7060511112213135,
0.28283458948135376,
-0.05470728501677513,
-0.32797858119010925,
-0.1279243379831314,
0.12512201070785522,
-0.8694952726364136,
0.10453687608242035,
-0.28089240193367004,
0.16234980523586273,
0.14553384482860565,
-0.400569498538... |
def supportedwireengines ( self, role, onlyavailable = true ) : assert role in ( serverrole, clientrole ) attr = b'serverpriority'if role = = serverrole else b'clientpriority'engines = [ self. _ engines [ e ] for e in self. _ wiretypes. values ( ) ] if onlyavailable : engines = [ e for e in engines if e. available ( ) ... | [
-0.6082372069358826,
-0.018238838762044907,
0.557354211807251,
-0.06459087878465652,
-0.18917329609394073,
0.24727830290794373,
-0.6584818363189697,
0.19051121175289154,
0.3754102289676666,
0.8514775633811951,
-0.13319407403469086,
0.5685465931892395,
-0.6766124963760376,
1.330580115318298... |
def test _ reflow _ _ sequence _ rebreak _ target ( raw _ sql _ in, target _ idx, seq _ sql _ in, seq _ sql _ out, default _ config, caplog ) : root = parse _ ansi _ string ( raw _ sql _ in, default _ config ) print ( root. stringify ( ) ) target = root. raw _ segments [ target _ idx ] print ( " target : ", target ) se... | [
-0.5805087685585022,
-0.09592324495315552,
0.48909395933151245,
0.5120782852172852,
0.2966912090778351,
-0.05077945068478584,
0.16516783833503723,
0.03505434840917587,
0.5350365042686462,
0.050748154520988464,
-0.05302276834845543,
0.665580153465271,
0.11403403431177139,
0.0617428347468376... |
def find _ state _ ix ( data, states ) : ix = np. zeros ( ( data. shape [ 0 ] ) ) j = 0 for i in data : ix [ j ] = np. argwhere ( np. sum ( i [ none, : ] = = states, 1 ) = = states. shape [ 1 ] ) j + = 1 return ix. astype ('int') | [
-0.3184950649738312,
0.01479267980903387,
0.43883273005485535,
-0.47802498936653137,
0.18266962468624115,
-0.9017137289047241,
0.6457281708717346,
0.1070842295885086,
0.33617427945137024,
0.542087733745575,
-0.24477797746658325,
-0.3799026310443878,
-0.40435969829559326,
-0.240820109844207... |
def dump _ kb ( self ) : print ( " - - - - - - - - - - - - - - - - knowledge base - - - - - - - - - - - - - - - - - - - " ) print ( f " kb : { self. kb _ map } " ) print ( f " queries : { self. queries } " ) print ( " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " ) | [
0.8415737152099609,
-0.9389270544052124,
1.0769983530044556,
-0.2538312077522278,
-0.45180389285087585,
1.2958625555038452,
0.5038408637046814,
0.05316823720932007,
-0.38846340775489807,
-0.2849601209163666,
0.06217234954237938,
1.0546845197677612,
-0.36138859391212463,
0.621496856212616,
... |
def get ( org _ id, business _ identifier ) : # note this is used by lear - which passes in the user's token to query for an affiliation for an nr. try : if authorizationservice. get _ user _ authorizations _ for _ entity ( business _ identifier ) : # get affiliation response, status = affiliationservice. find _ affili... | [
-0.42997756600379944,
-0.48190048336982727,
0.6376477479934692,
0.45288413763046265,
-0.0077205803245306015,
-0.4031237065792084,
0.34682124853134155,
-0.14328455924987793,
0.37857475876808167,
0.6607987284660339,
0.21001850068569183,
1.4396264553070068,
-0.822293221950531,
0.4702500998973... |
def _ _ init _ _ ( self ) : raise notimplementederror ( "'sparsityoracle'is an abstract interface. " ) | [
1.2672876119613647,
0.6710278987884521,
0.5911031365394592,
0.10450660437345505,
0.3309270441532135,
0.02815084718167782,
0.6244148015975952,
0.41460874676704407,
1.2952368259429932,
-0.04980315640568733,
-0.47664403915405273,
0.5518946051597595,
0.6977047324180603,
-0.18665465712547302,
... |
def is _ functon ( content ) : matched = function _ regexp. match ( content ) return true if matched else false | [
-0.5135924220085144,
-0.3625069856643677,
0.3629494309425354,
0.667086124420166,
0.5583728551864624,
-0.9223883152008057,
0.0027042473666369915,
0.6321534514427185,
-0.10127653926610947,
-0.2169351577758789,
-0.8704045414924622,
-0.4107219874858856,
-0.744253396987915,
-0.2564133107662201,... |
def resource ( self, * args, * * kwargs ) : return self. boto3 _ session. resource ( * args, * * kwargs ) | [
-0.7188385725021362,
-0.5608920454978943,
0.2743120491504669,
-0.8638867139816284,
0.21060404181480408,
0.488770455121994,
-0.08344489336013794,
-0.3126065135002136,
0.6901435852050781,
-0.050440527498722076,
0.4906245470046997,
0.7078317403793335,
-0.3421512544155121,
-1.0072948932647705,... |
def main ( system, logger ) : files _ status = get _ file _ status ( config. filenames ) return files _ status | [
-0.28716978430747986,
-0.8563461303710938,
0.2779642343521118,
0.6063543558120728,
0.4976225793361664,
-0.04154136776924133,
0.06706077605485916,
0.9952002763748169,
-0.9247222542762756,
0.0987936481833458,
-0.30409640073776245,
-0.17944060266017914,
0.09139954298734665,
0.9426548480987549... |
def virtualdart ( self, virtual _ particles = none ) : if virtual _ particles = = none : virtual _ particles = self. virtual _ particles dart _ list = [ ] state _ info = self. nc _ context. getstate ( true, true, false, true, true, false ) temp _ pos = state _ info. getpositions ( asnumpy = true ) # find virtual partic... | [
-0.32671624422073364,
-0.583699107170105,
0.4362631142139435,
-0.3082168400287628,
0.6144896745681763,
0.8805062174797058,
-0.5914539098739624,
0.7970462441444397,
0.4266548454761505,
0.7590346932411194,
-0.6675949096679688,
-0.07185755670070648,
-0.3925825357437134,
0.4585101902484894,
... |
def _ base _ parser ( prog = none, description = none ) : # parse arguments if available parser = argparse. argumentparser ( prog = prog, description = description, formatter _ class = rawtexthelpformatter ) parser. add _ argument ( " - - embedding ", type = str, default = none, dest ='embedding _ fp ', help = " file p... | [
0.24946454167366028,
-0.6041961312294006,
0.7409775257110596,
-0.3809196949005127,
-0.03328439220786095,
0.5227148532867432,
-0.20764899253845215,
0.39379584789276123,
-0.545432984828949,
0.09573733806610107,
0.01755543239414692,
-0.2273363471031189,
-0.5167950391769409,
0.5593474507331848... |
def getsourcepath ( file, sourcepath ) : for root in sourcepath : path = os. path. join ( root, file ) if os. path. exists ( path ) : return path return none | [
0.576452910900116,
-0.33188387751579285,
0.53200763463974,
0.6571369171142578,
0.5163856744766235,
0.09974178671836853,
0.7790870666503906,
-0.5611605048179626,
-0.6052073836326599,
0.6856374144554138,
0.25072452425956726,
-0.6534924507141113,
-0.8653022646903992,
0.1369987279176712,
-0.... |
def guess _ word ( self, word ) : if word in self. guessed _ words : return " you have already guessed the letter { }. ". format ( word ) elif word = = self. word : result = ( " congratulations, you won. the correct word was indeed { }. \ n " " you solved it with { } tries ". format ( self. word, 9 - self. tries ) ) se... | [
0.00423129927366972,
0.44914108514785767,
0.6141936182975769,
0.10265973955392838,
0.1542477011680603,
-0.33223292231559753,
0.4164786636829376,
-0.8006407022476196,
-0.1722535341978073,
0.38421010971069336,
-0.02274698205292225,
0.2216198891401291,
-1.2453680038452148,
0.4435454308986664,... |
def timestamp _ to _ datetime ( s ) : if not s : return none offset = ( datetime. datetime ( 2001, 1, 1, 0, 0, 0 ) - datetime. datetime. fromtimestamp ( 0 ) ). total _ seconds ( ) return datetime. datetime. fromtimestamp ( s + offset ) | [
1.0791293382644653,
-0.4408939778804779,
0.6406840682029724,
-0.14497166872024536,
-1.1043604612350464,
-0.6609938144683838,
-0.43245142698287964,
-0.3521360158920288,
1.8301559686660767,
0.7054332494735718,
-0.5867118239402771,
-0.09235838800668716,
0.5652608275413513,
-1.049945592880249,... |
def _ nrml _ to _ hazardlib ( src, mesh _ spacing = 1. ) : if not isinstance ( src, nrml _ models. simplefaultsource ) : raise notimplementederror return geo. surface. simplefaultsurface. from _ fault _ data ( geo. line ( [ geo. point ( * x ) for x in wkt. loads ( src. geometry. wkt ). coords ] ), src. geometry. upper ... | [
0.43931668996810913,
0.04891744256019592,
0.3422728180885315,
-0.0033841803669929504,
-0.5543220639228821,
0.797762930393219,
0.21586057543754578,
-1.1559436321258545,
0.5882459282875061,
-0.6991543173789978,
-0.44930437207221985,
-0.4165833294391632,
0.5781792402267456,
0.2233274281024933... |
def nth _ corr ( data, n, weighted = false, exclude _ empty = false, return _ sample _ size = false ) : from itertools import combinations from scipy. special import binom assert 1 < n < = data. shape [ 1 ], " n cannot be larger than size of system in data. " if np. any ( weighted ) or not exclude _ empty : if not np. ... | [
-0.27368131279945374,
0.47246137261390686,
0.7646795511245728,
-0.2130177766084671,
-0.3431321382522583,
-0.642682671546936,
0.9051368832588196,
0.1286512315273285,
0.30640479922294617,
0.711119532585144,
0.4296947419643402,
-0.0199782345443964,
-0.25636062026023865,
0.8548024892807007,
... |
async def fetch _ order _ book ( self, symbol : str, limit : optional [ int ] = none, params = { } ) : await self. load _ markets ( ) market = self. market ( symbol ) request = {'symbol': market ['id'], } if limit is not none : request ['size'] = limit response = await self. publicgetapiv1marketdepthall ( self. extend ... | [
-1.0853285789489746,
0.7347841858863831,
0.6416814923286438,
0.5743975043296814,
-0.30545663833618164,
-0.23372912406921387,
-0.5391268134117126,
-0.8419539928436279,
-0.02756340615451336,
0.3751599192619324,
-0.1802385300397873,
0.8785851001739502,
-0.14714927971363068,
-0.094887956976890... |
def entropyd ( sx, base = 2 ) : unique, count = np. unique ( sx, return _ counts = true, axis = 0 ) # convert to float as otherwise integer division results in all 0 for proba. proba = count. astype ( float ) / len ( sx ) # avoid 0 division ; remove probabilities = = 0. 0 ( removing them does not change the entropy est... | [
-0.5581448674201965,
0.21731382608413696,
0.7269144654273987,
0.12461276352405548,
-0.5957514643669128,
0.3160191476345062,
-0.3629673421382904,
0.3148757219314575,
0.130086749792099,
0.3199644386768341,
0.39878860116004944,
0.32421571016311646,
-0.7576537728309631,
-0.5168023705482483,
... |
def normalize _ config ( config, modules ) : def work _ in ( config, module, name ) : f = getattr ( module,'normalize _ config ', none ) if f : f ( config ) return _ walk _ config ( config, modules, work _ in ) | [
-0.43466439843177795,
-0.0643351599574089,
0.3174434304237366,
0.4502524435520172,
-0.5615081787109375,
-0.37877127528190613,
0.8180558085441589,
-0.08190467953681946,
0.30777478218078613,
0.3331816494464874,
-0.35331904888153076,
-0.5456287264823914,
-0.7196455001831055,
0.974983096122741... |
def create _ bucket ( self, bucket _ name : str ) - > bool : return self. objectdata. create _ bucket ( bucket _ name ) | [
-0.6748633980751038,
0.6328471899032593,
0.48948949575424194,
-0.05985501781105995,
0.3616780638694763,
1.086612343788147,
-0.023864611983299255,
-0.3497283458709717,
-0.33879128098487854,
-0.7317340970039368,
-0.7691035270690918,
-0.510906457901001,
0.2107388824224472,
-0.4102307856082916... |
def _ set _ db _ version _ metadata ( self ) : versions _ file = os. path. join ( self. out _ dir, " gbd _ processes. json " ) logger. info ( " looking for process version file'{ }'". format ( versions _ file ) ) if os. path. isfile ( versions _ file ) : # preferentially load from a file if resuming a # previous run lo... | [
-0.010687590576708317,
-0.7869380116462708,
0.5649681687355042,
-0.21584483981132507,
0.9583472013473511,
0.9648710489273071,
-0.386551171541214,
-0.42515474557876587,
-0.8878809213638306,
0.23015472292900085,
0.23218391835689545,
-0.02619081735610962,
0.15259487926959991,
0.56439983844757... |
def write _ ontoportal _ json ( msdf : mappingsetdataframe, output : textio, serialisation = " ontoportal _ json " ) - > none : if serialisation = = " ontoportal _ json " : data = to _ ontoportal _ json ( msdf ) json. dump ( data, output, indent = 2 ) else : raise valueerror ( f " unknown json format : { serialisation ... | [
-0.7051423192024231,
-0.949955403804779,
0.3394535481929779,
-0.5556894540786743,
-0.8297082185745239,
-0.07801423966884613,
-0.04318291321396828,
-0.29661956429481506,
0.5520356893539429,
-0.10112680494785309,
0.3602352738380432,
0.33728736639022827,
0.0794074758887291,
0.1223965883255004... |
def _ interpolar _ serie ( self, df, variable ) : s = pd. series ( df [ variable ] ) s. index = df [ u'time'] # self. extraccion _ modis _ interpolada = s. asfreq ( " d ", method ='backfill') # # diferentes metodos de interpolacion ( lineal y ultimo valor para atras / adelante ) return s. resample ('d'). interpolate ( ... | [
-0.7293764352798462,
0.42245417833328247,
0.604225218296051,
-0.3918435275554657,
0.08936558663845062,
-0.6739093065261841,
-0.9767649173736572,
-0.3348510265350342,
0.3409809172153473,
0.3338194489479065,
0.679685115814209,
0.24076537787914276,
0.09641283750534058,
-0.29103419184684753,
... |
def build _ docs ( schema _ path : str = none, ) : exit _ with _ error _ if _ not _ editable _ install ( ) from prefect. server. api. server import create _ app schema = create _ app ( ephemeral = true ). openapi ( ) if not schema _ path : schema _ path = ( prefect. _ _ development _ base _ path _ _ / " docs " / " api ... | [
-0.7038039565086365,
-0.6154890656471252,
0.5034446120262146,
0.263355553150177,
0.7580834031105042,
0.866116464138031,
0.5213384628295898,
0.29213228821754456,
0.14688697457313538,
-0.08563650399446487,
-0.3852410912513733,
0.11357886344194412,
-0.303104043006897,
-0.01092305313795805,
... |
def list _ deleted _ keys ( self, * * kwargs : " any " ) - > " asynciterable [ deletedkey ] " : return self. _ client. get _ deleted _ keys ( self. vault _ endpoint, maxresults = kwargs. pop ( " max _ page _ size ", none ), cls = lambda objs : [ deletedkey. _ from _ deleted _ key _ item ( x ) for x in objs ], * * kwarg... | [
-0.5571768283843994,
0.24584880471229553,
0.3572191596031189,
0.8405798077583313,
0.37194696068763733,
-0.8211967945098877,
-0.9698082208633423,
-0.5403563380241394,
0.3997533619403839,
-0.258979856967926,
-0.3350222408771515,
1.1822949647903442,
-0.15033166110515594,
0.09811615943908691,
... |
def get _ student _ form ( ) : return render _ template ( " student _ search. html " ) | [
-0.34231024980545044,
0.44041842222213745,
0.3087957203388214,
-0.38464033603668213,
-0.1296367198228836,
-0.056876957416534424,
0.2568973898887634,
0.7023446559906006,
-0.8175317645072937,
-0.4727301299571991,
-0.2528141736984253,
-0.3871157467365265,
0.3340145945549011,
-0.66231197118759... |
def have _ fp16 ( compute _ version ) : major, minor = parse _ compute _ version ( compute _ version ) # fp 16 support in reference to : # https : / / docs. nvidia. com / cuda / cuda - c - programming - guide / # arithmetic - instructions if major = = 5 and minor = = 3 : return true if major > = 6 : return true return ... | [
0.25450050830841064,
0.4345640242099762,
0.6661450862884521,
0.6197894811630249,
-0.38628268241882324,
-0.24294085800647736,
0.12246892601251602,
-0.047881629317998886,
-0.1617448925971985,
0.15169499814510345,
-0.5905390977859497,
-0.5163422226905823,
-0.4290288984775543,
0.48104953765869... |
def spend ( cls, txo :'output') - >'input': assert txo. script. is _ pay _ pubkey _ hash,'attempting to spend unsupported output.'script = inputscript. redeem _ pubkey _ hash ( cls. null _ signature, cls. null _ public _ key ) return cls ( txo. ref, script ) | [
0.3944661617279053,
0.40444523096084595,
0.2628580331802368,
-0.042422618716955185,
-0.632281482219696,
-0.4118937849998474,
0.6641482710838318,
-0.3930320143699646,
0.35473865270614624,
0.3580172657966614,
0.021699868142604828,
0.09724727272987366,
-0.38276565074920654,
0.0737413987517356... |
def exceptions _ magic ( self, car ) : for i in range ( 0, 4 ) : if np. array _ equal ( car. cur _ pos, self. exceptions [ i ] ) : if car. orientation = = east : return 6 else : return 4 for i in range ( 4, 8 ) : if np. array _ equal ( car. cur _ pos, self. exceptions [ i ] ) : if car. orientation = = south : return 6 ... | [
-0.572625994682312,
-0.3535705506801605,
0.8867352604866028,
-0.8561908602714539,
-0.34107398986816406,
-0.6998072266578674,
0.5048701763153076,
-0.36081916093826294,
0.18139666318893433,
0.36516326665878296,
0.41660308837890625,
-0.23359212279319763,
-0.5927843451499939,
-0.43689274787902... |
def eval ( self, x : np. ndarray ) - > np. ndarray : x + = self. offsets fx = np. apply _ along _ axis ( self. func, axis = 1, arr = x ) ri = np. random. randint ( 0, 11 ) # if ri < = 2 : self. move _ offset ( ) return fx | [
-0.5585847496986389,
0.10490382462739944,
0.5244523286819458,
-0.9236516952514648,
-0.41776683926582336,
0.6910530924797058,
0.567349374294281,
0.2311849296092987,
0.993179440498352,
-0.21082301437854767,
0.09999909996986389,
0.7803316712379456,
0.18993042409420013,
-0.614196240901947,
-... |
def post ( self ) : body _ categories = { " username " : 1, " password " : 1 } user _ dict = errorutil. check _ fields ( self. request. body. decode ( ), body _ categories, self ) if user _ dict = = false or userutil. user _ exists ( user _ dict [ " username " ] ) = = false : statement = " failed login attempt % s : % ... | [
-1.306069254875183,
-0.1930101364850998,
0.8997986316680908,
0.7149150967597961,
-0.5569142699241638,
-0.05537009239196777,
0.10900449007749557,
-0.693628191947937,
-0.13211390376091003,
-0.6822552680969238,
-0.6984739303588867,
0.1326054185628891,
-0.27120840549468994,
-0.1549510955810547... |
def _ _ setattr _ _ ( self, key, val ) : key = self. _ attributes _ t _ keycheck ( key ) return self. _ attributes _ i _ set ( key, val, flow = self. _ down ) | [
-0.8776236772537231,
0.05213110148906708,
0.38011711835861206,
0.05415159836411476,
-1.2028933763504028,
0.09700478613376617,
0.5355466604232788,
-0.6658797860145569,
-0.3179011642932892,
0.7488088607788086,
0.5322981476783752,
0.22579756379127502,
-0.19398008286952972,
-0.2046025693416595... |
def encode ( self, s ) : # dp [ i ] [ j ] = optimal encoding for substring s [ i : j + 1 ] dp = [ ['' ] * len ( s ) for _ in range ( len ( s ) ) ] for l in range ( len ( s ) ) : for i in range ( len ( s ) - l ) : j = i + l substr = s [ i : j + 1 ] dp [ i ] [ j ] = substr if l > = 4 : for k in range ( i, j ) : if len ( ... | [
0.08667787909507751,
0.8692039847373962,
0.8984337449073792,
-0.418954461812973,
-0.8711676001548767,
-0.4407540261745453,
1.0686513185501099,
-0.3191830515861511,
0.7013434171676636,
0.42805731296539307,
-0.11528488248586655,
0.05874800309538841,
-0.5275567770004272,
-1.052425503730774,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.