text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def findextendedcode ( message ) : # references : # https : / / www. iana. org / assignments / smtp - enhanced - status - codes / smtp - enhanced - status - codes. xhtml # https : / / www. usps. org / info / smtp _ status. html # https : / / docs. microsoft. com / en - us / exchange / mail - flow - best - practices / n... | [
1.147827386856079,
0.5350218415260315,
0.8797838091850281,
-0.39486342668533325,
-0.9258909225463867,
-0.7617720365524292,
0.035368047654628754,
0.22693084180355072,
0.17316041886806488,
0.2916785180568695,
0.11863534897565842,
0.4255519509315491,
-1.5469224452972412,
0.4955907464027405,
... |
def vrati _ default _ graf ( self ) : msg ='returning postavke pomocnog grafa, postavke = { 0 } '. format ( str ( self. defaultgraf ) ) logging. debug ( msg ) return self. defaultgraf | [
-0.2501421868801117,
0.4535764753818512,
0.20186464488506317,
0.21840447187423706,
-0.3581506609916687,
-0.2395954430103302,
0.3399219810962677,
-0.24589283764362335,
-1.4590660333633423,
-0.23343771696090698,
-0.2963932454586029,
-0.08455762267112732,
-1.6441922187805176,
0.59839087724685... |
def get _ emissions ( self, models, encoder _ input ) : model = models # # change here encoder _ out = model ( * * encoder _ input ) if self. criterion _ type = = criteriontype. ctc : if hasattr ( model, " get _ logits " ) : emissions = model. get _ logits ( encoder _ out ) # no need to normalize emissions else : emiss... | [
-0.32489874958992004,
-0.48930853605270386,
0.5602387189865112,
0.953125536441803,
0.03293880447745323,
-0.252443790435791,
-0.21035420894622803,
-0.2578487992286682,
-0.5585458278656006,
0.2350514531135559,
0.612204372882843,
0.17794974148273468,
-0.15911397337913513,
0.9752157926559448,
... |
def svm _ loss _ naive ( w, x, y, reg ) : dw = np. zeros ( w. shape ) # initialize the gradient as zero # compute the loss and the gradient num _ classes = w. shape [ 1 ] # 10 num _ train = x. shape [ 0 ] # minibatch size loss = 0. 0 for i in range ( num _ train ) : scores = x [ i ]. dot ( w ) correct _ class _ score =... | [
-0.16035926342010498,
0.6546158194541931,
1.0168873071670532,
0.007303738035261631,
-0.6321033835411072,
-0.7209942936897278,
0.4554236829280853,
0.16120485961437225,
-0.04954157769680023,
0.35199877619743347,
-0.28471991419792175,
0.35745343565940857,
0.4870623052120209,
0.128105476498603... |
def _ set _ attribute ( self, attribute : constants. resourceattribute, attribute _ state : any ) - > statuscode : raise unknownattribute ( attribute ) | [
-0.13101832568645477,
-0.4219532608985901,
0.18663887679576874,
-1.2072397470474243,
-0.12099476158618927,
-0.18845154345035553,
0.22667786478996277,
0.5404694080352783,
0.6826971769332886,
0.6545109152793884,
0.6661402583122253,
0.10215524584054947,
1.2371634244918823,
-0.2930575907230377... |
def built _ by ( self, built _ by ) : self. _ built _ by = built _ by | [
-0.18373169004917145,
-1.1771156787872314,
0.16694968938827515,
1.4500176906585693,
0.11448439955711365,
1.296955943107605,
1.6893577575683594,
1.5826339721679688,
-1.223950982093811,
-0.5284178256988525,
-1.3556731939315796,
-0.16259396076202393,
0.6503466963768005,
-0.04148534685373306,
... |
def run ( ) : basemesh = lm. scene _ object ( ). copy ( asset ='basemesh ', task ='mdl ', user ='publish ', latest = true, set _ proper _ filename = true, type ='lib') print ( basemesh. path _ root ) lm. import _ file _ old ( basemesh. path _ root ) bpy. ops. object. make _ local ( type ='all') base _ mesh = bpy. data.... | [
0.6730666160583496,
-0.6170619130134583,
0.7486751675605774,
0.7602226138114929,
0.37287625670433044,
0.6083688139915466,
0.860606849193573,
0.13326998054981232,
0.09280214458703995,
0.33134764432907104,
-0.8402681350708008,
1.1946877241134644,
0.2451360672712326,
-0.26244056224823,
-0.0... |
def midpoint ( self ) : return ( self. lambd + self. lambd ) / 2 | [
0.7656622529029846,
-1.025734305381775,
0.42903682589530945,
-0.21624131500720978,
0.6073098182678223,
0.5564805865287781,
-1.173050880432129,
-0.6727801561355591,
0.6566075682640076,
-0.5077098608016968,
0.7325647473335266,
-0.07011336833238602,
-1.5359373092651367,
1.0456970930099487,
... |
def pmin ( self ) : return self. _ pmin | [
-0.6579847931861877,
-0.6581462025642395,
0.2908535301685333,
-0.18352581560611725,
-0.26637184619903564,
1.2089340686798096,
-0.05251596122980118,
-1.0279778242111206,
0.9025039672851562,
-1.4133483171463013,
0.5520490407943726,
-0.3229231834411621,
-1.5700658559799194,
-0.226026639342308... |
def example1 _ 1 ( ) : # for loop style for i in range ( 1, 11 ) : print i # while loop version count = 1 # initialize count at 1 # repeat while count < = 10 while count < = 10 : print count # output count count + = 1 | [
0.5322203636169434,
-0.4581454396247864,
0.37808337807655334,
-0.02939824014902115,
0.08873750269412994,
0.9658892154693604,
0.7287794351577759,
0.27648866176605225,
-0.5428093671798706,
0.339624285697937,
-0.4267787039279938,
0.4867699146270752,
0.4730394780635834,
-0.3195042014122009,
... |
def get _ files _ ids ( self ) : return self. _ request ( " files " ) | [
0.02983153983950615,
0.638016402721405,
0.25481241941452026,
0.8909078240394592,
1.2778195142745972,
-0.42029353976249695,
-0.695641040802002,
-0.21884220838546753,
-0.31372952461242676,
0.06266177445650101,
-0.9040425419807434,
0.786223292350769,
-1.6904816627502441,
0.039857685565948486,... |
def fills ( self ) : # return [ self. fill ( k ) for k in range ( len ( self ) ) ] return [ attr [ u'fill'] for attr in self. attributes ] | [
-0.6062971949577332,
-0.14915427565574646,
0.3140299618244171,
0.11383862793445587,
0.786319375038147,
0.6537637710571289,
-0.4084896743297577,
0.5135394930839539,
0.3189001679420471,
-0.36412474513053894,
-1.0525933504104614,
-0.6885546445846558,
0.46066370606422424,
1.499194622039795,
... |
def update _ variable _ by _ api _ name ( variable _ api _ name ) : " " " example variable _ api _ name ='variable55'" " " # get instance of variablesoperations class variables _ operations = variablesoperations ( ) # get instance of bodywrapper class that will contain the request body request = bodywrapper ( ) # list ... | [
-0.5596097111701965,
-1.0907022953033447,
0.9471814632415771,
-0.22697001695632935,
0.4538360834121704,
-0.22109198570251465,
0.36692366003990173,
-0.07486573606729507,
0.08954740315675735,
0.6840251684188843,
-0.8937821984291077,
0.4935947060585022,
-0.8629862666130066,
0.1060620918869972... |
def _ _ fetch _ event _ history ( self ) : # initialise empty event list self. event _ history = [ ] # combine temperature - and door sensors project _ sensors = [ s for s in self. sensors ] + [ d for d in self. doors ] + [ o for o in self. oofs ] # iterate devices for sensor in project _ sensors : # isolate id sensor ... | [
-0.06728584319353104,
0.07759912312030792,
0.7072710990905762,
0.11168115586042404,
0.5714821219444275,
0.03308491408824921,
-0.3009020984172821,
-0.12183237820863724,
-0.18075354397296906,
0.4059527516365051,
0.7625821828842163,
0.4474918246269226,
0.06920725852251053,
1.1777793169021606,... |
def vis _ structure _ from _ input ( curr _ doc : currentdoc, nodeindep _ list, nodedep _ list ) : nodedep _ to _ plot = copy. deepcopy ( nodedep _ list ) nodeindep _ to _ plot = prhlp. list _ with _ every _ knot _ only _ once ( nodeindep _ list ) nodedep _ list. sort ( key = lambda ele : ele. id _ el _ ) prhlp. print ... | [
-0.35020744800567627,
-0.287797212600708,
0.3439376950263977,
-0.36382707953453064,
-0.6780924201011658,
1.105700135231018,
1.1720565557479858,
-0.09905483573675156,
0.4722251892089844,
-0.07104916870594025,
0.46953481435775757,
1.420611023902893,
0.23213998973369598,
0.7923417687416077,
... |
def other _ id ( hyper ) : otherid = util. make _ short _ idstr ( hyper. other, precision = 4 ) return otherid | [
1.199574589729309,
-1.124342918395996,
0.6191853284835815,
-0.006381524261087179,
0.6102827787399292,
0.04945876821875572,
-0.01289135031402111,
-0.8013105392456055,
0.385871559381485,
-0.30915525555610657,
-0.00985526293516159,
0.10701410472393036,
-0.3753851652145386,
-0.1981232166290283... |
def plot _ ts ( self ) : import scipy. signal as signal # guide lines and hard coded plot elements psd _ guild _ lines _ hz = [ 1. 4, 60. 0 ] psd _ guild _ line _ colors = ['darkorchid ','firebrick'] psd _ guild _ line _ alpha = 0. 2 psd _ y _ min _ pa _ roothz = 1. 0 psd _ y _ max _ pa _ roothz = 1. 0e4 # figure margi... | [
0.5832075476646423,
0.12158051878213882,
0.9507964849472046,
-0.8394193649291992,
-0.6711453199386597,
-0.05036913603544235,
0.5193816423416138,
-0.06898869574069977,
-0.6341001987457275,
-0.17865560948848724,
0.10444307327270508,
0.7238590121269226,
-0.008251145482063293,
0.88534832000732... |
def is _ kind _ of ( self, tp ) : # check if required type is the same return self. type. is _ kind _ of ( tp ) | [
-0.643619954586029,
0.0021726898849010468,
0.44712692499160767,
0.22764262557029724,
0.5904415845870972,
0.41362035274505615,
0.18370269238948822,
-1.5840157270431519,
0.45740437507629395,
1.3328355550765991,
-0.2787846624851227,
0.6278045773506165,
-0.8675419688224792,
0.6517418026924133,... |
def version ( self, version ) : self. _ version = version | [
-0.18723466992378235,
-0.6140437722206116,
-0.25167614221572876,
0.48614564538002014,
0.4795744717121124,
1.2493847608566284,
0.7197955846786499,
1.0009400844573975,
-0.3987398147583008,
-0.2096806764602661,
-1.824381947517395,
-0.9760374426841736,
-0.28501561284065247,
0.7714249491691589,... |
def settings ( ) : skip _ if _ no _ django ( ) wrapper = settingswrapper ( ) yield wrapper wrapper. finalize ( ) | [
-1.4316085577011108,
0.7908528447151184,
0.36904770135879517,
0.23706158995628357,
0.017458150163292885,
-0.5214354395866394,
0.2966393232345581,
-1.5467188358306885,
0.03554534539580345,
0.08304030448198318,
-0.08322910964488983,
-0.7284317016601562,
0.18422463536262512,
0.445332109928131... |
def fit ( self, table _ data ) : raise notimplementederror | [
-0.6080660223960876,
0.036110904067754745,
0.309004545211792,
1.2505226135253906,
-0.23113594949245453,
1.0604760646820068,
0.021583596244454384,
0.02137075550854206,
-0.7570325136184692,
-0.43998822569847107,
-0.33664587140083313,
0.5244953632354736,
0.08168037980794907,
0.987690806388855... |
def inference ( self, x ) : pre _ trained _ embeddings = np. load ('datasets / clinicalts / basefiles / cdif / w2v / final _ embeddings. npy') vocab _ length, embedding _ dimension = pre _ trained _ embeddings. shape print ('embedding matrix dimensions, ', vocab _ length, embedding _ dimension ) # # old code : embeddin... | [
0.3830258846282959,
0.7905608415603638,
0.7745450139045715,
0.6098766326904297,
-0.456561803817749,
-0.38888782262802124,
1.2781716585159302,
0.16544675827026367,
-0.6102900505065918,
0.5848745703697205,
-0.40458518266677856,
0.09494104981422424,
0.46839413046836853,
1.0562424659729004,
... |
def get _ entry _ index ( self, entry _ id : int, category = none ) - > int : if category is none : category = self. active _ category if category is none : raise valueerror ( " no param category selected. " ) if entry _ id not in self. params. get _ param ( category ). rows : raise valueerror ( f " param id { entry _ ... | [
-0.06354375928640366,
-0.3247290849685669,
0.28810355067253113,
-0.10041269659996033,
0.5704195499420166,
-0.6000410318374634,
0.63924241065979,
-0.21590188145637512,
-0.09153804928064346,
0.6622565984725952,
0.9205203652381897,
1.2059345245361328,
0.19386224448680878,
0.4331228733062744,
... |
def update ( self ) : " " " it is called when the mode changes and when the selected track changes " " " assert ( self. _ modes _ buttons! = none ) " links the session to the mixer, so that when change the selected track the session also changes position " self. _ session. set _ mixer ( self. _ mixer ) if self. is _ en... | [
-0.4520999789237976,
-1.4046984910964966,
0.8457791209220886,
0.2393718957901001,
-0.3987460136413574,
-0.3212709128856659,
0.5881956815719604,
-0.1776033192873001,
0.29736196994781494,
0.33691495656967163,
-0.10461468249559402,
-0.6953375935554504,
-0.23306110501289368,
0.5029354095458984... |
def num _ classes ( self ) : return max ( self. classes. values ( ) ) + 1 | [
-0.9846082329750061,
0.5209701061248779,
0.41470927000045776,
0.47837620973587036,
0.7172479033470154,
0.35237395763397217,
-0.11764343082904816,
0.644781231880188,
0.48077642917633057,
-1.554343342781067,
-0.26035261154174805,
-0.37537717819213867,
0.832507312297821,
0.4531231224536896,
... |
def mandatory ( self ) - > optional [ pulumi. input [ bool ] ] : return pulumi. get ( self, " mandatory " ) | [
-0.11083530634641647,
0.39895159006118774,
0.43300673365592957,
0.8501214981079102,
1.0658701658248901,
1.3988497257232666,
-0.7591698169708252,
0.29478007555007935,
0.2531984746456146,
0.38221392035484314,
0.37196680903434753,
0.754082441329956,
-0.44351282715797424,
-0.8053538799285889,
... |
def retrieve _ list ( self, url, method ='get ', data = none, params = none ) : # todo : check totalcount, hasmore, firstindex - ignore for now # todo : check if request is executed response = self. request ( method = method, url = url, data = data, params = params ) if not response : # todo : reinit ruckusapi return [... | [
-1.0775026082992554,
0.3699362576007843,
0.49309471249580383,
0.8916173577308655,
1.876639723777771,
-1.0907307863235474,
-0.3128877580165863,
0.041047655045986176,
1.382266879081726,
-0.6383333802223206,
-0.4645223915576935,
0.07249676436185837,
-0.6657167077064514,
0.786701500415802,
-... |
def reduce _ bool _ func ( bool _ func, term ) : bool _ func = map ( lambda x : anf _ quotient _ from _ stuct ( x ), bool _ func ) bool _ func = map ( lambda x : reduce _ anf _ stuct ( x ), bool _ func ) | [
0.2510918974876404,
-0.37467241287231445,
0.3571111857891083,
0.14239998161792755,
0.16181771457195282,
-0.09857557713985443,
0.9593231081962585,
1.2044631242752075,
-0.7152073383331299,
0.9035069346427917,
-0.5062544941902161,
0.18894581496715546,
0.9921399354934692,
-0.1187238097190857,
... |
def _ _ init _ _ ( self ) : engine = db _ connect ( ) create _ table ( engine ) self. session = sessionmaker ( bind = engine ) | [
0.30531370639801025,
-0.08400910347700119,
0.477385550737381,
0.8722855448722839,
0.17914731800556183,
-0.18264441192150116,
-0.14760030806064606,
0.1223381832242012,
-0.42305198311805725,
-0.18283596634864807,
-0.06742897629737854,
-0.49023377895355225,
0.7467016577720642,
0.5020311474800... |
def run _ experiment ( self, run, trial _ params = none ) : # start if run : self. exp _ start _ event. clear ( ) self. send _ message ( targets = ( proc _ cmr _ vidrec, ), cmd = cmd _ start, val = trial _ params ) for pipe in self. msg _ rcvd _ pipes : pipe. recv ( ) # don't allow any process to proceed unless all pro... | [
-0.3440065085887909,
-0.501617968082428,
0.6604191660881042,
0.1374165266752243,
0.6862974166870117,
-0.12732651829719543,
0.030830495059490204,
0.3692339062690735,
-0.16018682718276978,
0.5089316368103027,
0.14093933999538422,
1.1543458700180054,
-0.758275032043457,
1.0603437423706055,
... |
def _ _ mod _ _ ( self, values ) : returnobject = self. clone ( ) if hasattr ( values,'values') and callable ( values. values ) : keys = values. keys ( ) sequence = values. values ( ) elif hasattr ( values,'_ _ getitem _ _') and \ not isinstance ( values, str ) : keys = none sequence = list ( values ) else : keys = non... | [
-0.8698124289512634,
0.19797591865062714,
0.8758163452148438,
-0.004499214235693216,
-0.4217674732208252,
-0.5473116636276245,
0.0032696647103875875,
-0.23540709912776947,
0.7374275922775269,
0.08087251335382462,
0.030299801379442215,
-0.23848049342632294,
-0.6549015045166016,
0.0940912663... |
def _ _ init _ _ ( self, status _ code, resp _ content ) : # todo : contact oanda to inform about this bug # these checks are necessary because right now, oanda api is buggy if resp _ content : if " errorcode " in resp _ content : code = resp _ content [ " errorcode " ] else : code = " " if " errormessage " in resp _ c... | [
-0.34225019812583923,
-1.2383100986480713,
0.6397753357887268,
-0.639401376247406,
0.15693432092666626,
-0.04560626298189163,
-0.35968470573425293,
0.27450239658355713,
0.43420812487602234,
-0.40591666102409363,
0.7976570725440979,
-0.2663262188434601,
-0.4685077965259552,
0.45486065745353... |
def create _ hero ( hero _ name, universe ) : hero = hero ( ) hero. name = hero _ name hero. description ='{ 0 } description '. format ( hero _ name ) hero. universe = universe hero. save ( ) return hero | [
0.32571539282798767,
-0.5831053853034973,
0.5789289474487305,
0.2032037079334259,
0.42566296458244324,
0.5762568712234497,
-1.8622674942016602,
1.1592388153076172,
-0.4719463884830475,
-0.09026546031236649,
-0.5468888282775879,
0.7020537853240967,
-0.7520498037338257,
0.09010903537273407,
... |
def generate _ page _ load _ template ( specifics : dict, placeholders : dict, * * kwargs ) - > dict : template = generate _ generic _ template ( specifics = specifics, placeholders = placeholders ) template ['action - type'] ='load'return template | [
-0.7921098470687866,
0.19371949136257172,
0.30898070335388184,
-0.9583665132522583,
-0.13202756643295288,
0.22981178760528564,
-1.0340825319290161,
-0.05857855826616287,
0.2185508906841278,
1.0959670543670654,
-0.4346773028373718,
-0.1262519359588623,
0.3135770261287689,
-0.162454545497894... |
def allowed _ paths ( self, allowed _ paths : confignodepropertyarray ) : self. _ allowed _ paths = allowed _ paths | [
0.06981849670410156,
-0.0864029973745346,
-0.13644614815711975,
1.4535088539123535,
-0.696175217628479,
1.289149284362793,
1.0770680904388428,
0.7951021790504456,
-0.23408134281635284,
-0.26291996240615845,
0.044819679111242294,
-0.09648948907852173,
0.11141955107450485,
-0.456967890262603... |
def receive ( self, sender, * * kwargs ) : self. volatile _ args = self. args self. sender = sender self. instance = self. get _ instance ( sender, * * kwargs ) | [
0.1267879754304886,
-0.300441712141037,
0.40299299359321594,
-0.5041110515594482,
0.24592986702919006,
-0.3236469030380249,
-0.5151523351669312,
0.6278200745582581,
-0.3345141112804413,
0.2878410220146179,
-1.196462631225586,
0.4288584589958191,
-0.38023436069488525,
0.21249809861183167,
... |
def ref _ seq ( ) : allowed _ str _ args = ['accession ','hgnc _ symbol'] allowed _ int _ args = ['limit ','hgnc _ identifier'] args = get _ args ( request _ args = request. args, allowed _ int _ args = allowed _ int _ args, allowed _ str _ args = allowed _ str _ args ) return jsonify ( query. ref _ seq ( * * args ) ) | [
-1.3552048206329346,
-0.07841423898935318,
0.41657453775405884,
-0.28371599316596985,
0.265939325094223,
-0.8645380735397339,
0.19795852899551392,
-0.998040497303009,
-0.5531900525093079,
1.3443629741668701,
0.12740148603916168,
0.7869902849197388,
-0.2370244711637497,
0.32600393891334534,... |
def gensummary ( self, request, context ) : logger. info ('server gensummary : % s ', request ) depth = request. depth if depth is 0 : return gensummaryresponse ( ) jnsaf _ client = none if self. _ call _ jnsaf : jnsaf _ client = jnsafclient ( grpc. insecure _ channel ('% s : % s'% ( self. _ jnsaf _ address, self. _ jn... | [
-1.213111162185669,
0.8479764461517334,
0.9126914143562317,
-0.5680042505264282,
-0.025403793901205063,
-0.6269772052764893,
0.5311015248298645,
-1.0122880935668945,
0.12152237445116043,
-0.06592466682195663,
0.48813772201538086,
0.08160116523504257,
-0.18037386238574982,
0.439010888338089... |
def add _ fmesh _ from _ scdmesh ( self, sm ) : # we get the coarse intervals and the number of steps in each interval ( xcoarse, xsteps ) = _ get _ coarse _ and _ intervals ( sm. getdivisions ( " x " ) ) ( ycoarse, ysteps ) = _ get _ coarse _ and _ intervals ( sm. getdivisions ( " y " ) ) ( zcoarse, zsteps ) = _ get _... | [
0.4562973976135254,
-0.07234890758991241,
0.8107925653457642,
-0.1884826123714447,
-0.21619103848934174,
-0.4613970220088959,
-1.0243912935256958,
-0.4104059934616089,
-0.03720555081963539,
-0.3523876667022705,
0.09980307519435883,
0.41410335898399353,
-0.22244979441165924,
1.4679014682769... |
def _ load _ rei _ restrictions ( self, measure _ ids ) : # get cause / reis that exist in paf output existing _ reis = self. _ get _ rei _ from _ paf _ output ( ) # get causes that exist in codcorrect output cc _ output = self. _ get _ causes _ from _ cc _ output ( ) # get causes that exist in como output como _ outpu... | [
0.24274730682373047,
-0.48525795340538025,
0.7221553921699524,
-0.6252753734588623,
-0.8951441049575806,
-0.24104447662830353,
0.07831752300262451,
-0.24695149064064026,
-0.33434581756591797,
0.2959095537662506,
0.01019599474966526,
0.3079158067703247,
0.3367048501968384,
0.013079874217510... |
def collect _ pfam _ domain _ description ( self, file ) : data = { } with open ( file ) as inputfile : for line in inputfile : try : one _ line = line. strip ( ). split ( " @ " ) domena = one _ line [ 0 ] pre _ family = one _ line [ 1 ] [ 8 : ] delete _ this = " ( " + domena. upper ( ) + " ) " family = pre _ family. r... | [
-0.6559943556785583,
-0.14808909595012665,
0.5252847671508789,
-0.9207969307899475,
-1.0059022903442383,
0.41978323459625244,
0.08337244391441345,
0.4329463839530945,
-1.0372129678726196,
0.1819877028465271,
-0.6431239247322083,
0.41330358386039734,
0.7676270008087158,
1.1490647792816162,
... |
def test _ 00 _ directory ( self ) : api _ obj = self. image _ create ( self. rurl ) # the dest _ dir's installed path. dest _ dir _ name = " dir " dir10 _ pfmri = self. plist [ dest _ dir _ name ] [ 0 ] dest _ dir = os. path. join ( self. get _ img _ path ( ), dest _ dir _ name ) # first, verify that install won't fai... | [
-0.511523425579071,
-0.2554221451282501,
0.5058876276016235,
-0.17376509308815002,
1.4546189308166504,
-0.6357027292251587,
1.1294488906860352,
0.48886191844940186,
0.4321480691432953,
0.05720888823270798,
-0.1302526444196701,
-0.22426147758960724,
0.5240862369537354,
0.7258993983268738,
... |
def rescale ( x, low = - 1, high = 1 ) : spread = high - low arr = normalise ( x ) return arr * spread + low | [
0.20713362097740173,
-0.30762016773223877,
0.5826631188392639,
0.2754012644290924,
-0.6102265119552612,
-0.028621023520827293,
-1.1638169288635254,
0.0663023367524147,
0.7289324402809143,
-0.15573187172412872,
0.08908545970916748,
0.5806675553321838,
-0.5407997369766235,
-0.683131515979766... |
def get _ content _ type ( self, allowed _ content _ types ) : if " content - type " not in self. headers : raise exception. invalidcontenttype ( content _ type = none ) content _ type = self. content _ type if content _ type not in allowed _ content _ types : raise exception. invalidcontenttype ( content _ type = cont... | [
0.8597092032432556,
-0.21691980957984924,
0.5942077040672302,
0.5198891162872314,
-0.35032176971435547,
-0.2008887231349945,
-0.22668547928333282,
-1.2484217882156372,
-0.21152743697166443,
0.03778911754488945,
1.1081198453903198,
0.5536670684814453,
-1.5165547132492065,
-0.429925531148910... |
def _ on _ model _ save ( sender, * * kwargs ) : _ update _ search _ index ( kwargs. get ('instance'),'index') | [
-1.5464704036712646,
-0.19453741610050201,
0.3338368535041809,
-0.4800109267234802,
0.6114281415939331,
0.01331203430891037,
0.47207555174827576,
-0.2789935767650604,
-0.428555428981781,
1.2640763521194458,
-1.5624315738677979,
-0.32076892256736755,
0.02574356272816658,
-0.2220237255096435... |
def _ remapfeaturesandprunescripts ( table, featureremap ) : scriptstodelete = [ ] for scriptindex, script in enumerate ( table. scriptlist. scriptrecord ) : defaultlangsys = script. script. defaultlangsys _ remaplangsys ( defaultlangsys, featureremap ) langsysrecordstodelete = [ ] for langsysrecordindex, langsysrec in... | [
-0.8509261012077332,
-0.5098202228546143,
0.7990709543228149,
0.17298287153244019,
-0.1943218857049942,
-0.6967321634292603,
-0.13975632190704346,
0.4661698043346405,
0.8296405076980591,
-0.19425471127033234,
-0.3446578085422516,
0.2144228219985962,
-0.473889023065567,
0.7240080833435059,
... |
def fjernfilm ( dic, tittel ) : dic. pop ( tittel ) | [
-0.04095444455742836,
-0.18025954067707062,
0.14977900683879852,
-0.7477684020996094,
-1.3137139081954956,
0.45214569568634033,
-0.12561728060245514,
0.32694393396377563,
-0.7388636469841003,
1.3914976119995117,
-0.3660598397254944,
0.7913360595703125,
0.4020688533782959,
0.016098100692033... |
def force _ build ( server, buildname, debug = false ) : url = server + " / builders / " + buildname + " / force " if debug : print ( " url is % s ", url ) f = urllib. urlopen ( url ) return f | [
-1.142449975013733,
-0.2127866894006729,
0.3993441164493561,
0.7788626551628113,
0.03027486801147461,
0.10058331489562988,
-0.24083159863948822,
-0.10237240046262741,
-0.4941709637641907,
-0.9540485143661499,
-0.593487024307251,
0.6358045339584351,
-1.3604578971862793,
0.6245027184486389,
... |
def df _ load ( path ) : df = tier _ pull. read _ xlsx _ file ( path + " \ lc _ counterparty _ analysis. xlsx ", " performance " ) df _ ranking = tier _ pull. read _ xlsx _ file ( path + " \ lc _ counterparty _ analysis. xlsx ", " tier ranking " ) df _ tier _ change = tier _ pull. read _ xlsx _ file ( path + " \ lc _ c... | [
0.15346583724021912,
0.3844805061817169,
0.5338302850723267,
-0.9920799136161804,
-0.014626454561948776,
0.0830017700791359,
0.044141985476017,
0.09852658212184906,
-1.080539584159851,
-0.309685081243515,
0.47463488578796387,
0.3784383535385132,
-0.24690230190753937,
-1.1707602739334106,
... |
def cli ( cli _ context, config, provider ) : cli _ context. obj ['provider'] = provider if os. path. exists ( config ) : with open ( config ) as f : raw _ config = yaml. safe _ load ( f ) config _ map = normalize _ keys ( config _ to _ click ( raw _ config ) ) cli _ context. default _ map = config _ map else : if conf... | [
-0.6080867648124695,
-0.3032926321029663,
0.6538098454475403,
0.25505325198173523,
0.5175076127052307,
-0.1984771192073822,
0.7091655731201172,
0.6498020887374878,
0.3943878710269928,
0.5690248608589172,
-0.3794783651828766,
0.4100310802459717,
1.1601216793060303,
0.1590961515903473,
0.1... |
def talk ( self ) : return f " { self. name } says : meow! " | [
0.255683571100235,
-0.429500013589859,
0.46130600571632385,
-0.835111141204834,
-0.02105376496911049,
0.7139720916748047,
-1.2972733974456787,
-0.8089143633842468,
-0.25026264786720276,
-0.35069987177848816,
0.41003885865211487,
0.6719127893447876,
0.3035736083984375,
0.017042648047208786,... |
def create _ layers _ from _ paths ( names, separator = " : : " ) : for name in names : create _ layers _ from _ path ( name, separator = separator ) | [
-0.2223374843597412,
-0.18138422071933746,
0.41614705324172974,
0.9677114486694336,
0.1561942845582962,
0.9250718951225281,
-0.09746566414833069,
-0.9731757640838623,
-0.5067861080169678,
0.26882895827293396,
-0.6276239156723022,
-1.1144088506698608,
0.3971529006958008,
0.5025651454925537,... |
def featurize ( tokens, feature _ fns ) : feats = defaultdict ( lambda : 0 ) for f in feature _ fns : f ( tokens, feats ) return sorted ( feats. items ( ), key = lambda x : ( x [ 0 ], x [ 1 ] ), reverse = false ) pass | [
-0.2978915572166443,
-0.035808928310871124,
0.5478408336639404,
0.6053341627120972,
0.33739012479782104,
-1.56660795211792,
-0.6046915054321289,
0.6576249599456787,
-0.8927792310714722,
-0.7934897541999817,
-1.3800370693206787,
0.20648193359375,
-0.015912475064396858,
0.0009277926292270422... |
def op0 ( i, j ) : if j < i or ( j = = i and i = = 0 ) : i0 = 0 elif j = = i and i! = 0 : i0 = np. log ( ( ( ( 2 * j + 1 ) * * 2 - 4 * i * * 2 ) * * 0. 5 + 2 * j + 1 ) / ( 2 * j ) ) / ( 2 * np. pi ) elif j > i : i0 = np. log ( ( ( ( 2 * j + 1 ) * * 2 - 4 * i * * 2 ) * * 0. 5 + 2 * j + 1 ) / ( ( ( 2 * j - 1 ) * * 2 - 4 ... | [
0.08692236989736557,
-0.16563592851161957,
0.8420414328575134,
-0.281301349401474,
-0.7314704060554504,
-0.21745987236499786,
0.8548101782798767,
-0.5124088525772095,
-0.22628068923950195,
0.9649722576141357,
-0.1536710113286972,
-0.10093938559293747,
-0.7887486815452576,
-0.22151330113410... |
def _ check _ creds ( self ) : return self. _ api ( " / placebo " ) | [
-0.705260157585144,
0.6324619054794312,
0.19865159690380096,
0.3077433407306671,
0.005560548510402441,
-0.08052238076925278,
-1.2040101289749146,
0.13656555116176605,
-1.0484411716461182,
0.6406532526016235,
0.20964249968528748,
0.14208273589611053,
-1.2982736825942993,
-0.4115660786628723... |
def totree ( self ) : return self. _ totree ( ) | [
0.15007391571998596,
0.20068877935409546,
0.2936653792858124,
-0.391961932182312,
0.10057327151298523,
-0.1636819839477539,
-0.1928415298461914,
-0.6600783467292786,
0.7510386109352112,
-0.5522807836532593,
-0.6453554630279541,
0.5409327149391174,
-0.7597479224205017,
0.20563550293445587,
... |
def get _ lower _ param _ desc ( self ) : sub _ param _ desc = " " for inp in self. tool _ inp _ desc [ " inputs " ] : tool _ inp = toolinput ( inp, self. wf _ param _ values, self. wf _ steps, self. level + 1 ) sub _ param _ desc + = tool _ inp. get _ formatted _ desc ( ) return sub _ param _ desc | [
0.7008428573608398,
-0.6154313683509827,
0.4142017066478729,
-0.6061485409736633,
0.38533541560173035,
0.6274521350860596,
0.5516168475151062,
-1.053928017616272,
-1.457916021347046,
-0.5181092619895935,
0.3571285009384155,
1.4921724796295166,
-0.10939282178878784,
0.9399049282073975,
-1... |
def make _ event ( activity _ id ) : if flask. request. method = ='post': new _ event = models. event ( name = flask. request. form ['name'], activity _ id = activity _ id, user _ id = get _ user _ id ( user _ email = flask. session ['email'] ) ) valid, messages, new _ event = set _ event _ fields ( new _ event ) if no... | [
0.5538231730461121,
0.3444526493549347,
0.7841794490814209,
0.8792387247085571,
0.31293147802352905,
0.6671620607376099,
0.7872203588485718,
0.2888597249984741,
0.13837748765945435,
-0.05285491794347763,
0.7632126808166504,
-0.3599349856376648,
0.04075406864285469,
0.3927745819091797,
0.... |
def _ _ getitem _ _ ( self, key : union [ int, slice, str ] ) - > union [ dict, list ] : return self. _ getitem ( key, format _ type = self. _ format _ type, format _ columns = self. _ format _ columns, output _ all _ columns = self. _ output _ all _ columns, format _ kwargs = self. _ format _ kwargs, ) | [
-1.1366337537765503,
-0.1482304334640503,
0.5126322507858276,
0.07748380303382874,
-0.5210638642311096,
-1.4636121988296509,
-0.6558968424797058,
-0.5942316651344299,
-0.25155505537986755,
0.17058555781841278,
0.682456910610199,
0.44217947125434875,
0.966116726398468,
0.4036058485507965,
... |
def var _ normed ( self ) : return self. moment _ normed ( 2 ) - self. moment _ normed ( 1 ) * * 2 | [
0.46281158924102783,
-0.9361183047294617,
0.3156994581222534,
0.1089792549610138,
-0.7597697973251343,
0.09460948407649994,
0.5767431259155273,
-0.8750860691070557,
-0.01706196367740631,
-0.26799848675727844,
-0.42362213134765625,
1.3032290935516357,
-0.4027634561061859,
0.6323459148406982... |
def tts ( model, text, p = 0, speaker _ id = none, fast = false ) : if use _ cuda : model = model. cuda ( ) model. eval ( ) if fast : model. make _ generation _ fast _ ( ) sequence = np. array ( _ frontend. text _ to _ sequence ( text, p = p ) ) sequence = variable ( torch. from _ numpy ( sequence ) ). unsqueeze ( 0 ).... | [
0.22675251960754395,
-0.21326293051242828,
0.8772963285446167,
-0.07952917367219925,
-1.064843773841858,
-0.8609907627105713,
-0.8984540104866028,
0.23386381566524506,
-0.3982890248298645,
0.49079835414886475,
-0.2629591226577759,
-0.0275871679186821,
-0.25543442368507385,
-0.0651495456695... |
def authorizeenvironment ( ) : client = apis. getclientinstance ('cloudshell ','v1alpha1') messages = apis. getmessagesmodule ('cloudshell ','v1alpha1') # load creds and refresh them if they're about to expire creds = store. loadifenabled ( ) if creds is not none and creds. token _ expiry - creds. token _ expiry. utcno... | [
0.1996062844991684,
-0.1139468252658844,
0.600959837436676,
0.7352070212364197,
0.7390137910842896,
0.23019884526729584,
0.1961727738380432,
-0.08910681307315826,
-0.4122716188430786,
0.04402003064751625,
0.30282455682754517,
1.3187867403030396,
-0.2962314784526825,
1.0262987613677979,
0... |
def quarter ( self, qtr ) : pass # todo : implement quarter marker | [
-0.31395506858825684,
-1.473132610321045,
0.3807311952114105,
-0.20272505283355713,
0.1471647024154663,
0.5082557797431946,
1.759691834449768,
-0.5977091193199158,
0.5941556096076965,
-0.6363310217857361,
-0.3557131588459015,
0.00724458321928978,
0.5224596858024597,
-0.14224949479103088,
... |
def validate ( self ) : self. model. eval ( ) t = time ( ) with torch. no _ grad ( ) : for step, sample in enumerate ( self. val _ loader ) : val _ loss = self. val _ step ( sample ) self. val _ losses. append ( val _ loss ) if self. rank = = 0 : # log average loss on validation set mean _ val _ loss = np. mean ( self.... | [
-0.4054158627986908,
-0.49415692687034607,
0.5038570165634155,
0.23663324117660522,
0.4456704556941986,
0.48310840129852295,
-0.17396314442157745,
-0.22951264679431915,
-1.0119259357452393,
-0.16900520026683807,
0.20073044300079346,
0.36240342259407043,
0.9940303564071655,
1.27077734470367... |
def test _ empty _ array _ invalid ( self ) : self. assertraises ( validationerror, validate, [ ], rest _ schemas. create _ webhooks _ request ) | [
0.331283301115036,
0.3406910002231598,
0.40879860520362854,
0.7391800284385681,
1.1178531646728516,
1.087213158607483,
-0.6021557450294495,
0.09119676798582077,
-0.10732012242078781,
-0.5659648180007935,
-0.28889718651771545,
0.6720568537712097,
-0.7083168625831604,
1.0574374198913574,
0... |
def get _ lower _ case _ dict ( value _ list ) : lower _ case _ map = dict ( ) for value in value _ list : lower _ case _ map [ value. lower ( ) ] = value return lower _ case _ map | [
-0.009955951943993568,
-0.6548200845718384,
0.2637878954410553,
-0.2578803598880768,
0.04126119986176491,
-0.020327795296907425,
-0.37711837887763977,
0.2060270607471466,
0.002921225968748331,
0.16748355329036713,
-0.7991657853126526,
-0.6959564685821533,
-0.6868667602539062,
1.23287189006... |
def parse _ arguments ( ) : # usage = " usage : % ( prog ) s [ options ] < message file > " + description parser = argumentparser ( ) parser. add _ argument ('- v ','- - version ', action ='version ', version = version ) parser. add _ argument ('input _ file ', metavar ='input _ file ', help ='input file') return parse... | [
0.4234129786491394,
-0.3626405894756317,
0.4095071852207184,
-0.39310911297798157,
0.7020105123519897,
0.28611308336257935,
-0.3083958923816681,
0.6170217394828796,
-0.8568435311317444,
0.4816776514053345,
0.3410678505897522,
0.270978718996048,
-0.7646218538284302,
0.7609319090843201,
-0... |
def _ _ init _ _ ( self, id _ piste, aeroport, length _ ft, le _ identificateur, le _ seuil _ decale _ ft, he _ identificateur, he _ seuil _ decale _ ft ) : self. _ id = id _ piste self. _ aeroport = aeroport self. _ length _ ft = length _ ft self. _ le _ identificateur = le _ identificateur self. _ le _ seuil _ decale... | [
0.3483371138572693,
-0.2912382185459137,
0.27820953726768494,
-0.7401871085166931,
0.49998900294303894,
0.2003801167011261,
-0.7267025113105774,
-0.14738890528678894,
-0.4105837643146515,
-0.8958574533462524,
-0.7986140251159668,
-0.7444872856140137,
0.26831915974617004,
-0.274131268262863... |
def travisbuild ( self, irc, msg, args, optrepo ) : # make sure we're authenticated. if not self. travisauth : irc. reply ( " error : you must be authenticated with travis first. set plugins. travis. githubtoken with your key, reload and try again. " ) return # now lets try this. t = self. travisauth # lets use shortha... | [
0.3409722149372101,
-0.2059677094221115,
0.49142926931381226,
0.5589231252670288,
0.6426485180854797,
-0.21320250630378723,
0.19885408878326416,
0.43704214692115784,
-0.10703013837337494,
-0.14978548884391785,
-0.5240765810012817,
0.2389230877161026,
-0.48381054401397705,
-1.65466845035552... |
def multiplicativecausalattention ( d _ feature, n _ heads = 1, sparsity = none, dropout = 0. 0, max _ inference _ length = 2048, mode ='train') : sparsity = n _ heads if sparsity is none else sparsity return tl. configurableattention ( factoreddense ( sparsity, d _ feature, d _ feature ), factoreddense ( sparsity, d _... | [
0.5662573575973511,
0.09860815107822418,
0.8180499076843262,
-0.21613673865795135,
-0.8386247158050537,
-0.626833975315094,
0.5976430773735046,
0.7397408485412598,
1.2772283554077148,
0.1685865819454193,
-0.048669811338186264,
0.01685277931392193,
0.5649523735046387,
0.2682305574417114,
... |
def _ _ init _ _ ( self, comparer ) : self. comparer = comparer | [
0.5872465968132019,
-1.5521334409713745,
0.1750437468290329,
0.42009127140045166,
-1.0849109888076782,
0.49500319361686707,
0.16790667176246643,
0.03594047203660011,
0.27655401825904846,
-0.5488976836204529,
0.006412585731595755,
-0.24558332562446594,
-0.10122493654489517,
1.82944416999816... |
def time2gyr ( self, times, zred _ now = none, aexp _ now = none ) : if not zred _ now and not aexp _ now : zred _ now = self. zred _ now else : zred _ now = self. zred _ now aexp _ now = self. aexp _ now fd = np. where ( times < min ( self. cosmo _ table. tu ) ) [ 0 ] if len ( fd ) > 0 : ctime2 = times ctime2 [ fd ] =... | [
-0.9599992632865906,
0.15006901323795319,
0.7565246224403381,
-0.4421444535255432,
0.11414116621017456,
0.42682331800460815,
-0.13139885663986206,
0.4670755863189697,
-0.8329931497573853,
0.8130048513412476,
0.42398351430892944,
0.0008914094069041312,
-0.10701495409011841,
1.23178935050964... |
def create _ lv _ snapshot ( self, name, source _ lv _ name, lv _ type ='default') : source _ lvref = self. get _ volume ( source _ lv _ name ) if source _ lvref is none : log. error ( _ le ( " trying to create snapshot by non - existent lv : % s " ) % source _ lv _ name ) raise exception. volumedevicenotfound ( device... | [
-0.1375672072172165,
0.3071708679199219,
0.6040310263633728,
-0.6201845407485962,
-0.5452646017074585,
0.5892547965049744,
-0.5157246589660645,
-0.45099741220474243,
0.16597798466682434,
0.19515816867351532,
-0.41408661007881165,
0.20402005314826965,
0.18935714662075043,
0.0823401808738708... |
def login _ view ( request, template _ name ='accounts / login. html ', redirect _ field _ name = redirect _ field _ name, authentication _ form = authenticationform ) : redirect _ to = request. post. get ( redirect _ field _ name, request. get. get ( redirect _ field _ name,'' ) ) if request. method = = " post " : for... | [
-0.4923849403858185,
0.09523758292198181,
0.5662600994110107,
0.1637638509273529,
-0.8990155458450317,
0.11491502076387405,
0.31368210911750793,
0.19941984117031097,
0.7886006832122803,
-0.7176157236099243,
0.3274480998516083,
-0.19590619206428528,
0.5991876125335693,
-0.40367504954338074,... |
def email ( self, email ) : if email is not none and len ( email ) > 100 : raise valueerror ( " invalid value for ` email `, length must be less than or equal to ` 100 ` " ) # noqa : e501 self. _ email = email | [
-0.3133391737937927,
0.9515116214752197,
-0.007693951483815908,
0.5753592252731323,
-0.03681227192282677,
0.5362157821655273,
0.4392761290073395,
0.7150901556015015,
-0.18714353442192078,
-0.031591977924108505,
-0.01638980396091938,
-0.09880360215902328,
0.147519052028656,
-0.3368831276893... |
def _ _ init _ _ ( self ) : self. dict = { } self. nums = [ ] | [
-0.29500988125801086,
-0.42432379722595215,
0.28584644198417664,
-0.6660676002502441,
0.05998587608337402,
-0.06804584711790085,
0.1415158063173294,
1.4067540168762207,
0.035875529050827026,
-0.6160585880279541,
-1.150118112564087,
0.002104060724377632,
0.5280949473381042,
0.97081774473190... |
def obtener _ total _ ventas _ de _ paquetes _ de _ miembro ( miembro _ id, last _ month = true ) : miembro = user. objects. get ( id = miembro _ id ) total = 0. 0 ventas _ paquetes = ventapaquetebid. objects. filter ( en _ red _ de _ usuario = miembro, confirmada = true ) # buscar solo las ventas ocurridas a partir de... | [
0.9727362990379333,
-0.44162070751190186,
0.8393474817276001,
0.8858142495155334,
0.024023573845624924,
0.1145985797047615,
0.1621139794588089,
-0.00510889058932662,
0.7549582123756409,
0.6363530158996582,
-0.3841639757156372,
-0.18455106019973755,
-0.5513361096382141,
-0.03287551179528236... |
def get _ all _ values ( self ) : sizerg = range ( len ( self. value ) ) return ( self. value [ f ] [ t ] for f in sizerg for t in sizerg ) | [
-0.5111914873123169,
0.41891050338745117,
0.3842601776123047,
0.1809024065732956,
0.6825237274169922,
-0.05602056160569191,
-0.8673420548439026,
-0.09377355873584747,
-0.9507859945297241,
-0.41368481516838074,
-0.4160454571247101,
0.04894597455859184,
-0.2379414141178131,
1.047345757484436... |
def karatsuba ( x, y ) : if ( x < 10 ) or ( y < 10 ) : return x * y # get minimum size n = min ( int ( math. log10 ( x ) ) + 1, int ( math. log10 ( y ) ) + 1 ) n2 = n / / 2 a = int ( x / 10 * * n2 ) b = int ( x % 10 * * n2 ) c = int ( y / 10 * * n2 ) d = int ( y % 10 * * n2 ) ac = karatsuba ( a, c ) bd = karatsuba ( b,... | [
0.1950259953737259,
0.6518941521644592,
0.8827376961708069,
-0.936744749546051,
-0.7251090407371521,
-0.36447420716285706,
0.22893603146076202,
-0.8951839804649353,
0.16829432547092438,
0.3618841767311096,
-0.35913535952568054,
0.8822059035301208,
-0.11672817170619965,
-0.7788758873939514,... |
def fit ( self, data _ mat, k = 10 ) : self. data _ mat = data _ mat self. num _ item = data _ mat. shape [ 1 ] self. num _ user = data _ mat. shape [ 0 ] self. k = k # if rating matrix doesn't have enough datapoints, we lower down k valuee k = min ( k, self. num _ user ) self. knn = nearestneighbors ( metric = self. s... | [
0.5758689045906067,
1.328595519065857,
0.47548022866249084,
1.0380710363388062,
0.14611242711544037,
0.4713224470615387,
0.04305948689579964,
0.3460890054702759,
-0.9665005207061768,
0.19485323131084442,
-0.5229270458221436,
0.25878408551216125,
-0.37267133593559265,
-0.3868773877620697,
... |
def comms _ kill _ all ( self ) : for dev in indigo. devices. itervalues ( " self " ) : try : indigo. device. enable ( dev, value = false ) except exception as sub _ error : self. logger. critical ( u " exception when trying to kill all comms. error : { 0 } ( line { 1 } ) ". format ( sub _ error, sys. exc _ traceback. ... | [
-0.2255953848361969,
-0.16241203248500824,
0.6282219886779785,
0.1690434366464615,
0.7876752018928528,
0.41960397362709045,
0.5116913318634033,
0.09299441426992416,
-0.810060977935791,
0.020886288955807686,
0.20519790053367615,
-0.315585196018219,
-1.61015784740448,
0.29664769768714905,
... |
def isomorphs ( a ) : iso = set ( ) aa = a + a for i in range ( len ( a ) ) : part = tuple ( aa [ i : i + len ( a ) ] ) iso. add ( part ) e = [ not x for x in a ] ee = e + e for i in range ( len ( a ) ) : part = tuple ( ee [ i : i + len ( a ) ] ) iso. add ( part ) return iso | [
-0.4664846658706665,
0.5385286808013916,
0.7560856342315674,
-0.28612014651298523,
-0.6176410913467407,
0.6453360319137573,
0.979064404964447,
0.2831774055957794,
1.1341660022735596,
1.1829845905303955,
-0.074355848133564,
-0.7399329543113708,
-0.10665638744831085,
-0.689035952091217,
-0... |
def cascade _ tree _ nodes ( self, node ) : if node. item _ data ['parentid'] = ='zero': # # base case if not node. is _ open : self. treeview. toggle _ node ( node ) # # toggles root node else : # # toggles from deepest node up until it reaches root node self. cascade _ tree _ nodes ( self. pcd _ tree. nodes _ dict [ ... | [
-0.39061200618743896,
-0.1470297873020172,
0.7828184962272644,
0.21732093393802643,
0.2373962551355362,
0.6547080278396606,
-0.08415178954601288,
0.76402747631073,
0.583828330039978,
0.25470244884490967,
0.8445863723754883,
0.8026939630508423,
-0.2708151340484619,
0.887198269367218,
-0.3... |
def movement _ speed ( self ) : return data. movement _ speed [ self. tid ] | [
0.2073415070772171,
0.05334059149026871,
0.16635756194591522,
0.8202844858169556,
0.07747025787830353,
0.48325949907302856,
0.08362925797700882,
-0.8028062582015991,
-0.48522353172302246,
0.5336601734161377,
0.1579618752002716,
0.3570569157600403,
0.17566490173339844,
0.09809573739767075,
... |
def _ check _ aliens _ bottom ( self ) : screen _ rect = self. screen. get _ rect ( ) for alien in self. aliens. sprites ( ) : if alien. rect. bottom > = screen _ rect. bottom : # treat this the same as if the ship got hit. self. stats. game _ active = false self. stats. reset _ stats ( ) self. sb. prep _ score ( ) sel... | [
-0.2765469253063202,
-0.40675801038742065,
0.6633351445198059,
0.28761062026023865,
1.1659443378448486,
-0.31344714760780334,
0.0806063711643219,
-1.2440588474273682,
-0.03370710834860802,
0.3822464346885681,
0.10159321874380112,
0.5642238855361938,
-0.11176349967718124,
0.4494300782680511... |
def linux _ read _ table ( infile ) : if infile is none : infile = " / usr / include / linux / input - event - codes. h " with open ( infile, " rb " ) as fp : text = fp. read ( ) for m in re. finditer ( rb " # define \ s + key _ ( \ w + ) \ s + ( \ w + ) ", text ) : if not m. group ( 2 ). startswith ( b " key _ " ) : y... | [
-0.12146210670471191,
-0.39714208245277405,
0.7370535731315613,
0.34794938564300537,
-1.4360073804855347,
-0.41478538513183594,
-0.27394410967826843,
0.4998331367969513,
-1.8310596942901611,
0.31512999534606934,
-0.3218405246734619,
0.07733773440122604,
-0.5449883341789246,
0.8347585797309... |
def get _ commerce _ profit ( self, sell _ price, buy _ price = 0 ) : listing _ fee = max ( round ( ( sell _ price / 100 ) * 5 ), 1 ) exchange _ fee = max ( round ( ( sell _ price / 100 ) * 10 ), 1 ) profit = sell _ price - listing _ fee - exchange _ fee - buy _ price return { " fee " : listing _ fee, " tax " : exchang... | [
-0.4219515025615692,
-0.3094969391822815,
0.545160710811615,
0.28552502393722534,
0.5011454224586487,
-0.9582343697547913,
-0.1880270540714264,
-0.03709785267710686,
0.1490401029586792,
0.9956291913986206,
-0.42865079641342163,
0.10799643397331238,
-0.20433470606803894,
-0.3577165007591247... |
def _ api _ get _ recipe ( self, recipe _ id ) : # format the request uri query _ params = { " key " : self. _ api _ key, " rid " : recipe _ id } api _ request = self. _ api _ uri + " get? " + urlencode ( query _ params ) # make the request return self. _ make _ api _ request ( api _ request ) | [
-0.8284777998924255,
0.32808688282966614,
0.39086344838142395,
-0.18504910171031952,
0.5722591876983643,
-1.1653084754943848,
-0.9760756492614746,
0.290939062833786,
-0.18418489396572113,
0.049852900207042694,
0.5959091782569885,
0.8681309223175049,
-0.42520394921302795,
-0.272576451301574... |
def _ _ init _ _ ( self, k = 6, force _ undirected = true ) : self. k = k self. force _ undirected = force _ undirected | [
0.11657360941171646,
0.5310592651367188,
0.5093361735343933,
0.5076265931129456,
-0.051097333431243896,
0.389861136674881,
0.5446163415908813,
0.9825577139854431,
0.11150366067886353,
-0.27533087134361267,
-0.5656882524490356,
-0.7348694205284119,
0.4216606318950653,
0.32834118604660034,
... |
def rootify ( self, names, items _ raw, types ) : assert len ( items _ raw ) = = len ( types ) items = [ ] for name, item _ raw, type in zip ( names, items _ raw, types ) : if type = ='i': items. append ( array. array ('i ', [ item _ raw ] ) ) elif type = ='f': items. append ( array. array ('f ', [ item _ raw ] ) ) els... | [
-1.008371114730835,
-0.18636205792427063,
0.5430217981338501,
-0.08652886748313904,
0.6906762719154358,
-0.5232436656951904,
-0.7621178030967712,
-0.3000947833061218,
-0.6085993051528931,
0.08874385058879852,
-0.6754855513572693,
0.07465216517448425,
-0.14864328503608704,
0.007433284539729... |
def display ( self, ) : time. sleep ( update _ rate _ seconds ) for ypixel in range ( 0, 8 ) : for xpixel in range ( 0, 8 ) : self. iterations + = 1 if self. iterations > = 4 : self. iterations = 1 reg = self. fib3 > > ( 8 * xpixel ) bit = reg & ( 1 < < ypixel ) if bit = = 0 : self. matrix. set _ pixel ( xpixel, ypixel... | [
0.3332478106021881,
0.7140930891036987,
0.5600408315658569,
0.2994076907634735,
0.03200524300336838,
-0.08770740032196045,
0.9261277318000793,
-0.6896809935569763,
0.5997273325920105,
0.7613421678543091,
1.0397077798843384,
0.34627416729927063,
-0.85321444272995,
0.996533989906311,
-0.27... |
def traverse _ postorder ( operation ) : nodes _ postorder = [ ] def recurse ( node ) : if isinstance ( node, operation ) : # if a node is an operation, first visit all its input nodes, before putting itself into the noeds _ postorder [ ] list for input _ node in node. input _ nodes : recurse ( input _ node ) nodes _ p... | [
-0.7746148705482483,
0.528365433216095,
0.7363057732582092,
0.8998038172721863,
-0.5118193030357361,
-0.5178284645080566,
0.9422836303710938,
-0.023385964334011078,
0.454113632440567,
-0.06140590086579323,
-0.35996678471565247,
-0.22654353082180023,
-0.7439858317375183,
0.6168266534805298,... |
def format _ coordinates ( self, position, axes = ('x ','y ','z') ) : return [ axis + self. format _ number ( n ) for axis, n in zip ( axes, position ) ] | [
-0.002398161916062236,
-0.6611481308937073,
0.27234700322151184,
-0.11405439674854279,
0.4041455090045929,
-0.21992872655391693,
-0.28896790742874146,
0.021194737404584885,
0.38897567987442017,
-0.10994981974363327,
-0.1477700173854828,
-0.7017759084701538,
0.437419056892395,
-0.4858704507... |
def get _ tbears _ version ( ) - > str : try : version = pkg _ resources. get _ distribution ('tbears'). version except pkg _ resources. distributionnotfound : version _ path = os. path. join ( project _ root _ path,'version') with open ( version _ path, mode ='r') as version _ file : version = version _ file. read ( )... | [
0.1866716891527176,
-0.3824499249458313,
0.5005960464477539,
-0.3105093836784363,
0.3750525116920471,
1.3511762619018555,
0.42219746112823486,
-0.17629411816596985,
-0.32372039556503296,
1.1634272336959839,
0.3716455399990082,
-0.09190831333398819,
0.05215711519122124,
-0.24600675702095032... |
def unique ( ary, is _ equal _ expr = " a = = b ", extra _ args = [ ], preamble = " ", queue = none, wait _ for = none ) : if len ( ary ) > np. iinfo ( np. uint32 ). max : scan _ dtype = np. uint64 else : scan _ dtype = np. uint32 extra _ args _ types, extra _ args _ values = extract _ extra _ args _ types _ values ( e... | [
-0.12573392689228058,
0.20849427580833435,
0.9458178281784058,
1.003053069114685,
-0.5333561897277832,
-1.1294429302215576,
0.44266483187675476,
-0.19997160136699677,
0.585784912109375,
1.1191307306289673,
-0.4171529710292816,
0.6556003093719482,
0.5335649847984314,
0.19645582139492035,
... |
def fullname ( self ) : if self. name is none : return self. designation else : return self. designation + " ( " + self. name + " ) " | [
0.1515623778104782,
-0.6879189610481262,
0.7462551593780518,
-0.20485155284404755,
-0.5410725474357605,
-0.25097793340682983,
-1.4740183353424072,
0.49734237790107727,
1.0595569610595703,
0.25966861844062805,
0.5162802934646606,
0.4162263870239258,
0.3489823043346405,
1.081040859222412,
... |
def create _ rotor _ wake _ file _ from _ template ( blade _ degens, rotor _ settings : charmrotorsettings, num _ psi, num _ syms, unit _ factor = u. in2ft ) : # get number of blades num _ blades = len ( blade _ degens ) # compute radians per second omega = rotor _ settings. rpm * u. rpm2rad _ s # compute positioning p... | [
0.31912457942962646,
-0.4685835540294647,
0.795876681804657,
-0.1743609458208084,
0.25999021530151367,
0.4055793881416321,
0.655856192111969,
0.5675432085990906,
-0.010522170923650265,
0.41490331292152405,
-0.4739755094051361,
0.26230356097221375,
-0.11462574452161789,
-0.5101011991500854,... |
def add _ suffix ( file, suffix ) : name, ext = os. path. splitext ( file ) return " { } - { } { } ". format ( name, suffix, ext ) | [
1.1166017055511475,
-0.7791293859481812,
0.7806245684623718,
0.0388583205640316,
-0.4270331561565399,
0.6452773809432983,
-1.2727395296096802,
1.1523905992507935,
-0.48076990246772766,
-0.1852474808692932,
-0.19474276900291443,
1.10117769241333,
0.5565305948257446,
-0.2124592661857605,
0... |
def add ( self, key, value, lang = none ) : if not isinstance ( value, literal ) : value = literal ( value, lang = lang ) self. graph. add ( ( self. asnode ( ), key, value ) ) | [
-0.41060417890548706,
0.44275492429733276,
0.37042132019996643,
-0.3748883008956909,
-1.0807439088821411,
0.29052281379699707,
-1.2786848545074463,
0.347861111164093,
-0.23164117336273193,
0.13359910249710083,
0.3072361946105957,
0.17625223100185394,
-0.33992815017700195,
0.035589650273323... |
def add _ pop _ to _ df ( df ) : df _ pop = make _ population _ df ( ) pop _ dict = { } areas = df. areacode. unique ( ) for area in areas : population = ( df _ pop [ df _ pop ['areacode'] = = area ] ). iloc [ 0 ] ['population'] population = population. replace ( ', ','' ) pop _ dict [ area ] = int ( population ) df ['... | [
-0.743329644203186,
0.5766717195510864,
0.7026264667510986,
-0.6529955863952637,
-0.054579973220825195,
0.08641412854194641,
0.37051650881767273,
0.2695237100124359,
0.40440845489501953,
1.416748285293579,
0.3312090337276459,
-0.46904316544532776,
1.2347102165222168,
-0.5191091895103455,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.