text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def shape _ matrix _ broadcast ( * elements ) : return expand _ and _ broadcast ( * ( b. shape _ matrix ( element ) for element in elements ) ) | [
-0.26064661145210266,
0.06650368124246597,
0.382922887802124,
1.3434092998504639,
0.08162719011306763,
0.31524658203125,
0.5314949154853821,
0.16074614226818085,
0.7667214870452881,
0.29308807849884033,
0.1605633646249771,
0.7156180739402771,
-0.5409679412841797,
-0.2551015615463257,
-0.... |
def clientok2taskfinished ( sg, logger, event, args ) : if not event : return # 이벤트 내용을 문자열 ( 딕셔너리 ) 로 반환 # logger. info ( " % s " % str ( event ) ) # 이벤트 딕셔너리를 key와 value로 반환 for k, v in event. iteritems ( ) : logger. info ( " % s, % s " % ( k, v ) ) entity _ id = event [ " ent... | [
0.08376888185739517,
-0.465908944606781,
0.8942749500274658,
0.20445992052555084,
-0.821522057056427,
0.4162657558917999,
0.46788740158081055,
0.9143883585929871,
-0.9220759868621826,
2.151458263397217,
-1.2228707075119019,
0.6428534388542175,
0.840752363204956,
1.0676542520523071,
-0.09... |
def homoscedastic _ model ( w _ std, b _ std, width, depth, activation, parameterization ) : act = activation _ fn ( activation ) layers _ list = [ dense ( width, w _ std, b _ std, parameterization = parameterization ) ] def layer _ block ( ) : return stax. serial ( act ( ), dense ( width, w _ std, b _ std, parameteriz... | [
0.4795525074005127,
0.014342335052788258,
0.7082443833351135,
1.0023409128189087,
-0.017063884064555168,
-0.49067166447639465,
0.311303049325943,
-0.06711088120937347,
-0.6812335252761841,
-0.15039271116256714,
-0.41106972098350525,
0.4064203202724457,
0.6697893142700195,
-0.05644686892628... |
def ycbcr2rgb ( img : np. ndarray ) - > np. ndarray : img _ type = img. dtype img = _ convert _ input _ type _ range ( img ) * 255 out _ img = np. matmul ( img, [ [ 0. 00456621, 0. 00456621, 0. 00456621 ], [ 0, - 0. 00153632, 0. 00791071 ], [ 0. 00625893, - 0. 00318811, 0 ] ] ) * 255. 0 + [ - 222. 921, 135. 576, - 276.... | [
-0.3286718726158142,
-0.39345940947532654,
1.1491916179656982,
-0.016047881916165352,
0.6887396574020386,
0.03644280135631561,
1.0133637189865112,
-0.31986454129219055,
0.14119283854961395,
0.666784405708313,
-0.5759314894676208,
0.7113596796989441,
-0.3977852165699005,
1.1709604263305664,... |
def batch _ physical _ sim _ run ( sim _ key ) : fileset = datapath _ db. fetch ( sim _ key, intend _ read = true ) for index in fileset [ 0 ] : map1 _ file = fileset [ 1 ] [ index ] map2 _ file = fileset [ 1 ] [ index ] caller. execute ( map1 _ file, map2 _ file ) caller. multiprocess _ stack ( ) | [
-0.5067076086997986,
-0.2429725080728531,
0.585077702999115,
1.113695740699768,
0.43987348675727844,
0.3109011948108673,
-0.14965756237506866,
-0.1770557016134262,
-0.977946400642395,
0.02883368730545044,
0.23333501815795898,
-0.16751183569431305,
-0.12632788717746735,
-0.10405824333429337... |
def test _ epoch _ create ( ) : global dbusdaemon proc, filename, socks = test _ experiment. start _ experiment ( dbusdaemon ) # now check that the device lives on the bus dbus _ test _ bus = dbus. bus. busconnection ( dbusdaemon. address ) p = dbus _ test _ bus. get _ object ( " soma. recording. experiment ", " / soma... | [
0.4150121212005615,
1.592910647392273,
0.3540574908256531,
0.07688141614198685,
0.5238488912582397,
0.7655965685844421,
0.3626541495323181,
0.7388165593147278,
-0.7858529686927795,
-0.18002378940582275,
-0.37278124690055847,
0.2516242563724518,
-0.9431535005569458,
-0.20526273548603058,
... |
def set _ active _ filter _ switch ( self, switch _ visible : bool ) : self. _ options. update ( { " show _ active _ status _ filter " : switch _ visible } ) self. edit ( options = self. _ options ) | [
-0.18867723643779755,
-0.7018534541130066,
0.5047591328620911,
0.2518465518951416,
-0.27004551887512207,
0.5471369624137878,
0.9159966111183167,
0.11672604084014893,
0.14772705733776093,
0.2860479950904846,
-0.6528887748718262,
0.9837302565574646,
0.1165730208158493,
-0.39646974205970764,
... |
def test _ lazy _ load ( self ) : self. create _ volume _ objects ( ) vol = self. ep. search ( " volumes ", id _ _ gt = 1 ). hits [ 0 ] vol. volume _ group. name | [
-0.04310892894864082,
0.3424590229988098,
0.3988921046257019,
-0.9672061204910278,
0.7813419103622437,
-0.7216578722000122,
-0.11065933853387833,
-1.3515076637268066,
-0.021959153935313225,
-0.7321644425392151,
0.08937260508537292,
-0.3334258198738098,
0.1664508879184723,
0.208659321069717... |
def lookat ( self, point ) : p = point - self. position zaxis = np. array ( [ 0, 0, 1 ] ) axis = np. cross ( p, zaxis ) axis = axis / np. linalg. norm ( axis, 2 ) # the norm of zaxis is 1 angle = np. arccos ( p. dot ( zaxis ) / np. linalg. norm ( p ) ) r = rotationmatrix ( axis, angle ) # embed 3x3 rotation matrix in a... | [
0.5228187441825867,
0.603557288646698,
0.5014429092407227,
-0.44442805647850037,
0.0557260699570179,
-0.21847397089004517,
0.29363059997558594,
0.2024688422679901,
0.66933673620224,
-0.06948485225439072,
-0.18907591700553894,
-0.5240187644958496,
-0.5076196193695068,
-1.1670515537261963,
... |
def reset ( self ) : self. _ path _ find. reset ( ) | [
-0.26372408866882324,
-0.23841728270053864,
0.09327220916748047,
0.8974930644035339,
1.314251184463501,
0.18798799812793732,
2.188227891921997,
-0.3923993706703186,
-1.2885297536849976,
-0.03491330146789551,
0.3605988919734955,
0.9597880840301514,
-0.6571375131607056,
-0.5496529340744019,
... |
def interactive _ plotting ( self, fvals ) : maxgen = ( self. maxeval - self. numinit ) / ( self. nsamples * self. ncenters ) curgen = ( self. numeval - self. numinit ) / ( self. nsamples * self. ncenters ) + 1 cent _ fvals = [ rec. fx for rec in self. centers ] cent _ fvals = np. asarray ( cent _ fvals ) plt. show ( )... | [
0.6633272171020508,
0.09415888041257858,
0.7704260349273682,
0.08426371216773987,
-0.3621758222579956,
0.4552675187587738,
0.7160729765892029,
0.4226548671722412,
-0.741918683052063,
-1.1208953857421875,
0.6250751614570618,
0.48306339979171753,
-0.3556091785430908,
0.4599744379520416,
0.... |
def testcreatediskcopy1 ( self, mock _ gce _ api, mock _ get _ instance, mock _ get _ boot _ disk, mock _ get _ disk, mock _ block _ operation, mock _ disk _ type ) : instances = mock _ gce _ api. return _ value. instances. return _ value. aggregatedlist instances. return _ value. execute. return _ value = mock _ insta... | [
-0.14078368246555328,
0.6808736324310303,
0.7875469326972961,
0.45424631237983704,
0.29169848561286926,
0.7692586779594421,
0.8557025790214539,
-0.49227744340896606,
-0.7116908431053162,
-0.2403755784034729,
0.01428312249481678,
0.23524293303489685,
-0.053123753517866135,
0.615528762340545... |
def _ _ merge ( self, left, right ) : new _ lst = left + right l, r = 0, 0 for i in range ( len ( left ) + len ( right ) ) : lval = left [ l ] if l < len ( left ) else none rval = right [ r ] if r < len ( right ) else none if ( lval and rval and lval < rval ) or rval is none : new _ lst [ i ] = lval l + = 1 elif ( lval... | [
-0.45141926407814026,
-0.17867343127727509,
0.7526350617408752,
-0.27560561895370483,
-0.4009512960910797,
-0.10955297201871872,
-1.401505470275879,
0.038921330124139786,
0.10173460096120834,
-0.05767127871513367,
-1.2814491987228394,
-0.2960027754306793,
-0.9732782244682312,
0.61310106515... |
def configure ( self, instances ) : pass | [
-1.773577332496643,
-0.01671220362186432,
0.16534598171710968,
0.1441909521818161,
0.5192291140556335,
-0.1179196834564209,
0.24099940061569214,
0.41762271523475647,
-0.2341594696044922,
0.45235195755958557,
-0.39713358879089355,
-0.4493679106235504,
-0.2258741706609726,
1.1090463399887085... |
def square _ of _ sum ( num _ list ) : square _ of _ sum = 0 for num in num _ list : square _ of _ sum + = num return square _ of _ sum * * 2 | [
-0.034765731543302536,
-0.6336891651153564,
0.41239503026008606,
0.9636488556861877,
0.8294204473495483,
-0.2184041142463684,
0.6476747989654541,
0.03947465494275093,
1.2211709022521973,
0.15888316929340363,
-1.8673800230026245,
0.2443268597126007,
-0.10265571624040604,
0.48397403955459595... |
def log _ in ( self, username, password ) : log _ in = true username = username. get ( ) password = password. get ( ) if username = = " " or password = = " " : messagebox. showerror ( " error! ", " please enter your username and password! " ) log _ in = false else : database = database ( ) sql _ command = " select pass... | [
-0.5490595698356628,
-0.4703793525695801,
0.956547737121582,
0.5554447174072266,
-0.639534056186676,
0.3390502631664276,
0.2936709523200989,
1.0035228729248047,
0.48512983322143555,
0.03890882804989815,
-0.10279965400695801,
-0.1138782650232315,
-0.9384953379631042,
0.4456038773059845,
0... |
def infer _ border ( image ) : borders = np. concatenate ( [ image [ 0 ], image [ :, 0 ], image [ - 1 ], image [ :, - 1 ] ] ) if len ( image. shape ) = = 3 : border _ values = np. reshape ( borders, [ - 1, 3 ] ) # return np. mean ( border _ values, axis = 0 ) return most _ frequent ( border _ values [ 0 ] ), most _ fre... | [
0.30623283982276917,
0.8844654560089111,
0.7853513956069946,
1.2714093923568726,
0.6553770303726196,
-0.21628504991531372,
0.3384896516799927,
-0.33551570773124695,
0.2276792824268341,
-0.3477117121219635,
-0.050971873104572296,
0.1458696722984314,
-0.19843485951423645,
1.2648288011550903,... |
def read _ data ( file _ path ) : with open ( file _ path ) as f : sample _ data = [ ] lines = f. readlines ( ) filename = os. path. basename ( file _ path ) for line in lines : attr = format _ attributes ( filename, line ) if attr : sample _ data. append ( attr ) return sample _ data | [
0.3633142411708832,
-1.523769736289978,
0.5561913847923279,
-0.4212736487388611,
-0.5138548612594604,
0.41754937171936035,
-0.5081286430358887,
1.0068647861480713,
-0.5172635316848755,
0.2236960083246231,
0.6006630659103394,
0.3294353783130646,
0.8303093314170837,
0.3603896498680115,
-0.... |
def sparse _ segment _ sqrt _ n ( data, indices, segment _ ids, name = none, num _ segments = none ) : if num _ segments is not none : return gen _ math _ ops. sparse _ segment _ sqrt _ n _ with _ num _ segments ( data = data, indices = indices, segment _ ids = segment _ ids, num _ segments = num _ segments, name = nam... | [
-0.03902111202478409,
-0.2801339328289032,
0.335440069437027,
0.08241824060678482,
0.3142506778240204,
-0.8080570697784424,
-0.42905911803245544,
-0.1703530251979828,
1.5489542484283447,
0.2963530421257019,
-0.2833862900733948,
0.07999284565448761,
-0.3555011451244354,
-1.0074244737625122,... |
def read ( options, args ) : try : name = args [ 0 ] except indexerror : name = none name, stdin ='-'= = name and ( none, true ) or ( name, false ) try : if not os. isatty ( sys. stdin. fileno ( ) ) or stdin : try : # todo this implementation won't be able to find source # tarballs that should be associated with the bl... | [
0.06861279159784317,
-0.583552360534668,
0.904032826423645,
0.4225221276283264,
-0.2423262745141983,
0.00722886249423027,
0.09224029630422592,
-0.375960111618042,
-0.11417220532894135,
0.4836372435092926,
0.6344289779663086,
0.4861082434654236,
-0.9292734265327454,
-0.24744485318660736,
... |
def playattacksound ( self ) : pygame. mixer. channel ( 0 ). play ( pygame. mixer. sound ( configuration. sound _ attack + str ( random. randint ( 1, 6 ) ) + ". ogg " ) ) | [
0.4046757221221924,
-0.7528958916664124,
0.7218413949012756,
-0.5852423310279846,
0.6896932125091553,
0.23342713713645935,
-0.16148504614830017,
-1.0270622968673706,
0.22897009551525116,
0.18257471919059753,
0.8040254712104797,
0.7327715754508972,
-0.4393880367279053,
-0.4521745443344116,
... |
def onvaluechanged ( self, event ) : obj = event. source role = obj. getrole ( ) value = obj. queryvalue ( ) if " oldvalue " in self. pointofreference \ and ( value. currentvalue = = self. pointofreference [ " oldvalue " ] ) : return if role = = pyatspi. role _ progress _ bar : self. handleprogressbarupdate ( event, ob... | [
0.7690710425376892,
-0.6338925957679749,
0.5965120792388916,
0.3447217643260956,
0.019853292033076286,
0.3108232915401459,
0.4642415940761566,
-0.9297913908958435,
0.7042697072029114,
0.350035160779953,
0.4476121664047241,
0.13638944923877716,
-0.2977150082588196,
0.6949785351753235,
0.5... |
def set _ z ( self, z ) : with self. lock : self. _ _ set _ z _ _ ( z ) | [
-1.059037446975708,
-0.1667151302099228,
0.0821629986166954,
0.9888726472854614,
-0.12436972558498383,
-0.2695409655570984,
1.1785809993743896,
-0.6195534467697144,
0.788236141204834,
-0.5835146307945251,
-1.2328468561172485,
0.8010212182998657,
-0.4700547754764557,
0.14244915544986725,
... |
def test _ neutral _ nstat _ model ( self ) : opt = dict ( max _ evaluations = 2, limit _ action = " ignore " ) aln = load _ aligned _ seqs ( " data / ensg00000198712. fa ", moltype = " dna " ) neutral = evo _ app. natsel _ neutral ( " gnc ", opt _ args = opt, gc = 2 ) result = neutral ( aln ) # 11 rate matrix params f... | [
0.48071548342704773,
-0.05553951486945152,
0.35475245118141174,
-0.8768959045410156,
0.835703432559967,
0.8307881355285645,
-0.4637937843799591,
-0.3940785229206085,
-0.05378023535013199,
-0.11631390452384949,
-0.39138156175613403,
0.14819076657295227,
-0.01841455139219761,
-0.063933558762... |
def get _ all _ by _ version _ ids ( version _ ids ) : return templateversionmanager. get _ all _ by _ version _ ids ( version _ ids ) | [
-0.046886954456567764,
-1.1924083232879639,
0.32176709175109863,
1.1190788745880127,
-0.3486199676990509,
-0.546297550201416,
-0.7607173919677734,
-0.23440174758434296,
0.5649222731590271,
0.9653714895248413,
-0.3622417449951172,
0.18352320790290833,
-0.022276993840932846,
0.68948841094970... |
def test _ respin _ ceph _ pods ( self, resource _ to _ delete ) : # get info from scale _ data _ file for validation if scale _ data _ file : file _ data = templating. load _ yaml ( scale _ data _ file ) namespace = file _ data. get ( " namespace " ) pod _ scale _ list = file _ data. get ( " pod _ scale _ list " ) pvc... | [
-0.3537810146808624,
-1.0812667608261108,
0.8014295697212219,
0.2732273042201996,
0.9073212146759033,
0.6981071829795837,
0.007546866312623024,
-0.27118411660194397,
0.35949063301086426,
0.18033859133720398,
-0.058324139565229416,
-0.8009428977966309,
0.20883779227733612,
0.278889894485473... |
def write _ to _ file ( f, entities, format, * * kw ) : format = format. lower ( ) if format not in writers : raise fileformaterror ( " unsupported file format % s " % format ) writer = writers [ format ] writer ( f, entities, * * kw ) | [
-0.5794684886932373,
-0.7038790583610535,
0.2134017050266266,
0.27130988240242004,
0.7837207913398743,
0.13894794881343842,
-0.2372066080570221,
0.4527736008167267,
-1.0228652954101562,
-0.3483442962169647,
0.8181588053703308,
-0.25902900099754333,
0.7825822830200195,
0.7086666822433472,
... |
def _ zeros _ like _ csr _ tensor ( x ) : values = f. zeros _ like ( x. values ) return f. make _ csr _ tensor ( x. indptr, x. indices, values, x. shape ) | [
0.4442339241504669,
0.059434812515974045,
0.19165240228176117,
-0.8779711127281189,
-0.6004801988601685,
0.44919705390930176,
-0.5213935375213623,
0.5038825273513794,
0.2717377841472626,
-0.10764554142951965,
0.3546483814716339,
0.3681955635547638,
0.8143009543418884,
-1.6602085828781128,
... |
def sloppy _ gdb _ parse ( s ) : try : val = gdb. parse _ and _ eval ( s ) # we can't just return int ( val ) because gdb may return : # " python exception < class'gdb. error'> cannot convert value to long. " # e. g. for : # pwndbg > pi int ( gdb. parse _ and _ eval ('_ _ libc _ start _ main') ) # # here, the _ mask _ ... | [
0.3280874192714691,
-0.1324004977941513,
0.6478196978569031,
-0.15547575056552887,
-0.6340320110321045,
-0.2957495152950287,
0.21688205003738403,
-0.5688014030456543,
0.5339267253875732,
-0.05610787868499756,
-0.3021620512008667,
-0.38788697123527527,
-0.1250753253698349,
0.437515974044799... |
def run ( self, command, arguments = none ) : self. lock. acquire ( ) self. parent _ connection. send ( ( command, arguments ) ) result = self. parent _ connection. recv ( ) self. lock. release ( ) return result | [
-0.5689857602119446,
0.3196345567703247,
0.733651340007782,
0.019774410873651505,
0.1193828135728836,
-0.25117647647857666,
-0.25971248745918274,
-0.7439813017845154,
-0.746317446231842,
-0.31586095690727234,
-0.6614677906036377,
0.340099573135376,
-1.9816628694534302,
-0.3195469379425049,... |
def length ( a, b, degrees = true ) : if has _ c _ ufuncs : result = math _ util. length ( a, b ) else : a = np. asanyarray ( a ) b = np. asanyarray ( b ) a2 = a * * 2. 0 al = np. sqrt ( np. sum ( a2, axis = - 1 ) ) b2 = b * * 2. 0 bl = np. sqrt ( np. sum ( b2, axis = - 1 ) ) a = a / two _ d ( al ) b = b / two _ d ( bl... | [
0.10203544795513153,
0.31634336709976196,
0.5912708640098572,
-0.6763411164283752,
-0.18842022120952606,
0.004359642043709755,
0.2896849811077118,
0.6588329076766968,
0.5008813738822937,
0.7848294377326965,
0.37359699606895447,
0.07764492183923721,
-0.07673071324825287,
-0.5289484858512878... |
def multi _ head _ attention ( x, counters, dropout, num _ head = 8, reuse = false ) : x _ size = x. get _ shape ( ) [ - 1 ]. value k _ size = x _ size / / num _ head v _ size = x _ size / / num _ head name = get _ name ('multihead _ attention ', counters ) with tf. variable _ scope ( name ) : if reuse : tf. get _ vari... | [
0.3422110080718994,
0.09301229566335678,
0.7898841500282288,
1.0239986181259155,
-0.6436361074447632,
-0.8265226483345032,
0.5682603716850281,
-0.7871374487876892,
0.781755805015564,
0.5559414029121399,
-0.7390496730804443,
0.7404035329818726,
0.12026932835578918,
-0.1430104523897171,
0.... |
def control _ finding _ generator ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " control _ finding _ generator " ) | [
0.2236500084400177,
0.18690884113311768,
0.5646864771842957,
0.33779385685920715,
0.6994165778160095,
1.3998055458068848,
0.7950737476348877,
-0.6747541427612305,
0.30694741010665894,
-0.9214391708374023,
0.1389969438314438,
-0.29191020131111145,
0.15701903402805328,
-0.565209150314331,
... |
def write _ summary ( tpipe, tduct, upipe, rpipe, uduct, rduct ) : summary = [ ] summary. append ( " pipe insulation : " ) summary. append ( " { res } found { num } rogue pipe insulation elements. ". format ( num = len ( rpipe ), res = error if len ( rpipe ) else check ) ) summary. append ( " { res } found { num } unho... | [
-1.6473288536071777,
-0.08178477734327316,
0.5998678803443909,
-1.2151570320129395,
0.6691646575927734,
0.2098255604505539,
0.4824674725532532,
0.23946930468082428,
-0.8043009042739868,
0.43808940052986145,
-0.4155498445034027,
-0.4285910427570343,
-0.20650960505008698,
-0.0509332641959190... |
def test _ dis _ domain ( arr _ n _ 0, arr _ theta, arr _ lam _ z, arr _ kl, arr _ n _ layers, arr _ r _ i ) : omega, m, k, k _ total, lam _ x = sbp. calc _ wave _ params ( arr _ n _ 0, arr _ theta, arr _ lam _ z ) l = sbp. calc _ layer _ thickness ( arr _ kl, k ) z _ i, z0 _ str, zf _ str, z _ t, zf _ dis, lz _ dis = ... | [
0.40418165922164917,
-0.22647354006767273,
0.5615298748016357,
-0.10498839616775513,
0.012438400648534298,
0.86127769947052,
0.9362860918045044,
-0.07370404154062271,
0.4570882022380829,
-0.6842461824417114,
-0.31218016147613525,
0.5192834734916687,
-0.5196607708930969,
1.3854960203170776,... |
def billing _ address2 ( self ) : return self. _ billing _ address2 | [
0.16990695893764496,
-0.8195064663887024,
0.41750314831733704,
1.3462824821472168,
-0.7064964771270752,
0.573318362236023,
0.6923575401306152,
0.06771481782197952,
0.1043003499507904,
-0.7153921723365784,
-0.30769097805023193,
1.0827659368515015,
0.19726994633674622,
0.6199237704277039,
... |
def check _ repository ( self, path, * args, * * kwargs ) : self. _ api _ get ( path ) | [
-1.1473352909088135,
-0.18115349113941193,
0.2959137558937073,
-0.44130268692970276,
0.7199727296829224,
-0.31037580966949463,
-0.8245462775230408,
-0.33596527576446533,
-0.351458340883255,
0.1973036676645279,
0.1806873083114624,
0.9897525310516357,
-0.22295138239860535,
-0.463340133428573... |
def updatebulkstatus ( ctx, # mandatory main parameter key, # mandatory main parameter status, # optional main parameter percentcomplete = none, # optional main parameter message = none, # optional main parameter attributes = none ) : " " " startbulkvolumeread or startbulkvolumewrite methods. " " " cli _ utils. establi... | [
-1.007724642753601,
-1.094625473022461,
0.9396622776985168,
0.3018416464328766,
0.5018118023872375,
-0.2873803377151489,
0.14461015164852142,
-0.3040263056755066,
-0.2049846202135086,
0.888485312461853,
-0.23280879855155945,
0.9101471304893494,
-0.7925919890403748,
0.15049774944782257,
-... |
def getnewbrailletext ( accessible, label = " ", eol = " ", startoffset = none, endoffset = none ) : return braille. text ( accessible, label, eol, startoffset, endoffset ) | [
0.5332425832748413,
-1.2116625308990479,
0.6031287312507629,
-0.5564050078392029,
-0.9003482460975647,
0.3891722857952118,
-0.8805810809135437,
-0.05967216193675995,
-0.07283926010131836,
0.11580599844455719,
-0.38226062059402466,
0.9255083799362183,
-0.3885337710380554,
-1.146833300590515... |
def gender _ pref ( prev _ matches _ sex ) : num _ female = len ( np. where ( prev _ matches _ sex = = 1 ) [ 0 ] ) num _ male = len ( np. where ( prev _ matches _ sex = = 0 ) [ 0 ] ) pref _ female = num _ female / ( num _ male + num _ female ) pref _ male = 1 - pref _ female return pref _ female, pref _ male | [
-0.7355693578720093,
0.379375696182251,
0.7458294630050659,
-0.18968643248081207,
-0.18391132354736328,
-0.3164960443973541,
0.5921463966369629,
0.6064450740814209,
-0.3436972498893738,
0.26512837409973145,
-0.2034350335597992,
0.7359601259231567,
-0.19180157780647278,
0.3528293967247009,
... |
def get _ spline _ params ( points ) : distances = np. linalg. norm ( points - np. roll ( points, - 1, axis = 0 ), axis = 1 ) distances = np. roll ( np. cumsum ( distances / np. sum ( distances ) ), 1 ) distances [ 0 ] = 0 params = np. concatenate ( ( distances, [ 1 ] ) ) y = np. concatenate ( ( points [ :, 0 ], [ poin... | [
0.1117008849978447,
0.1066703125834465,
0.47646212577819824,
0.03305414691567421,
-0.34659749269485474,
-0.022257404401898384,
0.28702911734580994,
1.4917798042297363,
0.7614814639091492,
1.0692812204360962,
-0.5016013383865356,
0.1933380365371704,
0.6479113698005676,
0.04894173890352249,
... |
def does _ create _ cycle ( tour _ list, new _ edge ) : current _ v = new _ edge. v1 current _ e = new _ edge done = false while not done : found = false for edge in tour _ list : if edge = = current _ e : continue if edge. v1 = = current _ v or edge. v2 = = current _ v : found = true if edge. v1 = = current _ v : curr... | [
-0.7981941103935242,
-0.416845440864563,
0.8300859928131104,
0.1445419043302536,
-0.1541556566953659,
0.4355534017086029,
0.23361584544181824,
0.06922569870948792,
0.08972130715847015,
1.2041844129562378,
-0.6220607161521912,
-0.42129799723625183,
-0.6091901659965515,
-0.14673909544944763,... |
def main ( ) : creds = none if os. path. exists ('token. pickle') : with open ('token. pickle ','rb') as token : creds = pickle. load ( token ) if not creds or not creds. valid : if creds and creds. expired and creds. refresh _ token : creds. refresh ( request ( ) ) else : flow = installedappflow. from _ client _ secre... | [
-0.010241319425404072,
0.3469206392765045,
0.7298756837844849,
-0.06947942078113556,
0.35697272419929504,
-0.5802271366119385,
-0.4647468030452728,
-0.41879957914352417,
-0.36350128054618835,
-0.31998538970947266,
0.7234020233154297,
1.4080126285552979,
-0.6677533388137817,
0.5939498543739... |
def generate _ price _ pred _ dataset ( self ) : cols = ['zipcode ','property _ type ','room _ type ','accommodates ','bathrooms ','bedrooms ','beds ','amenities ','price ','review _ scores _ value'] # convert a few columns to numeric types new _ df = self. process _ zipcode ( self. df [ cols ] ) new _ df = self. add _... | [
-1.1982169151306152,
0.39290592074394226,
0.6159446239471436,
-0.20490793883800507,
-0.05930820479989052,
0.28716957569122314,
-0.47180110216140747,
0.47878286242485046,
-0.2353329062461853,
-0.0051368665881454945,
0.7580074071884155,
0.1317654848098755,
0.04336307942867279,
0.141982480883... |
def _ find _ dirs _ if _ needed ( self ) : if self. _ root _ dir is none : self. _ find _ dirs ( ) | [
-0.4855138659477234,
-0.0818312019109726,
0.5839273929595947,
0.6966638565063477,
0.4380840063095093,
-0.46549925208091736,
0.8001394271850586,
-0.9189857840538025,
-0.09855052083730698,
-0.8818588256835938,
0.3286936581134796,
-0.02386253885924816,
-0.377968430519104,
2.0160202980041504,
... |
def print _ coefficients ( self ) : coefficients = self. get _ coefficients ( ) labels = self. get _ labels ( ) df = dataframe ( data = coefficients, index = labels, columns = [ " coefficients " ] ) print ( df, " \ n " ) | [
0.016093555837869644,
-0.32521361112594604,
0.44109413027763367,
-0.7731518745422363,
0.6894659996032715,
-0.6653447151184082,
-0.2344563603401184,
-0.3795207440853119,
-0.7843696475028992,
-1.2028477191925049,
0.4478938579559326,
1.3779689073562622,
-0.009958161041140556,
-0.6281050443649... |
def _ parsedocspec ( self, docspec ) : if isinstance ( docspec, basestring ) : docspecf = stringio. stringio ( docspec ) else : docspecf = docspec udocspecf = codecs. getreader ('utf - 8') ( docspecf ) document = document ( ) # parse the input document, separating markdown content sections from # ontology entities sect... | [
0.7000898718833923,
-0.04905425012111664,
0.3886450529098511,
-0.6571085453033447,
-0.7077692151069641,
0.07528814673423767,
0.07664956152439117,
-0.42819303274154663,
-0.11078528314828873,
-0.2535882294178009,
0.8601208925247192,
-0.41942423582077026,
0.15052156150341034,
-0.4889078736305... |
def read _ json _ param _ objects ( reform, assump ) : # pylint : disable = too - many - branches # first process second assump parameter assert assump is none if assump is none : cons _ dict = dict ( ) behv _ dict = dict ( ) gdiff _ base _ dict = dict ( ) gdiff _ resp _ dict = dict ( ) growmodel _ dict = dict ( ) elif... | [
-1.0957794189453125,
-0.4706697463989258,
0.895461916923523,
-1.002833604812622,
-0.05706340819597244,
0.4405890107154846,
0.4040866494178772,
-0.5709980130195618,
-0.4400428235530853,
0.6984949111938477,
-0.1916535496711731,
-0.0009675233159214258,
0.6866886019706726,
0.35825201869010925,... |
def list _ objects ( self, container _ name, headers = none, params = none, requestslib _ kwargs = none ) : url ='{ 0 } / { 1 } '. format ( self. storage _ url, container _ name ) response = self. get ( url, headers = headers, params = params, requestslib _ kwargs = requestslib _ kwargs ) return response | [
-1.1847611665725708,
-0.3712010979652405,
0.8457027077674866,
0.17567375302314758,
0.6186873912811279,
-0.9000571370124817,
-0.7416428923606873,
-1.211063265800476,
0.3645944893360138,
0.5576327443122864,
-0.5120651721954346,
0.4714968204498291,
-0.2581920325756073,
-0.020721163600683212,
... |
def weight _ wing ( self ) : return self. structural _ weight _ per _ area * self. s | [
0.5172777771949768,
-0.7420011162757874,
0.41399383544921875,
-0.07193371653556824,
-0.07712894678115845,
1.0107626914978027,
0.5724225640296936,
-0.2880323827266693,
-0.3017100989818573,
-0.6582942008972168,
0.6273375153541565,
0.31869128346443176,
-0.17002588510513306,
0.9497386813163757... |
def remove _ periodic _ info ( self, key ) : info _ to _ stop = self. periodic _ infos [ key ] info _ to _ stop. stopsend ( ) del ( self. periodic _ infos [ key ] ) | [
-1.001216173171997,
-0.6227878928184509,
0.26442474126815796,
-0.582816481590271,
-0.7288660407066345,
0.3027818202972412,
-0.2984669804573059,
-0.1436161994934082,
-1.2067394256591797,
0.3783850371837616,
-0.09036404639482498,
-0.3530524969100952,
-0.6540810465812683,
-0.06960232555866241... |
def mean _ tree ( node, outcomes ) : if set ( [ d. name for d in node. descendants ( ) ] )! = set ( outcomes. keys ( ) ) : raise exception ( " it looks like the outcomes list you provided was meant for a different tree. " ) new _ tree = copy. deepcopy ( node ) for ability _ name in outcomes. keys ( ) : new _ tree. desc... | [
-0.10330108553171158,
0.060097988694906235,
0.5587572455406189,
-0.5858866572380066,
-0.9435359835624695,
0.6161994338035583,
-0.5393660068511963,
0.4933292865753174,
0.4029105603694916,
1.040623664855957,
0.6769499778747559,
0.6134960055351257,
0.2392072081565857,
0.33341503143310547,
0... |
def get _ drink ( ) : # draw the menu selection menu _ selection ( " menu _ 5 - favourite drink ", menu _ 5 ) value = get _ integer ( " select favourite drink ", " 0 ", len ( menu _ 5 ) - 1 ) drink = menu _ 5 [ value ] write _ field ( drink, 41, 4, 18, " left ", foreground, background ) # clear the menu and the selecti... | [
-0.5492256283760071,
0.2597331404685974,
0.49130597710609436,
-0.43383345007896423,
0.4789202809333801,
0.08435092866420746,
0.8220120072364807,
0.1630486100912094,
-0.06459412723779678,
-0.02299337089061737,
-0.21032696962356567,
0.6014882922172546,
-0.8587313890457153,
0.1326973885297775... |
def test _ atomic _ qname _ enumeration _ 1 _ nistxml _ sv _ iv _ atomic _ qname _ enumeration _ 2 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - enumeration - 2. xsd ", instance = " nistdata / atomic ... | [
-0.5873996615409851,
-1.423201084136963,
0.505649983882904,
0.20670020580291748,
-0.5147547721862793,
0.06654644012451172,
-0.22993387281894684,
-0.7664669156074524,
-0.25124815106391907,
0.4230331480503082,
-0.4224921762943268,
0.2351258397102356,
0.5700123310089111,
0.1597142070531845,
... |
def plot _ g ( x, y, xlim, ylim, filename = none, point = none, title = none, c = false, centroid = false ) : fig = plt. figure ( figsize = ( 20, 20 ), dpi = 80, facecolor ='w ', edgecolor ='k') if title : fig. suptitle ( title, fontsize = 20 ) plt. xlabel ('x axis ', fontsize = 18 ) plt. ylabel ('z axis ', fontsize = ... | [
0.8123987317085266,
0.8635551333427429,
0.9475204944610596,
0.48251456022262573,
-0.3688061237335205,
0.9445390105247498,
0.24858206510543823,
0.23458881676197052,
0.19629167020320892,
0.16711430251598358,
-0.20306478440761566,
1.099944829940796,
0.2245188057422638,
-0.11380936205387115,
... |
def get _ stock _ groups ( self ) : print ('getting start dates for existing data...') start _ dates = { } if self. db = ='sqlite': if self. e. dialect. has _ table ( self. e,'data') : for s in tqdm ( self. stocks ) : res = self. con. execute ('select max ( date ) from data where ticker = " { } " '. format ( s ) ) date... | [
-0.5125483870506287,
0.2539646327495575,
0.6650664210319519,
-0.6801257133483887,
0.05310455709695816,
-0.31251275539398193,
0.2534654438495636,
-0.23242129385471344,
0.025053037330508232,
0.14240920543670654,
0.20999932289123535,
0.9977842569351196,
-0.09800095856189728,
1.102835893630981... |
def finite _ deriv _ dft _ forward ( dshape, units = none, use _ rfft = false ) : if units is none : units = ( 1., ) * len ( dshape ) kxs = [ np. fft. fftfreq ( _ s, _ u ) for _ s, _ u in zip ( dshape, units ) ] if use _ rfft : kxs [ - 1 ] = kxs [ - 1 ] [ : dshape [ - 1 ] / / 2 + 1 ] if len ( kxs ) > 1 : kxs = np. mesh... | [
-0.686585545539856,
1.1366997957229614,
0.617159366607666,
-0.20151753723621368,
-0.34332847595214844,
-0.3185730576515198,
0.008741432800889015,
0.3987012803554535,
-0.10371627658605576,
-0.9562533497810364,
-0.003968949895352125,
-0.1668756604194641,
0.6093694567680359,
0.908487856388092... |
def printmenu ( self, startday = 0, endday = false ) : clearterm ( ) # make a list of lunch + dinner combinations to print them as columns of table mealnames = ['lounas ','paivallinen'] lengthoflongest = len ( max ( mealnames, key = len ) ) + 1 lunchstring = ['{ 0 : { width } } | '. format ( mealnames [ 0 ], width = le... | [
-0.40116941928863525,
-0.008289190009236336,
1.1076483726501465,
-0.24164363741874695,
-0.39367884397506714,
-0.10024231672286987,
-0.4060465395450592,
-0.24821235239505768,
-0.4352070987224579,
-0.6190399527549744,
0.3911465108394623,
0.9698238372802734,
0.31463930010795593,
0.70533388853... |
def validate _ name ( name, single = false, alphabet = true, min _ length = 3, max _ length = 100 ) : try : name = str ( name ). strip ( ) if alphabet : if not re. match ( r " ( ^ [ a - za - z \ s \'\ " ] + $ ) ", name ) : return false if single and len ( name. split ( ) ) > 1 : return false if min _ length < = len ( n... | [
-0.5823215246200562,
0.18042691051959991,
0.6460250616073608,
-0.5659146904945374,
-0.8817723989486694,
1.2286783456802368,
-0.5487558841705322,
0.47016167640686035,
-0.14859531819820404,
0.7195836305618286,
-0.733646810054779,
-0.3310154974460602,
-0.6969897150993347,
0.19424356520175934,... |
def get _ mod _ input _ script _ name ( ) : script _ name = os. path. basename ( get _ main _ file ( ) ) if script _ name. lower ( ). endswith ( '. py') : script _ name = script _ name [ : - 3 ] return script _ name | [
-0.35301530361175537,
-1.0192126035690308,
0.7910693883895874,
0.333575963973999,
-0.7850858569145203,
0.42551401257514954,
0.6178076863288879,
-0.6846493482589722,
-0.4258975684642792,
0.5594185590744019,
0.9047228693962097,
0.5815896391868591,
-0.599136471748352,
0.32710573077201843,
0... |
def _ _ init _ _ ( self ) : self. _ _ gender = user _ details. generate _ gender ( ) self. _ _ user _ id = user _ details. generate _ user _ id ( ) self. _ _ phone = user _ details. generate _ phone _ number ( ) self. _ _ last _ name = user _ details. generate _ surname ( ) self. _ _ first _ name = user _ details. gene... | [
0.36706462502479553,
0.5014622807502747,
0.6459087133407593,
-0.12033770978450775,
0.9978905320167542,
0.38790690898895264,
0.6042790412902832,
-0.32777801156044006,
-0.48050710558891296,
-0.3031359910964966,
-1.3324955701828003,
0.06392134726047516,
-0.2710617184638977,
0.2641939818859100... |
def watch _ tag ( self, tag ) : channel _ server = self. _ channel ( self. tag, tag ) subscriber = yield from self. _ get _ subscriber ( ) yield from subscriber. subscribe ( [ channel _ server ] ) log. debug ( " subscribed to % s ", channel _ server ) | [
0.9273139238357544,
-0.570422887802124,
0.3793337643146515,
-0.6452159881591797,
0.09204220026731491,
-0.568837583065033,
-0.6032940745353699,
-0.8235196471214294,
-0.3539736568927765,
-0.5616829991340637,
-0.8839285373687744,
1.55147385597229,
0.4756401479244232,
1.0873273611068726,
-0.... |
def set _ leverage ( self, trading _ pair : str, leverage : int = 1 ) : self. _ leverage = leverage return | [
-0.614162027835846,
0.5771145224571228,
0.48617443442344666,
-1.067198634147644,
0.05386015400290489,
0.3413214087486267,
-0.7043102979660034,
0.1317249834537506,
0.02589487098157406,
0.018234601244330406,
-0.5490521788597107,
-0.2115856260061264,
-1.61937415599823,
-0.28916263580322266,
... |
def getdata ( self, startdate = none, enddate = none ) : return ( self. getdates ( startdate, enddate ), self. gettemps ( startdate, enddate ) ) | [
-1.0376720428466797,
-0.15334942936897278,
0.5348038673400879,
-0.005665694363415241,
-0.34880346059799194,
0.4165964424610138,
-1.2251017093658447,
0.11718381941318512,
-0.9225686192512512,
-0.3930133283138275,
-0.41183218359947205,
0.604763925075531,
-0.28175702691078186,
0.1398750990629... |
async def send _ request ( self, request ) : host _ index = self. _ host _ resolver. get _ host _ index ( ) resp = await self. _ http. send _ request ( session = self. _ sessions [ host _ index ], method = request. method, url = self. _ url _ prefixes [ host _ index ] + request. endpoint, params = request. params, data... | [
-1.8148516416549683,
0.22638995945453644,
0.551241397857666,
0.3159765303134918,
0.5527768731117249,
-0.5299190282821655,
-0.47946080565452576,
-0.5612361431121826,
0.3301706314086914,
0.0933995470404625,
0.31847190856933594,
0.5438046455383301,
-0.05492959916591644,
-0.2733558118343353,
... |
def decode ( self, shorturl : str ) - > str : ret = " " for i in range ( len ( shorturl ) - 1, - 1, - 2 ) : ret = self. s [ shorturl [ max ( 0, i - 1 ) : i + 1 ] ] + ret return ret | [
-0.35127171874046326,
-0.7901198267936707,
0.47187885642051697,
0.6536998748779297,
-0.542585551738739,
-0.43393275141716003,
-0.12152785062789917,
-0.2718737721443176,
0.49830231070518494,
-0.34153828024864197,
-0.897186279296875,
0.5571569800376892,
-0.36159953474998474,
-0.9627978801727... |
def is _ in _ format ( filename ) : if not filename. endswith ( ext ) : return false return filename [ : len ( filename ) - len ( ext ) ]. isdigit ( ) | [
-0.14051686227321625,
-0.6969280242919922,
0.6857916712760925,
0.5294389128684998,
-0.5103172659873962,
0.611992359161377,
-0.04731350019574165,
0.4960905611515045,
0.04245428740978241,
0.31908729672431946,
0.2931708097457886,
-0.152594193816185,
-0.524735152721405,
0.6444199085235596,
-... |
def test _ example _ input _ one _ delete _ valid _ prompt _ message ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper, add _ input _ one ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ name = " dummy _ input _ one " prompt _ message = input _... | [
0.32256603240966797,
0.9136665463447571,
0.4136027991771698,
0.9062684774398804,
0.3941861391067505,
0.3294798731803894,
-0.11657959967851639,
0.47045406699180603,
0.8770098686218262,
-0.04859770089387894,
0.2731901705265045,
0.024649756029248238,
-0.27745524048805237,
0.039248403161764145... |
def can _ load ( self, dataset _ uri : str ) - > bool : | [
-0.7263514995574951,
1.0066707134246826,
0.4575574994087219,
0.014678421430289745,
-0.5752202272415161,
0.1717582494020462,
-0.6938824653625488,
0.1498950570821762,
-0.34322670102119446,
-0.5715339183807373,
0.14034536480903625,
0.29962506890296936,
-0.3791343569755554,
-0.1904328614473343... |
def render _ image ( state, rays _ dict, model _ fn, device _ count, rng, chunk = 8192 ) : h, w = rays _ dict ['origins']. shape [ : 2 ] rays _ dict = tree _ util. tree _ map ( lambda x : x. reshape ( ( h * w, - 1 ) ), rays _ dict ) num _ rays = h * w _, key _ 0, key _ 1 = jax. random. split ( rng, 3 ) key _ 0 = jax. r... | [
-0.04097095504403114,
0.7248133420944214,
0.7106990814208984,
-0.5667378306388855,
-0.34631025791168213,
-0.4309571385383606,
0.23653538525104523,
0.21660198271274567,
-0.41212889552116394,
0.36555013060569763,
0.23758330941200256,
0.3321039080619812,
1.1431975364685059,
0.7739658951759338... |
def atomic _ json ( target _ path, obj ) : data = json. dumps ( obj, indent = 4, sort _ keys = true ) if isinstance ( data, bytes ) : data = data. decode ('utf - 8') lines = data. splitlines ( ) data = os. linesep. join ( lines ) atomic _ save ( target _ path, data ) | [
0.19921274483203888,
-0.7932915687561035,
0.7512575387954712,
-0.6127938628196716,
-0.039568230509757996,
-0.24436423182487488,
-0.596234917640686,
-0.5640057921409607,
-0.21505403518676758,
1.0885334014892578,
-0.9391931891441345,
0.40585511922836304,
0.10068392008543015,
-0.1598166972398... |
def _ _ call _ _ ( self, k, te, ne ) : c = self. log10 ( k, te, ne ) return np. power ( 10, c ) | [
-0.09966518729925156,
0.015809183940291405,
0.4918462932109833,
-1.0219600200653076,
0.6845996379852295,
-0.38564565777778625,
-1.0377004146575928,
0.2720341384410858,
-0.932786226272583,
0.9317854046821594,
0.7984206676483154,
-0.5509549975395203,
0.23893122375011444,
-0.7655761241912842,... |
def value _ ids ( self ) - > optional [ list [ int ] ] : return [ value. get ( " pk " ) for value in self. _ value ] if self. has _ value ( ) else none | [
-0.5859970450401306,
0.30007869005203247,
0.3276904225349426,
0.7387641668319702,
1.211591362953186,
0.06954086571931839,
-0.40285447239875793,
-0.13611020147800446,
0.37101686000823975,
0.6702847480773926,
-0.483367383480072,
-0.06487695127725601,
-0.09542997926473618,
0.5641316771507263,... |
def reform _ warnings ( self ) : return self. _ _ policy. parameter _ warnings | [
-0.5965023040771484,
-0.35255035758018494,
0.38802045583724976,
-0.47674259543418884,
0.39225244522094727,
0.32447150349617004,
-0.4658257067203522,
-0.9382506608963013,
-0.4696158170700073,
1.349764347076416,
0.2662895619869232,
1.940062165260315,
-0.03730650246143341,
-0.1997767239809036... |
def grid _ data ( self, method ='mean') : # reshape self. data _ 1d = self. reshape _ 1d ( self. data ) self. x _ 1d = self. reshape _ 1d ( self. x ) self. y _ 1d = self. reshape _ 1d ( self. y ) self. z _ 1d = self. reshape _ 1d ( self. z ) self. qc _ 1d = self. reshape _ 1d ( self. qc ) self. posqc _ 1d = self. resha... | [
-0.009208903647959232,
0.3654603660106659,
0.9520432353019714,
-0.12594382464885712,
0.1906660795211792,
-0.10931215435266495,
0.8706950545310974,
-0.3705211281776428,
0.055923622101545334,
0.3253098726272583,
0.14775344729423523,
0.7040644288063049,
0.0496099591255188,
0.519020140171051,
... |
def prediction ( self, v, imu _ meas ) : # your code here # print " self. x _ t [ 0 ] = ", self. x _ t [ 0 ] # print " v = ", v # print " np. cos ( self. x _ t [ 2 ] ) = ", np. cos ( self. x _ t [ 2 ] ) # print " v * np. cos ( self. x _ t [ 2 ] ) * self. sample _ time = ", v * np. cos ( self. x _ t [ 2 ] ) * self. samp... | [
-0.3004218637943268,
-0.17382100224494934,
1.0439809560775757,
-0.2988799214363098,
-0.27560073137283325,
0.3161351978778839,
0.47512614727020264,
0.3570496439933777,
-0.6786216497421265,
0.0726872906088829,
-0.2579379975795746,
-0.11669693142175674,
0.026291457936167717,
-0.29330208897590... |
def test _ mfa _ login1 ( self ) : pass | [
-0.9177852272987366,
-0.3482430875301361,
0.2573837637901306,
1.5010126829147339,
-0.37336185574531555,
0.6809321045875549,
0.6181793212890625,
0.04870358854532242,
0.7452858686447144,
-0.8410629630088806,
-0.5255735516548157,
0.6070970296859741,
-0.09147076308727264,
-0.22002999484539032,... |
def test _ room _ activation ( self ) : lvl = level ( 1, 50, 50, none ) room1 = room ( pos ( 0, 0 ), pos ( 10, 10 ) ) assert room1. found is false lvl. add _ room ( 0, room1 ) room2 = room ( pos ( 20, 20 ), pos ( 30, 30 ) ) lvl. add _ room ( 1, room2 ) room = lvl. new _ room ( pos ( 25, 25 ), room2 ) # no change assert... | [
-0.8068273663520813,
-1.0686287879943848,
0.5157861113548279,
0.1286473423242569,
0.049426864832639694,
0.5180674195289612,
0.4835454225540161,
0.42487451434135437,
-0.05123374983668327,
0.22321859002113342,
-1.0593096017837524,
0.5425726771354675,
-0.510123074054718,
0.4875345826148987,
... |
def teardown ( self ) : pass | [
0.6825093030929565,
-1.3082084655761719,
0.14743395149707794,
0.022344447672367096,
0.7737679481506348,
1.1928915977478027,
2.086796522140503,
0.20998552441596985,
0.4032772481441498,
-1.0082353353500366,
-0.17758291959762573,
0.37840011715888977,
-1.2112221717834473,
0.07531315088272095,
... |
def send ( self ) - > bool : return pulumi. get ( self, " send " ) | [
0.28132960200309753,
1.1619349718093872,
0.354666531085968,
0.8855400085449219,
1.1314421892166138,
1.1619609594345093,
-0.3123107850551605,
-0.27139756083488464,
-0.3001957833766937,
0.9587743878364563,
-0.05485423654317856,
0.8362361788749695,
-0.5346682071685791,
-0.674404501914978,
-... |
def chi2xcfunc ( params, beta, nmax, im, nm ) : xc = params [ 2 ] yc = params [ 3 ] print xc, yc size = im. shape # shift the ( 0, 0 ) point to the centroid rx = np. array ( range ( 0, size [ 0 ] ), dtype = float ) - xc ry = np. array ( range ( 0, size [ 1 ] ), dtype = float ) - yc bvals = genbasismatrix ( beta, nmax, ... | [
0.7320535778999329,
-0.18136660754680634,
0.45182543992996216,
-0.43478381633758545,
-0.01271318644285202,
-0.3724532425403595,
-0.1579456478357315,
-0.1722785234451294,
-0.3406079113483429,
0.6588730216026306,
-0.19118858873844147,
0.007750142831355333,
-0.1414901465177536,
-0.22093205153... |
def test _ atomic _ id _ enumeration _ 1 _ nistxml _ sv _ iv _ atomic _ id _ enumeration _ 2 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - enumeration - 2. xsd ", instance = " nistdata / atomic / id / schem... | [
-0.5046704411506653,
-0.5897208452224731,
0.5823934078216553,
0.5476846694946289,
-0.17476405203342438,
0.3415786921977997,
0.04454267397522926,
-0.23434637486934662,
0.3853893578052521,
0.6449264287948608,
-0.25216537714004517,
0.26292476058006287,
0.35785406827926636,
-0.0842865332961082... |
def t ( data : types. ndtensor, dtype : torch. dtype = torch. float, device : types. device = " cpu ", requires _ grad : bool = false, ) - > torch. tensor : tt = torch. tensor ( data, dtype = dtype, device = device, requires _ grad = requires _ grad ) return tt | [
0.3955313265323639,
0.870956301689148,
0.10568485409021378,
-0.44532501697540283,
-0.770876944065094,
0.07763449102640152,
-0.00855101179331541,
-0.5237842202186584,
-0.22699560225009918,
0.6596611142158508,
-0.4363037943840027,
-0.11498266458511353,
-0.15260644257068634,
-0.83744668960571... |
def test _ atomic _ qname _ pattern _ 3 _ nistxml _ sv _ iv _ atomic _ qname _ pattern _ 4 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - pattern - 4. xsd ", instance = " nistdata / atomic / qname / sc... | [
0.060330502688884735,
-0.35525161027908325,
0.48465797305107117,
0.17825870215892792,
-0.596709132194519,
0.5344874262809753,
0.03112076036632061,
-0.5108093619346619,
-0.2665093243122101,
0.43164506554603577,
-0.8512035608291626,
-0.33951622247695923,
-0.19243896007537842,
-0.622694492340... |
def parse _ tuple _ string ( str ) : strs = str. strip ( ). strip ('('). strip (')'). split ( ) return ( strs [ 0 ]. lower ( ), strs [ 1 ]. lower ( ), strs [ 2 ]. lower ( ) ) | [
-0.043381452560424805,
-0.6522617340087891,
0.6132878065109253,
-1.3488720655441284,
-0.05028482899069786,
-0.2143387347459793,
-0.7617619037628174,
0.2068229466676712,
-0.614668607711792,
0.8670454025268555,
-0.6217436194419861,
-1.1592482328414917,
-0.6824356913566589,
-1.558390140533447... |
def test _ list _ decimal _ white _ space _ nistxml _ sv _ iv _ list _ decimal _ white _ space _ 1 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - whitespace - 1. xsd ", instance = " nistdata / list / d... | [
-0.6295851469039917,
-0.04708681255578995,
0.5801811218261719,
0.42402926087379456,
0.19568383693695068,
-0.10047058016061783,
0.07886866480112076,
0.049969032406806946,
1.4881813526153564,
0.03117208182811737,
-0.363507479429245,
-0.11125727742910385,
-0.0017900568200275302,
1.51910173892... |
def get _ unique ( l ) : return list ( set ( l ) ) | [
-0.2905723452568054,
0.31651121377944946,
0.4584813117980957,
0.342582106590271,
0.7062166929244995,
0.6541785597801208,
-0.5345597267150879,
0.39383405447006226,
0.8498169779777527,
-0.1656518578529358,
-1.973376750946045,
0.05437258630990982,
0.26793307065963745,
-0.27267348766326904,
... |
def test _ api _ shared _ live _ media _ delete _ instructor ( self ) : shared _ live _ media = sharedlivemediafactory ( ) video = videofactory ( ) video. shared _ live _ medias. set ( [ shared _ live _ media ] ) jwt _ token = instructororadminltitokenfactory ( playlist = shared _ live _ media. video. playlist ) self. ... | [
-0.09018494188785553,
-0.008866893127560616,
0.5945249199867249,
0.4251723289489746,
0.1449185460805893,
0.4881212115287781,
0.8688322305679321,
0.30129197239875793,
1.043643593788147,
0.22425323724746704,
-0.8039827942848206,
0.2587093114852905,
-0.36640700697898865,
0.2810840606689453,
... |
def email _ checking ( email ) : # check email if parseaddr ( email ) = = ('','' ) or'@'not in email : abort ( 400,'please enter a valid email address.') | [
0.2523813247680664,
0.6118921041488647,
0.4782690107822418,
0.31101179122924805,
-0.18678049743175507,
0.6894055008888245,
-0.7994081377983093,
-0.3407844603061676,
0.17059551179409027,
0.1427672654390335,
1.3987956047058105,
0.7415616512298584,
-0.32346317172050476,
-0.07210446149110794,
... |
def _ createhipik ( self ) : ik _ main _ ctl = mc. circle ( n = " { } _ { } _ hipik _ ctl _ { } ". format ( self. side, self. name, self. instance _ num ), r = 1 ) [ 0 ] ik _ main _ grp = mc. group ( ik _ main _ ctl, n = ik _ main _ ctl. replace ( " ctl ", " grp " ) ) ik _ main _ zero = mc. group ( ik _ main _ grp, n =... | [
-0.14315861463546753,
-0.18646757304668427,
0.7236822843551636,
-0.5193785429000854,
-0.04991063103079796,
-0.31766992807388306,
1.2558199167251587,
0.294899046421051,
-0.6865098476409912,
-0.17189741134643555,
-0.15729151666164398,
-0.6019324660301208,
0.38169872760772705,
-0.138342112302... |
def question _ classify ( method = " pretrained " ) : # category : dictionary w / key = category name, value = words in the category category = { } dir = os. getcwd ( ) + " / data " for root, dirs, filenames in os. walk ( dir ) : for f in filenames : with open ( dir + " / " + f ) as fcontent : category [ f ] = [ ] # co... | [
0.08151356875896454,
-0.1595112830400467,
0.8351895213127136,
0.47491079568862915,
-0.8863957524299622,
-0.05523144081234932,
0.9188847541809082,
-0.396962434053421,
-0.5791470408439636,
0.6918107271194458,
0.12815824151039124,
-0.21511204540729523,
-0.314741849899292,
0.6830650568008423,
... |
def evaluate _ tvm _ expr ( expr, suppress _ errors = false ) : if len ( symboltable. binds ) = = 0 : symboltable. populate ( ) tvm _ vars = symboltable. variables var _ binds = symboltable. binds dtype = none if ( isinstance ( expr, tir. expr. exprop ) ) : dtype = expr. dtype else : return expr try : shape = ( 1, ) c ... | [
-0.3576434552669525,
-0.5800396800041199,
0.7954286336898804,
-0.17691875994205475,
-0.9024248719215393,
-0.40000489354133606,
0.11105722188949585,
-0.08115672320127487,
-0.08982113748788834,
0.6152029633522034,
0.3596591353416443,
0.5697619915008545,
-0.6003617644309998,
0.256675451993942... |
def unregister _ observables ( self ) : for observer in self. observing [ : ] : # slice notation required otherwise some items get missed out. observer. unregister _ observer ( self ) | [
-0.5604850649833679,
0.39695292711257935,
0.4450148642063141,
-0.11708545684814453,
0.5688877105712891,
-0.07024233043193817,
-0.2595011591911316,
0.06594547629356384,
-0.9410801529884338,
0.3098132014274597,
-0.4964243769645691,
-0.22896036505699158,
0.3754199147224426,
0.8876093029975891... |
def greedy _ cow _ transport ( cows, limit = 10 ) : # warning! warning! warning! warning! warning! warning! warning! warning! # warning! warning! warning! warning! warning! warning! warning! warning! # this solution is wrong # note : oct 21, 2018 9 : 30 pm pht # i am currently taking " mitx : 6. 00. 2x " at edx, a cour... | [
-0.8146735429763794,
-0.2546040117740631,
1.0066293478012085,
0.12604498863220215,
-0.07657252252101898,
-0.24220600724220276,
-0.3570692241191864,
-0.8481405377388,
-0.7884522080421448,
0.7911160588264465,
-0.41853460669517517,
0.05662747099995613,
0.2724456787109375,
0.635161280632019,
... |
def restrict _ vocabs ( self, max _ syllables ) : # find threshold num _ syllables = len ( self. syllable2index ) if num _ syllables < = max _ syllables : return # sort syllables by occurence # probably not hte most clever way to do that threshold = np. sort ( np. transpose ( self. syllable2index. values ( ) ) ) [ 1 ] ... | [
-0.1473962366580963,
0.437065988779068,
0.6242693066596985,
-0.10139284282922745,
-0.4935537874698639,
-0.32260021567344666,
0.3642616271972656,
0.34557434916496277,
0.20118270814418793,
-0.011170650832355022,
-0.020968569442629814,
0.2641766369342804,
0.391035795211792,
-0.035634014755487... |
def test _ atomic _ base64 _ binary _ max _ length _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ max _ length _ 1 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - maxlength - 1. xsd ", i... | [
0.20655447244644165,
-0.13055700063705444,
0.2508683204650879,
1.3326990604400635,
-0.27914509177207947,
0.10971997678279877,
0.3190896511077881,
-0.1098737120628357,
-0.10366218537092209,
0.673655092716217,
-0.6438880562782288,
-0.08050099015235901,
-0.6410552859306335,
0.3842561841011047... |
def get _ score ( lines _ cleared, level ) : if lines _ cleared = = 1 : return 40 * ( level + 1 ) elif lines _ cleared = = 2 : return 100 * ( level + 1 ) elif lines _ cleared = = 3 : return 300 * ( level + 1 ) elif lines _ cleared > = 4 : return 1200 * ( level + 1 ) return 0 | [
-0.204687237739563,
-0.1236414834856987,
0.49452126026153564,
-0.5347540974617004,
-0.38442471623420715,
-0.7260969281196594,
-0.15569022297859192,
-0.772487223148346,
-0.27831408381462097,
0.627203106880188,
0.5580829977989197,
0.37363311648368835,
-0.06549640744924545,
-0.217230692505836... |
def call ( self, batched _ source, batched _ target, speaker _ list, addressee _ list, initial _ state ) : source _ ebd = tf. nn. embedding _ lookup ( self. source _ embedding, batched _ source ) # shape = ( batch _ size, sentence _ max _ length, embed _ size ) # run lstm encoder on the source sentence encoded _ output... | [
-0.05948929488658905,
-0.2524542212486267,
0.7950924038887024,
0.07832254469394684,
-0.36804768443107605,
0.4605352580547333,
-0.42568260431289673,
0.6360225677490234,
0.010234428569674492,
0.7668101787567139,
0.0009440459543839097,
0.7458273768424988,
-0.14627164602279663,
0.3504224419593... |
def get _ train _ losses ( self, as _ np = false ) - > union [ list, ndarray ] : if as _ np : return np. array ( self. _ train ) return self. _ train | [
-1.5592772960662842,
0.23452995717525482,
0.6561841368675232,
0.4616629183292389,
0.599020779132843,
0.09430666267871857,
-0.5261979103088379,
-0.6791423559188843,
0.4432621896266937,
-0.004650349263101816,
-0.14774659276008606,
0.552943766117096,
0.3828258216381073,
0.07372172176837921,
... |
def buildstructure ( ( px, py ), distance _ pillars, ( by, bz ), distance _ beams ) : first _ pillar = cuboid ( [ px, py, distance _ beams [ - 1 ] ] ) " " " length of the array of the distances among pillars " " " length _ pillars = len ( distance _ pillars ) " " " length of the array of the distances among beams " " "... | [
0.09683771431446075,
-0.175171360373497,
0.7431568503379822,
-0.5987688899040222,
0.11362060159444809,
0.16632741689682007,
0.7639833092689514,
0.10173794627189636,
0.47256413102149963,
0.3675515651702881,
-0.4432280361652374,
-0.25926560163497925,
-0.4761640131473541,
-0.7645301818847656,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.