text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def core _ application _ stats _ engine ( app _ name = none ) : api _ application = application ( app _ name ) api _ name = api _ application. name core _ application = api _ application. _ agent. application ( api _ name ) return core _ application. _ stats _ engine | [
1.2832181453704834,
-0.19201324880123138,
0.35359665751457214,
-0.1937059909105301,
-0.2708340883255005,
0.14019930362701416,
-0.48801741003990173,
-0.5643147230148315,
0.2673950791358948,
-0.10625939816236496,
1.1630111932754517,
0.057314809411764145,
0.22598421573638916,
0.35032317042350... |
def _ _ len _ _ ( self ) : return self. size | [
0.03221932798624039,
-0.8197373747825623,
0.33238890767097473,
-1.6882963180541992,
0.5660771131515503,
0.24326694011688232,
0.6300705671310425,
0.3039150834083557,
0.9107843637466431,
-1.0374482870101929,
-1.0598574876785278,
-0.33514881134033203,
0.37846866250038147,
-0.44871869683265686... |
def rss ( self, tablename = " default ", page = 1, results _ x _ page = 300, site _ title = " comment system ", site _ link = " http : / / www. myursite. com / ", site _ description = " my desctiption " ) : db = self. boilerplate. db t = current. t request = current. request table _ comments = db [ self. table _ commen... | [
-0.4660000801086426,
0.1589813083410263,
0.576570451259613,
-0.4996210038661957,
-0.006055557634681463,
-0.9613966345787048,
-0.246314138174057,
-0.4488026201725006,
-0.5499195456504822,
0.05249270796775818,
-0.07390306144952774,
0.33501482009887695,
-0.40132930874824524,
0.423778295516967... |
def remove _ from _ instance ( self, context, instance, security _ group _ name ) : neutron = neutronapi. get _ client ( context ) try : security _ group _ id = neutronv20. find _ resourceid _ by _ name _ or _ id ( neutron,'security _ group ', security _ group _ name, context. project _ id ) except n _ exc. neutronclie... | [
-0.11123035848140717,
0.07000131160020828,
0.6883979439735413,
-0.8122349977493286,
-0.11402640491724014,
0.050491634756326675,
0.33983537554740906,
0.1529579758644104,
-0.2598119378089905,
0.9392644166946411,
-0.029895180836319923,
0.7212234139442444,
-1.0280522108078003,
0.16319790482521... |
def on _ deleted ( self, event ) : self. file _ metadata _ cache. remove _ item ( event. src _ path ) | [
0.8102843761444092,
-0.1645432561635971,
0.27073636651039124,
0.11518290638923645,
0.5374325513839722,
0.5051272511482239,
-0.19073794782161713,
1.112998604774475,
-0.2070358246564865,
0.20547720789909363,
-0.2867555022239685,
0.3637557625770569,
0.5801525712013245,
0.009615795686841011,
... |
def clearfield ( self, * args, * * kwargs ) : # real signature unknown pass | [
-0.48088008165359497,
0.4511081576347351,
0.5712332129478455,
0.3219618797302246,
0.10633204132318497,
0.9100553393363953,
0.19583247601985931,
-0.6208775043487549,
-0.47964638471603394,
0.09101501107215881,
-0.49013853073120117,
0.7504208087921143,
-0.7696614861488342,
-0.8115348815917969... |
def close ( self ) : self. _ fileout. close ( ) | [
1.5518702268600464,
-1.1261714696884155,
0.37858861684799194,
-0.7465506792068481,
-0.5066407918930054,
0.9716728925704956,
0.9266324639320374,
0.9931889772415161,
-1.7705339193344116,
-1.7420185804367065,
1.1187400817871094,
0.6001010537147522,
-0.24914602935314178,
1.188990831375122,
0... |
def refund ( self, cr, uid, ids, context = none ) : clone _ list = [ ] line _ obj = self. pool. get ('pos. order. line') refund _ journal = none for order in self. browse ( cr, uid, ids, context = context ) : current _ session _ ids = self. pool. get ('pos. session'). search ( cr, uid, [ ('state ', '! = ','closed'), ('... | [
-0.34545648097991943,
-0.6353493928909302,
0.9092892408370972,
0.6269763112068176,
0.4716281592845917,
-0.31155845522880554,
0.7648200392723083,
-0.5169803500175476,
1.0072071552276611,
0.36795520782470703,
-0.0030228039249777794,
0.7525476813316345,
0.18208755552768707,
0.5772183537483215... |
def settitle ( self, text ) : self. _ main. send ( " setcontactlisttitle ", [ text ] ) pass | [
-0.6236511468887329,
-0.44397789239883423,
0.21421989798545837,
0.11025743186473846,
-0.5700803995132446,
0.5135259032249451,
-0.8506842255592346,
0.11666211485862732,
0.6469175815582275,
0.34914109110832214,
-1.5075523853302002,
-0.2919562757015228,
-1.2287235260009766,
-0.081793718039989... |
def stream _ checkpoint _ path ( self ) - > optional [ str ] : return self. _ _ stream _ checkpoint _ path | [
0.8863874077796936,
-0.5372957587242126,
0.5276962518692017,
0.9295615553855896,
0.4164137542247772,
1.546465277671814,
1.0474321842193604,
-0.9392037391662598,
-0.07090049982070923,
0.21961872279644012,
0.7811695337295532,
0.533639669418335,
-0.8599500060081482,
-0.16510629653930664,
-1... |
async def restart _ containers ( self, node _ uuid : nodeid ) - > none : if node _ uuid not in self. _ inverse _ search _ mapping : raise dynamicsidecarnotfounderror ( node _ uuid ) service _ name = self. _ inverse _ search _ mapping [ node _ uuid ] scheduler _ data : schedulerdata = self. _ to _ observe [ service _ na... | [
-1.2855936288833618,
0.5413350462913513,
0.44152140617370605,
0.04666018486022949,
0.6765812635421753,
-1.048479437828064,
0.07226227968931198,
-0.0919501781463623,
-1.0640820264816284,
0.35615864396095276,
-0.15637458860874176,
1.2241086959838867,
-0.15082281827926636,
-0.4372256696224212... |
def threaded ( c ) : c. send ( " server connected ". encode ( ) ) while true : # data received from client try : data = c. recv ( 1024 ) if not data : print ('disconnecting from client...') # lock released on exit print _ lock. release ( ) break with stdoutio ( ) as s : byte _ code = compile _ restricted ( data, safe _... | [
0.4472685754299164,
-0.15104663372039795,
0.8134639263153076,
-0.22700010240077972,
0.31344249844551086,
0.5445767045021057,
0.32599419355392456,
-1.073959469795227,
-0.8780393600463867,
-0.03888353332877159,
-0.4215232729911804,
0.9369863867759705,
-0.850156843662262,
-0.43196332454681396... |
def create _ action _ client ( action ) : action _ cls = get _ action _ class ( action ) client = actionlib. simpleactionclient ( action, action _ cls ) return client | [
-0.3841789960861206,
-1.749168872833252,
0.08409217745065689,
0.020901743322610855,
-0.20745600759983063,
0.1552707552909851,
0.4896143674850464,
-0.5624255537986755,
1.129638433456421,
0.4000745415687561,
-0.5103630423545837,
0.8845081925392151,
-0.053432397544384,
-1.1862170696258545,
... |
def new ( * args, * * kargs ) : obj = itkimageserieswriteriuc3iuc2. _ _ new _ orig _ _ ( ) import itktemplate itktemplate. new ( obj, * args, * * kargs ) return obj | [
-0.16570883989334106,
-0.054648783057928085,
-0.025939876213669777,
-0.20409315824508667,
0.07435774803161621,
-0.6079380512237549,
0.3383968770503998,
0.2831411063671112,
-1.199336051940918,
0.09885258227586746,
-0.17457708716392517,
0.09480907768011093,
1.3176326751708984,
-0.50269144773... |
def calc _ param ( step ) : if step < 10000 : return 0. 1, 0. 1 else : p = 0. 1 + ( step - 9999 ) * 0. 4 / 10000 return p, p | [
0.3028123080730438,
0.04847446829080582,
0.6184116005897522,
0.3452495336532593,
-0.12586219608783722,
-0.035252366214990616,
0.2605191171169281,
0.2759726643562317,
-0.21167023479938507,
0.474582314491272,
-0.44952723383903503,
-0.554131031036377,
0.003537727752700448,
1.2273163795471191,... |
def sgd ( self, mini _ batch, eta ) : # provide the mini _ batch and the learning rate # create empty derivative array of vectors for each layer nabla _ b = [ np. zeros ( b. shape ) for b in self. biases ] nabla _ w = [ np. zeros ( w. shape ) for w in self. weights ] for x, y in mini _ batch : # call backprop for this ... | [
1.0005725622177124,
-0.12592962384223938,
0.7995651364326477,
0.17296183109283447,
0.37061259150505066,
0.7951205968856812,
0.051896870136260986,
0.17707282304763794,
-0.6876510381698608,
0.4752754271030426,
0.42781713604927063,
0.1727263182401657,
-0.09026873111724854,
0.16494148969650269... |
def testcaserange ( values : np. ndarray, rangemin : float, rangemax : float, rangebins : int, plottoo : bool = false ) : print ( ) print ( f " float rangemin = { rangemin } ; " ) print ( f " float rangemax = { rangemax } ; " ) print ( f " int rangebins = { rangebins } ; " ) counts, edges = np. histogram ( values, bins... | [
0.7468221783638,
0.2444293349981308,
0.6009142398834229,
0.27064216136932373,
0.37580955028533936,
0.2133546769618988,
0.35028934478759766,
0.029652364552021027,
0.02907007373869419,
-0.5897490382194519,
0.3759607970714569,
0.9890064001083374,
0.030354078859090805,
0.33967483043670654,
0... |
def execute _ classifiers ( self ) : for i in range ( len ( self. modellist ) ) : fit _ obj = self. modellist [ i ]. fit ( self. trainingdata, self. train _ labels ) result = fit _ obj. predict ( self. testingdata ) self. results [ type ( self. modellist [ i ] ). _ _ name _ _ ] = metrics. accuracy _ score ( result, sel... | [
-2.0913610458374023,
-0.2796723544597626,
0.5273973941802979,
0.380056768655777,
1.4768143892288208,
0.5741873979568481,
0.6700308322906494,
-0.045761045068502426,
-1.381168246269226,
0.12662167847156525,
-0.6013398170471191,
-0.23967823386192322,
-0.11444182693958282,
1.0162322521209717,
... |
def func _ wrapper ( config : builderconfig, * * kwargs ) : if not config. data _ files : raise valueerror ( f " at least one data file must be specified, but got data _ files = { config. data _ files } " ) data _ files = config. data _ files if isinstance ( data _ files, ( str, list, tuple ) ) : files = data _ files i... | [
-0.5777040123939514,
0.036876432597637177,
0.4157540798187256,
0.2555098533630371,
0.4915134310722351,
-0.1460590660572052,
0.14234977960586548,
0.9181687235832214,
-0.08887645602226257,
-0.36875391006469727,
-0.002277805469930172,
0.4401734471321106,
0.6773310899734497,
0.5304250717163086... |
def _ export _ lun ( self, volume, connector = none, igroup = none ) : lun _ id = - 1 export _ to ='' v = self. vmem _ vip if igroup : export _ to = igroup elif connector : export _ to = connector ['initiator'] else : raise exception. error ( _ ( " no initiators found, cannot proceed " ) ) target _ name = self. _ get _... | [
-0.05206868797540665,
-1.1049001216888428,
0.6592482924461365,
0.5005714297294617,
-0.5232365131378174,
-0.7523921728134155,
-0.2703166902065277,
0.3205483853816986,
0.9901853203773499,
0.18258574604988098,
-0.46708157658576965,
0.37618327140808105,
-0.8130993247032166,
-0.7528937458992004... |
def human _ readable _ time ( seconds ) : units = [ ( " year ( s ) ", 60 * 60 * 24 * 365 ), ( " month ( s ) ", 60 * 60 * 24 * 30 ), ( " week ( s ) ", 60 * 60 * 24 * 7 ), ( " day ( s ) ", 60 * 60 * 24 ), ( " hour ( s ) ", 60 * 60 ), ( " minute ( s ) ", 60 ), ( " second ( s ) ", 1 ) ] values = [ ] seconds = int ( seconds... | [
-0.11809737980365753,
0.13224002718925476,
0.6586891412734985,
-0.6706971526145935,
-0.7896389961242676,
0.011437508277595043,
0.01800222136080265,
-0.9135243892669678,
-0.8075364828109741,
0.6493183374404907,
-0.42285460233688354,
-0.04988093301653862,
0.4549521207809448,
0.27719035744667... |
def set _ led _ battery _ state ( self, state ) : level = self. command _ value _ on if state else self. command _ value _ off try : self. _ write ( self. command _ set _ led _ batt _ mon, [ level ] ) except keyboardinterrupt as e : # pragma : no cover self. _ log. warning ( " keyboard interrupt, % s ", e ) raise e exc... | [
-0.39204642176628113,
0.1103987991809845,
0.3278794288635254,
-0.16623874008655548,
-0.22181396186351776,
1.0122487545013428,
-0.03482549637556076,
-0.3622187077999115,
-0.4570944905281067,
-0.21764801442623138,
-0.8742314577102661,
1.0354976654052734,
-0.99903404712677,
1.1230745315551758... |
def location ( self ) : return self. location _ value | [
-0.4045024812221527,
-0.8907454609870911,
0.299520343542099,
-0.13228824734687805,
-0.05782425031065941,
0.6300505995750427,
1.4888569116592407,
0.5362032055854797,
-0.16923755407333374,
-0.36850324273109436,
0.3553142547607422,
0.6455149054527283,
0.6728275418281555,
-0.3056700825691223,
... |
def bit _ count _ even ( number ) : res = bin ( number ) [ 2 : ]. count ('1') return res % 2 = = 0 | [
-0.8599183559417725,
0.5220173001289368,
0.5910792350769043,
0.3314715027809143,
0.13895447552204132,
1.0108271837234497,
0.6248037219047546,
-0.1324256807565689,
-0.3553410768508911,
-0.624614953994751,
-1.2063179016113281,
-0.18391533195972443,
-0.7898876070976257,
0.816997766494751,
0... |
def managed _ by _ tower ( self ) : return self. _ data. get ('managed _ by _ tower') | [
0.1263207048177719,
0.39263322949409485,
0.3954128623008728,
0.5727233290672302,
0.86234050989151,
0.6495932340621948,
1.0729942321777344,
-0.30236002802848816,
0.6515507102012634,
-0.6618009209632874,
-0.36750105023384094,
0.7013903260231018,
0.15884025394916534,
-0.06572873890399933,
-... |
def _ get _ fiscalyear ( self, cr, uid, context = none ) : return self. pool. get ('account. fiscalyear'). find ( cr, uid, exception = false, context = context ) | [
0.9408531785011292,
0.1563013345003128,
0.2973650395870209,
0.05868501961231232,
-0.08735805004835129,
-0.7758951187133789,
0.4303652048110962,
-1.3528870344161987,
0.34076839685440063,
-0.49325811862945557,
0.727234959602356,
0.7606483101844788,
-0.3406050503253937,
-0.21045050024986267,
... |
def evaluationfunction ( self, currentgamestate, action ) : # useful information you can extract from a gamestate ( pacman. py ) successorgamestate = currentgamestate. generatepacmansuccessor ( action ) newpos = successorgamestate. getpacmanposition ( ) newfood = currentgamestate. getfood ( ) newghoststates = successor... | [
0.09873097389936447,
-0.4719914495944977,
0.644056499004364,
-0.24695369601249695,
-0.2769407331943512,
0.11702324450016022,
0.15885494649410248,
-0.34618404507637024,
-0.042795680463314056,
0.618954598903656,
-0.18794287741184235,
0.8030518293380737,
-0.6699013113975525,
0.660176038742065... |
def _ findextensionbyname ( self, * args, * * kwargs ) : # real signature unknown pass | [
-0.017510652542114258,
-0.47014397382736206,
0.43261563777923584,
0.6352728605270386,
-0.7532657384872437,
-0.9400317668914795,
-0.05768569931387901,
-1.2051239013671875,
0.2809504568576813,
0.7365627288818359,
-0.7132753729820251,
-0.6437555551528931,
-0.7216758728027344,
0.64188015460968... |
def _ get _ version _ doc ( self, revision _ id ) : # read and parse shipyard. conf config = configparser. configparser ( ) config. read ( self. shipyard _ conf ) doc _ name = config. get ('document _ info ','deployment _ version _ name') doc _ schema = config. get ('document _ info ','deployment _ version _ schema') d... | [
0.3705410063266754,
-0.5246411561965942,
0.551740288734436,
-0.40661850571632385,
-0.7534306049346924,
-0.07113319635391235,
0.18442761898040771,
0.4089866876602173,
-0.2752861976623535,
0.5294516682624817,
-0.2809601128101349,
0.37177774310112,
0.09212852269411087,
-0.0055466704070568085,... |
def chunks ( l, n ) : for i in range ( 0, len ( l ), n ) : yield l [ i : i + n ] | [
-0.28746333718299866,
0.5728986859321594,
0.39129558205604553,
-0.017834477126598358,
-0.16806474328041077,
0.5943095684051514,
-1.0199992656707764,
-0.4482978880405426,
-0.38011491298675537,
-0.7051389813423157,
-0.6505396366119385,
-0.3429277837276459,
0.09863944351673126,
0.609419226646... |
def get _ name _ server _ id ( ) : file = open ( node _ config,'r') cmd = " uname - n " process = subprocess. popen ( cmd, shell = true, stdout = subprocess. pipe ) process. wait ( ) host _ name = process. stdout. read ( ). strip ( ) for line in file. readlines ( ) : token = line. rstrip ('\ n'). split ( ) if host _ na... | [
-0.10965169221162796,
0.22413676977157593,
0.938331127166748,
-0.1895511895418167,
-0.5369430184364319,
0.3218647539615631,
0.2563066780567169,
0.1301458328962326,
-1.0504943132400513,
0.7202751040458679,
-0.35969123244285583,
0.5302833318710327,
-0.49945127964019775,
0.39078179001808167,
... |
def _ calculate _ histogram _ pixel _ stats ( self, hist ) : bins = len ( hist ) n = float ( sum ( hist ) ) hist _ probability = [ hist [ i ] / n for i in range ( bins ) ] # percentage of pixels at each intensity level : i = > p _ i # mean level of pixels at intensity level i = > i * p _ i pixel _ mean = [ i * hist _ p... | [
-1.0042701959609985,
-0.0032998796086758375,
0.3653855323791504,
-0.43413347005844116,
-0.123042032122612,
0.1024516373872757,
-0.044826943427324295,
0.005689831916242838,
0.31672537326812744,
1.267554759979248,
-0.3366256654262543,
-0.4621930718421936,
-0.15991146862506866,
0.947335302829... |
def status _ favourite ( self, id : union [ status, idtype ] ) - > status : id = self. _ _ unpack _ id ( id ) return self. _ _ api _ request ('post ', f'/ api / v1 / statuses / { id } / favourite') | [
-0.5142062902450562,
-0.03686089068651199,
0.2798672020435333,
0.459500789642334,
-0.000023944561689859256,
-0.463367760181427,
-1.0554167032241821,
-0.46948325634002686,
0.5068504214286804,
-0.09299611300230026,
-1.0930521488189697,
1.1282975673675537,
-0.3857760429382324,
-0.256410837173... |
def test _ all _ survey _ package _ instance _ record _ fail ( self, client, all _ survey _ package _ instances ) : with pytest. raises ( castorexception ) as e : client. all _ survey _ package _ instances ( record = " 00fake " ) assert str ( e. value ) = = " 404 not found. " | [
-0.410206139087677,
0.7635408043861389,
0.3360559940338135,
-0.03392568975687027,
-0.16356560587882996,
1.0209892988204956,
0.06723722815513611,
-0.0602429062128067,
0.02948996052145958,
0.5693881511688232,
-0.5230507850646973,
-0.16288913786411285,
-0.2781057059764862,
0.44264519214630127... |
def db _ engine ( ) : postgres _ engine = create _ engine ( " postgresql : / / / postgres ", isolation _ level = " autocommit " ) db _ create ( postgres _ engine ) engine = create _ engine ( url ( * * database _ info ) ) yield engine engine. dispose ( ) db _ drop ( postgres _ engine ) postgres _ engine. dispose ( ) | [
0.28970614075660706,
0.23360881209373474,
0.7066371440887451,
0.10704882442951202,
1.0553131103515625,
0.029618866741657257,
-0.40944090485572815,
0.39786532521247864,
-0.5251182317733765,
-0.22279278934001923,
-0.0007433980354107916,
0.042862314730882645,
-0.13509437441825867,
0.404241263... |
def mk _ scheduler ( self, rules = none, project _ tree = none, work _ dir = none, include _ trace _ on _ error = true ) : rules = rules or [ ] goals = { } work _ dir = work _ dir or self. _ create _ work _ dir ( ) project _ tree = project _ tree or self. mk _ fs _ tree ( work _ dir = work _ dir ) return localscheduler... | [
0.12167567014694214,
0.06638848781585693,
0.5384501218795776,
0.30351021885871887,
-0.23937252163887024,
0.4893128275871277,
-0.5446621775627136,
0.5305182933807373,
-0.48005759716033936,
0.16835710406303406,
0.2068447768688202,
0.16352012753486633,
0.013773158192634583,
0.1609776169061660... |
def user _ stats ( df, city ) : print ('\ ncalculating user stats... \ n') start _ time = time. time ( ) # to do : display counts of user types user _ types = df. groupby ('user type') ['user type']. count ( ) print ('\ n \ t count of user types \ n ', user _ types ) # to do : display counts of gender if'gender'in df. ... | [
0.11261913180351257,
0.3399154245853424,
0.7294470071792603,
-0.04691379517316818,
-0.2456110566854477,
0.4437486231327057,
1.1957577466964722,
-0.3991282284259796,
-0.5818682312965393,
-0.5599900484085083,
0.32918164134025574,
0.9193753004074097,
0.6519942879676819,
0.5643218159675598,
... |
def _ get _ config _ path ( ) : repo _ dir = osp. dirname ( osp. dirname ( osp. dirname ( _ _ file _ _ ) ) ) config _ dpath = osp. join ( repo _ dir,'configs') if not osp. exists ( config _ dpath ) : raise exception ('cannot find config path') config _ fpaths = list ( glob. glob ( osp. join ( config _ dpath,'*. py') ) ... | [
-0.4667220711708069,
0.32867181301116943,
0.8120690584182739,
0.8990055322647095,
0.5319809317588806,
0.04064003750681877,
1.1092183589935303,
0.18459631502628326,
-0.5857887268066406,
0.9471425414085388,
-0.5643112063407898,
-0.658392071723938,
0.1305285394191742,
1.0945905447006226,
0.... |
def get _ action ( self, bot _ name, got _ action ) : self. notify _ bots _ turn ( bot _ name ) bot = self. bot _ from _ name ( bot _ name ) timebank = self. get _ time _ for _ move ( bot _ name ) answer = bot. ask ( timebank ) if not answer : return none time, response = answer # todo : hook time taken back in to bot ... | [
-0.28452834486961365,
-0.487259179353714,
0.650406002998352,
-0.13805033266544342,
0.6381305456161499,
-0.4139823019504547,
-0.22459082305431366,
-0.27617600560188293,
0.26836538314819336,
0.03197523579001427,
-0.33131143450737,
0.37574636936187744,
-0.10473669320344925,
0.2789757549762726... |
def add ( self, item ) : if item in self. item _ to _ position : raise keyerror ( ) # return self. items. append ( item ) self. item _ to _ position [ item ] = len ( self. items ) - 1 | [
-0.8620352745056152,
0.05464174225926399,
0.5409216284751892,
-0.3705214858055115,
0.6954120993614197,
0.994485080242157,
-0.29093030095100403,
-0.09913401305675507,
0.16075898706912994,
-0.01888693869113922,
-0.8210701942443848,
-0.5477718710899353,
-0.26271945238113403,
-0.47222730517387... |
def create _ connection ( self ) : if self. _ driver = = " psycopg2 " : try : import psycopg2 conn = psycopg2. connect ( database = self. _ database, user = self. _ user, password = self. _ password, host = self. _ host ) except exception as ex : raise ex elif self. _ driver = = " mysqldb " : try : import mysqldb conn ... | [
-0.4432162940502167,
-0.43257415294647217,
0.7280246615409851,
1.0518900156021118,
0.11859625577926636,
-0.02266526222229004,
-0.5419021248817444,
0.47583988308906555,
-0.5485309958457947,
-0.15408094227313995,
0.31414973735809326,
0.0909036248922348,
-1.0635536909103394,
0.055562879890203... |
def cond _ exp _ monte _ carlo _ linear ( self, x, s, n ) : x _ in = x. copy ( ) cat _ va = [ ca for ca in s if ca in self. cat _ index ] # get categorical index s _ cu = [ cu for cu in s if cu not in self. cat _ index ] # get numerical index def get _ given _ data ( idx ) : val = np. array ( [ x [ idx ] ] ) val = np. ... | [
0.1562729775905609,
0.07967637479305267,
0.599920392036438,
-0.0046766591258347034,
-0.7891592979431152,
-0.056775785982608795,
-0.03417844697833061,
0.3010232746601105,
0.1517116278409958,
0.22644823789596558,
-0.2980067729949951,
0.4919793903827667,
0.12085821479558945,
-0.08447945117950... |
def get _ popular _ datasets ( n ) : user = tk. get _ action ('get _ site _ user') ( {'ignore _ auth': true }, { } ) context = {'user': user ['name'] } data _ dict = {'sort':'views _ total desc ','q':'type : dataset'} datasets = tk. get _ action ('package _ search') ( context, data _ dict ) ['results'] if len ( dataset... | [
-0.8224225044250488,
1.8867669105529785,
0.49910736083984375,
0.6841632127761841,
-0.1654808074235916,
-0.5103260278701782,
0.40999627113342285,
-0.8876885175704956,
0.6054835915565491,
-0.7089416980743408,
0.0820612981915474,
0.5201366543769836,
0.31705114245414734,
0.3903123438358307,
... |
def friends ( name ) : friends _ list = person. objects. get ( name = name ). friends. all ( ) return set ( friends _ list ) | [
-0.52890545129776,
0.07522428780794144,
0.6750741600990295,
0.09515389055013657,
0.5281788110733032,
-0.2832927107810974,
-1.2938898801803589,
-0.8244242668151855,
-0.9844943881034851,
0.5323781371116638,
-1.208153486251831,
-0.646275520324707,
-0.1775771826505661,
-0.5487688779830933,
-... |
def _ _ str _ _ ( self ) : return'{ } '. format ( self. word ) | [
0.3875134587287903,
-1.6008327007293701,
0.4985038936138153,
-1.1043509244918823,
-0.5031503438949585,
1.1278105974197388,
-0.543074905872345,
-0.19593678414821625,
0.30549147725105286,
0.38019952178001404,
1.1393762826919556,
1.299299716949463,
-0.3080408275127411,
0.29079923033714294,
... |
def list _ all _ modules ( package ) : return [ name for _, name, _ in pkgutil. iter _ modules ( [ package. replace ( '. ', os. path. sep ) ] ) ] | [
-0.7335764765739441,
0.2883053123950958,
0.44911789894104004,
0.08516954630613327,
0.6325446963310242,
0.6711022257804871,
-0.6918866038322449,
0.1259666383266449,
0.8007636070251465,
0.27517417073249817,
0.05856958404183388,
-0.08552112430334091,
0.025268888100981712,
0.4980548918247223,
... |
def _ calcrect ( self ) : self. rect. x = self. realrect. x - int ( round ( 0. 5 * block _ size ) ) self. rect. y = int ( round ( 0. 7 * self. realrect. y ) ) + wall _ height - self. rect. height | [
0.3824896216392517,
-0.5994676947593689,
0.5545462369918823,
-0.2867797911167145,
-0.1721937209367752,
-0.2885313332080841,
1.1528486013412476,
0.05798330530524254,
-0.4413957893848419,
0.03836577758193016,
-0.702409029006958,
-0.4369431734085083,
0.2777095139026642,
0.18411080539226532,
... |
def get _ value ( self ) - > bytes : return self. value | [
-0.15919752418994904,
0.5297977924346924,
0.4763050675392151,
0.40759792923927307,
0.25298595428466797,
0.2586653530597687,
-0.28892871737480164,
-1.015708088874817,
-0.09885469079017639,
-1.0007766485214233,
-0.24140869081020355,
0.9416746497154236,
-0.33306676149368286,
-0.11828092485666... |
def adjust _ learning _ rate ( optimizer, epoch, lr _ steps ) : # 文 中 前 40 epoch 0. 01 的 学 , 40 epoch 之 10 epoch 学 原 的 0. 1 , 70 epoch 。 decay = 0. 1 * * ( sum ( epoch > = np. array ( lr _ steps ) ) ) lr = args. lr * decay decay = args. weight _ decay for param _ group in optimizer. param _ groups : param _ group ['lr'... | [
0.366590291261673,
-0.4097896218299866,
0.6538839340209961,
-0.05073133111000061,
-0.3700122535228729,
0.5687711834907532,
-0.13914360105991364,
0.5458039045333862,
-0.45901599526405334,
0.1249169111251831,
0.7129823565483093,
0.5259196758270264,
-0.12050390988588333,
1.3866342306137085,
... |
def test _ score _ model ( ) : fset = sample _ featureset ( 10, 1, ['amplitude ','maximum ','minimum ','median'], ['class1 ','class2'] ) model = build _ model. models _ type _ dict ['randomforestclassifier'] ( ) model = build _ model. build _ model _ from _ featureset ( fset, model ) score = build _ model. score _ mode... | [
-0.5806055665016174,
-0.3094574809074402,
0.574847936630249,
0.800539493560791,
0.6154877543449402,
0.4537213146686554,
-0.28285476565361023,
-0.6577119827270508,
-0.47277459502220154,
0.06552229821681976,
-0.6169154047966003,
-0.5793393850326538,
-0.07342948019504547,
-0.13846340775489807... |
def compare _ dirs ( gold _ dir, guess _ dir ) : # get files in the gold directory to _ skip = set ( ) gold _ bdms = { } for annfile in os. listdir ( gold _ dir ) : if annfile. endswith ( '. xml') : try : gold _ bdms [ annfile ] = bratdatamodel ( ) gold _ bdms [ annfile ]. addannotations ( os. path. join ( gold _ dir, ... | [
-0.6954838633537292,
-0.21654868125915527,
0.8454529047012329,
-0.2744658887386322,
0.26684287190437317,
0.8803269863128662,
1.1810616254806519,
-0.2788082957267761,
-0.48197680711746216,
1.0392237901687622,
-0.2372979372739792,
0.6974143981933594,
0.008495991118252277,
0.7324381470680237,... |
def to _ hugectr ( self, output _ path, cats, conts, labels, shuffle = none, file _ partition _ map = none, out _ files _ per _ proc = none, num _ threads = 0, dtypes = none, ) : # for now, we must move to the gpu to # write an output dataset. # todo : support cpu - mode output self. to _ gpu ( ) shuffle = _ check _ sh... | [
-0.2073187679052353,
0.45765846967697144,
0.49551090598106384,
-0.086473248898983,
0.6561682820320129,
-0.6666145920753479,
0.35388702154159546,
0.5357173085212708,
-0.8316484689712524,
-0.7608198523521423,
0.6892010569572449,
-0.16658006608486176,
0.8112355470657349,
-0.7902639508247375,
... |
def subtract _ number ( self, value _ a ) : self. result = self. result - value _ a | [
-0.5707084536552429,
0.24685928225517273,
0.3861919343471527,
0.18390797078609467,
0.10101547092199326,
0.12055661529302597,
1.8376318216323853,
1.1634591817855835,
0.07803920656442642,
-0.7423961758613586,
-0.7199602723121643,
-0.49382391571998596,
-0.23211777210235596,
0.3458223640918731... |
def decrypt _ section ( crib : str, index : int, cipher1 : str, cipher2 : str, target : str ) - > ( str, str ) : # calculate the key from each key1 = xor _ strings ( string _ to _ hex ( crib ), cipher1 [ index : ] ) key2 = xor _ strings ( string _ to _ hex ( crib ), cipher2 [ index : ] ) # use each key to decrypt the t... | [
-0.8155466318130493,
0.09944739937782288,
0.6113224625587463,
-0.5274513363838196,
-0.3274894952774048,
-0.7109786868095398,
-0.5140715837478638,
-0.8071324825286865,
-1.1620352268218994,
1.0112024545669556,
0.036542583256959915,
0.4824487864971161,
-0.3734680414199829,
-0.3996796011924743... |
def genvhdlpkg ( config ) : corename = config. get ('outcorename') ; packagename ='% s _ pkg'% corename ; packagefilename ='% s. vhd'% packagename ; try : fp = open ( packagefilename,'wt') ; except : raise ssbccexception ('could not open % s'% packagefilename ) ; fp. write ('library ieee ; \ n') ; fp. write ('use ieee.... | [
0.5600606203079224,
0.44400760531425476,
1.01166570186615,
-0.237277552485466,
0.4714641273021698,
0.549587070941925,
0.37626808881759644,
0.3631810247898102,
-0.44513335824012756,
0.9210392832756042,
-0.030586276203393936,
-0.23165981471538544,
0.3640238344669342,
0.06988731771707535,
0... |
def is _ trivial ( self ) : return self. _ call ('is _ trivial'). yes | [
-0.5914863348007202,
0.9199106097221375,
0.4165147542953491,
0.9164894223213196,
0.9220009446144104,
-0.04161583259701729,
-0.06118633598089218,
-0.5952520966529846,
0.33895963430404663,
0.11470425873994827,
-0.548405110836029,
-0.12129459530115128,
-0.6847167015075684,
-0.7523090243339539... |
def subscribereceive ( self, request, context ) : context. set _ code ( grpc. statuscode. unimplemented ) context. set _ details ('method not implemented!') raise notimplementederror ('method not implemented!') | [
-0.530307412147522,
0.19891750812530518,
0.8714759945869446,
0.03801069036126137,
0.5167080760002136,
0.1872767210006714,
-0.038073766976594925,
0.09954246133565903,
0.028593149036169052,
-0.27485910058021545,
-0.2696808874607086,
0.6969672441482544,
-0.997930645942688,
-0.1610903143882751... |
def _ getdefaultvalueslist ( unbatched _ shape : list [ int ], feature _ type : schema _ pb2. featuretype, default _ value _ proto : schema _ pb2. tensorrepresentation. defaultvalue ) - > list [ union [ int, float, bytes ] ] : kind = default _ value _ proto. whichoneof ( " kind " ) default _ value = getattr ( default _... | [
-0.24106064438819885,
0.5767565369606018,
0.5303158164024353,
0.7006392478942871,
1.5146360397338867,
-0.3168618083000183,
-0.5614078640937805,
0.18408231437206268,
-0.5699167847633362,
0.3791449964046478,
-1.0125840902328491,
-0.33174917101860046,
0.05146544799208641,
1.089469075202942,
... |
def coarse _ stress _ pattern ( self ) - > sequence [ coarsestress ] : summary = [ ] for stress in self. stress _ pattern : if stress = = stress. no _ stress : summary. append ( coarsestress. weak ) elif stress in { stress. primary, stress. secondary } : summary. append ( coarsestress. strong ) return summary | [
-0.2999197840690613,
-0.21257588267326355,
0.5286874175071716,
-0.34177619218826294,
0.36363235116004944,
0.3768714666366577,
0.1618528962135315,
-0.3684021532535553,
0.7073367238044739,
0.5069283246994019,
-1.342345952987671,
0.539560854434967,
-0.3866363763809204,
-0.13363274931907654,
... |
def _ mgui _ set _ column _ headers ( self, headers : sequence ) - > none : self. _ qwidget. sethorizontalheaderlabels ( tuple ( map ( str, headers ) ) ) | [
-1.1131106615066528,
-0.5529694557189941,
0.32343584299087524,
-0.13877707719802856,
-0.024185368791222572,
0.6658449172973633,
-0.9589777588844299,
-0.7669395804405212,
-1.1395857334136963,
0.5925363302230835,
-0.6040788292884827,
-0.4681391417980194,
-0.04479166120290756,
-0.377295523881... |
def next ( self ) : self. state = np. array ( list ( map ( seeding. hash _ seed, self. state ) ), dtype = np. uint32 ) | [
-0.11851651966571808,
0.6701981425285339,
0.3405377268791199,
-0.32840195298194885,
0.3000897467136383,
0.4619649052619934,
0.4796612858772278,
0.2824416160583496,
0.7698276042938232,
-0.18819427490234375,
-0.37355342507362366,
0.7460066080093384,
0.6188260316848755,
0.04068984463810921,
... |
def train _ iterable ( self, data ) : if not isinstance ( data, types. generatortype ) : if self. tokenization = = tokenization. character : if type ( data )! = str : raise typeerror elif self. tokenization = = tokenization. word : if type ( data )! = str : raise typeerror else : data = tuple ( data. split ( ) ) elif s... | [
-1.3799755573272705,
0.2774747312068939,
0.8260810971260071,
0.11054209619760513,
-0.339116632938385,
-0.3268910348415375,
0.6179198026657104,
0.4119279980659485,
-0.2783724069595337,
-0.08399952203035355,
-0.37395918369293213,
0.39606592059135437,
-1.1875476837158203,
0.5217748284339905,
... |
def _ parse _ include _ lists ( self, included, excluded ) : has _ spec = false if included is not none : has _ spec = true if type ( included ) is list : include _ list = included else : include _ list = [ included ] else : include _ list = ['*'] if excluded is not none : has _ spec = true if type ( excluded ) is list... | [
0.7270514369010925,
-0.7178565263748169,
0.7487435340881348,
0.00986938551068306,
-1.0970563888549805,
0.12489748746156693,
-0.8292533159255981,
1.2100027799606323,
0.7171490788459778,
0.8162282109260559,
-0.30897441506385803,
0.47147953510284424,
-0.5332437753677368,
0.950778603553772,
... |
def get _ tile ( self, address ) : w, h = address tile _ mask = self. mask [ h : h + self. _ mask _ size, w : w + self. _ mask _ size ] w = w * self. mask _ scale _ factor + self. _ l0 _ offset [ 0 ] h = h * self. mask _ scale _ factor + self. _ l0 _ offset [ 1 ] size = ( self. tile _ size, self. tile _ size ) tile = s... | [
-0.5158586502075195,
-0.8826630711555481,
0.5534818768501282,
-0.6000774502754211,
-0.23036514222621918,
0.02595631219446659,
0.3304809033870697,
0.3079904019832611,
0.2686946392059326,
0.4940214455127716,
-0.0721801295876503,
1.1588152647018433,
0.09271285682916641,
0.16788959503173828,
... |
def current _ frame ( self ) : return hou. frame ( ) | [
0.23957926034927368,
-0.577688455581665,
0.2207399308681488,
1.4352672100067139,
0.5155718326568604,
-0.04183771833777428,
0.34666088223457336,
0.00499403290450573,
-0.38313665986061096,
-1.2812670469284058,
0.9943937659263611,
0.7423591613769531,
-0.5638912916183472,
-0.42583465576171875,... |
def gp _ ex _ fig _ 22 ( ) : x = [ [ - 4. 0 ], [ - 3. 0 ], [ - 1. 0 ], [ 0. 0 ], [ 2. 0 ], ] y = numpy. array ( [ - 2. 0, 0. 0, 1. 0, 2. 0, - 1. 0 ] ) ln = infpy. lognormaldistribution gamma = infpy. gammadistribution k = ( infpy. noise _ kernel (. 2, gamma ( 1. 0, 1. 0 ) ) + infpy. constantkernel ( ) * infpy. squarede... | [
0.39559298753738403,
-0.2204045057296753,
1.001009225845337,
0.276814728975296,
-0.2919798791408539,
0.06095224246382713,
0.014650225639343262,
0.18553514778614044,
-0.01530306413769722,
0.14248518645763397,
-0.1163015365600586,
0.8063920736312866,
0.3279494047164917,
0.07107049226760864,
... |
def get _ project _ home ( path = none ) : previous _ path = none current _ path = path or os. getcwd ( ) # loop until we're at the root of the volume while current _ path! = previous _ path : # check if '. aldryn'file exists in current directory dotfile = os. path. join ( current _ path, settings. aldryn _ dot _ file ... | [
0.3953542709350586,
-0.18094666302204132,
0.8143107891082764,
0.3409288227558136,
0.18519502878189087,
0.5776544809341431,
1.0388758182525635,
-0.5893483757972717,
-0.5199292302131653,
0.04005387797951698,
1.2757461071014404,
0.6540015935897827,
-0.5004499554634094,
-1.012123942375183,
0... |
def linear _ regression _ simulation _ ys ( nobs, xs, param _ matrix, ymeans = none, yvars = none ) : if ymeans is none : ymeans = [ 0 ] if yvars is none : yvars = [ 1 ] vals = identity ( xs. dot ( param _ matrix ) ) e _ mean, e _ varcov = set _ matrices ( 1, ymeans, yvars ) es = simulate _ from _ mvn _ covariance _ st... | [
-0.28853538632392883,
0.7571877241134644,
0.6932921409606934,
-0.5118542313575745,
0.003458630060777068,
-0.6492615938186646,
0.1509573608636856,
-0.3465728759765625,
0.6517382264137268,
0.59247225522995,
-0.2329249531030655,
0.7171139717102051,
0.06228435039520264,
-0.14917778968811035,
... |
def filter _ setaveragingfactor ( averagingfactor ) : return none | [
-0.5135949850082397,
-0.21213503181934357,
0.34879550337791443,
-0.7605598568916321,
-0.6840407848358154,
-0.06613373756408691,
1.1283555030822754,
-0.39883625507354736,
0.12471328675746918,
0.5347516536712646,
-0.6271985173225403,
1.1883968114852905,
-0.08762353658676147,
0.19928349554538... |
def execute _ report ( self ) : print ( ) filenames = self. get _ filenames ( ) order _ status _ tag = self. order _ status _ tag +'='execution _ report _ tag = self. execution _ report _ tag for filename in filenames : fix _ file = open ( f'{ settings. relative _ path } / { filename } ','r') for message in fix _ file.... | [
0.3589697480201721,
0.1428632140159607,
0.6436420679092407,
0.7688919305801392,
1.1540027856826782,
-0.3469141721725464,
1.1173441410064697,
0.16211187839508057,
-1.1179790496826172,
0.15662707388401031,
-0.3724670708179474,
-0.5331458449363708,
-0.48902755975723267,
0.33040282130241394,
... |
def composed ( self, * args ) : return _ topods. topods _ shape _ composed ( self, * args ) | [
-1.0142306089401245,
-0.9323112368583679,
0.2961750030517578,
0.0783880427479744,
0.93840491771698,
0.597499430179596,
1.133712649345398,
-1.1746221780776978,
-0.41442808508872986,
-0.2889750897884369,
-0.3604775369167328,
-0.8196633458137512,
0.06416909396648407,
0.36904436349868774,
-1... |
def _ _ get _ pakkr _ returns ( self ) - > _ returntype : if self. _ _ custom _ returns is not none : return self. _ _ custom _ returns return self. _ _ steps _ returns | [
0.17116881906986237,
0.23558135330677032,
0.44515693187713623,
0.23689697682857513,
0.19569222629070282,
-0.7798098921775818,
-0.4120209813117981,
-0.8011904954910278,
0.23273636400699615,
-0.2373693734407425,
0.6387142539024353,
-0.0003189172421116382,
-1.056482195854187,
0.46937319636344... |
def entropy ( message ) : n = len ( message ) message = letter _ freq ( message ) h = 0 for n _ i in message. values ( ) : p _ i = n _ i / n h + = - p _ i * ( np. log ( p _ i ) ) return h / np. log ( 2 ) | [
-0.8520801067352295,
0.5097215175628662,
0.45621994137763977,
-0.955703616142273,
-0.43451231718063354,
0.06893229484558105,
0.5543999075889587,
0.36456263065338135,
-0.9317599534988403,
0.6853512525558472,
0.42084968090057373,
0.002017146907746792,
-1.1196942329406738,
0.06672047823667526... |
def _ _ init _ _ ( self ) : # pylint : disable = super - init - not - called self. _ mobile = none self. _ switch _ to = none self. capabilities = {'takesscreenshot': true } self. screenshot64 = none | [
-0.5736262202262878,
0.44850727915763855,
0.2855999767780304,
1.445542335510254,
-0.2685542106628418,
-0.6309698224067688,
-0.7181628942489624,
0.07214801758527756,
0.7023012638092041,
-0.8684678077697754,
-0.5937228202819824,
-0.10025560855865479,
0.05166298523545265,
1.1246668100357056,
... |
def test _ form _ submit _ bad _ hash ( self ) : # pass strings for form submittal and add stage variable to # show we previously saw first stage of the form. self. test _ data. update ( {'stage': 2 } ) response = self. client. post ( self. url, self. test _ data ) self. assertequal ( response. status _ code, 200 ) sel... | [
0.09023378789424896,
-0.11652754992246628,
0.535779595375061,
0.2967679798603058,
0.008509907871484756,
0.4732457101345062,
-0.8513545393943787,
0.0257556289434433,
-0.6284334659576416,
-0.511360764503479,
-0.48726606369018555,
-0.13211007416248322,
0.24454188346862793,
1.165968418121338,
... |
def translate _ list ( contract, context ) : items = [ ] for value in contract : if isinstance ( value, int ) : pass else : items. append ( translate ( value, context ) ) if len ( items ) = = 0 : return {'type':'array'} elif len ( items ) = = 1 : return {'type':'array ','items': items [ 0 ], } else : return {'type':'ar... | [
-0.844421923160553,
0.21961915493011475,
0.6490067839622498,
-0.25827762484550476,
0.20329886674880981,
-1.1862003803253174,
-0.8978379368782043,
0.16156889498233795,
1.1651917695999146,
0.8014149069786072,
-1.4893622398376465,
-1.0300153493881226,
0.3963562548160553,
0.17399562895298004,
... |
def connectcallback ( self, signal ) : if signal in self. _ connectionmap. getsignalnames ( ) : connections = self. _ connectionmap. getconnectionsbysignalname ( signal ) for object in connections : self. _ connectstudiomaxsignal ( object, signal ) else : cross3d. logger. debug ('connect : signal % s has no signal map'... | [
-0.6299348473548889,
-0.6406235098838806,
0.6506056189537048,
1.1857802867889404,
-0.0016422644257545471,
0.2149403840303421,
0.15098732709884644,
-0.8380705714225769,
0.7586619257926941,
0.5011486411094666,
-0.8832198977470398,
-0.8555914759635925,
0.5273786187171936,
0.8362519145011902,
... |
def account _ search ( request ) : if request. method = ='post': # get search key data from search form search _ value = request. post. get ('search _ value') print ( " = = = = = = = = = = = = = = = = = = = = = = = = " ) # get all requirements in order, installation and account status if request. user. has _ perm ('cus... | [
0.06859356164932251,
-0.09713773429393768,
1.0325366258621216,
0.6644551753997803,
-0.21260294318199158,
0.39342737197875977,
0.8941385746002197,
0.11893396824598312,
-0.25614333152770996,
0.31712234020233154,
1.128151535987854,
0.13604582846164703,
0.46144336462020874,
0.9045746326446533,... |
def read _ juicer _ dump ( dumpfile, resolution ) : dumped = open ( dumpfile,'r') print ( " processing " + dumpfile ) nonzero _ beads = [ ] for i in dumped : line = i. strip ( ). split ( ) nonzero _ beads. append ( ( ( int ( ceil ( int ( line [ 0 ] ) / resolution ) ) ) - 1, int ( ceil ( ( int ( line [ 1 ] ) / resolutio... | [
-0.5711920857429504,
-0.40789830684661865,
0.4566350281238556,
-0.018638182431459427,
-0.7068495750427246,
0.3605010211467743,
0.6133049130439758,
0.3492177128791809,
-0.26138782501220703,
0.7195683121681213,
-0.26520830392837524,
-0.42710310220718384,
-0.8538022637367249,
0.74590915441513... |
def service _ usage ( filename, user ) : # lists to capture duration on specific day of the week durations _ monday = [ ] durations _ tuesday = [ ] durations _ wednesday = [ ] durations _ thursday = [ ] durations _ friday = [ ] durations _ saturday = [ ] durations _ sunday = [ ] # initialize counters - one counter for ... | [
-0.7302170991897583,
0.7586808204650879,
0.6856547594070435,
-0.7860756516456604,
-0.04262467846274376,
0.011417740024626255,
0.49698323011398315,
0.17749202251434326,
-0.2826009690761566,
0.2887004315853119,
0.5945830941200256,
0.18004079163074493,
0.46550920605659485,
1.641506552696228,
... |
def clean _ the _ input ( line ) : try : chk = float ( line ) line = str ( ecf. round _ up ( float ( line ) ) ) except : pass return line | [
0.5867581367492676,
-0.13023631274700165,
0.3757292330265045,
0.045333731919527054,
0.44980594515800476,
0.5044842958450317,
0.5566749572753906,
-0.6111785173416138,
-0.39190128445625305,
0.25620341300964355,
0.8432140350341797,
-0.3928067684173584,
-0.6195054650306702,
0.01684272289276123... |
def feed ( self, x ) : return self. _ feed _ next ( activations = x, layer = 0 ) | [
-0.7202098369598389,
0.6009647250175476,
0.27928996086120605,
0.18392671644687653,
-0.4952959418296814,
-0.6192479729652405,
-0.1142437681555748,
-1.1440237760543823,
0.49263930320739746,
-0.8449978828430176,
-0.8733312487602234,
1.6698815822601318,
-0.20149348676204681,
-0.611313223838806... |
def _ process _ requests ( self, network _ messages ) : super ( ). _ process _ requests ( network _ messages ) for mess in network _ messages : if mess. type = = climess. messagetype. orange _ attack and self. can _ attack ( ) : self. _ attack ( ) | [
-0.5490511059761047,
0.09179487824440002,
0.4706847071647644,
0.7678685188293457,
1.2351009845733643,
-0.1049753874540329,
0.28892791271209717,
-1.0565342903137207,
0.0042936429381370544,
-0.2982500493526459,
0.4297354817390442,
-1.0188491344451904,
-0.41393834352493286,
0.2293219864368438... |
def connect _ tiles ( self, tile _ 1, tile _ 2 ) : if self. get _ tile _ north _ neighbor ( tile _ 1 ) = = tile _ 2 : # tile _ 2 is north of tile _ 1, knock tile _ 2 south wall # and tile _ 1 north wall tile _ 1. knock _ wall ( " north " ) tile _ 2. knock _ wall ( " south " ) elif self. get _ tile _ east _ neighbor ( t... | [
-0.2746109068393707,
-0.21518443524837494,
1.0841233730316162,
0.6777265667915344,
-0.10846300423145294,
0.5389900803565979,
0.5028083324432373,
-0.9062342047691345,
-0.6988839507102966,
1.0951240062713623,
0.005726157687604427,
-0.05020313709974289,
0.08041562139987946,
0.5962080955505371... |
def testdeletevaluesforquerywithunknowntag ( self ) : securetagapi ( self. user ). create ( [ ( u'username / bar ', u'description'), ( u'username / foo ', u'description') ] ) objectid1 = uuid4 ( ) objectid2 = uuid4 ( ) # fixme replace this with securetagvalueapi once the index is # integrated values = { objectid1 : { u... | [
0.025917109102010727,
0.41512906551361084,
0.49733966588974,
-0.5176651477813721,
0.2980484068393707,
0.3384002149105072,
-0.38633793592453003,
-0.5427076816558838,
-0.42553532123565674,
-0.5909134149551392,
-0.4749550223350525,
-0.5946123003959656,
0.6947169899940491,
0.8410785794258118,
... |
def configured ( self, config _ or _ config _ fn : any, name : optional [ str ] = none, config _ schema : optional [ userconfigschema ] = none, description : optional [ str ] = none, ) - > self : name = check. opt _ str _ param ( name, " name " ) new _ config _ schema = configureddefinitionconfigschema ( self, convert ... | [
-0.30764055252075195,
0.5208543539047241,
0.4528614282608032,
0.8248316645622253,
0.20595596730709076,
-0.6112750172615051,
-0.24593597650527954,
0.5453797578811646,
0.5404977202415466,
0.5601763129234314,
-0.5847755074501038,
0.21532432734966278,
0.5935634970664978,
0.3829220235347748,
... |
def fit ( self, synthetic _ data, key _ fields, sensitive _ fields ) : raise notimplementederror ('please implement fit method of attackers') | [
-0.13917462527751923,
-0.0566713809967041,
0.412320613861084,
1.0048794746398926,
0.08470088988542557,
0.4554651081562042,
-0.08189710229635239,
-0.2738780677318573,
-1.1243290901184082,
0.010469760745763779,
-1.1369742155075073,
0.6593937277793884,
-0.6321117877960205,
-0.9331066608428955... |
def _ stop _ event _ dispatch ( self ) : log. debug ( " % r : not unregistering listener url to avoid affecting " " other rsn platform drivers ", self. _ platform _ id ) # unregister listener : # self. _ unregister _ event _ listener ( self. listener _ url ) # note : no, don't unregister : other drivers might still be ... | [
-0.032236095517873764,
-0.26326388120651245,
0.42810967564582825,
-0.530240535736084,
0.7734076976776123,
-0.22811420261859894,
0.4096338152885437,
1.1151418685913086,
-0.37007009983062744,
-0.5787078738212585,
-0.46610477566719055,
-0.3015320599079132,
-0.2517997622489929,
-0.187057718634... |
def is _ blocker ( self ) : return self. _ call ('is _ blocker'). yes | [
-0.581789493560791,
1.0457113981246948,
0.601796567440033,
1.9908472299575806,
0.4047624170780182,
0.023394932970404625,
-0.6103017926216125,
-0.8370599746704102,
-0.10861155390739441,
0.3742031753063202,
-0.11949297040700912,
0.5321998000144958,
-1.1630711555480957,
0.8111283779144287,
... |
def prep _ bet ( self ) : bet _ str = " bet : $ " + str ( self. stats. bet ) self. bet _ image = self. font. render ( bet _ str, true, self. text _ color, self. settings. bg _ color ) # display the wallet at the bottom right of the screen self. bet _ rect = self. bet _ image. get _ rect ( ) self. bet _ rect. bottomrigh... | [
-0.25410667061805725,
0.1890256702899933,
0.5007355213165283,
-0.8120082020759583,
-0.1314179003238678,
0.3944941759109497,
-0.13594207167625427,
0.06158073619008064,
-0.16029255092144012,
0.4671311676502228,
0.7625105381011963,
0.46836379170417786,
0.5229360461235046,
0.44935983419418335,... |
def load _ np _ arr ( save _ path, file _ name ) : # type : str - > str - > ( ) with open ( os. path. join ( save _ path, file _ name + '. npy'),'r') as f : return np. load ( f ) | [
0.015756865963339806,
-1.2372530698776245,
0.391312837600708,
-0.32150834798812866,
-0.13054759800434113,
0.10808040201663971,
-0.2725386321544647,
-0.4676987826824188,
-0.5971919894218445,
1.1679555177688599,
-0.34928423166275024,
0.4867379665374756,
-0.13587772846221924,
-0.0386662967503... |
def filepaths ( self ) : return [ path for path in self. allpaths if os. path. isfile ( path ) ] | [
0.7965595126152039,
-0.9618010520935059,
0.39410874247550964,
1.7761776447296143,
0.14457665383815765,
0.24155329167842865,
-0.03655451163649559,
1.2828187942504883,
0.11924441903829575,
-0.40607064962387085,
0.22492897510528564,
-0.40411320328712463,
-0.24169157445430756,
0.64976632595062... |
def insert ( self, data ) : if isinstance ( data, ( int, float ) ) : new _ node = node ( data ) if not self. root : self. root = new _ node self. _ size + = 1 return curr = self. root while curr : if new _ node. data < curr. data : if curr. left is none : new _ node. depth = curr. depth + 1 curr. left = new _ node new ... | [
-0.580477774143219,
0.7859922647476196,
1.1125491857528687,
-0.2512780725955963,
-0.5029315948486328,
0.343294620513916,
0.7096484899520874,
-0.19728422164916992,
-0.053845517337322235,
-0.2754324972629547,
-0.46732836961746216,
-0.1279258131980896,
-1.5413103103637695,
1.3023020029067993,... |
def _ _ init _ _ ( self, * arguments ) : if len ( arguments ) = = 0 : self. pt1 = point ( 0, 0 ) self. pt2 = point ( 1, 1 ) elif len ( arguments ) = = 2 : if not all ( isinstance ( pt, point ) for pt in arguments ) : raise valueerror ( " arguments are not points " ) self. pt1, self. pt2 = arguments elif len ( arguments... | [
-0.23196014761924744,
-0.5707345008850098,
0.7127096056938171,
1.1318472623825073,
0.24676798284053802,
0.8363441824913025,
0.20773881673812866,
-0.4110753834247589,
-0.6478410959243774,
-0.3527623116970062,
0.03145601600408554,
0.29227951169013977,
-0.12081536650657654,
0.1311021596193313... |
def apply _ function ( values, function ) : if isinstance ( values, list ) : return [ apply _ function ( v, function ) for v in values ] elif isinstance ( values, tuple ) : return tuple ( apply _ function ( v, function ) for v in values ) elif isinstance ( values, mapping ) : return { k : apply _ function ( v, function... | [
-0.632159411907196,
0.7662425637245178,
0.6390937566757202,
0.7727743983268738,
-0.301646888256073,
-0.3714025616645813,
-1.1309951543807983,
0.8885747194290161,
-0.020318306982517242,
-0.9377989172935486,
-0.10095226019620895,
-0.41088512539863586,
0.5837153792381287,
0.7653450965881348,
... |
def _ chunk _ vmapped _ function ( vmapped _ fun : callable, chunk _ size : optional [ int ], argnums = 0 ) - > callable : if chunk _ size is none : return vmapped _ fun if isinstance ( argnums, int ) : argnums = ( argnums, ) return hashablepartial ( _ fun, vmapped _ fun, chunk _ size, argnums ) | [
0.40952032804489136,
-0.07652059197425842,
0.4407089948654175,
-0.26698485016822815,
-0.1279628872871399,
-0.7099730372428894,
-0.25141292810440063,
-0.1301272064447403,
0.26054492592811584,
0.03955894708633423,
0.6047635078430176,
0.8139352798461914,
0.36833804845809937,
-0.64205783605575... |
def hibernate ( delay = 60, confirm = false, reason = " unknown ", allow _ auto _ update = true, * * kwargs ) : return sleep ( interval = 0, delay = delay, acc _ off = true, confirm = confirm, reason = reason, allow _ auto _ update = allow _ auto _ update, * * kwargs ) | [
1.380711317062378,
0.39315304160118103,
0.5694854259490967,
1.3214213848114014,
-0.41216036677360535,
0.4330313503742218,
-0.12227107584476471,
-0.49817827343940735,
0.23014278709888458,
-0.4408310651779175,
0.2743469476699829,
1.08870530128479,
-0.9371611475944519,
-0.8206748366355896,
... |
def str _ yyyymmdd ( self ) : return str ( self. _ date. year ) + " % 02d " % self. _ date. month + " % 02d " % self. _ date. day | [
0.6370395421981812,
-1.6110782623291016,
0.7997738718986511,
-0.6640065312385559,
-0.26040396094322205,
1.608373999595642,
-0.23098140954971313,
-0.37368807196617126,
-0.04240262135863304,
-0.7573353052139282,
0.79840087890625,
1.2228840589523315,
0.7243797183036804,
0.7908354997634888,
... |
def test _ complain _ if _ not _ datetime _ index ( self ) : closes = pd. dataframe ( np. random. rand ( 3, 2 ), columns = [ " fi12345 ", " fi23456 " ], index = pd. index ( [ " foo ", " bar ", " bat " ], name = " date " ) ) with self. assertraises ( parametererror ) as cm : get _ prices _ reindexed _ like ( closes, " c... | [
-0.41219279170036316,
0.9016785621643066,
0.5837384462356567,
0.383816659450531,
-0.2922648787498474,
0.6330465078353882,
-0.21613815426826477,
-0.3181310296058655,
-0.4905162453651428,
0.25988566875457764,
-0.12368378043174744,
0.8353694677352905,
-1.0889394283294678,
0.09096091240644455,... |
def _ init _ hashtables ( self ) : self. hash _ tables = [ storage ( self. storage _ config, i ) for i in range ( self. num _ hashtables ) ] | [
0.032407425343990326,
0.9164870977401733,
0.5026376843452454,
1.2710403203964233,
0.727567195892334,
0.4920603632926941,
0.6294180154800415,
-0.44696012139320374,
-0.6242996454238892,
-0.255384236574173,
-1.2485042810440063,
-0.7919376492500305,
0.07731819897890091,
0.2466212958097458,
0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.