text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def check _ edges ( self ) : screen _ rect = self. screen. get _ rect ( ) if self. rect. right > = screen _ rect. right : return true elif self. rect. left < = 0 : return true | [
-0.9254715442657471,
-0.36347100138664246,
1.0452057123184204,
0.32955530285835266,
0.32038283348083496,
1.0529639720916748,
-0.6790740489959717,
-0.71816086769104,
0.1347193568944931,
0.2182663530111313,
0.3468824625015259,
-0.2237703502178192,
-0.79408860206604,
0.9989307522773743,
-0.... |
def all _ common _ tracks ( tracks _ manager : pymap. tracksmanager, include _ features : bool = true, min _ common : int = 50, ) - > t. dict [ t. tuple [ str, str ], t. union [ tpairtracks, t. list [ str ] ] ] : common _ tracks = { } for ( im1, im2 ), size in tracks _ manager. get _ all _ pairs _ connectivity ( ). ite... | [
-0.1955346018075943,
0.5488739013671875,
0.8787184357643127,
0.08131230622529984,
-0.9072452783584595,
0.562460720539093,
0.7610005736351013,
0.23882056772708893,
-1.157238245010376,
0.3846655488014221,
0.28740036487579346,
-0.7048116326332092,
-0.13014723360538483,
0.6552871465682983,
-... |
def result _ handler ( result, outdir ) : with open ( os. path. join ( outdir,'rewarddata'),'w') as fout : fout. write ( ', '. join ( [ str ( r ) for r in result ] ) ) plt. xlabel ( " episode " ) plt. ylabel ( " reward " ) plt. plot ( result ) plt. savefig ( os. path. join ( outdir, " rewardplot. png " ) ) print ( resu... | [
0.2752748429775238,
-0.15662862360477448,
0.4774893522262573,
-0.5885878205299377,
-0.0685991495847702,
1.010579228401184,
0.5341468453407288,
0.3365119695663452,
0.16646771132946014,
0.06375223398208618,
-0.6229457855224609,
0.212510883808136,
0.355204313993454,
-0.36182692646980286,
-0... |
def begin _ create _ or _ update _ environment ( self, project _ name : str, environment _ name : str, body : io, user _ id : str = " me ", *, content _ type : str = " application / json ", * * kwargs : any ) - > lropoller [ json ] : | [
-0.6199342012405396,
-0.19554463028907776,
0.5045790076255798,
0.2660379707813263,
-0.005803826730698347,
0.6554571390151978,
-0.22776135802268982,
-0.9107639193534851,
0.04712122678756714,
0.8282061219215393,
-0.28405818343162537,
0.4555397629737854,
-0.4446233808994293,
0.480558574199676... |
def read _ wood _ file ( filename ) : x, y = np. loadtxt ( filename, usecols = ( 5, 6 ) ). t temp = 10 * * y * units. k radius = 10 * * x * units. r _ sun / const. r _ sun. to ( units. cm ). value # must reverse so temp increases... return temp [ : : - 1 ], radius [ : : - 1 ] | [
0.000044799318857258186,
-0.19101019203662872,
0.5980385541915894,
-0.5599386096000671,
-0.4388613700866699,
0.44233015179634094,
0.138158917427063,
0.11070219427347183,
-1.4346246719360352,
1.1529147624969482,
-0.16337893903255463,
0.3882095217704773,
-0.4490993618965149,
0.27357861399650... |
def point _ in _ polygon ( point, poly, plotting = false ) : # ray = ray ( point, point + point ( 0, 1 ) ) ray = ray ( point, point + point. random ( 1 ) - point ( 0. 5, 0. 5 ) ) while ray. a = = ray. b : ray = ray ( point, point + point. random ( 1 ) - point ( 0. 5, 0. 5 ) ) if plotting : plot ( ray, color ='k') count... | [
0.1417681723833084,
-0.11221291869878769,
0.8130683898925781,
0.2528005838394165,
-0.15420517325401306,
0.5157552361488342,
0.10505905002355576,
0.060906052589416504,
0.8791715502738953,
-0.13699501752853394,
-0.6483184695243835,
-0.6177931427955627,
-1.075325608253479,
-0.5924238562583923... |
def handlemouserelease ( self ) : self. roll ( ) | [
0.2154664695262909,
-0.31116485595703125,
0.38441580533981323,
-0.24523264169692993,
0.11486416310071945,
-0.2828599214553833,
0.004396549891680479,
0.6732733845710754,
-0.07527942955493927,
-0.4878891706466675,
0.009328980930149555,
-0.28164899349212646,
-0.2265353500843048,
0.21401475369... |
def get _ cached _ benchmark _ run ( self ) : with self. lock _ on ('_ cached _ br _ list') : if self. _ cached _ br _ list : return self. _ cached _ br _ list. pop ( ) return none | [
0.378072053194046,
0.2227996289730072,
0.7484679818153381,
1.0046957731246948,
0.10992356389760971,
0.033469147980213165,
0.020805638283491135,
-0.9249682426452637,
0.08276861906051636,
-0.03453864902257919,
-0.8578870296478271,
0.8633424639701843,
-1.3453301191329956,
0.186253622174263,
... |
def _ _ lt _ _ ( self, * args ) : return _ snap. tinth _ _ _ lt _ _ ( self, * args ) | [
-0.05561549961566925,
-0.7806599736213684,
0.3276354670524597,
-0.8622300624847412,
0.1965731829404831,
-0.09956815093755722,
-0.5101436972618103,
-1.749322533607483,
-0.6560019254684448,
-0.7123238444328308,
-0.9123333096504211,
0.06872034072875977,
-1.0788795948028564,
0.4349822700023651... |
def copyuniquefrom ( self, * args ) : return _ snap. tintv _ copyuniquefrom ( self, * args ) | [
-0.8689978718757629,
-0.48075923323631287,
0.5147709846496582,
0.8079164028167725,
-0.17103007435798645,
0.5421265363693237,
0.6245195865631104,
0.22725561261177063,
-0.18833307921886444,
-0.17205622792243958,
-0.9458540081977844,
0.16133810579776764,
-0.20409812033176422,
0.01321920845657... |
def split _ match ( self, match ) : match, line, col, error, warning, message, near = super ( ). split _ match ( match ) if message = ='no php code found at all': match = none else : message = message. replace ('` ','\'' ) # if the message contains a complaint about a function # and near looks like a function reference... | [
-0.230644091963768,
0.5468897223472595,
0.7407693266868591,
0.05775200575590134,
0.5136727690696716,
-0.8203990459442139,
0.08049805462360382,
-0.9069288969039917,
-0.6678741574287415,
-0.15862475335597992,
0.2400565892457962,
0.28888192772865295,
-1.077453851699829,
0.383114755153656,
1... |
def ploteigvaldistr ( * args ) : return _ snap. ploteigvaldistr ( * args ) | [
-1.0314197540283203,
0.6132211089134216,
0.3353388011455536,
0.028500935062766075,
0.13599303364753723,
1.1484163999557495,
0.771443784236908,
0.05482993647456169,
-0.08007119596004486,
-0.5787888765335083,
-0.2252272516489029,
0.3544759452342987,
-0.22406251728534698,
0.4177544414997101,
... |
def wylosuj _ zestaw ( ilosc ) : plansza = np. zeros ( ( 100, 100 ) ) tupele = sample ( tuple ( product ( range ( 0, 100 ), repeat = 2 ) ), ilosc ) for tupel in tupele : plansza [ int ( tupel [ 0 ] ) ] [ int ( tupel [ 1 ] ) ] = 1 return plansza, tupele | [
-1.5653718709945679,
-0.12106551975011826,
0.21837641298770905,
-0.47821107506752014,
-0.9471611976623535,
0.13327346742153168,
0.768345832824707,
-0.4211690425872803,
0.5248504281044006,
0.4102250635623932,
-0.9929871559143066,
0.3515840470790863,
1.2271543741226196,
-0.5426437258720398,
... |
def isok ( self, throwexcept = true ) : return _ snap. pneanet _ isok ( self, throwexcept ) | [
-0.5090574026107788,
1.4340219497680664,
0.21955333650112152,
0.32819458842277527,
-0.04909031465649605,
1.3091177940368652,
0.07400351762771606,
-0.4724620580673218,
-0.061690136790275574,
0.4695083796977997,
-0.5450523495674133,
-1.2515759468078613,
-0.23164887726306915,
0.01992659270763... |
def extract _ nsynth _ instrument ( filename ) : import re n = re. search ('(. *? _. *? ) _ ', filename ). group ( 1 ) return n | [
-0.8975681066513062,
-0.2917579710483551,
0.7057920098304749,
0.3514833152294159,
-0.7150421142578125,
-0.6223549246788025,
1.2571251392364502,
-0.016874726861715317,
-0.8307779431343079,
0.42813777923583984,
-0.9736921191215515,
0.1864181011915207,
-0.4862634539604187,
-0.2895335853099823... |
def process _ modules _ csv ( drcty ) : dp = os. path. join ( os. getcwd ( ), drcty ) fp = os. path. join ( dp,'cec modules. csv') df = pd. read _ csv ( fp, index _ col = 0, skiprows = [ 1, 2 ] ) names = list ( df. index. values ) mfgs = list ( ) models = list ( ) for nm in names : ptr = locate _ mfg _ split ( nm ) if ... | [
-1.0387377738952637,
-0.6349521279335022,
0.32730844616889954,
-0.40731775760650635,
0.11881276220083237,
-0.3873782455921173,
0.2602446675300598,
-0.03272167220711708,
0.31635189056396484,
-0.000878899940289557,
0.393645316362381,
0.08195095509290695,
-0.059324152767658234,
0.167642697691... |
def addmerged ( self, * args ) : return _ snap. tintintvv _ addmerged ( self, * args ) | [
-1.2599961757659912,
0.21694839000701904,
0.5244578719139099,
0.801449716091156,
0.9824849963188171,
0.38580623269081116,
0.11014849692583084,
0.16745981574058533,
0.36394432187080383,
-1.3599092960357666,
-1.2287633419036865,
0.6403423547744751,
-1.8865735530853271,
1.1717157363891602,
... |
def qr _ test _ step ( x _ batch, y _ batch, writer = none ) : feed _ dict = { cnn. input _ x : x _ batch, cnn. input _ y : y _ batch, cnn. dropout _ keep _ prob : 1. 0, } step, summaries, loss, accuracy = sess. run ( [ global _ step, qr _ summary _ op, cnn. loss, cnn. accuracy ], feed _ dict ) time _ str = datetime. d... | [
0.23175807297229767,
-0.3941308856010437,
0.5926196575164795,
0.02807104028761387,
-0.25730544328689575,
0.07784999907016754,
0.5351811647415161,
-0.5235791206359863,
-0.41913002729415894,
-0.06945327669382095,
-0.2683647572994232,
0.5070466995239258,
-0.0983518660068512,
0.318847686052322... |
def make _ even _ points _ on _ circle ( center : sequence, radius : float, n _ points : int, start _ radians : float = 0, clockwise : bool = true ) - > np. array : if clockwise : endpoint _ sign = - 1 else : endpoint _ sign = 1 radians = [ idx for idx in np. linspace ( start _ radians, endpoint _ sign * 2 * pi + start... | [
-0.7720439434051514,
-0.2689136862754822,
0.4761427640914917,
-0.3720611035823822,
0.37480539083480835,
-0.4158432185649872,
-0.15305623412132263,
0.5281305909156799,
0.2337500900030136,
1.2141633033752441,
-0.6751452088356018,
0.5440623164176941,
-0.5104464888572693,
0.41100966930389404,
... |
def setup ( self, timeout ) : self. _ setup _ publishers ( ) self. blackboard _ exchange = blackboard. exchange ( ) if not self. blackboard _ exchange. setup ( timeout ) : return false self. post _ tick _ handlers. append ( self. _ publish _ tree _ snapshots ) self. post _ tick _ handlers. append ( self. blackboard _ e... | [
0.45605552196502686,
1.1516486406326294,
0.4366453289985657,
0.538602352142334,
-0.04580257460474968,
-0.2864600121974945,
0.19795472919940948,
0.6241070628166199,
0.7937334775924683,
0.6487376689910889,
-0.25261762738227844,
-0.1571527123451233,
-0.9561247229576111,
0.803848385810852,
-... |
def test _ atomic _ language _ enumeration _ 4 _ nistxml _ sv _ iv _ atomic _ language _ enumeration _ 5 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - enumeration - 5. xsd ", instance = " nistda... | [
-0.3181317448616028,
-0.8401725888252258,
0.322524756193161,
0.32854485511779785,
-0.4538266658782959,
-0.22549228370189667,
0.4963620901107788,
-0.5266968011856079,
-0.13666139543056488,
1.0136526823043823,
-0.6543172597885132,
-0.2772516906261444,
-0.3447413444519043,
0.24960185587406158... |
def save _ to _ db ( file, name ) : db = connect _ minerva _ db ( ) db. save _ file ( file. filename, file ) db. test. insert ( {'album _ name': name,'album _ cover _ image': file } ) | [
-0.14577153325080872,
-0.1364435851573944,
0.4049382507801056,
0.22045762836933136,
0.44249263405799866,
1.0051014423370361,
0.39639246463775635,
0.31471022963523865,
-0.7709472179412842,
0.7476155757904053,
-1.5661636590957642,
-1.066808819770813,
-0.6390250325202942,
0.3318530321121216,
... |
def _ _ init _ _ ( self ) : self. _ _ key = [ 0 ] | [
-0.8051212430000305,
-0.27836573123931885,
0.37126287817955017,
-0.05440088361501694,
0.8330340385437012,
-0.08313021808862686,
0.10180513560771942,
0.9994255304336548,
-0.21518130600452423,
0.01599740982055664,
-1.0391085147857666,
-0.20121581852436066,
-0.4666084349155426,
0.985938847064... |
def insert _ click _ next _ to _ switch ( self, small _ switch, side ) : click = self. small _ switch _ to _ click ( small _ switch ) interval = self. click _ to _ interval ( click, side ) return self. insert _ click _ in _ interval ( interval, ( side + 1 ) % 2 ) # todo : this duplicates code of insert _ click _ in _ i... | [
-0.6934714913368225,
1.0888007879257202,
0.7805940508842468,
-0.5367550253868103,
-1.1210812330245972,
-0.2957763671875,
0.560295581817627,
-0.4515974521636963,
0.10327297449111938,
-0.5398821234703064,
-0.3550722897052765,
-0.566609799861908,
-0.6816377639770508,
-0.25440189242362976,
0... |
def deldegknodes _ pngraph ( * args ) : return _ snap. deldegknodes _ pngraph ( * args ) | [
-0.753563642501831,
1.2505611181259155,
0.18396306037902832,
0.1899254024028778,
-0.5608031153678894,
0.6622784733772278,
0.39205485582351685,
-0.368510365486145,
-0.11195269227027893,
0.06372936815023422,
-0.4042161703109741,
0.2538692057132721,
-0.07181116938591003,
0.40672627091407776,
... |
def activation _ functions ( self, activation _ functions ) : allowed _ values = [ " softmax ", " elu ", " selu ", " softplus ", " softsign ", " relu ", " tanh ", " sigmoid ", " hardsigmoid ", " linear " ] # noqa : e501 if not set ( activation _ functions ). issubset ( set ( allowed _ values ) ) : raise valueerror ( " ... | [
-0.7788795828819275,
0.226520836353302,
-0.254972904920578,
0.9825221300125122,
-0.15170182287693024,
0.6957855224609375,
0.60713130235672,
0.48863711953163147,
-0.7364922165870667,
-0.05742873251438141,
-0.8388166427612305,
0.42345714569091797,
-0.29527968168258667,
-0.7284743189811707,
... |
def _ _ init _ _ ( self, * args ) : _ snap. trnd _ swiginit ( self, _ snap. new _ trnd ( * args ) ) | [
-0.5014761686325073,
0.6050065159797668,
-0.03182416781783104,
-0.27627113461494446,
0.8522152900695801,
-0.548699140548706,
0.4373694658279419,
0.36863306164741516,
-0.8856589794158936,
-0.8285305500030518,
-0.9792848825454712,
-0.06772124767303467,
-0.41635605692863464,
0.469883233308792... |
def getmxwccsz _ pngraph ( * args ) : return _ snap. getmxwccsz _ pngraph ( * args ) | [
0.35916271805763245,
1.0713096857070923,
0.23920460045337677,
1.1058168411254883,
-1.4625985622406006,
0.163429856300354,
-0.3925565779209137,
-0.7371072173118591,
0.30035218596458435,
-0.3818342685699463,
-0.5216034054756165,
-0.1111605316400528,
-0.6147811412811279,
0.5173329710960388,
... |
def simulate _ psdf _ cython _ 3 ( ) : # input # n = sim _ input ['n'] dt = sim _ input ['dt'] mean = sim _ input ['mean'] norm = sim _ input ['norm'] gnoise = sim _ input ['gnoise'] seglen = sim _ input ['seglen'] psdpar = [ ['powerlaw ', [ 0. 08, - 2 ] ], ['lorentz ', [ 50, 8e - 2, 1e - 2 ] ] ] sim = az. simlc ( seed... | [
0.4217332899570465,
0.5946158170700073,
0.871588408946991,
-0.3256126344203949,
0.7209547758102417,
0.2421467900276184,
0.17877472937107086,
-0.6984755396842957,
-0.6469838619232178,
-0.42825326323509216,
-0.3317906856536865,
-0.23497635126113892,
-0.09025618433952332,
0.10040866583585739,... |
def _ _ call _ _ ( self, dice, limit ) : self. require _ dice ( dice, " cannot reroll dice from { obj } " ) return rolleddice ( dice, [ ( dice. rand ( ) if d < = limit else d ) for d in dice ] ) | [
-1.1445969343185425,
0.003723005298525095,
0.566823422908783,
0.3421938419342041,
-0.7155444025993347,
0.020553212612867355,
-0.5855682492256165,
0.26835525035858154,
1.1273516416549683,
0.36962389945983887,
0.12110234797000885,
1.2069294452667236,
-0.09100386500358582,
-0.9592349529266357... |
def temporary _ file ( path = none ) : tmp = tempfile. namedtemporaryfile ( delete = false, dir = path ) # close the temp file so that it can be opened elsewhere tmp. close ( ) try : yield tmp. name finally : if os. path. exists ( tmp. name ) : os. remove ( tmp. name ) | [
0.7721013426780701,
-0.31531593203544617,
0.835089385509491,
-0.6984912157058716,
-0.7163754105567932,
-0.44541820883750916,
0.02085672877728939,
-0.18065369129180908,
-0.07574862986803055,
0.00695232767611742,
-0.564887285232544,
-1.2311145067214966,
0.007490647025406361,
-0.1969252526760... |
def setup _ common _ env ( ctx ) : # working directory if " socket _ wrapper _ dir " in os. environ : tmpdir = os. environ [ " socket _ wrapper _ dir " ] if os. path. lexists ( tmpdir ) : raise valueerror ('socket _ wrapper _ dir " % s " must not exist'% tmpdir ) else : tmpdir = tempfile. mkdtemp ( suffix ='', prefix =... | [
-0.527248203754425,
0.08401258289813995,
0.7875126004219055,
-0.6283655762672424,
0.457163006067276,
0.5051051378250122,
0.7523887157440186,
-0.3450947403907776,
0.2378169149160385,
0.23873236775398254,
0.051694754511117935,
0.3644256293773651,
-0.16225667297840118,
1.3470520973205566,
-... |
def isuint ( self, * args ) : return _ snap. tstr _ isuint ( self, * args ) | [
-0.8992823362350464,
0.19595398008823395,
0.558952271938324,
-0.4643830955028534,
0.9925696849822998,
0.15042416751384735,
0.175650492310524,
0.2594476044178009,
-0.27359822392463684,
-0.46267077326774597,
-0.5359675884246826,
-0.19082175195217133,
-0.007818770594894886,
-0.256509214639663... |
def main ( ) : print ( " for new batch : please add batch _ id and path _ to _ batch _ info to paths _ to _ samples _ info. xlsx file " ) s = input ('have you updated the paths _ to _ samples _ info. xlsx file? ( y / n )') if s = = " n " : print ( " please do so before proceeding... " ) return path _ to _ all _ samples... | [
1.0748151540756226,
-0.529417872428894,
0.5475245118141174,
1.1113783121109009,
-0.14157001674175262,
0.8990467190742493,
0.6353169679641724,
0.3550586998462677,
-1.2567622661590576,
-0.8154934644699097,
0.4388701915740967,
0.3370454013347626,
0.5277737379074097,
-0.47877129912376404,
0.... |
def create _ user _ pool _ client ( userpoolid = none, clientname = none, generatesecret = none, refreshtokenvalidity = none, readattributes = none, writeattributes = none, explicitauthflows = none, supportedidentityproviders = none, callbackurls = none, logouturls = none, defaultredirecturi = none, allowedoauthflows =... | [
-0.6370038986206055,
-0.6652029156684875,
0.3243890404701233,
0.6181029677391052,
-0.449302077293396,
0.663597583770752,
1.127111792564392,
-0.8272099494934082,
1.472700595855713,
-0.40305453538894653,
-0.9893960952758789,
0.7734872698783875,
-0.5721166729927063,
-1.15309739112854,
0.204... |
def manipulability ( self, tcp _ jntid ) : j = self. jacobian ( tcp _ jntid ) return math. sqrt ( np. linalg. det ( np. dot ( j, j. transpose ( ) ) ) ) | [
-0.0566524900496006,
-0.2670012414455414,
0.2942892611026764,
-1.320708990097046,
-0.2666432857513428,
-0.3554478585720062,
0.32300230860710144,
0.025395365431904793,
0.701707124710083,
0.6255086064338684,
0.2907470762729645,
-0.5191411375999451,
-0.6211459040641785,
0.43485066294670105,
... |
def get _ internal _ links ( soup, include _ url ) : internal _ links = [ ] try : # chiet xuat full domain trang web tu include _ url url _ parse = urlparse ( include _ url ) include _ url ='{ } : / / { } '. format ( url _ parse. scheme, url _ parse. netloc ) # tim tat ca link bat dau bang'/'hoac include _ url for link... | [
-0.26010972261428833,
-0.12997455894947052,
1.0693069696426392,
0.6084191203117371,
-0.3535095453262329,
0.3475829064846039,
1.1554985046386719,
1.0958077907562256,
0.10663633048534393,
-0.06946302205324173,
-0.05475776642560959,
0.34707361459732056,
-0.8849019408226013,
0.3069855570793152... |
def getstrattrdatn ( self, * args ) : return _ snap. tneanetmp _ getstrattrdatn ( self, * args ) | [
0.014175157062709332,
-0.5401442050933838,
0.13608238101005554,
-0.5444088578224182,
0.9787557721138,
-0.755889356136322,
0.5059778094291687,
0.5156766772270203,
-0.3992147147655487,
-0.9828287363052368,
-1.3931334018707275,
-0.3870089054107666,
0.16666899621486664,
0.4929220974445343,
0... |
def pc _ ratio ( pts ) : pca = pca ( n _ components = 2 ) pca. fit ( pts ) pc = pca. components _ [ 0 ] return max ( abs ( pc [ 0 ] ), abs ( pc [ 1 ] ) ) / min ( abs ( pc [ 0 ] ), abs ( pc [ 1 ] ) ) | [
-0.15933853387832642,
-0.7816219925880432,
0.5248597264289856,
0.23111329972743988,
-0.46844401955604553,
0.4854259788990021,
-0.30815038084983826,
0.2234809398651123,
-0.03876172751188278,
0.5163329243659973,
0.5544206500053406,
-1.0045747756958008,
-0.3658416271209717,
-0.111139588057994... |
def abs ( * args ) : return _ snap. tflt _ abs ( * args ) | [
-0.6807267665863037,
-0.008082938380539417,
0.335625022649765,
-0.14561593532562256,
-0.17640358209609985,
1.0004349946975708,
0.15560327470302582,
0.14344967901706696,
-1.6182568073272705,
0.21003073453903198,
-0.0946597158908844,
-0.7063297629356384,
0.3000146150588989,
0.921693623065948... |
def action _ extract _ features ( args : str ) - > none : features = ['+ core'] # " core " features should be always installed if args : arg _ enable _ prefix ='- - enable -'arg _ disable _ prefix ='- - disable -'# features to be enabled has prefix'+ ', disabled has prefix'-'for arg in args. split ( ) : if arg. startsw... | [
0.1694137156009674,
-0.5127887725830078,
0.925422728061676,
0.5868586897850037,
0.826062023639679,
-0.3558378517627716,
0.06179346889257431,
1.2392421960830688,
0.21048009395599365,
1.1451491117477417,
-0.39800721406936646,
0.7531195282936096,
-0.22653941810131073,
0.747231662273407,
-0.... |
def getdata ( url, fname ) : response = requests. get ( url ) with open ( fname,'w') as f : f. write ( response. content ) | [
-0.6065004467964172,
-1.0523478984832764,
0.5837231874465942,
0.15973655879497528,
0.5506420731544495,
0.6468011140823364,
-0.6236045360565186,
0.47780290246009827,
-0.47554856538772583,
-0.38778868317604065,
-0.8601564764976501,
0.2885259687900543,
0.6198881268501282,
-1.299698829650879,
... |
def _ _ eq _ _ ( self, * args ) : return _ snap. tuinthi _ _ _ eq _ _ ( self, * args ) | [
-1.1080964803695679,
-0.05758098140358925,
0.183130145072937,
-0.34074077010154724,
0.7875272035598755,
0.6522461771965027,
0.19360141456127167,
-0.1184292659163475,
-1.1211493015289307,
0.6239398717880249,
-0.7710127234458923,
-1.57761812210083,
-0.014319686219096184,
-0.11112005263566971... |
def _ _ init _ _ ( self, name, variable, variable _ info, api ) : self. _ name = name self. var _ id = variable self. var _ name = variable _ info [ 0 ] self. var _ type = variable _ info [ 1 ] self. var _ period = variable _ info [ 2 ] self. var _ units = variable _ info [ 3 ] self. var _ icon = variable _ info [ 4 ] ... | [
0.11121903359889984,
-0.834522008895874,
0.5216677784919739,
-0.3862306773662567,
0.033999186009168625,
-0.1296553611755371,
-0.36949050426483154,
-0.46803486347198486,
-0.2345157414674759,
0.058093905448913574,
-1.0756264925003052,
-0.25747671723365784,
-0.15913113951683044,
0.59628814458... |
def iskey ( self, * args ) : return _ snap. tinth _ iskey ( self, * args ) | [
-1.067181944847107,
-0.44783148169517517,
0.25389447808265686,
0.984597384929657,
0.929705023765564,
0.3160812258720398,
0.058839231729507446,
-0.8362317681312561,
0.15538066625595093,
-0.11089414358139038,
-0.9520593285560608,
0.593450665473938,
-2.1165316104888916,
-0.2818525433540344,
... |
def nb _ cluster ( data, k, p _ init = none, r _ init = none, assignments = none, means = none, max _ iters = 10 ) : genes, cells = data. shape if p _ init is none : p _ init = np. random. random ( ( genes, k ) ) if r _ init is none : r _ init = np. random. randint ( 1, data. max ( ), ( genes, k ) ) r _ init = r _ init... | [
-0.2150968313217163,
-0.08884360641241074,
0.8403745889663696,
0.6420217156410217,
-0.585015058517456,
-0.4604730010032654,
-0.4702690541744232,
0.7999410629272461,
-0.7841448783874512,
0.944448709487915,
0.44660478830337524,
0.7776107788085938,
-0.32200250029563904,
0.48692527413368225,
... |
def buildclasscolumn ( self, classname ) : pm. setparent ( self. apimethodcol ) self. apimethodcol. clear ( ) self. unassignedmelmethodlister. removeall ( ) self. assignedmelmethodlister. removeall ( ) self. disabledmelmethodlister. removeall ( ) melmethods = self. getmelmethods ( classname ) for method in melmethods :... | [
-1.3033521175384521,
-0.5211079120635986,
0.7979452013969421,
0.13395076990127563,
-0.28609567880630493,
-0.15298061072826385,
0.9495078325271606,
0.05818074941635132,
0.254166841506958,
0.0008011101745069027,
-0.5977805256843567,
-0.2103152871131897,
-0.1131904274225235,
0.802163243293762... |
def getmappagerank ( * args ) : return _ snap. ttable _ getmappagerank ( * args ) | [
-1.202378273010254,
0.093023881316185,
0.6322144269943237,
0.7347930669784546,
-0.13109749555587769,
0.06224481761455536,
-0.3255913257598877,
-0.09590063244104385,
-0.6015580296516418,
-0.16672122478485107,
-0.12155836075544357,
-0.3221585750579834,
-0.5528119206428528,
0.4077241420745849... |
def cech _ diff _ and _ lift _ local ( self, r, start _ chains, n _ dim, deg, nerve _ spx _ index ) : # if nerve _ spx _ index = = 0, then prev = 0 prev = self. cycle _ dimensions [ n _ dim ] [ deg ] [ nerve _ spx _ index - 1 ] next = self. cycle _ dimensions [ n _ dim ] [ deg ] [ nerve _ spx _ index ] # if trivial cov... | [
-0.09858768433332443,
-0.5884724855422974,
0.632303774356842,
0.12515653669834137,
0.032430727034807205,
-0.2395426481962204,
0.9655117392539978,
0.049834243953228,
-0.5106695294380188,
0.2019277811050415,
-0.13067220151424408,
-0.49356016516685486,
-0.054122548550367355,
0.457374721765518... |
def _ wln _ weightmat ( self, jntvalues ) : wtmat = np. ones ( len ( self. jlc _ object. tgtjnts ) ) # min damping interval selection = self. jmvmin _ threshhold - jntvalues > 0 normalized _ diff _ at _ selected = ( ( jntvalues - self. jmvmin ) / ( self. jmvmin _ threshhold - self. jmvmin ) ) [ selection ] wtmat [ sele... | [
-0.6935811042785645,
-0.5741175413131714,
0.5787925124168396,
-0.7753757238388062,
-0.6062470078468323,
-0.10020852833986282,
0.7625487446784973,
-1.0529992580413818,
-0.053146470338106155,
-0.03826628625392914,
0.4051801860332489,
-0.07431991398334503,
0.16941624879837036,
-0.006164700258... |
def list _ moves ( self ) : counter = 1 list _ moves _ str = " " for number in range ( 1, self. start _ val + 1 ) : if math. sqrt ( number ) % 1 = = 0. 0 : list _ moves _ str + = " choice " + ( str ( counter ) + " : " + str ( number ) + " \ n " ) counter + = 1 return list _ moves _ str | [
-0.6723529696464539,
-0.6895606517791748,
0.6797623634338379,
0.07537742704153061,
0.2185979038476944,
0.33372747898101807,
-0.18546724319458008,
-0.14259985089302063,
0.04351699352264404,
0.3101065456867218,
0.11277306079864502,
0.37813800573349,
-0.059724386781454086,
0.36345311999320984... |
def _ check _ sample _ dim ( sample _ dim, objects ) : if sample _ dim is none : return _ get _ default _ sample _ dim ( objects ) is _ xarray _ input = _ check _ either _ all _ xarray _ or _ plain _ arrays ( objects ) if is _ xarray _ input : for obj in objects : if sample _ dim not in obj. dims : raise valueerror ( "... | [
0.2659848928451538,
-0.021964561194181442,
0.8008167743682861,
0.4803982377052307,
-0.9635306000709534,
0.08760147541761398,
0.4449270963668823,
-0.38247373700141907,
0.31559279561042786,
0.7296237945556641,
0.769268810749054,
0.09334314614534378,
-0.6948538422584534,
0.18690337240695953,
... |
def storeintcol ( self, * args ) : return _ snap. ptable _ storeintcol ( self, * args ) | [
-0.4846970736980438,
0.23447684943675995,
0.34339964389801025,
0.447844922542572,
0.35635408759117126,
0.7592610120773315,
1.4408209323883057,
-1.8591042757034302,
-1.2206023931503296,
0.4503365457057953,
-1.1918929815292358,
-0.054121535271406174,
-1.4539680480957031,
-0.40722763538360596... |
def _ _ str _ _ ( self ) : return'etl step with id = > % s'% self. id | [
0.2799469232559204,
-1.3315459489822388,
0.44383254647254944,
-0.8088104724884033,
-0.538942277431488,
0.6049681305885315,
-1.4170295000076294,
0.10347645729780197,
-0.5417225360870361,
0.17073209583759308,
-0.33381038904190063,
-0.1595367193222046,
1.1287986040115356,
0.42591187357902527,... |
def sofrstriprates _ load ( self, orient ='long ', download = true ) : if orient = ='wide': self. sofrstriprates _ df = self. load _ dataset ('sofrsr ', download = download ). pivot ( index ='businessdate ', columns ='description ', values ='rate'). sort _ values ('businessdate ', ascending = false ). reset _ index ( )... | [
-0.5916428565979004,
0.8621204495429993,
0.4315054714679718,
-1.0895013809204102,
-0.17290088534355164,
0.21734344959259033,
-0.32925644516944885,
0.3126359283924103,
-0.21668879687786102,
0.09025080502033234,
0.9122366905212402,
0.3415784239768982,
-0.6924422979354858,
0.12244360893964767... |
def optimize ( self, * args, * * kwargs ) : import pyzx as zx zxqc = self. to _ pyzx ( ) zxqc _ opt = zx. optimize. full _ optimize ( zxqc ) qc = self. _ _ class _ _. from _ pyzx ( zxqc _ opt ) return qc | [
0.35278555750846863,
-0.3815769851207733,
0.4063580632209778,
0.23966985940933228,
-0.10908495634794235,
-0.5379480123519897,
-0.44392529129981995,
-1.2319525480270386,
0.2818737328052521,
-0.779350757598877,
-0.2877489924430847,
-0.22203350067138672,
-0.8670440316200256,
-0.59913229942321... |
def getextent ( gt, cols, rows ) : ext = [ ] xarr = [ 0, cols ] yarr = [ 0, rows ] for px in xarr : for py in yarr : x = gt [ 0 ] + ( px * gt [ 1 ] ) + ( py * gt [ 2 ] ) y = gt [ 3 ] + ( px * gt [ 4 ] ) + ( py * gt [ 5 ] ) ext. append ( [ x, y ] ) print x, y yarr. reverse ( ) return ext | [
-0.38847845792770386,
0.10748495161533356,
0.8509091734886169,
0.2458895891904831,
0.4460795521736145,
-0.49759337306022644,
-0.21910452842712402,
-0.17842702567577362,
0.5342792272567749,
0.6286824941635132,
-0.19702956080436707,
-0.16478712856769562,
0.1769961267709732,
0.042222537100315... |
def get _ end _ timestamp ( ib, contract, what _ to _ show, use _ rth, num _ retry = none ) - > datetime. datetime : enddatetime = " " duration _ str = " 1 d " bar _ size _ setting = " 1 min " bars = req _ historical _ data ( ib, contract, enddatetime, duration _ str, bar _ size _ setting, what _ to _ show, use _ rth, ... | [
-0.42274394631385803,
1.2102932929992676,
0.4849168360233307,
0.14224140346050262,
1.2514852285385132,
-0.07602930814027786,
-0.2022479623556137,
-0.14819519221782684,
-0.7366030216217041,
0.17205415666103363,
0.6582052707672119,
0.7651816010475159,
-0.7596704363822937,
-0.4062610566616058... |
def local _ recall _ counts ( generated, ref _ data ) : recalled _ counter = defaultdict ( counter ) missed _ counter = defaultdict ( counter ) for image, references in ref _ data. items ( ) : # count the content words in each of the reference descriptions. word _ counter = counter ( ) for reference in references : wor... | [
1.1251579523086548,
-0.12049001455307007,
0.5986554622650146,
-1.3582104444503784,
-0.1067647635936737,
-0.4915470778942108,
0.2998783588409424,
0.01796577498316765,
-0.3970537781715393,
0.1965118646621704,
0.2721439301967621,
0.7779385447502136,
0.5452447533607483,
1.186045527458191,
0.... |
def tuint64 _ getkilostr ( * args ) : return _ snap. tuint64 _ getkilostr ( * args ) | [
-0.7795047760009766,
0.42561331391334534,
-0.255806028842926,
1.1661276817321777,
-0.13949236273765564,
-0.5331906080245972,
-0.747907280921936,
-0.70719313621521,
-1.4964553117752075,
-0.293170690536499,
1.502922534942627,
-0.6821621060371399,
-0.5543279647827148,
0.42517372965812683,
0... |
def deserialize ( self, data : str ) - > treenode : tree = [ ] lvl = - 1 print ( data ) s = data. split ( " | " ) for nodedata in s : level, side, pidx, nval = nodedata. split ( ", " ) level = int ( level ) pidx = int ( pidx ) if lvl! = level : lvl = level tree. append ( [ ] ) if nval = = " none " : n = none else : n =... | [
-0.07940696179866791,
-0.49204814434051514,
0.857909619808197,
-0.6712790131568909,
-0.7900553941726685,
-0.5211501717567444,
-0.6466735601425171,
0.4821132719516754,
-0.3037205636501312,
-0.12128016352653503,
-0.6518843770027161,
-0.08151825517416,
-1.307768702507019,
-0.16439583897590637... |
def get ( self, return _ lengths = false ) - > pandas. index : if not self. is _ materialized : if callable ( self. _ value ) : index, self. _ lengths _ cache = self. _ value ( ) self. _ value = ensure _ index ( index ) else : raise notimplementederror ( type ( self. _ value ) ) if return _ lengths : return self. _ val... | [
-0.41306304931640625,
0.6354048848152161,
0.27621081471443176,
0.08981376141309738,
0.44714710116386414,
-0.030490657314658165,
0.552946925163269,
-0.08095448464155197,
0.2729159891605377,
-0.4393726885318756,
0.29685431718826294,
1.4064152240753174,
-0.03703134506940842,
-0.44897177815437... |
def _ check _ best _ practice ( rule, obj _ l, t _ obj ) : global _ alert _ tbl _ d for obj in brcddb _ search. match _ test ( obj _ l, t _ obj. get ('l'), t _ obj. get ('logic') ) : px _ d = dict ( p0 = none, p1 = none ) for key in px _ d. keys ( ) : for sub _ key in gen _ util. convert _ to _ list ( t _ obj. get ( ke... | [
0.0602448396384716,
0.008151520043611526,
0.8319084048271179,
-0.10033765435218811,
0.5816722512245178,
0.14964020252227783,
0.19846439361572266,
-0.09246253222227097,
-0.571397602558136,
1.0439561605453491,
0.592655599117279,
0.6331958770751953,
-0.030798930674791336,
0.7926774621009827,
... |
def test _ tag _ cloud ( self ) : response = self. client. get ('/ tags /') self. assertcontains ( response,'tests ', status _ code = 200 ) | [
0.9997540712356567,
0.9530131220817566,
0.3019647002220154,
0.04370498284697533,
2.298245906829834,
0.8424074649810791,
-0.2769573926925659,
0.08466440439224243,
-1.02837336063385,
-0.6416406631469727,
0.018362654373049736,
0.04540834203362465,
0.027037348598241806,
0.7305164337158203,
-... |
def _ _ eq _ _ ( self, * args ) : return _ snap. tintboolhi _ _ _ eq _ _ ( self, * args ) | [
0.1015363559126854,
-0.8933621644973755,
0.03229639306664467,
0.056617606431245804,
0.6673181653022766,
0.501456081867218,
0.05856967717409134,
-0.21756227314472198,
-1.5288279056549072,
0.9051180481910706,
-0.9278228878974915,
-0.3706085979938507,
-0.6191004514694214,
-0.03016852028667926... |
def _ maskstring ( string, masklist = [ ] ) : maskedstr = string for maskitem in masklist : if not maskitem : continue maskedstr = maskedstr. replace ( maskitem, " * " * 8 ) # if looking at stderr of a script, single quotes have been converted # to'\'' maskedstr = maskedstr. replace ( maskitem. replace ( "'", "'\ \'' "... | [
-0.337295264005661,
-0.9888860583305359,
0.7432540655136108,
1.1918532848358154,
-0.08420009911060333,
-0.5395894050598145,
-0.46513012051582336,
-0.3066316246986389,
0.7130894064903259,
0.8085445761680603,
0.19787979125976562,
0.48090624809265137,
-0.8158217668533325,
0.016706395894289017... |
def responsive ( self, responsive ) : if responsive is none : raise valueerror ( " invalid value for ` responsive `, must not be ` none ` " ) # noqa : e501 self. _ responsive = responsive | [
0.6992825269699097,
0.5090504288673401,
0.08341077715158463,
0.4615977704524994,
0.1196414902806282,
0.7248503565788269,
0.34897536039352417,
0.35499536991119385,
0.08334343880414963,
-0.6702005863189697,
-0.28236478567123413,
-0.9738051891326904,
-0.11738000065088272,
-0.8759166598320007,... |
def print ( self ) : cost = self. cost ( ) print ( " to produce " + str ( self. d _ quantity ) + " " + self. d _ name + " it costs : " ) if len ( cost ) = = 1 : print ( " nothing ( base type ) " ) else : for item in cost : print ( str ( cost [ item ] * self. d _ quantity ) + " " + item + ", ", end = " " ) print ( " " ) | [
-0.8931432962417603,
0.059679631143808365,
0.8000943064689636,
-0.202365905046463,
0.15512129664421082,
-0.1538703292608261,
-0.37889522314071655,
-0.41479870676994324,
-0.04237142577767372,
-0.0750826746225357,
0.3290555775165558,
0.23100924491882324,
0.18185707926750183,
-0.3534181118011... |
def commit _ all ( self ) : self. _ _ _ save _ header ( ) | [
-0.5144895315170288,
-1.4722787141799927,
0.6258761882781982,
0.6703028678894043,
0.579704999923706,
0.6063593626022339,
0.35648468136787415,
0.6208422183990479,
-0.9537588953971863,
0.8417855501174927,
-0.3995792269706726,
-0.35565710067749023,
-0.5117877721786499,
0.7657124996185303,
0... |
def getidvsattre ( self, * args ) : return _ snap. tdirnet _ getidvsattre ( self, * args ) | [
-0.9075904488563538,
0.9344998598098755,
0.5010905265808105,
-0.4473278522491455,
0.7015600800514221,
-1.2481428384780884,
0.20080286264419556,
-1.3213832378387451,
0.19676589965820312,
-0.5860893130302429,
0.6840084195137024,
-0.3321082592010498,
-1.2584540843963623,
-0.7243064641952515,
... |
def update ( self, content, title = none ) : self. connect ( ) if log : log. info ('updating % s...'% self. masked _ url ) try : if title is none : title = self. proxy. title _ or _ id ( ) self. proxy. manage _ edit ( content, title ) except : exc _ type, exc, tb = sys. exc _ info ( ) if log : message = str ( exc ). re... | [
-0.9811717867851257,
-0.3435733914375305,
0.5494439601898193,
0.0964408591389656,
-0.40293729305267334,
0.043715596199035645,
0.10885462164878845,
0.1418699026107788,
0.1501832902431488,
0.27112993597984314,
-0.11370955407619476,
0.5178481936454773,
-1.2685651779174805,
-0.7682912945747375... |
def rotate _ clockwise ( self ) : if not self. can _ rotate _ c ( ) : return none # exit the function for block in self. tetris _ o : a = block. pos [ 0 ] b = block. pos [ 1 ] block. pos [ 0 ] = - b block. pos [ 1 ] = a | [
0.538580596446991,
0.026195501908659935,
0.6242255568504333,
-0.0649624839425087,
0.3705664873123169,
-0.14703062176704407,
0.752640426158905,
-0.7233184576034546,
-0.5985219478607178,
0.47114646434783936,
-0.4933951497077942,
0.0684923529624939,
-0.9368694424629211,
-0.2768629193305969,
... |
def load _ input ( input _ name ) : with open ( input _ name ) as input _ file : input _ list = [ ] for line in input _ file : input _ list. append ( line. strip ( ) ) return input _ list | [
-0.10651244223117828,
-0.7450555562973022,
0.4716480076313019,
-0.3985009491443634,
-0.32291120290756226,
1.1406455039978027,
-0.7087609171867371,
1.2356781959533691,
-0.06307649612426758,
0.027894139289855957,
-0.9898394346237183,
0.02931566908955574,
-0.35920509696006775,
0.5667958855628... |
def hello2 ( self, name, language = " en " ) : print ( language + " " + name ) | [
0.7149558663368225,
-0.2571611702442169,
0.640701949596405,
0.19012588262557983,
-1.1273438930511475,
0.48449841141700745,
-1.1630719900131226,
-0.30240654945373535,
-1.20699143409729,
0.0322842001914978,
-1.4676083326339722,
0.5852460265159607,
0.10982661694288254,
-0.03987690433859825,
... |
def getstr ( self, * args ) : return _ snap. ttable _ getstr ( self, * args ) | [
-0.41549545526504517,
0.7243871092796326,
0.12915226817131042,
0.8577773571014404,
0.8697447776794434,
0.11281523108482361,
0.7559605836868286,
-0.6892055869102478,
-1.2042784690856934,
-0.6091452836990356,
-0.42651861906051636,
-1.1884857416152954,
-0.25676053762435913,
0.2012014538049698... |
def test _ reload ( self ) : def check _ pids ( pre, post = none, workers = 2 ) : if post is none : if len ( pre ) = = workers : return true else : return false if len ( post ) = = workers : # check new children have different pids if post. intersection ( pre ) = = set ( ) : return true return false self. api _ server.... | [
-0.47934582829475403,
0.008484844118356705,
0.9017914533615112,
0.04075714945793152,
0.6480751037597656,
-0.2112244814634323,
0.4654094874858856,
-0.262188196182251,
-0.5982397198677063,
0.002138991840183735,
-0.7478113770484924,
0.6942088603973389,
-0.34286534786224365,
0.3245876431465149... |
def getnodesathop _ pungraph ( * args ) : return _ snap. getnodesathop _ pungraph ( * args ) | [
-1.543596863746643,
0.7983978986740112,
0.4502517580986023,
0.10801395773887634,
-0.4778870940208435,
-0.20700497925281525,
0.9554692506790161,
-0.006011044606566429,
-0.05854935199022293,
0.4209195375442505,
-0.5822142958641052,
-0.9044095277786255,
-0.11749918013811111,
-0.25164556503295... |
def upload _ files ( self, conn, put _ req, prefix, file _ list ) : # get the directory name and save to the external id - if the external # id is currently none if put _ req. migration. external _ id is none : # create a new name dir _ name = self. _ _ get _ new _ directory _ name ( conn ) # make the dir - ensure we a... | [
-0.7831047773361206,
1.191246509552002,
0.8656301498413086,
0.08772347867488861,
0.9583312273025513,
-0.937418520450592,
0.4040294587612152,
-0.12960949540138245,
-0.49760448932647705,
0.31375911831855774,
-0.05914866179227829,
-0.338301420211792,
-1.0457319021224976,
0.37115415930747986,
... |
def get _ depth _ l2 ( instrument : str ) : client = publicbitwyrewsclient ( ) client. depth _ l2 ( instrument ) while true : print ( " " ) print ( " receiving message " ) success, response, error _ code, error _ msg = client. receive _ conn ( ) if not success : exit _ message ( response, error _ code, error _ msg ) cl... | [
-0.3488143980503082,
-0.24468448758125305,
0.8618198037147522,
-0.705079972743988,
-0.2581196427345276,
0.350577712059021,
0.47662433981895447,
-1.6327964067459106,
-1.0643380880355835,
-0.6206139326095581,
-0.7656285166740417,
1.7871044874191284,
-0.7002356052398682,
0.45470842719078064,
... |
def set _ up _ recipe ( self ) : self. set _ input _ options ( ) self. set _ class _ attributes ( ) self. update _ recipe _ metadata ( ) self. parse _ recipe _ template ( ) self. create _ recipe _ plan ( ) self. create _ archive _ files ( ) | [
-0.08527109026908875,
0.24074405431747437,
0.2807423174381256,
0.30573001503944397,
1.0192934274673462,
-0.27256590127944946,
0.33087146282196045,
0.5555080771446228,
-0.3898410499095917,
-0.05422312766313553,
-0.23686227202415466,
-0.40705347061157227,
1.1251362562179565,
0.23952566087245... |
def get _ catalog _ item _ version ( self, project _ name : str, catalog _ item _ id : str, version : str, * * kwargs : any ) - > json : error _ map = { 401 : clientauthenticationerror, 404 : resourcenotfounderror, 409 : resourceexistserror, 304 : resourcenotmodifiederror, } error _ map. update ( kwargs. pop ( " error ... | [
-0.84060138463974,
-0.8511964082717896,
0.6376648545265198,
0.08244381099939346,
-0.05798286572098732,
-0.08337097615003586,
-0.440641313791275,
-0.3724539875984192,
-0.7915396094322205,
1.0138943195343018,
-0.7590916752815247,
1.2905936241149902,
-0.5385416746139526,
-0.7841171026229858,
... |
def update _ function ( function _ selector, function _ values ) : x = np. linspace ( left _ x, right _ x, 50 ) y = functions [ function _ selector. active ] ( x ) function _ values. data = { " x " : x, " y " : y } | [
-0.7294481992721558,
-0.7939424514770508,
0.19223403930664062,
-0.8482542037963867,
0.31164035201072693,
-0.16166998445987701,
-0.30657485127449036,
-0.20654833316802979,
-0.39987775683403015,
0.1653243750333786,
-0.5211236476898193,
1.2137444019317627,
0.528821587562561,
-0.42772087454795... |
def rbf _ kernel ( x1, x2 ) : # initialize the value val = 0. 0 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # your code here # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # compute the kernel value # raise notimplementederror gamma = 0. 7 val = np. exp ( - gamma * np. linalg. norm ( x1 - x2 ... | [
0.4007842540740967,
-0.11165037006139755,
0.8363094329833984,
0.5594792366027832,
-0.3848625719547272,
-0.9354225397109985,
-0.24395592510700226,
0.3209044337272644,
-1.5755248069763184,
0.5580359101295471,
0.14819642901420593,
1.666819453239441,
-0.7664560675621033,
0.3823678195476532,
... |
def cech _ diff _ local ( self, start _ chains, n _ dim, deg, nerve _ spx _ index ) : coboundary = self. nerve _ differentials [ n _ dim + 1 ] [ nerve _ spx _ index ] # cofaces and coefficients on cech differential cofaces = np. nonzero ( coboundary ) [ 0 ] coefficients = coboundary [ cofaces ] # indices of generators ... | [
0.055361710488796234,
-0.7234134674072266,
0.7000647783279419,
0.10958164930343628,
0.07687416672706604,
0.09531917423009872,
1.3630577325820923,
0.4581579267978668,
-0.5550339221954346,
-0.11431428790092468,
-0.4932616353034973,
-0.11013659089803696,
0.15163302421569824,
0.487499326467514... |
def admin _ update _ device _ status ( userpoolid = none, username = none, devicekey = none, devicerememberedstatus = none ) : pass | [
-0.8071788549423218,
0.3407360911369324,
0.1853226274251938,
0.6583059430122375,
-0.2453758716583252,
0.5506157279014587,
1.0371947288513184,
-0.15546377003192902,
0.4660213589668274,
0.2874526381492615,
-0.708160936832428,
1.3003859519958496,
-0.8487164974212646,
0.19435720145702362,
0.... |
def getdat ( self, * args ) : return _ snap. tuint64hi _ getdat ( self, * args ) | [
-0.0526433140039444,
0.7032117247581482,
0.20313666760921478,
0.764140248298645,
0.9942432641983032,
0.6632447838783264,
0.06084025651216507,
-0.46043872833251953,
-1.5138239860534668,
-0.6672131419181824,
0.5825854539871216,
-1.0862244367599487,
-0.18593256175518036,
0.0568891316652298,
... |
def _ _ init _ _ ( self ) : self. buckets = 1000 self. bucketsize = 1001 self. array = [ none for i in range ( self. buckets ) ] | [
-0.3261927664279938,
-0.37303996086120605,
0.5318072438240051,
-0.09764865785837173,
0.5833576321601868,
-0.26652559638023376,
0.31864476203918457,
-0.2737981677055359,
0.3722856640815735,
-0.4746611416339874,
-1.3124003410339355,
0.4091116487979889,
0.12249467521905899,
0.3775006532669067... |
def get _ for _ plaintext _ passwords ( self ) : self. logger. normal _ output ( " running plaintext passwords and users " ) self. plaintext _ passwords. update ( { " grep for user " : self. executor. execute _ command ( " grep - i user / * " ) } ) self. plaintext _ passwords. update ( { " grep for pass " : self. execu... | [
-0.32086777687072754,
-0.11566465348005295,
0.5698337554931641,
-0.24195417761802673,
0.15932177007198334,
-0.3133007884025574,
0.3558498024940491,
0.26883646845817566,
-0.3835395574569702,
0.06563074886798859,
-0.21961762011051178,
-0.06745080649852753,
0.14138969779014587,
1.312690973281... |
def parse _ from _ element ( el, method = none ) : if isinstance ( el, conference ) : return bookmark. parse _ from _ stanza ( el, method ) jid = el. get ('jid') name = el. get ('name') autojoin = true if el. get ('autojoin ','false'). lower ( ) in ('true ','1') else false nick = none for n in xml. iter ( el,'nick') : ... | [
-0.3962721526622772,
0.0008228819933719933,
0.5781351327896118,
0.6694084405899048,
-0.64974045753479,
-0.22768273949623108,
-0.03424452245235443,
0.4589345157146454,
0.27756255865097046,
0.10696382820606232,
-0.5656782388687134,
-0.0695648044347763,
-0.013599136844277382,
0.04523803666234... |
def literalderivation ( cls, record ) : # my literals have const values yield cls. const # they are observable yield cls. observable # and whatever else my superclass says yield from super ( ). literalderivation ( record ) # all done return | [
0.6821140050888062,
-0.1719500869512558,
0.6937896609306335,
-0.03539205342531204,
-0.35398903489112854,
1.0071321725845337,
-0.7738258838653564,
0.18842166662216187,
-0.12336467951536179,
-0.48508909344673157,
-0.3080216646194458,
-0.2451930046081543,
-0.0004445968079380691,
0.82114154100... |
def handle _ outbound _ message _ failure ( self, f, message ) : log. error ( f,'sending ussd failure on parlayx : % r'% ( self. transport _ name, ) ) if not f. check ( serviceexception, policyexception ) : if f. check ( soapfault ) : # we'll give server - class unknown soap faults the benefit of # the doubt as far as ... | [
0.33752691745758057,
0.5596238970756531,
0.4572220742702484,
0.2947140634059906,
-0.4628547728061676,
0.23770920932292938,
-0.4039139449596405,
-0.38261106610298157,
0.30558985471725464,
-0.45132002234458923,
0.9886835217475891,
0.2690024673938751,
-0.11247497797012329,
0.4664381444454193,... |
def draw ( self, position _ of _ center = none ) : if position _ of _ center : position = [ position _ of _ center [ 0 ] + self. pos [ 0 ] * self. gridsize, position _ of _ center [ 1 ] + self. pos [ 1 ] * self. gridsize ] else : position = self. real _ pos pygame. draw. rect ( self. surface _ object, self. color, ( po... | [
-0.09119123965501785,
-0.3846517503261566,
0.6574013829231262,
-0.07047254592180252,
0.6727587580680847,
0.10010317713022232,
-0.22528143227100372,
0.05520407482981682,
0.3913704454898834,
-0.35993778705596924,
-0.14076215028762817,
-0.5390500426292419,
0.37482935190200806,
0.1072733178734... |
def build _ graph ( self ) : colname _ dict = {'age _ band':'age band ','ethnicity':'ethnicity ','race':'race ','sex':'sex ', } # add missing colnames missing _ cols = list ( set ( self. df. columns. values ) - set ( colname _ dict. keys ( ) ) ) colname _ dict. update ( { colname : colname for colname in missing _ cols... | [
-0.34363409876823425,
1.0589936971664429,
0.6917632818222046,
0.24611610174179077,
0.13303671777248383,
0.4942878186702728,
0.7601706385612488,
0.24650609493255615,
-0.9407745003700256,
-0.07803979516029358,
-0.21477006375789642,
0.4323696494102478,
0.2251427173614502,
0.28013846278190613,... |
def _ _ lt _ _ ( self, * args ) : return _ snap. tmodenetnodei _ _ _ lt _ _ ( self, * args ) | [
-0.4068801999092102,
-0.06928707659244537,
0.28790149092674255,
-1.2693126201629639,
0.3083418905735016,
-0.15537694096565247,
0.0791739746928215,
-1.083673357963562,
-1.483932375907898,
0.22947366535663605,
-0.46157485246658325,
-0.8212688565254211,
-0.278852641582489,
0.47125479578971863... |
def main ( ctx ) : print ( " mode : ", ctx. invoked _ subcommand ) | [
0.8012943267822266,
-0.5750287175178528,
0.6022765636444092,
0.28268519043922424,
1.1617249250411987,
1.465124487876892,
0.37690141797065735,
0.07221423089504242,
-0.6119832992553711,
-0.762231171131134,
-0.23573678731918335,
1.3884363174438477,
0.050519347190856934,
-0.9927423000335693,
... |
def getdat ( self, * args ) : return _ snap. tintflttrhi _ getdat ( self, * args ) | [
0.845153272151947,
0.3193526268005371,
0.18997205793857574,
-0.04635566100478172,
1.2772256135940552,
0.4700072407722473,
0.7016265392303467,
-0.8235980868339539,
-1.386605143547058,
-0.8958245515823364,
-0.5630645751953125,
-0.1987486481666565,
-0.3487952649593353,
0.4818948805332184,
0... |
def playmusic ( soundfile ) : pygame. init ( ) bitsize = - 16 # signed 16 bit. support 8, - 8, 16, - 16 channels = 1 # 1 is mono, 2 is stereo buffer = 2048 # number of samples ( experiment to get right sound ) mp3 = mutagen. mp3. mp3 ( soundfile ) frequency = mp3. info. sample _ rate pygame. mixer. init ( ) clock = pyg... | [
0.24203255772590637,
0.1938825249671936,
0.834937572479248,
0.3089876174926758,
0.44191375374794006,
0.43505769968032837,
0.5365990400314331,
-0.8050045371055603,
0.03030688874423504,
-0.583172619342804,
-0.212809219956398,
-0.5756164193153381,
-1.109788179397583,
0.10068835318088531,
0.... |
def wait _ for _ http _ alert ( host ='127. 0. 0. 1 ', port ='8081 ', get _ method ='' ) : class receivealerthandler ( basehttprequesthandler ) : " " " http server, ends when get request with'get _ method'is received. " " " def do _ get ( self ) : " " " get method " " " if self. path. endswith ( get _ method ) : self. ... | [
-0.40958890318870544,
-0.8435966372489929,
0.8345348834991455,
0.006015322636812925,
-0.17870894074440002,
0.43359822034835815,
0.034179527312517166,
-0.48520398139953613,
-1.1070994138717651,
-0.16765615344047546,
0.5945989489555359,
0.8228269815444946,
-0.2669493556022644,
0.338059723377... |
def check _ materials ( self, t : festim. temperature, derived _ quantities : list = [ ] ) : if len ( self. materials ) > 0 : # todo : get rid of this... self. check _ consistency ( ) self. check _ for _ unused _ properties ( t, derived _ quantities ) self. check _ unique _ ids ( ) self. check _ missing _ properties ( ... | [
-0.567646861076355,
-0.8924570679664612,
0.35709348320961,
-0.4222433567047119,
0.921499490737915,
0.758013129234314,
-0.27432993054389954,
0.0389818474650383,
-0.6649817824363708,
-0.8107653260231018,
0.1207776665687561,
-0.7304806709289551,
0.12866587936878204,
1.5006506443023682,
-0.6... |
def addsattre ( self, * args ) : return _ snap. tneanet _ addsattre ( self, * args ) | [
-0.34975844621658325,
0.4373733401298523,
0.4352867007255554,
-0.4444335997104645,
0.8122046589851379,
-0.4560423493385315,
-0.13113099336624146,
-0.5998600125312805,
-0.4153785705566406,
-0.599822461605072,
0.4583398997783661,
-0.9870932102203369,
-0.5429567694664001,
0.9677646160125732,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.