text
stringlengths
25
2.19k
embedding
listlengths
768
768
def createvelocity ( self ) : spin = twist ( ) distance = get _ distance ( self. target _ angle, self. theta ) spin. angular. z = 0. 3 * distance spin. linear. x =. 1 return spin
[ 0.5096441507339478, -0.8147146105766296, 0.2099141925573349, 0.27933013439178467, 0.8754270672798157, 0.7715821862220764, -0.10318707674741745, -0.23136432468891144, 0.1959439516067505, -0.014053515158593655, -0.12597687542438507, 0.501599133014679, -0.1697181761264801, -0.8826498985290527...
def _ wrap _ predictor ( search _ range, predictor, t ) : def coord _ mapping ( level ) : # swap axes order ( need to do inplace to preserve the point attributes ) for p in level : p. pos = p. pos [ : : - 1 ] result = np. array ( list ( predictor ( t, level ) ) ) for p in level : # swap axes order back p. pos = p. pos ...
[ -1.4442485570907593, -1.005534291267395, 0.5385715365409851, -0.4330514669418335, -0.28905189037323, 0.24386483430862427, 0.12141376733779907, 0.2550954222679138, -0.970943808555603, 0.8033233284950256, 0.5954246520996094, -0.11321758478879929, 0.8869990110397339, -0.9957242012023926, 0....
def batch _ sentences ( sentences, lm _ labels = none, lg _ ids = none ) : # sentences = sorted ( sentences, key = lambda x : len ( x ), reverse = true ) lengths = torch. longtensor ( [ len ( s ) + 2 for s in sentences ] ) sent = torch. longtensor ( lengths. max ( ). item ( ), lengths. size ( 0 ) ). fill _ ( 1 ) # pad ...
[ -0.039534132927656174, -0.3631304204463959, 0.8291605114936829, -0.364859014749527, 0.00874387752264738, -0.4111681580543518, -0.23291908204555511, -0.2263709157705307, -0.7075625061988831, 0.9509473443031311, -0.8016562461853027, 0.10461772233247757, -0.051884498447179794, 0.3990042209625...
def displayeventtext ( text, pos ) : x = cfg. eventboxrect. left + 15 y = cfg. eventavirect. bottom + 15 for i in text [ pos ] : linesurf = cfg. basicfont. render ( i, true, cfg. white ) linerect = linesurf. get _ rect ( ) linerect. topleft = ( x, y ) cfg. displaysurf. blit ( linesurf, linerect ) y + = 30
[ 1.0402288436889648, -0.9308544397354126, 0.6319226026535034, -0.7894425988197327, -0.36504220962524414, 0.37034687399864197, -0.0018793188501149416, 0.5113658905029297, 0.5569775104522705, 0.14266416430473328, 0.028611842542886734, -0.02734272927045822, -0.029852107167243958, 0.13065987825...
def test _ do _ select _ all ( test _ dao ) : dut = dtmsimilaritem ( test _ dao ) _ tree = dut. do _ select _ all ( revision _ id = 1 ) assert isinstance ( _ tree, tree ) assert isinstance ( _ tree. get _ node ( 2 ). data, ramstksimilaritem )
[ 0.29291579127311707, 0.5603163242340088, 0.4044777750968933, 0.4105722904205322, 0.00036349642323330045, -0.19352146983146667, -0.7161442041397095, 0.3139261305332184, 0.4670209288597107, 0.23705250024795532, -0.5320815443992615, 0.627216100692749, 0.2367689311504364, -0.2727871537208557, ...
def serialize _ numpy ( self, buff, numpy ) : try : _ x = self buff. write ( _ get _ struct _ 3ib7d ( ). pack ( _ x. road _ id, _ x. section _ id, _ x. lane _ id, _ x. is _ junction, _ x. pose. position. x, _ x. pose. position. y, _ x. pose. position. z, _ x. pose. orientation. x, _ x. pose. orientation. y, _ x. pose. ...
[ -0.3214256167411804, -0.2630821764469147, 0.7515266537666321, -0.7182500958442688, 0.5314655303955078, 0.4103752076625824, 0.16943307220935822, -1.1659464836120605, 0.809944212436676, -0.012816397473216057, -0.9655401110649109, 0.3310047686100006, -0.8536845445632935, -0.25548702478408813,...
def ck _ vals ( v, p, l ) : if v in l : return v else : raise validationexception ('value " { 0 } " not in acceptable values for parameter " { 1 } ". acceptable values are : { 2 }. exiting... '. format ( v, p, l ) )
[ 0.7216957211494446, 0.36624282598495483, 0.33307570219039917, 0.14668118953704834, -0.687537431716919, 0.4897725284099579, -0.5532554984092712, -0.3253350257873535, -1.0614700317382812, 0.923397421836853, 0.9304928779602051, 0.4167236089706421, -0.2672009766101837, 0.5509803891181946, -0...
def set _ sparse _ signals ( self ) : self. params _ dss = [ self. mu _ dss, self. sigma _ dss ] self. params _ ss0 = [ self. mu _ ss0, self. sigma _ ss0 ] self. dss, self. idxs = sparse _ vector ( [ self. nn, self. kk ], self. params _ dss, seed = self. seed _ dss ) # ss0 is the ideal ( learned ) background stimulus w...
[ 0.4483838677406311, -0.15857122838497162, 0.33316490054130554, -0.26905810832977295, 0.19005584716796875, -0.08558851480484009, 0.1903228610754013, 0.7981292605400085, 0.11217539012432098, -0.021637706086039543, -1.150027871131897, 1.425695776939392, 0.08181869238615036, 0.7918849587440491...
def get _ brightness ( self, deck _ id : str ) - > int : return self. state. get ( deck _ id, { } ). get ( " brightness ", 100 ) # type : ignore
[ 0.01834418997168541, 0.43002963066101074, 0.3647677004337311, 0.3542131185531616, -0.10214713215827942, -1.4090368747711182, -0.6309902667999268, -0.11445899307727814, 0.4405255615711212, -0.8942230343818665, -0.5143851637840271, 0.405509352684021, 0.4920153319835663, 1.1204278469085693, ...
def run _ command ( cmd, timeout = none, input = none, directory = none ) : return get _ manager ( ). run _ command ( cmd, timeout = timeout, input = input, directory = directory )
[ -0.31883418560028076, -0.19432947039604187, 0.33530136942863464, 0.5299302935600281, -0.48889389634132385, 0.023623313754796982, -0.530891478061676, 0.5169849395751953, 0.19201958179473877, -0.6055098176002502, 0.2270231992006302, 0.6194402575492859, -0.19845552742481232, 0.333481669425964...
def isconnected _ pneanet ( * args ) : return _ snap. isconnected _ pneanet ( * args )
[ -1.4903068542480469, -0.5136669874191284, 0.6234217286109924, 0.3558790981769562, 0.41307708621025085, 0.5011173486709595, -1.4543170928955078, -0.854655385017395, -0.6406055092811584, -0.3594911992549896, -1.2136774063110352, -1.3047332763671875, 0.07233034074306488, 0.12163077294826508, ...
def getgroupdegreecentr ( * args ) : return _ snap. getgroupdegreecentr ( * args )
[ 0.10718978941440582, -0.18145789206027985, 0.7435429692268372, 0.6440035104751587, 0.5627103447914124, 0.8546807169914246, 1.039878010749817, -0.10566895455121994, -1.0434125661849976, -0.01762876845896244, 0.5381857752799988, 0.27337881922721863, -0.338540256023407, 0.8863526582717896, ...
def move ( self, pos, npos ) : pos = position ( * pos ) npos = position ( * npos ) # check square contains piece of right color piece = self. get ( pos ) if piece is none : raise invalidmove ( " no piece on that position " ) elif piece. color is not self. _ playing _ color : raise invalidmove ( " you must move piece of...
[ 0.01778421923518181, -0.5062443614006042, 0.6416086554527283, 0.6655483841896057, -0.04708482697606087, 0.22441506385803223, -0.004419288132339716, -0.7260721325874329, 0.17415925860404968, 0.045183684676885605, -0.6945086717605591, 0.4024757146835327, 0.0211824718862772, -0.27848583459854...
def find _ joint _ nodes _ set ( mom _ collection ) : microbiome _ dict = { } s = set ( ) for mom in mom _ collection. mother _ list : cur _ graph = mom. microbiome _ graph nodes = cur _ graph. nodes ( data = false ) for name, value in nodes : s. add ( name ) i = 0 for microbiome in s : microbiome _ dict [ microbiome ]...
[ 0.3075005114078522, 0.27581986784935, 0.6045031547546387, 0.21364295482635498, -0.4035297930240631, 0.18850474059581757, 0.9878818988800049, 0.05790891498327255, -1.2602252960205078, 0.5892031788825989, -0.9391470551490784, -0.5077065825462341, -0.7631021738052368, 0.4247264266014099, -0...
def begnaflti ( self, * args ) : return _ snap. pneanet _ begnaflti ( self, * args )
[ 0.7182928323745728, 0.14514733850955963, 0.25696903467178345, 0.10608048737049103, 0.6402574777603149, 0.7505213618278503, -0.20679691433906555, -0.7574110627174377, -1.0683919191360474, -0.577235221862793, -0.7901456952095032, -0.7006362080574036, -0.12760266661643982, 0.5560104250907898,...
def jse _ grad ( x, p _ ij, dot _ p _ ij _ log _ p _ ij, w _ cf, n, n _ components ) : x = np. reshape ( a = x, newshape = ( n, n _ components ) ) # computing the lds similarities q _ ij, log _ q _ ij = sne _ lds _ similarities _ fast ( dsm _ lds = pairwise _ dist ( x = x, metric ='sqeuclidean ', tomatrix = true ), arr...
[ -0.48582178354263306, 0.3252652883529663, 0.9520111680030823, -0.8723451495170593, -0.2913026213645935, -0.17485995590686798, 0.3441926836967468, -0.1827607899904251, -0.17410831153392792, 0.5204827189445496, -0.10849961638450623, 0.27771562337875366, -0.0039303661324083805, 0.289911210536...
def get _ rng ( obj = none ) : seed = ( id ( obj ) + os. getpid ( ) + int ( datetime. now ( ). strftime ( " % y % m % d % h % m % s % f " ) ) ) % 4294967295 if _ rng _ seed is not none : seed = _ rng _ seed return np. random. randomstate ( seed )
[ -0.535109281539917, 0.02552262507379055, 0.8754140734672546, -0.48165225982666016, -0.11230051517486572, 0.0024857521057128906, -0.08166965842247009, -0.35340985655784607, 0.9113274216651917, -0.15460354089736938, -0.37480035424232483, 0.5123185515403748, -0.2940950095653534, -0.1364908367...
def is _ keras _ tensor ( x ) : if hasattr ( x,'_ keras _ shape') : return true else : return false
[ -0.17985811829566956, 0.35708799958229065, 0.3312340974807739, 0.7795040011405945, -0.7874112725257874, 0.294809490442276, -0.3086977005004883, -0.3954584300518036, 0.6283738613128662, 0.2419872134923935, -1.1810977458953857, -0.4240363836288452, 1.333055019378662, -0.005240922793745995, ...
def set _ reply ( self, dns _ dict ) : self. set _ answer ( self. search ( dns _ dict ) )
[ -0.5544825196266174, 0.6188910603523254, 0.26917901635169983, -1.1368751525878906, 0.14737780392169952, 0.16288480162620544, -0.4819991886615753, 0.13586631417274475, 1.1386457681655884, 0.2588300406932831, -0.8015989661216736, 0.41068190336227417, 0.42194926738739014, -0.4834060072898865,...
def endcrossneti ( self, * args ) : return _ snap. pmmnet _ endcrossneti ( self, * args )
[ -0.23392045497894287, 0.5728809833526611, 0.36541804671287537, 0.9073020815849304, 0.31828272342681885, 0.3973604440689087, -0.022597864270210266, -0.6664501428604126, -0.6170471906661987, -0.08232820779085159, -1.1233381032943726, -1.1239928007125854, -2.035398483276367, 0.904767632484436...
def fromrows ( cls, data ) : m = len ( data ) n = len ( data [ 0 ] ) # check that list of data is valid if any ( [ len ( row )! = n for row in data [ 1 : ] ] ) : raise valueerror ( " inconsistent row lengths " ) obj = matrix ( m, n, init = false ) obj. data = data return ( obj )
[ -0.037458181381225586, -0.6173276305198669, 0.31005093455314636, 0.37582728266716003, -0.18670687079429626, -0.07504788786172867, -0.18637777864933014, 0.15031331777572632, 1.3361966609954834, -0.8816060423851013, -0.0466163195669651, -0.34819647669792175, -0.5208436846733093, 0.6173098683...
def passes ( self ) : raise notimplementederror ( " the'passes'property should be defined in all studyoutputaware subclasses. " )
[ 0.12539567053318024, -0.6484339833259583, 0.9277578592300415, 0.4856681823730469, -0.16525998711585999, 1.4278855323791504, 0.9902657270431519, -0.8398672342300415, 0.05248986557126045, -0.7438124418258667, 0.0907335951924324, -0.22224175930023193, 0.2535392642021179, 0.08017663657665253, ...
def node _ count ( game _ state _ node ) : # this node, plus kids # note the list comprehension return 1 + sum ( [ node _ count ( c ) for c in game _ state _ node. children ] )
[ -0.5557754039764404, 0.5052413940429688, 0.5198164582252502, -0.2197948545217514, 0.15856800973415375, -0.07409234344959259, 0.21292424201965332, 0.8699808120727539, 0.2734590470790863, 0.29747623205184937, -0.7272981405258179, -0.32260027527809143, 1.021646499633789, -0.044760748744010925...
def metadata ( sample ) : sample _ num = sample. split ('_') [ 1 ] sample _ metadata = session. query ( samples _ metadata ). filter ( samples _ metadata. sampleid = = sample _ num ). first ( ) return jsonify ( {'age': sample _ metadata. age,'bbtype': sample _ metadata. bbtype,'ethnicity': sample _ metadata. ethnicity,...
[ -0.7231605052947998, -0.36317455768585205, 0.6441253423690796, -0.5363587737083435, -0.4421788454055786, -0.6496230363845825, -0.7225286960601807, -0.16381025314331055, -0.3181403875350952, 1.1164839267730713, -0.6604229807853699, 0.7765368819236755, 0.4745846092700958, 0.2042474001646042,...
def getedgetablepn ( * args ) : return _ snap. ttable _ getedgetablepn ( * args )
[ -1.1354907751083374, 0.14468538761138916, 0.8183702826499939, 1.4087461233139038, 0.7480106949806213, -0.22112978994846344, 0.3029205799102783, -0.242418110370636, -0.7875309586524963, 0.4133285582065582, -0.3386974632740021, -0.936032235622406, -0.2785804867744446, -0.21976442635059357, ...
def random _ hash _ str ( length = 32 ) : return " ". join ( chr ( random. randint ( 97, 122 ) ) for _ in range ( length ) )
[ 0.505854606628418, 0.20840470492839813, 0.4493978023529053, -0.7826131582260132, -0.7250639200210571, 1.5130395889282227, -1.060058355331421, -0.5750213265419006, 0.033958882093429565, -0.60581374168396, -0.2913638949394226, 0.13883700966835022, -0.454068660736084, -1.610727310180664, -0...
def _ get _ results ( self, rec _ name, bodyid, * fields ) : res = self. _ get _ record ( rec _ name ) if bodyid : ibcond = self. _ get _ ibcond ( bodyid ) # get all records for this ibcond res _ recs = res. read _ where ('ibcond = = { } '. format ( ibcond ) ) else : res _ recs = res [ : ] # return res _ recs [ list ( ...
[ -0.8547818064689636, 0.562322199344635, 0.45892685651779175, -0.4452526867389679, 0.6124234795570374, -0.19874006509780884, -0.3797980844974518, -0.05170876905322075, -1.1403138637542725, 0.2624717056751251, -0.24030336737632751, -0.3824143707752228, -1.2863612174987793, -0.365750402212142...
def paged _ request ( service, selector = { }, number _ results = 100, start _ index = 0, retry = true, number _ pages = false ) : client = adwords _ service ( ) service = client. getservice ( service, settings. googleadwords _ client _ version ) if'paging'not in selector : selector ['paging'] = { } if start _ index is...
[ -0.1374901831150055, 0.34631985425949097, 0.7434483170509338, -0.7312420010566711, -0.09047684073448181, -0.2120617777109146, -1.0889805555343628, -0.5939361453056335, 0.49385377764701843, 0.2612992227077484, 0.8119186162948608, 0.8156539797782898, -0.46378111839294434, 0.29614320397377014...
def suburb ( self, suburb ) : self. _ suburb = suburb
[ -0.21057987213134766, -0.995284378528595, 0.13668693602085114, 1.14374577999115, -0.3791670799255371, 1.043670415878296, 0.694030225276947, 0.2834373712539673, 0.3446359932422638, -1.101683497428894, -1.444937825202942, 0.3951980471611023, -0.4650852084159851, -0.1521744728088379, 0.1383...
def kmp _ table ( pattern ) : m = len ( pattern ) next = [ - 1 ] * m j = - 1 for i in range ( 1, m ) : while j > - 1 and pattern [ i - 1 ]! = pattern [ j ] : j = next [ j ] j + = 1 if pattern [ i ]! = pattern [ j ] : next [ i ] = j else : next [ i ] = next [ j ] return next
[ -0.40538373589515686, 0.9326189160346985, 0.7836257815361023, 0.304606169462204, -0.7646303176879883, 0.11224236339330673, 1.0859355926513672, 0.00003858202398987487, 0.5993295907974243, 1.2816814184188843, -0.1442917436361313, 0.24193806946277618, -1.2741334438323975, -0.5020194053649902,...
def set _ text _ vertical _ align ( self, serial _ number : str, page : int, button : int, alignment : str ) - > none : if self. get _ text _ vertical _ align ( serial _ number, page, button )! = alignment : self. _ button _ state ( serial _ number, page, button ) [ " text _ vertical _ align " ] = alignment self. _ sav...
[ 0.15439389646053314, -1.311590313911438, 0.27888718247413635, 0.15872204303741455, -0.4166935980319977, -0.18330466747283936, -0.22516460716724396, 0.25701650977134705, 0.6251093149185181, 0.35765883326530457, -0.7400779724121094, 0.32627055048942566, -0.21890126168727875, -0.1243696287274...
def test _ types ( self ) : self. assertisinstance ( self. receiver _ config, list ) self. assertisinstance ( self. rx _ data _ in, numpy. ndarray ) self. assertisinstance ( self. bypass, bool ) pass
[ -0.35533249378204346, 0.16084788739681244, 0.2283053696155548, -0.6937179565429688, 1.3863238096237183, 0.8923689126968384, 0.3821452856063843, -0.5402101874351501, 0.7015364170074463, 0.06402342021465302, -0.5411983728408813, 0.13236188888549805, -1.096262812614441, 0.5819112062454224, ...
def test _ atomic _ language _ max _ length _ 1 _ nistxml _ sv _ iv _ atomic _ language _ max _ length _ 2 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - maxlength - 2. xsd ", instance = " nistda...
[ 0.18222041428089142, -0.1540171205997467, 0.35650908946990967, 0.7506133317947388, -0.49580273032188416, 0.4055289328098297, -0.6683444976806641, 0.15220634639263153, 0.19177238643169403, 0.5510333180427551, -0.5759901404380798, -0.026714200153946877, 0.25622376799583435, 0.061762668192386...
def dump ( self, start = 0 ) : if self. _ _ type = = " atomic " : return self. _ _ dumpatomic ( start ) elif self. _ _ type = = " combined " : return self. _ _ dumpcombined ( start ) else : self. err ( " unknown signal type : " + str ( _ _ type ) )
[ -1.1248387098312378, -0.2608867287635803, 0.646821916103363, 0.46469926834106445, 0.01652236096560955, 0.15599985420703888, 0.312426894903183, -1.0981837511062622, -0.2998808026313782, 0.31516343355178833, -0.4512919783592224, 0.6006261110305786, -0.9905988574028015, 1.1349941492080688, ...
def getoutnid ( self, * args ) : return _ snap. tneanetnodei _ getoutnid ( self, * args )
[ -0.15873582661151886, 0.7431263327598572, 0.4591831862926483, -0.6010974049568176, -0.03575313091278076, 0.0077595096081495285, 0.04991810768842697, 0.03198935091495514, -0.39687299728393555, 0.9370424747467041, 0.42699840664863586, -0.8410101532936096, 0.26527389883995056, 0.0940745845437...
def hardware _ mod _ en ( self ) : if self. module. device : self. _ settings. hardware _ mod _ en = self. module. device. sequencers [ self. sequencer _ number ]. get ( f " mod _ en _ awg " ) return self. _ settings. hardware _ mod _ en
[ -0.5251211524009705, 0.5997670292854309, 0.5012683272361755, 0.022471293807029724, 0.2847088575363159, 0.22361259162425995, 0.1421966254711151, 0.056236304342746735, 0.008655120618641376, -0.055740077048540115, -0.09044218063354492, 0.6001050472259521, -0.4090080261230469, 0.62464773654937...
def test ( ) : # get the base resource from scythe. game. resource import resource as resource # invent one ones = resource ( ( 1, 1, 1 ) ) # and another twos = resource ( ( 2, 2, 2 ) ) # addition threes = ones + twos # check assert threes = = ( 3, 3, 3 ) # scalar multiplication from the left assert 3 * ones = = threes...
[ -1.049106240272522, 0.5761687159538269, 0.6251804828643799, -0.03950494900345802, 0.39843127131462097, 0.4494882822036743, 0.37755435705184937, -0.38880640268325806, 0.6611148118972778, -0.1650734841823578, -0.794233500957489, -0.6086608171463013, -0.424487441778183, -0.49290546774864197, ...
def begei ( self, * args ) : return _ snap. pngraphmp _ begei ( self, * args )
[ 0.39566633105278015, 0.7635065317153931, 0.0973207876086235, 0.580072820186615, 2.717315435409546, -0.04422441124916077, 0.6177307367324829, -1.0901594161987305, -1.518208384513855, -0.3515723645687103, -0.5724218487739563, 0.13553950190544128, -2.024991273880005, 0.40979862213134766, -0...
def penn _ to _ wn ( tag ) : if tag. startswith ('j') : return wn. adj elif tag. startswith ('n') : return wn. noun elif tag. startswith ('r') : return wn. adv elif tag. startswith ('v') : return wn. verb return none
[ -0.652392566204071, -1.177946925163269, 0.4817841351032257, -0.3455231785774231, -0.4656798243522644, -0.889708936214447, -0.11286328732967377, -1.1207866668701172, 0.9239318370819092, -0.6313073039054871, -0.7117323279380798, 0.15052278339862823, 0.017600728198885918, -0.09741932898759842...
def cntdegnodes _ pneanet ( * args ) : return _ snap. cntdegnodes _ pneanet ( * args )
[ -1.071155309677124, 0.9095635414123535, -0.10134132951498032, -0.37235379219055176, 0.6414980292320251, 0.25650888681411743, -0.9517837762832642, -0.04348773881793022, -1.0760951042175293, 0.22473113238811493, -0.7938514947891235, -1.238616943359375, 0.5571139454841614, 0.3878096044063568,...
def get _ mooring _ restoring ( self, bodyid = 1, bodyid2 = 1 ) : return self. get _ matrix ( 32, bodyid, bodyid2 )
[ -0.19455347955226898, 0.5259073376655579, 0.4786670207977295, -0.5927844047546387, -0.2736414968967438, 0.0560360848903656, -0.4988046884536743, -1.0126758813858032, 0.6981905698776245, -0.014236917719244957, 0.12162727117538452, 1.9001201391220093, -1.2269771099090576, -0.0030463023576885...
def from _ polygon ( cls, polygon : polygon, border : union [ border, autoborder ] ) - > geometry : if isinstance ( border, autoborder ) : return cls ( polygons = [ polygon ], border = border. get _ border ( polygon. get _ vertices ( ) ) ) if isinstance ( border, border ) : return cls ( polygons = [ polygon ], border =...
[ 1.9512007236480713, -0.6731509566307068, 0.4429096281528473, 1.2342703342437744, 0.3057416081428528, 0.10671843588352203, -0.3639471232891083, -0.4835527837276459, 0.7645740509033203, -0.5434549450874329, -0.5281884074211121, 0.8278803825378418, 0.0966874212026596, -0.7338424324989319, -...
def plot _ spectrum ( self, asiccha, binning = np. arange ( 0, 3584, 8 ) ) : if type ( asiccha ) = = tuple : index = asiccha [ 0 ] * 64 + asiccha [ 1 ] else : index = asiccha try : val, _, _ = plt. hist ( self. a [ :, index ] [ self. t [ :, index ]. nonzero ( ) ]. a1, bins = binning, histtype ='step ', color ='r ', lab...
[ 0.2933153212070465, 0.04229754954576492, 0.9243425130844116, -0.9720062613487244, -0.3639741837978363, -0.3892221748828888, 0.07172228395938873, 0.087600477039814, 0.6531049609184265, -0.35021379590034485, 0.46967563033103943, 0.5608888864517212, 0.7464866638183594, 0.25910210609436035, ...
def vgg11 _ imagenet ( pretrained = false, * * kwargs ) : model = vgg _ imagenet ( make _ layers ( cfg _ imagenet ['a'] ), * * kwargs ) if pretrained : model. load _ state _ dict ( model _ zoo. load _ url ( model _ urls ['vgg11'] ) ) return model
[ -0.6889160871505737, 0.32814523577690125, 0.2583433985710144, 0.2494722604751587, -0.11829134076833725, 0.16365301609039307, 0.30728429555892944, 0.47102123498916626, -0.07830522209405899, 0.5778490304946899, -0.3441142439842224, -0.42107823491096497, -0.17206662893295288, 0.16770154237747...
def test _ form ( self ) : field = omniformhandler. form self. assertisinstance ( field, genericforeignkey )
[ -0.020934998989105225, 0.6108267903327942, 0.0854099914431572, 0.046250976622104645, 1.0757455825805664, 0.6181902885437012, 0.12098190188407898, -0.2995154559612274, 0.37982574105262756, -1.4375298023223877, -0.5225045680999756, -1.074967622756958, -0.37605220079421997, 0.6511586904525757...
def delete _ identity _ provider ( userpoolid = none, providername = none ) : pass
[ -0.8886117339134216, 0.28614044189453125, 0.10571850091218948, 0.8081191778182983, 0.04554463550448418, 0.5507563948631287, 0.6592318415641785, -0.3316973149776459, 1.3492918014526367, 0.9311709403991699, -0.7170445322990417, 1.2622706890106201, -1.578906774520874, -0.8024130463600159, 0...
def endeaflti ( self, * args ) : return _ snap. tcrossnet _ endeaflti ( self, * args )
[ 0.6902787089347839, 0.6740041971206665, 0.26650261878967285, -0.8844118118286133, 0.6700928211212158, 0.4773552417755127, 0.9891525506973267, 0.4295061230659485, -0.7134522199630737, 0.8137893676757812, -0.31608468294143677, -1.28867769241333, 0.03654447942972183, 1.0544549226760864, -0....
def add _ description ( self, paragraph ) : words = paragraph. split ( ) for word in words : self. add _ trait ( word )
[ 0.4564247727394104, 0.40205878019332886, 0.2698839604854584, -0.362803190946579, 0.7495640516281128, 0.3428646922111511, -1.1378328800201416, 1.1174370050430298, 0.315782368183136, 0.9985902309417725, 0.2631695568561554, 0.49926966428756714, -1.4341682195663452, -0.32083001732826233, -1....
def get _ redirect _ field _ name ( self ) : if self. redirect _ field _ name is none : raise improperlyconfigured ('{ 0 } is missing the'' redirect _ field _ name. define { 0 }. redirect _ field _ name or'' override { 0 }. get _ redirect _ field _ name ( ). '. format ( self. _ _ class _ _. _ _ name _ _ ) ) return self...
[ -0.22099056839942932, 0.40389272570610046, 0.7381097674369812, -0.012017181143164635, -0.01650695875287056, 1.0092355012893677, 0.880125105381012, 0.04270381107926369, 0.6929781436920166, -0.08974682539701462, -0.542628824710846, 0.17006507515907288, 0.08918488770723343, -0.131951004266738...
def _ fetch _ github _ pr ( self, pr _ number : int ) - > pullrequest : try : github _ repo = self. _ github. get _ repo ( superset _ repo ) self. _ superset _ repo = github _ repo pull _ request = self. _ github _ prs. get ( pr _ number ) if not pull _ request : pull _ request = github _ repo. get _ pull ( pr _ number...
[ 0.19258245825767517, 0.34335288405418396, 0.5150039196014404, -0.2719630002975464, 0.3823373317718506, 0.1470925360918045, -1.301018476486206, 0.3609236776828766, 0.9094716906547546, -0.6863296627998352, 0.6698235273361206, 1.014426827430725, -0.45256343483924866, -0.260484904050827, 1.0...
def genheader ( fname ) : print ( " " " / * - * - mode : gas ; coding : utf - 8 - * - * / / * * * hyper operating system v4 advance * * @ file % s * @ brief % % jp { x86 外 / みヘクタ } * * @ note this file is generated automatically, don't edit by hand. * * copyright ( c ) 1998 - 2008 by project hos * http : / / sourceforg...
[ 0.3132588863372803, -0.10643849521875381, 0.8477357625961304, 0.5855550765991211, -0.7800050377845764, 0.5318700671195984, 0.04739772900938988, 0.36977672576904297, -1.5334986448287964, -0.06151312217116356, -0.6905021667480469, 0.5302988886833191, 0.1346418708562851, 0.39695143699645996, ...
def test _ parameters _ desert ( self ) : assert self. d. fodder _ in _ cell = = 0 assert self. d. f _ max = = 0 assert self. d. animal _ can _ enter is true
[ -0.9532260298728943, 0.65745609998703, 0.2845994532108307, 0.4672469198703766, 1.2137385606765747, 1.0942293405532837, 0.07605622708797455, 0.16172029078006744, -1.3433445692062378, -0.42668333649635315, 0.044345956295728683, -0.02945229411125183, 0.7556045651435852, 1.0345569849014282, ...
def _ create _ layers ( self ) : modules _ dnn = [ ] inp _ size = self. in _ features for i _ fc in range ( self. layers ) : modules _ dnn. append ( maskedlinear ( int ( inp _ size ), self. units [ i _ fc ] ) ) modules _ dnn. append ( nn. relu ( ) ) if self. dropout : modules _ dnn. append ( nn. dropout ( p = self. dro...
[ -0.5257682204246521, 0.5103896260261536, 0.4780249297618866, 0.2886316776275635, 0.7786534428596497, -0.050427261739969254, 0.10518580675125122, -0.2479933798313141, -0.015510886907577515, -0.18074822425842285, -0.6676728129386902, -0.4838464856147766, -0.0526454783976078, -0.4806214869022...
def trnd _ getexpdevstep ( * args ) : return _ snap. trnd _ getexpdevstep ( * args )
[ -0.942177951335907, 1.3354490995407104, 0.043490417301654816, 0.3610958158969879, 1.1029424667358398, -0.1790052056312561, -0.7296280264854431, -0.004201371688395739, -1.0359177589416504, -1.018310546875, 0.13196435570716858, -1.1021612882614136, 0.36580753326416016, 0.8246447443962097, ...
def _ _ eq _ _ ( self, * args ) : return _ snap. tstrv _ _ _ eq _ _ ( self, * args )
[ -1.488542079925537, -0.05972812697291374, -0.09659605473279953, -1.0859124660491943, 0.4250568747520447, 0.01763341762125492, 1.0748562812805176, 0.3750447928905487, -0.6307594776153564, -0.03908800333738327, -1.3031657934188843, -0.9105201363563538, 0.9120721817016602, 0.4445554316043854,...
def getset ( * args ) : return _ snap. tintset _ getset ( * args )
[ -0.5950015187263489, 0.3850269615650177, 0.1627640277147293, 0.5320024490356445, 1.0280840396881104, -0.5264976024627686, 0.9182443618774414, -1.1887025833129883, -0.5748948454856873, -0.9171342849731445, -0.21541255712509155, 0.25376516580581665, -0.6069551110267639, -0.1943892389535904, ...
def save _ file ( self, str _ file, type _ file ) : # cut the file chunks _ file = [ str _ file [ x : x + 11000000 ] for x in range ( 0, len ( str _ file ), 11000000 ) ] self. data _ type = type _ file list _ chunks = list ( ) # save each part of the file for chunk _ file in chunks _ file : temp _ bucket _ output _ fil...
[ 0.036753151565790176, -0.539165198802948, 0.5705081224441528, -0.664542019367218, 0.7211374640464783, 0.1938987672328949, 0.23172760009765625, -0.09065160900354385, -1.0942268371582031, 0.779390275478363, -1.0044797658920288, -0.4653988480567932, -0.847766637802124, -0.1874644011259079, ...
def add _ entry ( self, module _ name, trace _ point, log _ type, log _ string ) : logged = false if trace _ point is none : trace _ point _ name ='' else : trace _ point _ name = trace _ point. name if len ( self. _ entries ) < self. _ capacity : entry = trace _ logger _ messages. logentry ( module _ name, datetime. d...
[ 0.5091514587402344, 0.018001893535256386, 0.6811791062355042, -0.34106379747390747, 0.4550097584724426, 0.4615520238876343, -0.3065153956413269, -0.8690018057823181, 0.31746038794517517, 0.24447859823703766, -0.2923620939254761, 0.09530655294656754, -1.0308986902236938, -0.0649654492735862...
def set _ sql ( self, sql ) : self. sql = sql
[ 1.0000669956207275, -0.10183887928724289, 0.2637374997138977, 0.6898123025894165, -0.9167470932006836, -0.04967772215604782, -1.3979697227478027, -0.5300940275192261, 0.3184379041194916, -0.24544836580753326, -0.6154381632804871, 0.8808596134185791, 0.27756842970848083, 0.9728931188583374,...
def dates _ length ( ) : total _ lenght = 0 for x in range ( 5 ) : total _ lenght + = habit _ tracker. new _ habit [ x ]. frequency return total _ lenght
[ 0.4628835618495941, 1.0088553428649902, 0.3696434795856476, -0.20889462530612946, 0.5557407736778259, 0.1759171485900879, 0.4018309414386749, 0.10088244080543518, 0.14445868134498596, -0.27842262387275696, -0.8153326511383057, -0.3647416830062866, 0.1787562519311905, 0.5424016118049622, ...
def fit ( self, x : np. ndarray ) - > none : x _ std = self. sc. fit _ transform ( x _ train ) cov _ mat = np. cov ( x _ std. t ) self. eigen _ vals, self. eigen _ vecs = np. linalg. eig ( cov _ mat ) self. _ total _ var = sum ( self. eigen _ vals ) self. varexp = [ ( i / self. _ total _ var ) for i in sorted ( self. e...
[ 0.20506852865219116, 0.3291900157928467, 0.3843555450439453, 0.4107951819896698, 0.0585356205701828, 0.5372060537338257, 0.355825275182724, 1.048089861869812, -0.06718625873327255, 0.23036082088947296, -0.7534158825874329, 0.5943196415901184, 0.45159855484962463, 0.16465498507022858, 0.2...
def test _ get _ command _ for _ testrunner _ host _ based _ 1 ( self ) : executor = self. real _ executor executor. stand _ alone = false self. testrun. is _ host _ based = true # expose more code for testing command = executor. _ get _ command _ for _ testrunner ( ) self. _ assertcommandcontains ( command, " testrunn...
[ 0.3994324803352356, 0.17544254660606384, 0.462442547082901, 1.2460674047470093, 1.1696228981018066, 0.3669449985027313, 0.7736778259277344, 0.08924597501754761, -0.762270450592041, -1.0636299848556519, -0.35321688652038574, 0.2940059304237366, -0.19061197340488434, 1.3176261186599731, -0...
def get _ data _ for _ horizontal _ bar _ chart ( chart _ name, cursor ) : request = f'select data, popularity from charts where chart _ name = " { chart _ name } " ;'cursor. execute ( request ) statistics _ data = cursor. fetchall ( ) # convert list of tuples to list of lists data _ list = [ ] for i in statistics _ da...
[ -0.29995042085647583, 0.3846168518066406, 0.47573721408843994, 0.8370595574378967, 0.24663828313350677, 0.5571134686470032, -0.7578108310699463, 0.01990184746682644, -0.2688177824020386, 0.20493023097515106, -0.7313603162765503, -0.23248285055160522, 0.7018724083900452, 0.14651110768318176...
def startbulkwrite ( ctx, # mandatory main parameter volumeid, # mandatory main parameter format, # optional main parameter script = none, # optional main parameter scriptparameters = none, # optional main parameter attributes = none ) : " " " interaction information for external data access is passed by a script runni...
[ -0.9133148193359375, -1.3032644987106323, 1.1167576313018799, 0.5553411841392517, 1.2711293697357178, -0.7874130606651306, 0.5553288459777832, -0.5291482210159302, -0.19248510897159576, 0.8137978911399841, -0.14406032860279083, 1.5091371536254883, -0.2534903287887573, 0.2765623927116394, ...
def app _ callback ( ) : console. log ( f': briefcase : config directory for { app _ name } : { app _ dir } ', style ='bold blue')
[ 0.7886706590652466, -0.6357026100158691, 0.38983291387557983, 0.13417288661003113, -0.09349174052476883, 0.21148967742919922, 0.703484058380127, 0.5563082695007324, -0.12983015179634094, 0.4586528241634369, -0.1370956152677536, 0.835127055644989, 1.1715116500854492, 0.293006956577301, 0....
def getsattrnamen ( self, * args ) : return _ snap. tdirnet _ getsattrnamen ( self, * args )
[ -0.9090935587882996, 0.23422682285308838, 0.32303309440612793, -0.543476939201355, 0.021910719573497772, -0.446974515914917, -0.23639409244060516, -0.0875135213136673, -0.473976194858551, -0.4116617441177368, -0.6539855003356934, 0.012189527973532677, 0.07587289810180664, 0.708237528800964...
def write _ to _ pkl ( file _ path, data ) : output = open ( file _ path,'wb') pickle. dump ( data, output, 2 ) output. close ( )
[ -0.04643956199288368, -0.6056007146835327, 0.06858497112989426, -0.12422487139701843, 1.0461238622665405, 0.4452676773071289, -0.3999176025390625, 0.7910454273223877, -0.7499139308929443, 0.2366003543138504, -0.8479071259498596, -0.9619311690330505, 0.3921947777271271, -0.6457108855247498,...
def getburnednid ( self, * args ) : return _ snap. tforestfire _ getburnednid ( self, * args )
[ 0.09148678183555603, 0.32573187351226807, 0.19492067396640778, 0.9168807864189148, 0.5365704894065857, 0.2143947184085846, 0.07243560254573822, 0.23500117659568787, -0.8584370017051697, -1.1959346532821655, 0.048429038375616074, 0.492453396320343, -1.2198585271835327, 1.3639765977859497, ...
def get _ signer _ error _ url ( self, event, status ) : raise notimplementederror ( )
[ -0.8915034532546997, -0.7493687272071838, 0.41967567801475525, 0.7239459753036499, -0.18609094619750977, 0.6278557181358337, 0.038177233189344406, 1.4093025922775269, -0.24662663042545319, -0.2753683626651764, -0.4609498977661133, -0.3584108352661133, 0.33198389410972595, 0.646344602108001...
def cntuniqbidiredges _ pngraph ( * args ) : return _ snap. cntuniqbidiredges _ pngraph ( * args )
[ -0.49090370535850525, 0.8704113364219666, 0.01725480705499649, -1.0039476156234741, 0.13235656917095184, 0.7174830436706543, -0.2900337874889374, -0.49434933066368103, -0.7849684357643127, 0.06298982352018356, -1.0920464992523193, 0.8559665679931641, -0.3146790862083435, -0.754434287548065...
def test _ can _ mute _ closed _ community _ post _ if _ creator ( self ) : user = make _ user ( ) foreign _ user = make _ user ( ) community = make _ community ( creator = foreign _ user ) user. join _ community _ with _ name ( community _ name = community. name ) headers = make _ authentication _ headers _ for _ user...
[ 0.4702666699886322, 0.0647633746266365, 0.45213496685028076, 1.2741245031356812, 0.2685518264770508, 0.925302267074585, -0.3099012076854706, -0.4934243857860565, -0.013104629702866077, -0.800922691822052, -0.7013867497444153, -0.6396774649620056, -0.6525405049324036, 0.4636049270629883, ...
def entry _ point ( ) : raise systemexit ( main ( sys. argv ) )
[ 0.8071396350860596, -0.4250747561454773, 0.4447796940803528, 1.0379626750946045, 0.5459373593330383, 0.6288108229637146, 0.5259371399879456, 0.5130178928375244, -0.4986785650253296, 0.522217333316803, 0.08077281713485718, 0.7252215147018433, 0.07151293009519577, 0.6828827857971191, -0.12...
def sanity _ check _ paramter _ updates ( model, last _ ckpt ) : for i, v in model. named _ modules ( ) : if hasattr ( v, " weight " ) and hasattr ( v, " popup _ scores " ) : if getattr ( v, " weight " ) is not none : w1 = getattr ( v, " weight " ). data. cpu ( ) w2 = last _ ckpt [ i + ". weight " ]. data. cpu ( ) if g...
[ -0.4464443325996399, -0.4760530889034271, 0.7965269684791565, 0.32642123103141785, -0.24712404608726501, 0.6768293976783752, 0.2393055409193039, -0.9519945979118347, 0.04350632056593895, 0.8655493855476379, 0.2945496439933777, -0.7432891130447388, -0.5322595238685608, 1.065590262413025, ...
def verify _ ids _ are _ defined ( module ) : for inst in module. instructions ( ) : if inst. result _ id is not none : verify _ id ( module, inst, inst. result _ id ) if inst. type _ id is not none : verify _ id ( module, inst, inst. type _ id ) for operand in inst. operands : if isinstance ( operand, ir. id ) : verif...
[ -0.193520650267601, -0.36593177914619446, 0.5487138032913208, 0.4095209240913391, 0.8851231336593628, 0.36035898327827454, 0.5559917688369751, -0.7570244669914246, 0.36330175399780273, -0.036288145929574966, -1.062048077583313, 0.43326982855796814, -0.9653326869010925, 1.8540552854537964, ...
def dendrix _ fitness ( patient _ matrix, individual ) : coverage, overlap = get _ coverage _ exclusivity ( patient _ matrix, individual ) # comma at the end of this return is * required * by deap return coverage - 3 * overlap,
[ 0.554757297039032, 0.319826602935791, 0.3671587407588959, 0.9346116185188293, -0.07780667394399643, 0.31130388379096985, 0.7017423510551453, 0.7459665536880493, 0.7527214884757996, -0.7239442467689514, 0.33750274777412415, -0.002714282600209117, -0.07862740010023117, -0.6871676445007324, ...
def writepid ( self ) : with open ( self. pidfile,'w') as pf : pf. write ( str ( self. pid ) +'\ n')
[ 0.4468097984790802, -1.7891050577163696, 0.39605993032455444, -0.47717440128326416, 1.215549349784851, 1.6692513227462769, -0.053248826414346695, 0.8744001984596252, -0.08702349662780762, -0.4082881212234497, 0.2138548046350479, -0.012854822911322117, -1.0853766202926636, -0.26817014813423...
def open ( self ) : if self. _ port is none : raise serialexception ('port must be configured before it can be'\'used.') # the " \ \. \ comx " format is required for devices other than com1 - com8 # not all versions of windows seem to support this properly # so that the first few ports are used with the dos device name...
[ 0.2826680839061737, -0.09292497485876083, 0.8427552580833435, -0.1302223652601242, 0.23412086069583893, 0.24190542101860046, 1.407671570777893, 0.35836103558540344, -0.1134316697716713, -1.2898911237716675, 0.20002447068691254, 0.10563504695892334, -0.4391092360019684, -0.1249171569943428,...
def smart _ unicode ( _ str ) - > str : if isinstance ( _ str, str ) : return _ str else : try : return str ( _ str, " utf - 8 " ) except unicodedecodeerror : return str ( _ str, " cp949 " )
[ -0.0320991687476635, -0.5815029144287109, 0.31803104281425476, 0.5533580780029297, -0.543129026889801, -0.07467048615217209, 0.036929983645677567, 0.5368830561637878, 1.0837140083312988, -0.8784821629524231, 0.8479287624359131, 0.1096682921051979, 0.13749289512634277, -1.0236053466796875, ...
def deploy _ tokens _ and _ fund _ accounts ( token _ amount : int, number _ of _ tokens : int, deploy _ service : blockchainservice, participants : typing. list [ typing. address ], ) - > typing. list [ typing. tokenaddress ] : result = list ( ) for _ in range ( number _ of _ tokens ) : token _ address = deploy _ cont...
[ -0.038207486271858215, -0.11365008354187012, 0.5509855151176453, 0.33969351649284363, 0.4793983995914459, -0.47821345925331116, -0.02849089726805687, 0.008250978775322437, 0.3835269808769226, 0.7178453803062439, 0.3125177323818207, 0.37649059295654297, -0.3683503568172455, -0.1879556328058...
def login ( ws, name, passw ) : timer = 0 while timer < 10 : print ( " trying to login to server... " ) loginparser = ws. login ( name, passw ) resultcode = loginparser. getresultcode ( ) if resultcode > 0 : time. sleep ( 1 ) else : break timer = timer + 1 if resultcode > 0 : print ( loginparser. geterrortext ( ) ) sys...
[ -0.8553943634033203, -0.21948006749153137, 0.6704565286636353, 0.1215561255812645, -0.04066701605916023, 0.3018167316913605, -0.5051078796386719, -0.4388425946235657, -0.34899625182151794, -0.6009098887443542, -0.8897109031677246, 0.44961705803871155, -0.26074814796447754, -0.0035007707774...
def getval ( self, * args ) : return _ snap. tintintvv _ getval ( self, * args )
[ -0.5529633164405823, 0.4745963513851166, 0.6620590090751648, 0.9394883513450623, 0.5181372761726379, 0.13181696832180023, 0.2560339868068695, -0.14388318359851837, -0.2207118570804596, -0.1445353478193283, 0.006421105470508337, 0.835267186164856, -0.9787846207618713, -0.15470439195632935, ...
def index ( sourcefile ) : # creates the index directory if it does not exist if not os. path. exists ( index _ dir ) : os. mkdir ( index _ dir ) # open the index ix = create _ in ( index _ dir, schema ) writer = ix. writer ( ) try : # read links to index with open ( sourcefile,'r') as s : for url in s. readlines ( ) :...
[ -0.599297046661377, 0.44106701016426086, 0.3300330638885498, -0.21001288294792175, 0.6983407139778137, 0.3134823143482208, 1.3247133493423462, 1.5195008516311646, -0.4658055901527405, -0.05762093886733055, -0.0717616155743599, 0.2413121610879898, -0.5317118763923645, -0.3365302085876465, ...
def readgro ( self, fname ) : with open ( fname,'r') as myf : mylns = myf. read ( ). splitlines ( ) boxl1 = float ( mylns [ len ( mylns ) - 1 ]. split ( ) [ 0 ] ) boxl2 = float ( mylns [ len ( mylns ) - 1 ]. split ( ) [ 1 ] ) boxl3 = float ( mylns [ len ( mylns ) - 1 ]. split ( ) [ 2 ] ) return ( np. array ( [ [ float ...
[ 0.1849306970834732, -0.2866542935371399, 0.7106934189796448, -0.9762097597122192, 0.23830340802669525, 0.4182792901992798, 0.21368981897830963, -0.2219666987657547, -1.8013107776641846, 0.2644031345844269, -0.7456874251365662, 0.36359161138534546, -0.28467079997062683, 0.647034764289856, ...
def addstrattrdate ( self, * args ) : return _ snap. tneanetmp _ addstrattrdate ( self, * args )
[ 0.8794155120849609, -0.25309082865715027, 0.13986742496490479, -1.2365695238113403, 0.9630323052406311, 0.21550853550434113, -0.4881952702999115, 0.30518394708633423, -0.008985758759081364, -0.7412794232368469, -0.8021751642227173, -0.958574652671814, -0.19146683812141418, 1.12111306190490...
def _ resolve ( files _ df ) : counter = files _ df. groupby ( ['subject ','data _ source _ name ','file ','task _ name'] ) ['task _ order']. count ( ) maps = counter [ counter = = 1 ] maps = maps. reset _ index ( ) maps. drop ('task _ order ', axis = 1, inplace = true ) orders = pd. merge ( maps, files _ df ) [ ['subj...
[ -0.43263769149780273, 0.310640811920166, 0.5856292247772217, -0.4688827395439148, 0.5270817279815674, -0.451508492231369, 0.33500897884368896, 0.45427921414375305, -0.5922539234161377, -0.6025236248970032, 0.31288647651672363, -0.3451535701751709, 0.5354428887367249, -0.4871395230293274, ...
def prime _ to _ term ( prime, mgr ) : var _ count = sdd. sdd _ manager _ var _ count ( mgr ) term = sdd. sdd _ manager _ true ( mgr ) for var in xrange ( 1, var _ count + 1 ) : pvar = 3 * ( var - 1 ) + 1 if prime [ pvar ] = = 0 : continue val = prime [ pvar + 1 ] lit = var if val = = 1 else - var lit = sdd. sdd _ mana...
[ -0.39065784215927124, 0.31757164001464844, 0.5623942613601685, -0.47549566626548767, -1.2965643405914307, -0.10347986221313477, -1.1662474870681763, 0.493390828371048, 0.8932203650474548, 0.33796584606170654, -0.07681454718112946, 0.23433902859687805, -0.5493029952049255, 0.012231542728841...
def begeaflti ( self, * args ) : return _ snap. pneanet _ begeaflti ( self, * args )
[ 0.4389854669570923, 0.35442161560058594, 0.3005453646183014, 0.22103706002235413, 1.0590252876281738, 0.6015284657478333, 0.09519308805465698, -0.6054052114486694, -1.0220696926116943, 0.12984038889408112, -0.5893769264221191, -0.39544999599456787, -0.49616795778274536, 0.8575966358184814,...
def model _ mnist ( type ) : models = [ modela, modelb, modelc, modeld, modele, modelf, modelg, model _ lr ] return models [ type ] ( )
[ -0.8583567142486572, -0.9850387573242188, 0.3033420443534851, 0.029766622930765152, 0.5051119327545166, 0.3736073076725006, 0.28666022419929504, -0.8406312465667725, 0.7327728271484375, 0.059005144983530045, -0.6688456535339355, 0.3127686083316803, -0.19077646732330322, 0.5017884373664856,...
def _ read _ annotations ( self, directory _ path, ann _ file _ prefix ) : file _ names = [ f for f in listdir ( directory _ path ) ] num _ objects = 0 for name in file _ names : if name. startswith ( ann _ file _ prefix ) : num _ objects + = 1 annotations = [ annotation ( ) for x in range ( num _ objects ) ] for name ...
[ -0.5061916708946228, -0.674313485622406, 0.8659123182296753, 0.5053391456604004, -0.24185074865818024, -0.35707908868789673, 0.9021591544151306, 0.0013219083193689585, -0.12669292092323303, 1.0585570335388184, -0.04677784815430641, 0.7716858983039856, 0.8445414900779724, 0.0910207033157348...
def fix _ output _ dims ( self, y, x ) : return y
[ -0.33957982063293457, -0.6785425543785095, 0.32818329334259033, 0.40699318051338196, -0.8613686561584473, -0.08707663416862488, 0.4805412292480469, -0.7671980261802673, -0.35817503929138184, -0.3050358295440674, 0.44021517038345337, 0.6380607485771179, 0.3007792830467224, -0.11380544304847...
def tographsequence ( self, * args ) : return _ snap. ptable _ tographsequence ( self, * args )
[ -1.7513580322265625, 0.8564090728759766, 0.4263772964477539, 1.588070273399353, 0.4837770164012909, -0.5138425827026367, 0.8821530342102051, -0.8596218228340149, -1.0196363925933838, 1.4094774723052979, -0.9595264792442322, -0.5022120475769043, -1.0892634391784668, -0.46018391847610474, ...
def feature _ vecs _ nlp ( train _ pos, train _ neg, test _ pos, test _ neg ) : # english stopwords from nltk stopwords = set ( nltk. corpus. stopwords. words ('english') ) # determine a list of words that will be used as features. # this list should have the following properties : # ( 1 ) contains no stop words # ( 2 ...
[ -0.3128099739551544, -0.22877253592014313, 0.7577117085456848, -0.5950765013694763, -0.7222792506217957, -0.02683223970234394, 0.3436555564403534, 0.676551878452301, -0.7886446714401245, -0.022748952731490135, -0.7359273433685303, -0.5181112885475159, 0.08667130023241043, 0.579289197921752...
def get _ click ( ) : global base _ grant _ url global user _ continue _ url global success _ url host = request. host _ url base _ grant _ url = request. args. get ('base _ grant _ url') user _ continue _ url = request. args. get ('user _ continue _ url') node _ mac = request. args. get ('node _ mac') client _ ip = re...
[ 0.6314080357551575, 0.6036822199821472, 0.44227445125579834, 0.009324883110821247, -0.05696731433272362, 0.08196297287940979, -0.024709876626729965, 0.6055564284324646, -1.1444250345230103, 0.3162442147731781, 1.1319831609725952, 0.29676854610443115, -0.41731470823287964, -0.59276705980300...
def write _ ncfiles ( path, suffix = '. nc') : import pandas as pd dates = pd. date _ range ( datetime. date. today ( ), periods = 10, freq ='1d') for d in dates : fname ='test _ { } z { } '. format ( d. strftime ( " % y % m % d " ), suffix ) write _ file ( path ( path ) / fname, ('t _ 2m ','pres _ sfc'), 24, firststep...
[ -0.22054438292980194, 0.021261943504214287, 0.6993923187255859, 0.1697721779346466, 0.8752129673957825, 0.18990443646907806, 0.9727900624275208, 0.04611927643418312, -0.8070312142372131, -0.717782199382782, -0.29847151041030884, -0.1817164570093155, 0.8506155610084534, 0.7942025661468506, ...
def cntindegnodes _ pngraph ( * args ) : return _ snap. cntindegnodes _ pngraph ( * args )
[ -0.3705538511276245, 1.4356061220169067, -0.03841019049286842, -0.6368581056594849, 0.21134275197982788, 0.14706867933273315, -0.00098635524045676, -0.4446105360984802, -0.4081876873970032, 0.3590307831764221, -1.0096615552902222, -0.1947094351053238, -0.1728566586971283, 0.000710354128386...
def _ _ create _ file _ obj _ _ ( self ) : file _ mode ='rb'if self. file _ mode = ='read'else'wb'self. file _ obj = open ( self. path, file _ mode ) return self. file _ obj
[ 0.220084547996521, -1.309561014175415, 0.515886127948761, -0.1412149965763092, 0.08009833842515945, 1.1017467975616455, 0.7476125955581665, 0.1525074541568756, -1.157417893409729, -1.254887580871582, 0.6847107410430908, -0.507982075214386, -0.16637413203716278, -0.2143959254026413, 0.118...
def reverse ( self, * args ) : return _ snap. tintprv _ reverse ( self, * args )
[ -1.682102918624878, 0.2365807294845581, 0.42150208353996277, 0.1065540462732315, 0.6335894465446472, 0.4457155764102936, 0.14876440167427063, 0.850024938583374, -1.3362890481948853, -0.7544597387313843, -0.4890010952949524, 0.10958611220121384, -2.099778175354004, -0.40750476717948914, 0...
def test _ donate _ renders ( self ) : c = client ( ) response = c. get ( reverse ('donate') ) self. assertequal ( response. status _ code, 200 ) self. asserthasgoogleanalytics ( response )
[ 0.48249518871307373, 0.7948358654975891, 0.5422667264938354, -0.03506479784846306, 1.5129450559616089, 1.098789095878601, 0.34442138671875, 0.026010317727923393, 0.06323913484811783, -0.6520983576774597, 0.4367067515850067, -0.3088185787200928, 0.1117854043841362, 0.3441745340824127, -0....
def _ _ init _ _ ( self, searchpaths = [ ". / ", ". / plugins ", ". / addons " ] ) : self. searchpaths = searchpaths self. plugins = { } # collections. ordereddict ( ) self. finders = [ ] self. addfinder ( finder ( ) ) # just adds the default plugin finder for convenience
[ -0.2849965989589691, -0.21083976328372955, 0.28239497542381287, 1.4658899307250977, 0.7438510656356812, -0.05886967480182648, 0.013846597634255886, -0.16269530355930328, 0.7641491293907166, -0.3462560772895813, -0.9395114183425903, -0.3804584741592407, -0.6514382362365723, 0.39911872148513...
def simulate _ sparse _ realization ( self ) : baseline = np. array ( [ 0. 3, 0. 001 ] ) adjacency = np. array ( [ [ [ 0. 5, 0. 3 ], [ 0. 8, 0. 2 ] ], [ [ 0., 0. ], [ 1. 3, 0. 9 ] ] ] ) sim = simuhawkessumexpkernels ( adjacency = adjacency, decays = self. decays, baseline = baseline, verbose = false, seed = 13487, end ...
[ 0.36108383536338806, 1.3002516031265259, 0.6538578271865845, -0.23372846841812134, 0.5952042937278748, -0.11117437481880188, 0.06990882754325867, 0.6176813244819641, 0.6103435754776001, 0.17738299071788788, -0.5210928916931152, -0.06400349736213684, -0.21070317924022675, 0.1758594959974289...