text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def calculate _ normal _ trajectory ( self, leg _ name, subgait _ name ) : side _ prefix ='right'if'right'in leg _ name else'left'default _ subgait = deepcopy ( self. default _ walk [ subgait _ name ] ) non _ capture _ point _ joints = [ ] for joint in default _ subgait. joints : if side _ prefix in joint. name : non _... | [
-0.36768609285354614,
-0.5036872029304504,
0.6618825793266296,
0.36478957533836365,
-0.7162037491798401,
0.44202667474746704,
-0.16053716838359833,
0.182716965675354,
-0.6482672691345215,
-0.1529388278722763,
-0.7835515737533569,
-0.19026094675064087,
-0.3193608224391937,
-0.26447013020515... |
def _ _ sub _ _ ( self, other : " translation2d " ) - > " translation2d " : if not isinstance ( other, translation2d ) : return notimplemented return translation2d ( self. x - other. x, self. y - other. y ) | [
-0.7072088122367859,
-0.05163559317588806,
0.7440816164016724,
-0.514561116695404,
-1.5471388101577759,
0.3529330790042877,
-0.18570539355278015,
-1.0928996801376343,
-0.25131934881210327,
-0.5167070627212524,
-1.006272315979004,
-0.3429064154624939,
0.4441613256931305,
-0.6174182891845703... |
def _ _ new _ _ ( cls ) : if tdsconfiguration. _ _ instance is none : return object. _ _ new _ _ ( cls ) else : return tdsconfiguration. _ _ instance | [
-0.9699322581291199,
0.28133800625801086,
0.5390557646751404,
-0.5377815365791321,
-0.5986477732658386,
-0.7628391981124878,
0.46886634826660156,
-0.6978757977485657,
0.8692371249198914,
0.3123721182346344,
-0.42817193269729614,
-0.8542488813400269,
0.7612545490264893,
0.27063143253326416,... |
def location ( self, value ) : self. location _ value = value | [
-0.12878535687923431,
-0.43597540259361267,
0.28202322125434875,
-0.6543511748313904,
-0.24792791903018951,
0.8794506192207336,
1.3298237323760986,
0.7941048741340637,
-0.4844704568386078,
0.3333180546760559,
-0.5266321301460266,
0.01585632935166359,
1.272814393043518,
0.44715821743011475,... |
def invitrocalibration ( self, q ) : self. domid = q. getid ( ) self. date = time. strftime ( " % c " ) self. temperature = q. readtemperature ( ) self. dac = [ none ] * 16 self. adc = [ none ] * 24 for dac in range ( 16 ) : self. dac [ dac ] = q. getdac ( dac ) for adc in range ( 24 ) : self. adc [ adc ] = q. readadc ... | [
-0.05520030856132507,
-0.3020600974559784,
0.48537054657936096,
-0.3125840127468109,
-0.5267505049705505,
-0.25965914130210876,
-0.15523166954517365,
-0.8159944415092468,
0.2843344807624817,
-0.44395676255226135,
-0.6123589873313904,
-0.1966782957315445,
-0.14172133803367615,
0.50856930017... |
def test _ get _ image _ layers ( image _ config : imageconfig, image _ config _ signed : imageconfig, image _ layers : list ) : assert image _ config. get _ image _ layers ( ) = = image _ layers assert image _ config _ signed. get _ image _ layers ( ) = = image _ layers | [
-0.43277841806411743,
-0.048801861703395844,
0.28843453526496887,
0.924634575843811,
0.7888654470443726,
-0.20161736011505127,
-0.1882375031709671,
-1.1959997415542603,
0.8479523658752441,
0.3766656816005707,
-0.8930879831314087,
-0.15135353803634644,
0.14392304420471191,
0.604954123497009... |
def build _ lr _ schedule ( optimizer, last _ epoch = - 1 ) : if args. lr _ update _ schedule = ='fixed': sched = optim. lr _ scheduler. lambdalr ( optimizer, lambda epoch : 1. 0, last _ epoch = last _ epoch ) elif args. lr _ update _ schedule = ='cosine': total _ epochs = args. epochs - args. warmup sched = optim. lr ... | [
0.033155813813209534,
-1.1305906772613525,
0.8200774192810059,
-0.28440484404563904,
-0.445271372795105,
0.03554702550172806,
-0.8662505149841309,
0.786770224571228,
0.2669873535633087,
0.22610610723495483,
0.3616628050804138,
0.06796522438526154,
-0.22969043254852295,
-0.4170164167881012,... |
def execute _ raw _ data _ query ( self, paths : list, start _ time : int, end _ time : int ) - > sessiondataset : request = tsrawdataqueryreq ( self. _ _ session _ id, paths, self. _ _ fetch _ size, starttime = start _ time, endtime = end _ time, statementid = self. _ _ statement _ id, enableredirectquery = false, ) r... | [
-1.0337936878204346,
0.1001579537987709,
0.7423362731933594,
-0.4162617623806,
-0.6234511733055115,
-0.15255936980247498,
-0.4871038496494293,
-0.3375679552555084,
0.26307928562164307,
-0.3997882604598999,
0.3877677619457245,
0.37969350814819336,
-0.02306690253317356,
-0.7902708053588867,
... |
def vnf _ cost _ to _ internal ( ext ) : internal = { } internal [ " cost " ] = ext [ " cost " ] internal [ " vnf " ] = ext [ " vnfid " ] internal [ " host " ] = ext [ " nfvipopid " ] return internal | [
-0.9372599124908447,
-0.5526575446128845,
0.344823956489563,
-0.7061892747879028,
-1.1199098825454712,
-0.7756906151771545,
-1.344451904296875,
-0.06575710326433182,
-0.5562198162078857,
1.259579062461853,
-0.9112247824668884,
-0.05826134979724884,
-0.6162256598472595,
-0.20503385365009308... |
def vgg16 _ bn _ avg ( * * kwargs ) : if model _ kwargs is none : model _ kwargs = { } model = vgg ( make _ layers ( cfg ['d'], batch _ norm = true, pool _ type ='avg'), * * model _ kwargs ) return model | [
-0.0025708728935569525,
0.9792079925537109,
0.5120921730995178,
0.8217070698738098,
0.19873982667922974,
0.7784956693649292,
-0.19181115925312042,
-0.40586602687835693,
-1.1995278596878052,
0.892595648765564,
-0.22131560742855072,
0.8304944634437561,
-0.21379739046096802,
0.489329397678375... |
def parse _ for _ table ( html ) : first _ column = [ ] second _ column = [ ] third _ column = [ ] last _ hall _ name ='' for td in html. select ('td') : if td ['class'] [ 0 ] = = " column - 1 " : if td. text : if'village'or'village'in td. text : continue first _ column. append ( td. text ) last _ hall _ name = td. tex... | [
-0.6772215962409973,
0.6613147854804993,
0.8219095468521118,
0.2468351423740387,
-0.3648006021976471,
-0.3057037889957428,
0.40901461243629456,
-0.09096403419971466,
-0.6987141370773315,
0.2099444419145584,
0.05641428381204605,
-0.29713863134384155,
0.37002548575401306,
-0.1745264828205108... |
def test _ format _ message _ flows _ bad _ status ( self ) : input _ data _ msgflow = [ " bip1111i : message flow'tets. invalid'on execution group'test'is invalid. ( application'test ', library'' ) " ] check _ data ='' bip _ codes _ components = get _ platform _ params _ for _ commands ( iib _ ver ='9') [ 2 ] self. as... | [
0.3327532708644867,
-0.8614264130592346,
0.4900827705860138,
0.22088304162025452,
0.5484609007835388,
0.4422840178012848,
0.26040682196617126,
0.20117363333702087,
-0.14667528867721558,
-0.46594613790512085,
0.3965456187725067,
-0.0027504211757332087,
-0.7212539911270142,
1.124439477920532... |
def buildup ( self ) : if not self. _ _ parsed _ _ : self. _ _ actorplaceholders _ _ = self. _ _ parse _ _ ( ) return fact ( self, self. _ _ actorplaceholders _ _ [ : ] ) | [
0.2058166265487671,
-0.9139695167541504,
0.2625066637992859,
-0.7689524292945862,
0.6668846011161804,
0.23431241512298584,
0.5372208952903748,
0.965728759765625,
0.5741562843322754,
-1.3183400630950928,
-0.4009174108505249,
0.3028661012649536,
-0.681793212890625,
-0.13037711381912231,
-0... |
def remove _ columns ( self, column _ names : union [ str, list [ str ] ], new _ fingerprint ) - > " dataset " : dataset = copy. deepcopy ( self ) if isinstance ( column _ names, str ) : column _ names = [ column _ names ] for column _ name in column _ names : if column _ name not in dataset. _ data. column _ names : r... | [
-0.5798044204711914,
-0.27853924036026,
0.3838309049606323,
-0.11518276482820511,
-0.25951075553894043,
0.09909439086914062,
0.0975356176495552,
0.3092828094959259,
-0.6535987257957458,
-0.5558377504348755,
-0.2521263062953949,
0.22861503064632416,
-0.6228727102279663,
-0.7146187424659729,... |
def to _ python ( self, flddsc, value ) : res = value if value = ='\ x00'and flddsc [ 1 ]! = fieldtype. bit : # don't go further when we hit a null value return none if value is none : return none type _ name = fieldtype. get _ info ( flddsc [ 1 ] ) try : return getattr ( self,'_ % s _ to _ python'% type _ name ) ( val... | [
-0.6641494035720825,
-0.23731502890586853,
0.71625155210495,
-0.35535144805908203,
0.6661233305931091,
-0.8979944586753845,
-0.2673802375793457,
-1.3138355016708374,
0.016519291326403618,
0.1753285527229309,
0.20909520983695984,
0.8268969058990479,
0.24457332491874695,
0.4391845464706421,
... |
def start _ date ( self, start _ date ) : if start _ date is none : raise valueerror ( " invalid value for ` start _ date `, must not be ` none ` " ) # noqa : e501 self. _ start _ date = start _ date | [
1.0649709701538086,
0.2638525664806366,
-0.08424648642539978,
0.7392247319221497,
0.8464718461036682,
0.19581279158592224,
-0.0042626806534826756,
1.1181343793869019,
0.21866892278194427,
0.2359248697757721,
-0.42687690258026123,
0.6892854571342468,
-0.3948613405227661,
0.557550311088562,
... |
def test _ minutify ( ) : dt = datetime. now ( ). replace ( second = 30, microsecond = 40000 ) accurate _ dt = minutify ( dt ) # assert the datetime object has been minutified correctly ( seconds and microseconds = = 0 ) assert accurate _ dt. second = = 0 and accurate _ dt. microsecond = = 0 | [
0.043849531561136246,
-0.05760037526488304,
0.41734883189201355,
-0.31150516867637634,
-0.15110598504543304,
-0.3084004521369934,
-0.2624894976615906,
0.16227968037128448,
0.05483050271868706,
-1.1356557607650757,
-1.3588182926177979,
-0.3831108510494232,
0.10887856781482697,
0.48419463634... |
def logout _ user ( self ) : for key in ('identity. name ','identity. auth _ type') : session. pop ( key, none ) _ logout _ user ( ) identity _ changed. send ( app. _ get _ current _ object ( ), identity = anonymousidentity ( ) ) | [
-0.7191258072853088,
-0.5400219559669495,
0.49217748641967773,
1.1445388793945312,
0.10660532861948013,
-0.020898595452308655,
0.26849043369293213,
-0.8200611472129822,
0.6854979395866394,
0.7117097973823547,
-0.9683780074119568,
0.012687218375504017,
0.6640588641166687,
-0.231304228305816... |
async def test _ set _ binary ( self ) : xknx = xknx ( ) expose _ sensor = exposesensor ( xknx, " testsensor ", group _ address = " 1 / 2 / 3 ", value _ type = " binary " ) await expose _ sensor. set ( false ) assert xknx. telegrams. qsize ( ) = = 1 telegram = xknx. telegrams. get _ nowait ( ) assert telegram = = teleg... | [
-0.33685702085494995,
1.3195502758026123,
0.47525057196617126,
-0.00826681312173605,
0.2833176851272583,
0.42469778656959534,
-0.0912553071975708,
-1.153469443321228,
-0.22000570595264435,
-0.10324300825595856,
-0.7009901404380798,
0.4092361032962799,
-0.6538143157958984,
0.165323674678802... |
def trim _ docstring ( text ) : if not text : return text # convert tabs to spaces ( following the normal python rules ) # and split into a list of lines : lines = text. expandtabs ( ). splitlines ( ) # determine minimum indentation ( first line doesn't count ) : indent = sys. maxsize for line in lines [ 1 : ] : stripp... | [
0.754734218120575,
-0.1561949998140335,
0.5554870367050171,
0.16502438485622406,
-0.5863040089607239,
0.26640793681144714,
0.2660104036331177,
-0.2666284143924713,
0.6045119762420654,
-0.03666079044342041,
0.48611271381378174,
-0.281935453414917,
0.25019705295562744,
-0.8613097071647644,
... |
def _ format _ float ( x ) : return str ( float ( x ) ). ljust ( 6, " 0 " ) [ : 6 ] | [
0.9684453010559082,
-0.8513193130493164,
0.46922042965888977,
-0.7315917015075684,
-0.16501061618328094,
-0.04373343661427498,
-0.9699703454971313,
-0.6747314929962158,
0.11311696469783783,
-0.7211390733718872,
0.7691464424133301,
-0.5991525053977966,
0.7511781454086304,
0.0463877767324447... |
def signals _ from _ names ( signal _ names : iterable [ union [ str, signal. signals ] ] ) - > iterable [ signal. signals ] : for sig in signal _ names : if isinstance ( sig, signal. signals ) : yield sig else : sig = getattr ( signal, sig, none ) if sig : yield cast ( signal. signals, sig ) | [
-0.09552568197250366,
-0.16867244243621826,
0.4496574103832245,
0.35432568192481995,
0.30146583914756775,
0.0531650148332119,
-0.630805492401123,
-0.9599993228912354,
0.3634721636772156,
0.31799566745758057,
-0.5717853903770447,
0.34407535195350647,
-0.1534518003463745,
1.4083166122436523,... |
def _ printpreorder ( self, node = none, traversal = [ ] ) : if node : traversal. append ( str ( node. data ) ) traversal = self. _ printpreorder ( node. left, traversal ) traversal = self. _ printpreorder ( node. right, traversal ) return traversal | [
-0.6138461232185364,
0.5384056568145752,
0.7130064964294434,
-0.5129683613777161,
-0.3786923289299011,
-0.41407784819602966,
-0.7074602246284485,
-0.5087237358093262,
0.4459554851055145,
0.10335072875022888,
-0.2408359944820404,
0.2571910321712494,
-0.3007548451423645,
0.9477575421333313,
... |
def set ( self, key, value ) : self. entries [ key ] = { " time " : time. time ( ), " value " : value, } | [
-0.4280017912387848,
0.06537038832902908,
0.35421377420425415,
-0.4931088984012604,
-0.2242065966129303,
0.29381006956100464,
-0.8521948456764221,
0.2569642663002014,
-0.5912618041038513,
1.1800676584243774,
-0.8563149571418762,
0.6088125109672546,
0.38215070962905884,
1.2849191427230835,
... |
def target _ resource _ id ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " target _ resource _ id " ) | [
0.718113362789154,
-0.6411145329475403,
0.24090014398097992,
0.009433241561055183,
0.43731072545051575,
1.015913963317871,
0.1778334081172943,
0.5959389209747314,
1.0400956869125366,
0.4238121509552002,
0.8435894846916199,
1.3267227411270142,
0.37042924761772156,
-1.0411587953567505,
-0.... |
def get _ revisions ( self, device : str ) - > list [ str ] : return list ( self. config [ " devices " ] [ device ] [ " revisions " ]. keys ( ) ) | [
-0.5795696377754211,
0.8259658813476562,
0.09337041527032852,
0.5548288226127625,
0.43090978264808655,
0.15726737678050995,
-0.9336183071136475,
0.5200916528701782,
0.23269321024417877,
0.5776731371879578,
-0.6543818116188049,
0.7618736624717712,
0.2521023452281952,
0.06098323315382004,
... |
def set _ student _ num ( self, student _ num ) : if student _ num is none or not isinstance ( student _ num, int ) : raise valueerror ( " invalid student _ num argument " ) self. student _ num = student _ num | [
-0.7821131348609924,
-0.34281718730926514,
0.3238951861858368,
0.8160438537597656,
0.6310592293739319,
0.132511168718338,
0.6052514314651489,
0.7421983480453491,
0.5964909791946411,
-0.43510666489601135,
-1.032977819442749,
0.4124847650527954,
0.4363098740577698,
0.11350991576910019,
0.6... |
def _ create _ options _ entry ( self ) - > flowresult : return self. async _ create _ entry ( title = " netatmo public weather ", data = self. options ) | [
0.2925482988357544,
1.05880606174469,
0.08203098177909851,
-0.5310053825378418,
1.2086166143417358,
0.44750773906707764,
-0.38499823212623596,
-0.8471949100494385,
-0.475937157869339,
-0.025186769664287567,
0.3391417860984802,
-0.06585316359996796,
-0.19304944574832916,
0.25737637281417847... |
def synth _ values _ gsm ( self, time, radius, theta, phi, *, nmax = none, source = none, grid = none ) : source ='all'if source is none else source grid = false if grid is none else grid if source = ='all': coeffs _ ext = self. synth _ coeffs _ gsm ( time, nmax = nmax, source ='external') coeffs _ int = self. synth _ ... | [
-0.34418705105781555,
0.7174929976463318,
0.6894723176956177,
-0.10792964696884155,
-0.25366339087486267,
-0.8560097813606262,
-0.4868967831134796,
-0.11372075229883194,
-0.5697345733642578,
0.13062147796154022,
-0.92391037940979,
1.125962495803833,
-0.29080188274383545,
0.9762055277824402... |
def _ createfarewellpage ( self ) : page = directframe ( self. frame ) page. setname ( " partyplannerfarewellpage " ) self. confirmtitlelabel = directlabel ( parent = page, relief = none, text = ttlocalizer. partyplannerconfirmationalloktitle, textmaychange = true, pos = self. gui. find ( " * * / title _ locator " ). g... | [
0.36863839626312256,
-0.23621398210525513,
0.7223941087722778,
-0.7580625414848328,
-0.2998897135257721,
1.0584741830825806,
0.01007626112550497,
-0.008287384174764156,
-0.42092618346214294,
-0.0462692528963089,
0.536128580570221,
-0.6467899084091187,
-0.09061262011528015,
0.73073154687881... |
def _ _ loadmodel ( self, filename, workdir = none ) : if workdir is not none : path2file = workdir +'/'+ filename else : path2file = filename modelname, fileextension = filename. split ( '.') self. name = modelname warnings. filterwarnings ('ignore') if fileextension in ['xml ','sbml'] : self. gem = cobra. io. read _ ... | [
-0.10105021297931671,
-0.2018885314464569,
0.6206657290458679,
0.5345840454101562,
-0.7729529142379761,
0.46960633993148804,
0.11569073796272278,
-0.4592045843601227,
-0.8195298314094543,
0.4413481652736664,
-0.38417285680770874,
-0.09669186919927597,
0.3664185702800751,
0.1526817530393600... |
def write ( self, file _ name : optional [ path ] = none ) : if file _ name is none : if self. file _ name is not none : file _ name = self. file _ name else : raise valueerror ('file _ name must be specified') with open ( file _ name,'wb') as map _ fileobj : # mark that the first six bytes are not used map _ fileobj. ... | [
0.16070935130119324,
-0.7045438885688782,
1.0424222946166992,
-0.30557194352149963,
0.21133559942245483,
0.5696519017219543,
-0.19841627776622772,
0.14956198632717133,
-0.1645933836698532,
0.05037613585591316,
-0.8130328059196472,
-0.001982184126973152,
-0.30064132809638977,
0.025814397260... |
def memcache _ client ( servers ) : client = client ( servers, behaviors = { " cas " : 1 } ) try : yield client finally : client. disconnect _ all ( ) | [
-0.5080939531326294,
0.0811980813741684,
0.2818790674209595,
0.3310171067714691,
-0.6429926156997681,
-0.07023607939481735,
0.0850319117307663,
-1.0510858297348022,
0.29734480381011963,
0.4585453271865845,
-0.3376639187335968,
-0.19087277352809906,
-0.3989747166633606,
-0.8714208602905273,... |
def center ( self ) : framegm = self. framegeometry ( ) screen = qapplication. desktop ( ). screennumber ( qapplication. desktop ( ). cursor ( ). pos ( ) ) centerpoint = qapplication. desktop ( ). screengeometry ( screen ). center ( ) framegm. movecenter ( centerpoint ) self. move ( framegm. topleft ( ) ) | [
0.3854399621486664,
-0.8287262916564941,
0.6864303350448608,
0.7525728940963745,
-0.27037954330444336,
0.19730474054813385,
0.4317127466201782,
0.22578215599060059,
0.40940237045288086,
0.7600585222244263,
0.09768380224704742,
0.5368656516075134,
-0.3959468901157379,
0.5336224436759949,
... |
def test _ invariance ( self ) : reward _ normalizer, strategy = self. _ setup (. 5 ) targets = tf. range ( 20, dtype = tf. float32 ) # run the convolution of ` correct _ prediction (... ) ` and # ` unnormalize _ prediction (... ) ` before the update of the statistics. with strategy. scope ( ) : before = reward _ norma... | [
0.23070618510246277,
0.20083700120449066,
0.6433682441711426,
0.5726907849311829,
0.232945054769516,
0.2973668873310089,
0.8718652129173279,
0.06304404139518738,
-0.2766651213169098,
0.1654435396194458,
-0.18284523487091064,
0.5703707933425903,
-0.000476781657198444,
0.19115816056728363,
... |
def pivotq ( m, r1, r2 ) : return exchangecols ( m, r1, r2 ) | [
-0.5028075575828552,
-0.04985993728041649,
0.35577017068862915,
0.22552496194839478,
-0.7673369646072388,
-0.5467636585235596,
-1.0627588033676147,
-1.267992377281189,
-0.3053467571735382,
0.6872532963752747,
0.6508018374443054,
-0.2967509627342224,
-0.438247948884964,
-1.566545844078064,
... |
def move _ track ( self, from _ level, to _ level ) : aux = self. tracks [ from _ level ] del self. tracks [ from _ level ] self. add _ track ( aux, to _ level ) | [
-0.19323483109474182,
-0.6742908954620361,
0.961656928062439,
-0.0389392226934433,
-0.508690357208252,
0.7115898728370667,
-0.800970196723938,
-0.022640934213995934,
-1.3656868934631348,
0.6173810362815857,
-0.23854216933250427,
0.78862065076828,
-0.2745950520038605,
-0.5157298445701599,
... |
def _ _ init _ _ ( self, d _ ff, n _ elements _ in _ block, d _ lowrank, temperature, use _ bfloat16, mode, kernel _ initializer, bias _ initializer, also _ return _ nondiscrete _ output ) : n _ out = 2 if also _ return _ nondiscrete _ output else 1 super ( ). _ _ init _ _ ( name = f'_ sparseffcontroller _ { d _ ff } '... | [
0.05863090604543686,
0.6833608746528625,
0.7481063008308411,
0.7249479293823242,
0.271293967962265,
-0.6766212582588196,
1.0235259532928467,
0.2513880133628845,
-0.2119339257478714,
-0.8070630431175232,
-0.6649588942527771,
-0.17421172559261322,
0.42496219277381897,
1.5512866973876953,
0... |
def fibonacci ( n ) : if n = = 0 : return 0 elif n = = 1 : return 1 else : return fibonacci ( n - 1 ) + fibonacci ( n - 2 ) | [
-0.06192127987742424,
0.8098444938659668,
0.23780952394008636,
1.4267889261245728,
0.695960521697998,
-0.46755778789520264,
0.510944128036499,
0.09665162116289139,
0.3966120183467865,
-0.44130048155784607,
-0.08709343522787094,
0.026791973039507866,
-0.11870866268873215,
1.2105985879898071... |
def test _ _ sticker _ _ format ( ) : sticker = sticker ( ) vampytest. assert _ instance ( format ( sticker,'' ), str ) vampytest. assert _ instance ( format ( sticker,'c'), str ) | [
1.2676199674606323,
-0.21301668882369995,
0.28571462631225586,
0.5005642771720886,
0.0433197021484375,
0.3065679967403412,
-0.2452450543642044,
-1.2060710191726685,
-0.07908761501312256,
-0.39962145686149597,
0.6893342137336731,
-0.3651582598686218,
-0.4212770462036133,
0.950008749961853,
... |
async def test _ verify _ signatures _ manipulated _ signatures ( image _ config : imageconfig ) : # add a single signature... signer = fakesigner ( ) assert await image _ config. sign ( signer ) = = signer. signature _ value # replace the class method for resolving signature providers... original _ method = signer. fo... | [
-0.1897011250257492,
0.5479769706726074,
0.6240901947021484,
0.5391799211502075,
0.7835922837257385,
-0.45989662408828735,
0.3342207968235016,
0.1870352327823639,
0.28277647495269775,
-0.5171180367469788,
-0.9345992803573608,
-0.5420708656311035,
0.43338853120803833,
1.3090190887451172,
... |
def create _ types ( cls, types : typing. iterable [ challengetype ] ) - > typing. list [ " challenge " ] : return [ cls ( type = type _, status = challengestatus. pending ) for type _ in types ] | [
-0.8503846526145935,
-0.27641651034355164,
0.3464648723602295,
0.5274216532707214,
1.2921128273010254,
0.5008823275566101,
-0.3821781277656555,
-0.5783068537712097,
-0.1156282052397728,
0.8115955591201782,
-0.8065599203109741,
-0.9327772855758667,
0.18587900698184967,
0.7579126954078674,
... |
def stackpsf ( self, image, beam, g _ gauls, wts, cdelt, factor ) : gxcens _ pix = g _ gauls [ 2 ] gycens _ pix = g _ gauls [ 3 ] peak = g _ gauls [ 1 ] psfimsize = int ( round ( max ( beam [ 0 ], beam [ 1 ] ) / max ( cdelt [ 0 ], cdelt [ 1 ] ) * factor ) ) # fac x fwhm ; fac ~ 2 psfimage = n. zeros ( ( psfimsize, psfi... | [
0.3924117982387543,
0.16186921298503876,
0.7346723079681396,
0.49155673384666443,
-0.4435300827026367,
-0.2878733277320862,
0.3587895929813385,
-0.342722624540329,
0.035198260098695755,
0.6948645114898682,
0.20556651055812836,
0.22097213566303253,
-0.09336163103580475,
0.3096371591091156,
... |
def getsequence ( name ) : for fastadict in fastadicts : if fastadict. has _ key ( name ) : return fastadict [ name ] raise valueerror ( " no sequence { } in any fasta ". format ( name ) ) | [
-0.4189223647117615,
-0.5538502931594849,
0.2755641043186188,
-0.2777106463909149,
-0.7228901386260986,
-1.3837149143218994,
-0.10306671261787415,
-0.28062865138053894,
-0.08811654150485992,
0.037004001438617706,
0.42276573181152344,
-0.43796929717063904,
0.023064492270350456,
0.1981579363... |
def mincut ( self, s :'str') - >'int': def get _ palindrome ( s ) : dp = [ [ false ] * len ( s ) for _ in range ( len ( s ) ) ] for end in range ( len ( s ) ) : for st in range ( end + 1 ) : if s [ st ] = = s [ end ] and ( end - st < = 2 or dp [ st + 1 ] [ end - 1 ] ) : dp [ st ] [ end ] = true return dp is _ palindrom... | [
-0.101618692278862,
-0.3852747082710266,
0.9071364402770996,
-0.8924821019172668,
-1.7033960819244385,
-0.3909924626350403,
0.9373626112937927,
0.1672210693359375,
0.0843808650970459,
0.1617959886789322,
-0.7034570574760437,
0.4137830436229706,
-1.2752141952514648,
-0.2896560728549957,
0... |
def register ( cls, app ) : url = cls. get _ api _ url ( ) view _ func = cls. as _ view ( cls. endpoint ) app. add _ url _ rule ( url, view _ func = view _ func, methods = ['get ', ] ) app. add _ url _ rule ( cls. get _ api _ url ('< _ id >'), view _ func = view _ func, methods = ['get'] ) url = cls. get _ api _ url ('... | [
-0.2245573103427887,
0.9148901104927063,
0.729191243648529,
0.08707911521196365,
1.372444748878479,
-0.09886723011732101,
-0.6732655167579651,
0.8324974775314331,
-0.4278000593185425,
-0.7182633280754089,
-0.048831332474946976,
0.7273982167243958,
1.1793888807296753,
1.044077754020691,
0... |
def arctan ( x, terms = 3 ) : return sum ( ( - 1 ) * * k * x * * ( 2 * k + 1 ) / ( 2 * k + 1 ) for k in reversed ( range ( terms ) ) ) | [
-0.12472779303789139,
0.1647142469882965,
0.38498324155807495,
-0.3507820665836334,
-0.5346906781196594,
-0.016657333821058273,
-0.3975942134857178,
0.04406017065048218,
-0.17502042651176453,
0.09778939187526703,
-0.4448952376842499,
0.7938781380653381,
0.3818877041339874,
-1.2263849973678... |
def get _ crops ( self, img ) : crop _ size = self. input _ shape [ 0 ] height, width = img. shape [ 0 : 2 ] padded = self. pad _ image ( img ) crops _ per _ col = height / / 16 crops _ per _ row = width / / 16 nb _ crops = crops _ per _ col * crops _ per _ row crops = np. empty ( [ nb _ crops, crop _ size, crop _ size... | [
-0.025600912049412727,
0.7771691083908081,
0.7999695539474487,
-0.301014244556427,
-0.23751302063465118,
0.16938048601150513,
0.17416004836559296,
-1.1493315696716309,
1.1367242336273193,
0.4118006229400635,
-0.13471822440624237,
-0.6145286560058594,
0.4142775237560272,
0.01894421689212322... |
def crc16 ( n ) : g = 0x1021 # polynomial crc = 0 r = g # shift register seeded with polynomial while n : if n & 1 : crc ^ = r n > > = 1 # perform a shift - xor operation on'r'r < < = 1 if r & 0x10000 : r ^ = g r & = 0xffff return crc | [
0.9980958700180054,
0.6754522323608398,
0.7218777537345886,
-0.3216742277145386,
0.04308938607573509,
0.27031293511390686,
0.08377666026353836,
-0.43448859453201294,
0.7724384069442749,
-0.43088433146476746,
-0.15839871764183044,
-0.03631795570254326,
-0.35777026414871216,
-0.4453634321689... |
def init _ params ( m, mean = 0. 0, std = 0. 01 ) : nn. init. normal _ ( m. weight, mean, std ) m. bias. data. zero _ ( ) | [
0.025740429759025574,
0.44366657733917236,
0.40923428535461426,
0.801167368888855,
-0.5737689733505249,
0.6706481575965881,
0.16456104815006256,
0.28848910331726074,
-0.8617603182792664,
0.7841171026229858,
-0.19629280269145966,
0.8582959771156311,
-0.06918324530124664,
1.0123264789581299,... |
def are _ bst _ nodes _ in _ range ( tree, min _ val, max _ val ) : if tree is none : return true if ( ( min _ val is none or tree. val > min _ val ) and ( max _ val is none or tree. val < = max _ val ) ) : return ( are _ bst _ nodes _ in _ range ( tree. left, min _ val, tree. val ) and are _ bst _ nodes _ in _ range (... | [
-0.4219439625740051,
-0.48387759923934937,
0.6568504571914673,
0.506142795085907,
-0.3588472902774811,
0.38453516364097595,
-1.077677607536316,
-0.03167184069752693,
-1.1112663745880127,
0.17424242198467255,
-0.5482838749885559,
1.0012186765670776,
-0.21178947389125824,
0.6486629247665405,... |
def _ makecamera ( cls, policy = none, repositorydir = none, camerayamlfile = none ) : if not camerayamlfile : camerayamlfile = os. path. join ( lsst. utils. getpackagedir ( cls. packagename ), " policy ", " ztf. yaml " ) return yamlcamera. makecamera ( camerayamlfile ) | [
0.4459783434867859,
-0.08378536254167557,
0.2572747468948364,
-0.15148994326591492,
0.28517431020736694,
0.1626027673482895,
-0.34971144795417786,
0.7954922914505005,
1.0244218111038208,
0.3126518428325653,
0.11865795403718948,
0.001434172852896154,
0.6273649334907532,
0.41336897015571594,... |
def test _ create _ survey _ package _ instance _ success ( self, client ) : old _ amount = len ( client. all _ survey _ package _ instances ( record = " 000001 " ) ) body = create _ survey _ package _ instance _ body ( " 000001 ", fake = false ) feedback = client. create _ survey _ package _ instance ( * * body ) new ... | [
-0.35700151324272156,
0.596494197845459,
0.4622444808483124,
-0.07857247442007065,
0.07441996783018112,
0.76072096824646,
0.24291209876537323,
-0.4063151180744171,
0.7710526585578918,
0.296902596950531,
-1.1851557493209839,
-0.5250033140182495,
-0.39228108525276184,
0.06498384475708008,
... |
def create _ group ( self, name ) : if not self. _ handle. mode ( ). can _ write ( ) : raise valueerror ( " cannot create group with read - only permissions. " ) if name in self : raise keyerror ( " an object with name % s already exists " % name ) handle = _ z5py. create _ group ( self. _ handle, name ) return group (... | [
-0.025172093883156776,
0.15884099900722504,
0.4038509726524353,
-0.31225401163101196,
-0.6996487379074097,
0.28440526127815247,
1.147060513496399,
-1.6846367120742798,
-0.4377517104148865,
-0.4657125473022461,
-0.37027275562286377,
-0.11227042227983475,
-0.6047105193138123,
-0.359950274229... |
def display _ matrix ( self ) : for g, group in enumerate ( self. matrix ) : print ( " - - - - - - - - - - - - - - - - - - - - - " ) print ( " group ", str ( g + 2 ) + " : " ) print ( " - - - - - - - - - - - - - - - - - - - - - " ) formatted _ days = " " * 16 + " { day : < 16 } ". format ( day = " monday " ) + " { day ... | [
0.2833230793476105,
-0.29548192024230957,
1.060986876487732,
-0.9915888905525208,
-0.1940648853778839,
0.5321181416511536,
1.0041145086288452,
-0.5346596837043762,
-0.34325844049453735,
-0.15813632309436798,
1.4864741563796997,
1.2671501636505127,
-0.09401928633451462,
0.5582171082496643,
... |
def flowbuilder ( self ) : self. _ nodenet. is _ flowbuilder _ active = true yield self. _ nodenet. is _ flowbuilder _ active = false self. _ nodenet. update _ flow _ graphs ( ) | [
-0.12961426377296448,
-0.16950707137584686,
0.486825168132782,
0.6515872478485107,
-0.15248027443885803,
0.5104489326477051,
0.7807184457778931,
0.22135870158672333,
0.7697864770889282,
-0.9478313326835632,
-0.4099791646003723,
0.12866072356700897,
-0.890853762626648,
-0.03503431752324104,... |
def must _ be _ root ( cf ) : if not cf. am _ i _ root ( ) : print ( " run the program as root " ) sys. exit ( 1 ) | [
0.6563087701797485,
0.19933058321475983,
0.46615004539489746,
2.146700143814087,
0.2955414354801178,
1.1093666553497314,
1.170416235923767,
-0.6239075064659119,
-0.09217063337564468,
0.5975547432899475,
0.5362652540206909,
1.0440722703933716,
-0.7454544305801392,
0.8836867213249207,
0.59... |
def valid _ filename ( name ) : name = re. sub ( r'[ \ s \ w ] + ','_ ', name ) name = re. sub ('( ^ _ + | _ + $ ) ','', name ) return name | [
-0.383917897939682,
-1.0892024040222168,
0.9230385422706604,
-1.0299259424209595,
-1.247032880783081,
0.40353143215179443,
-0.5608658790588379,
0.8488642573356628,
0.05042843893170357,
0.2379138320684433,
-0.3772077262401581,
-0.22782669961452484,
0.49023425579071045,
0.6077902317047119,
... |
def brands ( self ) : return self. bynder _ request _ handler. get ( endpoint ='/ api / v4 / brands /') | [
-0.9165360927581787,
0.37302136421203613,
0.21613526344299316,
0.4713439345359802,
0.9083535075187683,
-0.46864771842956543,
-1.0786170959472656,
0.2815491259098053,
0.10139210522174835,
-0.49918442964553833,
0.23810254037380219,
1.8965706825256348,
-0.7361893653869629,
0.6538782119750977,... |
def gae ( rewards : np. ndarray, values : np. ndarray, gamma : float, lam : float ) - > np. ndarray : t, = rewards. shape v _ next = values [ 1 : ] v _ current = values [ : - 1 ] delta = rewards + gamma * v _ next - v _ current # convert to real time. t = lambda i : t - 1 - i return jax. lax. fori _ loop ( 0, t, lambda... | [
0.1625550091266632,
0.6275583505630493,
0.5592988133430481,
-0.5660892128944397,
0.6238499283790588,
-0.048686493188142776,
-0.18584027886390686,
-0.30999836325645447,
-0.5164582133293152,
0.9165023565292358,
0.7124146223068237,
0.7336016297340393,
0.33433228731155396,
-0.5402474403381348,... |
def test _ list _ alumno _ curso _ docente ( self ) : self. client. force _ authenticate ( user = self. user _ docente ) response = self. client. get ( " / api / alumnos / curso / list / " ) self. assertequal ( response. status _ code, status. http _ 200 _ ok ) self. assertequal ( response. data [ " count " ], 6 ) | [
0.4482167661190033,
0.23887628316879272,
0.43832728266716003,
0.060096532106399536,
0.39892908930778503,
0.8992559313774109,
-0.5434402823448181,
0.7117533683776855,
0.37005385756492615,
-0.059378430247306824,
-0.7296571731567383,
0.8650413155555725,
1.3855730295181274,
-0.3545314371585846... |
def feat _ standardize ( x ) : means = x. mean ( axis = 0 ) stds = x. std ( axis = 0 ) res = ( x - means ) / stds return res, means, stds | [
0.25822675228118896,
0.5189781188964844,
0.18451635539531708,
-0.11993339657783508,
-0.04972957447171211,
-0.6654725670814514,
0.361076682806015,
0.3094911575317383,
0.10690947622060776,
0.10552110522985458,
-1.1323727369308472,
0.5824381113052368,
0.5855212807655334,
-0.6283380389213562,
... |
def _ connected ( self, link _ uri ) : print ('connected to % s'% link _ uri ) self. log _ config1 = logconfig ( name ='stateangular1 ', period _ in _ ms = 10 ) self. log _ config1. add _ variable ('state. q0 ','float') self. log _ config1. add _ variable ('state. q1 ','float') self. log _ config1. add _ variable ('sta... | [
0.0712079331278801,
0.44720208644866943,
0.6774768829345703,
-0.4103383719921112,
0.8785766363143921,
-0.5207852125167847,
-0.3389977514743805,
-0.19617050886154175,
-0.39582985639572144,
-0.27851423621177673,
-0.2583271563053131,
-0.33981451392173767,
0.20317789912223816,
0.27220717072486... |
def listsub ( self, s1 = u'', s2 = u'' ) : for j in xrange ( len ( s2 ) ) : # print j, s1 [ j ], s2 [ j ], s1 [ j ] = = s2 [ j ] diverso = false if s1 [ j ]! = s2 [ j ] : diverso = true break if diverso : return none else : return s1 [ j + 1 : ] | [
0.23786433041095734,
-0.30814898014068604,
0.8256739377975464,
0.27948734164237976,
-0.8853680491447449,
-0.4797535240650177,
-1.0739415884017944,
-0.29071488976478577,
0.6464031934738159,
0.05721404403448105,
-0.6966290473937988,
1.500770092010498,
-1.0076192617416382,
-1.1369602680206299... |
async def _ parse _ http _ wl ( self, response ) : data = await self. _ parse _ http _ data ( response ) active _ wireless = data. get ('active _ wireless') if not active _ wireless : return [ ] # the dd - wrt ui uses its own data format and then # regex's out values so this is done here too # remove leading and traili... | [
-0.4885371923446655,
-0.24210484325885773,
0.4424689710140228,
-0.26483994722366333,
-0.33350875973701477,
-0.5103379487991333,
-0.5562299489974976,
-0.18876497447490692,
-0.26273688673973083,
-0.057718873023986816,
-0.13654404878616333,
0.09728274494409561,
-0.060332875698804855,
0.685605... |
def delete ( self, data ) : if not self. root or not isinstance ( data, ( int, float ) ) : return target = self. search ( data ) if not target : return if not target. left and not target. right : self. _ size - = 1 if not target. parent : self. root = none elif target. data > target. parent. data : target. parent. righ... | [
0.22282381355762482,
-0.05835162103176117,
1.247359275817871,
-0.3346089720726013,
-0.9472866654396057,
-0.14694365859031677,
0.49338221549987793,
-0.3056493103504181,
0.5398141145706177,
0.05188332498073578,
-0.5182942152023315,
0.5493273138999939,
-1.164145827293396,
0.41326048970222473,... |
def loop _ misc ( self ) : print ( " loop _ misc " ) if self. _ sock is none : # and self. _ ssl is none : return mqtt _ err _ no _ conn now = time. time ( ) self. _ check _ keepalive ( ) if self. _ last _ retry _ check + 1 < now : # only check once a second at most self. _ message _ retry _ check ( ) self. _ last _ re... | [
-0.5708340406417847,
-0.525737464427948,
0.7476601004600525,
-0.13106082379817963,
-0.5361142158508301,
0.5838632583618164,
-0.2853909134864807,
-1.2639743089675903,
0.08724197000265121,
-0.32160043716430664,
0.7395766973495483,
-0.37112370133399963,
-0.5649415850639343,
0.4106408655643463... |
def fitting ( k, numofvar, x1, ub, lb ) : x = [ ] z = [ ] reg = linear _ model. linearregression ( ) # print ( " starthey " ) r = - 0. 3 while ( r < 0. 3 and len ( x ) < 100 ) : for i in range ( n ) : input _ create ( k, inputfile, numofvar, x1, ub, lb ) os. system ( '. \ \'+ compilefile ) infile = open ( inputfile,'r'... | [
0.8860874176025391,
-0.5333882570266724,
0.6512038707733154,
-0.02178540639579296,
0.02199862152338028,
0.34726059436798096,
-0.3033616244792938,
0.19583956897258759,
-0.8657185435295105,
-0.045744046568870544,
-0.7467480301856995,
-0.027451714500784874,
-0.5046353936195374,
-0.27434742450... |
def point _ in _ roi ( point, roi ) : return roi. contains ( point ) # if ( point [ 0 ] < roi [ 2 ] and point [ 0 ] > roi [ 0 ] ) : # if ( point [ 1 ] < roi [ 3 ] and point [ 1 ] > roi [ 1 ] ) : # return true # return false | [
1.0143760442733765,
-1.1564658880233765,
0.7116625308990479,
0.6041041612625122,
-0.1978870928287506,
0.505953848361969,
-0.967606246471405,
0.12520544230937958,
0.2565326392650604,
0.374330073595047,
-0.33655473589897156,
-0.09589448571205139,
-1.1558594703674316,
-0.7608369588851929,
-... |
def test _ callbackresultchangesvalue ( self ) : sd = synchronousdeferred ( " foo " ) sd. addcallback ( lambda r : 42 ) self. assertequals ( sd. synchronize ( ), 42 ) | [
0.7162234783172607,
1.3714641332626343,
0.364743709564209,
0.24092315137386322,
0.06783710420131683,
-0.5053468942642212,
0.07442477345466614,
-0.4337185323238373,
0.6518575549125671,
-0.9851968884468079,
-1.3809500932693481,
0.15817773342132568,
0.02568342350423336,
0.7186875939369202,
... |
def _ _ sig _ figs ( self, num ) : if num! = 0 : return round ( num, config ['sig _ figs'] ) else : return 0 | [
-0.05574415996670723,
0.49129146337509155,
0.5306078791618347,
-0.13699668645858765,
0.0383828803896904,
-0.23636969923973083,
0.6503045558929443,
-0.296504408121109,
-0.18478761613368988,
-0.04884229600429535,
-0.24860075116157532,
-0.9411327838897705,
-0.1499909907579422,
0.6674065589904... |
def _ get _ dataset _ names ( self, included, excluded ) : lists = self. _ parse _ include _ lists ( included, excluded ) if lists is not none : dataset _ names = self. _ store. get _ dataset _ names ( include = lists [ 0 ], exclude = lists [ 1 ] ) log. debug ('dataset names % s ', dataset _ names ) else : dataset _ na... | [
0.0072752321138978004,
0.5271937847137451,
0.5377148985862732,
-0.32182520627975464,
-1.4926866292953491,
-0.17743557691574097,
-0.9673099517822266,
0.7842079997062683,
0.7526795268058777,
0.19804953038692474,
-0.1840886026620865,
0.9250816106796265,
0.11441817879676819,
-0.099082760512828... |
def save _ text ( self, filename _ or _ file _ object ) : if hasattr ( filename _ or _ file _ object,'read') : fi = filename _ or _ file _ object else : fi = open ( filename _ or _ file _ object, encoding ='utf - 8 ', mode = " w " ) for key in self. model. chain : outputstr = str ( key ) + " : " targetstr = " " if len ... | [
-0.6992695331573486,
-0.6337776184082031,
0.8290101885795593,
-0.033499374985694885,
-0.23038749396800995,
-0.11748712509870529,
-0.12907426059246063,
-0.04997514560818672,
-0.7274556159973145,
0.2264224737882614,
-0.1843641698360443,
-0.2855142056941986,
-0.3728790283203125,
0.39211326837... |
def read _ df _ from _ excel ( path, sheet ) : df = pd. read _ excel ( path, sheet _ name = sheet ) return df | [
0.6626227498054504,
-0.21115118265151978,
0.34568166732788086,
0.4354289472103119,
-0.2463754117488861,
0.5345582962036133,
-0.9219961762428284,
-0.1715937703847885,
-1.1339752674102783,
-0.4705471098423004,
0.9732540845870972,
0.5618917942047119,
0.4517124593257904,
-1.33383309841156,
0... |
def population _ register ( self ) - > dict [ int, person ] : reg = { } for couple in self. cs : for person in [ couple. hb, couple. wf ] : if person. id not in reg. keys ( ) and person. id is not none : reg [ person. id ] = person elif person. id is none : raise exception ( " " " cannot make population register with u... | [
-1.0968494415283203,
0.4172239601612091,
0.44635504484176636,
-0.2609585225582123,
-0.2089550495147705,
0.2470652014017105,
0.4998733699321747,
-0.22273939847946167,
-1.0760749578475952,
0.07921155542135239,
-0.9259827136993408,
-0.34483787417411804,
-0.15879864990711212,
1.031597971916198... |
def is _ good _ response ( resp ) : content _ type = resp. headers ['content - type']. lower ( ) return ( resp. status _ code = = 200 and content _ type is not none and content _ type. find ('html') > - 1 ) | [
-0.0029858462512493134,
-0.43127524852752686,
0.47010713815689087,
0.3268887996673584,
-0.3099951446056366,
-0.1523887664079666,
-0.4999449849128723,
-0.25336602330207825,
0.908390998840332,
0.03385379537940025,
-0.2913180887699127,
0.11667147278785706,
0.04289588704705238,
0.1104983836412... |
def simple _ rectangle ( height, width ) : textlist = [ ] for y in range ( 0, height ) : if y = = 0 : textlist. append ( box _ char ['lu'] + box _ char ['h'] * ( width - 2 ) + box _ char ['ru'] ) elif 0 < y < height - 1 : textlist. append ( box _ char ['v'] +'' * ( width - 2 ) + box _ char ['v'] ) else : textlist. appe... | [
-0.6529423594474792,
-0.954444169998169,
0.716555118560791,
-0.4839758574962616,
-0.5347864031791687,
-0.6628223061561584,
-0.9367408752441406,
0.26526349782943726,
0.24481752514839172,
-0.004593288991600275,
-1.006884217262268,
-0.32066619396209717,
-0.17214569449424744,
-0.00948145147413... |
def restore _ backup ( collection ) : latest _ backup = os. path. join ( backup _ path, os. listdir ( backup _ path ) [ - 1 ] ) zippath = os. path. join ( latest _ backup,'% s. zip'% collection ) jsonpath = os. path. join ( latest _ backup,'% s. json'% collection ) z = zipfile. zipfile ( zippath ) with open ( jsonpath,... | [
0.0080342972651124,
-0.5737932324409485,
0.8976444005966187,
-0.4528048038482666,
0.27095136046409607,
0.026161443442106247,
0.5436397790908813,
0.26450416445732117,
0.36303022503852844,
0.8126438856124878,
-0.5714417099952698,
0.1768975853919983,
-0.5675578117370605,
-0.5354294180870056,
... |
def checkmd5exist ( md5 ) : try : filename = db. session. query ( file ). filter ( file. md5 = = md5 ). first ( ). name return filename except exception as e : print e return none | [
0.2873747646808624,
-0.31197893619537354,
0.6098178029060364,
0.4268777072429657,
-0.8635228276252747,
0.17489515244960785,
0.8821274042129517,
-0.24470679461956024,
-0.5569833517074585,
1.4947633743286133,
0.42634788155555725,
-1.1009150743484497,
-0.6160745024681091,
0.05440087616443634,... |
def test _ public _ client _ auto _ approval ( self ) : data = {'client _ id': self. client _ public _ with _ no _ consent. client _ id,'response _ type':'code ','redirect _ uri': self. client _ public _ with _ no _ consent. default _ redirect _ uri,'scope':'openid email ','state': self. state, } response = self. _ aut... | [
-0.2567324936389923,
0.429733544588089,
0.4382580816745758,
0.3480534255504608,
-0.19507038593292236,
0.45847782492637634,
-0.2236870378255844,
-0.0728159174323082,
-0.2840268313884735,
-0.6601417064666748,
0.13145172595977783,
0.9644381403923035,
-0.40898776054382324,
-0.2876134514808655,... |
def results _ to _ str ( results ) : if results not in _ results _ to _ str : results = no _ result return _ results _ to _ str [ results ] | [
-0.895071268081665,
0.11623886227607727,
0.0032696847338229418,
-0.31886497139930725,
0.48803719878196716,
-0.7285125851631165,
-0.22866038978099823,
-1.3192566633224487,
0.0196253452450037,
0.2146967649459839,
0.22940006852149963,
-0.48477455973625183,
-0.031492941081523895,
0.10490934550... |
def make _ sandwich ( * toppings ) : print ( " making a sandwich with the following toppings : " ) for topping in toppings : print ( " - " + topping ) | [
-0.619798481464386,
-0.33878210186958313,
0.3920384347438812,
1.6778078079223633,
0.28079280257225037,
0.7592540979385376,
-0.6760222911834717,
0.3830106854438782,
-0.34458285570144653,
-0.7813240885734558,
-0.5154445171356201,
0.35018956661224365,
0.11583874374628067,
-0.14568805694580078... |
def create _ readable _ names _ for _ imagenet _ labels ( ) : # pylint : disable = g - line - too - long base _ url ='https : / / raw. githubusercontent. com / tensorflow / models / master / research / inception / inception / data /'synset _ url ='{ } / imagenet _ lsvrc _ 2015 _ synsets. txt '. format ( base _ url ) sy... | [
-0.9053865075111389,
-0.19949717819690704,
0.6766332983970642,
-1.4498708248138428,
0.16903865337371826,
0.32813429832458496,
-0.4404541254043579,
0.007958600297570229,
-0.634880542755127,
0.3121935725212097,
-0.47396180033683777,
-0.4583966135978699,
0.9612422585487366,
0.440634161233902,... |
def test _ is _ matching _ supply ( self ) : acceptable _ constraint = constraint ( " seller _ service ", constrainttype ( " = = ", " some _ service " ) ) matching _ query = query ( [ acceptable _ constraint ] ) is _ matching _ supply = self. strategy. is _ matching _ supply ( matching _ query ) assert is _ matching _ ... | [
-0.6092103719711304,
0.009254472330212593,
0.33850589394569397,
0.4294030964374542,
-0.1880262792110443,
0.4294343888759613,
-0.3224520981311798,
-0.10804297775030136,
1.0363484621047974,
0.26029452681541443,
0.010090474970638752,
-0.2131381332874298,
-0.02667243778705597,
-0.3973854482173... |
def plot _ correlation _ matrices ( chr _ list ) : for ch in chr _ list : ss _ ch = blockmatrix. read ('gs : / / nbaya / sumstats _ corr /'+ variant _ set +'_ ss _ correlation _ chr { }. bm / '. format ( ch ) ) gt _ ch = blockmatrix. read ('gs : / / nbaya / sumstats _ corr /'+ variant _ set +'_ gt _ correlation _ chr {... | [
0.28620845079421997,
-0.16578641533851624,
0.9082592725753784,
-0.4658212959766388,
-0.7266806364059448,
0.2811526656150818,
1.6020474433898926,
-0.510481595993042,
-0.2892380654811859,
0.6046227812767029,
0.12589144706726074,
1.4777872562408447,
-0.42555421590805054,
0.3451593816280365,
... |
def go _ to _ catalog _ page ( self ) : self. wait _ and _ click ( locator _ type = by. xpath, locator = self. constants. catalog _ button _ xpath ) from pages. catalog _ page import catalogpage return catalogpage ( self. driver ) | [
0.259063184261322,
0.8584860563278198,
0.3815298080444336,
-0.3652172088623047,
0.6424226760864258,
0.4598241448402405,
-0.5260941982269287,
0.11898129433393478,
-0.5289217829704285,
0.6467733383178711,
0.631295919418335,
0.49554944038391113,
0.0287760142236948,
-1.2096072435379028,
-0.3... |
def remove _ objects ( prefix ) : for obj in minio _ client. list _ objects ( bucket _ name, prefix = prefix, recursive = true ) : minio _ client. remove _ object ( bucket _ name, obj. object _ name ) | [
-0.2758748531341553,
-0.5828810930252075,
0.5906084775924683,
-0.34784743189811707,
-0.3873233497142792,
-0.3613727390766144,
-0.08687005937099457,
0.4994085431098938,
0.21990177035331726,
0.35577869415283203,
-1.4878724813461304,
0.28690487146377563,
-0.5261783599853516,
-0.14095315337181... |
def get _ value _ int ( self ) - > int : return int. from _ bytes ( self. value, " big " ) | [
0.17303024232387543,
0.3339358866214752,
0.34407657384872437,
-0.5397138595581055,
0.37981751561164856,
0.004171270411461592,
0.42098468542099,
0.18080541491508484,
-0.38821840286254883,
-0.3446965515613556,
-0.3252314031124115,
0.6260760426521301,
-0.08071637153625488,
-0.2602216899394989... |
def parse _ odlog ( odlog, blank, output ) : blank _ file = open ( blank + '. dat ','r') blank _ content = blank _ file. read ( ) blank _ file. close ( ) blank _ data = list ( map ( int, blank _ content. split ( ) ) ) btx = blank _ data [ 0 : : 2 ] brx = blank _ data [ 1 : : 2 ] odlog _ file = open ( odlog + '. dat ','... | [
0.7674436569213867,
-0.2759135961532593,
0.6581382751464844,
-0.6525219082832336,
0.05349021032452583,
-0.06915983557701111,
0.713432252407074,
-0.17161156237125397,
0.08461024612188339,
0.14167048037052155,
0.19880639016628265,
0.3000970780849457,
0.4473593533039093,
0.2844088077545166,
... |
def forward ( self, q _ seq, q _ mask, d _ seq, d _ mask, target _ span = none ) : d = self. encoder ( d _ seq, d _ mask ) q = self. encoder ( q _ seq, q _ mask ) # named q prime in paper q = torch. tanh ( self. fc _ question ( q ) ) # this is for questions only d _ t = torch. transpose ( d, 1, 2 ) # transpose each mat... | [
-0.25058478116989136,
-0.22539719939231873,
0.754932701587677,
-0.07813259959220886,
-0.7677414417266846,
-0.15646524727344513,
0.7220537066459656,
0.014859719201922417,
0.17435777187347412,
-0.39232301712036133,
-0.24686244130134583,
0.6362909078598022,
0.9193866848945618,
0.1141207516193... |
def lobatto ( alpha, beta, xl1, xl2 ) : from scipy. linalg import solve _ banded, solve n = len ( alpha ) - 1 en = np. zeros ( n ) en [ - 1 ] = 1 a1 = np. vstack ( ( np. sqrt ( beta ), alpha - xl1 ) ) j1 = np. vstack ( ( a1 [ :, 0 : - 1 ], a1 [ 0, 1 : ] ) ) a2 = np. vstack ( ( np. sqrt ( beta ), alpha - xl2 ) ) j2 = np... | [
0.8580084443092346,
-0.7369146347045898,
0.860131561756134,
-1.3950763940811157,
0.3314375579357147,
0.03712301328778267,
-0.5830777287483215,
-0.7249466180801392,
-0.8640323281288147,
0.3060222268104553,
-0.687619686126709,
0.40315455198287964,
-0.03743499144911766,
0.19065618515014648,
... |
def test _ wrong _ quantity _ type ( ) : test _ obj = uvtest ( ) test _ obj. _ quantity _ array. expected _ type = distance with pytest. raises ( valueerror, match = " uvparameter _ quantity _ array is a quantity " " object but not the appropriate type. ", ) : test _ obj. check ( ) | [
-0.019209859892725945,
-0.2974553108215332,
0.46171554923057556,
0.6442736387252808,
0.9863864183425903,
0.8533178567886353,
0.36602306365966797,
-0.36801496148109436,
0.5313250422477722,
0.2920323610305786,
0.17948812246322632,
0.3771977424621582,
-0.0772022157907486,
0.3403376340866089,
... |
def _ _ init _ _ ( self, cmd _ executor, api, host _ storage, grid _ engine, scale _ down _ handler, common _ utils, dry _ run ) : self. grid _ engine = grid _ engine self. api = api self. executor = cmd _ executor self. host _ storage = host _ storage self. scale _ down _ handler = scale _ down _ handler self. common ... | [
0.3191542327404022,
0.12116566300392151,
0.41415128111839294,
0.486114501953125,
0.9565948247909546,
0.019015846773982048,
0.08940328657627106,
0.01896892488002777,
-1.2545746564865112,
-0.2786923050880432,
0.12284068763256073,
-0.09169259667396545,
0.2940453588962555,
0.8801575899124146,
... |
def clear ( self ) : raise typeerror ( self. _ _ msg ) | [
0.1554415076971054,
0.4479241371154785,
0.3075547516345978,
0.09226066619157791,
0.27234748005867004,
0.6975821256637573,
0.3917800486087799,
-1.0415711402893066,
0.12409888207912445,
-0.12925666570663452,
0.9182014465332031,
1.863767385482788,
-0.6710208058357239,
0.8196061849594116,
-0... |
def sqrt ( nb ) : try : if nb = = 0. 0 : return 0 last = nb / 2. 0 while true : current = ( last + nb / last ) / 2 valabs = ( current - last ) if ( current - last ) > 0 else ( current - last ) * ( - 1 ) if valabs < 0. 00000001 : return current last = current except typeerror : raise typeerror ( " the argument must be a... | [
-0.11883846670389175,
0.12071571499109268,
0.4888491630554199,
0.2749941647052765,
-0.228359192609787,
0.09378255903720856,
-0.028631309047341347,
-1.1162652969360352,
0.3732863962650299,
-0.5364925265312195,
0.15781161189079285,
-0.23668405413627625,
-1.540576696395874,
1.0780802965164185... |
def test _ get _ permissions ( ) : app = publmock ( ) # test logged - out with app. test _ request _ context ('/'), orm. db _ session ( ) : record = model. entry. get ( id = 107 ) authed = entry. entry. load ( record ) assert not authed. authorized assert authed. permalink ( ) = ='/ 107'assert not authed. title ( ) ass... | [
0.19403280317783356,
0.6559157371520996,
0.6785503625869751,
0.0975089892745018,
0.45739924907684326,
0.24236950278282166,
0.19881097972393036,
-0.26950904726982117,
0.591209888458252,
-0.7587103247642517,
0.2517257034778595,
0.354749858379364,
0.5265688896179199,
0.0368465781211853,
-0.... |
def get _ sentence _ id ( self, line ) : line = line. strip ( ) words = line. split ('' ) sentence = list ( ) for w in words : sentence. append ( self. word _ dict [ w ] ) return sentence | [
0.751063883304596,
-0.40875130891799927,
0.3853502571582794,
0.25678080320358276,
0.4821038246154785,
-0.8526330590248108,
-0.9447693824768066,
0.12866930663585663,
0.03769519180059433,
1.3614524602890015,
-0.6588236093521118,
-0.6765800714492798,
-1.702354073524475,
0.39118605852127075,
... |
def linear _ program _ ineq ( self, c, a, b ) : if self. solver = = solver _ scipy : return _ scipy _ linear _ program _ ineq ( c, a, b ) elif self. solver = = solver _ gurobi : return _ gurobi _ linear _ program _ ineq ( c, a, b ) else : raise valueerror ('qp solver { } not available '. format ( self. solver ) ) | [
0.6005941033363342,
-0.7660712003707886,
0.5446563959121704,
-0.2522682547569275,
0.3269210755825043,
0.9179399013519287,
0.003414755454286933,
-0.6595544219017029,
0.11977674067020416,
0.3052838444709778,
-0.15246747434139252,
-0.06543440371751785,
-1.6340473890304565,
-1.0045145750045776... |
def get _ transfer _ by _ txid ( self, txid ) : cmd = { " method " : " get _ transfer _ by _ txid ", " params " : { " txid " : txid } } r = utils. curl ( cmd ) if r and " transfer " in r : # amount = r [ " amount " ] # fee = r [ " fee " ] # height = r [ " height " ] # note = r [ " note " ] # payment _ id = r [ " paymen... | [
0.4599066972732544,
-0.1803859919309616,
0.3365935981273651,
-0.27934327721595764,
-0.14590726792812347,
-0.3669310510158539,
-1.0182560682296753,
-1.1153740882873535,
0.49469658732414246,
-0.08276772499084473,
-0.42695561051368713,
0.549000084400177,
-0.4563072621822357,
0.275481581687927... |
def translate _ vector ( vec : np. ndarray, translation _ vector : np. ndarray ) - > np. ndarray : affine _ translation _ matrix = np. array ( [ [ 1. 0, 0. 0, translation _ vector [ 0 ] ], [ 0. 0, 1. 0, translation _ vector [ 1 ] ], [ 0. 0, 0. 0, 1. 0 ] ] ) affine _ vec = np. append ( vec, 1. 0 ) dst = np. dot ( affine... | [
0.20086216926574707,
-0.4184136688709259,
0.7431219816207886,
0.5152567028999329,
0.09994003921747208,
-0.3485020101070404,
-0.25157126784324646,
-0.2940884530544281,
-0.14286738634109497,
0.8964371085166931,
-0.22460468113422394,
0.49026861786842346,
0.697343111038208,
-0.6135538220405579... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.