text
stringlengths
25
2.19k
embedding
listlengths
768
768
def get _ queries ( self, graph, node, ts _ from, ts _ to ) : raise notimplementederror ( )
[ -0.3921218514442444, 0.588639497756958, 0.4315391480922699, 0.008631817996501923, 0.43776679039001465, 0.2263336479663849, -0.7941878437995911, -0.37406250834465027, -1.36995267868042, 0.20262379944324493, 0.36388346552848816, 0.6393640637397766, 0.901177704334259, -0.6767053008079529, -...
def value ( self, items : bundle ) - > float : return sum ( [ sub _ agent. value ( items ) for sub _ agent in self. sub _ agents ] )
[ 0.5886126756668091, -0.6455549001693726, 0.40744972229003906, 0.6150306463241577, 0.620731770992279, 0.20671610534191132, 0.00022331443324219435, 0.12073974311351776, -0.4858280420303345, 0.14379869401454926, -0.9733814597129822, -0.45444220304489136, 0.22800254821777344, -0.06449748575687...
def allow _ new _ users ( request ) : return allowregistration ( ). get ( )
[ -0.5954886674880981, 1.0402711629867554, 0.09763950109481812, 0.5491289496421814, -0.7018694281578064, 0.7258993983268738, 0.1757144182920456, -0.13646383583545685, -0.17823241651058197, 0.507317066192627, 0.29198044538497925, 0.20414450764656067, -0.5177156329154968, 0.31415170431137085, ...
def get ( self, request ) : form = addcarform return render ( request, " add _ car. html ", { " form " : form } )
[ -0.41745713353157043, -0.05659106746315956, 0.5374484062194824, -0.5847366452217102, 0.5032973289489746, -0.03673575073480606, -1.3707588911056519, 0.11948616057634354, -1.1143603324890137, -1.4413996934890747, 0.8150119185447693, -0.33883869647979736, -0.0009509877418167889, 0.14687308669...
def releaser _ middle ( self, data ) : def normalize _ tag _ version ( v ) : # only prepend the'v'when making the release with git ; # historically this has * not * been used in the svn tag names if not isinstance ( self. vcs, subversion ) : v ='v'+ v # if the version is like 3. 2, append a. 0 if v. count ( '.') = = 1 ...
[ -0.02893119491636753, -0.5154708623886108, 0.7630054354667664, -0.2398141622543335, -0.05225015804171562, -0.3459087312221527, -0.37185007333755493, -0.043983664363622665, 0.7463517189025879, 0.17498895525932312, -0.12551289796829224, -0.366485059261322, -0.33828452229499817, 0.31942853331...
def test _ atomic _ language _ length _ 2 _ nistxml _ sv _ iv _ atomic _ language _ length _ 3 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - length - 3. xsd ", instance = " nistdata / atomic / l...
[ 0.47262707352638245, 0.009035850875079632, 0.47447463870048523, 0.24830375611782074, -0.056767020374536514, 0.521623969078064, -0.5960659384727478, 0.2193608582019806, 0.5419571995735168, 0.8965270519256592, -0.42989999055862427, -0.34099650382995605, 0.1157115027308464, -0.178149864077568...
def to _ string ( value, typcls ) : s = stringstream ( ) s. write _ value ( value, typcls. _ ep _ typedesc ) return s. getstring ( )
[ -0.39402100443840027, 0.1339603066444397, 0.30421844124794006, -0.34686172008514404, -0.05737580358982086, 0.26546019315719604, -0.08550103008747101, -1.8617534637451172, 0.3452025055885315, 0.17634317278862, 0.1360187530517578, 0.38483116030693054, -0.6757113337516785, -0.3905622363090515...
def test _ rset ( self ) : self. do _ cmd ( b " mail from : < " + from + b " > ", flush = true ) code, reply = self. do _ cmd ( b " rset " ) self. assertequal ( code, 250 ) code, reply = self. do _ cmd ( b " rcpt to : < " + to + b " > " ) self. assertnotequal ( code, 250, reply ) self. assertequal ( code, 503, reply )
[ 0.02878468856215477, 0.644923985004425, 0.4002387821674347, -0.740085244178772, 1.0986722707748413, -0.2721664607524872, 0.24272604286670685, -0.7658953666687012, 0.21181809902191162, 0.04418878257274628, -0.44665011763572693, 1.5653886795043945, -1.098493218421936, -0.5876656770706177, ...
def _ setup _ to _ fit ( self, guess, fix, bounds, penalty, maxsep, sigma ) : self. guess _ par = numpy. atleast _ 1d ( guess ) if self. guess _ par. size! = 2 : raise valueerror ('must provide two guess parameters.') self. par = self. guess _ par. copy ( ) self. fit _ par = numpy. invert ( numpy. atleast _ 1d ( fix ) ...
[ -0.32197698950767517, -0.24847839772701263, 0.7204149961471558, 0.4971867799758911, 0.18873563408851624, 0.2500816881656647, 0.06640410423278809, 0.20308242738246918, -0.3873724341392517, 0.5029996037483215, -0.19954617321491241, 0.5894317030906677, -0.11835657060146332, 0.5710139870643616...
def test _ atomic _ base64 _ binary _ max _ length _ 1 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ max _ length _ 2 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - maxlength - 2. xsd ...
[ 0.09097352623939514, -0.31094980239868164, 0.3062177300453186, 1.4533449411392212, -0.27442872524261475, 0.07025574892759323, 0.1810075342655182, -0.10434043407440186, -0.6834937930107117, 0.3928622901439667, -0.9492707252502441, 0.22049039602279663, -0.21044360101222992, 0.514287054538726...
def rgb2hex ( color ) : return " # { : 02x } { : 02x } { : 02x } ". format ( int ( color [ 0 ] ), int ( color [ 1 ] ), int ( color [ 2 ] ) )
[ 0.02327665314078331, -1.152495265007019, 0.7183756232261658, -0.6507862210273743, 0.8251431584358215, 0.6901798248291016, -0.6957224011421204, 0.01795111782848835, -1.0049265623092651, 0.5607372522354126, -0.8925396800041199, -0.20441937446594238, 0.2730506956577301, -0.3818170130252838, ...
def _ open _ file ( self ) : # cant work for mac os catalina? # when the box open, focus to another window then focus back to the dialog filepath = askopenfilename ( filetypes = ( ( " jpg file ", " *. jpg " ), ( " jpeg file ", " *. jpeg " ), ( " png file ", " *. png " ) ) ) # check if close dialog box or click cancel i...
[ -0.3847995698451996, -0.06665757298469543, 0.5813564658164978, 0.4167948365211487, -1.086661458015442, 0.34874486923217773, 1.0758590698242188, 0.34474390745162964, -0.3776642084121704, -0.4615228474140167, 0.31829366087913513, -0.26250579953193665, -0.14443059265613556, 0.3062687516212463...
def fed _ tax ( self, fed _ tax ) : self. _ fed _ tax = fed _ tax
[ 0.04810170829296112, 0.16194644570350647, 0.2213626354932785, -1.0363930463790894, 0.8158374428749084, 0.4419305920600891, 0.07933018356561661, -0.7678886651992798, -1.5090575218200684, -0.6707271337509155, -1.6796684265136719, 0.3485073149204254, 0.1533403843641281, 0.6206942796707153, ...
def random _ range _ coprime ( a, b, n ) : res = getrandomrange ( a, b ) while gcd ( res, n )! = 1 : res = getrandomrange ( a, b ) return res
[ -0.9525157809257507, 0.12640288472175598, 0.29981333017349243, 0.4148517847061157, 0.6283339262008667, 0.04061863198876381, -0.3145711421966553, -0.20557092130184174, 0.3174765408039093, -0.05666957050561905, 0.3612315356731415, -0.1538592427968979, -0.9262668490409851, -0.5788807272911072...
def get _ symbols _ string ( assets ) : array = [ assets ] if isinstance ( assets, tradingpair ) else assets return ', '. join ( [ asset. symbol for asset in array ] )
[ -1.165820598602295, 0.2144269049167633, 0.3118845820426941, -0.7316169738769531, 0.159781813621521, 0.03106469102203846, -0.02440907619893551, -1.2688177824020386, 0.576430082321167, 0.6363248825073242, 0.6323519945144653, 0.13198718428611755, 0.6684733033180237, -0.2214474081993103, -0....
def test _ example _ input _ two _ clone _ default _ values ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper, add _ input _ two ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. table. clone _ row ( " dummy _ input _ two " ) input _ page....
[ 0.059708401560783386, 0.5884824395179749, 0.797279953956604, 0.8440749645233154, 0.6747845411300659, 0.7306138277053833, -0.42343541979789734, -0.7974997162818909, -0.11398791521787643, 0.009259003214538097, -0.14142486453056335, 0.1317729353904724, 0.4971471428871155, -0.07255670428276062...
def set _ size _ in _ pixels ( self, x, y ) : xold, yold = self. size _ in _ pixels if x % 2! = 0 : x + = 1 warnings. warn ( " setting x to an even number. x = % d " % x ) if y % 2! = 0 : y + = 1 warnings. warn ( " setting y to an even number. y = % d " % y ) self. _ xsize = x self. _ ysize = y env, src, ang = self. en...
[ -0.2565809488296509, 0.2325013279914856, 0.67938631772995, -0.9744634628295898, -0.4980415403842926, -0.06800924986600876, -0.15235485136508942, -1.1115268468856812, 0.35865870118141174, -0.1317153126001358, 0.26476535201072693, 0.6788983941078186, 0.08049708604812622, 0.2799709439277649, ...
def main ( ) : parser = argparse. argumentparser ( prog = " unstar ", description = " " " unstar tool for newsdedup. " " ", epilog = " " " program made by pr, @ reuteras @ infosec. exchange on mastodon. if you find a bug please let me know. " " ", ) parser. add _ argument ( " configfile ", metavar = " newsdedup. cfg ",...
[ -0.5671911835670471, -0.00704425061121583, 0.8871145248413086, -0.5151588916778564, -0.270555704832077, -0.6090397834777832, 0.26172927021980286, 0.7491437792778015, -0.7281630635261536, 0.20477084815502167, 0.03433392569422722, -0.2861827313899994, 0.22216202318668365, 0.02680097706615925...
def place _ order ( order _ type, quantity, price, customer _ name, status = false ) : global orders global order _ id orders [ order _ id ] = { " id " : order _ id, " order _ type " : order _ type, " quantity " : quantity, " price " : price, " customer _ name " : customer _ name, " status " : status } new _ order = or...
[ -0.11319835484027863, -0.13674424588680267, 0.258291095495224, 0.2345041185617447, -0.018872177228331566, -0.22664618492126465, -1.39756178855896, 0.27028658986091614, -0.31813058257102966, 0.424459844827652, -1.049362301826477, -0.3159215450286865, -0.5459734797477722, 0.08271461725234985...
def flags _ to _ str ( flags ) : assert flags in [ 0, 1, 2, 3 ] return btsnoop _ flags [ flags ]
[ -0.6539303064346313, 0.6236047744750977, 0.18327729403972626, 0.22816890478134155, 0.6209432482719421, 0.44420239329338074, -0.13143794238567352, -1.1066457033157349, -0.4743652939796448, 0.3377037048339844, -0.1602298617362976, -0.08290467411279678, -0.9746541380882263, -0.664218187332153...
def plot ( self, plot _ method = " gaussian ", balanced _ acc = false, * * kwargs ) : self. calculate ( balanced _ acc = balanced _ acc ) # calculate roc parameters if plot _ method = = " gaussian " : if self. forced _ choice is not none : sub _ idx = np. unique ( self. forced _ choice ) diff _ scores = [ ] for sub in ...
[ 0.4690512418746948, 0.5201327204704285, 0.7011481523513794, -0.21208250522613525, -0.2094765156507492, 0.2793848514556885, 1.4972273111343384, -0.5151721239089966, -0.24259310960769653, 0.21127700805664062, -0.04884215071797371, 0.7321838140487671, 0.7038177251815796, 0.506691038608551, ...
def manual _ stepping ( global _ step, boundaries, rates, warmup = false ) : if len ( rates )! = len ( boundaries ) + 1 : raise valueerror ('` len ( rates ) ` must be equal to ` len ( boundaries ) + 1 `.') if warmup : slope = float ( rates [ 1 ] - rates [ 0 ] ) / boundaries [ 0 ] warmup _ steps = list ( range ( boundar...
[ 0.3161918818950653, 0.5260888934135437, 0.5649317502975464, 0.07872791588306427, -0.048600707203149796, 0.08134393393993378, -0.16581539809703827, 0.3632349669933319, -0.872490406036377, 0.05330537259578705, -0.3702356517314911, 0.1834663450717926, -0.29744118452072144, 0.3572092652320862,...
def createextrusion ( n, r, h ) : # list w / extrusion heights = np. zeros ( n ) # height of each extrusion layer cells = np. zeros ( n ) # number of cells per layer # calc expansion ratio beta = r * * ( 1 / ( n - 1 ) ) # cell to cell expansion ratio # solve for width of start cell # delta _ 1 = ( 1 - beta ) / ( 1 - be...
[ 0.308318555355072, 0.39834579825401306, 0.8942357301712036, 0.820546567440033, -0.4031788110733032, -0.11125480383634567, 0.10997933149337769, -0.20108111202716827, -0.7822242975234985, 0.568404495716095, -0.5201573371887207, -0.7463784217834473, 0.027856342494487762, 1.1864298582077026, ...
def evaporation _ scheduler ( self, cr, uid, context = none ) : stock _ location _ obj = self. pool. get ('stock. location') outgoing _ fuel _ type _ obj = self. pool. get ('outgoing. fuel. type') stock _ move _ obj = self. pool. get ('stock. move') stock _ picking _ out _ obj = self. pool. get ('stock. picking. out') ...
[ -1.081289291381836, -0.30860140919685364, 0.7739222645759583, 0.480361670255661, -0.2874314486980438, -0.3765528202056885, 0.669378936290741, 0.07999764382839203, -0.6562840342521667, 0.6275988221168518, -0.14783208072185516, -0.1698019802570343, 0.4052650034427643, 0.8856095671653748, 0...
def demonstration ( self ) - > none : try : print ('solving hcaptcha. ', end ='' ) # hcaptcha solver url test. self. driver. get ('https : / / maximedrn. github. io / hcaptcha - solver - python - selenium /') # check if lenght of " data - hcaptcha - response " attribute is not # null. if it's not null, hcaptcha is solv...
[ -0.01411235798150301, 0.04105042666196823, 0.43238046765327454, 0.3727439045906067, 1.1672390699386597, -0.25554290413856506, 0.7303105592727661, 0.22340059280395508, 0.8879773616790771, -0.7309571504592896, -0.6694743633270264, -0.13081316649913788, 0.6998715996742249, 0.39875873923301697...
def perform ( self, user _ id, driver ) : entitled = user _ id = = driver. user _ id if entitled : self. publish ('authorized ', user _ id, driver ) else : self. publish ('unauthorized ', user _ id, driver )
[ 0.43579182028770447, -0.5673856139183044, 0.339891254901886, 1.3178764581680298, 0.19469718635082245, -0.304794043302536, -0.10778208076953888, 0.8077234029769897, 0.8975673317909241, 0.1259833574295044, 1.238976001739502, 1.1535669565200806, -0.2623836398124695, 0.6866191625595093, 0.19...
def input _ data _ definitions ( self ) : return { self. key _ inputs : datadefinition ( [ - 1, - 1, 1 ], [ list, list, str ], " batch of sentences, each represented as a list of words [ batch _ size ] x [ seq _ length ] x [ string ] " ) }
[ 0.1262042373418808, -0.17808356881141663, 0.2789124846458435, -0.6546069383621216, -0.6355587840080261, 0.1283085197210312, -0.4767442047595978, -0.030507009476423264, -0.30931034684181213, 0.15665005147457123, -1.2375370264053345, 0.7903715372085571, -0.06943676620721817, 1.10154664516448...
def window _ fd ( self ) - > int : return self. _ vehicle _ data. get ( " vehicle _ state ", { } ). get ( " fd _ window " )
[ -0.18832574784755707, -0.023754870519042015, 0.3738172650337219, 0.452694833278656, -0.3107730746269226, -0.11177674680948257, 0.6995625495910645, -0.08419138938188553, -0.051533013582229614, -1.4162218570709229, 0.6578103303909302, 0.8672347664833069, 0.06769886612892151, 1.09925436973571...
def _ _ init _ _ ( self, _ client = none, account _ id = none, ip _ address = none, login _ time = none, reference _ token = none, user _ agent = none ) : super ( ). _ _ init _ _ ( _ client = _ client ) # inline imports for avoiding circular references and bulk imports # fields self. _ account _ id = fields. stringfiel...
[ 0.3416144549846649, 0.42343685030937195, 0.6246680617332458, -0.2684563100337982, 0.36003121733665466, -0.21071498095989227, -0.13405032455921173, 0.24584604799747467, 0.3371015787124634, -0.016724979504942894, -0.48098042607307434, 0.13744701445102692, 0.12489228695631027, -0.189033105969...
def test _ scores _ improvement _ plot ( df : dataframe ) : df. columns = _ labels ['dataset _ sizes'] fig, axes = plt. subplots ( nrows = 1, ncols = 2, figsize = ( 12. 8, 4. 8 ) ) for i in range ( 2 ) : sns. barplot ( data = df. iloc [ [ i ] ], ax = axes [ i ] ) yticks = np. linspace ( - 1. 2, 0, 7 ) if i = = 0 else n...
[ 0.3461311161518097, 0.9939621090888977, 0.7989727258682251, -0.5525097846984863, 0.33174097537994385, 0.23882627487182617, 1.4634485244750977, -0.5957210659980774, -0.6011086702346802, -0.7667742371559143, 0.02283339388668537, 0.6518654227256775, 0.2360767275094986, 0.2711714208126068, 0...
def find _ converter ( obj, converters ) : if isinstance ( obj, output ) : mimetype = obj. mimetype extension = path ( obj. filename or'' ). suffix [ 1 : ] elif isinstance ( obj, ( str, path ) ) : mimetype = none extension = path ( obj ). suffix [ 1 : ] else : raise notimplementederror return _ find _ converter ( mimet...
[ -0.42540523409843445, -1.1095889806747437, 0.6802942156791687, 0.4001579284667969, -1.0706579685211182, -0.8501998782157898, -0.06571687757968903, -1.1694494485855103, -0.06509467214345932, 0.16532255709171295, 0.23017217218875885, 0.22549855709075928, -0.6183929443359375, 0.52677327394485...
def imdisplay ( imarray, width = video _ width, height = video _ width, x = 0, y = 0 ) : a = pg. surfarray. make _ surface ( imarray. swapaxes ( 0, 1 ) ) a = pg. transform. scale ( a, ( width, height ) ) screen. blit ( a, ( x, y ) )
[ -0.5700669288635254, -0.11432687193155289, 0.7043740153312683, 0.24745391309261322, -0.40433841943740845, 0.5320367813110352, 0.599895179271698, -1.3256378173828125, 1.138176679611206, 0.6833289265632629, 0.8936681151390076, 0.6918357610702515, -0.4430347681045532, 0.597074568271637, -0....
def make _ even _ groups ( data, num _ per _ group, limit = none ) : grouped = [ ] if limit is none : limit = len ( data ) for start in range ( 0, limit, num _ per _ group ) : end = start + num _ per _ group if end > limit : break group = data [ start : end ] grouped + = [ group ] return grouped
[ -0.6595375537872314, 0.8772879838943481, 0.7016001343727112, -0.4524068534374237, -0.013771545141935349, 0.07665850222110748, 0.3575264811515808, 0.22370457649230957, -0.06399074196815491, -0.055993448942899704, 0.30453765392303467, 0.5921720266342163, -0.7907145619392395, -0.0563375353813...
def _ parse _ commit ( self, data, project ) : if not isinstance ( data, dict ) : raise attributeerror ( " expected a dict object " ) email = self. _ parse _ email ( data. get ('raw _ author') ) url = urlparse. urljoin ( project. url,'commits / % s'% data ['raw _ node'] ) commit _ data = {'hash': data ['raw _ node'],'e...
[ -0.29376843571662903, -0.15707345306873322, 0.6810289025306702, -1.1501365900039673, -0.2224617749452591, -0.08020162582397461, -0.9882916212081909, 0.5460435748100281, -1.061853289604187, 0.6852591037750244, -0.19859972596168518, 0.0779300183057785, 0.27716660499572754, -0.211106255650520...
def logical _ xor ( x, y, name = " logicalxor " ) : # todo ( alemi ) make this a cwise op if people end up relying on it. return gen _ math _ ops. logical _ and ( gen _ math _ ops. logical _ or ( x, y ), gen _ math _ ops. logical _ not ( gen _ math _ ops. logical _ and ( x, y ) ), name = name )
[ -0.07910232990980148, -0.4284001290798187, 0.6643324494361877, 0.33037087321281433, -1.931528091430664, -0.21318067610263824, -1.6627269983291626, -0.07624109834432602, 0.1328941434621811, 0.8296429514884949, 0.01987358368933201, -0.43037649989128113, 0.4681766927242279, -0.821873962879180...
def read _ data ( ) : print ( " loading data... ", end = " " ) ret _ images = [ ] ret _ labels = [ ] ret _ class _ names = [ ] count = 0 for label in list ( os. walk ( train _ data _ path ) ) : # walk directory full _ path, image _ list = label [ 0 ], label [ 2 ] letter = full _ path [ len ( train _ data _ path ) + 1 :...
[ -1.6466515064239502, -0.6379562020301819, 0.9311793446540833, -0.2955614924430847, 0.7320806384086609, 0.5413379669189453, 0.7101285457611084, 0.1255527138710022, -0.5545459389686584, 0.31378430128097534, 0.21013066172599792, 0.4709661900997162, -0.18366293609142303, 0.09511452913284302, ...
def project _ raster ( filename, output, dataset ) : # save classified image datasource = gdal. open ( filename, ga _ readonly ) datasource. getdriver ( ). longname geotransform = datasource. getgeotransform ( ) # write the result to disk driver = gdal. getdriverbyname ('gtiff') outdataset = driver. create ( output, da...
[ -0.2846718728542328, 0.19254279136657715, 0.4088168740272522, -0.5399324893951416, -0.2003353089094162, 0.48009970784187317, 0.2807418406009674, 0.2874661684036255, -0.7475122809410095, 0.18381929397583008, 0.34594646096229553, -0.018553419038653374, -0.4226986765861511, 0.1214774325489997...
def random _ policy ( valid _ actions : list, device : torch _ device ) - > th. tensor : n _ agents = len ( valid _ actions ) actions = th. empty ( n _ agents, dtype = th. int, device = device ) for agent _ id in range ( n _ agents ) : av _ act = valid _ actions [ agent _ id ]. nonzero ( ). squeeze ( ) if len ( av _ ac...
[ -0.37204253673553467, -0.11098556220531464, 0.4574657678604126, 0.47963401675224304, 0.2467590570449829, 0.689843475818634, 0.5343186855316162, -0.23726868629455566, 1.9692513942718506, 0.5546658635139465, -0.09617219865322113, 0.10581440478563309, 0.1015557274222374, -0.5293392539024353, ...
def setsnstring ( self, s ) : if 10 > len ( s ) : raise incompatiblefirmwareexception ( " serial number too long ( max. 10 characters ) " ) i = 0 while i < len ( s ) : ihxdata [ self. ztexdescriptoroffs + 30 + i ] = int ( s. charat ( i ) ) i + = 1 while i < 10 : ihxdata [ self. ztexdescriptoroffs + 30 + i ] = 0 i + = 1
[ -0.07353775203227997, 0.49849963188171387, 0.4128226339817047, -1.3249863386154175, -0.018797842785716057, -0.2509033977985382, 0.5238828063011169, -0.4989376366138458, 0.47696948051452637, -0.3267211318016052, -0.8654587864875793, 1.0697283744812012, -0.39927181601524353, -0.4626383185386...
def read _ len ( self ) - > int : return enc _ read _ size
[ 1.1558843851089478, 0.19056741893291473, 0.45325151085853577, -0.439342737197876, 0.2687286138534546, 0.5521037578582764, 0.26243120431900024, 0.06227334961295128, 0.17647328972816467, -0.4852878153324127, 0.16557082533836365, 0.5711849927902222, 0.13955439627170563, -0.9012828469276428, ...
def category ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " category " )
[ 0.4037162959575653, 0.43243637681007385, 0.3595289885997772, 0.20844000577926636, 1.0090343952178955, 1.1226814985275269, 0.3996594250202179, -0.01308775320649147, 0.728659987449646, -0.7010318636894226, 1.126468539237976, 0.7605344653129578, 0.4800761938095093, -0.6106474995613098, -0.9...
def computenumevents ( self ) : self. numevents = 0 # we have 6 events in an atomic sequence. this, times the # number of atomic sequences should give us numevents ( more or # less ) # if ( self. nsequences ) : # t = self. duration - ( self. delaynext * self. nsequences ) # else : # t = self. duration # for i in range ...
[ 0.4937594532966614, 0.15396815538406372, 0.6867976188659668, -0.12126292288303375, 0.16903796792030334, -0.7901273369789124, 0.8024929761886597, 0.6589398980140686, 0.48732641339302063, -0.5600978136062622, -0.4476482570171356, -0.4265555441379547, 0.04152015596628189, -0.2699134945869446,...
def with _ evaluators ( self, evaluators ) : b = self. _ copy ( ) b. config ['evaluators'] = evaluators return b
[ -0.5535658001899719, 0.09790767729282379, 0.3043421804904938, 0.2011902630329132, 0.14934515953063965, 0.23090524971485138, -0.7717525959014893, 0.056779008358716965, 0.7811548113822937, -0.9601324200630188, -0.29083409905433655, 0.5089725255966187, -0.9669635891914368, 0.2249871790409088,...
def on _ failure _ action ( self, on _ failure _ action ) : allowed _ values = [ " rollback ", " do _ nothing " ] if on _ failure _ action not in allowed _ values : raise valueerror ( " invalid value for ` on _ failure _ action ` ( { 0 } ), must be one of { 1 } ". format ( on _ failure _ action, allowed _ values ) ) se...
[ -0.3050740659236908, -0.43710047006607056, -0.08074529469013214, 0.4876558780670166, 0.3402625322341919, 0.3069351315498352, 0.31294241547584534, 0.011228607967495918, -0.017066476866602898, 0.5062400698661804, -0.458421528339386, 0.5355396270751953, -0.21905599534511566, 0.649012863636016...
def set _ global _ attrs ( self, gl, rl, npe = 0, mpe = 0, desc ='', note ='' ) : self. gl = gl self. rl = rl self. tot _ rgn = 10 * 4 * * self. rl self. tot _ rgnid = np. arange ( self. tot _ rgn ) self. gall1d = 2 * * ( self. gl - self. rl ) + 2 self. gall = self. gall1d * * 2 self. attrs. create ('glevel ', gl, dtyp...
[ -0.18502987921237946, 0.1309966742992401, 0.7995426654815674, -0.6430339813232422, -0.12759828567504883, 0.2806357145309448, 0.7158058285713196, 0.21220985054969788, -0.5311543345451355, 0.3763956129550934, -0.706828236579895, 0.17420309782028198, -0.9157336950302124, 0.7169097065925598, ...
def set _ bulge _ disk _ assertions ( self, bulge _ prior _ model, disk _ prior _ model ) : if bulge _ prior _ model is not none and disk _ prior _ model is not none : if hasattr ( bulge _ prior _ model, " sersic _ index " ) and hasattr ( disk _ prior _ model, " sersic _ index " ) : bulge _ prior _ model. add _ asserti...
[ -0.3371553421020508, -0.6150308847427368, 0.8878722190856934, 0.08630835264921188, 1.319878101348877, 0.924992024898529, 0.34716716408729553, -0.23024381697177887, -0.3707406520843506, -0.3521018326282501, 0.04752354323863983, 1.1613430976867676, -0.7431265115737915, 0.9314950108528137, ...
def strategy _ none ( cookies, cps, history, time _ left, build _ info ) : return none
[ -0.16782693564891815, -0.9073265790939331, 0.14323323965072632, 0.27229422330856323, 0.7426746487617493, -0.6505481600761414, -0.004122573416680098, -0.2959443926811218, 0.2891208827495575, -0.5421015620231628, 0.5489173531532288, 0.15082566440105438, -0.03291282430291176, 0.31151032447814...
def yearly _ relative ( self, pattern _ dict ) : if isinstance ( pattern _ dict, bool ) : pattern _ dict = { } pattern _ dict ['freq _ type'] ='yearly _ relative'schedule _ pattern = schedulepattern ( self. _ pattern ) self. _ pattern = schedule _ pattern. create _ schedule _ pattern ( pattern _ dict ) self. _ modify _...
[ 0.31105536222457886, 0.48228123784065247, 0.8203611969947815, 0.16405001282691956, -0.6830021142959595, 1.2789087295532227, 0.9170756340026855, 0.9406828880310059, -0.08690030127763748, 0.2511118948459625, -0.5822232961654663, 0.20155401527881622, 0.259081095457077, -0.590926468372345, 0...
def parse _ command ( cmd ) : new _ ports = {'inputs': set ( ),'params': set ( ),'outputs': set ( ) } for line in cmd. splitlines ( ) : matches = port _ pattern. finditer ( line ) for match in matches : if match. group ('type') in new _ ports : new _ ports [ match. group ('type') ]. add ( match. group ('port _ name') )...
[ 0.14365743100643158, -0.24250061810016632, 0.6717014312744141, -0.329847127199173, -0.45432049036026, -0.10509461909532547, 0.6461015343666077, -0.2588375210762024, -0.9152674078941345, 0.2356823980808258, -0.259141206741333, 0.030531372874975204, 0.16170096397399902, 0.577393651008606, ...
def _ _ str _ _ ( self ) : return super ( rolleddice, self ). _ _ repr _ _ ( ) [ 1 : - 1 ]
[ -0.8488244414329529, -0.8072295188903809, 0.9526995420455933, -1.1003968715667725, -0.010011770762503147, 0.8422582149505615, -0.5792202353477478, 0.3487243354320526, 0.2872576415538788, 0.9069479703903198, 0.28964945673942566, 0.9900959134101868, -0.18276050686836243, -0.7010102868080139,...
def list _ all _ dev _ boxes _ by _ user ( self, user _ id : str = " me ", *, filter : optional [ str ] = none, top : optional [ int ] = none, * * kwargs : any ) - > iterable [ json ] : _ headers = kwargs. pop ( " headers ", { } ) or { } _ params = kwargs. pop ( " params ", { } ) or { } cls : clstype [ json ] = kwargs....
[ -1.4928538799285889, 0.3286203444004059, 0.8034179210662842, 0.5986289381980896, -0.7581601738929749, -0.5349223017692566, 0.11894097179174423, -0.9118179678916931, 0.5067689418792725, -0.37936311960220337, -0.3347482681274414, 1.1676350831985474, -0.014787445776164532, 0.48835697770118713...
def normalize _ vector ( in _ vector, normalize = true ) : # making normalize a flag allows the user to connect attributes to it return _ create _ and _ connect _ node ('normalize _ vector ', in _ vector, normalize )
[ -0.5687293410301208, 0.19871966540813446, 0.42239829897880554, 0.5215694904327393, -0.9723079204559326, -0.13450679183006287, 0.6134315729141235, 0.663651168346405, 0.5308665037155151, -0.33486273884773254, -0.17309674620628357, 0.14695067703723907, -1.346521258354187, -0.2851414084434509,...
def create _ alien ( ai _ settings, screen, alien _ number, aliens, row _ number ) : # gets alien width alien = alien ( ai _ settings, screen ) alien _ width = alien. rect. width # funtion that gets and sets position of each alien alien. x = alien _ width + ( 2 * alien _ width * alien _ number ) alien. rect. x = alien....
[ -0.7835710644721985, -0.360571950674057, 0.5461007356643677, -0.1931089460849762, 0.7758620977401733, 0.3653756380081177, -0.05285923555493355, -0.22612273693084717, -0.3918837904930115, 0.4220285415649414, 0.30551618337631226, -0.523318350315094, 0.6375857591629028, 0.3979921042919159, ...
def test _ mom _ when _ disconnected _ from _ zk ( ) : app _ def = app ('zk - failure') host = ip _ other _ than _ mom ( ) pin _ to _ host ( app _ def, host ) with marathon _ on _ marathon ( ) : client = marathon. create _ client ( ) client. add _ app ( app _ def ) deployment _ wait ( ) tasks = client. get _ tasks ('/ ...
[ 1.061693787574768, 0.1941457837820053, 0.7680298089981079, 1.1213189363479614, 0.19516822695732117, -0.32505032420158386, 0.6593291163444519, -0.041093673557043076, 0.04941726103425026, 0.09634877741336823, -0.4634779095649719, 0.17826823890209198, -0.1827230006456375, -0.557223916053772, ...
def vgg19 ( num _ classes = 10 ) : model = vgg ( cfg ['vgg19'], num _ classes ) return model
[ 0.8892905116081238, 0.7706665396690369, 0.028399739414453506, 0.35003456473350525, 0.7362483143806458, 0.06546954810619354, 0.09988584369421005, 0.5370319485664368, -0.13015970587730408, -0.14447283744812012, -0.9053090214729309, -0.7912986874580383, -0.08615055680274963, -0.55603760480880...
def request _ digest ( request, bank _ name, auth = false, response = false ) : request = get _ ordered _ request ( request, auth = auth, response = response ) digest ='' for value in request : value _ len = len ( value ) digest + = force _ text ( value _ len ). rjust ( 3,'0') digest + = force _ text ( value ) return d...
[ -0.622828483581543, 0.13273318111896515, 0.6758149266242981, -0.014686412177979946, 0.2498418539762497, 0.44335415959358215, -0.927765965461731, -0.9005451798439026, 0.09272977709770203, -0.10900934040546417, 0.6108030080795288, 0.40238454937934875, -0.3136467933654785, 0.1360490471124649,...
def upload ( self, source : str, * * kwargs ) - > bool : filename = url = none if': / /'in source : url = source else : filename = source return self. site. upload ( self, source _ filename = filename, source _ url = url, * * kwargs )
[ -1.0895936489105225, 1.0659691095352173, 0.5535796880722046, -0.06458892673254013, -0.2441796362400055, 0.05787253379821777, 0.11329717934131622, 0.5361331105232239, 0.0656137615442276, 0.4212501049041748, -1.299150824546814, -0.3947179913520813, -0.44249287247657776, 0.23216071724891663, ...
def to _ str ( arr ) : return''. join ( map ( str, arr. flatten ( ) ) )
[ -0.06591225415468216, -0.5966026782989502, 0.2963021397590637, 0.06500234454870224, -0.7234082818031311, 0.7920970916748047, -0.5684736371040344, -0.27255699038505554, 0.4801207482814789, 0.6530113220214844, 0.43526992201805115, 0.20763996243476868, -0.3034244179725647, 0.55568528175354, ...
def test _ atomic _ base64 _ binary _ max _ length _ 3 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ max _ length _ 4 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - maxlength - 4. xsd ...
[ 0.289911150932312, -0.10321866720914841, 0.2625284492969513, 1.098453164100647, -0.29446151852607727, -0.01349665503948927, -0.424528032541275, -0.1678975522518158, -0.23034824430942535, 0.49003085494041443, -0.7410308122634888, -0.24378903210163116, -0.36973336338996887, -0.01793959736824...
def read _ queue ( self, insert _ for = none ) : if insert _ for = ='user': return self. sql. get _ data ('select user _ handle, query _ id from queue where user _ status = 0 and query _ id = { } and attempts < 5 '. format ( self. query _ id ) ) [ : 100 ] if insert _ for = ='tweet': if self. shard _ number : query = " ...
[ -0.2713727653026581, -0.5343619585037231, 0.6400860548019409, -0.5429683327674866, 0.07138466089963913, -0.07162708044052124, -0.182695209980011, -0.3671703040599823, -0.20639939606189728, -0.2152632474899292, 0.8373215198516846, -0.0020615619141608477, -0.6079827547073364, 0.4494898915290...
def test _ case _ id _ external _ length ( self ) : # get object case _ 1 = case. objects. get ( case _ name ='case _ 1') # get max length max _ length = case _ 1. _ meta. get _ field ('case _ id _ external'). max _ length # compare self. assertequal ( max _ length, 50 )
[ 0.33787551522254944, 0.36825549602508545, 0.401542603969574, 0.6639036536216736, 0.11798593401908875, 1.53706693649292, -0.5924566984176636, 0.39095449447631836, 0.7923597693443298, 0.5242814421653748, -0.5916431546211243, 0.04356149211525917, 0.009042039513587952, 0.47541677951812744, -...
def get _ inference _ iterator ( self ) : train1, test1, val1 = self. get _ inference _ pack ( ) train _ iterator, valid _ iterator, test _ iterator = data. iterator. splits ( ( train1, val1, test1 ), batch _ size = self. hyper ['batch _ size'], sort _ within _ batch = false, shuffle = true, sort = false, device = self...
[ -0.16367977857589722, -0.15750780701637268, 0.47207072377204895, 0.29441148042678833, 0.10084009915590286, 0.575688362121582, 0.1866685003042221, 0.0822826400399208, -1.1792547702789307, 0.16727007925510406, 0.1380116194486618, 0.319732129573822, -0.7234663367271423, -0.5139718055725098, ...
def loop ( self ) : self. localsocket. listen ( ) while self. inputs : readable, writable, exceptional = select. select ( self. inputs, self. outputs, self. inputs ) # handle inputs for s in readable : # handle new connection if s is self. localsocket : ( client, address ) = s. accept ( ) print ('# recieved connection ...
[ -0.3832666277885437, -0.8248857855796814, 0.8288334012031555, -0.5629776120185852, -0.44190600514411926, -0.3644941449165344, 0.6506177186965942, -0.9578825235366821, -0.08469554036855698, -0.7146663665771484, 1.1732177734375, 0.015587645582854748, -0.8577103018760681, 0.6964285969734192, ...
def _ publish _ commits ( self, commits ) : host = self. request. meta. get ('http _ host ','localhost : 8000') url ='http : / / % s / events / pub /'% host for commit in commits : try : resource = commitresource ( ) bundle = resource. build _ bundle ( obj = commit ) # make the timestamp a date object ( again? ) bundle...
[ -0.20788148045539856, -0.05399404838681221, 0.41466087102890015, 0.5201619863510132, 0.6418509483337402, -0.09496054798364639, -0.16674289107322693, 0.08054229617118835, -1.1340266466140747, 0.28848913311958313, 0.3959776759147644, -0.27050361037254333, -0.8134242296218872, 1.0314673185348...
def checkclick ( self, pos ) : if self. triangle. checkclick ( pos ) : self. handlemouserelease ( )
[ 1.1597325801849365, -0.09385260939598083, 0.3213728666305542, 0.417372465133667, 0.19563212990760803, -0.4433235824108124, 0.14010114967823029, -0.03672302886843681, 1.1273287534713745, 0.13790954649448395, 0.22046945989131927, -0.6964616179466248, -0.21381480991840363, -0.6600043773651123...
def parse _ file ( file ) : # dictionary to hold csv file data csv _ data = { } # arrays to hold repeated row data quantity = [ ] unit _ price = [ ] line _ total = [ ] description = [ ] with open ( file,'r') as reader : for line in reader : if line = ='\ n': continue # date if line. startswith ('placed :') : csv _ data...
[ 0.11874369531869888, -0.3570147752761841, 0.9238789677619934, -0.8178267478942871, -0.14838410913944244, 0.307219922542572, -0.05635078251361847, 0.1779707372188568, -1.005877137184143, 0.23303094506263733, -0.8145564794540405, 0.6429516077041626, 1.3001409769058228, 0.3589194416999817, ...
def _ _ getattr _ _ ( self, name ) : try : return self. _ attrs [ name ] except keyerror : raise attributeerror ( )
[ 0.11040613055229187, -0.4493560791015625, 0.5389622449874878, -0.4094272553920746, -0.6874756813049316, -0.5225218534469604, 0.3232906758785248, -1.1064205169677734, -0.25645214319229126, 0.031134026125073433, 0.9480842351913452, 0.06866011023521423, 0.6082717180252075, -0.2272147685289383...
def split _ args ( self, argument ) : return gdb. string _ to _ argv ( argument ), { }
[ -1.0889731645584106, 0.22375819087028503, 0.2780800461769104, -1.1618338823318481, -0.16460749506950378, -0.14738154411315918, 0.013060957193374634, 0.07869688421487808, -0.5288054347038269, 0.9395239949226379, -0.9656016230583191, 0.7859223484992981, -0.42055460810661316, 0.72771281003952...
def test _ price _ jump ( self ) : c = calculator ( ) c. prod _ mode = false c. spot _ prices = [ 50000 / 3, 50001 / 3, 50002 / 3 ] c. last _ sigma = 150 c. last _ mean = 49000 c. past _ price = [ 49200, 49800, 49900, 49000, 48000 ] result = c. calculate ( ) self. assertequal ( result [ 0 ], 50001 ) self. assertequal (...
[ -0.5407115817070007, 0.548448383808136, 0.7521799802780151, 0.5476030707359314, 0.24616213142871857, 0.5319175720214844, 0.8877785205841064, -0.7039592862129211, -0.24658340215682983, 0.21923893690109253, -0.459025502204895, -0.8454036116600037, -0.554400622844696, -0.3465472459793091, 0...
def is _ preconditioning _ weekday _ only ( self ) - > bool : return day _ selection _ map. get ( self. _ vehicle _ data. get ( " charge _ state ", { } ). get ( " preconditioning _ times " ) )
[ -0.94838547706604, 0.5283251404762268, 0.30885085463523865, 0.21393588185310364, 0.21966171264648438, -0.13544116914272308, -0.14361271262168884, 0.6261477470397949, 0.06072595715522766, 0.5174575448036194, 0.032957617193460464, -0.6569865345954895, -0.2639266550540924, 0.9177447557449341,...
def solvecoeffs ( m, im ) : # im _ flat = np. reshape ( im, im. shape [ 0 ] * im. shape [ 1 ], 1 ) im _ flat = im. flatten ( ) mtm = np. dot ( m. t, m ) # matrix multiply m with it's transpose mtm _ inv = np. linalg. inv ( mtm ) # invert the k x k matrix mtm _ inv _ mt = np. dot ( mtm _ inv, m. t ) # matrix multiply th...
[ -0.13658253848552704, -0.03928268700838089, 0.8558986186981201, -0.3135625422000885, -0.25877419114112854, -0.44402486085891724, -0.13768170773983002, 0.42777371406555176, -0.432247519493103, 0.9255643486976624, 0.36805081367492676, -0.27071613073349, -0.391696572303772, -0.098962984979152...
def test _ list _ custom _ gradebook _ columns ( self ) : course _ id = none # change me!! r = self. client. list _ custom _ gradebook _ columns ( course _ id, include _ hidden = none )
[ 0.0026786732487380505, 0.014435394667088985, 0.34321272373199463, 0.39552003145217896, 0.3512622117996216, 0.8436897993087769, 0.49651843309402466, -0.9513282775878906, -0.0182746984064579, 0.16420887410640717, -1.3253295421600342, 0.9575057029724121, -0.6242012977600098, -0.49279448390007...
def sync _ wrapper ( resolve _ fn : resolvefunc [ tresult ] ) - > none : callback _ wrapper ( resolve _ fn, self. _ get _ value ( ) )
[ -0.46644294261932373, 0.1950325220823288, 0.27912437915802, 0.7229455709457397, 0.4674060642719269, -1.0445038080215454, 0.06405148655176163, -0.46909138560295105, -0.464848130941391, -0.24725738167762756, -0.38315436244010925, 0.08745862543582916, 1.1016298532485962, -0.5885148048400879, ...
def _ _ init _ _ ( self, boundaries ) : if len ( boundaries ) = = 0 : raise bcdataerror ( " list of boundaries must not be empty " ) # extract grid self. grid = boundaries [ 0 ]. grid # check dimension if len ( boundaries )! = self. grid. num _ axes : raise bcdataerror ( f " need boundary conditions for { self. grid. n...
[ 0.2944659888744354, 0.0632774829864502, 0.5250682830810547, 0.8853302001953125, 0.7691261172294617, 0.2757709324359894, -0.4169447124004364, 0.5620932579040527, -0.31061092019081116, -0.306685209274292, 0.07713061571121216, 0.059620361775159836, -0.7145327925682068, 0.7782964706420898, -...
def query ( self, command, *, send _ args = ( none, none ), recv _ args = ( none, none ) ) : self. send ( command, * send _ args ) return self. recv ( * recv _ args )
[ -0.1351480484008789, 0.09016691148281097, 0.5334976315498352, -0.15702863037586212, 0.3710678219795227, -0.32872286438941956, -0.8059825301170349, -0.38305428624153137, 0.13494056463241577, -0.20016048848628998, -0.002070792717859149, 0.27165767550468445, -0.7564494013786316, 0.03098187036...
def set _ params ( k = none, d = none, l = none, lr = none, train = none, loss _ type = none, batch _ size = none, num _ hidden = none, temperature = none ) : agent. k = k or agent. k agent. l = l or agent. l agent. d = d or agent. d agent. lr = lr or agent. lr agent. train = train if train is not none else agent. trai...
[ -0.18250545859336853, -0.5237874984741211, 0.6219322085380554, 0.19999080896377563, 0.34146273136138916, -0.42521241307258606, -0.6135478019714355, 0.2758798897266388, 0.2587183117866516, 0.22342805564403534, -0.6035863161087036, 0.38988009095191956, 0.7946923971176147, 1.17673659324646, ...
def writetodb ( self ) : # delete these dates if in the meal database session = createsession ( ) # why do i have to reduce 1 from start date? query = session. query ( menumeal ). filter ( menumeal. day. between ( self. days [ 0 ]. date - datetime. timedelta ( days = 1 ), self. days [ - 1 ]. date ) ) res = query. all (...
[ -1.2668851613998413, 0.1004142090678215, 0.8504601716995239, 0.2352907508611679, 0.8688251376152039, 0.3858117163181305, -0.29842230677604675, 0.5202184319496155, 0.018605373799800873, -0.3779824376106262, -0.4379304051399231, -0.10060757398605347, -0.7152881026268005, 1.1793181896209717, ...
def after _ telopt _ negotiation ( self, status ) : super ( ). after _ telopt _ negotiation ( status ) if status. cancelled ( ) : return mynick = self. env ['user'] if mynick = ='unknown': self. shell. display _ text ( u''. join ( ('\ r \ n ','{ } set your nickname using / nick '. format ( self. shell. standout ( '!!')...
[ 0.2691246569156647, -0.553975522518158, 0.6131426692008972, -0.026424475014209747, -0.3439275324344635, 0.18003982305526733, 0.5279297828674316, -0.35455259680747986, 0.33345746994018555, -0.04319266602396965, -0.6663359999656677, 0.3224090337753296, 0.26402735710144043, 0.5839731693267822...
def reviewnextitem ( self, inputevent ) : context = self. getflatreviewcontext ( ) moved = context. gonext ( flat _ review. context. word, flat _ review. context. wrap _ line ) if moved : self. _ reviewcurrentitem ( inputevent ) self. targetcursorcell = self. getbraillecursorcell ( ) return true
[ -0.4163322448730469, -0.25532299280166626, 0.42388319969177246, 0.607170820236206, -0.9051345586776733, 1.2165184020996094, -0.44003453850746155, -0.00003071045648539439, 0.1861099898815155, 0.1772029995918274, -0.32862088084220886, 0.4067689776420593, -0.7112463712692261, -0.1299393773078...
def get ( self, request ) : form = useraddform ( ) return render ( request, " add _ user. html ", {'form': form } )
[ -0.08104223012924194, 0.254853755235672, 0.46023258566856384, 0.0308071281760931, 0.20187216997146606, 0.676285982131958, -0.7200111150741577, -0.12552432715892792, -0.15586303174495697, -1.530838131904602, 0.43608736991882324, 0.013620078563690186, 0.46353450417518616, -0.308386892080307,...
def prepare _ sequences ( notes, n _ vocab ) : sequence _ length = 100 # get all pitch names pitchnames = sorted ( set ( item for item in notes ) ) # create a dictionary to map pitches to integers note _ to _ int = dict ( ( note, number ) for number, note in enumerate ( pitchnames ) ) network _ input = [ ] network _ ou...
[ -0.7869189381599426, -0.14440107345581055, 0.6819695234298706, -0.14961732923984528, -0.11950215697288513, -0.7534842491149902, 0.5225381851196289, -0.2229740470647812, 0.3815556764602661, 0.365329384803772, -0.8705784678459167, -0.5942202210426331, 0.018554890528321266, 0.2423085719347, ...
def run _ process ( self, proc, timeout = none, input = none ) : coro = _ run _ proc ( proc, input ) if timeout : coro = timeout _ after ( float ( timeout ), coro ) output = get _ kernel ( ). run ( coro ) if isinstance ( output, exception ) : raise output return output
[ 0.4223134517669678, 0.11171546578407288, 0.28255531191825867, 0.5500269532203674, -0.6448034644126892, -0.17281228303909302, -0.2636662423610687, -0.14317502081394196, 0.04078112170100212, 0.32608991861343384, 0.5596450567245483, -0.039006464183330536, -0.7553662657737732, -0.2979273796081...
def get _ images ( tester _ id ) : persistor = imagepersisor ( ) if not persistor. ensure _ tester _ is _ valid ( tester _ id ) : return io. bad _ request ('tester must have at least one image and video.') return imagepersisor ( ). get _ images ( tester _ id )
[ -0.7605330944061279, 0.4500424265861511, 0.3250577747821808, 1.222424864768982, -0.24468398094177246, -0.9290771484375, -0.10210764408111572, -0.29639732837677, 0.8547886610031128, -0.13622771203517914, 0.5690503120422363, -0.14946213364601135, -0.8748834133148193, 1.6871466636657715, -0...
def mypy ( session, extras, dilibraries = dilibraries ) : session. log ( f'run mypy for { lib _ name }') standard _ di _ mypy ( session, extras = extras, dilibraries = dilibraries )
[ -1.5838773250579834, -0.2601011097431183, 0.4006233811378479, 0.2691170275211334, -0.6285455226898193, -0.47350406646728516, -0.18886791169643402, 0.19445441663265228, 0.9654732942581177, -0.38850441575050354, -0.42443782091140747, -0.39059117436408997, 0.2757907807826996, -0.0878709480166...
def delete _ sample ( namespace, workspace, sample _ id ) : body = [ { " entitytype " : " sample ", " entityname " : sample _ id } ] res = firecloud _ api. delete _ entities ( namespace, workspace, body ) return res
[ 0.26340413093566895, -0.005146346520632505, 0.1590327024459839, 0.3194539546966553, -0.33432692289352417, -0.3083796799182892, -0.23926614224910736, -0.2838917374610901, 1.017175316810608, 0.11289551109075546, -0.19561956822872162, 0.9167234897613525, -0.7877779603004456, 0.915687322616577...
def update _ interest _ queue ( self ) : interest, address = self. _ active _ iq _ item status = yield from self. _ _ get ( address ) if status. interest > = interest : yield from self. _ _ push _ iq ( interest, address ) self. _ active _ iq _ item = ( none, none )
[ -0.4595259130001068, -0.9316009283065796, 0.5115846395492554, -0.281972736120224, -0.09017916768789291, -0.1808335930109024, -0.591723620891571, -0.9539862275123596, 0.045376479625701904, 0.5532844066619873, -0.1515120416879654, 1.242684006690979, -1.0067903995513916, -0.6956665515899658, ...
def _ close _ files ( self ) : try : self. logfile. close ( ) except environmenterror, e : raise ringmastererror ( " error closing log file : \ n % s " % e ) try : self. historyfile. close ( ) except environmenterror, e : raise ringmastererror ( " error closing history file : \ n % s " % e )
[ 0.44611817598342896, -0.3508065342903137, 0.5709511637687683, 0.0015366694424301386, 0.08702326565980911, 1.2507766485214233, 0.5976045727729797, 0.028780780732631683, -1.4208953380584717, -0.5741809606552124, 1.3532044887542725, -0.4170936942100525, -0.33745554089546204, 1.06052565574646,...
def test _ list _ decimal _ pattern _ 2 _ nistxml _ sv _ iv _ list _ decimal _ pattern _ 3 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - pattern - 3. xsd ", instance = " nistdata / list / decimal / sc...
[ -0.3451811373233795, -0.11641138792037964, 0.6423291563987732, 0.503745436668396, -0.012769108638167381, 0.2611251771450043, -0.8226920366287231, 0.5308248996734619, 1.0929760932922363, 0.4352261424064636, -0.9226533770561218, -0.18552137911319733, 0.2365037053823471, 0.10517200082540512, ...
def test _ retrieve _ liked _ movies ( self ) : movie1 = sample _ movie ( user = self. user, title ='interstellar') movie2 = sample _ movie ( user = self. user, title ='nobody') sample _ liked _ movie ( user = self. user _ nonadmin, movie = movie1 ) sample _ liked _ movie ( user = self. user _ nonadmin, movie = movie2 ...
[ -0.6272656321525574, -0.0045207287184894085, 0.41246968507766724, 0.4015796184539795, 0.3783127963542938, 0.6595637798309326, -0.23964425921440125, -0.41369593143463135, -0.3412218987941742, -0.5945701003074646, -1.0064743757247925, 1.0412399768829346, -1.4936047792434692, 0.29900184273719...
def tonpz ( self ) : try : # create the compressed cube fileobj = cstringio. stringio ( ) np. save ( fileobj, self. data ) return zlib. compress ( fileobj. getvalue ( ) ) except : print " pickle and zip. what did i catch? " assert 0
[ 0.30040040612220764, -0.6781229376792908, 0.368119478225708, 0.066765695810318, -0.19505740702152252, -0.1111452654004097, 0.46104755997657776, 0.004472352564334869, 0.40540462732315063, -0.04059867933392525, -0.3601060211658478, -0.7434017062187195, -1.3020753860473633, -0.040280394256114...
def print _ opts ( opts ) : print ('='* 80 ) print ('opts '. center ( 80 ) ) print ('-'* 80 ) for key in opts. _ _ dict _ _ : if opts. _ _ dict _ _ [ key ] : print ('{ : > 30 } : { : < 30 } '. format ( key, opts. _ _ dict _ _ [ key ] ). center ( 80 ) ) print ('='* 80 )
[ -0.5665687322616577, -0.6370075941085815, 0.810552716255188, -1.1336241960525513, 0.22503718733787537, 0.5936639904975891, -0.5718107223510742, -0.6822652816772461, 0.44551071524620056, 0.7011423110961914, 0.3002172112464905, 0.9317523837089539, 0.31847062706947327, 0.4674467444419861, 0...
def _ _ init _ _ ( self, columns, headingpolicy = none ) : super ( ). _ _ init _ _ ( ) if headingpolicy and not isinstance ( headingpolicy, _ _ class _ _. policy ) : raise valueerror ( " invalid heading policy : " + repr ( headingpolicy ) ) # create a subclass of namedtuple for properties of each column # when invoked ...
[ -0.5818037390708923, 0.33782950043678284, 0.830177366733551, 0.6660335063934326, -0.7109477519989014, -0.039600126445293427, 0.05547339841723442, -0.31610769033432007, -0.0239754356443882, 0.04887699335813522, -0.40844836831092834, -0.5169802904129028, 0.05069854110479355, 0.58350890874862...
def _ _ init _ _ ( self, host = default _ host, port = default _ port ) : self. host = host or default _ host self. port = port or default _ port self. _ base _ url ='http : / / { } : { } / api '. format ( self. host, self. port )
[ -0.28950369358062744, -0.14605948328971863, 0.5192738175392151, 0.4266905188560486, 1.2019977569580078, -0.028362639248371124, -0.8282492756843567, 0.5752496719360352, -1.5046449899673462, -0.32615065574645996, -0.4020004868507385, 0.22751949727535248, -0.3325696587562561, 0.29247659444808...
def get _ conn ( self ) - > storage. client : if not self. _ conn : self. _ conn = storage. client ( credentials = self. get _ credentials ( ), client _ info = client _ info, project = self. project _ id ) return self. _ conn
[ 0.26170676946640015, -0.7838262915611267, 0.3647822141647339, 0.5868191123008728, 0.7561576962471008, -0.20587995648384094, 0.03557755425572395, -0.13609832525253296, -0.8415716290473938, -1.3152618408203125, 0.17827343940734863, 0.2728756070137024, -0.3862854838371277, -0.4387952089309692...
def names ( self ) : names, _ = zip ( * self. path ) return names
[ -1.2307238578796387, -0.6929588317871094, 0.4411032795906067, -0.35450348258018494, 0.6524251699447632, 0.39265087246894836, -0.2690363824367523, -0.47286882996559143, 0.3423720598220825, 0.5199131369590759, -1.280387282371521, -0.725570559501648, 0.3258287012577057, 0.7237639427185059, ...
def make _ row ( ) : save ( [ ], { " 1 " : 1, " 0 " : 0 },'0')
[ -0.8318397998809814, 0.9411348104476929, 0.40447917580604553, 0.1139417514204979, 1.050443172454834, 0.25413498282432556, 0.0972205325961113, 0.5644289255142212, -0.28597158193588257, 0.356185644865036, -1.150640606880188, -0.5037462711334229, 0.47537797689437866, 0.8340081572532654, 0.4...
def main ( host, username, password, port, ssl, retry, ask _ password, verbose, topic ) : # pylint : disable = too - many - arguments if verbose : loglevel = logging. debug else : loglevel = logging. warning setup _ logger ( loglevel ) queue = asyncio. queue ( ) if ask _ password : password = getpass. getpass ( ) micro...
[ 0.7878685593605042, -0.5056344270706177, 0.5517292022705078, 1.650261640548706, -0.5123910307884216, -0.5249614715576172, -0.4089813232421875, 0.2504538297653198, -0.305054247379303, 0.2362290918827057, 0.2933315634727478, -0.0874577984213829, -0.5194052457809448, 0.3428977429866791, -0....
def getcurrentnameservers ( ) : try : servers = dns. resolver. resolver ( ). nameservers except : print " unable to get list of internal dns servers. " servers = [ ] # dnspython does not always get things right on windows, particularly in # versions with right - to - left languages. fall back to ipconfig / all if not s...
[ -1.5960900783538818, -0.1503850668668747, 0.48458534479141235, 0.13960878551006317, -0.4294513761997223, -0.18122074007987976, -0.6354431509971619, -1.053232192993164, 0.45930245518684387, 0.015035254880785942, -1.2950631380081177, 0.016602657735347748, -0.5360995531082153, 0.2539536654949...
def binomiale ( n, k, p ) : return a _ among _ b ( n, k ) * pow ( p, k ) * pow ( 1 - p, n - k )
[ 0.5825403928756714, -0.3074999451637268, 0.4414936304092407, 1.0155751705169678, 0.35108983516693115, 0.10050647705793381, -0.9645348787307739, 0.3482690155506134, -0.6973896026611328, 0.724504292011261, 0.05775217339396477, -0.3199397623538971, -0.9217841625213623, -0.5394235253334045, ...
def wx _ wczytaj _ parametry ( self, evt ) : dialog = wx. filedialog ( self, " wybierz plik parametrow ", defaultfile ='', wildcard ='*. txt ', style = wx. fd _ open, pos = ( 10, 10 ) ) if dialog. showmodal ( ) = = wx. id _ ok : sciezka = dialog. getpaths ( ) global parametry parametry = wczytaj _ parametry ( sciezka [...
[ 0.6726655960083008, -0.16171497106552124, 0.5202634334564209, -0.3604359030723572, -1.052659273147583, 1.066727876663208, 1.067293643951416, 0.06804654747247696, -0.6957944631576538, 0.9664421677589417, 0.1336497664451599, 0.9468989372253418, 0.26289331912994385, -0.08458209782838821, -0...