text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def get _ widget ( self, name ) : for name _, vtype, default, widget in self. _ items : if name = = name _ : return widget | [
-0.29725390672683716,
-0.1826297640800476,
0.12780991196632385,
0.1360497921705246,
0.04900623485445976,
-0.8706173300743103,
-0.3307565748691559,
-0.4344817101955414,
-0.39531680941581726,
0.13100159168243408,
-0.7130153179168701,
0.17669102549552917,
-0.69895339012146,
0.1742762327194214... |
def set _ viewed ( self, value ) : super ( searchbycategoryinputset, self ). _ set _ input ('viewed ', value ) | [
-1.0943197011947632,
0.7586871981620789,
0.24143847823143005,
-0.2286721020936966,
-0.4852227568626404,
0.04187069088220596,
1.429229736328125,
-0.6904593110084534,
0.026213154196739197,
-1.1902806758880615,
-0.5885782837867737,
0.0799003317952156,
0.3363669216632843,
0.21011509001255035,
... |
def clean _ axes ( axes, left = true, right = false ) : if not type ( axes ) in [ np. ndarray, list ] : axes = [ axes ] elif type ( axes ) = = np. ndarray : axes = axes. flatten ( ) for axis in axes : axis. tick _ params ( direction ='out') axis. spines ['top']. set _ visible ( false ) if not right : axis. spines ['rig... | [
0.005192872136831284,
0.14058436453342438,
0.7517868876457214,
0.2814917266368866,
-0.4120037853717804,
0.7022343873977661,
1.0702745914459229,
-0.2375061959028244,
0.04750562831759453,
1.324488878250122,
0.14915499091148376,
0.41525307297706604,
-0.3827420771121979,
0.5314117074012756,
... |
def aggregate ( self, local _ result, agg, limit, aggregation _ function _ list ) : temp = local _ result [ : ] temp. extend ( agg ) return sorted ( temp, key = operator. itemgetter ('total _ score'), reverse = true ) [ : limit ] | [
0.15816454589366913,
0.3577323257923126,
0.553019642829895,
0.2538169026374817,
0.798165500164032,
-0.7529009580612183,
-0.4358832836151123,
0.43777498602867126,
-0.12088308483362198,
0.8902004361152649,
0.7041580677032471,
0.33317822217941284,
-0.2515239417552948,
-0.1761161983013153,
-... |
def update _ args ( self, args ) : for cfg in args : keys, v = cfg. split ('= ', maxsplit = 1 ) keylist = keys. split ( '.') dic = self for i, k in enumerate ( keylist [ : - 1 ] ) : assert k in dir ( dic ), " unknown config key : { } ". format ( keys ) dic = getattr ( dic, k ) key = keylist [ - 1 ] oldv = getattr ( dic... | [
-1.745002031326294,
-0.533729076385498,
0.5414011478424072,
-0.5950583815574646,
0.14547300338745117,
-0.259203165769577,
-0.18412376940250397,
0.7341811060905457,
-0.6829448938369751,
1.2485411167144775,
-0.15059077739715576,
-0.32912132143974304,
0.10663402825593948,
1.1041080951690674,
... |
def autolabel ( rects ) : for rect in rects : height = rect. get _ height ( ) ax. annotate ('{ } '. format ( height ), xy = ( rect. get _ x ( ) + rect. get _ width ( ) / 2, height ), xytext = ( 0, 3 ), # 3 points vertical offset textcoords = " offset points ", ha ='center ', va ='bottom') | [
0.603294849395752,
-0.8815188407897949,
0.7011322975158691,
-0.32962432503700256,
-0.24466493725776672,
0.8604520559310913,
0.302025705575943,
0.20759613811969757,
0.19238297641277313,
0.4817773997783661,
-0.2704603672027588,
0.17433710396289825,
1.1150219440460205,
-0.5183075666427612,
... |
def createdictionaries ( data ) : builddict ( data, ['office ','office _ name ','level'], 1, 0 ) builddict ( data, ['level ','level _ name'], 1, 0 ) builddict ( data, ['area ','area _ name'], 1, 0 ) builddict ( data, ['source ','source _ name'], 1, 0 ) builddict ( data, ['financier ','financier _ name'], 1, 0 ) builddi... | [
-0.7023530602455139,
-0.27254536747932434,
0.5764747262001038,
-0.9052540063858032,
-0.48953506350517273,
0.7449522018432617,
-0.2790307402610779,
0.6271014213562012,
-0.2531765401363373,
-0.08857175707817078,
-0.5136302709579468,
-0.5022120475769043,
0.1810918152332306,
0.3656178414821625... |
def getconnections ( self, netid ) : connections = [ ] for key in self. nodes : node = self. nodes [ key ] for dest in node. connections : connection = [ key, dest. id ] connection. sort ( ) connection = [ netid ] + connection connection = tuple ( connection ) connections. append ( connection ) return connections | [
-1.7141250371932983,
-0.2194589525461197,
0.6357434391975403,
-0.29489195346832275,
0.5513969659805298,
-0.18418757617473602,
-0.8558660745620728,
-0.7368568778038025,
-0.1628182977437973,
0.8199902772903442,
-0.528032660484314,
-1.4782483577728271,
-0.32806500792503357,
1.0832964181900024... |
def annotate _ sse ( atom _ array, chain _ id ) : # filter all ca atoms in the relevant chain. ca _ coord = atom _ array [ filter _ amino _ acids ( atom _ array ) & ( atom _ array. atom _ name = = " ca " ) & ( atom _ array. chain _ id = = chain _ id ) ]. coord d2i _ coord = np. full ( ( len ( ca _ coord ), 2, 3 ), np. ... | [
-0.17285381257534027,
-0.01567455567419529,
0.7254725694656372,
-0.7505511045455933,
0.08398566395044327,
-0.2976425588130951,
0.6258679628372192,
0.2635897994041443,
-0.026943232864141464,
0.6813703775405884,
0.08200240880250931,
0.7846570611000061,
0.10058672726154327,
-0.860804915428161... |
def precision _ score ( y _ true, y _ proba, thres = thres ) : # get prediction y _ pred = k. cast ( k. greater ( y _ proba, thres ), dtype ='float32') # calc true _ positives = k. sum ( k. round ( k. clip ( y _ true * y _ pred, 0, 1 ) ) ) predicted _ positives = k. sum ( k. round ( k. clip ( y _ pred, 0, 1 ) ) ) preci... | [
1.0072715282440186,
-0.5748535394668579,
0.7472067475318909,
0.21988366544246674,
0.3022945523262024,
0.36127907037734985,
-0.7660142183303833,
0.30143028497695923,
-1.0126051902770996,
1.085974931716919,
0.42400360107421875,
-0.2942209243774414,
0.2452382594347,
-0.4207385778427124,
0.7... |
def is _ constant ( self ) : return isinstance ( self. _ _ operator, float ) | [
0.35007402300834656,
0.5528275370597839,
0.6739516854286194,
1.014890432357788,
0.11233977228403091,
0.36308997869491577,
0.5510779023170471,
0.33496248722076416,
0.0814853310585022,
0.3332284688949585,
-0.12809301912784576,
0.0029942025430500507,
-1.5825780630111694,
0.27026036381721497,
... |
def remove ( self, pieces ) : for piece in pieces : self. board [ piece. row ] [ piece. col ] = none if piece : if piece. color = = color. white : self. whitecount - = 1 if piece. color = = color. black : self. blackcount - = 1 | [
-0.6117259860038757,
0.6785187125205994,
0.40526649355888367,
-0.8283179998397827,
0.30341970920562744,
0.13364629447460175,
0.6073687076568604,
0.618479311466217,
0.26531967520713806,
0.4885333478450775,
-0.36796537041664124,
0.030795851722359657,
-1.1322388648986816,
0.9879200458526611,
... |
def raster _ 4band _ tile ( ) : return bufferedtilepyramid ( " geodetic " ). tile ( 13, 2209, 8569 ) | [
1.0744061470031738,
0.32726091146469116,
0.3041241466999054,
0.04975641146302223,
0.6129690408706665,
0.5069863796234131,
0.7336435317993164,
-1.04866623878479,
-0.13656830787658691,
-0.49991312623023987,
-0.0714220479130745,
0.01839112676680088,
-0.7212219834327698,
-0.35386261343955994,
... |
def _ _ init _ _ ( self ) : super ( videowidget, self ). _ _ init _ _ ( ) | [
0.7377132773399353,
0.26133865118026733,
0.5135504603385925,
1.0369129180908203,
0.10613808780908585,
0.0369439460337162,
-0.1482149213552475,
1.0462872982025146,
0.8530519604682922,
-0.9309701919555664,
-0.9445801973342896,
0.8174909353256226,
0.19800148904323578,
1.384104609489441,
-0.... |
def test _ calculation _ distinct _ value _ categorical ( ) : df = pd. dataframe ( { " a " : [ it for it in range ( 0, 30 ) ], " c " : [ " a ", " b ", " c ", " d ", " d ", " d " ] * 5 } ) test = drophighpsifeatures ( split _ col = " c ", split _ frac = 0. 5, split _ distinct = false ) test. fit _ transform ( df ) asser... | [
-0.08549745380878448,
0.9722183346748352,
0.6769441962242126,
0.12475916743278503,
0.6124359369277954,
0.3534899353981018,
1.1760280132293701,
0.7383458018302917,
-0.2927701771259308,
-0.6103318333625793,
-1.0625568628311157,
-0.04710546135902405,
0.4647180736064911,
-0.07769191265106201,
... |
def get _ corpus ( self, df ) : df ['title'] = self. strip _ newline ( df. title ) words = list ( self. sent _ to _ words ( df. title ) ) words = self. remove _ stopwords ( words ) bigram = self. bigrams ( words ) bigram = [ bigram [ review ] for review in words ] id2word = gensim. corpora. dictionary ( bigram ) id2wor... | [
-0.4041895866394043,
0.18179376423358917,
0.4573768377304077,
0.12700334191322327,
0.3749743402004242,
-0.443046510219574,
-0.02060476318001747,
-0.24710004031658173,
-1.111066460609436,
0.3733839690685272,
-0.23689669370651245,
0.519173264503479,
-0.4266228973865509,
0.12252530455589294,
... |
def associativity _ analysis ( self ) : # self. clear _ output _ folder ( ) return self. _ invoke ( " - a " ) | [
-0.6424005627632141,
-0.26737067103385925,
0.33626696467399597,
1.2551580667495728,
0.1644608974456787,
-0.25255516171455383,
1.729177713394165,
-0.2867937386035919,
-0.44866377115249634,
-0.4518633484840393,
1.4030952453613281,
0.5384228229522705,
-0.29076075553894043,
-0.0250985864549875... |
def pf _ avg _ prod _ sum _ rand _ interferometer ( m, k, ns, ts, rs, n _ bars, t _ nois, maxn = 50000, printn = 5000 ) : # # these will store results form each random interferometer pfsss = [ ] pfprodss = [ ] pfsumss = [ ] pfavgss = [ ] errss = [ ] errsumss = [ ] # convert output pattern to a list ns = ns. split ( ", ... | [
-0.8297151327133179,
0.3274063467979431,
0.690861701965332,
-0.04105120152235031,
0.3755473792552948,
0.3946591019630432,
0.4215710163116455,
-0.13743974268436432,
-0.19301584362983704,
0.184491828083992,
-0.6578953266143799,
-0.019343283027410507,
-0.33391737937927246,
0.7049720883369446,... |
def get _ config ( self ) : return { " name " : self. name, " source " : self. source. getoptions ( ), " output " : self. output. getoptions ( ), " models " : [ model. name for model in self. models ] #'frame _ count': self. frame _ count } | [
-1.1580133438110352,
-0.5078685283660889,
0.30597710609436035,
-0.8205132484436035,
-0.9557125568389893,
-0.6395066380500793,
-0.42446303367614746,
-0.3264840841293335,
-0.8162258267402649,
0.0002994976530317217,
-1.850813388824463,
-0.8199355602264404,
0.1278156191110611,
1.34817826747894... |
def toeplitz _ decomposition ( self ) : if self. m! = self. n : raise exc. decompositionerror ( " non - square matrices do not have a " + " a toeplitz decomposition " ) sym = ( self + self. transpose ( ) ) *. 5 skew = ( self - self. transpose ( ) ) *. 5 return sym, skew | [
0.1704162210226059,
-0.3620356023311615,
0.14759297668933868,
-0.11403664946556091,
-0.49216461181640625,
-0.3043956756591797,
0.48539263010025024,
-0.15047238767147064,
1.3616235256195068,
-0.14353810250759125,
-0.34437501430511475,
-1.3953888416290283,
0.08988282829523087,
0.893489360809... |
def _ _ init _ _ ( _ _ self _ _, resource _ name : str, args : acltokenroleattachmentargs, opts : optional [ pulumi. resourceoptions ] = none ) :... | [
0.6020104289054871,
-0.22611795365810394,
0.37824249267578125,
-0.779800295829773,
-0.6877411603927612,
0.37871190905570984,
-0.06933728605508804,
-0.4563688337802887,
0.7252399325370789,
-0.006285366136580706,
0.5816859006881714,
1.0478748083114624,
0.5626092553138733,
-0.8356980085372925... |
def done ( self, cr, uid, ids, context = none ) : for rec in self. browse ( cr, uid, ids, context ) : if rec. add _ type not in ('other ','moving ','additional') : rec. vehicle _ id. write ( {'additional _ qty': rec. add _ qty } ) rec. write ( {'state':'done'} ) return true | [
-0.8452074527740479,
-0.24547474086284637,
0.5004953145980835,
-0.033772051334381104,
0.5473553538322449,
-0.2718152701854706,
0.22252123057842255,
-0.3583707809448242,
0.5829408168792725,
0.5364322066307068,
-0.4661080837249756,
-0.5891599059104919,
-0.054498858749866486,
0.73269313573837... |
def test _ tile _ nb _ neighbours _ on _ borders ( self ) : board = builder ( 10, 10, 7, 6 ). create ( ) self. asserttrue ( len ( board. getneighboursidentifier ( ( 0, 0 ) ) ), 2 ) self. asserttrue ( len ( board. getneighboursidentifier ( ( 6, 0 ) ) ), 2 ) self. asserttrue ( len ( board. getneighboursidentifier ( ( 0, ... | [
1.3312854766845703,
0.07555592805147171,
0.6083241701126099,
-0.06569778919219971,
0.19504782557487488,
1.27728271484375,
0.6573725938796997,
0.059734754264354706,
0.32355642318725586,
-0.6728521585464478,
-2.408236026763916,
-1.1477620601654053,
-0.3427608013153076,
0.9346272349357605,
... |
def test _ update _ delete _ under _ min ( unode, simpleacq, archivefile, archivefilecopy ) : archivefilecopy ( node = unode. db, file = archivefile ( name = " filey ", acq = simpleacq ), has _ file = " y ", wants _ file = " y ", ) copym = archivefilecopy ( node = unode. db, file = archivefile ( name = " filem ", acq =... | [
0.01357329823076725,
0.02743123658001423,
0.6442423462867737,
-0.42383891344070435,
-0.0026568593457341194,
0.7000506520271301,
-0.5727534294128418,
-0.043210286647081375,
0.24182727932929993,
-0.3173207938671112,
-0.2830770015716553,
0.2458602786064148,
0.14939327538013458,
-0.44045117497... |
def _ _ init _ _ ( self, event _ type _ id = " ", event _ type _ tag = " ", url = " ", first _ name = " ", email _ address = " ", ip _ address = " ", city = " ", province = " ", country = " ", title = " ", external _ id = " ", image _ url = " ", custom _ event _ fields _ attributes = none ) : # : event type unique id (... | [
0.34734320640563965,
-0.06141181290149689,
0.566444993019104,
0.19120216369628906,
-0.3119954764842987,
-0.6540390253067017,
0.20458613336086273,
0.21108588576316833,
0.29824212193489075,
-0.45188772678375244,
-0.7866722345352173,
-0.08017607033252716,
0.2588624954223633,
0.456131249666214... |
def on _ checkbox _ changed ( self, chb ) : for item in self. _ items : if item is not chb : item. set _ checked ( false ) item. node [ " state " ] = dgg. normal | [
-0.6394274830818176,
-0.20669540762901306,
0.2324047088623047,
1.1917567253112793,
0.6390033960342407,
0.37084853649139404,
0.37967270612716675,
0.6210521459579468,
-0.07769843190908432,
0.6183738708496094,
-1.1918126344680786,
0.41128647327423096,
0.11491325497627258,
0.4293496608734131,
... |
def compare ( self, p _ sv : np. array ) - > bool : return np. dot ( self. n _ u, p _ sv ) > = self. dot _ value | [
-0.5134773254394531,
0.0627996101975441,
0.620345950126648,
0.9305499196052551,
-0.4258432388305664,
0.9964367151260376,
-0.17363427579402924,
-0.8143346905708313,
0.8861427307128906,
-0.29875701665878296,
0.1175544485449791,
0.3628130555152893,
0.06814973056316376,
0.1873582899570465,
-... |
def get _ velocity ( presentation _ id ) : pres _ row = self. stim _ table. loc [ presentation _ id ] mask = ( self. ecephys _ session. running _ speed ['start _ time'] > = pres _ row ['start _ time'] ) \ & ( self. ecephys _ session. running _ speed ['start _ time'] < pres _ row ['stop _ time'] ) return self. ecephys _... | [
-0.6849297881126404,
0.15743084251880646,
0.5902259349822998,
0.05447886511683464,
-0.181731715798378,
0.16978034377098083,
0.34892770648002625,
0.06393012404441833,
-0.2056153565645218,
1.2085542678833008,
0.4340795874595642,
0.3601427972316742,
-0.6309255361557007,
0.4653957486152649,
... |
def set _ slider _ value ( self, locator, value ) : slider = self. state. _ get _ typed _ item _ by _ locator ( slider, locator ) slider. value = float ( value ) | [
-0.25947263836860657,
-1.0011050701141357,
0.42075464129447937,
-0.24907155334949493,
0.29818782210350037,
-0.29557520151138306,
-0.6690605878829956,
-0.3914160132408142,
-0.432858943939209,
0.7644928097724915,
-0.5801236033439636,
0.20081470906734467,
0.5509902834892273,
0.295895189046859... |
def _ get _ widgets ( self ) : isinst = isinstance widgets = ( c for c in self. children if isinst ( c, constraintswidget ) ) return tuple ( widgets ) | [
-1.0804684162139893,
-0.09318690747022629,
0.5949522256851196,
0.36043092608451843,
-0.3767954111099243,
-0.5760218501091003,
-0.10851296037435532,
0.20323359966278076,
-0.5140655040740967,
0.5963112115859985,
-0.7282405495643616,
-0.7759719491004944,
-1.3002732992172241,
0.065047748386859... |
def getbymass ( mass ) : # assume masses are in daltons if they are not units if is _ quantity ( mass ) : mass = mass. value _ in _ unit ( daltons ) if mass < 0 : raise valueerror ('invalid higgs field') # if this is our first time calling getbymass ( or we added an element # since the last call ), re - generate the or... | [
0.36057502031326294,
-0.17474685609340668,
0.7135134935379028,
0.16475361585617065,
-0.0423220656812191,
-0.34581905603408813,
0.020750589668750763,
-0.7280394434928894,
0.14636175334453583,
-1.2741854190826416,
0.42514270544052124,
0.5154197812080383,
-0.3660467863082886,
0.50189280509948... |
def content ( self ) - > str : return pulumi. get ( self, " content " ) | [
0.8858171701431274,
-0.10397603362798691,
0.33628377318382263,
0.34992310404777527,
0.021797901019454002,
1.1965208053588867,
-0.24426795542240143,
-0.26197728514671326,
-0.03311041742563248,
0.2898622155189514,
0.9696420431137085,
0.22897222638130188,
0.22047068178653717,
-1.8626004457473... |
def test _ example _ input _ one _ edit _ valid _ title ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper, add _ input _ one ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. table. edit _ row ( " dummy _ input _ one " ) self. assert _ uti... | [
-0.14368973672389984,
0.27111074328422546,
0.5547646880149841,
0.3693988621234894,
-0.138331800699234,
0.356646329164505,
-0.3963381350040436,
-0.1858428567647934,
0.9240646958351135,
0.5098022222518921,
0.07709155976772308,
-0.5409627556800842,
-0.1805706024169922,
-0.3031645119190216,
... |
def _ check _ value ( self, elem ) : if not isinstance ( elem, self. elem _ type ) : raise invaliddatatype ( " expected data object of { }, recieved { } ". format ( self. elem _ type, type ( elem ) ) ) | [
-0.28958362340927124,
0.9461475610733032,
0.2977308928966522,
0.2794497013092041,
-0.11511583626270294,
0.9766721725463867,
-0.019611433148384094,
-0.09196427464485168,
0.49949437379837036,
-0.36421191692352295,
0.036824993789196014,
1.2569211721420288,
0.1757495105266571,
0.47917890548706... |
def transform ( self ) : self. _ transform ( self. state ) | [
-0.5898399353027344,
-0.41172459721565247,
-0.07751716673374176,
-0.522042453289032,
0.7135171294212341,
-0.0773625522851944,
0.4186071455478668,
0.28741568326950073,
0.48969560861587524,
-0.7907437086105347,
-0.8191581964492798,
0.316926509141922,
0.46759483218193054,
-0.13013626635074615... |
def finalize _ temp ( self ) : for ( k _ temp, v _ temp ), ( k _ final, v _ final ) in zip ( self. _ temp _ packets. items ( ), self. items ( ) ) : if not os. path. exists ( str ( v _ final ) ) : shutil. copy ( str ( v _ temp ), str ( v _ final ) ) | [
-0.6622493863105774,
-0.8971744775772095,
0.4314907491207123,
-1.1265904903411865,
-0.012845019809901714,
0.7205309867858887,
-0.02798696793615818,
-0.09189645946025848,
-0.45731452107429504,
0.8259621262550354,
-0.1744503378868103,
-0.3297996520996094,
0.03284986689686775,
0.6585277915000... |
def smbh _ prior _ model _ tag ( self ) - > str : return f " { conf. instance ['notation'] ['prior _ model _ tags'] ['mass'] [ self. smbh _ prior _ model. name ] } " | [
0.9750742316246033,
-0.5584784150123596,
0.6502051949501038,
-0.008906582370400429,
0.3141057789325714,
0.5488654375076294,
0.1298643946647644,
-0.1427047699689865,
-0.28444382548332214,
0.2202930450439453,
-0.3331868648529053,
-0.012934351339936256,
0.18859395384788513,
1.1636474132537842... |
def _ constrainhocksubgroup ( self ) : rjc. constrain _ object ( [ self. misc [ " hockmaster1 " ], self. misc [ " hockmaster2 " ] ], self. misc [ " hockslave1 " ], " orient ", 1 ) mc. connectattr ( self. ik _ controllers [ " hindleg " ] + ". autohock ", self. misc [ " hockslave1 " ] + ". " + self. misc [ " hockmaster2 ... | [
-0.23598076403141022,
0.23876094818115234,
0.774648129940033,
0.1727215200662613,
-0.1837346851825714,
0.22675883769989014,
1.5430400371551514,
-0.12676672637462616,
-1.7836596965789795,
0.5715173482894897,
0.5737146139144897,
0.6621755957603455,
-1.3946322202682495,
-0.7678342461585999,
... |
def test _ atomic _ any _ uri _ max _ length _ 3 _ nistxml _ sv _ iv _ atomic _ any _ uri _ max _ length _ 4 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - maxlength - 4. xsd ", instance = " nistdata... | [
0.17149439454078674,
-0.023972079157829285,
0.38149359822273254,
0.8765560984611511,
-0.5710877776145935,
0.07505033910274506,
-0.23203326761722565,
0.004778696224093437,
-0.24582982063293457,
-0.10388682782649994,
-0.33392858505249023,
-0.525840163230896,
-0.45135536789894104,
-0.06665977... |
def itksubtractconstantfromimagefiltericf2cficf2 _ superclass _ cast ( * args ) : return _ itksubtractconstantfromimagefilterpython. itksubtractconstantfromimagefiltericf2cficf2 _ superclass _ cast ( * args ) | [
1.0807287693023682,
-0.6420227289199829,
0.10043815523386002,
-0.2712631821632385,
-0.6168932914733887,
-0.6598238348960876,
0.5550454258918762,
1.1986885070800781,
-1.1244478225708008,
-0.48083969950675964,
-1.3873440027236938,
-0.33269307017326355,
0.2985452711582184,
-0.1653345376253128... |
def forward ( self, x _ human, x _ objects, objects _ mask ) : # initial embeddings x _ human, x _ objects = self. human _ embedding _ mlp ( x _ human ), self. object _ embedding _ mlp ( x _ objects ) # frame - level birnns hx _ hfr = self. _ process _ frame _ level _ rnn ( x _ human, self. human _ bd _ rnn ) hx _ ofr ... | [
-0.33774232864379883,
0.31137901544570923,
1.0364224910736084,
0.4760574996471405,
0.4548749625682831,
-0.20602557063102722,
0.7322065234184265,
-0.19849424064159393,
-0.4355621039867401,
-0.11203643679618835,
-0.8727055788040161,
0.5349354147911072,
0.06060395389795303,
-0.083950050175189... |
def test _ blocks ( blockset ) : for attribute in [ 0, 1, 2 ] : for i in blockset : q = [ 0, 0, 0, 0 ] for j in blockset [ i ] : for k in blockset [ i ] [ j ] : q [ k [ attribute ] ] + = 1 for x in q : if x! = 6 : print i print j print k return false return true | [
0.15319089591503143,
-0.0017351956339552999,
0.5767149925231934,
0.2963923513889313,
-0.6896054744720459,
-0.2900594174861908,
0.6453272104263306,
-1.1245847940444946,
-0.031917769461870193,
-0.03208942711353302,
-0.6186001896858215,
-1.21549654006958,
-0.2753753960132599,
0.22481125593185... |
def layer _ norm _ and _ dropout ( input _ tensor, dropout _ prob, name = none ) : output _ tensor = layer _ norm ( input _ tensor, name ) output _ tensor = dropout ( output _ tensor, dropout _ prob ) return output _ tensor | [
0.5026842951774597,
-1.2816312313079834,
0.2198014259338379,
0.9257132411003113,
-1.0779284238815308,
0.7440082430839539,
0.5049904584884644,
0.6441202759742737,
-0.12631326913833618,
1.0135350227355957,
-0.08161179721355438,
-0.10967674851417542,
-0.25727027654647827,
-0.542555034160614,
... |
def if _ x _ in _ y ( charlist, word ) : for char in charlist : if char in word : return true return false | [
0.5466377139091492,
-0.1830683797597885,
0.33272889256477356,
0.35851866006851196,
-0.8409104943275452,
0.011779610067605972,
-1.4964572191238403,
0.198470339179039,
-1.2283082008361816,
0.6788934469223022,
-1.3839133977890015,
0.5173410177230835,
-0.895322859287262,
0.08129709213972092,
... |
def search _ by _ meter _ id ( self, meter _ id : str ) : log. info ( " searching by meter id. " ) if not meter _ id : raise missingmeteridconfigurationexception ( ) self. get _ meter _ searchbox ( ). send _ keys ( meter _ id ) | [
0.0022532290313392878,
0.08943362534046173,
0.07064971327781677,
0.5936124324798584,
0.022958990186452866,
-0.15757077932357788,
-0.24226884543895721,
-1.2620936632156372,
-0.32167115807533264,
0.02440640516579151,
-0.09202972054481506,
1.0580276250839233,
-0.49337780475616455,
1.376460075... |
def resetcse ( verbose : bool = false ) - > bool : if not runscript ('reset') : # uppercase! if verbose : printmd ('* * error during reset * * ', c ='red') return false if verbose : printmd ('* * cse sucessfully resetted * * ', c ='green') return true | [
-0.1416746973991394,
0.3747328519821167,
0.6698972582817078,
1.1224439144134521,
0.5722172260284424,
0.6078513860702515,
0.5305051207542419,
0.11845917254686356,
-0.6092689037322998,
1.162237286567688,
-0.27999523282051086,
0.9352369904518127,
-0.9286077618598938,
0.054794952273368835,
0... |
def parse ( self, page ) : return [ self. _ _ createpostfrommatch ( m ) for m in self. _ _ regex. findall ( page ) ] | [
-0.5054510235786438,
-0.2789517939090729,
0.5801836252212524,
0.24562592804431915,
0.5399208664894104,
0.24397012591362,
-0.8073110580444336,
0.8129194378852844,
-0.05062941461801529,
-0.2136378288269043,
-0.46163177490234375,
-1.34663987159729,
-0.6485341191291809,
0.38984552025794983,
... |
def load _ data ( y _ name = " species " ) : train _ path = tf. keras. utils. get _ file ( train _ url. split ( " / " ) [ - 1 ], train _ url ) test _ path = tf. keras. utils. get _ file ( test _ url. split ( " / " ) [ - 1 ], test _ url ) train = pd. read _ csv ( train _ path, names = csv _ column _ names, header = 0 ) ... | [
-0.6182859539985657,
-0.4402971863746643,
0.8005239963531494,
-0.49564898014068604,
-0.0645904541015625,
-0.20518048107624054,
-0.056588586419820786,
0.294385701417923,
-1.4226511716842651,
0.36225366592407227,
-0.5398136377334595,
0.3531997799873352,
0.04108453914523125,
-0.89452642202377... |
def setup ( self ) : data = {'past a': - 50,'past b': - 30,'current': - 10,'next': 10,'future': 30 } for title, delta in data. iteritems ( ) : date = timezone. now ( ) + timedelta ( days = delta ) s = season ( title = title, start _ date = date ) s. save ( ) season. objects. filter ( title ='default season'). delete ( ... | [
-0.6048844456672668,
0.38622596859931946,
0.5779604315757751,
-0.27526751160621643,
1.0326539278030396,
0.7688949704170227,
0.6569291353225708,
-0.6140693426132202,
-0.03298218175768852,
0.811926007270813,
-0.46786341071128845,
-0.06261425465345383,
-0.007787634152919054,
0.182976469397544... |
def unknown _ starttag ( self, tag, attrs ) : # raise event for anybody interested in catching a tagparse event... if objects. eventmgr and objects. eventmgr. raise _ event ('beforetag ', self. url, none, tag = tag, attrs = attrs ) = = false : # don't parse this tag.. return # set as current tag self. _ tag = tag # pri... | [
-0.23448602855205536,
-0.7317989468574524,
0.4918937087059021,
0.25175145268440247,
0.16118980944156647,
-0.3903329372406006,
-0.06684703379869461,
0.09948500245809555,
0.11504454165697098,
-0.7497381567955017,
0.16107606887817383,
0.35687804222106934,
0.08161409944295883,
0.85008543729782... |
def is _ palindrome ( string : str ) - > bool : # backwards = string [ : : - 1 ] # return backwards = = string return string [ : : - 1 ]. casefold ( ) = = string. casefold ( ) | [
-0.2474455088376999,
-0.48525717854499817,
0.5641687512397766,
0.25701287388801575,
-0.1986134797334671,
0.3714134991168976,
-0.28843843936920166,
-0.3777371346950531,
0.21472039818763733,
0.3736165761947632,
0.140325129032135,
0.5396353006362915,
-1.624475121498108,
-1.1175143718719482,
... |
def add ( self, state, action, reward, next _ state, done ) : e = self. experience ( state, action, reward, next _ state, done ) self. memory. append ( e ) | [
0.29276105761528015,
0.46769073605537415,
0.46855050325393677,
-0.37131041288375854,
0.9230392575263977,
0.3356989622116089,
-0.6999430060386658,
-0.11103198677301407,
1.0239595174789429,
0.34369009733200073,
-0.3560602366924286,
0.7581855058670044,
-0.4267767071723938,
0.00996348075568676... |
def process _ data ( self, event : str ) : if self. _ already _ processed ( event ) : return if self. comm. project. remote _ data _ processing : # get local proc filename lasif _ root = self. comm. project. lasif _ root proc _ filename = ( f " preprocessed _ { int ( self. comm. project. min _ period ) } s _ " f " to _... | [
0.6476046442985535,
0.28106245398521423,
0.9778794050216675,
-0.5306363105773926,
0.6069827675819397,
0.4287264943122864,
0.06159183755517006,
-0.14543375372886658,
0.0783025249838829,
-0.4015176296234131,
-0.37027570605278015,
0.37671172618865967,
0.07403337210416794,
0.014577564783394337... |
def tag ( self ) - > str : setup _ tag = conf. instance [ " notation " ] [ " setup _ tags " ] [ " pipeline " ] [ " pipeline " ] hyper _ tag = self. _ pipeline _ tag _ from _ setup ( setup = self. setup _ hyper ) light _ tag = self. _ pipeline _ tag _ from _ setup ( setup = self. setup _ light ) mass _ tag = self. _ pip... | [
0.38330379128456116,
-0.7021587491035461,
0.6010514497756958,
-0.29647278785705566,
0.7217842936515808,
0.08187440037727356,
0.3267981708049774,
0.1956900805234909,
-1.2802205085754395,
0.7839145064353943,
-0.038914114236831665,
-0.18341661989688873,
0.680022656917572,
0.4232611358165741,
... |
def visit _ lambda ( self, node : cst. lambda, ) - > bool : return false | [
-1.1482867002487183,
0.8823272585868835,
0.676909863948822,
-0.7787125110626221,
-0.6948607563972473,
0.9536190032958984,
-0.172228142619133,
0.37864387035369873,
-0.3669685125350952,
-0.09744305908679962,
-0.0944521352648735,
0.23253215849399567,
0.15921491384506226,
0.5593732595443726,
... |
def auto _ is _ ok ( * args ) : return _ ida _ auto. auto _ is _ ok ( * args ) | [
-0.8191573023796082,
0.10354489088058472,
0.3780888020992279,
1.0838844776153564,
0.3228878974914551,
-0.042382873594760895,
1.0693033933639526,
-0.633518397808075,
-0.7266085743904114,
0.7087678909301758,
-0.7163459062576294,
0.8544560670852661,
-0.12038775533437729,
-0.5192720890045166,
... |
def kld ( p, q ) : return ( np. log2 ( p / q ) * p ). sum ( axis = 1 ) | [
1.741029977798462,
-0.1779063493013382,
0.3894995450973511,
-0.697564423084259,
-0.2973102629184723,
0.48834338784217834,
-1.758926510810852,
0.003939392045140266,
0.41542473435401917,
0.4640684723854065,
0.4765530824661255,
0.7159510254859924,
0.019801771268248558,
0.07885488867759705,
... |
def run _ testcase ( daemons, case, root _ addr, addr _ family, prog _ under _ test _ ip ) : server = testserver. testserver ( case, root _ addr, addr _ family ) server. start ( ) try : server. play ( prog _ under _ test _ ip ) finally : server. stop ( ) for daemon in daemons : daemon ['proc']. terminate ( ) daemon ['p... | [
-0.4608558416366577,
-0.4740194082260132,
0.7508347630500793,
0.40006545186042786,
0.11006449908018112,
-0.4080437123775482,
0.432816743850708,
-0.44372692704200745,
0.021144254133105278,
0.2617162764072418,
0.6013580560684204,
-0.17405696213245392,
-0.2090160846710205,
0.26804402470588684... |
def test _ extract _ links ( self ) : links = [ extract _ billpage _ content. extract _ links ( soup ) for \ soup in self. soups ] self. assertequal ( links, target _ billpage _ links ) | [
-0.5518290400505066,
0.03115823306143284,
0.39079734683036804,
-0.02972434088587761,
1.5224744081497192,
0.18391485512256622,
0.1275559365749359,
0.162105992436409,
0.3996705710887909,
-1.2318049669265747,
-0.057931121438741684,
-0.6052272319793701,
-0.243327334523201,
0.1374848484992981,
... |
def strobe _ one _ state _ infinite _ plane ( model, n _ tracks, track _ len = 10, dz = 0. 7, dt = 0. 01, loc _ error = 0. 0, exclude _ outside = true, n _ gaps = 0, return _ dataframe = true, * * model _ kwargs ) : model _ obj = diffusion _ models [ model ] ( dt = dt, track _ len = track _ len, * * model _ kwargs ) re... | [
0.2861494719982147,
1.1486432552337646,
0.489853173494339,
0.7399337887763977,
-0.29813459515571594,
0.6669586300849915,
0.31515467166900635,
-0.6719198226928711,
0.1795523762702942,
0.02177164889872074,
-0.40479040145874023,
-0.1150154173374176,
-0.694012463092804,
0.013527294620871544,
... |
def pci ( self, pci ) : self. _ pci = pci | [
0.6039096117019653,
-0.42323461174964905,
-0.04212598130106926,
1.0515904426574707,
-0.4745675325393677,
1.1044150590896606,
0.32767006754875183,
0.6670517325401306,
-0.048891499638557434,
-0.6976019740104675,
-0.8758750557899475,
-0.6576283574104309,
-0.6654021739959717,
0.149514302611351... |
def ping ( self ) : return get _ kernel ( ). run ( self. aping ) | [
-1.081298828125,
0.0804787203669548,
0.2181861400604248,
0.7187817692756653,
0.6812968850135803,
-0.9540138244628906,
-0.581692099571228,
-0.12670566141605377,
0.06148301437497139,
-0.11349104344844818,
0.7965587973594666,
0.025779489427804947,
-0.8489738702774048,
0.3492358922958374,
-0... |
def cleanup ( hpss _ path ) : print ('removing test files, both locally and at the hpss repo') for d in ['zstash _ test ','zstash _ test _ backup ','zstash'] : if os. path. exists ( d ) : shutil. rmtree ( d ) if hpss _ path and hpss _ path. lower ( )! ='none': cmd ='hsi rm - r { } '. format ( hpss _ path ) run _ cmd ( ... | [
1.2558165788650513,
-0.2521420121192932,
0.5363647937774658,
0.552528977394104,
0.9138962626457214,
-0.1574588119983673,
0.7345274090766907,
0.2574026882648468,
0.5739749670028687,
-0.7488544583320618,
-0.10295259207487106,
-0.47140657901763916,
-0.3031046986579895,
0.6257738471031189,
-... |
def get _ bot _ dict ( self, bot ) : arbitrage = self. get _ macd ( bot. get _ id ( ) ) if not arbitrage : raise exception ( " no macd bot found " ) else : bot _ dict = { " id " : str ( bot. get _ id ( ) ), " threshold " : str ( bot. get _ threshold ( ) ), " win _ limit " : str ( bot. get _ win _ limit ( ) ), " loss _ ... | [
-0.12346988916397095,
-0.2944699823856354,
0.7015711665153503,
-0.7785377502441406,
-1.3037480115890503,
0.4828338623046875,
-0.7948831915855408,
-0.6712434887886047,
-0.7393133640289307,
-0.15042932331562042,
-0.7003609538078308,
0.5895090103149414,
0.18098393082618713,
0.9235869646072388... |
def initialize ( self, data _ mgr, resource _ mgr, task _ mgr, ftb ) : # pytau. start ( self. timers ['initialize'] ) # start ( self. timers ['initialize'] ) local _ debug = false self. event _ mgr = none # eventmanager ( self ) self. data _ mgr = data _ mgr self. resource _ mgr = resource _ mgr self. task _ mgr = task... | [
0.4199479818344116,
-0.2124868929386139,
0.7082782983779907,
0.79249507188797,
-0.2526145279407501,
0.44598501920700073,
0.5293529033660889,
0.3920706510543823,
-1.7708227634429932,
-0.09273169934749603,
-0.5702879428863525,
-0.2496410608291626,
-0.1764664649963379,
1.9875158071517944,
0... |
def do _ login ( self, request, email = none, password = none, user = none, * * extra _ fields ) : if user : user. backend ='django. contrib. auth. backends. modelbackend'else : if not email : return response ( status = status. http _ 400 _ bad _ request, data ='email is mandatory.') user = authenticate ( email = email... | [
-0.9523486495018005,
-0.007816489785909653,
0.7313737869262695,
0.7214429378509521,
-0.2696499824523926,
0.0491672083735466,
-0.2706204056739807,
0.7341889142990112,
0.12512020766735077,
0.07542315870523453,
-0.8784241080284119,
0.38270118832588196,
0.13012941181659698,
-1.2920444011688232... |
def reset _ gradient ( self ) : self. gradient _ value = none for _, child in self. children : child. reset _ gradient ( ) | [
0.10817854106426239,
0.37579256296157837,
0.5485336780548096,
0.025641780346632004,
0.3780042827129364,
-0.4882306158542633,
0.8091281652450562,
0.029346846044063568,
-1.702358365058899,
0.35890111327171326,
-1.2427953481674194,
1.1436134576797485,
-0.5223752856254578,
0.8599132895469666,
... |
def get _ context _ from _ analysis ( app _ dic, xml _ dic, bin _ an _ dic ) : try : context = {'title':'static analysis ','version': settings. kensa _ ver,'file _ name': app _ dic ['app _ name'],'app _ name': bin _ an _ dic ['bin _ name'],'publisher _ name': xml _ dic ['pub _ name'],'size': app _ dic ['size'],'md5': a... | [
0.5018035173416138,
-0.3032573461532593,
0.6464129686355591,
-0.5425616502761841,
-1.1847718954086304,
0.11921222507953644,
-0.21017451584339142,
-0.12159059196710587,
-0.3441358506679535,
0.70384281873703,
0.5193837285041809,
-0.3563522696495056,
0.28806620836257935,
-0.2375069409608841,
... |
def _ recfind ( self, s, name ) : for p in os. listdir ( s ) : if p = = name and os. path. isdir ( os. path. join ( s, p ) ) : return [ true, os. path. join ( s, p, " plugin " ) ] elif os. path. isdir ( os. path. join ( s, p ) ) : r = self. _ recfind ( os. path. join ( s, p ), name ) if r [ 0 ] : return r return [ fals... | [
-0.4301505982875824,
-1.031013011932373,
0.6990938186645508,
-0.3999415338039398,
-0.38343533873558044,
-1.2255624532699585,
0.4651110768318176,
-0.4955216944217682,
0.876458466053009,
0.3162999749183655,
-0.17849399149417877,
0.5490307211875916,
-0.3602323532104492,
0.3229924440383911,
... |
def test _ user _ full _ name ( self ) : bill _ id = 4 bill _ full _ name ='bill lumbergh'bill = user. query. get ( bill _ id ) assert bill assert bill. full _ name = = bill _ full _ name assert bill = = user. query. filter _ by ( full _ name = bill _ full _ name ). one ( ) | [
1.2453892230987549,
0.29765939712524414,
0.25643184781074524,
0.8678691387176514,
-0.38877081871032715,
0.5211261510848999,
-0.07268735766410828,
-0.3651983141899109,
0.3298476040363312,
-0.8996142148971558,
-1.1906238794326782,
-0.4064085781574249,
0.5465664267539978,
0.9258004426956177,
... |
def get _ instance _ manager ( instance _ manager _ type : types ) - > union [ instancemanager, none ] : return services. get _ instance _ manager ( instance _ manager _ type ) | [
-0.8726629614830017,
-0.1171756163239479,
0.05950706824660301,
-0.44222381711006165,
0.2146274298429489,
-0.1812930852174759,
-0.5778641104698181,
-1.0666725635528564,
0.25744953751564026,
-0.4542693495750427,
0.470394492149353,
1.117748737335205,
-1.274490475654602,
0.44129887223243713,
... |
def onsaveasbuttonclicked ( self ) : savefile = self. _ view. getsavefile ( ) self. _ pandacontroller. savescene ( savefile ) | [
-0.05993020534515381,
-0.542655885219574,
0.403365820646286,
-0.00944115873426199,
0.8749509453773499,
0.2562839984893799,
0.9467067718505859,
-0.6680685877799988,
-0.37818554043769836,
-0.21842557191848755,
-0.5873298048973083,
-0.9452812671661377,
0.5586925148963928,
-0.27558812499046326... |
def get _ all _ actions ( self ) : return [ x for section in self. raw _ data [ " homepagesections " ] for x in section [ " tiles " ] ] | [
0.25138765573501587,
-0.42633703351020813,
0.46613413095474243,
1.268498420715332,
0.31808236241340637,
0.43523308634757996,
-0.5529022812843323,
0.03682304173707962,
0.5594038963317871,
-0.07561797648668289,
0.2589573562145233,
0.5778128504753113,
0.48765891790390015,
1.1960304975509644,
... |
def _ fini ( self, x, y ) : self. end _ fit _ = time. time ( ) self. fit _ time _ elapsed _ = ( self. end _ fit _ - self. start _ fit _ ) self. results _. update ( { " best score " : self. best _ score _ } ) self. results _. update ( { " best estimator " : self. best _ estimator _ } ) self. results _. update ( { " best... | [
-0.27256280183792114,
-0.10764876753091812,
0.6551671624183655,
0.23695151507854462,
0.9830845594406128,
-0.5897411108016968,
0.35438328981399536,
-0.2974986433982849,
-1.502592921257019,
-0.041105739772319794,
-0.7317274808883667,
0.286049485206604,
0.1341324895620346,
0.2630980312824249,... |
def time _ function ( f, * args ) : import time ; tic = time. time ( ) ; f ( * args ) ; toc = time. time ( ) ; return toc - tic ; | [
0.4374733865261078,
0.341551274061203,
0.4965991675853729,
-0.0901976153254509,
0.5203343033790588,
-0.2903802692890167,
0.41100287437438965,
0.21323110163211823,
-1.3627650737762451,
1.363480806350708,
-0.4771556556224823,
-0.8936512470245361,
0.08479886502027512,
-0.28019940853118896,
... |
def test _ list _ decimal _ min _ length _ 1 _ nistxml _ sv _ iv _ list _ decimal _ min _ length _ 2 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - minlength - 2. xsd ", instance = " nistdata / list / ... | [
-0.24615971744060516,
-0.7853028178215027,
0.4349539279937744,
0.5873238444328308,
-0.17880699038505554,
-0.4395948350429535,
-0.5037754774093628,
-0.3412652015686035,
0.559138834476471,
-0.5847192406654358,
-1.103248119354248,
-0.13692137598991394,
-0.3540508449077606,
0.6864259243011475,... |
def test _ atomic _ hex _ binary _ pattern _ 1 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ pattern _ 2 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - pattern - 2. xsd ", instance = " nistdata... | [
-0.2358086109161377,
-0.6730442643165588,
0.5964011549949646,
1.0064796209335327,
-0.16186638176441193,
0.291404128074646,
-0.31434202194213867,
0.1918770968914032,
-0.7131684422492981,
0.19452524185180664,
-0.6466532945632935,
-0.0209999680519104,
0.39054498076438904,
0.6691706776618958,
... |
def execute _ query ( self, query, * args ) : result = none try : connection, cursor = self. connect _ database ( ) if args : logger. info ('executing query : { } \ nwith inputs : { } '. format ( query, args [ 0 ] ) ) cursor. execute ( query, ( args [ 0 ] ) ) else : logger. info ('executing query : { } '. format ( quer... | [
-0.8186415433883667,
-0.12813368439674377,
0.8006201386451721,
0.14857688546180725,
0.6174982786178589,
-0.011447269469499588,
-1.1738827228546143,
-0.29392343759536743,
0.3726593255996704,
0.7142464518547058,
0.8246655464172363,
-0.846964955329895,
-0.9747167825698853,
-0.0604882761836051... |
def createrecap ( dict _ data ) : nbtypes = len ( groundtype ) workbook = xlw. workbook ('bdd _ recap. xlsx') sheet = workbook. add _ worksheet ( " recap " ) for i in range ( nbtypes ) : sheet. write ( 1, 2 + 2 * i, " nb cches " ) sheet. write ( 1, 2 + 2 * i + 1, " longueur " ) forages = [ ] for sheet _ name in dict _ ... | [
-0.042876217514276505,
0.3103853464126587,
0.7892787456512451,
-0.4008544385433197,
0.0457756370306015,
0.541117787361145,
0.039893120527267456,
0.12325963377952576,
-0.40715742111206055,
0.3617403209209442,
0.0402582511305809,
0.029638195410370827,
0.5105570554733276,
0.5163330435752869,
... |
def reviewbottomleft ( self, inputevent ) : context = self. getflatreviewcontext ( ) context. goend ( flat _ review. context. window ) context. gobegin ( flat _ review. context. line ) self. _ reviewcurrentline ( inputevent ) self. targetcursorcell = self. getbraillecursorcell ( ) return true | [
0.17652152478694916,
-0.8746273517608643,
0.5373698472976685,
-0.23481059074401855,
0.5825030207633972,
0.930105447769165,
0.1240105926990509,
-0.3326607942581177,
-0.38732388615608215,
-0.40751543641090393,
-0.36237832903862,
1.0194964408874512,
-0.9088194370269775,
0.3940809965133667,
... |
def zinb _ ll ( data, p, r, z ) : lls = nb _ ll ( data, p, r ) clusters = p. shape [ 1 ] for c in range ( clusters ) : pass return lls | [
0.20116136968135834,
-0.4567299783229828,
0.1444891393184662,
0.6158338785171509,
0.44338348507881165,
0.5395950078964233,
0.3633809983730316,
-0.39890992641448975,
0.4368899464607239,
0.15676771104335785,
-0.1347491294145584,
0.1545036882162094,
-1.4324486255645752,
-0.5250604748725891,
... |
def _ normalise _ vote ( self, amount ) : if amount > 0 : return amount / ( self. total _ uo _ given / self. total _ down _ given ) return amount / ( self. total _ down _ given / self. total _ uo _ given ) | [
0.7279111742973328,
-0.05455790460109711,
0.3285869359970093,
0.1575971394777298,
-0.38906311988830566,
0.22480382025241852,
0.42737966775894165,
0.18469169735908508,
0.5366885662078857,
0.2960145175457001,
0.8176121115684509,
-0.31905511021614075,
-1.0997562408447266,
0.16228188574314117,... |
def variable ( var, required _ keys ) : required = set ( required _ keys ) missing = required - set ( var ) if missing : raise recipeerror ( " missing keys { } from variable { } in diagnostic { } ". format ( missing, var. get ('short _ name'), var. get ('diagnostic') ) ) | [
0.0970916897058487,
-0.2326352447271347,
0.3508373200893402,
-0.5635467767715454,
-0.36025023460388184,
-0.24499011039733887,
-1.0459171533584595,
0.8036540746688843,
-0.8245992064476013,
0.7280502319335938,
0.2077838033437729,
0.4670756161212921,
0.5743874311447144,
0.7445998191833496,
... |
def find _ interval _ containing _ large _ cusp ( self, large _ cusp ) : large _ tt = self. _ large _ tt large _ switch = large _ tt. cusp _ to _ switch ( large _ cusp ) # count the total number of strands on the left of the cusp in the # branches of the large train track for branch, total in self. accumulate _ outgoin... | [
-0.1296139359474182,
-0.5131186842918396,
0.7738773226737976,
-0.3927934169769287,
-0.9907484650611877,
0.30721306800842285,
1.138689637184143,
0.16104839742183685,
0.5240081548690796,
-0.07899022847414017,
-0.4076682925224304,
-0.6956538558006287,
-0.525789737701416,
0.7899947762489319,
... |
def getelement ( self, e ) : return self. _ elements [ e ] | [
-0.7054756879806519,
0.33403104543685913,
0.3561211824417114,
0.1386607140302658,
0.9083852767944336,
0.735436737537384,
0.05711870640516281,
-0.5745980739593506,
0.6382880210876465,
-0.5589497089385986,
0.26286569237709045,
1.0135407447814941,
0.4272891581058502,
0.13152946531772614,
0.... |
def getefficiency ( ctx, # mandatory main parameter volumeid ) : cli _ utils. establish _ connection ( ctx ) ctx. logger. info ( " " " : " " " " " " volumeid = " " " + str ( volumeid ) + " " " ; " " " + " " ) try : _ getvolumeefficiencyresult = ctx. element. get _ volume _ efficiency ( volume _ id = volumeid ) except c... | [
-0.8801807761192322,
-0.12925326824188232,
0.8128702640533447,
0.24492409825325012,
0.8830918669700623,
-0.8797016143798828,
0.2745853364467621,
-0.5708494782447815,
-0.04016115888953209,
0.43471160531044006,
-0.16483081877231598,
1.22734534740448,
-0.816703736782074,
0.7790603637695312,
... |
def get _ tile ( self, row, col ) : return self. _ tiles [ row ] [ col ] | [
0.5915709137916565,
0.3606910705566406,
0.17993907630443573,
0.028457272797822952,
-0.09716878086328506,
-0.14584031701087952,
-0.25773343443870544,
-1.0665512084960938,
-0.7209982872009277,
-0.20025037229061127,
0.5923115611076355,
1.2088732719421387,
0.0462297759950161,
-1.44198060035705... |
def sobol _ sample ( dim, num _ results, skip = 0, dtype = dtypes. float32, name = none ) : with ops. name _ scope ( name, " sobol ", [ dim, num _ results, skip ] ) : return gen _ math _ ops. sobol _ sample ( dim, num _ results, skip, dtype = dtype ) | [
0.4376849830150604,
0.7260456681251526,
0.5204532146453857,
0.7330228686332703,
-1.413025140762329,
-0.08432227373123169,
0.5752174258232117,
-0.905241847038269,
0.5884515047073364,
0.717300295829773,
0.2240619957447052,
0.4177965521812439,
0.4450051784515381,
-1.5273809432983398,
-0.346... |
def invest _ validator ( validate _ func ) : def _ wrapped _ validate _ func ( args, limit _ to = none ) : validate _ func _ args = inspect. getargspec ( validate _ func ) assert validate _ func _ args. args = = ['args ','limit _ to'], ('validate has invalid parameters : parameters are : % s.'% ( validate _ func _ args... | [
-1.204395055770874,
0.37923163175582886,
0.8491001129150391,
0.17413876950740814,
0.5715269446372986,
-0.10548315942287445,
0.41256386041641235,
-0.5054947137832642,
-0.6807050108909607,
0.5984304547309875,
0.3550319969654083,
0.2780096232891083,
0.4245586395263672,
-0.26537665724754333,
... |
def rotate ( s, n ) : return s [ n : ] + s [ : n ] | [
-0.35821446776390076,
0.3022603988647461,
0.19141297042369843,
-0.6656694412231445,
0.4492029547691345,
-1.110514760017395,
-0.9280385971069336,
-0.6695975065231323,
0.7058932185173035,
-0.1034153550863266,
-0.4373338222503662,
0.7914186716079712,
-1.0851447582244873,
-1.9195950031280518,
... |
def test _ do _ update ( test _ dao ) : dut = dtmsimilaritem ( test _ dao ) dut. do _ select _ all ( revision _ id = 1 ) _ similar _ item = dut. do _ select ( 1 ) _ similar _ item. n _ sub _ systems = 2 _ error _ code, _ msg = dut. do _ update ( 1 ) assert _ error _ code = = 0 assert _ msg = = ( " ramstk success : upda... | [
0.016157254576683044,
0.8793250322341919,
0.5585951805114746,
0.9376767873764038,
0.22524431347846985,
0.8006529808044434,
0.6573628187179565,
0.16941608488559723,
0.17101605236530304,
0.5516113638877869,
-0.6518407464027405,
-0.0036562480963766575,
-0.38330164551734924,
-0.599956452846527... |
def setup ( self ) : pass | [
0.3943325877189636,
-0.8089319467544556,
0.1300976425409317,
0.6270203590393066,
0.8748908042907715,
0.7378865480422974,
1.2475836277008057,
0.08139027655124664,
0.44794386625289917,
-0.5066981315612793,
-0.4867737591266632,
-0.15430934727191925,
-0.5390669703483582,
0.5582965612411499,
... |
def obfuscate _ header _ no _ match ( self, name, original _ value ) : obfuscated _ value = headerobfuscator. default _ header _ obfuscator ( ). obfuscate _ header ( name, original _ value ) self. assertequal ( original _ value, obfuscated _ value ) | [
-0.32059183716773987,
0.3997513949871063,
0.35711395740509033,
0.851359486579895,
-0.4427502453327179,
0.6299805641174316,
-0.42937448620796204,
-0.6074618697166443,
-0.11572595685720444,
-0.8890241980552673,
-0.7370237708091736,
-0.22532810270786285,
-1.0652062892913818,
-0.54248380661010... |
def pi _ from _ qmat ( qmat ) : qmatdim = len ( qmat ) if qmatdim = = 1 : x = np. array ( [ 1. ] ) else : qmatext = np. hstack ( [ qmat, np. ones ( ( qmatdim, 1. 0 ) ) ] ) b = np. zeros ( ( qmatdim + 1, ) ) b [ - 1 ] = 1 res = np. linalg. lstsq ( qmatext. t, b ) x = res [ 0 ] # x = list ( x ) return x | [
0.1611250638961792,
-0.18780463933944702,
0.503075122833252,
0.07816460728645325,
-0.8063745498657227,
0.6413454413414001,
-0.5788704752922058,
-0.11853506416082382,
1.25892174243927,
0.6738645434379578,
0.005229664035141468,
-0.7265015840530396,
-0.7823858857154846,
-0.635593593120575,
... |
def _ is _ light _ red ( self, lights _ list ) : if self. _ map _ name = ='town01'or self. _ map _ name = ='town02': return self. _ is _ light _ red _ europe _ style ( lights _ list ) else : return self. _ is _ light _ red _ us _ style ( lights _ list ) | [
-1.4766439199447632,
-0.08710691332817078,
0.365145742893219,
1.008360743522644,
-0.3272356688976288,
-0.4102303683757782,
-1.160094141960144,
0.11393118649721146,
1.2733814716339111,
0.4846847951412201,
-0.4289184510707855,
-0.06457647681236267,
0.09119194000959396,
1.468179702758789,
-... |
def create _ token _ response ( self, request, token _ handler ) : headers = {'content - type':'application / json ','cache - control':'no - store ','pragma':'no - cache ', } try : if self. request _ validator. client _ authentication _ required ( request ) : log. debug ('authenticating client, % r. ', request ) if not... | [
-0.29717981815338135,
-0.5617346167564392,
0.5499159097671509,
-0.19696585834026337,
-0.33915844559669495,
-0.14494873583316803,
0.35843634605407715,
-0.41272419691085815,
-0.3110102117061615,
-0.1933983564376831,
-0.25904664397239685,
0.33355462551116943,
0.7044184803962708,
0.11997815966... |
def meta _ download ( url, dest, tag = none ) : print ( " downloading ", url, " to ", dest ) if os. path. exists ( dest ) : shutil. rmtree ( dest ) if url. endswith ( '. git') : run _ cmd ( ['git ','clone ', url, dest ] ) run _ cmd ( ['git ','checkout ', tag ], cwd = dest ) else : run _ cmd ( ['svn ','co ', url, dest,'... | [
0.1746080368757248,
0.5043962597846985,
0.6936384439468384,
1.2761220932006836,
-0.1578129380941391,
-0.24862146377563477,
-0.44539928436279297,
0.49950191378593445,
-0.13854524493217468,
0.7275890111923218,
0.38602396845817566,
0.32024699449539185,
0.35834363102912903,
0.11243567615747452... |
def is _ client _ error ( status ) : return 400 < = status and status < = 499 | [
-0.13868515193462372,
-0.3631858229637146,
0.3771894574165344,
0.27345675230026245,
-0.953475296497345,
0.5503320097923279,
-0.5132048726081848,
-0.8476431965827942,
0.7910187244415283,
-0.3848733901977539,
-0.4708061218261719,
0.9361905455589294,
-0.05718588829040527,
-0.17093424499034882... |
async def async _ setup ( hass, config ) : hass. data [ domain ] = { " config " : config. get ( domain, { } ), " registry " : none, " pending " : { }, } if domain in config : hass. async _ create _ task ( hass. config _ entries. flow. async _ init ( domain, context = { " source " : config _ entries. source _ import } )... | [
0.11058651655912399,
1.2613651752471924,
0.4668128490447998,
-0.1799718588590622,
0.8215517997741699,
-0.23184190690517426,
0.6808769106864929,
0.7949662208557129,
0.8384450674057007,
0.4423910975456238,
-1.201144814491272,
0.2659207582473755,
0.5298681855201721,
0.960787296295166,
0.152... |
def test _ step ( self, batchdata, * * kwargs ) : pass | [
-0.2421792894601822,
-0.35763779282569885,
0.21834398806095123,
0.7037698030471802,
0.5086830258369446,
0.823797345161438,
0.17621450126171112,
-0.15817485749721527,
-0.8065898418426514,
-1.4487340450286865,
-0.8188891410827637,
0.14423909783363342,
-0.9321990013122559,
0.7263943552970886,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.