text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def move _ away ( self ) : max _ distance = ( md - 0. 1 for md in self. _ table. max _ travel ) self. move ( * max _ distance, mode ='absolute ', history = true ) | [
-0.6484810709953308,
0.23712757229804993,
0.6062309741973877,
0.7798905372619629,
-0.2437467724084854,
0.9612633585929871,
0.25178301334381104,
0.8348948955535889,
-0.558540940284729,
0.4049370288848877,
-0.21985790133476257,
0.21482817828655243,
0.44745752215385437,
-0.40203630924224854,
... |
def mousemove ( self ) : self. validate ( ) self. region. mousemove ( self. region ) | [
0.15658694505691528,
-1.0305368900299072,
0.15785528719425201,
0.09031955897808075,
0.1303766518831253,
0.23562714457511902,
-0.05874352157115936,
0.00841906014829874,
-0.26864591240882874,
-0.5033501386642456,
-0.049001872539520264,
0.9960343241691589,
0.2884749174118042,
-0.1420235484838... |
def alhambramosaico ( listofimages, xx, yy, size, id _ number ) : # it creates the list of images to be used ( from " listing. py " ). image _ list = u. get _ str ( listofimages, 0 ) path = a. getpath ( image _ list [ 0 ] ) # paths & outputs imageout = a. decapfile ( listofimages ) + '. mosaic. x % iy % iid % i. fits'%... | [
0.5546201467514038,
-0.5315701365470886,
0.7621746063232422,
0.6878979802131653,
-0.16990135610103607,
0.08489394187927246,
1.069934368133545,
-0.07200281322002411,
0.3783625662326813,
-0.10779733210802078,
-0.6520584225654602,
0.4064275324344635,
0.2104625552892685,
0.5516692399978638,
... |
def test _ returns _ empty _ list _ if _ empty ( self ) : assert match _ sites ( [ ] ) = = [ ] | [
-0.07997427135705948,
0.3705139458179474,
0.12233497202396393,
0.19499471783638,
1.2664549350738525,
0.24341075122356415,
0.14934012293815613,
0.14189152419567108,
1.2107268571853638,
-0.20077279210090637,
-0.7926123738288879,
-0.07911660522222519,
-0.6884938478469849,
0.2512434422969818,
... |
def return _ values ( self ) : # o ( n ) data _ list = [ ] this _ node = self. root data _ list. append ( this _ node. data ) # add the first node's data traversed _ list = false while not traversed _ list : if this _ node. next = = none : traversed _ list = true else : this _ node = this _ node. next data _ list. appe... | [
-0.10721687227487564,
0.5117090940475464,
0.6500284671783447,
-0.03755209594964981,
0.22067703306674957,
-0.23166559636592865,
-0.6346873044967651,
0.6179941296577454,
-0.0005860612145625055,
-0.2745571434497833,
-0.573833703994751,
0.7631849646568298,
-0.6056240200996399,
1.50017869472503... |
def define _ performance ( num _ parallel _ calls = false, inter _ op = false, intra _ op = false, synthetic _ data = false, max _ train _ steps = false, dtype = false, all _ reduce _ alg = false, num _ packs = false, tf _ gpu _ thread _ mode = false, datasets _ num _ private _ threads = false, datasets _ num _ paralle... | [
-0.015619895420968533,
0.9010307788848877,
0.9998877048492432,
0.13602307438850403,
0.3571244180202484,
-0.3414035439491272,
0.8155149221420288,
0.005741014610975981,
-0.8498119711875916,
0.028974248096346855,
-0.2961673140525818,
0.11384489387273788,
-0.10946449637413025,
0.28440481424331... |
def stop ( self ) : self. script _ handler. stop _ current _ script ( ) self. matrix _ serial. stop ( ) if not self. disable _ discovery : self. discovery _ server. stop ( ) self. zeroconf _ discovery _ server. stop _ advertising ( ) self. server. stop ( ) if self. gui is not none : self. gui. destroy ( ) self. gui = n... | [
-0.6792016625404358,
-0.9179325103759766,
0.33313432335853577,
0.28045085072517395,
0.3244764804840088,
0.6831134557723999,
1.1120916604995728,
0.18373581767082214,
-0.3505559265613556,
0.001024563447572291,
-0.07468642294406891,
0.46808168292045593,
-1.2093294858932495,
1.204634666442871,... |
def _ serialize ( self ) : return { " label " : self. label, " ipam _ address " : self. ipam _ address, " purpose " : self. purpose, } | [
-1.2634636163711548,
-0.9209299087524414,
0.33635324239730835,
-1.1036920547485352,
-0.6014975309371948,
-0.2772989571094513,
-0.8217446208000183,
0.1505698710680008,
0.2407187521457672,
-0.15655668079853058,
-0.7829242944717407,
0.0767514631152153,
-0.6502129435539246,
-0.8402036428451538... |
def id ( self, value ) : self. id _ value = value | [
0.26505252718925476,
-0.5735350251197815,
0.3151915967464447,
-0.5366735458374023,
0.3491734564304352,
1.3244545459747314,
0.21142961084842682,
0.5962985754013062,
0.1993582546710968,
0.11711430549621582,
-1.1693425178527832,
-0.13511136174201965,
-0.0288261529058218,
0.6859055161476135,
... |
def aggregate _ update ( context, aggregate _ id, values ) : return impl. aggregate _ update ( context, aggregate _ id, values ) | [
-0.6819496154785156,
-0.40938180685043335,
0.4020788073539734,
-0.20276206731796265,
0.019365040585398674,
-0.530421257019043,
-0.5392664074897766,
-0.1912802755832672,
-0.36023616790771484,
0.5684510469436646,
0.12182467430830002,
0.17372451722621918,
-0.5356516242027283,
-0.1213823258876... |
def _ stage3 ( self, pool3 _ stage2 _ map, mconv5 _ stage2 _ map ) : x = f. relu ( self. conv1 _ stage3 ( pool3 _ stage2 _ map ) ) x = torch. cat ( [ x, mconv5 _ stage2 _ map ], dim = 1 ) x = f. relu ( self. mconv1 _ stage3 ( x ) ) x = f. relu ( self. mconv2 _ stage3 ( x ) ) x = f. relu ( self. mconv3 _ stage3 ( x ) ) ... | [
-0.7381007075309753,
-0.7503924369812012,
0.6709659099578857,
0.15412195026874542,
-1.368259310722351,
0.07974882423877716,
0.10651727765798569,
0.28933659195899963,
-0.11141453683376312,
0.9693585634231567,
-0.5279181599617004,
-0.0699511170387268,
0.11204095929861069,
-0.6402212381362915... |
def _ safe _ cat ( self, d1, d2 ) : d = { } for k, v1 in d1. items ( ) : d [ k ] = none if v1 is none else torch. cat ( [ v1, d2 [ k ] ], 0 ) return d | [
0.00566642452031374,
0.23952315747737885,
0.49993896484375,
-0.6808274388313293,
-0.6339512467384338,
-0.7974440455436707,
-1.1859203577041626,
-0.39046940207481384,
-1.139764666557312,
0.846836268901825,
0.4788203239440918,
0.6596761345863342,
0.9895653128623962,
-0.21196365356445312,
0... |
def remove _ task ( self, task = task ( ) ) : if task in self. tasks : self. tasks. remove ( task ) return str ( task ) + " removed. " | [
-0.22747750580310822,
0.26392579078674316,
0.3164574205875397,
0.36747118830680847,
-0.8309593200683594,
-0.327300488948822,
-0.03973127529025078,
0.5880244970321655,
0.5852295756340027,
0.015125826001167297,
-0.792237401008606,
-0.25942134857177734,
-0.29620879888534546,
0.064495183527469... |
def reconfig _ dfe _ set _ dfe _ adaptation ( fpgaid, data, verbose = 1 ) : if ( verbose & 1 ) = = 1 : print " " " writing a 1 to this bit initiates dfe 1 - time adaptation on the specified channel. " " " reconfig _ dfe _ set _ indirect _ register ( fpgaid, 11, data, verbose ) if ( verbose & 1 ) = = 1 : print " = " * 3... | [
-0.5090774893760681,
0.25273796916007996,
0.656264066696167,
-0.5183672904968262,
0.07000403851270676,
-0.32618647813796997,
0.7725204229354858,
-0.02885977365076542,
0.10283149033784866,
0.2251983880996704,
-0.5225585103034973,
1.6650160551071167,
-0.018735548481345177,
0.965660810470581,... |
def direction ( pi, pj, pk ) : return np. cross ( pk - pi, pj - pi ) | [
-0.32191962003707886,
-0.4858846366405487,
0.27716952562332153,
0.1871720552444458,
0.6043919920921326,
0.7728754878044128,
0.043973714113235474,
0.35418301820755005,
0.3542479872703552,
0.4515884220600128,
0.30041220784187317,
-0.6270374655723572,
-0.0768229067325592,
-1.2141870260238647,... |
def _ set _ prefix _ list ( self, v, load = false ) : if hasattr ( v, " _ utype " ) : v = v. _ utype ( v ) try : t = yangdynclass ( v, base = prefix _ list. prefix _ list, is _ container ='container ', presence = false, yang _ name = " prefix - list ", rest _ name = " prefix - list ", parent = self, path _ helper = sel... | [
-0.2203197032213211,
0.4984044134616852,
0.6809448003768921,
-0.03458753973245621,
0.5910143852233887,
-1.0580793619155884,
1.0181015729904175,
-0.5619556903839111,
0.9239685535430908,
1.1678096055984497,
-0.8956807255744934,
-0.21198181807994843,
-0.24578994512557983,
1.1340646743774414,
... |
def test _ desired _ negative ( self ) : invalid = { " name " : " aname ", " desiredcapacity " : - 5, " cooldown " : 5, " type " : " webhook " } self. assertraisesregexp ( validationerror,'is less than the minimum of 0 ', validate, invalid, group _ schemas. policy ) | [
0.11651254445314407,
0.09940516948699951,
0.44324901700019836,
0.6354775428771973,
0.5126773118972778,
1.0879273414611816,
-0.8400455117225647,
-0.3326364755630493,
-0.6310148239135742,
-0.6111373901367188,
0.0034351765643805265,
0.47464218735694885,
-0.7205634713172913,
0.6882869005203247... |
def forward ( self, a _ pred, label ) : # a _ pred, fg, bg, gt _ merge, mask ) : fg = label [ :, : 3, :, : ] bg = label [ :, 3 : 6, :, : ] gt _ merged = label [ :, 6 : 9, :, : ] mask = label [ :, - 1 :, :, : ] prd _ comp = a _ pred * fg + ( 1 - a _ pred ) * bg dis = mask * ( gt _ merged - prd _ comp ) / 255 dis = dis. ... | [
0.13367171585559845,
0.14872442185878754,
0.5793023705482483,
-0.8012880682945251,
-0.5540006160736084,
0.45446574687957764,
0.5385335683822632,
0.41382700204849243,
0.439397394657135,
0.04541945457458496,
0.7519041895866394,
0.6154018640518188,
0.485675573348999,
0.04235969856381416,
0.... |
def calc _ idx _ goals _ attack ( match _ round ) : if idx _ goals _ attack = = { } : create _ team _ list ( rounds [ " 1 " ], idx _ goals _ attack ) for match in match _ round : idx _ goals _ attack [ match [ " host " ] ] [ i _ total ] = goals _ scored [ match [ " host " ] ] [ i _ home ] / \ plays [ match [ " host " ]... | [
-0.957767903804779,
-0.33292949199676514,
0.9264659881591797,
-0.5363712310791016,
-0.1163509413599968,
0.054835591465234756,
1.0292414426803589,
-0.44453123211860657,
-0.9627927541732788,
0.7502332925796509,
-0.10802828520536423,
-0.2980729043483734,
-0.1401587575674057,
-1.13750147819519... |
def gf _ from _ dict ( f, p ) : n, h = max ( f. iterkeys ( ) ), [ ] for k in xrange ( n, - 1, - 1 ) : h. append ( f. get ( k, 0 ) % p ) return gf _ normal ( h, p ) | [
-0.4276558756828308,
0.7190994024276733,
0.34874165058135986,
0.4470587968826294,
-0.7386834621429443,
0.2235814929008484,
-1.1123669147491455,
0.9068704843521118,
-0.6294530034065247,
0.6153510212898254,
0.29989540576934814,
-0.8929648399353027,
-0.5894067883491516,
-0.10648227483034134,
... |
def test _ image _ has _ been _ saved ( datadir ) : pass | [
-0.042053595185279846,
-0.09772153198719025,
0.34361010789871216,
0.26328009366989136,
1.0668938159942627,
0.05232803151011467,
0.9631127715110779,
0.26241829991340637,
0.2602819502353668,
-0.8104789853096008,
-1.0349432229995728,
0.10563033074140549,
0.8505260348320007,
0.9847167730331421... |
def as _ dict ( self ) : d = { } for a in self. list _ attributes ( ) : d [ a ] = self. get _ attribute ( a ) return d | [
-0.6767953038215637,
-0.9733552932739258,
0.23146279156208038,
-0.6121286153793335,
-0.6472504734992981,
-0.438519150018692,
-0.15222656726837158,
0.2039424628019333,
0.07308129221200943,
-0.3369748592376709,
-0.28617632389068604,
0.32345691323280334,
0.37487196922302246,
1.209769487380981... |
def main ( old _ samples _ tsv, old _ segmentations _ tsv, new _ samples _ tsv, benchmark = true ) : # # # read all samples into numpy arrays : print ( " loading data from tsv... " ) old _ data = old _ tsv _ to _ numpy ( old _ samples _ tsv ) segmentations = make _ segmentation _ dict ( old _ segmentations _ tsv ) new ... | [
0.410176545381546,
-0.749096691608429,
0.8548556566238403,
0.17570747435092926,
0.42328014969825745,
0.007785682566463947,
-0.20381945371627808,
0.5507351160049438,
-0.9008648991584778,
0.5385429263114929,
0.08162319660186768,
0.7536422610282898,
0.39862558245658875,
0.2445117086172104,
... |
def _ keyboard _ closed ( self ) - > none : self. _ keyboard. unbind ( on _ key _ down = self. _ on _ keyboard _ down ) self. _ keyboard. unbind ( on _ key _ up = self. _ on _ keyboard _ down ) self. _ keyboard = none | [
-0.042127255350351334,
-0.18540221452713013,
0.5517453551292419,
0.182456836104393,
-1.057197093963623,
0.6749453544616699,
0.9774613976478577,
-0.13048623502254486,
-0.26328545808792114,
-0.21118155121803284,
-0.6137303709983826,
0.15711116790771484,
-0.6631170511245728,
1.302078008651733... |
def _ add ( self ) : balance = float ( input ( " enter the initial balance : " ) ) name = input ( " enter the name : " ) while true : pin = input ( " enter the pin : " ) if self. _ bank. get ( pin ) : print ( " pin is already in the bank " ) else : self. _ account = savingsaccount ( name, pin, balance ) self. _ bank. a... | [
0.26601123809814453,
0.18966835737228394,
0.6498405933380127,
0.7465813159942627,
0.6480926871299744,
1.3020681142807007,
1.0773435831069946,
-0.9132425785064697,
0.3193739056587219,
-0.33311668038368225,
-0.43777281045913696,
0.3286582827568054,
-0.9977840185165405,
-0.12925982475280762,
... |
def linearize _ measure _ contents ( part, start, end, state ) : splits = [ start ] q _ times = part. quarter _ durations ( start. t, end. t ) if len ( q _ times ) > 0 : quarter = start. quarter tp = start. next while tp and tp! = end : if tp. quarter! = quarter : splits. append ( tp ) quarter = tp. quarter tp = tp. ne... | [
0.3229728639125824,
-0.4240298569202423,
0.6094836592674255,
-0.6051786541938782,
-0.6202206611633301,
-0.05949348583817482,
-0.43774932622909546,
-0.43371397256851196,
-0.11897643655538559,
0.3446372151374817,
-0.0449439212679863,
-0.6235629320144653,
-0.16172027587890625,
-0.236262589693... |
def gen _ tutorials ( repo _ dir : str ) - > none : with open ( os. path. join ( repo _ dir, " website ", " tutorials. json " ), " r " ) as infile : tutorial _ config = json. loads ( infile. read ( ) ) tutorial _ ids = { x [ " id " ] for v in tutorial _ config. values ( ) for x in v } for tid in tutorial _ ids : print ... | [
-1.1471115350723267,
0.609714686870575,
0.7879403829574585,
-0.31775692105293274,
-0.039071109145879745,
0.007025104481726885,
0.5395899415016174,
0.026348892599344254,
-0.30419057607650757,
0.696848452091217,
-0.821251630783081,
0.37912383675575256,
1.6244696378707886,
0.10740603506565094... |
def _ get _ all _ pairs _ costs ( self, start _ nodes, end _ nodes = none, end _ speed = 10. 0 ) : end _ speed = end _ speed * 1000. 0 / 3600. 0 # km / h - > m / s if end _ nodes is not none : node _ set = set ( start _ nodes ) | set ( end _ nodes ) else : node _ set = set ( start _ nodes ) end _ nodes = start _ nodes ... | [
-0.5588369369506836,
0.08333063870668411,
0.9398674368858337,
-0.3029747009277344,
-0.8197031021118164,
-0.7485333681106567,
-0.1689721941947937,
0.6404578685760498,
-0.5984277725219727,
1.2401186227798462,
-0.570275604724884,
0.253793329000473,
-0.25888070464134216,
0.461434930562973,
-... |
def get _ variable _ str ( self ) : if self. var _ name is none : prefix ='' else : prefix = self. var _ name suffix = str ( self. var _ value ) if len ( suffix ) = = 0 : suffix = "'' " elif len ( suffix ) > self. _ _ max _ str _ length _ displayed _ _ : suffix ='' if len ( prefix ) > 0 and len ( suffix ) > 0 : return ... | [
-0.05643242970108986,
-0.47371894121170044,
0.619625985622406,
-1.0373749732971191,
-0.3700026869773865,
0.048680707812309265,
-0.4254671633243561,
-0.4796144962310791,
0.2634209990501404,
0.3502974212169647,
0.9165431261062622,
0.9769389033317566,
0.09682328999042511,
0.28272923827171326,... |
def largest _ grid _ product ( grid, n ) : return max ( max _ square _ product ( sq ) for sq in all _ squares ( grid, n ) ) | [
-0.0410248227417469,
1.051374912261963,
0.375814288854599,
0.6936760544776917,
-0.3018645644187927,
-0.5878093242645264,
-0.9125455617904663,
-1.0897027254104614,
0.8344718217849731,
0.5476431250572205,
-0.13804735243320465,
-0.23995426297187805,
0.2378028929233551,
0.7049259543418884,
0... |
def location _ id ( self ) : return self. _ location _ id | [
0.9503155946731567,
-0.8415846228599548,
0.16062641143798828,
0.4545689821243286,
0.6370641589164734,
1.3125383853912354,
1.3780854940414429,
0.7636705636978149,
1.3084567785263062,
-0.528820812702179,
0.5296592116355896,
0.41306716203689575,
0.03968774154782295,
-0.4170759320259094,
-0.... |
def set _ annotmatch _ reviewed ( ibs, annotmatch _ rowid _ list, annotmatch _ reviewed _ list, duplicate _ behavior ='error') : id _ iter = annotmatch _ rowid _ list colnames = ( annotmatch _ reviewed, ) ibs. db. set ( const. annotmatch _ table, colnames, annotmatch _ reviewed _ list, id _ iter, duplicate _ behavior =... | [
-0.5935380458831787,
-0.2925185263156891,
0.4282880127429962,
0.13599944114685059,
-0.1636497527360916,
0.7476230263710022,
-0.4643431603908539,
0.3792015612125397,
0.4289574921131134,
0.8352723717689514,
-1.0241211652755737,
0.6193785667419434,
-0.03676692023873329,
0.055971723049879074,
... |
def get _ results ( log _ dir, output ) : matches = _ up _ re. findall ( output ) if not matches : print ('could not find prefix in results') pfx = matches [ 0 ] results _ path = path. join ( log _ dir, pfx +'- results. json') with open ( results _ path,'r') as fp : return json. load ( fp ) | [
-0.3350793421268463,
-0.4436170160770416,
0.5730790495872498,
-0.18188942968845367,
-0.34569963812828064,
-1.2453272342681885,
0.07585902512073517,
-0.5068359971046448,
-0.5598213076591492,
-0.34576529264450073,
-0.17369335889816284,
-0.19728726148605347,
0.14164410531520844,
-0.5799843072... |
def security _ group _ get _ all ( context ) : return impl. security _ group _ get _ all ( context ) | [
0.06746004521846771,
0.8126825094223022,
0.15689921379089355,
0.7819423675537109,
-0.06607790291309357,
-0.3035517930984497,
-0.8690322041511536,
-1.0495556592941284,
-0.02782677300274372,
-0.9648646116256714,
-0.16482533514499664,
0.6281470656394958,
0.006558562628924847,
0.49924513697624... |
def reconfig _ eyeq _ get _ controlstatus ( fpgaid, verbose = 1 ) : global debug cmd = " rdwr - b % d global. g. rcfg. eyeq _ controlstatus " % fpgaid if ( verbose & 2 ) = = 2 : print cmd out = exec _ cmd ( cmd ) if out = = " " : if ( verbose & 1 ) = = 1 : print " = " * 30 if ( verbose & 1 ) = = 1 : print " eyeq contro... | [
-0.5629101395606995,
-0.05310426652431488,
0.6533151268959045,
-0.5265634059906006,
-0.05178091302514076,
-0.5349456667900085,
0.1812410056591034,
-0.026385799050331116,
0.14230647683143616,
0.42195528745651245,
-0.4136451780796051,
0.1542326956987381,
-0.7109774351119995,
0.58853316307067... |
def get _ protocol _ driver ( protocol = none ) : if protocol is none : try : protocol = config ( ). protocol except exception as e : raise runtimeerror ('protocol not specified') if protocol = ='tcp': from sft. drivers. tcp import tcpdriver # don't move to the top! return tcpdriver ( ) elif protocol = ='udp': from sft... | [
-0.506919264793396,
-0.2653410732746124,
0.37818604707717896,
0.01654839515686035,
0.16152891516685486,
-0.19650930166244507,
0.41791409254074097,
-0.009037586860358715,
0.19483056664466858,
-0.749988853931427,
0.44641298055648804,
0.00914280116558075,
-1.2682006359100342,
-0.1825030744075... |
def encrypt ( self, filename, encrypted _ filename ) : log. debug ('encrypting file % s to % s ', filename, encrypted _ filename ) with open ( filename,'rb') as source _ file : self. gpg. encrypt ( source _ file, self. fingerprint, armor = false, symmetric = false, output = encrypted _ filename ) | [
-0.17554444074630737,
0.3330255448818207,
0.16895294189453125,
0.6178372502326965,
1.0871944427490234,
0.8719160556793213,
0.6920336484909058,
0.6680741906166077,
-1.3068280220031738,
0.8577650189399719,
-0.448172390460968,
0.17869728803634644,
0.1312418133020401,
-0.07420634478330612,
0... |
def resetvar ( self ) : self. objectexist = false self. objectlist = none self. yaml = { } self. feature _ importance = { } | [
-0.2713242769241333,
-1.1211097240447998,
0.23857533931732178,
-0.11549558490514755,
0.6060947775840759,
-0.3378918170928955,
1.0054315328598022,
0.5116853713989258,
-0.6949478983879089,
0.2910304069519043,
-1.6302295923233032,
0.9935991764068604,
0.12245339155197144,
-0.07192851603031158,... |
def rgd ( ) : allowed _ str _ args = ['hgnc _ symbol'] allowed _ int _ args = ['rgdid ','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. rgd ( * * args ) ) | [
-0.7894316911697388,
0.34412696957588196,
0.5770286917686462,
-0.8915749192237854,
0.31698402762413025,
-0.38707029819488525,
-0.04684067517518997,
-0.5776402354240417,
-0.8450623154640198,
0.5140028595924377,
0.6723515391349792,
0.7126380801200867,
-1.4844304323196411,
0.22612015902996063... |
def validate _ search _ modules ( ) : # check we have modules. if not search _ modules : raise exception ('failed to locate any search modules.') | [
-0.5707921981811523,
0.03896293789148331,
0.40439534187316895,
0.2867899239063263,
1.699819564819336,
0.9924099445343018,
-0.3139212727546692,
-1.0174219608306885,
-0.17824524641036987,
0.28395333886146545,
0.1341056525707245,
0.29836001992225647,
-0.03335890918970108,
0.6592323184013367,
... |
def load _ model _ env ( model _ path ) : model _ data = torch. load ( model _ path, map _ location = device ) model _ opt = model _ data ['model _ opts'] lang = model _ data ['lang'] vocab = {'src': vocab ( lang ['vocab'] ['src'] ),'tgt': vocab ( lang ['vocab'] ['tgt'] ),'stack': vocab ( lang ['vocab'] ['stack'] ),'op... | [
-0.10953770577907562,
-0.2891407907009125,
0.6924101710319519,
-1.164844274520874,
-0.6032622456550598,
0.3962329924106598,
-0.7652953267097473,
-0.5560056567192078,
-0.6729011535644531,
1.149478793144226,
-1.0283526182174683,
0.1860453486442566,
0.5921671390533447,
-0.09894454479217529,
... |
def angularmomentum ( mass, r, v ) : return [ mass * ( r [ 1 ] * v [ 2 ] - r [ 2 ] * v [ 1 ] ), mass * ( r [ 0 ] * v [ 2 ] - r [ 2 ] * v [ 0 ] ), mass * ( r [ 0 ] * v [ 1 ] - r [ 1 ] * v [ 0 ] ) ] | [
-0.6570883393287659,
-1.3042241334915161,
0.7338558435440063,
-0.779426634311676,
0.41366371512413025,
-0.1496170461177826,
-0.3443572521209717,
-0.20628707110881805,
0.18676847219467163,
1.1098486185073853,
-0.10921890288591385,
-0.3077393174171448,
-0.43759703636169434,
-0.29622960090637... |
def connect _ callbacks ( self, object _ or _ dict ) : if isinstance ( object _ or _ dict, dict ) : callback _ map = object _ or _ dict else : callback _ map = { attr : getattr ( object _ or _ dict, attr, none ) for attr in dir ( object _ or _ dict ) } for widget, events in self. _ event _ map. items ( ) : for event in... | [
-0.6248875260353088,
-0.8209116458892822,
0.9467350244522095,
0.15202002227306366,
-0.029378343373537064,
-0.18990756571292877,
0.4721587002277374,
0.036449939012527466,
0.6281708478927612,
-0.7831870317459106,
0.2411341369152069,
-0.8535650968551636,
0.44937554001808167,
1.419716835021972... |
def reconfig _ dfe _ set _ tap _ 5 ( fpgaid, data, verbose = 1 ) : if ( verbose & 1 ) = = 1 : print " " " specifies the coefficient for the fifth post tap. the valid range is 0 - 3. " " " # read out = reconfig _ dfe _ get _ indirect _ register ( fpgaid, 5, verbose ) # modify data data = ( out & ~ 7 ) | ( data < < 0 ) r... | [
-0.503324568271637,
0.14804428815841675,
0.5876803398132324,
-0.5052210688591003,
-0.46615836024284363,
-0.10433748364448547,
0.9054780006408691,
-0.3642212450504303,
-0.329617977142334,
0.3377750515937805,
-0.4412720799446106,
0.31089282035827637,
0.04566298425197601,
0.3626949191093445,
... |
def save ( self, filename = " classifier. { timestamp }. p " ) : filename = filename. format ( timestamp = datetime. now ( ). strftime ( " % y % m % d _ % h % m % s " ) ) with open ( filename, " wb " ) as save : pickle. dump ( self, save ) | [
-1.4578850269317627,
-0.7874614000320435,
0.7511555552482605,
0.12343426793813705,
0.9189369678497314,
0.751267671585083,
-0.09900735318660736,
0.4842362701892853,
-0.9618266820907593,
0.5847141742706299,
-1.211864709854126,
-0.24216511845588684,
0.4020828604698181,
0.286508709192276,
-0... |
def get _ bet ( player _ posn, bet _ num = 0 ) : return players [ player _ posn ] ['bet'] [ bet _ num ] | [
-0.2438252568244934,
-0.8680440187454224,
0.21574203670024872,
0.7257301211357117,
0.2836771011352539,
-0.20949912071228027,
-0.16267180442810059,
0.37891438603401184,
-0.7292488217353821,
-0.15098415315151215,
0.4192909896373749,
0.4156624376773834,
-0.13705189526081085,
-1.34318268299102... |
def get _ random _ num ( bits ) : order = bn ( 2 ). pow ( bits ) return order. random ( ) | [
-1.2225104570388794,
0.5765653252601624,
0.398811012506485,
1.013879418373108,
-0.20990519225597382,
0.35562318563461304,
0.2795960605144501,
-0.7117924094200134,
-0.03959871083498001,
-1.0456305742263794,
-0.8036778569221497,
0.7624424695968628,
-0.3906857669353485,
0.0460069365799427,
... |
def assert _ profile ( ) : if settings is none : raise runtimeerror ( " a profile hasn't been loaded. " ) | [
0.9690149426460266,
0.5035220980644226,
0.43349286913871765,
-0.02660948783159256,
1.44584059715271,
0.026035847142338753,
0.41337257623672485,
-0.8234686255455017,
0.011667408049106598,
-0.5643272995948792,
-0.18219633400440216,
0.030176540836691856,
-0.6814723610877991,
1.263818621635437... |
def test _ parse _ loglevel _ invalid ( self ) : notset = logging. notset self. assertequal ( parse _ loglevel ('' ), notset ) self. assertequal ( parse _ loglevel ('' ), notset ) self. assertequal ( parse _ loglevel ( none ), notset ) self. assertequal ( parse _ loglevel ( notset ), notset ) self. assertequal ( parse ... | [
0.3781152665615082,
-0.1052081286907196,
0.6530192494392395,
-0.48023882508277893,
0.6685464382171631,
-0.04384330287575722,
-0.7504081130027771,
-0.07510655373334885,
0.07806156575679779,
-0.732526421546936,
-0.9559871554374695,
0.2302265614271164,
-0.40471506118774414,
-0.196156397461891... |
def end _ part ( self ) : # this is not needed because we update part [ " size " ] # self. fout. close ( ) # self. fout. flush ( ) pass | [
0.6722927689552307,
-1.4422156810760498,
0.49337220191955566,
-0.7501416802406311,
-0.2035125344991684,
1.0520368814468384,
0.2886458933353424,
0.19773957133293152,
-1.1755456924438477,
-0.3419102728366852,
0.12951499223709106,
0.1799272745847702,
-0.613914966583252,
0.6544161438941956,
... |
def test _ access _ generator ( test _ class, user, file _ name, content, mode ) : def test ( self ) : # if mask of mode for a file from 0770 to 0773, the access should be forbidden. if int ( mode, 8 ) < = 0773 : # check access to file for a give user with self. assertraises ( sb. calledprocesserror ) as cm : sb. check... | [
0.09588254243135452,
-0.2743748426437378,
0.6400339603424072,
-0.008566191419959068,
-0.15681494772434235,
0.48012739419937134,
1.2746120691299438,
0.15612106025218964,
-0.8751800656318665,
-0.9432335495948792,
1.1614267826080322,
-0.05234505981206894,
0.47990795969963074,
0.11075681447982... |
def notify ( self, data _ object, ref _ uuid = none ) : alert _ uuid = str ( ref _ uuid ) if ref _ uuid else uuid. uuid4 ( ). hex log. debug ('notify uuid = { 0 } '. format ( alert _ uuid ) ) template _ variables = {'to _ name': ', '. join ( [ to ['first _ name'] for to in self. recipients ] ),'hotel': {'name': data _ ... | [
-0.5559689998626709,
0.13365517556667328,
0.7953037023544312,
-0.28503721952438354,
-0.5066807866096497,
-0.4975746273994446,
-0.19124943017959595,
0.7227456569671631,
-0.43622300028800964,
0.5464235544204712,
-0.20960770547389984,
0.7156366109848022,
0.050352081656455994,
0.27234771847724... |
def json _ patch ( obj ) : if isinstance ( obj, datetime. datetime ) \ or isinstance ( obj, datetime. date ) \ or isinstance ( obj, datetime. time ) : return obj. isoformat ( ) raise typeerror ( " unknown non - serializable type " ) | [
-0.5986054539680481,
-0.5775951743125916,
0.8670069575309753,
0.18151426315307617,
-0.7710444331169128,
0.8169256448745728,
-0.1345818191766739,
-0.4267829656600952,
1.1733436584472656,
0.46059903502464294,
0.5229580998420715,
0.5308551788330078,
-0.2684926688671112,
-0.1374015510082245,
... |
def frac _ batch _ exact ( n ) : # fig. 3 of https : / / arxiv. org / pdf / 1712. 07296. pdf uses 1 / 8 and 1 / 4 of the samples frac = 8 return gramcomputations ( extension _ cls _ directions = sqrtggnexact, extension _ cls _ second = sqrtggnexact, compute _ gammas = false, compute _ lambdas = false, subsampling _ dir... | [
0.6093279719352722,
0.44733384251594543,
0.6299416422843933,
0.602961003780365,
0.09489239752292633,
-0.29778188467025757,
0.9191868901252747,
-0.9455556273460388,
-0.03134112060070038,
-0.039419032633304596,
-0.5290507078170776,
0.06062605604529381,
0.057915572077035904,
0.145239815115928... |
def rebuild ( self, exprs ) : return cluster ( exprs, self. stencil ) | [
-0.22740110754966736,
-0.8185788989067078,
0.028348704800009727,
-0.19074700772762299,
-0.40055516362190247,
-0.5384789109230042,
0.7677575945854187,
0.10378000140190125,
0.1323477327823639,
-0.5578347444534302,
0.4803035259246826,
1.3624730110168457,
-0.7255693674087524,
-1.88591015338897... |
def face _ down ( self, cards ) : def card _ to _ string ( card ) : # add the individual card on a line by line basis return card. hidden _ card ( ) # card. playingcard ( ). format ( rank = rank, suit = deck. suits ( ) [ card. suit ] ) return self. join _ lines ( map ( card _ to _ string, cards ) ) | [
-0.15892033278942108,
-0.5514337420463562,
0.537356972694397,
0.1419382393360138,
0.594446063041687,
0.4288993179798126,
-0.3505784571170807,
-0.18206098675727844,
0.2057153582572937,
-0.033570051193237305,
0.3202085793018341,
0.1202746331691742,
-0.026740144938230515,
0.49429458379745483,... |
def load _ as _ json ( filename ) : # we will generate an " unversioned " odata uri, which is not a thing that exists, # in order to group objects. this is a hack and should be eliminated. if'/ odata. json'in filename : return none data = { } try : # parse file as json jsondata = open ( filename,'r ', encoding = " utf8... | [
-0.9578567147254944,
-0.8115343451499939,
0.6832388043403625,
-1.3347716331481934,
-1.0473757982254028,
-0.8034107685089111,
-0.35799258947372437,
-0.8883827924728394,
-0.22909103333950043,
-0.04502863064408302,
-0.39173266291618347,
0.28701189160346985,
0.17787908017635345,
-0.32652875781... |
def volume _ get _ all _ by _ instance _ uuid ( context, instance _ uuid ) : return impl. volume _ get _ all _ by _ instance _ uuid ( context, instance _ uuid ) | [
-0.5980989336967468,
-0.8474562168121338,
0.5044182538986206,
0.060720402747392654,
0.6384901404380798,
-0.40561485290527344,
-0.5120050311088562,
0.13239601254463196,
-0.1803223192691803,
-0.07787184417247772,
0.1006496474146843,
0.5022777318954468,
0.13733182847499847,
-0.176785215735435... |
def disconnect ( self ) : try : self. transport. close ( ) except exception, e : self. lg. error ( " failed to disconnect % s " % str ( e ) ) self. lg. debug ( traceback. format _ exc ( ) ) self. _ _ count _ error ( str ( e ) ) | [
-0.22264602780342102,
-0.3277049958705902,
0.5761813521385193,
-1.0972542762756348,
-0.11173590272665024,
0.424397736787796,
-0.21149982511997223,
0.13030913472175598,
-0.4618990123271942,
-0.3677450120449066,
0.43599817156791687,
-0.05355530604720116,
-0.5546878576278687,
-0.4415940046310... |
def _ init _ metadata _ table ( ) : _ metadata _ table = sqlalchemy. table ('metadata ', _ metadata, sqlalchemy. column ('job _ id ', sqlalchemy. foreignkey ( " jobs. job _ id ", ondelete = " cascade " ), nullable = false, primary _ key = true ), sqlalchemy. column ('key ', sqlalchemy. unicodetext, primary _ key = true... | [
0.9453689455986023,
0.4567943513393402,
0.6683753728866577,
-0.5603650212287903,
0.011101889424026012,
-0.10414230823516846,
-0.6260876655578613,
-0.1559867113828659,
-1.2164063453674316,
0.6500568389892578,
-0.36723020672798157,
0.5928705930709839,
0.4509536623954773,
0.4327722191810608,
... |
def get _ token ( self, headers : dict ) - > t. optional [ str ] : auth _ token = headers. get ( b " authorization ", none ) if not auth _ token : return none auth _ str = auth _ token. decode ( ) if not auth _ str. startswith ( " bearer " ) : return none return auth _ str. split ( " " ) [ 1 ] | [
-0.20252059400081635,
-0.4412766993045807,
0.5720018744468689,
0.7188733220100403,
-0.05723011866211891,
-1.058767557144165,
-0.8746204376220703,
0.10412012040615082,
0.40653103590011597,
-0.050738316029310226,
0.29005828499794006,
0.15386109054088593,
0.05788139998912811,
-0.7824286222457... |
def score _ model ( model, data, metric ) : x, y _ true = data y _ pred = model. predict ( x ) return metric. _ _ name _ _, metric ( y _ true, y _ pred ) | [
0.22338742017745972,
-0.33814263343811035,
0.4107273817062378,
0.4759875535964966,
-0.7457385063171387,
0.5868415236473083,
-0.8592350482940674,
-0.6227948069572449,
-1.5545071363449097,
0.7882980108261108,
-0.11029405891895294,
-0.24438700079917908,
1.5878452062606812,
-0.4970296025276184... |
def instance _ destroy ( context, instance _ uuid, constraint = none ) : return impl. instance _ destroy ( context, instance _ uuid, constraint ) | [
-1.2174723148345947,
-0.11009443551301956,
0.28538575768470764,
-0.4735579788684845,
-0.45569199323654175,
-0.26229164004325867,
0.3061164915561676,
1.4276527166366577,
0.018616577610373497,
1.0744589567184448,
0.12561607360839844,
0.10231580585241318,
-0.6340521574020386,
-1.4268386363983... |
async def send _ cog _ help ( self, cog : commands. cog ) : dest = self. get _ destination ( ) await dest. send ( embed = self. get _ cog _ help ( cog ) ) | [
-0.4183466136455536,
0.106942318379879,
0.37344345450401306,
0.37492385506629944,
0.2650567889213562,
0.11197298020124435,
0.3802173137664795,
0.24768543243408203,
-1.107045292854309,
0.92903071641922,
-0.5703495144844055,
1.2346115112304688,
0.8167296648025513,
-0.05011043697595596,
0.2... |
def batch _ iterator ( iterator, batch _ size ) : entry = true # make sure we loop once while entry : batch = [ ] while len ( batch ) < batch _ size : try : entry = next ( iterator ) # # had to change this for python3 except stopiteration : entry = none if entry is none : # end of file break batch. append ( entry ) if ... | [
0.7759085893630981,
-0.7441429495811462,
0.43618908524513245,
0.21933582425117493,
-0.7492272257804871,
-0.029038215056061745,
-0.9497315883636475,
0.39832866191864014,
-0.12493127584457397,
0.38729557394981384,
0.1732318252325058,
-0.2735785245895386,
0.038602374494075775,
0.3182480037212... |
def _ process ( self ) : while true : self. thread. stop _ request. wait ( self. refresh _ interval ) if self. thread. stop _ request. isset ( ) : break # todo : jobs can be in queue before process loop is started # what happens when manager is stopped while jobs are running? self. lock. acquire ( ) if self. running is... | [
-0.23857486248016357,
-1.3098520040512085,
0.6969934701919556,
-0.4802674651145935,
0.6729358434677124,
-0.17691636085510254,
-0.34039947390556335,
-0.6209419965744019,
-0.5439505577087402,
-0.20831598341464996,
0.18422847986221313,
-0.037203673273324966,
-0.3051331043243408,
0.46954995393... |
def downsample _ data _ slow ( x, n ) : from pybasicbayes. util. stats import sample _ discrete assert x. ndim = = 2 xsub = x. copy ( ) for i in range ( xsub. shape [ 0 ] ) : mi = int ( xsub [ i ]. sum ( ) ) assert mi > = n # if mi > 1e8 : print " warning : m is really large! " p = xsub [ i ] / float ( mi ) # random re... | [
0.8733620047569275,
0.5410651564598083,
0.6108325719833374,
-0.09680233150720596,
-0.8967369794845581,
-0.062386058270931244,
-0.12789508700370789,
-0.07301458716392517,
0.9353346228599548,
-0.49803751707077026,
0.031450752168893814,
0.26466843485832214,
-0.2947189509868622,
-0.06566040962... |
def destroy _ tag ( self ) : tags = " { } / tags ". format ( self. iocroot ) try : os. remove ( " { } / { } ". format ( tags, self. jail ) ) except oserror : pass | [
0.6896606683731079,
-0.1518935114145279,
0.08303850144147873,
0.3425663709640503,
1.3781514167785645,
-0.1953236609697342,
0.2944961190223694,
0.32704293727874756,
-1.3193390369415283,
0.25701427459716797,
0.1876581460237503,
-0.22460991144180298,
-0.8456011414527893,
1.0381821393966675,
... |
def eat ( self ) : " " " if there are less than 10 units eat them all " " " if self. env [ self. _ y ] [ self. _ x ] > 10 : self. env [ self. _ y ] [ self. _ x ] - = 10 self. store + = 10 else : self. store + = self. env [ self. _ y ] [ self. _ x ] self. env [ self. _ y ] [ self. _ x ] = 0 " " " agent is sick if store ... | [
-0.07836698740720749,
-0.4783850312232971,
0.6701445579528809,
-0.8374470472335815,
0.7992556691169739,
0.14991892874240875,
0.27370157837867737,
0.013322407379746437,
0.49130529165267944,
0.5574629306793213,
0.15677915513515472,
0.36468449234962463,
0.18948036432266235,
0.1680036038160324... |
def test _ service _ list _ route _ inrow _ delete ( live _ server, sl _ operator, service ) : # pylint : disable = unused - argument service _ id = service. id db. session. expunge ( service ) sl _ operator. get ( url _ for ('storage. service _ list _ route ', _ external = true ) ) dt _ inrow _ delete ( sl _ operator,... | [
-0.5132042765617371,
0.9656590819358826,
0.4047553241252899,
0.38290345668792725,
0.2737686336040497,
-0.20804661512374878,
-0.33620399236679077,
0.37944504618644714,
0.679000198841095,
0.11868048459291458,
0.2443026602268219,
0.06010120362043381,
-0.19684205949306488,
0.8651686906814575,
... |
def renamecolumns ( df ) : for column in df. columns : new _ column = re. sub ('\ w ','', column ). lower ( ) # strip all special characters df = df. withcolumnrenamed ( column, new _ column ) return df | [
0.1254304200410843,
-0.9617108702659607,
0.573521614074707,
-0.35620856285095215,
-0.5111110806465149,
-0.3765491247177124,
-0.6721512079238892,
0.16624164581298828,
-0.13277877867221832,
0.34938883781433105,
-0.07544347643852234,
0.6090533137321472,
0.5150518417358398,
-0.3945994377136230... |
def robotinit ( self ) : # initialize network tables for communication with the dashboard in the driver station # problem : could be that the version on roborio does not match or ip of roborio is not right # set up loging networktables. initialize ( ) self. table = networktables. gettable ('nautilus') # setup pneumatic... | [
0.21314512193202972,
0.47335949540138245,
0.7700839042663574,
-0.14103861153125763,
0.3472955524921417,
0.22681646049022675,
-0.007946674712002277,
-0.38228341937065125,
-0.347520112991333,
-0.1502387970685959,
-0.769290566444397,
-0.15261635184288025,
-0.5344029068946838,
0.89581131935119... |
def clean _ the _ keys ( self, input _ data ) : try : # some characters need to be replaced with a valid replacement value because # simply deleting them could cause problems. add additional k / v pairs to # chars _ to _ replace as needed. chars _ to _ replace = {'_ ghostxml _':'_ ','+':'_ plus _ ','-':'_ minus _ ','tr... | [
-1.2688813209533691,
0.3236102759838104,
0.8480680584907532,
-1.188764214515686,
-1.3530244827270508,
-0.5632129907608032,
-0.2709289789199829,
0.1390874832868576,
-0.7496720552444458,
-0.0054335882887244225,
-0.4912583827972412,
0.1721055656671524,
0.20453083515167236,
-0.0753294378519058... |
def reconfig _ eyeq _ set _ counter _ enable ( fpgaid, data, verbose = 1 ) : if ( verbose & 1 ) = = 1 : print " " " only available when you turn on the enable bit error rate block in the transceiver reconfiguration controller ip core gui. when set to 1, the counters accumulate bits and errors. when set to 0, pauses acc... | [
0.19401173293590546,
-0.11334783583879471,
0.7228953242301941,
-0.6320003271102905,
0.09693827480077744,
0.22850029170513153,
0.6848004460334778,
0.4132841229438782,
-0.337634801864624,
0.536872923374176,
-0.3683719336986542,
0.8477392196655273,
-0.9769086837768555,
0.613342821598053,
1.... |
def _ _ init _ _ ( self, n _ estimators = 500, n _ jobs = - 1, n _ bins = 2, min _ leaf = 1, max _ depth = 2, n _ samples = 1. 0, max _ features = " auto ", bootstrap = true, random _ state = 42, criterion = " auc _ sub ", bias _ method = " avg ", compound _ bias _ method = " avg ", orthogonality =. 5 ) : self. is _ fi... | [
0.4477546215057373,
-0.02048155665397644,
0.7447682023048401,
1.2440623044967651,
0.3872121572494507,
-0.30502620339393616,
0.2220667004585266,
-0.3188892900943756,
-0.558108925819397,
-0.08343113213777542,
0.32034188508987427,
0.6832451224327087,
0.01055776234716177,
0.7064841985702515,
... |
def nested _ expression _ to _ tree ( nested _ expression, predicates _ with _ strings ) - > node : if isinstance ( nested _ expression, str ) : if not predicates _ with _ strings : current _ node = node ( predicate = nested _ expression ) else : predicate _ w _ stringarg = nested _ expression # this can either be a pl... | [
-0.038499537855386734,
-0.6466234922409058,
0.7059118747711182,
-0.3559296727180481,
-0.36881446838378906,
0.09916328638792038,
0.24420271813869476,
0.4893037974834442,
0.2460765689611435,
-0.09134767204523087,
0.1774953305721283,
1.0997333526611328,
-0.7040218114852905,
0.2232232242822647... |
def get _ account _ bank ( self, token = none ) : return self. _ request ( " account / bank ", access _ token = token ) if token else self. _ request ( " account / bank " ) | [
-0.03158631920814514,
0.9747452139854431,
0.3841575086116791,
1.3146775960922241,
1.454601764678955,
-0.19343456625938416,
-0.0625707134604454,
-0.7271864414215088,
0.08450963348150253,
-1.3133536577224731,
0.6472492218017578,
1.6018798351287842,
-0.45040732622146606,
0.26855263113975525,
... |
def model _ count ( self ) : return len ( self. models ( ) ) | [
-0.9220775365829468,
-0.08047552406787872,
0.24224841594696045,
-0.02831127494573593,
1.5466090440750122,
0.941531240940094,
0.12864556908607483,
0.4878997802734375,
-0.16528946161270142,
-0.35307496786117554,
-1.358949065208435,
-0.39444851875305176,
0.588617205619812,
0.22458571195602417... |
async def fetch _ trades ( self, symbol : str, since : optional [ int ] = none, limit : optional [ int ] = none, params = { } ) : await self. load _ markets ( ) request = {'symbol': self. market _ id ( symbol ), } if limit is not none : request ['size'] = limit market = self. market ( symbol ) response = await self. pu... | [
-0.24146214127540588,
1.2108865976333618,
0.76763516664505,
0.15865999460220337,
-0.22121158242225647,
-0.35563138127326965,
-0.3631322979927063,
-0.7897136807441711,
0.22818495333194733,
0.011479225941002369,
-0.42738839983940125,
1.2140896320343018,
-0.32196420431137085,
-0.1500214636325... |
def algo ( self ) : s _ v = input ( " source vertex : " ) d _ v = input ( " destination vertex : " ) s = [ s _ v ] label = { } label [ ( s _ v, s _ v ) ] = [ [ ], 0 ] while ( d _ v not in s ) : lab = { } final = [ ] for j in s : r = [ m for m in self. res if j in m ] cr = [ set ( p ) for p in r ] for _ in cr : _. remov... | [
-0.591244101524353,
-0.15593118965625763,
1.0691717863082886,
-0.15754367411136627,
-0.6559329628944397,
-0.19868190586566925,
1.2856065034866333,
0.2190818190574646,
0.15349727869033813,
0.5844821333885193,
-0.4355601966381073,
-0.3176681399345398,
0.2943356931209564,
-0.7747841477394104,... |
def _ _ new _ _ ( cls, a = [ ] ) : obj = np. array ( a, dtype = object, order = " f ", ndmin = 2 ). view ( cls ). copy ( order = " f " ) if obj. size = = 0 : obj. shape = ( 0, 0 ) return obj | [
-0.6881354451179504,
-1.0366389751434326,
0.7548263072967529,
0.7476679682731628,
-0.4455179274082184,
0.02601751871407032,
0.8899537920951843,
-0.08733846247196198,
0.6756261587142944,
-0.37032419443130493,
-0.12691667675971985,
0.5174035429954529,
0.7472743391990662,
0.638664186000824,
... |
def floating _ ip _ fixed _ ip _ associate ( context, floating _ address, fixed _ address, host ) : return impl. floating _ ip _ fixed _ ip _ associate ( context, floating _ address, fixed _ address, host ) | [
-0.15898482501506805,
-0.4300755262374878,
0.48394039273262024,
0.44775375723838806,
-0.02053585834801197,
-0.18022386729717255,
0.7350407242774963,
0.2046554982662201,
0.07738882303237915,
-0.39831387996673584,
-0.11599273979663849,
0.49616944789886475,
-0.5548709630966187,
0.470917522907... |
def find _ violation ( ) : # # - - - find which msids have the sub html page cared # cmd ='ls'+ web _ dir +'* _ plot. html >'+ zspace os. system ( cmd ) data = ecf. read _ file _ data ( zspace, 1 ) v _ list = [ ] vdict = { } for ent in data : atemp = re. split ('\ / ', ent ) btemp = re. split ('_ plot ', atemp [ - 1 ] ... | [
1.3495107889175415,
-0.42422205209732056,
0.4570053219795227,
-0.33138468861579895,
-0.5002821683883667,
-0.3156708776950836,
0.23690608143806458,
1.2173335552215576,
-0.2299792319536209,
1.1553281545639038,
-0.17825911939144135,
0.18175458908081055,
-0.9136344194412231,
1.5088880062103271... |
def _ _ init _ _ ( self, solver, params, context ) : # call super self. process = none self. active = true super ( cposolverlocal, self ). _ _ init _ _ ( solver, params, context ) # check if executable file exists if context. execfile is none : raise cpoexception ( " executable file should be given in'execfile'context ... | [
0.6182893514633179,
-0.974263608455658,
0.7890494465827942,
0.05391298979520798,
0.08258191496133804,
0.5953248143196106,
0.7653425335884094,
-0.07060837000608444,
-0.9024409055709839,
0.5442085862159729,
-0.7355188131332397,
-0.3388839364051819,
0.4837319850921631,
0.2648715078830719,
0... |
def winbio _ winbiologonidentifieduser ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " sessionhandle " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value ) | [
-0.5523934364318848,
-0.22693343460559845,
0.2895907461643219,
1.1210155487060547,
-0.5808603167533875,
0.5575116872787476,
1.2093366384506226,
-0.6360116600990295,
0.25247544050216675,
-0.14835315942764282,
-0.6370861530303955,
0.22279925644397736,
-1.1799719333648682,
0.6962957382202148,... |
def game _ page ( self, content ) : games = [ ] soup = beautifulsoup ( content, " lxml " ) for a in soup. findall ( " a ", { " class " : " game - center - link " } ) : game = { } pattern = re. compile ( r " / gamecenter / ( \ d + ) / ( \ d + ) / reg ( \ d + ) / ( [ a - za - z0 - 9 ] + [ @ ] { 1 } [ a - za - z0 - 9 ] + ... | [
-0.5694295167922974,
-0.043548960238695145,
0.9171504974365234,
-0.9054636359214783,
0.587733805179596,
-0.34636446833610535,
-0.8865744471549988,
-0.4234808385372162,
-0.11044976860284805,
1.0872461795806885,
0.508612334728241,
-0.8738555312156677,
0.08859638124704361,
0.27596187591552734... |
def labels ( self ) - > pulumi. output [ optional [ mapping [ str, str ] ] ] : return pulumi. get ( self, " labels " ) | [
-0.08643355220556259,
-0.5157854557037354,
0.4854227602481842,
-0.21876724064350128,
0.4947408139705658,
0.651861310005188,
-0.7069465517997742,
0.01572122983634472,
0.7536946535110474,
-0.10576663911342621,
-0.2874128520488739,
-0.12108749151229858,
0.1536078155040741,
-0.5211125016212463... |
def check _ errors _ in _ file ( preferences _ string, file _ name ) : preferences _ lines = preferences _ string. splitlines ( ) for line _ num, line in enumerate ( preferences _ lines ) : if line. count ( " \ t " )! = 4 : return " inputerror : you have incorrect number of values in line " \ + str ( line _ num + 1 ) +... | [
-0.5995826721191406,
-0.3191666901111603,
0.6580570340156555,
-0.13297604024410248,
0.2652745544910431,
0.2542963922023773,
-0.44218891859054565,
0.07441406697034836,
-0.9046258330345154,
0.13030613958835602,
0.7811861634254456,
0.4281444847583771,
-0.6553577780723572,
-0.14187292754650116... |
def isscheddoverloaded ( self ) : try : scheddad = self. coll. locate ( htcondor. daemontypes. schedd ) q = self. coll. query ( htcondor. adtypes. schedd,'name = = " % s "'% scheddad ['name'], projection = ['curbmatchmaking'] ) [ 0 ] isoverloaded = q ['curbmatchmaking']. eval ( ) return isoverloaded except exception : ... | [
-0.413690447807312,
0.07062328606843948,
0.7456825375556946,
-0.6979212164878845,
-0.20176270604133606,
0.15475621819496155,
-0.30997729301452637,
-0.8224099278450012,
-0.07227746397256851,
-0.2627938687801361,
-0.3325778543949127,
0.2183467447757721,
-0.14731259644031525,
0.24553367495536... |
def insert _ upstream _ table ( self ) : upstream _ msg _ insertion = self. get _ upstreammsg _ table ( ). insert ( ) upstream _ msg _ insertion. execute ( recvtime = self. recvtime, mobile = self. mobile, content = self. content ) | [
-0.8234423398971558,
1.0274450778961182,
0.9151028990745544,
-0.376545250415802,
-0.11148131638765335,
0.5587134957313538,
0.8002570271492004,
-0.20463955402374268,
-1.0620911121368408,
0.6200574636459351,
-0.32369694113731384,
0.4408643841743469,
-1.2749052047729492,
0.7242192029953003,
... |
def test _ bands _ from _ castepbin ( db _ test _ app, generate _ parser, data _ path, generate _ calc _ job _ node, sto _ calc _ inputs ) : inputs = sto _ calc _ inputs output _ folder = " si2 - castepbin " atoms = bulk ( " si2 ", " zincblende ", a = 4. 0 ) inputs. structure = structuredata ( ase = atoms ). store ( ) ... | [
0.4913123846054077,
-0.35772988200187683,
0.4576846957206726,
0.557573676109314,
0.5961764454841614,
0.44332271814346313,
0.22254423797130585,
-0.18552125990390778,
0.029856637120246887,
-0.5066388845443726,
-0.38367605209350586,
0.3071043789386749,
-0.21265453100204468,
-0.003783611115068... |
def extract _ gloabls ( self, node ) : global _ nodes = self. traverse _ tree ( node, skip = ( ast. function, ast. lambda ) ) global _ nodes = self. filter _ nodes ( global _ nodes, ast. global ) global _ names = [ ] for n in global _ nodes : global _ names + = n. names return global _ names | [
-0.3460789918899536,
1.0243288278579712,
0.9843571782112122,
-0.05224459990859032,
-0.6142001152038574,
0.6481324434280396,
0.23273144662380219,
-0.3701993227005005,
0.06701721996068954,
1.6574161052703857,
-0.29892754554748535,
0.5371919870376587,
-0.16546274721622467,
1.1054037809371948,... |
def origin _ protocol _ policy ( self ) - > typing. optional [ " originprotocolpolicy " ] : return self. _ values. get ('origin _ protocol _ policy') | [
0.5052502751350403,
-0.4615737497806549,
0.2255823016166687,
-0.024586498737335205,
0.2090616524219513,
2.7988150119781494,
0.3430708050727844,
0.12902438640594482,
0.6957723498344421,
0.02022031508386135,
0.08698605000972748,
0.621052086353302,
-0.7036622166633606,
-1.0364959239959717,
... |
def run _ nb _ full ( x _ train, y _ train, x _ test, y _ test, randseed, i, param _ grid, n _ trials, timeout, do _ plot, full _ path, use _ uniform _ fi, primary _ metric ) : # train model using'best'hyperparameters - uses default 3 - fold internal cv ( training / validation splits ) clf = gaussiannb ( ) model = clf.... | [
0.6161202192306519,
0.523037314414978,
0.6660280227661133,
0.678085207939148,
0.5068233013153076,
-0.037411630153656006,
0.8906698822975159,
0.217021644115448,
-0.5419940948486328,
0.6814608573913574,
-0.4633151590824127,
0.10753349214792252,
0.347959965467453,
0.2796359956264496,
0.3464... |
def createdataframe ( item ) : format = item ['format'] path = item ['source'] if ('path'not in item ) else item ['path'] dataframe = none try : if format = ='json': dataframe = sqlcontext. read. json ( path ) elif format = ='xml': # todo : improve xml schema inference dataframe = sqlcontext. read. format ('com. databr... | [
-0.0952957272529602,
-0.28839245438575745,
0.6079190373420715,
0.15587174892425537,
0.2548621594905853,
-0.5893940329551697,
-0.10285989195108414,
-0.2640245854854584,
-0.05498877540230751,
-0.5559207797050476,
0.08893980085849762,
0.39573100209236145,
-0.026163160800933838,
-0.14805035293... |
async def test _ import _ usb ( hass, dsmr _ connection _ send _ validate _ fixture ) : await setup. async _ setup _ component ( hass, " persistent _ notification ", { } ) entry _ data = { " port " : " / dev / ttyusb0 ", " dsmr _ version " : " 2. 2 ", " precision " : 4, " reconnect _ interval " : 30, } with patch ( " h... | [
0.4455001950263977,
0.634630560874939,
0.5399161577224731,
0.35237565636634827,
0.8739754557609558,
0.174103245139122,
0.43585601449012756,
0.19906023144721985,
0.4288763701915741,
-0.3991185128688812,
-1.1036802530288696,
0.16644558310508728,
0.15851904451847076,
-0.09558659791946411,
0... |
def my _ lovely _ hat ( file ) : error = none n = 0 while true : line = yield error error = none if not line : break line = line. strip ( ) if not line : continue if line. startswith ( ".. " ) : continue if set ( line ) < set ( [ " # ", " - ", " = ", " * " ] ) : break else : lines = [ line, " \ n ", ( yield none ), ( y... | [
0.531853437423706,
-0.7102490067481995,
0.9806312322616577,
0.4992420971393585,
-0.8408451676368713,
0.4371952414512634,
-0.5286831259727478,
-0.7438461780548096,
-0.8228375315666199,
-0.17433831095695496,
0.44834014773368835,
0.17439842224121094,
0.5242006182670593,
-0.09998147934675217,
... |
def test _ invalid _ metadata _ does _ not _ validate ( self ) : base = {'name': " stuff ",'cooldown': 60,'minentities': 1 } invalids = [ # because draft 3 doesn't support key length, so it's a regexp ( {'key'* 256 : " " }, " additional properties " ), ( {'key': " value " * 256 }, " is too long " ), ( {'key': 1 }, " no... | [
-0.7253279089927673,
0.31347307562828064,
0.45899349451065063,
0.18798509240150452,
0.27685606479644775,
0.5004965662956238,
-0.837156355381012,
0.12314929068088531,
-0.6034542918205261,
-0.024046899750828743,
-0.3084985613822937,
-0.18467207252979279,
-0.5837554335594177,
0.27951204776763... |
def show _ stats ( self ) : num _ shelves = len ( self. shelves ) - 1 num _ checked _ out = len ( self. shelves [ 0 ]. books ) num _ books = 0 for shelf in self. shelves [ 1 : ] : num _ books + = len ( shelf. books ) print ( " stats : { b } books on { s } shelves. { c } books currently checked out. ". format ( b = num ... | [
0.8189239501953125,
-0.5142717361450195,
0.3460668623447418,
0.18424074351787567,
0.6988778114318848,
0.7918027639389038,
1.2199985980987549,
-0.6521486639976501,
-0.5153871774673462,
0.19929836690425873,
0.5773379802703857,
0.5022072196006775,
0.3027912378311157,
0.9156442880630493,
1.0... |
def test _ helpful _ error _ message _ for _ many2many _ natural1 ( self ) : test _ strings = [ " " " { " pk " : 1, " model " : " serializers. categorymetadata ", " fields " : { " kind " : " author ", " name " : " meta1 ", " value " : " agnes " } } " " ", " " " { " pk " : 1, " model " : " serializers. article ", " fiel... | [
-0.6640757322311401,
0.3456672430038452,
0.651630699634552,
-0.24798762798309326,
-0.4043160378932953,
-0.11702477186918259,
-0.37971436977386475,
-0.3311198055744171,
-1.4264442920684814,
0.21197108924388885,
-0.4973146319389343,
-0.4847276508808136,
0.1994226574897766,
0.4402062296867370... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.